{"version":3,"sources":["webpack:///./src/ui/components/ConfigurableFieldsForm/ConfigurableFieldsForm.module.less?25ee","hooks/useForceUpdate.ts","webpack:///./src/ui/components/CodeDebugger/CodeDebugger.module.less?a74d","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","lib/components/BillingCheckRedirect/BillingCheckRedirect.tsx","lib/components/LoadingFormCard/LoadingFormCard.tsx","hooks/usePolling.ts","ui/components/NoStreamsSelectedMessage/NoStreamsSelectedMessage.tsx","constants/schedule.ts","ui/components/SourceCard/SourceCard.tsx","constants/oauth.ts","hooks/useUniqueKeyState.ts","ui/components/FormSkeleton/FormSkeleton.tsx","hooks/useIsMounted.ts","hooks/useDebouncedCallback.ts"],"names":["useForceUpdate","useState","updateState","useCallback","useForceUpdateTarget","state","setState","forceUpdatedTargets","forceUpdateTheTarget","key","Object","keys","reduce","result","TYPE_PROPERTY","newInstance","className","classes","cls","undefined","Error","classesMap","map","forEach","name","newInstanceInternal","initialInstance","json","Array","isArray","element","instance","hasOwnProperty","Marshal","newKnownInstance","allClasses","toPureJson","object","constructor","val","emptyValidator","str","EditableList","initialValue","onChange","newItemLabel","validator","initialItems","value","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","src","displayName","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","options","setFieldsValue","current","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","includes","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","makeObjectFromFieldsValues","template_variables","entries","v","startsWith","accumulator","currentValue","set","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","BillingCheckRedirect","quotaExceededRedirectTo","quotaExceedeMessage","isQuotaExceeded","useServices","isQuotaLimitReached","features","billingEnabled","currentSubscription","doNotBlock","showQuotaLimitModal","LoadableFieldsLoadingMessageCard","title","longLoadingMessage","showLongLoadingMessageAfterMs","description","setDescription","timeout","setTimeout","clearTimeout","defaultOptions","interval_ms","timeout_ms","usePolling","callbackOrConfigurator","dependencies","pollingHookConfigurator","configure","pollingCallback","setIsLoading","setData","setError","cancelCurrentPoll","outdateCurrentPoll","poll","blockStateUpdates","onBeforePollingStart","onAfterPollingEnd","Poll","start","cancel","wait","reload","NoStreamsSelectedMessage","editSourceLink","COLLECTIONS_SCHEDULES","dailyHours","i","DAILY_HOURS","allSourcesMap","allSources","snakeCase","SourceCard","short","reference","sourceProtoType","editLink","projectRoute","sourcesPageRoutes","editExact","projectId","sourceId","viewLogsLink","rename","newName","flowResult","sourcesStore","patch","scheduleTasks","full","isAtLeastOneStreamSelected","actionNotification","withProgressBar","estimatedMs","maxRetries","retryDelayMs","source","project_id","urlParams","delete_warehouse_data","sourceEditorUtils","isNativeOrSDKSource","collections","Promise","all","stream","collection","deleteSrc","confirm","icon","okText","cancelText","onCancel","onOk","delete","connectionsHelper","unconnectDeletedSource","success","handleError","connectionStatus","connected","connectedErrorMessage","pic","destinations","SourcesUtils","getDisplayName","LastTaskStatus","end","Date","toISOString","subtract","limit","tasks","tasksSorted","comparator","t","finished_at","task","status","date","now","taskId","TaskId","encode","toUpperCase","from","OAUTH_FIELDS_NAMES","useUniqueKeyState","idPrefix","handleGenerateNewState","FormSkeleton","useIsMounted","isMountedRef","useDebouncedCallback","delay","inputsRef","isMounted"],"mappings":";;;;;AAAA;AACA,kBAAkB,mxG;;;;;;;;;;;;;;;ACCX,QAASA,eAAT,EAA0B,CAC/B,cAAwBC,sDAAQ,EAAhC,oOAASC,WAAT,eAEA,MAAOC,0DAAW,CAAC,iBAAMD,YAAW,CAAC,EAAD,CAAjB,EAAD,CAAwB,EAAxB,CAAlB,CACD,CAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,GAAME,qBAAoB,CAAG,QAAvBA,qBAAuB,EAG/B,CACH,eAA0B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CAA3B,CACAvB,0BAAS,CAAC,UAAM,CACd,MAAO,WAAM,CACXuZ,YAAY,CAACtX,OAAb,CAAuB,KAAvB,CACD,CAFD,CAGD,CAJQ,CAIN,EAJM,CAAT,CAKA,MAAO,kBAAMsX,aAAY,CAACtX,OAAnB,EAAP,CACD,CARM,C;;ACGA,GAAMuX,0CAAoB,CAAG,QAAvBA,qBAAuB,CAClC7Z,QADkC,CAElC8Z,KAFkC,CAGb,CACrB;AACA,GAAMC,UAAS,CAAGnY,uBAAM,CAAC,CAAE5B,QAAQ,CAARA,QAAF,CAAY8Z,KAAK,CAALA,KAAZ,CAAD,CAAxB,CACA,GAAME,UAAS,CAAGL,yBAAY,EAA9B,CAEAtZ,0BAAS,CAAC,UAAM,CACd0Z,SAAS,CAACzX,OAAV,CAAoB,CAAEtC,QAAQ,CAARA,QAAF,CAAY8Z,KAAK,CAALA,KAAZ,CAApB,CACD,CAFQ,CAEN,CAAC9Z,QAAD,CAAW8Z,KAAX,CAFM,CAAT,CAIA,MAAOjhB,6BAAW,CAChB,mBACG,UAAa,wBACZ;AACA;AACA;AACA,GAAIkhB,SAAS,CAACzX,OAAV,CAAkBwX,KAAlB,GAA4BA,KAA5B,EAAqCE,SAAS,EAAlD,CAAsD,oBAAAD,SAAS,CAACzX,OAAV,EAAkBtC,QAAlB,qCACvD,CANH,CAOE8Z,KAPF,CADgB,CAUhB,CAACA,KAAD,oBAVgB,CAAlB,CAYD,CAxBM,C","file":"static/js/80.476f29c4.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 { 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\"};","/**\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\"};","import { ReactElement, useEffect } from \"react\"\nimport { Redirect } from \"react-router-dom\"\nimport { useServices } from \"hooks/useServices\"\nimport { CurrentSubscription, showQuotaLimitModal } from \"lib/services/billing\"\n\ntype Props = {\n quotaExceededRedirectTo: string\n quotaExceedeMessage: ReactElement\n isQuotaExceeded: (subscription: CurrentSubscription | null | undefined) => boolean\n}\n\n\nexport const BillingCheckRedirect: React.FC = ({\n quotaExceededRedirectTo,\n quotaExceedeMessage,\n isQuotaExceeded,\n children,\n}) => {\n const services = useServices()\n const isQuotaLimitReached: boolean =\n services.features.billingEnabled &&\n !services.currentSubscription.doNotBlock &&\n isQuotaExceeded(services.currentSubscription)\n\n useEffect(() => {\n if (isQuotaLimitReached) showQuotaLimitModal(services.currentSubscription, quotaExceedeMessage)\n }, [])\n\n return isQuotaLimitReached ? : <>{children}\n}\n","import { FC, useEffect, useState } from \"react\"\nimport { Card, Spin } from \"antd\"\n\ntype Props = {\n title: string\n longLoadingMessage?: string\n showLongLoadingMessageAfterMs?: number\n className?: string\n}\n\nexport const LoadableFieldsLoadingMessageCard: FC = ({\n title,\n longLoadingMessage,\n showLongLoadingMessageAfterMs,\n className,\n}) => {\n const [description, setDescription] = useState(null)\n\n useEffect(() => {\n let timeout\n if (true) {\n timeout = setTimeout(() => setDescription(longLoadingMessage), showLongLoadingMessageAfterMs)\n }\n\n return () => {\n if (timeout) clearTimeout(timeout)\n }\n }, [])\n\n return (\n \n } title={title} description={description} />\n \n )\n}\n","import { useEffect, useRef, useState } from \"react\"\nimport { Poll, PollingSetupCallback } from \"utils/polling\"\n\ntype UsePollingOptions = {\n /**\n * Polling interval. Is 1 second by default.\n */\n interval_ms?: number\n /**\n * Polling timeout after which the poll will cancel itself.\n * Is 5 minutes by default.\n */\n timeout_ms?: number\n}\n\ntype UsePollingReturnType = {\n /**\n * Contains an error if the polling failed, otherwise is `null`\n */\n error: Error | null\n /**\n * Contains the data if polling succeeded, otherwise is `null`\n * (including the case when the pollin was stopped manually).\n */\n data: T | null\n /**\n * Flag indicating whether the polling is in progress\n */\n isLoading: boolean\n /**\n * Callback for cancelling the poll manually. Helpful for a manual\n * cleanup when component unmounts.\n */\n cancel: VoidFunction\n /**\n * Callback for restarting the poll.\n */\n reload: VoidFunction\n}\n\ntype PollingHookConfigurator = {\n configure: () => {\n pollingCallback: PollingSetupCallback\n onBeforePollingStart?: (options?: StartOpts) => void | Promise\n onAfterPollingEnd?: (options?: EndOpts) => void\n }\n}\n\nconst defaultOptions: UsePollingOptions = {\n interval_ms: 1000,\n timeout_ms: 10 * 60 * 1000,\n}\n\n/**\n * React hook for polling the data until the polling condition is\n * satisfied or until it is timed out.\n */\nexport const usePolling = (\n /**\n *\n */\n callbackOrConfigurator: PollingSetupCallback | PollingHookConfigurator,\n\n /**\n * Polling options such as interval and timeout\n */\n options: UsePollingOptions = {},\n\n /**\n * List of dependencies to restart polling upon their change\n */\n dependencies?: unknown[]\n): UsePollingReturnType => {\n // const { pollingCallback, onBeforePollingStart, onAfterPollingEnd } = useMemo<>(() => {}, )\n const pollingHookConfigurator: PollingHookConfigurator =\n \"configure\" in callbackOrConfigurator\n ? callbackOrConfigurator\n : { configure: () => ({ pollingCallback: callbackOrConfigurator }) }\n const { interval_ms, timeout_ms } = { ...defaultOptions, ...(options ?? {}) }\n const [isLoading, setIsLoading] = useState(false)\n const [data, setData] = useState(null)\n const [error, setError] = useState(null)\n\n const cancelCurrentPoll = useRef>(null)\n const outdateCurrentPoll = useRef>(null)\n\n const poll = async () => {\n setIsLoading(true)\n setError(null)\n\n let blockStateUpdates: boolean = false\n outdateCurrentPoll.current = () => {\n blockStateUpdates = true\n }\n\n const { pollingCallback, onBeforePollingStart, onAfterPollingEnd } = pollingHookConfigurator.configure()\n try {\n const poll = new Poll(pollingCallback, interval_ms, timeout_ms)\n await onBeforePollingStart?.()\n poll.start()\n\n cancelCurrentPoll.current = poll.cancel\n\n const result = await poll.wait()\n !blockStateUpdates && setData(result)\n } catch (e) {\n let error = e\n if (!(error instanceof Error)) {\n error = new Error(e)\n }\n !blockStateUpdates && setError(error)\n } finally {\n !blockStateUpdates && setIsLoading(false)\n onAfterPollingEnd?.()\n }\n }\n\n const cancel = () => {\n outdateCurrentPoll.current?.()\n cancelCurrentPoll.current?.()\n }\n\n const reload = async () => {\n cancel()\n await poll()\n }\n\n useEffect(() => {\n cancel()\n poll()\n }, dependencies ?? [])\n\n /**\n * Cleans up unfinished poll when component is unmounted;\n */\n useEffect(() => cancel, [])\n\n return {\n error,\n data,\n isLoading,\n cancel,\n reload,\n }\n}\n","import { Button } from \"antd\"\nimport { useHistory } from \"react-router\"\n\ntype Props = {\n editSourceLink?: string\n}\n\nexport const NoStreamsSelectedMessage: React.FC = ({ editSourceLink }) => {\n const history = useHistory()\n return (\n
\n \n Can't perform sync because no data streams were selected for this source. Please, select at least one stream in\n the Streams section of source configuration.\n \n {editSourceLink && (\n {\n history.push(editSourceLink)\n }}\n >\n Edit Source\n \n )}\n
\n )\n}\n","export type CollectionSchedule = {\n value: string //cron expression\n label: string //display name\n id: string // id to refer\n}\n\nexport const COLLECTIONS_SCHEDULES: CollectionSchedule[] = [\n { value: \"@daily\", label: \"Once a day\", id: \"1d\" },\n { value: \"@hourly\", label: \"Once an hour\", id: \"1h\" },\n { value: \"*/5 * * * *\", label: \"5 minutes\", id: \"5m\" },\n { value: \"*/1 * * * *\", label: \"1 minute\", id: \"1m\" },\n { value: \"@cron\", label: \"Cron expression\", id: \"cron\" },\n]\n\nlet dailyHours: CollectionSchedule[] = []\nfor (let i = 0; i < 24; i++) {\n dailyHours.push({\n value: i.toString(),\n label: i < 10 ? `0${i}:00` : `${i}:00`,\n id: i.toString(),\n })\n}\n\nexport const DAILY_HOURS = dailyHours\n","import { SourceConnector } from \"@jitsu/catalog\"\nimport { allSources } from \"@jitsu/catalog\"\nimport snakeCase from \"lodash/snakeCase\"\nimport EditOutlined from \"@ant-design/icons/lib/icons/EditOutlined\"\nimport DeleteOutlined from \"@ant-design/icons/lib/icons/DeleteOutlined\"\nimport { Badge, Menu, Modal, Skeleton, Tag, Tooltip } from \"antd\"\nimport SubMenu from \"antd/lib/menu/SubMenu\"\nimport CodeOutlined from \"@ant-design/icons/lib/icons/CodeOutlined\"\nimport SyncOutlined from \"@ant-design/icons/lib/icons/SyncOutlined\"\nimport ClearOutlined from \"@ant-design/icons/lib/icons/ClearOutlined\"\nimport { useHistory, NavLink } from \"react-router-dom\"\nimport { sourcesPageRoutes } from \"ui/pages/SourcesPage/SourcesPage.routes\"\nimport { sourcesStore } from \"../../../stores/sources\"\nimport ExclamationCircleOutlined from \"@ant-design/icons/lib/icons/ExclamationCircleOutlined\"\nimport { handleError, withProgressBar } from \"../../../lib/components/components\"\nimport { useServices } from \"../../../hooks/useServices\"\nimport { useLoaderAsObject } from \"../../../hooks/useLoader\"\nimport { Task, TaskId } from \"../../pages/TaskLogs/utils\"\nimport moment from \"moment\"\nimport { comparator } from \"../../../lib/commons/utils\"\nimport { ConnectionCard } from \"../ConnectionCard/ConnectionCard\"\nimport { flowResult } from \"mobx\"\nimport { actionNotification } from \"../ActionNotification/ActionNotification\"\nimport { SourcesUtils } from \"../../../utils/sources.utils\"\nimport { isAtLeastOneStreamSelected } from \"utils/sources/sourcesUtils\"\nimport { NoStreamsSelectedMessage } from \"../NoStreamsSelectedMessage/NoStreamsSelectedMessage\"\nimport { projectRoute } from \"lib/components/ProjectLink/ProjectLink\"\nimport { connectionsHelper } from \"stores/helpers\"\nimport { sourceEditorUtils } from \"ui/pages/SourcesPage/partials/SourceEditor/SourceEditor/SourceEditor.utils\"\nimport useProject from \"../../../hooks/useProject\"\nimport { allPermissions } from \"../../../lib/services/permissions\"\nimport { ProjectPermission } from \"../../../generated/conf-openapi\"\n\nconst allSourcesMap: { [key: string]: SourceConnector } = allSources.reduce(\n (accumulator, current) => ({\n ...accumulator,\n [snakeCase(current.id)]: current,\n }),\n {}\n)\nexport type SourceCardProps = {\n //Source we display\n src: SourceData\n\n //if true, we won't pull latest task data.\n short?: boolean\n}\n\nexport function SourceCard({ src, short = false }: SourceCardProps) {\n const project = useProject()\n const disableEdit = !(project.permissions || allPermissions).includes(ProjectPermission.MODIFY_CONFIG)\n\n const reference: SourceConnector = allSourcesMap[src.sourceProtoType]\n\n if (!reference) {\n return null\n }\n\n const history = useHistory()\n const services = useServices()\n const editLink = projectRoute(sourcesPageRoutes.editExact, {\n projectId: services.activeProject.id,\n sourceId: src.sourceId,\n })\n const viewLogsLink = projectRoute(sourcesPageRoutes.logs, { sourceId: src.sourceId })\n\n const rename = async (sourceId: string, newName: string) => {\n await flowResult(sourcesStore.patch(sourceId, { displayName: newName }))\n }\n\n const scheduleTasks = async (src: SourceData, full = false) => {\n if (!isAtLeastOneStreamSelected(src)) {\n actionNotification.error()\n return\n }\n await withProgressBar({\n estimatedMs: 200,\n maxRetries: 2,\n retryDelayMs: 2000,\n callback: async () => {\n if (full) {\n await services.backendApiClient.post(\n \"/sources/clear_cache\",\n {\n source: `${services.activeProject.id}.${src.sourceId}`,\n project_id: services.activeProject.id,\n },\n { proxy: true, urlParams: { delete_warehouse_data: true } }\n )\n }\n\n if (sourceEditorUtils.isNativeOrSDKSource(src) && src.collections.length > 0) {\n await Promise.all(\n src.collections.map(stream =>\n services.backendApiClient.post(\"/tasks\", undefined, {\n proxy: true,\n urlParams: {\n source: `${services.activeProject.id}.${src.sourceId}`,\n collection: stream.name,\n project_id: services.activeProject.id,\n },\n })\n )\n )\n } else {\n //workaround for singer and airbyte, it doesn't have collections, so we should pass\n //any value\n await services.backendApiClient.post(\"/tasks\", undefined, {\n proxy: true,\n urlParams: {\n source: `${services.activeProject.id}.${src.sourceId}`,\n collection: \"bogus\",\n project_id: services.activeProject.id,\n },\n })\n }\n history.push(projectRoute(sourcesPageRoutes.logs, { sourceId: src.sourceId }))\n },\n })\n }\n\n const deleteSrc = (src: SourceData) => {\n Modal.confirm({\n title: \"Confirm to delete\",\n icon: ,\n content: `Are you sure you want to delete ${src.displayName} source? This action cannot be undone.`,\n okText: \"Confirm\",\n cancelText: \"Cancel\",\n onCancel: () => {},\n onOk: async () => {\n try {\n await sourcesStore.delete(src.sourceId)\n await connectionsHelper.unconnectDeletedSource(src.sourceId)\n actionNotification.success(\"Sources list successfully updated\")\n } catch (error) {\n handleError(error, \"Unable to delete source\")\n }\n },\n })\n }\n\n let connectionStatus = (\n Jitsu successfully connected to {reference.displayName}\n ) : (\n <>\n Connection to {reference.displayName} failed: {src.connectedErrorMessage}\n \n )\n }\n >\n \n {src.connected ? \"Active\" : \"Connection test failed\"}\n \n )\n }\n />\n \n )\n\n return (\n deleteSrc(src)}\n editAction={editLink}\n menuOverlay={\n !disableEdit && (\n \n }>\n Edit\n \n } onClick={() => deleteSrc(src)}>\n Delete\n \n } disabled={src.destinations?.length === 0}>\n View Logs\n \n }\n disabled={src.destinations?.length === 0}\n onClick={async () => await scheduleTasks(src, true)}\n >\n Clear Destinations and Sync\n \n }\n disabled={src.destinations?.length === 0}\n onClick={async () => await scheduleTasks(src, false)}\n >\n Sync Now\n \n \n )\n }\n title={SourcesUtils.getDisplayName(src)}\n rename={(newName: string) => rename(src.sourceId, newName)}\n subtitle={\n <>\n {reference.displayName}\n {!short && connectionStatus}\n \n }\n status={short ? connectionStatus : }\n />\n )\n}\n\nfunction LastTaskStatus({ src }: { src: SourceData }) {\n const services = useServices()\n if (src.destinations?.length === 0) {\n return (\n No destinations are linked to this connector}>\n NO DESTINATIONS\n \n )\n }\n const {\n error,\n data: task,\n isLoading,\n } = useLoaderAsObject(async () => {\n let tasks = await services.backendApiClient.get(\"/tasks\", {\n proxy: true,\n urlParams: {\n project_id: services.activeProject.id,\n source: `${services.activeProject.id}.${src.sourceId}`,\n end: new Date().toISOString(),\n start: moment().subtract(90, \"days\").toISOString(),\n limit: 100,\n },\n })\n const tasksSorted = tasks.tasks.sort(comparator(t => new Date(t.finished_at)))\n return tasksSorted?.[0]\n })\n\n if (isLoading) {\n return \n }\n //workaround: \"doesn't exist\" really means no tasks\n if (!task?.status && (error?.message || \"\").indexOf(\"doesn't exist\")) {\n return (\n This connector hasn't been started yet}>\n NO RUNS\n \n )\n }\n if (error) {\n return ERROR !\n }\n const date = task.finished_at ? moment.utc(task.finished_at) : null\n const now = moment.utc(new Date().toISOString())\n\n return (\n \n \n {task.status.toUpperCase()}\n {date?.from(now)}\n \n \n )\n}\n\n// return
\n// ERROR\n//
2 mins ago
\n//
\n//\n// }\n","export const OAUTH_FIELDS_NAMES = [\"access_token\", \"refresh_token\"] as const\n","import { uniqueId } from \"lodash\"\nimport { useCallback, useState } from \"react\"\n\nexport const useUniqueKeyState = (idPrefix?: string): [string, () => void] => {\n const [state, setState] = useState(uniqueId(idPrefix))\n const handleGenerateNewState = useCallback<() => void>(() => {\n setState(uniqueId(idPrefix))\n }, [])\n return [state, handleGenerateNewState]\n}\n","import { Col, Row, Skeleton } from \"antd\"\n\ntype Props = {}\n\nexport const FormSkeleton: React.FC = () => {\n return (\n \n \n \n \n \n \n \n )\n}\n","import { useEffect, useRef } from \"react\"\n\nexport const useIsMounted = (): (() => boolean) => {\n const isMountedRef = useRef(true)\n useEffect(() => {\n return () => {\n isMountedRef.current = false\n }\n }, [])\n return () => isMountedRef.current\n}\n","import { useCallback, useEffect, useRef } from \"react\"\nimport { debounce } from \"lodash\"\nimport type { DebouncedFunc } from \"lodash\"\nimport { useIsMounted } from \"./useIsMounted\"\n\nexport const useDebouncedCallback = unknown>(\n callback: T,\n delay: number\n): DebouncedFunc => {\n // ...\n const inputsRef = useRef({ callback, delay })\n const isMounted = useIsMounted()\n\n useEffect(() => {\n inputsRef.current = { callback, delay }\n }, [callback, delay])\n\n return useCallback>(\n debounce(\n ((...args) => {\n // Debounce is an async callback. Cancel it, if in the meanwhile\n // (1) component has been unmounted (see isMounted in snippet)\n // (2) delay has changed\n if (inputsRef.current.delay === delay && isMounted()) inputsRef.current.callback(...args)\n }) as T,\n delay\n ),\n [delay, debounce]\n )\n}\n"],"sourceRoot":""}