{"version":3,"sources":["webpack:///./src/ui/components/ConfigurableFieldsForm/ConfigurableFieldsForm.module.less?25ee","utils/forms/marshalling.ts","hooks/useForceUpdate.ts","webpack:///./src/ui/components/CodeDebugger/CodeDebugger.module.less?a74d","webpack:///./src/ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditor.module.less?4a46","utils/sources.utils.ts","lib/commons/marshalling.ts","lib/components/EditableList/EditableList.tsx","ui/components/CodeEditor/CodeEditor.tsx","icons/bug.tsx","ui/components/CodeDebugger/DebugEvents.tsx","hooks/useStateWithCallback.ts","ui/components/CodeDebugger/CodeDebugger.tsx","ui/components/CodeDebuggerModal/CodeDebuggerModal.tsx","ui/components/ConfigurableFieldsForm/InputWithDebug.tsx","ui/components/ConfigurableFieldsForm/SwitchWithLabel.tsx","ui/components/ConfigurableFieldsForm/InputWithUpload.tsx","ui/components/ConfigurableFieldsForm/ConfigurableFieldsForm.tsx","ui/components/Tabs/TabName.tsx","webpack:///./src/ui/components/Tabs/TabName.module.less?4b3e","webpack:///./src/lib/components/EditableList/EditableList.less?52c9","constants/regex.ts","webpack:///./src/ui/components/CodeDebuggerModal/CodeDebuggerModal.module.less?70a1","ui/components/Tabs/TabsConfigurator.tsx","ui/components/Popover/PopoverTitle.tsx","ui/components/Popover/PopoverErrorsContent.tsx","ui/components/EditorButtons/EditorButtons.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorConfig.tsx","ui/components/Tabs/TabDescription.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorTransform.tsx","ui/components/ConnectedItems/ConnectedItems.tsx","embeddedDocs/destinationsConnectedItems.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorConnectors.tsx","constants/mapping.ts","utils/validation/jsonPointer.ts","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorMappingsItem.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorMappingsLibrary.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditorMappings.tsx","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditor.utils.ts","../../node_modules/.pnpm/@ant-design+icons-svg@4.2.1/node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js","../../node_modules/.pnpm/@ant-design+icons@4.7.0_react-dom@17.0.2_react@17.0.2/node_modules/@ant-design/icons/es/icons/WarningOutlined.js","ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditor.tsx","utils/validation/date.ts","utils/validation/validators.ts","webpack:///./src/ui/components/Popover/PopoverTitle.module.less?6274","webpack:///./src/ui/components/Popover/PopoverErrorsContent.module.less?5954","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/camelCase.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/capitalize.js","webpack:///./src/ui/components/Tabs/TabDescription.module.less?bbf6","../../node_modules/.pnpm/@ant-design+icons-svg@4.2.1/node_modules/@ant-design/icons-svg/es/asn/ApiOutlined.js","../../node_modules/.pnpm/@ant-design+icons@4.7.0_react-dom@17.0.2_react@17.0.2/node_modules/@ant-design/icons/es/icons/ApiOutlined.js"],"names":["mapFieldValueArray","array","map","value","isArray","isObject","makeObjectFromFieldsValues","fields","options","Object","keys","reduce","accumulator","current","omitEmptyValues","omitFieldsWithPrefix","startsWith","includes","isNullOrUndef","set","useForceUpdate","useState","updateState","useCallback","useForceUpdateTarget","state","setState","forceUpdatedTargets","forceUpdateTheTarget","key","result","SourcesUtils","getDisplayName","src","displayName","sourceId","TYPE_PROPERTY","newInstance","className","classes","cls","undefined","Error","classesMap","forEach","name","newInstanceInternal","initialInstance","json","Array","element","instance","hasOwnProperty","Marshal","newKnownInstance","allClasses","toPureJson","object","constructor","val","emptyValidator","str","EditableList","initialValue","onChange","newItemLabel","validator","initialItems","error","items","setItems","triggerChange","changedValue","item","changeVal","index","newVal","newItems","addItem","removeItem","splice","e","target","CodeEditorComponent","React","lazy","CodeEditor","props","BugIcon","onClick","cn","destinationIds","destinationsStore","list","dest","_uid","length","DebugEvents","handleClick","services","ApplicationServices","get","useLoaderAsObject","backendApiClient","activeProject","id","proxy","eventsData","data","isLoading","allEvents","useMemo","events","event","time","moment","original","_timestamp","sort","e1","e2","isAfter","styles","rows","width","withSmallScrollbar","eventItem","utc","format","event_type","app","useStateWithCallback","initialState","setStateWithCallback","newStateOrLazySetState","callback","Function","lazySetState","prev","newState","useEffect","CodeDebugger","codeFieldLabel","defaultCodeValue","extraSuggestions","handleCodeChange","handleClose","_handleSaveCode","handleSaveCode","run","codeValue","setCodeValue","objectInitialValue","setObjectInitialValue","objectValue","setObjectValue","isEventsVisible","setEventsVisible","calcResult","setCalcResult","runIsLoading","setRunIsLoading","codeState","useRef","isCodeSaved","blockUpdates","codeSaved","isCodeSavedStateBlocked","useForm","form","handleChange","setFieldsValue","handlePaste","getFieldValue","handleRun","values","response","code","logs","userResult","user_result","userError","user_error","setActiveTabKey","err","_response","message","level","handleEventClick","obj","JSON","stringify","handleSwitchEventsVisible","handleCloseEvents","closest","document","body","addEventListener","removeEventListener","activeTabKey","onTabKeyChange","submit","field","onCmdCtrlEnter","eventTabs","darkenBackground","consoleOutput","log","idx","itemError","itemSuccess","syntaxHighlighter","OS_CMD_CTRL_KEY","navigator","userAgent","ControlsComponent","handleCloseWithoutSaving","handleExit","handleSave","isClosePopoverVisible","setIsClosePopoverVisible","_handleSave","preventDefault","_handleRun","stopPropagation","handleEscape","hotkeys","filter","unbind","adaptiveIcon","adaptiveLabel","noMargins","fontSize","buttonGreen","Controls","memo","SectionWithLabel","label","labelClassName","htmlFor","children","CodeDebuggerModal","classNameDebugger","codeFieldLabelDebugger","defaultCodeValueDebugger","handleCloseDebugger","handleCodeChangeDebugger","runDebugger","handleSaveCodeDebugger","extraSuggestionsDebugger","modalClassName","modalCentered","centered","modalWidth","modalClosable","closable","modalMaskClosable","maskClosable","modalProps","modal","InputWithDebug","placeholder","jsDebugger","onButtonClick","text","setText","onValueChange","onKeyDown","minRows","maxRows","bugIcon","SwitchWithLabel","defaultChecked","InputWithUpload","beforeUpload","file","reader","FileReader","onload","content","readAsText","IMAGE_VERSION_FIELD_ID","FormItemName","serialize","getFieldNameById","split","slice","ConfigurableFieldsFormComponent","fieldsParamsList","extraForms","initialValues","availableOauthBackendSecrets","hideFields","handleTouchAnyField","setFormValues","setInitialFormValues","debugModalsStates","setDebugModalsStates","debugModalsValues","setDebugModalsValues","forceUpdateAll","history","useHistory","useLocation","search","handleTouchField","debounce","handleChangeIntInput","project","useProject","disableEdit","permissions","allPermissions","ProjectPermission","MODIFY_CONFIG","handleChangeTextInput","handleChangeSwitch","handleOpenDebugger","URLSearchParams","append","tab","indexOf","replace","toString","disablePrompt","query","debuggerId","handleJsonChange","getFieldsValue","getInitialValue","defaultValue","constantValue","type","initial","calcValue","getFieldComponent","bigField","codeSuggestions","documentation","validationRules","defaultValueToDisplay","typeName","some","formItemWrapperProps","visible","maxOptions","codeEditor","backendSecretAvailable","handleDebuggerRun","debuggerType","transform","_transform_enabled","_transform","configForm","mappingForm","reformat","uid","_type","expression","parse","config","template_variables","entries","v","currentValue","post","handleSaveDebugger","isInitialRender","formValues","formFields","param","initConfig","fieldNeeded","omitFieldRule","constant","push","touched","setFields","required","currentFormValues","defaultFormValues","formItemName","parsedFormValues","isHidden","isOmitted","isRequired","isoDateValidator","ConfigurableFieldsForm","FormItemWrapper","formItemProps","jsonField","span","VersionSelection","selectedVersion","setSelectedVersion","isLatestVersionSelected","version","singleSelectionType","option","TabNameComponent","errorsCount","errorsLevel","hideErrorsCount","TabName","DATE_REGEX","ISO_FULL","ISO_FULL_WO_MS","ISO_SHORT","TabsConfiguratorComponent","tabsList","onTabChange","tabBarExtraContent","isDisabled","getComponent","TabsConfigurator","PopoverTitleComponent","title","PopoverTitle","PopoverErrorsContent","t","EditorButtons","test","save","handleCancel","disabled","titleText","handlePopoverClose","isPopoverVisible","isRequestPending","handlePress","DestinationEditorConfig","destinationData","destinationReference","parameters","TabDescription","description","DestinationEditorTransform","documentationVisible","setDocumentationVisible","templateVarsSuggestions","join","_mappings","cfg","destinationsReferenceMap","defaultTransform","booleanType","rule","Promise","reject","resolve","jsType","NameWithPicture","icon","ConnectedItems","fieldName","itemsList","warningMessage","handleItemChange","selectedItems","setSelectedItems","checked","newItemsIds","findIndex","i","DESTINATIONS_CONNECTED_SOURCES","DESTINATIONS_CONNECTED_API_KEYS","DestinationEditorConnectorsComponent","destination","sources","sourcesStore","sourcesError","errorMessage","apiKeysData","apiKeysStore","apiKeysError","sourcesList","proto","allSources","find","s","snakeCase","sourceProtoType","pic","apiKeysList","APIKeyUtil","beenTouched","activeKey","_onlyKeys","syncFromSourcesStatus","_sources","DestinationEditorConnectors","observer","MAPPING_NAMES","remove","cast","move","MAPPINGS_REFERENCE_MAP","facebook","google_analytics","segment","MAPPING_ROW_PROPS_MAP","_action","_srcField","_dstField","_columnType","_value","isValidJsonPointer","DestinationEditorMappingsItem","action","handleTypeChange","handleActionChange","handleDelete","mappingsItem","delete","deleteLink","secondaryLabel","whiteSpace","DestinationEditorMappingsLibrary","handleDataUpdate","mapFunction","row","catalogKey","rowValue","setLibraryMapping","library","newMappings","_keepUnmappedFields","keepUnmappedFields","mappings","tableNameTemplate","confirm","okText","cancelText","onOk","onCancel","destinationMappings","comment","BooleanStatus","DestinationEditorMappings","actions","setActions","handleFieldsChange","keep","notBeenTouched","handleAdd","add","tabScrollingEl","querySelector","setTimeout","scrollIntoView","mappingsWrap","destinationEditorUtils","testConnection","dst","hideMessage","_connectionTestOk","actionNotification","info","_connectionErrorMessage","handleError","getPromptMessage","tabs","location","WarningOutlined","ref","AntdIcon","_objectSpread","WarningOutlinedSvg","DestinationEditor","editorMode","paramsByProps","disableForceUpdateOnSave","onAfterSaveSucceded","isOnboarding","forceUpdate","urlParams","useParams","params","savePopover","switchSavePopover","testConnecting","setTestConnecting","destinationSaving","setDestinationSaving","testConnectingPopover","switchTestConnectingPopover","getDestinationData","submittedOnce","has","destinationPageRoutes","root","handleUseLibrary","newTableName","_formData","tableName","mappingsForm","destinationsTabs","success","validateTabForm","tabForm","validateFields","errorFields","hideMapping","standalone","tabsInitialData","validateAndTouchField","setDestinationsTabs","oldTabs","oldErrorsCount","newErrorsCount","getFieldsError","a","errors","newTabs","projectRoute","handleViewStatistics","statisticsExact","_id","testConnectingPopoverClose","savePopoverClose","handleTestConnection","_package","_super_type","handleSaveDestination","all","then","allValues","savedDestinationData","flowResult","connectionsHelper","updateSourcesConnectionsToDestination","warn","firstToLower","catch","finally","storageService","connectedSourcesNum","destinations","isAbleToConnectItems","hidden","breadcrumbs","link","DestinationsUtils","ui","currentPageHeaderStore","setBreadcrumbs","wrapper","mainArea","linkedWarning","warningIcon","pseudoLink","tabCard","listIncludeHidden","getUniqueAutoIncId","randomId","_comment","isValidFullIsoDate","date","isValidFullWoMsIsoDate","isValidShortIsoDate","IsValidIsoDate","capitalize","require","createCompounder","camelCase","word","toLowerCase","module","exports","upperFirst","string","ApiOutlined","ApiOutlinedSvg"],"mappings":";;;;;AAAA;AACA,kBAAkB,mxG;;;;;;;;ACDlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,GAAMA,mBAAkB,CAAG,QAArBA,mBAAqB,CAACC,KAAD,CAA2B,CACpD,MAAOA,MAAK,CAACC,GAAN,CAAU,SAAAC,KAAK,QACpBC,sDAAO,CAACD,KAAD,CAAP,CAAiBH,kBAAkB,CAACG,KAAD,CAAnC,CAA6CE,sDAAQ,CAACF,KAAD,CAAR,CAAkBG,0BAA0B,CAACH,KAAD,CAA5C,CAAsDA,KAD/E,EAAf,CAAP,CAGD,CAJD,CAMA,GAAMG,2BAA0B,CAAG,QAA7BA,2BAA6B,CACjCC,MADiC,CAEjCC,OAFiC,QAIjCC,OAAM,CAACC,IAAP,CAAYH,MAAZ,EAAoBI,MAApB,CAA2B,SAACC,WAAD,CAAmBC,OAAnB,CAAuC,CAChE,SAAkDL,OAAlD,SAAkDA,OAAlD,UAAkDA,OAAlD,CAA6D,EAA7D,CAAQM,eAAR,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E,YAAY,CAAC;MAAE,OAAO,MAAT;MAAiB,SAAS;QAAE,KAAK;MAAP;IAA1B,CAAD;EAA3F,CAAV;EAA8rC,QAAQ,KAAtsC;EAA6sC,SAAS;AAAttC,CAAlB;AACeA,2EAAf,E;;;;;CCDA;AACA;;AACA;AACA;AACA;;AAEA,IAAIA,6BAAW,GAAG,SAASA,WAAT,CAAqBxkB,KAArB,EAA4B6d,GAA5B,EAAiC;EACjD,OAAO,aAAahe,sBAAA,CAAoBie,2BAApB,EAA8BC,wCAAa,CAACA,wCAAa,CAAC,EAAD,EAAK/d,KAAL,CAAd,EAA2B,EAA3B,EAA+B;IAC5F6d,GAAG,EAAEA,GADuF;IAE5FhH,IAAI,EAAE4N,eAAcA;EAFwE,CAA/B,CAA3C,CAApB;AAID,CALD;;AAOAD,6BAAW,CAAC7nB,WAAZ,GAA0B,aAA1B;AAC4BkD,iHAAA,CAAiB2kB,6BAAjB,CAA5B,E","file":"static/js/4.23f5a970.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"box-shadow-base\":\"ConfigurableFieldsForm_box-shadow-base__1SrVo\",\"border-debug\":\"ConfigurableFieldsForm_border-debug__2JJ5J\",\"font-heading\":\"ConfigurableFieldsForm_font-heading__2OarV\",\"font-monospace\":\"ConfigurableFieldsForm_font-monospace__-1MAt\",\"ant-select-disabled\":\"ConfigurableFieldsForm_ant-select-disabled__19ttC\",\"ant-select\":\"ConfigurableFieldsForm_ant-select__1I17S\",\"ant-select-customize-input\":\"ConfigurableFieldsForm_ant-select-customize-input__2G3rS\",\"ant-select-selector\":\"ConfigurableFieldsForm_ant-select-selector__2KvBz\",\"ant-input-number-disabled\":\"ConfigurableFieldsForm_ant-input-number-disabled__34RIN\",\"ant-select-item-option-selected\":\"ConfigurableFieldsForm_ant-select-item-option-selected__2D8u4\",\"ant-select-item-option-active\":\"ConfigurableFieldsForm_ant-select-item-option-active__wAfpu\",\"ant-dropdown-menu-submenu-active\":\"ConfigurableFieldsForm_ant-dropdown-menu-submenu-active__7tTBp\",\"ant-dropdown-menu-submenu-title\":\"ConfigurableFieldsForm_ant-dropdown-menu-submenu-title__38svE\",\"ant-collapse-content-box\":\"ConfigurableFieldsForm_ant-collapse-content-box__5fHBD\",\"ant-card\":\"ConfigurableFieldsForm_ant-card__wZyLT\",\"ant-modal-content\":\"ConfigurableFieldsForm_ant-modal-content__HMves\",\"ant-table-tbody\":\"ConfigurableFieldsForm_ant-table-tbody__1keDh\",\"ant-table-thead\":\"ConfigurableFieldsForm_ant-table-thead__rQwgk\",\"ant-checkbox-inner\":\"ConfigurableFieldsForm_ant-checkbox-inner__2IPNh\",\"ant-modal-header\":\"ConfigurableFieldsForm_ant-modal-header__1VfB3\",\"ant-table\":\"ConfigurableFieldsForm_ant-table__1P32C\",\"ant-list-split\":\"ConfigurableFieldsForm_ant-list-split__3Evk3\",\"ant-list-header\":\"ConfigurableFieldsForm_ant-list-header__2zcOC\",\"ant-tag\":\"ConfigurableFieldsForm_ant-tag__3787s\",\"ant-tooltip-inner\":\"ConfigurableFieldsForm_ant-tooltip-inner__2Fgov\",\"ant-badge-status-processing\":\"ConfigurableFieldsForm_ant-badge-status-processing__ETS6U\",\"ant-dropdown-menu-item-active\":\"ConfigurableFieldsForm_ant-dropdown-menu-item-active__K1ai0\",\"ant-dropdown\":\"ConfigurableFieldsForm_ant-dropdown__4aFbw\",\"ant-popover-inner\":\"ConfigurableFieldsForm_ant-popover-inner__HtpKb\",\"ant-popover-arrow\":\"ConfigurableFieldsForm_ant-popover-arrow__2Kyv6\",\"ant-popover-placement-rightTop\":\"ConfigurableFieldsForm_ant-popover-placement-rightTop__iU4DT\",\"ant-popover-content\":\"ConfigurableFieldsForm_ant-popover-content__3nkyT\",\"ant-popover-placement-leftBottom\":\"ConfigurableFieldsForm_ant-popover-placement-leftBottom__2xggu\",\"ant-popover-placement-bottomRight\":\"ConfigurableFieldsForm_ant-popover-placement-bottomRight__1fNK3\",\"ant-popover-placement-top\":\"ConfigurableFieldsForm_ant-popover-placement-top__qn-ry\",\"icon-size-base\":\"ConfigurableFieldsForm_icon-size-base__3c6lu\",\"icon-size-lg\":\"ConfigurableFieldsForm_icon-size-lg__3l3X8\",\"ant-tabs-card\":\"ConfigurableFieldsForm_ant-tabs-card__Yr3V6\",\"ant-tabs-tab-active\":\"ConfigurableFieldsForm_ant-tabs-tab-active__1TuHT\",\"ant-skeleton\":\"ConfigurableFieldsForm_ant-skeleton__iUJBH\",\"ant-skeleton-paragraph\":\"ConfigurableFieldsForm_ant-skeleton-paragraph__7yAQO\",\"field\":\"ConfigurableFieldsForm_field__3zErp\",\"jsonField\":\"ConfigurableFieldsForm_jsonField__2F664\",\"bigField\":\"ConfigurableFieldsForm_bigField__j9UB3\",\"modal\":\"ConfigurableFieldsForm_modal__2L9s4\",\"codeEditor\":\"ConfigurableFieldsForm_codeEditor__E85q-\",\"bugIcon\":\"ConfigurableFieldsForm_bugIcon__2JgNu\"};","import { isNullOrUndef } from \"lib/commons/utils\"\nimport isArray from \"lodash/isArray\"\nimport isObject from \"lodash/isObject\"\nimport set from \"lodash/set\"\n\nconst mapFieldValueArray = (array: Array) => {\n return array.map(value =>\n isArray(value) ? mapFieldValueArray(value) : isObject(value) ? makeObjectFromFieldsValues(value) : value\n )\n}\n\nconst makeObjectFromFieldsValues = (\n fields: any,\n options?: { omitEmptyValues?: boolean; omitFieldsWithPrefix?: string }\n): F =>\n Object.keys(fields).reduce((accumulator: any, current: string) => {\n const { omitEmptyValues, omitFieldsWithPrefix } = options ?? {}\n if (omitFieldsWithPrefix && current.startsWith(omitFieldsWithPrefix)) return accumulator\n\n const value = fields[current]\n if ([\"string\", \"number\", \"boolean\"].includes(typeof value)) {\n if (omitEmptyValues && (value === \"\" || isNullOrUndef(value))) return accumulator\n set(accumulator, current, value === \"null\" ? null : value)\n } else if (typeof value === \"object\") {\n if (isArray(value)) {\n set(accumulator, current, mapFieldValueArray(value))\n // set(\n // accumulator,\n // current,\n // value.map((f) =>\n // typeof f === 'object' ? makeObjectFromFieldsValues(f) : f\n // )\n // );\n } else if (value != null) {\n set(accumulator, current, makeObjectFromFieldsValues(value))\n }\n }\n\n return accumulator\n }, {} as F)\n\nexport { makeObjectFromFieldsValues }\n","import { useCallback, useState } from \"react\"\n\nexport function useForceUpdate() {\n const [, updateState] = useState()\n\n return useCallback(() => updateState({}), [])\n}\n\n/**\n * @returns callback that triggers the force update. The callback\n * takes an optional key parameter that partially updates the state\n * which allows to target specific force updates in `useEffect` or\n * similar dependency-based hooks.\n *\n * If the key if not specified, hook updates all keys and thus behaves\n * the same as `useforceUpdate` hook\n */\nexport const useForceUpdateTarget = (): {\n forceUpdatedTargets: UnknownObject\n forceUpdateTheTarget: (key?: string) => void\n} => {\n const [state, setState] = useState({})\n\n const forceUpdatedTargets = state\n const forceUpdateTheTarget = useCallback((key?: string) => {\n key\n ? setState(state => ({ ...state, [key]: {} }))\n : setState(state => Object.keys(state).reduce((result, key) => ({ ...result, [key]: {} }), {}))\n }, [])\n\n return {\n forceUpdatedTargets,\n forceUpdateTheTarget,\n }\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"box-shadow-base\":\"CodeDebugger_box-shadow-base__1d-Au\",\"border-debug\":\"CodeDebugger_border-debug__2CGOg\",\"font-heading\":\"CodeDebugger_font-heading__FPraA\",\"font-monospace\":\"CodeDebugger_font-monospace__2yKzo\",\"ant-select-disabled\":\"CodeDebugger_ant-select-disabled__2PfSv\",\"ant-select\":\"CodeDebugger_ant-select__3G5Z6\",\"ant-select-customize-input\":\"CodeDebugger_ant-select-customize-input__PhQ13\",\"ant-select-selector\":\"CodeDebugger_ant-select-selector__2cmZn\",\"ant-input-number-disabled\":\"CodeDebugger_ant-input-number-disabled__1C35O\",\"ant-select-item-option-selected\":\"CodeDebugger_ant-select-item-option-selected__3qIfR\",\"ant-select-item-option-active\":\"CodeDebugger_ant-select-item-option-active__17Sp8\",\"ant-dropdown-menu-submenu-active\":\"CodeDebugger_ant-dropdown-menu-submenu-active__1RIs3\",\"ant-dropdown-menu-submenu-title\":\"CodeDebugger_ant-dropdown-menu-submenu-title__1EgUx\",\"ant-collapse-content-box\":\"CodeDebugger_ant-collapse-content-box__2bnbG\",\"ant-card\":\"CodeDebugger_ant-card__2OgTJ\",\"ant-modal-content\":\"CodeDebugger_ant-modal-content__140Ev\",\"ant-table-tbody\":\"CodeDebugger_ant-table-tbody__esbAd\",\"ant-table-thead\":\"CodeDebugger_ant-table-thead__nOuvo\",\"ant-checkbox-inner\":\"CodeDebugger_ant-checkbox-inner__ZTLPH\",\"ant-modal-header\":\"CodeDebugger_ant-modal-header__Lp_N6\",\"ant-table\":\"CodeDebugger_ant-table__3AvcO\",\"ant-list-split\":\"CodeDebugger_ant-list-split__1HxUV\",\"ant-list-header\":\"CodeDebugger_ant-list-header__274ZX\",\"ant-tag\":\"CodeDebugger_ant-tag__1cJG8\",\"ant-tooltip-inner\":\"CodeDebugger_ant-tooltip-inner__3Kx1y\",\"ant-badge-status-processing\":\"CodeDebugger_ant-badge-status-processing__1-gTg\",\"ant-dropdown-menu-item-active\":\"CodeDebugger_ant-dropdown-menu-item-active__1UOTa\",\"ant-dropdown\":\"CodeDebugger_ant-dropdown__1vDJH\",\"ant-popover-inner\":\"CodeDebugger_ant-popover-inner__30sib\",\"ant-popover-arrow\":\"CodeDebugger_ant-popover-arrow__24qje\",\"ant-popover-placement-rightTop\":\"CodeDebugger_ant-popover-placement-rightTop__FPSda\",\"ant-popover-content\":\"CodeDebugger_ant-popover-content__xyCPR\",\"ant-popover-placement-leftBottom\":\"CodeDebugger_ant-popover-placement-leftBottom__nTfgn\",\"ant-popover-placement-bottomRight\":\"CodeDebugger_ant-popover-placement-bottomRight__V3VHY\",\"ant-popover-placement-top\":\"CodeDebugger_ant-popover-placement-top__1E0bm\",\"icon-size-base\":\"CodeDebugger_icon-size-base__1BFaQ\",\"icon-size-lg\":\"CodeDebugger_icon-size-lg__3IH7u\",\"ant-tabs-card\":\"CodeDebugger_ant-tabs-card__3FNNU\",\"ant-tabs-tab-active\":\"CodeDebugger_ant-tabs-tab-active__1ahy8\",\"ant-skeleton\":\"CodeDebugger_ant-skeleton__3ZEnF\",\"ant-skeleton-paragraph\":\"CodeDebugger_ant-skeleton-paragraph__2dCeE\",\"darkenBackground\":\"CodeDebugger_darkenBackground__2ZGcD\",\"field\":\"CodeDebugger_field__1A0xz\",\"buttonGreen\":\"CodeDebugger_buttonGreen__ed3VG\",\"checkbox\":\"CodeDebugger_checkbox__1HE59\",\"checkboxChecked\":\"CodeDebugger_checkboxChecked__o3T8E\",\"hideAntdCheckbox\":\"CodeDebugger_hideAntdCheckbox__13Tud\",\"checkboxLabel\":\"CodeDebugger_checkboxLabel__3n0Ut\",\"itemError\":\"CodeDebugger_itemError__3bOOz\",\"itemSuccess\":\"CodeDebugger_itemSuccess__1olxX\",\"withSmallScrollbar\":\"CodeDebugger_withSmallScrollbar__1KbGK\",\"syntaxHighlighter\":\"CodeDebugger_syntaxHighlighter__3Sbbg\",\"buttonsSuperlabel\":\"CodeDebugger_buttonsSuperlabel__15Emc\",\"label\":\"CodeDebugger_label__ChSPy\",\"adaptiveIcon\":\"CodeDebugger_adaptiveIcon__1IiAn\",\"adaptiveLabel\":\"CodeDebugger_adaptiveLabel__1LJed\",\"noMargins\":\"CodeDebugger_noMargins__29AO_\",\"splitter\":\"CodeDebugger_splitter__3UGdm\",\"splitterHorizontal\":\"CodeDebugger_splitterHorizontal__Zk6VG\",\"saveIndicator\":\"CodeDebugger_saveIndicator__2IENC\",\"events\":\"CodeDebugger_events__2h2EV\",\"eventItem\":\"CodeDebugger_eventItem__V0z15\",\"eventTabs\":\"CodeDebugger_eventTabs__16sL6\",\"consoleOutput\":\"CodeDebugger_consoleOutput__3W8Kh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"box-shadow-base\":\"DestinationEditor_box-shadow-base__39kp2\",\"border-debug\":\"DestinationEditor_border-debug__24AQt\",\"font-heading\":\"DestinationEditor_font-heading__1hJ4J\",\"font-monospace\":\"DestinationEditor_font-monospace__1p5Fa\",\"ant-select-disabled\":\"DestinationEditor_ant-select-disabled__1LZZn\",\"ant-select\":\"DestinationEditor_ant-select__Ya14O\",\"ant-select-customize-input\":\"DestinationEditor_ant-select-customize-input__Cj70H\",\"ant-select-selector\":\"DestinationEditor_ant-select-selector__2Dscp\",\"ant-input-number-disabled\":\"DestinationEditor_ant-input-number-disabled__MCIZY\",\"ant-select-item-option-selected\":\"DestinationEditor_ant-select-item-option-selected__3_8Z_\",\"ant-select-item-option-active\":\"DestinationEditor_ant-select-item-option-active__1jpwe\",\"ant-dropdown-menu-submenu-active\":\"DestinationEditor_ant-dropdown-menu-submenu-active__2VxQA\",\"ant-dropdown-menu-submenu-title\":\"DestinationEditor_ant-dropdown-menu-submenu-title__1EV5R\",\"ant-collapse-content-box\":\"DestinationEditor_ant-collapse-content-box__1p_Ta\",\"ant-card\":\"DestinationEditor_ant-card__2KDPs\",\"ant-modal-content\":\"DestinationEditor_ant-modal-content__3PV3c\",\"ant-table-tbody\":\"DestinationEditor_ant-table-tbody__dumNj\",\"ant-table-thead\":\"DestinationEditor_ant-table-thead__1IIMI\",\"ant-checkbox-inner\":\"DestinationEditor_ant-checkbox-inner__2_Kau\",\"ant-modal-header\":\"DestinationEditor_ant-modal-header__30XUG\",\"ant-table\":\"DestinationEditor_ant-table__TjftZ\",\"ant-list-split\":\"DestinationEditor_ant-list-split__23L3_\",\"ant-list-header\":\"DestinationEditor_ant-list-header__2w2jl\",\"ant-tag\":\"DestinationEditor_ant-tag__28Y5p\",\"ant-tooltip-inner\":\"DestinationEditor_ant-tooltip-inner__2yI5s\",\"ant-badge-status-processing\":\"DestinationEditor_ant-badge-status-processing__2YuNv\",\"ant-dropdown-menu-item-active\":\"DestinationEditor_ant-dropdown-menu-item-active__1a_sP\",\"ant-dropdown\":\"DestinationEditor_ant-dropdown__W2ll8\",\"ant-popover-inner\":\"DestinationEditor_ant-popover-inner__3AJ0W\",\"ant-popover-arrow\":\"DestinationEditor_ant-popover-arrow__OvgEI\",\"ant-popover-placement-rightTop\":\"DestinationEditor_ant-popover-placement-rightTop__3_87h\",\"ant-popover-content\":\"DestinationEditor_ant-popover-content__2M1AR\",\"ant-popover-placement-leftBottom\":\"DestinationEditor_ant-popover-placement-leftBottom__gNCU2\",\"ant-popover-placement-bottomRight\":\"DestinationEditor_ant-popover-placement-bottomRight__1lqOB\",\"ant-popover-placement-top\":\"DestinationEditor_ant-popover-placement-top__1TFIP\",\"icon-size-base\":\"DestinationEditor_icon-size-base__CBqDP\",\"icon-size-lg\":\"DestinationEditor_icon-size-lg__bqWre\",\"ant-tabs-card\":\"DestinationEditor_ant-tabs-card__25RC2\",\"ant-tabs-tab-active\":\"DestinationEditor_ant-tabs-tab-active__nbdS6\",\"ant-skeleton\":\"DestinationEditor_ant-skeleton__1kjc_\",\"ant-skeleton-paragraph\":\"DestinationEditor_ant-skeleton-paragraph__1FS9O\",\"mainArea\":\"DestinationEditor_mainArea__CavFN\",\"linkedWarning\":\"DestinationEditor_linkedWarning__3Gwzr\",\"warningIcon\":\"DestinationEditor_warningIcon__DqFL7\",\"pseudoLink\":\"DestinationEditor_pseudoLink__3Qh_p\",\"tabCard\":\"DestinationEditor_tabCard__1jzaq\",\"highlightNewElement\":\"DestinationEditor_highlightNewElement__3gb7y\",\"mappingsWrap\":\"DestinationEditor_mappingsWrap__3aWoB\",\"mappings\":\"DestinationEditor_mappings__3A8lw\",\"mappingsItem\":\"DestinationEditor_mappingsItem__3aKqT\",\"delete\":\"DestinationEditor_delete__1yWgm\",\"deleteLink\":\"DestinationEditor_deleteLink__bL7aO\",\"secondaryLabel\":\"DestinationEditor_secondaryLabel__3qARx\",\"library\":\"DestinationEditor_library__1odhu\",\"item\":\"DestinationEditor_item__1ELep\",\"comment\":\"DestinationEditor_comment__3Ipdn\",\"documentation\":\"DestinationEditor_documentation__1EE_g\"};","export const SourcesUtils = {\n getDisplayName(src: SourceData) {\n return src.displayName || src.sourceId\n },\n}\n","/**\n * Helper classes to serialize things to JSON and back\n */\nconst TYPE_PROPERTY = \"$type\"\n\ninterface IMarshal {\n toPureJson(object: any)\n newInstance(json: any, classes?: any[]): any\n newKnownInstance(cls: any, json: any, classes?: any[]): any\n}\n\nfunction newInstance(className: string, classes: Record) {\n if (className === \"Object\") {\n return {}\n }\n let cls = classes[className]\n if (cls === undefined) {\n throw new Error(\n `Unknown class ${className}. Pass classes to as a second argument of newInstanceInternal(). Known classes '${Object.keys(\n classes\n )}'`\n )\n }\n return new cls()\n}\n\nfunction classesMap(classes?: any[]) {\n if (classes === undefined) {\n return {}\n }\n let map = {}\n classes.forEach(cls => (map[cls.name] = cls))\n return map\n}\n\nfunction newInstanceInternal(initialInstance: any, json: any, classes: Record) {\n if (json == null) {\n return null\n } else if (typeof json !== \"object\" && typeof json !== \"function\") {\n return json\n } else if (typeof json == \"object\") {\n if (Array.isArray(json)) {\n return (json as any[]).map(element => newInstanceInternal(null, element, classes))\n } else {\n let instance\n if (json[TYPE_PROPERTY] !== undefined) {\n instance = newInstance(json[TYPE_PROPERTY], classes)\n } else {\n instance = initialInstance ? initialInstance : new Object()\n }\n for (let key in json) {\n if (json.hasOwnProperty(key) && key != TYPE_PROPERTY) {\n instance[key] = newInstanceInternal(null, json[key], classes)\n }\n }\n return instance\n }\n } else {\n throw new Error(`Unsupported object type ${typeof json}`)\n }\n}\n\nconst Marshal: IMarshal = {\n newKnownInstance(cls: any, json: any, classes?: any[]): any {\n if (!cls) {\n throw new Error(`Class should be defined, not ${cls}`)\n }\n let allClasses = classes ? [...classes, cls] : [cls]\n return newInstanceInternal(new cls(), json, classesMap(allClasses))\n },\n\n newInstance: (json: any, classes?: any[]) => {\n return newInstanceInternal(null, json, classesMap(classes))\n },\n\n toPureJson: (object: any) => {\n if (object == null) {\n return null\n } else if (typeof object !== \"object\" && typeof object !== \"function\") {\n return object\n } else if (typeof object == \"object\") {\n if (Array.isArray(object)) {\n return (object as any[]).map(element => Marshal.toPureJson(element))\n } else {\n let result = {}\n if (object.constructor.name !== \"Object\") {\n result[TYPE_PROPERTY] = object.constructor.name\n }\n for (let key in object) {\n let val = object[key]\n if (typeof val !== \"function\") {\n result[key] = Marshal.toPureJson(val)\n }\n }\n return result\n }\n } else {\n throw new Error(`Unsupported object type ${typeof object}`)\n }\n },\n}\n\nexport default Marshal\n","import * as React from \"react\"\nimport { Simulate } from \"react-dom/test-utils\"\nimport { useState } from \"react\"\nimport { Button, Col, Input, Row } from \"antd\"\nimport MinusOutlined from \"@ant-design/icons/lib/icons/MinusOutlined\"\nimport PlusOutlined from \"@ant-design/icons/lib/icons/PlusOutlined\"\nimport { Align } from \"../components\"\nimport \"./EditableList.less\"\n\ntype ListValue = string[]\n\ntype ItemState = { value: string; error: string | null }[]\n\nconst emptyValidator = str => {\n return null\n}\n\nexport type EditableListProps = {\n initialValue?: ListValue\n onChange?: (val: ListValue) => void\n newItemLabel?: string\n validator?: (string) => string\n}\n\nexport function EditableList({\n initialValue = [],\n onChange,\n newItemLabel = \"New Item\",\n validator = emptyValidator,\n}: EditableListProps) {\n if (typeof initialValue === \"string\") {\n initialValue = []\n }\n const initialItems = initialValue.map(str => {\n return {\n value: str,\n error: validator(str),\n }\n })\n const [items, setItems] = useState(initialItems)\n\n const triggerChange = changedValue => {\n if (onChange) {\n onChange(changedValue.map(item => item.value))\n }\n }\n\n const changeVal = (index, newVal) => {\n let newItems = [...items]\n newItems[index].value = newVal\n newItems[index].error = validator(newVal)\n triggerChange(newItems)\n setItems(newItems)\n }\n\n const addItem = () => {\n let newItems = [...items, { value: \"\", error: validator(\"\") }]\n triggerChange(newItems)\n setItems(newItems)\n }\n\n const removeItem = index => {\n let newItems = [...items]\n newItems.splice(index, 1)\n triggerChange(newItems)\n setItems(newItems)\n }\n\n return (\n
\n {items.map((item, index) => {\n return (\n \n \n changeVal(index, e.target.value)} />\n
{item.error ? item.error : \" \"}
\n \n \n \n
\n )\n}\n","import React from \"react\"\nimport { CenteredSpin } from \"lib/components/components\"\nimport { Props } from \"./CodeEditor.types\"\n\nconst CodeEditorComponent = React.lazy(\n () => import(/* webpackPrefetch: true */ \"ui/components/CodeEditor/CodeEditorComponent\")\n)\n\nexport const CodeEditor = (props: Props) => (\n // null\n }>\n \n \n)\n","import cn from \"classnames\"\n\ninterface Props {\n className?: string\n onClick?: () => void\n}\n\nconst BugIcon = ({ className, onClick }: Props) => (\n \n \n \n \n \n)\n\nexport default BugIcon\n","// @Libs\nimport { useMemo } from \"react\"\nimport { Button, Card, List, Skeleton, Tag } from \"antd\"\nimport { range } from \"lodash\"\nimport moment from \"moment\"\n// @Services\nimport ApplicationServices from \"lib/services/ApplicationServices\"\nimport { Event } from \"../../../lib/services/events\"\n// @Hooks\nimport { useLoaderAsObject } from \"hooks/useLoader\"\n// @Styles\nimport styles from \"./CodeDebugger.module.less\"\nimport { destinationsStore } from \"stores/destinations\"\n\ninterface Props {\n handleClick: (ev: Event) => () => void\n}\n\nconst destinationIds = destinationsStore.list.map(dest => dest._uid)\ndestinationIds.length = 5\n\nconst DebugEvents = ({ handleClick }: Props) => {\n const services = ApplicationServices.get()\n\n const { data: eventsData, isLoading } = useLoaderAsObject(\n async () =>\n await services.backendApiClient.get(`/events/cache?project_id=${services.activeProject.id}&limit=10`, {\n proxy: true,\n })\n )\n\n const allEvents = useMemo(() => {\n const events = eventsData?.events ?? []\n if (events.length > 100) events.length = 100\n return events\n .map(event => ({\n data: event,\n time: moment(event.original._timestamp),\n }))\n .sort((e1: Event, e2: Event) => {\n if (e1.time.isAfter(e2.time)) {\n return -1\n } else if (e2.time.isAfter(e1.time)) {\n return 1\n }\n return 0\n })\n }, [eventsData?.events])\n\n return (\n \n {isLoading ? (\n (\n \n )}\n />\n ) : (\n {\n return (\n \n

{item?.time?.utc?.()?.format?.(\"YYYY-MM-DD hh:mm:ss\")} (UTC)

\n {item?.data?.original?.event_type ? {item?.data?.original?.event_type} : \"\"}\n {item?.data?.original?.app ? {item?.data?.original?.app} : \"\"}\n {item?.data?.original?.src ? {item?.data?.original?.src} : \"\"}\n \n )\n }}\n />\n )}\n
\n )\n}\n\nDebugEvents.displayName = \"DebugEvents\"\n\nexport { DebugEvents }\n","import { useCallback, useEffect, useState } from \"react\"\n\ntype NewStateOrLazySetState = T | ((prevState: T) => T)\ntype Callback = () => unknown | Promise\ntype SetState = (newStateOrLazySetState: NewStateOrLazySetState, callback?: Callback) => void\n\ntype State = {\n state: T\n callback?: Callback\n}\n\n/**\n * Works the same as a regular `useState`, but allows to pass a callback\n * as a second argument of `setState`. The callback will run once the\n * state was updated.\n *\n * Note: this implementation does NOT support batching of state updates.\n * Use this hook only if you are sure that sequential updates won't slow down your UI.\n * @param initialState\n * @returns\n */\nexport const useStateWithCallback = (initialState: T): [T, SetState] => {\n const [state, setState] = useState>({\n state: initialState,\n })\n\n const setStateWithCallback = useCallback>(async (newStateOrLazySetState, callback?) => {\n /**\n * `flushSync` disables state updates batching.\n * This might be needed to prevent loosing callbacks in case of multiple calls of setStateWithCallback\n * since those callbacks are stored in state.\n *\n * The problem with flushSync is that React can not flush during the rendering\n * This means setStateWithCallback can not be called in the lifecycle methods -- react will throw warnings to console.\n *\n * Remove this code and comment later on if this proves to work fine without flushing.\n * */\n\n /** this part works the same as an ordinary setState */\n if (newStateOrLazySetState instanceof Function) {\n const lazySetState = newStateOrLazySetState\n setState(prev => {\n return {\n state: lazySetState(prev.state),\n callback,\n }\n })\n } else {\n const newState = newStateOrLazySetState\n setState({\n state: newState,\n callback,\n })\n }\n }, [])\n\n /** Runs the callback once state has changed */\n useEffect(() => {\n ;(async () => {\n await state.callback?.()\n })()\n }, [state])\n\n return [state.state, setStateWithCallback]\n}\n","// @Libs\nimport React, { memo, MutableRefObject, useCallback, useEffect, useRef, useState } from \"react\"\nimport { Button, Dropdown, Form, Spin, Tooltip, Popconfirm } from \"antd\"\nimport hotkeys from \"hotkeys-js\"\nimport cn from \"classnames\"\n// @Components\nimport { DebugEvents } from \"ui/components/CodeDebugger/DebugEvents\"\nimport { CodeEditor } from \"ui/components/CodeEditor/CodeEditor\"\n// @Icons\nimport CaretRightOutlined from \"@ant-design/icons/lib/icons/CaretRightOutlined\"\nimport UnorderedListOutlined from \"@ant-design/icons/lib/icons/UnorderedListOutlined\"\nimport styles from \"./CodeDebugger.module.less\"\nimport { Event as RecentEvent } from \"../../../lib/services/events\"\nimport { SyntaxHighlighterAsync } from \"lib/components/SyntaxHighlighter/SyntaxHighlighter\"\nimport {\n CloseOutlined,\n CodeOutlined,\n LoadingOutlined,\n DownloadOutlined,\n EyeFilled,\n EyeInvisibleFilled,\n} from \"@ant-design/icons\"\nimport { useStateWithCallback } from \"hooks/useStateWithCallback\"\nimport { Tabs } from \"antd/es\"\n\nexport interface CodeDebuggerProps {\n /**\n * Run handler, async.\n * That function takes form values and returns response or error\n * */\n run: (values: FormValues) => any\n /**\n * @deprecated\n * Prop to make code field hidden, visible by default\n * */\n codeFieldVisible?: boolean\n /**\n * Prop to customize label of code field, `Code` by default\n * */\n codeFieldLabel?: string\n /**\n * Additional className for wrap div\n * */\n className?: string\n /**\n * InitialValue for code field\n * */\n defaultCodeValue?: string\n /**\n * Additional code suggestions\n * */\n extraSuggestions?: string\n /**\n * Code field change handler\n * */\n handleCodeChange?: (value: string | object) => void\n /**\n * Close modal for cases with custom close button\n * */\n handleClose?: () => void\n /**\n * Callback for the `save` button\n */\n handleSaveCode?: (value: string) => void\n}\n\nexport interface FormValues {\n object: string\n code: string\n}\n\ninterface CalculationLog {\n level: string\n message: string\n}\n\ninterface CalculationResult {\n code: \"error\" | \"success\"\n format?: string | null\n result?: string\n logs?: CalculationLog[]\n error?: string\n userResult?: string\n userError?: string\n}\n\nconst CodeDebugger = ({\n className,\n codeFieldLabel = \"Table Name Expression\",\n defaultCodeValue,\n extraSuggestions,\n handleCodeChange,\n handleClose,\n handleSaveCode: _handleSaveCode,\n run,\n}: CodeDebuggerProps) => {\n //to save code changes on component reload and pass it here from parent in effect bellow\n const [codeValue, setCodeValue] = useStateWithCallback(defaultCodeValue)\n\n const [objectInitialValue, setObjectInitialValue] = useState(`{\n \"event_type\": \"example_event\",\n \"advice\": \"Click 'Copy Recent Event' button above to paste real one from event stream.\" \n}`)\n //object value used for monaco code suggestions\n const [objectValue, setObjectValue] = useState(\"\")\n const [isEventsVisible, setEventsVisible] = useState(false)\n const [calcResult, setCalcResult] = useState()\n const [runIsLoading, setRunIsLoading] = useState(false)\n\n const codeState = useRef({\n isCodeSaved: true,\n blockUpdates: false,\n })\n\n /** Stores whether */\n const codeSaved = useRef(true)\n\n /** Allows to change fields values without alarming user about the unsaved changes */\n const isCodeSavedStateBlocked = useRef(false)\n\n const [form] = Form.useForm()\n\n const handleChange =\n (name: \"object\" | \"code\") => (value: string | object, options?: { doNotSetCodeNotSaved?: boolean }) => {\n form.setFieldsValue({ [name]: value ? value : \"\" })\n if (name === \"code\") {\n handleCodeChange?.(value)\n // if (!options.doNotSetCodeNotSaved) {\n if (!isCodeSavedStateBlocked.current) {\n codeSaved.current = false\n }\n }\n }\n\n const handlePaste = () => {\n setCodeValue(form.getFieldValue(\"code\"))\n setObjectValue(form.getFieldValue(\"object\"))\n }\n\n const handleSaveCode = () => {\n _handleSaveCode(form.getFieldValue(\"code\"))\n codeSaved.current = true\n }\n\n const handleRun = async (values: FormValues) => {\n setRunIsLoading(true)\n\n try {\n const response = await run(values)\n\n setCalcResult({\n code: \"success\",\n format: response.format,\n result: response.result,\n error: response.error,\n logs: response.logs,\n userResult: response.user_result,\n userError: response.user_error,\n })\n\n if (response.user_result) {\n setActiveTabKey(\"user-transform\")\n }\n } catch (error) {\n const err = error?._response?.error || error?._response?.message || error?.message || \"Error\"\n const logs = error._response?.logs || []\n setCalcResult({\n code: \"error\",\n format: error?._response?.format ?? null,\n result: error?._response?.result ?? \"\",\n logs: [...logs, { level: \"error\", message: error?._response?.user_error || err }],\n error: err,\n userResult: error?._response?.user_result ?? \"\",\n userError: error?._response?.user_error ?? \"\",\n })\n\n setActiveTabKey(\"console\")\n } finally {\n setRunIsLoading(false)\n }\n }\n\n const handleEventClick = (event: RecentEvent) => () => {\n const obj = JSON.stringify(event, null, 2)\n handleChange(\"object\")(obj)\n setCodeValue(form.getFieldValue(\"code\"))\n setObjectValue(obj)\n setEventsVisible(false)\n }\n\n const handleSwitchEventsVisible = () => setEventsVisible(isEventsVisible => !isEventsVisible)\n\n const handleCloseEvents = useCallback(e => {\n if (!e.target.closest(\".ant-dropdown\") && !e.target.closest(\"#events-button\")) {\n setEventsVisible(false)\n }\n }, [])\n\n useEffect(() => {\n if (defaultCodeValue) {\n isCodeSavedStateBlocked.current = true\n form.setFieldsValue({ code: defaultCodeValue })\n setCodeValue(defaultCodeValue, () => {\n isCodeSavedStateBlocked.current = false\n })\n }\n }, [defaultCodeValue, form])\n\n useEffect(() => {\n document.body.addEventListener(\"click\", handleCloseEvents)\n return () => document.body.removeEventListener(\"click\", handleCloseEvents)\n }, [])\n\n const [activeTabKey, setActiveTabKey] = useState(\"console\")\n const onTabKeyChange = key => setActiveTabKey(key)\n\n return (\n
\n
\n \n
\n
\n
\n
\n \n \n \n \n }\n trigger={[\"click\"]}\n visible={isEventsVisible}\n >\n }\n id=\"events-button\"\n onClick={handleSwitchEventsVisible}\n >\n Copy Recent Event\n \n \n \n
\n \n \n \n \n \n
\n
\n
\n \n \n \n {(calcResult?.logs ?? []).map((log, idx) => (\n
\n
{log.message}
\n
\n ))}\n
\n \n \n
\n \n \n {calcResult?.code ?? \"\"}\n \n {calcResult && (\n \n {calcResult.error || calcResult?.userError ? (\n calcResult?.userError || calcResult.error\n ) : (\n \n {calcResult.result}\n \n )}\n \n )}\n
\n
\n \n {((calcResult?.userResult && calcResult?.userResult !== calcResult?.result) ||\n (calcResult?.userError && calcResult?.userError !== calcResult?.error)) && (\n \n
\n \n \n {calcResult?.userResult ? \"success\" : calcResult?.userError ? \"error\" : \"\"}\n \n {calcResult && (\n \n {calcResult.userError ? (\n calcResult.userError\n ) : (\n \n {calcResult.userResult}\n \n )}\n \n )}\n
\n
\n \n )}\n \n \n \n {/**\n * Elements below are invisible and serve for keeping the editors values when the editor components are unmounted (hidden).\n * This hack is needed because ReactReflex won't allow us to hide sections without completely unmounting them.\n * Always keep these elements outside of the ReflexContainer, otherwise they will break the adjustable layout.\n * */}\n\n \n \n \n\n \n \n \n \n \n )\n}\n\nCodeDebugger.displayName = \"CodeDebugger\"\n\nexport { CodeDebugger }\n\n/**\n * Controls\n */\n\nconst OS_CMD_CTRL_KEY = navigator.userAgent.includes(\"Mac\") ? \"⌘\" : \"Ctrl\"\n\ntype ControlsProps = {\n codeSaved: MutableRefObject\n handleExit: () => void\n handleSave: () => void\n handleRun: () => void\n isLoading: boolean\n}\n\nconst ControlsComponent: React.FC = ({\n codeSaved,\n handleExit: handleCloseWithoutSaving,\n handleSave,\n handleRun,\n isLoading,\n}) => {\n const [isClosePopoverVisible, setIsClosePopoverVisible] = useState(false)\n\n const handleClose = () => {\n if (!codeSaved.current) {\n setIsClosePopoverVisible(true)\n return\n }\n handleCloseWithoutSaving()\n }\n\n useEffect(() => {\n const _handleSave = (e: KeyboardEvent) => {\n e.preventDefault()\n handleSave()\n return false\n }\n const _handleRun = (e: KeyboardEvent) => {\n e.stopPropagation()\n handleRun()\n return false\n }\n const handleEscape = e => {\n if (e.key === \"Escape\") {\n handleClose()\n }\n }\n\n hotkeys.filter = () => true // to enable hotkeys everywhere, even in input fields\n hotkeys(\"cmd+s,ctrl+s\", _handleSave)\n hotkeys(\"cmd+enter,ctrl+enter\", _handleRun)\n document.addEventListener(\"keydown\", handleEscape, true)\n\n return () => {\n hotkeys.unbind(\"cmd+s,ctrl+s\", _handleSave)\n hotkeys.unbind(\"cmd+enter,ctrl+enter\", _handleRun)\n document.removeEventListener(\"keydown\", handleEscape, true)\n }\n }, [])\n\n return (\n
\n setIsClosePopoverVisible(false)}\n onConfirm={() => {\n handleCloseWithoutSaving()\n setIsClosePopoverVisible(false)\n }}\n >\n \n \n
\n {isLoading ? (\n } />\n ) : (\n <>\n \n }\n className={`${styles.buttonGreen}`}\n disabled={isLoading}\n onClick={handleRun}\n >\n {\"Run\"}\n \n \n \n \n \n \n )}\n
\n
\n )\n}\n\nconst Controls = memo(ControlsComponent)\n\ntype SectionProps = {\n label: string\n labelClassName?: string\n htmlFor?: string\n}\n\nconst SectionWithLabel: React.FC = ({ label, labelClassName, htmlFor, children }) => {\n return (\n
\n \n {children}\n
\n )\n}\n","// @Libs\nimport { Modal, ModalProps } from \"antd\"\n// @Component\nimport { CodeDebugger, CodeDebuggerProps } from \"../CodeDebugger/CodeDebugger\"\n// @Styles\nimport styles from \"./CodeDebuggerModal.module.less\"\n\ntype DebuggerProps = {\n [P in keyof CodeDebuggerProps & string as `${P}Debugger`]: CodeDebuggerProps[P]\n}\n\ntype Props = Partial & ModalProps\n\n/**\n * Decorates code debugger with an antd almost-full-height/width modal.\n * Accepts antd Modal props and CodeDebugger props if they are postfixed with `Debugger`.\n */\nexport const CodeDebuggerModal: React.FC = ({\n classNameDebugger,\n codeFieldLabelDebugger,\n defaultCodeValueDebugger,\n handleCloseDebugger,\n handleCodeChangeDebugger,\n runDebugger = () => {},\n handleSaveCodeDebugger,\n extraSuggestionsDebugger,\n className: modalClassName,\n centered: modalCentered,\n width: modalWidth,\n closable: modalClosable,\n maskClosable: modalMaskClosable,\n ...modalProps\n}) => {\n return (\n \n \n \n )\n}\n","import React, { useState } from \"react\"\nimport { Form, Input, Select, Button, Tooltip } from \"antd\"\nimport BugIcon from \"../../../icons/bug\"\nimport styles from \"./ConfigurableFieldsForm.module.less\"\n\ninterface InputWithDebugProps {\n id: string\n jsDebugger?: \"object\" | \"string\" | null\n value?: string\n placeholder?: string\n onChange?: (value: string) => void\n onButtonClick?: () => void\n}\n\nconst InputWithDebug: React.FC = ({\n id,\n placeholder,\n jsDebugger,\n value,\n onChange,\n onButtonClick,\n}) => {\n const [text, setText] = useState(value)\n\n const triggerChange = (changedValue: string) => {\n onChange?.(changedValue)\n }\n\n const onValueChange = (e: React.ChangeEvent) => {\n setText(e.target.value)\n triggerChange(e.target.value)\n }\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n if (text?.length == 0 && (e.key == \"Backspace\" || e.key == \"Delete\")) {\n setText(undefined)\n triggerChange(undefined)\n }\n }\n\n return (\n <>\n \n \n {jsDebugger && (\n \n \n \n \n \n )}\n \n \n )\n}\n\nexport { InputWithDebug }\n","import React, { useState } from \"react\"\nimport { Switch } from \"antd\"\n\ninterface SwitchWithLabelProps {\n id: string\n defaultChecked?: boolean\n onChange?: (value: boolean) => void\n label?: string\n}\n\nconst SwitchWithLabel: React.FC = ({ id, defaultChecked, onChange, label }) => {\n const [state, setState] = useState(defaultChecked)\n\n const triggerChange = (changedValue: boolean) => {\n onChange?.(changedValue)\n }\n\n const onValueChange = (value: boolean) => {\n setState(value)\n triggerChange(value)\n }\n\n return (\n
\n \n {label && {label}}\n
\n )\n}\n\nexport { SwitchWithLabel }\n","import React from \"react\"\nimport { Button, Input, Upload } from \"antd\"\nimport { UploadOutlined } from \"@ant-design/icons\"\n\ninterface InputWithUploadProps {\n value?: string\n\n onChange?: (value: string) => void\n}\n\nconst InputWithUpload: React.FC = ({ value, onChange }) => {\n const triggerChange = e => {\n onChange?.(e.target.value)\n }\n\n const beforeUpload = file => {\n const reader = new FileReader()\n\n reader.onload = e => {\n const content: string = e.target.result as string\n onChange?.(content)\n }\n reader.readAsText(file)\n\n // Prevent upload\n return false\n }\n\n return value === \"\" ? (\n \n \n \n ) : (\n \n )\n}\n\nexport { InputWithUpload }\n","// @Libs\nimport * as React from \"react\"\nimport { useCallback, useEffect, useState } from \"react\"\nimport { Button, Col, Form, FormItemProps, Input, InputNumber, Row, Select, Switch, Tooltip } from \"antd\"\nimport debounce from \"lodash/debounce\"\nimport get from \"lodash/get\"\nimport cn from \"classnames\"\n// @Components\nimport { LabelWithTooltip } from \"ui/components/LabelWithTooltip/LabelWithTooltip\"\nimport { EditableList } from \"lib/components/EditableList/EditableList\"\nimport { CodeEditor } from \"ui/components/CodeEditor/CodeEditor\"\nimport { FormValues as DebuggerFormValues } from \"ui/components/CodeDebugger/CodeDebugger\"\n// @Services\nimport ApplicationServices from \"lib/services/ApplicationServices\"\n// @Types\nimport { Parameter, ParameterType, singleSelectionType } from \"@jitsu/catalog\"\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\n// @Utils\nimport { makeObjectFromFieldsValues } from \"utils/forms/marshalling\"\nimport { isoDateValidator } from \"utils/validation/validators\"\n// @Hooks\nimport { useForceUpdate, useForceUpdateTarget } from \"hooks/useForceUpdate\"\n// @Icons\nimport BugIcon from \"icons/bug\"\nimport { CodeOutlined, EyeInvisibleOutlined, EyeOutlined } from \"@ant-design/icons\"\n// @Styles\nimport styles from \"./ConfigurableFieldsForm.module.less\"\nimport { CodeDebuggerModal } from \"../CodeDebuggerModal/CodeDebuggerModal\"\nimport { InputWithDebug } from \"./InputWithDebug\"\nimport { SwitchWithLabel } from \"./SwitchWithLabel\"\nimport set from \"lodash/set\"\nimport { InputWithUpload } from \"./InputWithUpload\"\nimport { useHistory, useLocation } from \"react-router-dom\"\nimport useProject from \"../../../hooks/useProject\"\nimport { allPermissions } from \"../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../generated/conf-openapi\"\n\nexport const IMAGE_VERSION_FIELD_ID = \"config.image_version\"\n\n/**\n * @param loading if `true` shows loader instead of the fields.\n * Accepts `ReactNode` to show it instead of the default loader.\n */\nexport interface Props {\n fieldsParamsList: readonly Parameter[]\n form: FormInstance\n extraForms?: FormInstance[]\n initialValues: any\n availableOauthBackendSecrets?: string[] | \"all_from_config\"\n hideFields?: string[]\n handleTouchAnyField?: (...args: any) => void\n setFormValues?: (values: PlainObjectWithPrimitiveValues) => void\n setInitialFormValues?: (values: PlainObjectWithPrimitiveValues) => void\n}\n\nexport const FormItemName = {\n serialize: id => id,\n}\n\nconst getFieldNameById = (id: string): string | undefined => id.split(\".\").slice(-1)[0]\n\nconst services = ApplicationServices.get()\n\nconst ConfigurableFieldsFormComponent = ({\n fieldsParamsList,\n form,\n extraForms,\n initialValues,\n availableOauthBackendSecrets,\n hideFields,\n handleTouchAnyField,\n setFormValues,\n setInitialFormValues,\n}: Props) => {\n const [debugModalsStates, setDebugModalsStates] = useState<{ [id: string]: boolean }>({})\n const [debugModalsValues, setDebugModalsValues] = useState<{ [id: string]: string }>({})\n\n const forceUpdateAll = useForceUpdate()\n const { forceUpdatedTargets, forceUpdateTheTarget } = useForceUpdateTarget()\n\n const history = useHistory()\n const { search } = useLocation()\n\n const handleTouchField = debounce(handleTouchAnyField ?? (() => {}), 1000)\n\n const handleChangeIntInput = useCallback(\n (id: string) => (value: number) => {\n form.setFieldsValue({ [id]: value })\n },\n [form]\n )\n\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n\n const handleChangeTextInput = useCallback(\n (id: string) => (value: string) => {\n form.setFieldsValue({ [id]: value })\n },\n [form]\n )\n\n const handleChangeSwitch = useCallback(\n (id: string) => (value: boolean) => {\n form.setFieldsValue({ [id]: value })\n handleTouchAnyField?.()\n forceUpdateAll()\n handleTouchField()\n },\n [form, forceUpdateAll]\n )\n const handleOpenDebugger = useCallback(\n (id: string) => {\n const search = new URLSearchParams()\n search.append(\"debugger\", id)\n const tab = id.indexOf(\"transform\") == -1 ? \"\" : \"\"\n history.replace({ search: search.toString(), state: { disablePrompt: true } })\n },\n [form]\n )\n\n useEffect(() => {\n const query = new URLSearchParams(search)\n const debuggerId = query.get(\"debugger\")\n if (debuggerId !== \"false\") {\n setDebugModalsValues({ ...debugModalsValues, [debuggerId]: form.getFieldValue(debuggerId) })\n setDebugModalsStates({ ...debugModalsStates, [debuggerId]: true })\n }\n }, [search])\n\n const handleJsonChange = (id: string) => (value: string) => {\n const values = {\n [id]: value ? value : \"\",\n }\n form.setFieldsValue(values)\n setFormValues?.(form.getFieldsValue())\n handleTouchField()\n }\n\n const getInitialValue = (id: string, defaultValue: any, constantValue: any, type: string) => {\n const initial = get(initialValues, id)\n if (typeof initial !== \"undefined\") {\n return initial\n }\n\n let calcValue: any\n if (typeof defaultValue !== \"undefined\" && defaultValue !== null) {\n calcValue = defaultValue\n } else if (typeof constantValue !== \"undefined\") {\n calcValue = constantValue\n } else if (type === \"boolean\") {\n calcValue = false\n } else if (type === \"json\") {\n calcValue = {}\n } else if (type === \"javascript\") {\n calcValue = \"return {}\"\n } else if (type === \"html\") {\n calcValue = \"\"\n } else if (type.indexOf(\"array/\") === 0) {\n calcValue = []\n } else if (type === \"string\") {\n if (defaultValue === null) {\n calcValue = undefined\n } else {\n calcValue = \"\"\n }\n } else {\n calcValue = \"\"\n }\n\n return type === \"json\" ? JSON.stringify(calcValue) : calcValue\n }\n\n const getFieldComponent = (\n type: ParameterType,\n id: string,\n defaultValue?: any,\n constantValue?: any,\n jsDebugger?: \"object\" | \"string\" | null,\n bigField?: boolean,\n displayName?: string,\n codeSuggestions?: string,\n documentation?: React.ReactNode,\n validationRules?: FormItemProps[\"rules\"]\n ) => {\n const defaultValueToDisplay =\n form.getFieldValue(id) ?? getInitialValue(id, defaultValue, constantValue, type?.typeName)\n form.setFieldsValue({ ...form.getFieldsValue(), [id]: defaultValueToDisplay })\n\n const className = hideFields?.some(field => field === getFieldNameById(id)) ? \"hidden\" : \"\"\n\n const formItemWrapperProps: FormItemWrapperProps = {\n type,\n id,\n bigField,\n displayName,\n documentation,\n validationRules,\n className,\n }\n\n switch (type?.typeName) {\n case \"password\":\n return (\n \n (visible ? : )}\n />\n \n )\n\n case \"int\": {\n return (\n \n \n \n )\n }\n\n case \"selection\": {\n if (id === IMAGE_VERSION_FIELD_ID) {\n return (\n {\n return id\n })}\n />\n )\n } else {\n return (\n \n 1 ? \"multiple\" : undefined}\n onChange={() => forceUpdateTheTarget(\"select\")}\n >\n {type.data.options.map(({ id, displayName }: Option) => {\n return (\n \n {displayName}\n \n )\n })}\n \n \n )\n }\n }\n case \"array/string\":\n return (\n \n \n \n )\n case \"javascript\":\n case \"html\":\n case \"json\": {\n return (\n \n \n \n {jsDebugger && !disableEdit && (\n <>\n {bigField ? (\n handleOpenDebugger(id)}\n icon={}\n >\n Open Debugger\n \n ) : (\n \n \n handleOpenDebugger(id)} className={styles.bugIcon} />\n \n \n )}\n \n )}\n \n \n )\n }\n\n case \"boolean\":\n return (\n \n {bigField ? (\n \n ) : (\n \n )}\n \n )\n\n case \"file\":\n return (\n \n \n \n )\n\n case \"description\":\n return (\n
\n
\n \n
\n
{defaultValue}
\n
\n )\n\n case \"oauthSecret\":\n case \"string\":\n default: {\n const backendSecretAvailable =\n type?.typeName === \"oauthSecret\" &&\n (availableOauthBackendSecrets === \"all_from_config\" ||\n availableOauthBackendSecrets?.some(name => getFieldNameById(id) === name))\n if (backendSecretAvailable) {\n formItemWrapperProps.validationRules = validationRules.filter(value => !value[\"required\"])\n }\n const placeholder = backendSecretAvailable\n ? \"Leave this field empty to use a value provided by Jitsu\"\n : undefined\n return (\n \n handleOpenDebugger(id)}\n />\n \n )\n }\n }\n }\n\n const handleDebuggerRun = async (field: string, debuggerType: \"object\" | \"string\", values: DebuggerFormValues) => {\n let transform = {}\n if (field === \"_transform\") {\n transform = {\n _transform_enabled: true,\n _transform: values.code,\n }\n }\n const configForm = extraForms && extraForms[0]\n const mappingForm = extraForms && extraForms[1]\n\n const data = {\n reformat: debuggerType == \"string\",\n uid: `${services.activeProject.id}.${initialValues._uid}`,\n type: initialValues._type,\n field: field,\n expression: values.code,\n object: JSON.parse(values.object),\n config: makeObjectFromFieldsValues({\n ...initialValues,\n ...configForm?.getFieldsValue(),\n ...mappingForm?.getFieldsValue(),\n ...transform,\n }),\n template_variables: Object.entries((configForm || form).getFieldsValue())\n .filter(v => v[0].startsWith(\"_formData._\"))\n .reduce((accumulator: any, currentValue: [string, unknown]) => {\n set(accumulator, currentValue[0].replace(\"_formData._\", \"\"), currentValue[1])\n return accumulator\n }, {}),\n }\n\n return services.backendApiClient.post(`/destinations/evaluate?project_id=${services.activeProject.id}`, data)\n }\n\n const handleCloseDebugger = id => {\n history.replace({ search: null, state: { disablePrompt: true } })\n setDebugModalsStates({ ...debugModalsStates, [id]: false })\n }\n\n const handleSaveDebugger = (id, value: string) => {\n form.setFieldsValue({ [id]: value })\n handleCloseDebugger(id)\n }\n\n /**\n * Runs after every re-render caused by `Select` field change\n * to pick up the values of conditionally rendered fields.\n */\n useEffect(() => {\n const isInitialRender = !forceUpdatedTargets[\"select\"]\n if (!isInitialRender) setFormValues?.(form.getFieldsValue())\n }, [forceUpdatedTargets[\"select\"]])\n\n useEffect(() => {\n /**\n *\n * 1st render:\n * component creates fields, fills them with values,\n * lets the `form` instance to pick them\n *\n */\n let formValues = {}\n const formFields: Parameters[0] = []\n fieldsParamsList.forEach((param: Parameter) => {\n const initConfig = makeObjectFromFieldsValues(formValues)\n const fieldNeeded = !param.omitFieldRule?.(initConfig)\n const id = param.id\n\n const constantValue = typeof param.constant === \"function\" ? param.constant?.(initConfig) : param.constant\n const initialValue = getInitialValue(id, param.defaultValue, constantValue, param.type?.typeName)\n\n if (fieldNeeded) {\n formValues[id] = form.getFieldValue(id) || initialValue\n formFields.push({\n name: id,\n value: form.getFieldValue(id) || initialValue,\n touched: false,\n })\n }\n })\n\n form.setFields(formFields)\n\n /**\n * @reason\n * `formValues` holds correct values for dynamically rendered fields\n * @warning\n * Using `form.getFieldsValue()` instead of `formValues` is not recommended because\n * it needs form to re-render once to pick up values of dynamically rendered fields\n */\n setInitialFormValues?.(formValues)\n\n /**\n *\n * 2nd render: component removes/adds fields conditionally\n * depending on the form values\n *\n */\n forceUpdateAll()\n }, [])\n\n return (\n <>\n {fieldsParamsList.map(\n ({\n id,\n documentation,\n displayName,\n type,\n defaultValue,\n required,\n constant,\n omitFieldRule,\n jsDebugger,\n bigField,\n codeSuggestions,\n validator,\n }: Parameter) => {\n const currentFormValues = form.getFieldsValue() ?? {}\n const defaultFormValues = fieldsParamsList.reduce(\n (result, { id, defaultValue }) => ({\n ...result,\n [id]: defaultValue,\n }),\n {}\n )\n const formItemName = id\n const formValues = {\n ...defaultFormValues,\n ...currentFormValues,\n }\n const parsedFormValues = makeObjectFromFieldsValues(formValues)\n const constantValue = typeof constant === \"function\" ? constant?.(parsedFormValues) : constant\n const isHidden = constantValue !== undefined\n const isOmitted = omitFieldRule ? omitFieldRule(parsedFormValues) : false\n\n const validationRules: FormItemProps[\"rules\"] = []\n if (!isHidden) {\n const isRequired = typeof required === \"boolean\" ? required : required?.(parsedFormValues)\n if (isRequired)\n validationRules.push({\n required: true,\n message: `${displayName} field is required.`,\n })\n if (type?.typeName === \"isoUtcDate\")\n validationRules.push(isoDateValidator(`${displayName} field is required.`))\n }\n if (validator) {\n validationRules.push({ validator: validator })\n }\n\n return isOmitted ? null : !isHidden ? (\n \n \n {jsDebugger ? (\n handleCloseDebugger(id)}\n runDebugger={values => handleDebuggerRun(id, jsDebugger, values)}\n handleSaveCodeDebugger={value => handleSaveDebugger(id, value)}\n />\n ) : null}\n {getFieldComponent(\n type,\n id,\n defaultValue,\n constantValue,\n jsDebugger,\n bigField,\n displayName,\n codeSuggestions,\n documentation,\n validationRules\n )}\n \n \n ) : (\n \n )\n}\n\ntype VersionSelectionProps = {\n displayName: string\n defaultValue?: string\n options: string[]\n}\n\nconst VersionSelection: React.FC = ({ displayName, defaultValue, options }) => {\n const [selectedVersion, setSelectedVersion] = useState(defaultValue || options[0])\n const isLatestVersionSelected = selectedVersion === options[0]\n const handleChange = useCallback<(value: string) => void>(version => {\n setSelectedVersion(version)\n }, [])\n return (\n {\"New version available!\"}}\n >\n \n \n )\n}\n","// @Libs\nimport cn from \"classnames\"\n// @Styles\nimport styles from \"./TabName.module.less\"\n\nexport interface Props {\n name: React.ReactNode\n errorsCount: number\n errorsLevel?: \"warning\" | \"error\"\n hideErrorsCount?: boolean\n}\n\nconst TabNameComponent = ({ name, errorsCount, errorsLevel = \"error\", hideErrorsCount }: Props) => (\n <>\n {errorsCount === 0 ? (\n name\n ) : (\n 0 && !hideErrorsCount && styles[errorsLevel])}>\n {name}\n {!hideErrorsCount && {errorsCount}}\n \n )}\n \n)\n\nTabNameComponent.displayName = \"TabName\"\n\nexport const TabName = TabNameComponent\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"box-shadow-base\":\"TabName_box-shadow-base__2MYHL\",\"border-debug\":\"TabName_border-debug__LLAy6\",\"font-heading\":\"TabName_font-heading__2JxBC\",\"font-monospace\":\"TabName_font-monospace__16F3g\",\"ant-select-disabled\":\"TabName_ant-select-disabled__3Kp2i\",\"ant-select\":\"TabName_ant-select__NzrPs\",\"ant-select-customize-input\":\"TabName_ant-select-customize-input__iK1hj\",\"ant-select-selector\":\"TabName_ant-select-selector__v6Or_\",\"ant-input-number-disabled\":\"TabName_ant-input-number-disabled__COKlC\",\"ant-select-item-option-selected\":\"TabName_ant-select-item-option-selected__3g6eV\",\"ant-select-item-option-active\":\"TabName_ant-select-item-option-active__1rduV\",\"ant-dropdown-menu-submenu-active\":\"TabName_ant-dropdown-menu-submenu-active__1bKmG\",\"ant-dropdown-menu-submenu-title\":\"TabName_ant-dropdown-menu-submenu-title__EYc3K\",\"ant-collapse-content-box\":\"TabName_ant-collapse-content-box__wP47O\",\"ant-card\":\"TabName_ant-card__1nKtm\",\"ant-modal-content\":\"TabName_ant-modal-content__3CAHA\",\"ant-table-tbody\":\"TabName_ant-table-tbody__1gLMI\",\"ant-table-thead\":\"TabName_ant-table-thead__2Wpgv\",\"ant-checkbox-inner\":\"TabName_ant-checkbox-inner__3Q870\",\"ant-modal-header\":\"TabName_ant-modal-header__Ibqcd\",\"ant-table\":\"TabName_ant-table__3UlAz\",\"ant-list-split\":\"TabName_ant-list-split__3Tie-\",\"ant-list-header\":\"TabName_ant-list-header__3wfxL\",\"ant-tag\":\"TabName_ant-tag__3k3pJ\",\"ant-tooltip-inner\":\"TabName_ant-tooltip-inner__KsO-d\",\"ant-badge-status-processing\":\"TabName_ant-badge-status-processing__2FYAH\",\"ant-dropdown-menu-item-active\":\"TabName_ant-dropdown-menu-item-active__1-PoJ\",\"ant-dropdown\":\"TabName_ant-dropdown__3pctR\",\"ant-popover-inner\":\"TabName_ant-popover-inner__28RgI\",\"ant-popover-arrow\":\"TabName_ant-popover-arrow__1lLq2\",\"ant-popover-placement-rightTop\":\"TabName_ant-popover-placement-rightTop__sIWY_\",\"ant-popover-content\":\"TabName_ant-popover-content__3VoyD\",\"ant-popover-placement-leftBottom\":\"TabName_ant-popover-placement-leftBottom__3JY56\",\"ant-popover-placement-bottomRight\":\"TabName_ant-popover-placement-bottomRight__1j95g\",\"ant-popover-placement-top\":\"TabName_ant-popover-placement-top__tK_Qg\",\"icon-size-base\":\"TabName_icon-size-base__325ne\",\"icon-size-lg\":\"TabName_icon-size-lg__w8fzM\",\"ant-tabs-card\":\"TabName_ant-tabs-card__1vp8k\",\"ant-tabs-tab-active\":\"TabName_ant-tabs-tab-active__1wbKc\",\"ant-skeleton\":\"TabName_ant-skeleton__17Zvs\",\"ant-skeleton-paragraph\":\"TabName_ant-skeleton-paragraph__2PU5s\",\"name\":\"TabName_name__2JF56\",\"error\":\"TabName_error__2GYN-\",\"warning\":\"TabName_warning__u3FzN\"};","// extracted by mini-css-extract-plugin","export const DATE_REGEX = {\n ISO_FULL: /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/,\n ISO_FULL_WO_MS: /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$/,\n ISO_SHORT: /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/,\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"CodeDebuggerModal_modal__R5a3B\",\"modal__mask\":\"CodeDebuggerModal_modal__mask__z9Kc8\"};","// @Libs\nimport React from \"react\"\nimport { Tabs } from \"antd\"\n// @Types\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\nimport { TabsType } from \"antd/es/tabs\"\n// @Components\nimport { TabName } from \"ui/components/Tabs/TabName\"\n\nexport interface Tab {\n readonly key: K\n readonly name: React.ReactNode\n readonly getComponent?: (form: FormInstance) => React.ReactNode\n readonly isDisabled?: boolean\n readonly isHidden?: boolean\n form?: FormInstance\n errorsCount?: number\n readonly errorsLevel?: \"warning\" | \"error\"\n touched?: boolean\n}\n\nexport interface Props {\n tabsList: Tab[]\n className?: string\n type: TabsType\n activeTabKey: string\n tabBarExtraContent?: React.ReactNode\n onTabChange?: (tabName: any) => void\n}\n\nconst TabsConfiguratorComponent = ({\n tabsList,\n className,\n type,\n activeTabKey,\n onTabChange = () => null,\n tabBarExtraContent = undefined,\n}: Props) => (\n \n {tabsList.map((tab: Tab) => {\n if (!tab.isHidden) {\n return (\n \n }\n disabled={tab.isDisabled}\n forceRender\n >\n {tab.getComponent?.(tab.form)}\n \n \n )\n } else {\n return null\n }\n })}\n \n)\n\nTabsConfiguratorComponent.displayName = \"TabsConfigurator\"\n// ToDo: memo with compare?\nexport const TabsConfigurator = TabsConfiguratorComponent\n","// @Libs\nimport React, { memo } from \"react\"\n// @Icons\nimport CloseOutlined from \"@ant-design/icons/lib/icons/CloseOutlined\"\n// @Styles\nimport styles from \"./PopoverTitle.module.less\"\n\nexport interface Props {\n title: React.ReactNode\n handleClose: () => void\n}\n\nconst PopoverTitleComponent = ({ handleClose, title }: Props) => (\n

\n {title}: \n

\n)\n\nPopoverTitleComponent.displayName = \"PopoverTitle\"\n\nexport const PopoverTitle = memo(PopoverTitleComponent)\n","// @Libs\nimport React from \"react\"\n// @Types\nimport { Tab } from \"ui/components/Tabs/TabsConfigurator\"\n// @Styles\nimport styles from \"./PopoverErrorsContent.module.less\"\n\nexport interface Props {\n tabsList: Tab[]\n}\n\nconst PopoverErrorsContent = ({ tabsList }: Props) => (\n
    \n {tabsList\n .filter(t => t.errorsCount > 0)\n .map((tab: Tab) => (\n
  • \n {tab.errorsCount} {`${tab.errorsLevel ?? \"error\"}(s)`} at `{tab.name}` tab;\n
  • \n ))}\n
\n)\n\nPopoverErrorsContent.displayName = \"PopoverErrorsContent\"\n\nexport { PopoverErrorsContent }\n","// @Libs\nimport React from \"react\"\nimport { Button, Popover, Tooltip } from \"antd\"\n// @Components\nimport { PopoverTitle } from \"ui/components/Popover/PopoverTitle\"\nimport { PopoverErrorsContent } from \"ui/components/Popover/PopoverErrorsContent\"\n// @Icons\nimport { ApiOutlined, AreaChartOutlined } from \"@ant-design/icons\"\n// @Types\nimport { Tab } from \"ui/components/Tabs/TabsConfigurator\"\nimport useProject from \"../../../hooks/useProject\"\nimport { allPermissions } from \"../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../generated/conf-openapi\"\n\ninterface ButtonProps {\n isPopoverVisible: boolean\n isRequestPending: boolean\n handlePress: () => void\n handlePopoverClose: () => void\n titleText: string\n tabsList: Tab[]\n disabled?: boolean | string\n}\n\nexport interface Props {\n save: ButtonProps\n test: ButtonProps\n handleCancel: VoidFunction\n}\n\nconst EditorButtons = ({ test, save, handleCancel }: Props) => {\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n return (\n <>\n {!disableEdit && (\n \n }\n title={}\n trigger=\"click\"\n visible={save.isPopoverVisible}\n >\n \n Save\n \n \n \n )}\n\n {!disableEdit && (\n \n }\n title={}\n trigger=\"click\"\n visible={test.isPopoverVisible}\n >\n }\n disabled={!!test.disabled}\n >\n Test connection\n \n \n \n )}\n\n {handleCancel && (\n \n )}\n \n )\n}\n\nEditorButtons.displayName = \"EditorButtons\"\n\nexport { EditorButtons }\n","// @Libs\nimport React from \"react\"\nimport { Form } from \"antd\"\nimport debounce from \"lodash/debounce\"\n// @Components\nimport { ConfigurableFieldsForm } from \"ui/components/ConfigurableFieldsForm/ConfigurableFieldsForm\"\n// @Types\nimport { Destination } from \"@jitsu/catalog\"\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\nimport useProject from \"../../../../../hooks/useProject\"\nimport { allPermissions } from \"../../../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../../../generated/conf-openapi\"\n\nexport interface Props {\n destinationData: DestinationData\n destinationReference: Destination\n form: FormInstance\n handleTouchAnyField: (...args: any) => void\n}\n\nconst DestinationEditorConfig = ({ destinationData, destinationReference, form, handleTouchAnyField }: Props) => {\n const handleChange = debounce(handleTouchAnyField, 500)\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n return (\n <>\n
\n \n \n \n )\n}\n\nDestinationEditorConfig.displayName = \"DestinationEditorConfig\"\n\nexport { DestinationEditorConfig }\n","// @Libs\nimport cn from \"classnames\"\n// @Styles\nimport styles from \"./TabDescription.module.less\"\n\ninterface Props {\n children: React.ReactNode\n className?: string\n}\n\nconst TabDescription = ({ children, className }: Props) => {\n return
{children}
\n}\n\nTabDescription.displayName = \"TabDescription\"\n\nexport { TabDescription }\n","// @Libs\nimport React, { SyntheticEvent, useCallback, useState } from \"react\"\nimport { Collapse, Drawer, Form } from \"antd\"\nimport debounce from \"lodash/debounce\"\n// @Components\nimport { ConfigurableFieldsForm } from \"ui/components/ConfigurableFieldsForm/ConfigurableFieldsForm\"\n// @Types\nimport { Destination } from \"@jitsu/catalog\"\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\nimport { booleanType, jsType, stringType } from \"@jitsu/catalog\"\nimport { TabDescription } from \"../../../../components/Tabs/TabDescription\"\nimport styles from \"./DestinationEditor.module.less\"\nimport { destinationsReferenceMap } from \"@jitsu/catalog\"\nimport { CodeSnippet } from \"../../../../../lib/components/components\"\nimport { camelCase } from \"lodash\"\nimport useProject from \"../../../../../hooks/useProject\"\nimport { allPermissions } from \"../../../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../../../generated/conf-openapi\"\n\nexport interface Props {\n destinationData: DestinationData\n destinationReference: Destination\n form: FormInstance\n configForm: FormInstance\n mappingForm: FormInstance\n handleTouchAnyField: (...args: any) => void\n}\n\nconst DestinationEditorTransform = ({\n destinationData,\n destinationReference,\n form,\n configForm,\n mappingForm,\n handleTouchAnyField,\n}: Props) => {\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n const handleChange = debounce(handleTouchAnyField, 500)\n const [documentationVisible, setDocumentationVisible] = useState(false)\n const templateVarsSuggestions = Object.entries(configForm.getFieldsValue())\n .filter(v => v[0].startsWith(\"_formData._\"))\n .map(v => [v[0].replace(\"_formData._\", \"\"), v[1]])\n .map(v => `declare const ${v[0]} = \"${v[1]}\"\\n`)\n .join()\n\n return (\n <>\n \n

\n Use the power of Javascript to modify incoming event object, replace it with a completely new event or produce\n multiple events based on incoming data.\n
\n Also, you can use Transform to assign Data Warehouse specific SQL types for object fields, set the\n destination table name for each event or to skip the event altogether.{\" \"}\n setDocumentationVisible(true)}>Open Documentation →\n
\n Transform effectively replaces Mappings – both features cannot work together.\n

\n
\n
\n \n destinationsReferenceMap[destinationData._type].defaultTransform &&\n !destinationData._mappings?._mappings,\n type: booleanType,\n validator: (rule, value) => {\n if (value && mappingForm?.getFieldValue(\"_mappings._mappings\")?.length > 0) {\n return Promise.reject(\n \"Transform cannot work with configured mappings. Please remove all mappings first.\"\n )\n }\n return Promise.resolve()\n },\n bigField: true,\n },\n {\n id: \"_transform\",\n codeSuggestions: `${templateVarsSuggestions}declare const destinationId = \"${destinationData._uid}\";\ndeclare const destinationType = \"${destinationData._type}\";\ndeclare type KeyValue = {\n get(key: string): Promise\n del(key: string): Promise\n set(key: string, value: any, opts?: {ttlMs?: number}|{ttlSec?: number}): Promise\n}\ndeclare const $kv:KeyValue\ndeclare type Context = typeof $.__HTTP_CONTEXT__ & {\n header(name: string): string\n}\ndeclare const $context:Context = $.__HTTP_CONTEXT__\n${[destinationData._type, \"segment\"]\n .map(type => `declare function ${camelCase(\"to_\" + type)}(event: object): object`)\n .join(\"\\n\")}`,\n displayName: \"Javascript Transformation\",\n defaultValue: !destinationData._mappings?._mappings\n ? destinationsReferenceMap[destinationData._type].defaultTransform ?? \"\"\n : \"\",\n required: false,\n jsDebugger: \"object\",\n type: jsType,\n bigField: true,\n },\n ]}\n form={form}\n extraForms={[configForm, mappingForm]}\n initialValues={destinationData}\n />\n \n\n Transform Examples}\n placement=\"right\"\n closable={true}\n onClose={() => setDocumentationVisible(false)}\n width=\"50%\"\n visible={documentationVisible}\n >\n
\n \n Overview
} key=\"overview\">\n

\n You can use modern javascript language features and built-in functions to transform an incoming event.\n
\n Jitsu puts incoming event as a global variable: $\n
\n

\n

\n Provided javascript must return:\n

    \n
  • \n single object - modified incoming event or completely new object{\" \"}\n
  • \n
  • \n array of objects - a single incoming event will result in multiple events in destinations\n
  • \n
  • \n null - to skip event from processing\n
  • \n
\n

\n

\n To override the destination table, you need to add a special property JITSU_TABLE_NAME to\n the resulting events.\n

\n

\n To override the destination SQL column type for a specific object field, you need to add an extra\n property with the special prefix __sql_type_ added to the name of a field to resulting\n events. E.g.: __sql_type_utc_time: \"date\" sets SQL type date for column{\" \"}\n utc_time\n

\n

See more bellow.

\n \n Modify incoming event} key=\"modify\">\n

\n Javascript spread operator allows making a copy of an incoming event while applying some changes in just\n a few lines of code:\n

\n {`return {...$,\n new_property: $.event_type\n}`}\n

Add property to user object:

\n {`return {...$, \n user: {...$.user, state: \"active\"}\n }`}\n
\n Build new event} key=\"new\">\n

Collect some user properties to the new object:

\n {`return {\n properties: [\n {\n property: \"email\",\n value: $.user?.email\n },\n {\n property: \"language\",\n value: $.user_language\n }\n ]\n}`}\n\n

Put an original event as a string payload:

\n {`return {\n \"event_type\": \"POST event\",\n \"payload\": JSON.stringify($)\n}`}\n
\n Produce multiple events} key=\"multiple\">\n

Produce multiple purchase events from a single shopping cart event:

\n {`if ($.event_type == \"conversion\" && $.products?.length > 0) {\n let results = []\n for (const product of $.products) {\n results.push({\n event_type: \"purchase\",\n product_id: product.id,\n price: product.price\n })\n }\n return results\n} else {\n //skip events without any purchase\n return null\n}`}\n
\n Override destination table} key=\"tablename\">\n

Using Javascript spread operator:

\n {`return {...$, JITSU_TABLE_NAME: \"new_table_name\"}`}\n

Conventional way:

\n {`$.JITSU_TABLE_NAME = \"new_table_name\"\nreturn $`}\n
\n Override SQL column type} key=\"sql_type\">\n

Set simple SQL types:

\n {`return {...$, \n event_date: $.utc_time, \n __sql_type_event_date: \"date\",\n event_time: $.utc_time,\n __sql_type_event_time: \"time\"\n}`}\n

\n Sql types with extra parameters:\n
\n Some Data Warehouses support extra parameters for column types during table creation.\n
\n For such cases, Transform uses the following syntax to provide data type and column type separately:\n

\n {`return {...$, \n title: $.page_title, \n __sql_type_title: [\"varchar(256)\", \"varchar(256) encode zstd\"]\n}`}\n
\n Predefined constants and functions}\n key=\"predefined\"\n >\n

\n Transform comes with predefined constants: destinationId and destinationType{\" \"}\n that can be used to enrich your data:\n

\n {`return {...$, \n destination_id: destinationId,\n destination_type: destinationType,\n}`}\n

\n Also toSegment(event) function is available to set up{\" \"}\n \n Segment Compatibility\n \n :\n

\n {`return toSegment($)`}\n \n \n \n \n \n )\n}\n\nDestinationEditorTransform.displayName = \"DestinationEditorTransform\"\n\nexport { DestinationEditorTransform }\n","// @Libs\nimport React, { ReactNode, useCallback, useState } from \"react\"\nimport { Form, Switch } from \"antd\"\n// @Types\nimport { FormInstance } from \"antd/es\"\n\nexport interface ConnectedItem {\n id: string\n disabled?: boolean\n title: React.ReactNode\n description?: React.ReactNode\n}\n\nexport interface Props {\n form: FormInstance\n fieldName: string\n itemsList: ConnectedItem[]\n initialValues?: string[]\n warningMessage: React.ReactNode\n handleItemChange?: (selectedItems: string[]) => void\n}\n\nexport const NameWithPicture: React.FC<{ icon: ReactNode; children: ReactNode }> = ({ icon, children }) => {\n return (\n \n \n {icon}\n \n {children}\n \n )\n}\n\nconst ConnectedItems = ({\n form,\n fieldName,\n itemsList = [],\n initialValues = [],\n warningMessage,\n handleItemChange,\n}: Props) => {\n const [selectedItems, setSelectedItems] = useState(initialValues ?? [])\n\n const handleChange = useCallback(\n (id: string) => (checked: boolean) => {\n const newItemsIds = [...selectedItems]\n\n if (checked) {\n newItemsIds.push(id)\n } else {\n const index = newItemsIds.findIndex(i => i === id)\n\n newItemsIds.splice(index, 1)\n }\n\n setSelectedItems(newItemsIds)\n /**\n * It would be necessary to refactor this code and add destructured form fields values\n * if {fieldName} stops to be single\n * */\n form.setFieldsValue({\n [fieldName]: newItemsIds,\n })\n\n handleItemChange(newItemsIds)\n },\n [selectedItems, form, fieldName, handleItemChange]\n )\n\n return (\n <>\n {itemsList?.length > 0 && (\n \n
    \n {itemsList.sort().map(({ id, title, description, disabled }: ConnectedItem) => (\n
    \n
    \n \n
    \n
    \n
    {title}
    \n
    \n {description}\n
    \n
    \n
    \n ))}\n
\n
\n )}\n \n )\n}\n\nConnectedItems.displayName = \"ConnectedItems\"\n\nexport { ConnectedItems }\n","import React from \"react\"\n\nconst DESTINATIONS_CONNECTED_SOURCES = (\n <>\n Connector is a source of data from platform API or database. You can read more about connectors in our{\" \"}\n \n documentation\n \n .\n \n)\nconst DESTINATIONS_CONNECTED_API_KEYS = \"\"\n\nexport { DESTINATIONS_CONNECTED_SOURCES, DESTINATIONS_CONNECTED_API_KEYS }\n","// @Libs\nimport { useCallback, useMemo } from \"react\"\nimport { Link, NavLink } from \"react-router-dom\"\nimport { Collapse, Form } from \"antd\"\nimport snakeCase from \"lodash/snakeCase\"\nimport { observer } from \"mobx-react-lite\"\n// @Store\nimport { sourcesStore } from \"stores/sources\"\n// @Components\nimport { NameWithPicture, ConnectedItems, ConnectedItem } from \"ui/components/ConnectedItems/ConnectedItems\"\nimport { CenteredError, CenteredSpin } from \"lib/components/components\"\nimport { TabDescription } from \"ui/components/Tabs/TabDescription\"\n// @Types\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\nimport { Destination } from \"@jitsu/catalog\"\n// @Catalog sources\nimport { allSources } from \"@jitsu/catalog\"\n// @Constants\nimport { DESTINATIONS_CONNECTED_SOURCES } from \"embeddedDocs/destinationsConnectedItems\"\nimport { APIKeyUtil } from \"../../../../../utils/apiKeys.utils\"\nimport { SourcesUtils } from \"../../../../../utils/sources.utils\"\nimport { apiKeysStore } from \"stores/apiKeys\"\nimport useProject from \"../../../../../hooks/useProject\"\nimport { allPermissions } from \"../../../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../../../generated/conf-openapi\"\n\nexport interface Props {\n form: FormInstance\n destination: Destination\n initialValues: DestinationData\n handleTouchAnyField: (...args: any) => void\n}\n\nconst DestinationEditorConnectorsComponent = ({ form, initialValues, destination, handleTouchAnyField }: Props) => {\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n\n const sources = sourcesStore.list\n const sourcesError = sourcesStore.errorMessage\n\n const apiKeysData = apiKeysStore.list\n const apiKeysError = apiKeysStore.errorMessage\n\n const sourcesList = useMemo(\n () =>\n sources\n ? sources?.map((src: SourceData) => {\n const proto = allSources.find(s => snakeCase(s.id) === snakeCase(src.sourceProtoType))\n\n return {\n id: src.sourceId,\n title: {SourcesUtils.getDisplayName(src)},\n description: null,\n }\n })\n : [],\n [sources]\n )\n\n const apiKeysList = useMemo(\n () =>\n apiKeysData?.map(key => ({\n title: {APIKeyUtil.getDisplayName(key)},\n id: key.uid,\n })) ?? [],\n [apiKeysData?.keys]\n )\n\n const handleItemChange = useCallback(\n (name: string) => (items: string[]) => {\n const beenTouched = JSON.stringify(items) !== JSON.stringify(initialValues?.[name])\n\n handleTouchAnyField(beenTouched)\n },\n [initialValues, handleTouchAnyField]\n )\n\n if (apiKeysError || sourcesError) {\n return \n } else if (!apiKeysData) {\n return \n }\n\n let activeKey\n if (apiKeysList?.length > 0 || (sources?.length === 0 && apiKeysList?.length === 0)) {\n activeKey = \"keys\"\n } else {\n activeKey = \"connectors\"\n }\n\n return (\n <>\n
\n {DESTINATIONS_CONNECTED_SOURCES}\n\n \n \n Linked API Keys (edit API keys)\n \n }\n key=\"keys\"\n forceRender\n >\n
\n Please, choose at least one API key.

}\n initialValues={initialValues?._onlyKeys}\n handleItemChange={handleItemChange(\"_onlyKeys\")}\n />\n
\n \n \n Linked Connectors (edit connectors)\n \n }\n key=\"connectors\"\n forceRender\n >\n
\n {destination.syncFromSourcesStatus === \"supported\" && sources?.length === 0 && (\n

\n You don't have any connectors you can link to the destination. You can add them{\" \"}\n here.\n

\n )}\n {destination.syncFromSourcesStatus === \"supported\" && (\n Please, choose at least one source.

}\n initialValues={initialValues?._sources}\n handleItemChange={handleItemChange(\"_sources\")}\n />\n )}\n {destination.syncFromSourcesStatus === \"coming_soon\" && (\n
\n {destination.displayName} support is coming soon!. At the moment, Jitsu can't send data\n from connectors to {destination.displayName}. However, event streaming is available!\n
\n )}\n {destination.syncFromSourcesStatus === \"not_supported\" && (\n
\n Jitsu can't send data from connectors to {destination.displayName} due to limitations of the\n API\n
\n )}\n
\n \n
\n
\n \n )\n}\n\nconst DestinationEditorConnectors = observer(DestinationEditorConnectorsComponent)\n\nDestinationEditorConnectors.displayName = \"DestinationEditorConnectors\"\n\nexport { DestinationEditorConnectors }\n","const MAPPING_NAMES: Record = {\n remove: \"Remove field\",\n cast: \"Cast field\",\n move: \"Move field\",\n constant: \"Constant field\",\n}\n\nconst MAPPINGS_REFERENCE_MAP = {\n facebook: \"facebookPixel\",\n google_analytics: \"googleAnalytics\",\n segment: \"segment\",\n}\n\nconst MAPPING_ROW_PROPS_MAP = {\n _action: \"action\",\n _srcField: \"src\",\n _dstField: \"dst\",\n _columnType: \"type\",\n _type: \"type\",\n _value: \"value\",\n}\n\nexport { MAPPING_NAMES, MAPPINGS_REFERENCE_MAP, MAPPING_ROW_PROPS_MAP }\n","const isValidJsonPointer = (val: string = \"\") =>\n val.length > 0 && val[0] === \"/\" && val[val.length - 1] !== \"/\" && val.indexOf(\" \") < 0\n\nexport { isValidJsonPointer }\n","// @Libs\nimport { Col, Form, Input, Row, Select } from \"antd\"\nimport cn from \"classnames\"\n// @Constants\nimport { MAPPING_NAMES } from \"constants/mapping\"\n// @Utils\nimport { isValidJsonPointer } from \"utils/validation/jsonPointer\"\n// @Styles\nimport styles from \"./DestinationEditor.module.less\"\n// @Types\nimport { FormListFieldData } from \"antd/es/form/FormList\"\n\ninterface Props {\n field: FormListFieldData\n action: MappingAction\n handleTypeChange: (event: React.ChangeEvent) => void\n handleActionChange: (value: MappingAction) => void\n handleDelete: () => Promise\n}\n\nconst DestinationEditorMappingsItem = ({\n action,\n field,\n handleTypeChange,\n handleActionChange,\n handleDelete,\n}: Props) => {\n return (\n
\n
\n \n Delete\n \n
\n\n \n \n Action: }\n labelCol={{\n span: [\"move\", \"cast\"].includes(action) ? 6 : 4,\n }}\n labelAlign=\"left\"\n rules={[{ required: true, message: \"This field is required.\" }]}\n >\n \n \n \n {action === \"constant\" && (\n \n \n Value (optional):{\" \"}\n \n }\n labelCol={{ span: 6 }}\n labelAlign=\"left\"\n >\n \n \n \n )}\n {[\"move\", \"cast\"].includes(action) && (\n <>\n \n Type: \n ) : (\n \n Type (optional):{\" \"}\n \n )\n }\n labelCol={{ span: 11 }}\n labelAlign=\"left\"\n rules={action === \"cast\" ? [{ required: true, message: \"This field is required.\" }] : undefined}\n >\n \n \n \n \n \n Column type (optional):{\" \"}\n \n }\n labelCol={{ span: 11 }}\n labelAlign=\"left\"\n >\n \n \n \n \n )}\n \n\n \n {![\"constant\", \"cast\"].includes(action) && (\n \n From: }\n labelCol={{ span: 4 }}\n labelAlign=\"left\"\n rules={[\n {\n validator: (rule, value) =>\n !value\n ? Promise.reject(\"This field is required.\")\n : isValidJsonPointer(value)\n ? Promise.resolve()\n : Promise.reject(\"Invalid JSON pointer syntax. Should be /path/to/element\"),\n },\n ]}\n >\n \n \n \n )}\n\n {action !== \"remove\" && (\n \n To: }\n labelCol={{ span: 4 }}\n labelAlign=\"left\"\n rules={[\n {\n validator: (rule, value) =>\n !value\n ? Promise.reject(\"This field is required.\")\n : isValidJsonPointer(value)\n ? Promise.resolve()\n : Promise.reject(\"Invalid JSON pointer syntax. Should be /path/to/element\"),\n },\n ]}\n >\n \n \n \n )}\n \n
\n )\n}\n\nDestinationEditorMappingsItem.displayName = \"DestinationEditorMappingsItem\"\n\nexport { DestinationEditorMappingsItem }\n","// @Libs\nimport { Button, Modal } from \"antd\"\n// @Catalog\nimport { destinationMappings } from \"@jitsu/catalog\"\n// @Styles\nimport styles from \"./DestinationEditor.module.less\"\n// @Types\nimport { FieldMapping, DestinationConfigurationTemplate } from \"@jitsu/catalog\"\n// @Icons\nimport ExclamationCircleOutlined from \"@ant-design/icons/lib/icons/ExclamationCircleOutlined\"\n// @Components\nimport { TabDescription } from \"ui/components/Tabs/TabDescription\"\n// @Constant\nimport { MAPPING_ROW_PROPS_MAP } from \"constants/mapping\"\n\ninterface Props {\n handleDataUpdate: (newMappings: DestinationMapping, newTableName?: string) => Promise\n}\n\nconst DestinationEditorMappingsLibrary = ({ handleDataUpdate }: Props) => {\n const mapFunction = (row: FieldMapping): DestinationMappingRow =>\n Object.keys(MAPPING_ROW_PROPS_MAP).reduce((accumulator: DestinationMappingRow, key: string) => {\n const catalogKey = MAPPING_ROW_PROPS_MAP[key]\n const rowValue = row[catalogKey]\n\n if (rowValue !== undefined && rowValue !== null) {\n accumulator = {\n ...accumulator,\n [key]: row[catalogKey],\n }\n }\n\n return accumulator\n }, {} as DestinationMappingRow)\n\n const setLibraryMapping = (library: DestinationConfigurationTemplate) => {\n const newMappings = {\n _keepUnmappedFields: library.keepUnmappedFields,\n _mappings: library.mappings.map(mapFunction),\n }\n\n handleDataUpdate(newMappings, library.tableNameTemplate)\n }\n\n const handleClick = (library: DestinationConfigurationTemplate, key: string) => () => {\n Modal.confirm({\n title: \"Mapping library\",\n icon: ,\n content: (\n <>\n Existing mapping will be overwritten by {key} library values.\n \n ),\n okText: `Update with ${key}`,\n cancelText: \"Cancel\",\n onOk: () => {\n setLibraryMapping(library)\n },\n onCancel: () => {},\n })\n }\n\n return (\n <>\n
\n {Object.entries(destinationMappings).map(([key, library]) => (\n
\n
\n

{library.displayName || key}

\n {library.comment &&

{library.comment}

}\n
\n \n
\n ))}\n
\n \n )\n}\n\nDestinationEditorMappingsLibrary.displayName = \"DestinationEditorMappingsLibrary\"\n\nexport { DestinationEditorMappingsLibrary }\n","// @Libs\nimport React, { useCallback, useEffect, useState } from \"react\"\nimport { Button, Col, Drawer, Form, Row, Select } from \"antd\"\n// @Components\nimport { TabDescription } from \"ui/components/Tabs/TabDescription\"\nimport { LabelWithTooltip } from \"ui/components/LabelWithTooltip/LabelWithTooltip\"\nimport { DestinationEditorMappingsItem } from \"./DestinationEditorMappingsItem\"\n// @Types\nimport { FormInstance } from \"antd/lib/form/hooks/useForm\"\nimport { FormListFieldData, FormListOperation } from \"antd/es/form/FormList\"\n// @Icons\nimport PlusOutlined from \"@ant-design/icons/lib/icons/PlusOutlined\"\n// @Styles\nimport styles from \"./DestinationEditor.module.less\"\nimport { DestinationEditorMappingsLibrary } from \"./DestinationEditorMappingsLibrary\"\nimport useProject from \"../../../../../hooks/useProject\"\nimport { allPermissions } from \"../../../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../../../generated/conf-openapi\"\n\nexport interface Props {\n form: FormInstance\n initialValues: DestinationMapping\n handleTouchAnyField: (...args: any) => void\n handleDataUpdate: (newMappings: DestinationMapping, newTableName?: string) => Promise\n}\n\nexport const BooleanStatus = {\n \"Keep unnamed fields\": true,\n \"Remove unmapped fields\": false,\n} as const\n\nconst DestinationEditorMappings = ({ form, initialValues, handleTouchAnyField, handleDataUpdate }: Props) => {\n const [actions, setActions] = useState([])\n const [documentationVisible, setDocumentationVisible] = useState(false)\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n\n useEffect(() => {\n setActions(initialValues?._mappings?.map((row: DestinationMappingRow) => row._action) ?? [])\n }, [initialValues])\n\n const handleFieldsChange = useCallback(() => {\n const formFields = form.getFieldsValue()\n const mappings = formFields?.[\"_mappings._mappings\"]\n const keep = formFields?.[\"_mappings._keepUnmappedFields\"]\n\n const notBeenTouched =\n JSON.stringify(initialValues?._mappings) === JSON.stringify(mappings) &&\n keep === initialValues?._keepUnmappedFields\n\n handleTouchAnyField(!notBeenTouched)\n }, [handleTouchAnyField, initialValues, form])\n\n const handleActionChange = useCallback(\n (index: number) => (value: MappingAction) => {\n const array = [...actions]\n array[index] = value\n setActions(array)\n handleFieldsChange()\n },\n [actions, handleFieldsChange]\n )\n\n const handleDelete = useCallback(\n (remove: FormListOperation[\"remove\"], index: number) => async () => {\n const array = [...actions]\n array.splice(index, 1)\n\n await remove(index)\n setActions(array)\n handleFieldsChange()\n },\n [actions, handleFieldsChange]\n )\n\n const handleAdd = useCallback(\n (add: FormListOperation[\"add\"]) => () => {\n add({})\n\n setActions([...actions, \"\" as MappingAction])\n\n handleFieldsChange()\n\n const tabScrollingEl = document.querySelector(\"#addNewFieldMappingScrollMarker\")\n\n setTimeout(() => tabScrollingEl.scrollIntoView(), 200)\n },\n [actions, handleFieldsChange]\n )\n\n const handleTypeChange = useCallback(\n (index: number) => (event: React.ChangeEvent) => {\n const formValues = form.getFieldsValue()\n const mappings = formValues[\"_mappings._mappings\"]\n\n mappings[index][\"_columnType\"] = event.target.value\n\n form.setFieldsValue({\n \"_mappings._mappings\": mappings,\n })\n\n handleFieldsChange()\n },\n [form, handleFieldsChange]\n )\n\n return (\n
\n \n

\n Mappings feature is deprecated. It is highly recommended to use Transform instead.\n

\n

\n Mapping defines how JSON will be transformed before it's sent to the target. Supported mapping actions: move,\n remove, cast.
\n Read more about mapping and see example in our{\" \"}\n \n documentation\n \n .\n

\n {!disableEdit && (\n

\n Use one of{\" \"}\n setDocumentationVisible(true)}>\n Pre-build Mapping Templates\n {\" \"}\n to configure Jitsu to implement one of the popular use-cases.\n

\n )}\n
\n Pre-build mapping templates}\n placement=\"right\"\n closable={true}\n onClose={() => setDocumentationVisible(false)}\n width=\"50%\"\n visible={documentationVisible}\n >\n \n \n
\n \n \n \n }\n >\n \n \n \n \n\n \n {(fields: FormListFieldData[], { add, remove }: FormListOperation) => (\n
\n <>\n {fields.map((field: FormListFieldData) => (\n \n ))}\n \n\n
\n \n
\n
\n
\n )}\n \n \n
\n )\n}\n\nDestinationEditorMappings.displayName = \"DestinationEditorMappings\"\n\nexport { DestinationEditorMappings }\n","import ApplicationServices from \"lib/services/ApplicationServices\"\nimport Marshal from \"lib/commons/marshalling\"\nimport { handleError } from \"lib/components/components\"\nimport { Tab } from \"ui/components/Tabs/TabsConfigurator\"\nimport { actionNotification } from \"../../../../components/ActionNotification/ActionNotification\"\n\nconst destinationEditorUtils = {\n testConnection: async (dst: DestinationData, hideMessage?: boolean) => {\n try {\n await ApplicationServices.get().backendApiClient.post(\"/destinations/test\", Marshal.toPureJson(dst))\n\n dst._connectionTestOk = true\n\n if (!hideMessage) {\n actionNotification.info(\"Successfully connected!\")\n }\n } catch (error) {\n dst._connectionTestOk = false\n dst._connectionErrorMessage = error.message ?? \"Failed to connect\"\n\n if (!hideMessage) {\n handleError(error, \"Connection failed\")\n }\n }\n },\n getPromptMessage: (tabs: Tab[], location): string => {\n if (location?.state?.disablePrompt) {\n return undefined\n }\n return tabs.some(tab => tab.touched)\n ? \"You have unsaved changes. Are you sure you want to leave the page?\"\n : undefined\n },\n}\n\nexport { destinationEditorUtils }\n","// This icon file is generated automatically.\nvar WarningOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z\" } }] }, \"name\": \"warning\", \"theme\": \"outlined\" };\nexport default WarningOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport WarningOutlinedSvg from \"@ant-design/icons-svg/es/asn/WarningOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar WarningOutlined = function WarningOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: WarningOutlinedSvg\n }));\n};\n\nWarningOutlined.displayName = 'WarningOutlined';\nexport default /*#__PURE__*/React.forwardRef(WarningOutlined);","// @Libs\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\"\nimport { Prompt, useHistory, useLocation, useParams } from \"react-router-dom\"\nimport { Button, Card, Form } from \"antd\"\nimport { flowResult } from \"mobx\"\nimport cn from \"classnames\"\n// @Components\nimport { TabsConfigurator } from \"ui/components/Tabs/TabsConfigurator\"\nimport { EditorButtons } from \"ui/components/EditorButtons/EditorButtons\"\nimport { PageHeader } from \"ui/components/PageHeader/PageHeader\"\nimport { DestinationEditorConfig } from \"./DestinationEditorConfig\"\nimport { DestinationEditorTransform } from \"./DestinationEditorTransform\"\nimport { DestinationEditorConnectors } from \"./DestinationEditorConnectors\"\nimport { DestinationEditorMappings } from \"./DestinationEditorMappings\"\n// @Store\nimport { sourcesStore } from \"stores/sources\"\nimport { destinationsStore } from \"stores/destinations\"\n// @CatalogDestinations\nimport { destinationsReferenceMap, DestinationType } from \"@jitsu/catalog\"\n// @Types\nimport { FormInstance } from \"antd/es\"\nimport { Destination } from \"@jitsu/catalog\"\nimport { Tab } from \"ui/components/Tabs/TabsConfigurator\"\nimport { CommonDestinationPageProps } from \"ui/pages/DestinationsPage/DestinationsPage\"\n// @Services\nimport ApplicationServices from \"lib/services/ApplicationServices\"\n// @Routes\nimport { destinationPageRoutes } from \"ui/pages/DestinationsPage/DestinationsPage.routes\"\n// @Styles\nimport styles from \"./DestinationEditor.module.less\"\n// @Utils\nimport { makeObjectFromFieldsValues } from \"utils/forms/marshalling\"\nimport { destinationEditorUtils } from \"ui/pages/DestinationsPage/partials/DestinationEditor/DestinationEditor.utils\"\nimport { getUniqueAutoIncId, randomId } from \"utils/numbers\"\nimport { firstToLower } from \"lib/commons/utils\"\n// @Hooks\nimport { useForceUpdate } from \"hooks/useForceUpdate\"\n// @Icons\nimport { AreaChartOutlined, WarningOutlined } from \"@ant-design/icons\"\nimport { actionNotification } from \"ui/components/ActionNotification/ActionNotification\"\nimport { projectRoute } from \"lib/components/ProjectLink/ProjectLink\"\nimport { currentPageHeaderStore } from \"stores/currentPageHeader\"\nimport { connectionsHelper } from \"stores/helpers\"\nimport { EntityNotFound } from \"ui/components/EntityNotFound/EntityNotFound\"\nimport { DestinationsUtils } from \"../../../../../utils/destinations.utils\"\nimport { handleError } from \"../../../../../lib/components/components\"\n\ntype DestinationTabKey = \"config\" | \"transform\" | \"mappings\" | \"sources\" | \"settings\" | \"statistics\"\n\ntype DestinationParams = {\n type?: DestinationType\n id?: string\n tabName?: string\n //For editor that lives separately from destination list page\n standalone?: string\n}\n\ntype DestinationURLParams = {\n type?: string\n id?: string\n tabName?: string\n //For editor that lives separately from destination list page\n standalone?: string\n}\n\ntype ConfigProps = { paramsByProps?: DestinationParams }\n\ntype ControlsProps = {\n disableForceUpdateOnSave?: boolean\n onAfterSaveSucceded?: () => void\n onCancel?: () => void\n isOnboarding?: boolean\n}\n\ntype Props = CommonDestinationPageProps & ConfigProps & ControlsProps\n\nconst DestinationEditor = ({\n editorMode,\n paramsByProps,\n disableForceUpdateOnSave,\n onAfterSaveSucceded,\n onCancel,\n isOnboarding,\n}: Props) => {\n const history = useHistory()\n const { search } = useLocation()\n\n const forceUpdate = useForceUpdate()\n\n const services = ApplicationServices.get()\n\n const urlParams = useParams()\n const params = paramsByProps || urlParams\n\n const [activeTabKey, setActiveTabKey] = useState(\"config\")\n const [savePopover, switchSavePopover] = useState(false)\n const [testConnecting, setTestConnecting] = useState(false)\n const [destinationSaving, setDestinationSaving] = useState(false)\n const [testConnectingPopover, switchTestConnectingPopover] = useState(false)\n\n const sources = sourcesStore.list\n const destinationData = useRef(getDestinationData(params))\n\n const submittedOnce = useRef(false)\n\n useEffect(() => {\n const query = new URLSearchParams(search)\n if (query.has(\"debugger\")) {\n const activeTabKey = query.get(\"debugger\").includes(\"transform\") ? \"transform\" : \"config\"\n setActiveTabKey(activeTabKey)\n }\n }, [search])\n\n const destinationReference = useMemo(() => {\n if (params.type) {\n return destinationsReferenceMap[params.type]\n }\n return destinationsReferenceMap[getDestinationData(params)._type]\n }, [params.type, params.id])\n\n if (!destinationReference) {\n return (\n \n )\n }\n\n const handleUseLibrary = async (newMappings: DestinationMapping, newTableName?: string) => {\n destinationData.current = {\n ...destinationData.current,\n _formData: {\n ...destinationData.current._formData,\n tableName: newTableName ? newTableName : destinationData.current._formData?.tableName,\n },\n _mappings: newMappings,\n }\n\n const { form: mappingsForm } = destinationsTabs[2]\n const { form: configForm } = destinationsTabs[0]\n\n await mappingsForm.setFieldsValue({\n \"_mappings._mappings\": newMappings._mappings,\n \"_mappings._keepUnmappedFields\": newMappings._keepUnmappedFields,\n })\n\n destinationsTabs[2].touched = true\n\n if (newTableName) {\n await configForm.setFieldsValue({\n \"_formData.tableName\": newTableName,\n })\n\n destinationsTabs[0].touched = true\n }\n\n await forceUpdate()\n\n actionNotification.success(\"Mappings library has been successfully set\")\n }\n\n const validateTabForm = useCallback(\n async (tab: Tab) => {\n const tabForm = tab.form\n\n try {\n if (tab.key === \"sources\") {\n const _sources = tabForm.getFieldsValue()?._sources\n\n if (!_sources) {\n tab.errorsCount = 1\n }\n }\n\n tab.errorsCount = 0\n\n return await tabForm.validateFields()\n } catch (errors) {\n // ToDo: check errors count for fields with few validation rules\n tab.errorsCount = errors.errorFields?.length\n return null\n } finally {\n forceUpdate()\n }\n },\n [forceUpdate]\n )\n const configForm = Form.useForm()[0]\n const hideMapping =\n params.standalone == \"true\" ||\n isOnboarding ||\n editorMode === \"add\" ||\n (destinationsReferenceMap[destinationReference.id].defaultTransform &&\n !destinationData.current._mappings?._mappings) ||\n !destinationData.current._mappings?._mappings\n let mappingForm = undefined\n if (!hideMapping) {\n mappingForm = Form.useForm()[0]\n }\n\n const tabsInitialData: Tab[] = [\n {\n key: \"config\",\n name: \"Connection Properties\",\n getComponent: (form: FormInstance) => (\n \n ),\n form: configForm,\n touched: false,\n },\n {\n key: \"transform\",\n name: \"Transform\",\n getComponent: (form: FormInstance) => (\n \n ),\n form: Form.useForm()[0],\n touched: false,\n isHidden: params.standalone == \"true\",\n },\n {\n key: \"mappings\",\n name: \"Mappings (Deprecated)\",\n isDisabled: destinationData.current[\"_transform_enabled\"],\n getComponent: (form: FormInstance) => (\n \n ),\n form: mappingForm,\n touched: false,\n isHidden: hideMapping,\n },\n {\n key: \"sources\",\n name: \"Linked Connectors & API Keys\",\n getComponent: (form: FormInstance) => (\n \n ),\n form: Form.useForm()[0],\n errorsLevel: \"warning\",\n touched: false,\n isHidden: params.standalone == \"true\",\n },\n ]\n\n const [destinationsTabs, setDestinationsTabs] = useState[]>(tabsInitialData)\n\n const validateAndTouchField = useCallback(\n (index: number) => (value: boolean) => {\n destinationsTabs[index].touched = value === undefined ? true : value\n\n setDestinationsTabs(oldTabs => {\n let tab = oldTabs[index]\n let oldErrorsCount = tab.errorsCount\n let newErrorsCount = tab.form.getFieldsError().filter(a => a.errors?.length > 0).length\n if (newErrorsCount != oldErrorsCount) {\n tab.errorsCount = newErrorsCount\n }\n if (\n oldTabs[1].form.getFieldValue(\"_transform_enabled\") !== oldTabs[2].isDisabled ||\n newErrorsCount != oldErrorsCount\n ) {\n const newTabs = [\n ...oldTabs.slice(0, 2),\n { ...oldTabs[2], isDisabled: oldTabs[1].form.getFieldValue(\"_transform_enabled\") },\n ...oldTabs.slice(3),\n ]\n if (newErrorsCount != oldErrorsCount) {\n newTabs[index].errorsCount = newErrorsCount\n }\n return newTabs\n } else {\n return oldTabs\n }\n })\n },\n [validateTabForm, destinationsTabs, setDestinationsTabs]\n )\n\n const handleCancel = useCallback(() => {\n onCancel ? onCancel() : history.push(projectRoute(destinationPageRoutes.root))\n }, [history, onCancel])\n\n const handleViewStatistics = () =>\n history.push(\n projectRoute(destinationPageRoutes.statisticsExact, {\n id: destinationData.current._id,\n })\n )\n\n const testConnectingPopoverClose = useCallback(() => switchTestConnectingPopover(false), [])\n\n const savePopoverClose = useCallback(() => switchSavePopover(false), [])\n\n const handleTestConnection = useCallback(async () => {\n setTestConnecting(true)\n\n const tab = destinationsTabs[0]\n\n try {\n const config = await validateTabForm(tab)\n const values = makeObjectFromFieldsValues(config)\n destinationData.current._formData = values._formData\n destinationData.current._package = values._package\n destinationData.current._super_type = values._super_type\n await destinationEditorUtils.testConnection(destinationData.current)\n } catch (error) {\n switchTestConnectingPopover(true)\n } finally {\n setTestConnecting(false)\n forceUpdate()\n }\n }, [validateTabForm, forceUpdate])\n\n const handleSaveDestination = useCallback(() => {\n submittedOnce.current = true\n\n setDestinationSaving(true)\n\n Promise.all(destinationsTabs.filter((tab: Tab) => !!tab.form).map((tab: Tab) => validateTabForm(tab)))\n .then(async allValues => {\n destinationData.current = {\n ...destinationData.current,\n ...allValues.reduce((result: any, current: any) => {\n return {\n ...result,\n ...makeObjectFromFieldsValues(current),\n }\n }, {}),\n }\n\n try {\n await destinationEditorUtils.testConnection(destinationData.current, true)\n\n let savedDestinationData: DestinationData = destinationData.current\n if (editorMode === \"add\") {\n savedDestinationData = await flowResult(destinationsStore.add(destinationData.current))\n }\n if (editorMode === \"edit\") {\n await flowResult(destinationsStore.replace(destinationData.current))\n }\n await connectionsHelper.updateSourcesConnectionsToDestination(\n savedDestinationData._uid,\n savedDestinationData._sources || []\n )\n\n destinationsTabs.forEach((tab: Tab) => (tab.touched = false))\n\n if (savedDestinationData._connectionTestOk) {\n if (editorMode === \"add\") actionNotification.success(`New ${savedDestinationData._type} has been added!`)\n if (editorMode === \"edit\") actionNotification.success(`${savedDestinationData._type} has been saved!`)\n } else {\n actionNotification.warn(\n `${savedDestinationData._type} has been saved, but test has failed with '${firstToLower(\n savedDestinationData._connectionErrorMessage\n )}'. Data will not be piped to this destination`\n )\n }\n\n onAfterSaveSucceded ? onAfterSaveSucceded() : history.push(projectRoute(destinationPageRoutes.root))\n } catch (errors) {\n handleError(errors, \"Saving failed\")\n }\n })\n .catch(() => {\n switchSavePopover(true)\n })\n .finally(() => {\n setDestinationSaving(false)\n !disableForceUpdateOnSave && forceUpdate()\n })\n }, [\n destinationsTabs,\n destinationData,\n sources,\n history,\n validateTabForm,\n forceUpdate,\n editorMode,\n services.activeProject.id,\n services.storageService,\n ])\n\n const connectedSourcesNum = sources.filter(src =>\n (src.destinations || []).includes(destinationData.current._uid)\n ).length\n\n const isAbleToConnectItems = (): boolean =>\n editorMode === \"edit\" &&\n connectedSourcesNum === 0 &&\n !destinationData.current?._onlyKeys?.length &&\n !destinationsReferenceMap[params.type]?.hidden\n\n useEffect(() => {\n let breadcrumbs = []\n if (!params.standalone) {\n breadcrumbs.push({\n title: \"Destinations\",\n link: projectRoute(destinationPageRoutes.root),\n })\n }\n breadcrumbs.push({\n title: (\n \n ),\n })\n setTimeout(() => {\n currentPageHeaderStore.setBreadcrumbs(...breadcrumbs)\n }, 100)\n }, [destinationReference])\n\n return (\n <>\n
\n
\n {isAbleToConnectItems() && (\n \n \n
\n This destination is not linked to any API keys or Connector. You{\" \"}\n setActiveTabKey(\"sources\")}>\n can link the destination here\n \n .\n
\n
\n )}\n }\n >\n Statistics\n \n )\n }\n />\n
\n\n
\n tab.errorsCount > 0),\n handlePress: handleSaveDestination,\n handlePopoverClose: savePopoverClose,\n titleText: \"Destination editor errors\",\n tabsList: destinationsTabs,\n }}\n test={{\n isRequestPending: testConnecting,\n isPopoverVisible: testConnectingPopover && destinationsTabs[0].errorsCount > 0,\n handlePress: handleTestConnection,\n handlePopoverClose: testConnectingPopoverClose,\n titleText: \"Connection Properties errors\",\n tabsList: [destinationsTabs[0]],\n }}\n handleCancel={params.standalone ? undefined : handleCancel}\n />\n
\n
\n\n destinationEditorUtils.getPromptMessage(destinationsTabs, location)} />\n \n )\n}\n\nDestinationEditor.displayName = \"DestinationEditor\"\n\nexport { DestinationEditor }\n\nconst getDestinationData = (params: { id?: string; type?: string }): DestinationData =>\n destinationsStore.listIncludeHidden.find(dst => dst._id === params.id) ||\n ({\n _id: getUniqueAutoIncId(\n params.type,\n destinationsStore.listIncludeHidden.map(dst => dst._id)\n ),\n _uid: randomId(),\n _type: params.type,\n _mappings: { _keepUnmappedFields: true },\n _comment: null,\n _onlyKeys: [],\n } as DestinationData)\n","import { DATE_REGEX } from \"constants/regex\"\n\nconst isValidFullIsoDate = (date: string) => DATE_REGEX.ISO_FULL.test(date)\nconst isValidFullWoMsIsoDate = (date: string) => DATE_REGEX.ISO_FULL_WO_MS.test(date)\nconst isValidShortIsoDate = (date: string) => DATE_REGEX.ISO_SHORT.test(date)\nconst IsValidIsoDate = (date: string) =>\n isValidFullIsoDate(date) || isValidFullWoMsIsoDate(date) || isValidShortIsoDate(date)\n\nexport { isValidFullIsoDate, isValidFullWoMsIsoDate, isValidShortIsoDate, IsValidIsoDate }\n","import { isValidFullIsoDate, isValidFullWoMsIsoDate } from \"utils/validation/date\"\n\nconst isoDateValidator = (errorMessage: string) => {\n return {\n validator: (rule, value) =>\n !value\n ? Promise.reject(errorMessage)\n : isValidFullIsoDate(value) || isValidFullWoMsIsoDate(value)\n ? Promise.resolve()\n : Promise.reject(\"Please, fill in correct ISO 8601 date, YYYY-MM-DDThh:mm:ss[.SSS]Z\"),\n }\n}\n\nexport { isoDateValidator }\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"title\":\"PopoverTitle_title__34zX2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"list\":\"PopoverErrorsContent_list__24hn9\"};","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"description\":\"TabDescription_description__3EwLD\"};","// This icon file is generated automatically.\nvar ApiOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z\" } }] }, \"name\": \"api\", \"theme\": \"outlined\" };\nexport default ApiOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport ApiOutlinedSvg from \"@ant-design/icons-svg/es/asn/ApiOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar ApiOutlined = function ApiOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: ApiOutlinedSvg\n }));\n};\n\nApiOutlined.displayName = 'ApiOutlined';\nexport default /*#__PURE__*/React.forwardRef(ApiOutlined);"],"sourceRoot":""}