@atom8n/n8n-editor-ui 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintcache +1 -0
- package/README.md +59 -0
- package/biome.jsonc +8 -0
- package/build.log +55 -0
- package/data/node-popularity.json +3998 -0
- package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
- package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
- package/dist/assets/Alert-Dy86dyOr.js +102 -0
- package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
- package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
- package/dist/assets/AuthView-D2LWHrMp.js +106 -0
- package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
- package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
- package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
- package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
- package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
- package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
- package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
- package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
- package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
- package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
- package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
- package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
- package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
- package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
- package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
- package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
- package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
- package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
- package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
- package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
- package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
- package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
- package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
- package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
- package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
- package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
- package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
- package/dist/assets/ErrorView-zT9cX76a.js +61 -0
- package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
- package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
- package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
- package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
- package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
- package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
- package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
- package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
- package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
- package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
- package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
- package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
- package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
- package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
- package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
- package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
- package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
- package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
- package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
- package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
- package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
- package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
- package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
- package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
- package/dist/assets/Modal-CIzXlZdZ.js +204 -0
- package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
- package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
- package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
- package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
- package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
- package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
- package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
- package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
- package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
- package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
- package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
- package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
- package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
- package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
- package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
- package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
- package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
- package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
- package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
- package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
- package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
- package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
- package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
- package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
- package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
- package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
- package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
- package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
- package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
- package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
- package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
- package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
- package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
- package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
- package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
- package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
- package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
- package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
- package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
- package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
- package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
- package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
- package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
- package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
- package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
- package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
- package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
- package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
- package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
- package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
- package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
- package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
- package/dist/assets/SetupView-VORZ-L_u.js +112 -0
- package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
- package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
- package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
- package/dist/assets/SigninView-D9_Pm16j.js +358 -0
- package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
- package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
- package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
- package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
- package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
- package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
- package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
- package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
- package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
- package/dist/assets/TemplatesView-025CcmIY.js +57 -0
- package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
- package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
- package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
- package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
- package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
- package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
- package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
- package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
- package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
- package/dist/assets/WorkerView-Caznsljo.js +563 -0
- package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
- package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
- package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
- package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
- package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
- package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
- package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
- package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
- package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
- package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
- package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
- package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
- package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
- package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
- package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
- package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
- package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
- package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
- package/dist/assets/assistant.store-CNywgN4S.js +518 -0
- package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
- package/dist/assets/banners.store-CGEcBTDn.js +195 -0
- package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
- package/dist/assets/buttons.esm-yintpW2E.js +364 -0
- package/dist/assets/chart-CNvyywtJ.js +10958 -0
- package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
- package/dist/assets/chat.store-290YeyrQ.js +865 -0
- package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
- package/dist/assets/chunk-6z4oVpB-.js +36 -0
- package/dist/assets/col-Cmt4cmuS.js +158 -0
- package/dist/assets/constants-C8OH4tTq.js +106256 -0
- package/dist/assets/constants-DMrsrpD7.js +32 -0
- package/dist/assets/core-B9gt_4yk.js +4 -0
- package/dist/assets/core-CP5FY4aX.js +1202 -0
- package/dist/assets/core-CRbPymLT.js +9741 -0
- package/dist/assets/dataTable.store-DmipQsol.js +207 -0
- package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
- package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
- package/dist/assets/dateformat-hG8NERse.js +181 -0
- package/dist/assets/dialog-lMho1TD8.js +425 -0
- package/dist/assets/dist-Cw46Is-h.js +151 -0
- package/dist/assets/doppler-B__k0MeW.webp +0 -0
- package/dist/assets/element-icons-B-tDfklg.woff +0 -0
- package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
- package/dist/assets/empty-BuGRxzl4.js +2210 -0
- package/dist/assets/en-CF30SCh2.js +95 -0
- package/dist/assets/en-DyO2pPiC.js +2 -0
- package/dist/assets/es-BkUFJVtD.js +43338 -0
- package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
- package/dist/assets/executions.store-B9uRYwgv.js +205 -0
- package/dist/assets/exports-Crx_gvt_.js +1799 -0
- package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
- package/dist/assets/fileUtils-CRWqOQje.js +20 -0
- package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
- package/dist/assets/get-BcEmeOxn.js +2781 -0
- package/dist/assets/index-SL8542zQ.js +28372 -0
- package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
- package/dist/assets/insights.store-BFc3kDUo.js +61 -0
- package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
- package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
- package/dist/assets/languageModules-9LyndCqU.js +13862 -0
- package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
- package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
- package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
- package/dist/assets/merge-DhuTk1HM.js +564 -0
- package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
- package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
- package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
- package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
- package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
- package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
- package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
- package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
- package/dist/assets/radio-CSce3UT0.js +262 -0
- package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
- package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
- package/dist/assets/retry-BgHaYzbB.js +23 -0
- package/dist/assets/roles.store-CRf_zJTb.js +51 -0
- package/dist/assets/router-DNpzz3GH.js +2631 -0
- package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
- package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
- package/dist/assets/semver-Bk6DGseV.js +1306 -0
- package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
- package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
- package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
- package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
- package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
- package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
- package/dist/assets/src-jviYSG25.js +55454 -0
- package/dist/assets/sso.store-DyApJwhx.js +139 -0
- package/dist/assets/style-E3CrYFV8.css +111829 -0
- package/dist/assets/table-we1DjFMV.js +3944 -0
- package/dist/assets/templateActions-bEDSARw2.js +65 -0
- package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
- package/dist/assets/truncate-C0KYt7i3.js +4176 -0
- package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
- package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
- package/dist/assets/usage.store-CU5J_nGm.js +100 -0
- package/dist/assets/useActions-B1JckIRj.js +255 -0
- package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
- package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
- package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
- package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
- package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
- package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
- package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
- package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
- package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
- package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
- package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
- package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
- package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
- package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
- package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
- package/dist/assets/useMcp-DoMOIfqT.js +27 -0
- package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
- package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
- package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
- package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
- package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
- package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
- package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
- package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
- package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
- package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
- package/dist/assets/utils-DI7dLldp.js +54 -0
- package/dist/assets/versions.store-B1z2OrLE.js +191 -0
- package/dist/assets/vue-CydWIhxN.js +4378 -0
- package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
- package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
- package/dist/assets/xml-B_oj6Mle.js +2060 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +157 -0
- package/dist/static/base-path.js +1 -0
- package/dist/static/community_package_tooltip_img.png +0 -0
- package/dist/static/data-mapping-gif.gif +0 -0
- package/dist/static/form-grey.svg +1 -0
- package/dist/static/google-auth/disabled.dark.png +0 -0
- package/dist/static/google-auth/disabled.png +0 -0
- package/dist/static/google-auth/focus.dark.png +0 -0
- package/dist/static/google-auth/focus.png +0 -0
- package/dist/static/google-auth/normal.dark.png +0 -0
- package/dist/static/google-auth/normal.png +0 -0
- package/dist/static/google-auth/pressed.dark.png +0 -0
- package/dist/static/google-auth/pressed.png +0 -0
- package/dist/static/n8n-logo.png +0 -0
- package/dist/static/og_image.png +0 -0
- package/dist/static/open-ai.svg +1 -0
- package/dist/static/openChat.png +0 -0
- package/dist/static/posthog.init.js +41 -0
- package/dist/static/prefers-color-scheme.css +5 -0
- package/dist/static/webhook-icon.svg +1 -0
- package/dist/tree-sitter-bash.wasm +0 -0
- package/dist/tree-sitter.wasm +0 -0
- package/eslint.config.mjs +59 -0
- package/index.html +45 -0
- package/index.js +0 -0
- package/package.json +147 -0
- package/postcss.config.cjs +6 -0
- package/scripts/fetch-node-popularity.mjs +102 -0
- package/stylelint.config.mjs +9 -0
- package/tailwind.config.js +8 -0
- package/tsconfig.json +36 -0
- package/vite/i18n-locales-hmr-helpers.ts +19 -0
- package/vite/source-map-js-shim.ts +1 -0
- package/vite/vite-plugin-node-popularity.mts +32 -0
- package/vite.config.mts +304 -0
|
@@ -0,0 +1,1288 @@
|
|
|
1
|
+
import { o as __toESM } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { A as createStaticVNode, C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, Ht as toRefs, It as ref, J as onBeforeUnmount, M as createVNode, P as defineComponent, Pt as reactive, Q as onUnmounted, St as withMemo, T as createBlock, W as mergeProps, Z as onMounted, _ as Fragment, _t as watch, at as renderSlot, bn as normalizeStyle, bt as withCtx, et as openBlock, h as withModifiers, j as createTextVNode, k as createSlots, n as Transition, st as resolveDirective, vn as normalizeClass, w as createBaseVNode, xt as withDirectives, yn as normalizeProps } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
3
|
+
import { et as i18n, n as onClickOutside, rt as useI18n } from "./core-CRbPymLT.js";
|
|
4
|
+
import { Cn as N8nIcon_default, R as N8nInfoTip_default, bn as N8nText_default, ht as N8nTooltip_default, k as N8nNotice_default, mt as N8nLink_default, xn as N8nButton_default, xt as N8nIconButton_default, yn as N8nCallout_default } from "./src-jviYSG25.js";
|
|
5
|
+
import "./en-CF30SCh2.js";
|
|
6
|
+
import "./preload-helper-dyVz7ck7.js";
|
|
7
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
8
|
+
import "./truncate-C0KYt7i3.js";
|
|
9
|
+
import { Bt as getActiveViewCallouts, Er as useUsersStore, Ft as useActionsGenerator, Ht as getHumanInTheLoopActions, Jt as prepareCommunityNodeDetailsViewStack, Lt as filterAndSearchNodes, Pt as useNodeTypesStore, Wt as getRootSearchCallouts, Yt as removePreviewToken, Zt as shouldShowCommunityNodeDetails, _n as useCredentialsStore, aa as useUIStore, en as transformNodeType, k as useTelemetry, qt as isNodePreviewKey, x as useExternalHooks, zt as flattenCreateElements } from "./builder.store-Czk2ipDE.js";
|
|
10
|
+
import "./empty-BuGRxzl4.js";
|
|
11
|
+
import "./get-BcEmeOxn.js";
|
|
12
|
+
import "./sanitize-html-CbW56HUN.js";
|
|
13
|
+
import "./CalendarDate-DgQUMbNo.js";
|
|
14
|
+
import "./path-browserify-RUt2u7iT.js";
|
|
15
|
+
import "./_MapCache-CcdIl4Ae.js";
|
|
16
|
+
import { At as TRIGGER_NODE_CREATOR_VIEW, Bn as OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE, Dt as REQUEST_NODE_FORM_URL, Et as REGULAR_NODE_CREATOR_VIEW, F as CUSTOM_API_CALL_KEY, L as DRAG_EVENT_DATA_KEY, Ta as isCommunityPackageName, Vn as OPEN_AI_NODE_TYPE, bt as HITL_SUBCATEGORY, dt as AI_OTHERS_NODE_CREATOR_VIEW, hr as WEBHOOK_NODE_TYPE, lt as AI_EVALUATION, mn as HTTP_REQUEST_NODE_TYPE, pt as AI_UNCATEGORIZED_CATEGORY, ut as AI_NODE_CREATOR_VIEW, wt as PRE_BUILT_AGENTS_COLLECTION } from "./constants-C8OH4tTq.js";
|
|
17
|
+
import "./merge-DhuTk1HM.js";
|
|
18
|
+
import "./_baseOrderBy-N8Be_6z6.js";
|
|
19
|
+
import "./dateformat-hG8NERse.js";
|
|
20
|
+
import { t as useDebounce } from "./useDebounce-Br5_1ug-.js";
|
|
21
|
+
import "./assistant.store-CNywgN4S.js";
|
|
22
|
+
import { t as useChatPanelStore } from "./chatPanel.store-NDaawEZL.js";
|
|
23
|
+
import { i as SlideTransition_default, n as CategorizedItemsRenderer_default, r as verified_default, t as ItemsRenderer_default } from "./ItemsRenderer-DC8WVyMv.js";
|
|
24
|
+
import "./executions.store-B9uRYwgv.js";
|
|
25
|
+
import "./usePinnedData-BhZkqttf.js";
|
|
26
|
+
import { _ as useCalloutHelpers, d as useViewStacks, f as useKeyboardNavigation, g as TriggerView, h as RegularView, m as AIView, p as AINodesView, t as useNodeCreatorStore, v as require_camelCase } from "./nodeCreator.store-Bpnrwp2l.js";
|
|
27
|
+
import { t as getNodeIconSource } from "./nodeIcon-D6X-ENYt.js";
|
|
28
|
+
import "./useClipboard-DvjhVHqJ.js";
|
|
29
|
+
import "./useCanvasOperations-8ULLtMkY.js";
|
|
30
|
+
import "./folders.store-yAFj-5Vl.js";
|
|
31
|
+
import { t as NodeIcon_default } from "./NodeIcon-B9VW6tX6.js";
|
|
32
|
+
import { t as useBannersStore } from "./banners.store-CGEcBTDn.js";
|
|
33
|
+
import { n as captureException } from "./exports-Crx_gvt_.js";
|
|
34
|
+
import "./semver-Bk6DGseV.js";
|
|
35
|
+
import { a as useInstallNode, i as useInstalledCommunityPackage, n as CommunityNodeFooter_default, r as ContactAdministratorToInstall_default, t as CommunityNodeUpdateInfo_default } from "./CommunityNodeUpdateInfo-C37kca4W.js";
|
|
36
|
+
import { t as useActions } from "./useActions-B1JckIRj.js";
|
|
37
|
+
var _hoisted_1$5 = ["placeholder", "value"];
|
|
38
|
+
var SearchBar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
39
|
+
__name: "SearchBar",
|
|
40
|
+
props: {
|
|
41
|
+
placeholder: { default: "" },
|
|
42
|
+
modelValue: { default: "" }
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue"],
|
|
45
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
46
|
+
const emit = __emit;
|
|
47
|
+
const state = reactive({ inputRef: null });
|
|
48
|
+
const externalHooks = useExternalHooks();
|
|
49
|
+
function focus() {
|
|
50
|
+
state.inputRef?.focus();
|
|
51
|
+
}
|
|
52
|
+
function onInput(event) {
|
|
53
|
+
const input = event.target;
|
|
54
|
+
emit("update:modelValue", input.value.trim());
|
|
55
|
+
}
|
|
56
|
+
function clear$1() {
|
|
57
|
+
emit("update:modelValue", "");
|
|
58
|
+
}
|
|
59
|
+
onMounted(() => {
|
|
60
|
+
externalHooks.run("nodeCreatorSearchBar.mount", { inputRef: state.inputRef });
|
|
61
|
+
setTimeout(focus, 0);
|
|
62
|
+
});
|
|
63
|
+
onBeforeUnmount(() => {
|
|
64
|
+
state.inputRef?.remove();
|
|
65
|
+
});
|
|
66
|
+
const { inputRef } = toRefs(state);
|
|
67
|
+
__expose({ focus });
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock("div", {
|
|
70
|
+
class: normalizeClass(_ctx.$style.searchContainer),
|
|
71
|
+
"data-test-id": "search-bar"
|
|
72
|
+
}, [
|
|
73
|
+
createBaseVNode("div", { class: normalizeClass({
|
|
74
|
+
[_ctx.$style.prefix]: true,
|
|
75
|
+
[_ctx.$style.active]: _ctx.modelValue.length > 0
|
|
76
|
+
}) }, [createVNode(unref(N8nIcon_default), {
|
|
77
|
+
icon: "search",
|
|
78
|
+
size: "small"
|
|
79
|
+
})], 2),
|
|
80
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.text) }, [createBaseVNode("input", {
|
|
81
|
+
ref_key: "inputRef",
|
|
82
|
+
ref: inputRef,
|
|
83
|
+
placeholder: _ctx.placeholder,
|
|
84
|
+
value: _ctx.modelValue,
|
|
85
|
+
class: normalizeClass(_ctx.$style.input),
|
|
86
|
+
autofocus: "",
|
|
87
|
+
"data-test-id": "node-creator-search-bar",
|
|
88
|
+
tabindex: "0",
|
|
89
|
+
onInput
|
|
90
|
+
}, null, 42, _hoisted_1$5)], 2),
|
|
91
|
+
_ctx.modelValue.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: normalizeClass([_ctx.$style.suffix, _ctx.$style.clickable]),
|
|
94
|
+
onClick: clear$1
|
|
95
|
+
}, [createVNode(unref(N8nIcon_default), {
|
|
96
|
+
size: "small",
|
|
97
|
+
icon: "circle-x"
|
|
98
|
+
})], 2)) : createCommentVNode("", true)
|
|
99
|
+
], 2);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
var SearchBar_vue_vue_type_style_index_0_lang_module_default = {
|
|
104
|
+
searchContainer: "_searchContainer_1mhzr_123",
|
|
105
|
+
prefix: "_prefix_1mhzr_139",
|
|
106
|
+
active: "_active_1mhzr_144",
|
|
107
|
+
text: "_text_1mhzr_148",
|
|
108
|
+
suffix: "_suffix_1mhzr_164",
|
|
109
|
+
clear: "_clear_1mhzr_170",
|
|
110
|
+
clickable: "_clickable_1mhzr_183"
|
|
111
|
+
};
|
|
112
|
+
var SearchBar_default = /* @__PURE__ */ __plugin_vue_export_helper_default(SearchBar_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": SearchBar_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
113
|
+
var OrderSwitcher_default = /* @__PURE__ */ defineComponent({
|
|
114
|
+
__name: "OrderSwitcher",
|
|
115
|
+
props: { rootView: {} },
|
|
116
|
+
setup(__props) {
|
|
117
|
+
return (_ctx, _cache) => {
|
|
118
|
+
return openBlock(), createElementBlock("div", null, [_ctx.rootView === unref("Regular") ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "actions"), renderSlot(_ctx.$slots, "triggers")], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [renderSlot(_ctx.$slots, "triggers"), renderSlot(_ctx.$slots, "actions")], 64))]);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
var _hoisted_1$4 = {
|
|
123
|
+
viewBox: "0 0 512 512",
|
|
124
|
+
width: "1.2em",
|
|
125
|
+
height: "1.2em"
|
|
126
|
+
};
|
|
127
|
+
function render(_ctx, _cache) {
|
|
128
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
129
|
+
fill: "currentColor",
|
|
130
|
+
d: "m466.5 83.7l-192-80a48.15 48.15 0 0 0-36.9 0l-192 80C27.7 91.1 16 108.6 16 128c0 198.5 114.5 335.7 221.5 380.3c11.8 4.9 25.1 4.9 36.9 0C360.1 472.6 496 349.3 496 128c0-19.4-11.7-36.9-29.5-44.3M256.1 446.3l-.1-381l175.9 73.3c-3.3 151.4-82.1 261.1-175.8 307.7"
|
|
131
|
+
}, null, -1)]));
|
|
132
|
+
}
|
|
133
|
+
var shield_alt_default = {
|
|
134
|
+
name: "fa-solid-shield-alt",
|
|
135
|
+
render
|
|
136
|
+
};
|
|
137
|
+
var _hoisted_1$3 = { key: 2 };
|
|
138
|
+
var _hoisted_2$2 = { key: 3 };
|
|
139
|
+
var CommunityNodeInfo_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
140
|
+
__name: "CommunityNodeInfo",
|
|
141
|
+
setup(__props) {
|
|
142
|
+
const { activeViewStack } = useViewStacks();
|
|
143
|
+
const { communityNodeDetails } = activeViewStack;
|
|
144
|
+
const publisherName = ref(void 0);
|
|
145
|
+
const downloads = ref(null);
|
|
146
|
+
const verified = ref(false);
|
|
147
|
+
const official = ref(false);
|
|
148
|
+
const { installedPackage, initInstalledPackage, isUpdateCheckAvailable } = useInstalledCommunityPackage(computed(() => communityNodeDetails?.packageName));
|
|
149
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
150
|
+
const isOwner = computed(() => useUsersStore().isInstanceOwner);
|
|
151
|
+
const formatNumber = (number) => {
|
|
152
|
+
if (!number) return null;
|
|
153
|
+
return new Intl.NumberFormat("en-US").format(number);
|
|
154
|
+
};
|
|
155
|
+
async function fetchPackageInfo(packageName) {
|
|
156
|
+
const communityNodeAttributes = await nodeTypesStore.getCommunityNodeAttributes(activeViewStack.communityNodeDetails?.key || "");
|
|
157
|
+
let packageInfo = installedPackage.value;
|
|
158
|
+
if (communityNodeDetails?.installed && !packageInfo) packageInfo = await initInstalledPackage();
|
|
159
|
+
if (communityNodeAttributes) {
|
|
160
|
+
publisherName.value = communityNodeAttributes.companyName ?? communityNodeAttributes.authorName;
|
|
161
|
+
downloads.value = formatNumber(communityNodeAttributes.numberOfDownloads);
|
|
162
|
+
official.value = communityNodeAttributes.isOfficialNode;
|
|
163
|
+
if (!packageInfo) verified.value = true;
|
|
164
|
+
else verified.value = (communityNodeAttributes.nodeVersions?.map((v) => v.npmVersion) ?? []).includes(packageInfo.installedVersion);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const url = `https://registry.npmjs.org/${packageName}`;
|
|
168
|
+
try {
|
|
169
|
+
const response = await fetch(url);
|
|
170
|
+
if (!response.ok) {
|
|
171
|
+
captureException(/* @__PURE__ */ new Error("Could not get metadata for package"), { extra: { packageName } });
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
publisherName.value = (await response.json()).maintainers?.[0]?.name;
|
|
175
|
+
const downloadsUrl = `https://api.npmjs.org/downloads/range/2022-01-01:${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}/${packageName}`;
|
|
176
|
+
const downloadsResponse = await fetch(downloadsUrl);
|
|
177
|
+
if (!downloadsResponse.ok) {
|
|
178
|
+
captureException(/* @__PURE__ */ new Error("Could not get downloads for package"), { extra: { packageName } });
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const downloadsData = await downloadsResponse.json();
|
|
182
|
+
if (!downloadsData.downloads?.length) return;
|
|
183
|
+
downloads.value = formatNumber(downloadsData.downloads.reduce((sum, day) => sum + day.downloads, 0));
|
|
184
|
+
} catch (error) {
|
|
185
|
+
captureException(error, { extra: { packageName } });
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
onMounted(async () => {
|
|
189
|
+
if (communityNodeDetails?.packageName) await fetchPackageInfo(communityNodeDetails.packageName);
|
|
190
|
+
});
|
|
191
|
+
return (_ctx, _cache) => {
|
|
192
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.$style.container) }, [
|
|
193
|
+
createVNode(unref(N8nText_default), {
|
|
194
|
+
class: normalizeClass(_ctx.$style.description),
|
|
195
|
+
color: "text-base",
|
|
196
|
+
size: "medium"
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(communityNodeDetails)?.description), 1)]),
|
|
199
|
+
_: 1
|
|
200
|
+
}, 8, ["class"]),
|
|
201
|
+
unref(isUpdateCheckAvailable) && unref(installedPackage)?.updateAvailable ? (openBlock(), createBlock(CommunityNodeUpdateInfo_default, {
|
|
202
|
+
key: 0,
|
|
203
|
+
"data-test-id": "update-available",
|
|
204
|
+
"package-name": unref(communityNodeDetails)?.packageName,
|
|
205
|
+
source: "node creator panel"
|
|
206
|
+
}, null, 8, ["package-name"])) : (openBlock(), createElementBlock("div", {
|
|
207
|
+
key: 1,
|
|
208
|
+
class: normalizeClass(_ctx.$style.separator)
|
|
209
|
+
}, null, 2)),
|
|
210
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.info) }, [
|
|
211
|
+
verified.value ? (openBlock(), createBlock(unref(N8nTooltip_default), {
|
|
212
|
+
key: 0,
|
|
213
|
+
placement: "top"
|
|
214
|
+
}, {
|
|
215
|
+
content: withCtx(() => [createTextVNode(toDisplayString(official.value ? unref(i18n).baseText("communityNodeInfo.officialApproved") : unref(i18n).baseText("communityNodeInfo.approved")), 1)]),
|
|
216
|
+
default: withCtx(() => [createBaseVNode("div", null, [createVNode(unref(shield_alt_default), { class: normalizeClass(_ctx.$style.tooltipIcon) }, null, 8, ["class"]), createVNode(unref(N8nText_default), {
|
|
217
|
+
color: "text-light",
|
|
218
|
+
size: "xsmall",
|
|
219
|
+
bold: "",
|
|
220
|
+
"data-test-id": "verified-tag"
|
|
221
|
+
}, {
|
|
222
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.approved.label")), 1)]),
|
|
223
|
+
_: 1
|
|
224
|
+
})])]),
|
|
225
|
+
_: 1
|
|
226
|
+
})) : (openBlock(), createBlock(unref(N8nTooltip_default), {
|
|
227
|
+
key: 1,
|
|
228
|
+
placement: "top"
|
|
229
|
+
}, {
|
|
230
|
+
content: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified")), 1)]),
|
|
231
|
+
default: withCtx(() => [createBaseVNode("div", null, [createVNode(unref(N8nIcon_default), {
|
|
232
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
233
|
+
icon: "box"
|
|
234
|
+
}, null, 8, ["class"]), createVNode(unref(N8nText_default), {
|
|
235
|
+
color: "text-light",
|
|
236
|
+
size: "xsmall",
|
|
237
|
+
bold: ""
|
|
238
|
+
}, {
|
|
239
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified.label")), 1)]),
|
|
240
|
+
_: 1
|
|
241
|
+
})])]),
|
|
242
|
+
_: 1
|
|
243
|
+
})),
|
|
244
|
+
downloads.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createVNode(unref(N8nIcon_default), {
|
|
245
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
246
|
+
icon: "hard-drive-download"
|
|
247
|
+
}, null, 8, ["class"]), createVNode(unref(N8nText_default), {
|
|
248
|
+
color: "text-light",
|
|
249
|
+
size: "xsmall",
|
|
250
|
+
bold: "",
|
|
251
|
+
"data-test-id": "number-of-downloads"
|
|
252
|
+
}, {
|
|
253
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.downloads", { interpolate: { downloads: downloads.value } })), 1)]),
|
|
254
|
+
_: 1
|
|
255
|
+
})])) : createCommentVNode("", true),
|
|
256
|
+
publisherName.value ? (openBlock(), createElementBlock("div", _hoisted_2$2, [createVNode(unref(N8nIcon_default), {
|
|
257
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
258
|
+
icon: "user"
|
|
259
|
+
}, null, 8, ["class"]), createVNode(unref(N8nText_default), {
|
|
260
|
+
color: "text-light",
|
|
261
|
+
size: "xsmall",
|
|
262
|
+
bold: "",
|
|
263
|
+
"data-test-id": "publisher-name"
|
|
264
|
+
}, {
|
|
265
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.publishedBy", { interpolate: { publisherName: publisherName.value } })), 1)]),
|
|
266
|
+
_: 1
|
|
267
|
+
})])) : createCommentVNode("", true)
|
|
268
|
+
], 2),
|
|
269
|
+
!isOwner.value && !unref(communityNodeDetails)?.installed ? (openBlock(), createBlock(ContactAdministratorToInstall_default, { key: 2 })) : createCommentVNode("", true)
|
|
270
|
+
], 2);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
var CommunityNodeInfo_vue_vue_type_style_index_0_lang_module_default = {
|
|
275
|
+
container: "_container_169ak_123",
|
|
276
|
+
nodeIcon: "_nodeIcon_169ak_132",
|
|
277
|
+
description: "_description_169ak_137",
|
|
278
|
+
separator: "_separator_169ak_141",
|
|
279
|
+
info: "_info_169ak_147",
|
|
280
|
+
tooltipIcon: "_tooltipIcon_169ak_162",
|
|
281
|
+
contactOwnerHint: "_contactOwnerHint_169ak_168"
|
|
282
|
+
};
|
|
283
|
+
var CommunityNodeInfo_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CommunityNodeInfo_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CommunityNodeInfo_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
284
|
+
var ActionsMode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
285
|
+
__name: "ActionsMode",
|
|
286
|
+
emits: ["nodeTypeSelected"],
|
|
287
|
+
setup(__props, { emit: __emit }) {
|
|
288
|
+
const emit = __emit;
|
|
289
|
+
const telemetry = useTelemetry();
|
|
290
|
+
const i18n$1 = useI18n();
|
|
291
|
+
const { userActivated, isInstanceOwner } = useUsersStore();
|
|
292
|
+
const { popViewStack, updateCurrentViewStack } = useViewStacks();
|
|
293
|
+
const { registerKeyHook } = useKeyboardNavigation();
|
|
294
|
+
const { setAddedNodeActionParameters, getActionData, actionDataToNodeTypeSelectedPayload, getPlaceholderTriggerActions, parseCategoryActions, actionsCategoryLocales } = useActions();
|
|
295
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
296
|
+
const calloutHelpers = useCalloutHelpers();
|
|
297
|
+
const parsedTriggerActions = computed(() => parseActions(actions.value, actionsCategoryLocales.value.triggers, false));
|
|
298
|
+
const parsedActionActions = computed(() => parseActions(actions.value, actionsCategoryLocales.value.actions, !search.value));
|
|
299
|
+
const parsedTriggerActionsBaseline = computed(() => parseActions(useViewStacks().activeViewStack.baselineItems || [], actionsCategoryLocales.value.triggers, false));
|
|
300
|
+
const parsedActionActionsBaseline = computed(() => parseActions(useViewStacks().activeViewStack.baselineItems || [], actionsCategoryLocales.value.actions, !search.value));
|
|
301
|
+
const triggerCategoryName = computed(() => parsedTriggerActions.value.length || search.value ? actionsCategoryLocales.value.triggers : `${actionsCategoryLocales.value.triggers} (${placeholderTriggerActions.length})`);
|
|
302
|
+
const actions = computed(() => {
|
|
303
|
+
return (useViewStacks().activeViewStack.items || []).filter((p) => p.properties.actionKey !== CUSTOM_API_CALL_KEY);
|
|
304
|
+
});
|
|
305
|
+
const search = computed(() => useViewStacks().activeViewStack.search);
|
|
306
|
+
const subcategory = computed(() => useViewStacks().activeViewStack.subcategory);
|
|
307
|
+
const rootView = computed(() => useViewStacks().activeViewStack.rootView);
|
|
308
|
+
const communityNodeDetails = computed(() => useViewStacks().activeViewStack?.communityNodeDetails);
|
|
309
|
+
const placeholderTriggerActions = getPlaceholderTriggerActions(subcategory.value || "");
|
|
310
|
+
const hasNoTriggerActions = computed(() => parseCategoryActions(useViewStacks().activeViewStack.baselineItems || [], actionsCategoryLocales.value.triggers, !search.value).length === 0);
|
|
311
|
+
const containsAPIAction = computed(() => {
|
|
312
|
+
return (useViewStacks().activeViewStack.baselineItems || []).some((p) => {
|
|
313
|
+
return (p.properties.actionKey ?? "") === CUSTOM_API_CALL_KEY;
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
const isTriggerRootView = computed(() => rootView.value === TRIGGER_NODE_CREATOR_VIEW);
|
|
317
|
+
const shouldShowTriggers = computed(() => {
|
|
318
|
+
if (communityNodeDetails.value && !parsedTriggerActions.value.length) return !isNodePreviewKey(useViewStacks().activeViewStack?.items?.[0].key) && isTriggerRootView.value;
|
|
319
|
+
return isTriggerRootView.value || parsedTriggerActionsBaseline.value.length !== 0;
|
|
320
|
+
});
|
|
321
|
+
registerKeyHook("ActionsKeyRight", {
|
|
322
|
+
keyboardKeys: ["ArrowRight", "Enter"],
|
|
323
|
+
condition: (type) => type === "action",
|
|
324
|
+
handler: onKeySelect
|
|
325
|
+
});
|
|
326
|
+
registerKeyHook("ActionsKeyLeft", {
|
|
327
|
+
keyboardKeys: ["ArrowLeft"],
|
|
328
|
+
condition: (type) => type === "action",
|
|
329
|
+
handler: arrowLeft
|
|
330
|
+
});
|
|
331
|
+
function parseActions(base, locale, withLabels = false) {
|
|
332
|
+
return parseCategoryActions(base, locale, withLabels);
|
|
333
|
+
}
|
|
334
|
+
function arrowLeft() {
|
|
335
|
+
popViewStack();
|
|
336
|
+
}
|
|
337
|
+
function onKeySelect(activeItemId) {
|
|
338
|
+
const activeAction = [...actions.value, ...placeholderTriggerActions].find((a) => a.uuid === activeItemId);
|
|
339
|
+
if (activeAction) onSelected(activeAction);
|
|
340
|
+
}
|
|
341
|
+
function onSelected(actionCreateElement) {
|
|
342
|
+
if (actionCreateElement.type === "openTemplate") calloutHelpers.openSampleWorkflowTemplate(actionCreateElement.properties.templateId, { telemetry: {
|
|
343
|
+
source: "nodeCreator",
|
|
344
|
+
section: useViewStacks().activeViewStack.title
|
|
345
|
+
} });
|
|
346
|
+
if (actionCreateElement.type !== "action") return;
|
|
347
|
+
const actionData = getActionData(actionCreateElement.properties);
|
|
348
|
+
if (placeholderTriggerActions.some((p) => p.key === actionCreateElement.key) && isTriggerRootView.value) {
|
|
349
|
+
const actionNode = actions.value[0]?.key;
|
|
350
|
+
if (actionNode) emit("nodeTypeSelected", [{ type: actionData.key }, { type: actionNode }]);
|
|
351
|
+
} else if (actionData?.key === "@n8n/n8n-nodes-langchain.openAi" && (actionData?.value)?.resource === "assistant" && (actionData?.value)?.operation === "message") emit("nodeTypeSelected", [{ type: OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE }]);
|
|
352
|
+
else if (isNodePreviewKey(actionData?.key)) return;
|
|
353
|
+
else emit("nodeTypeSelected", [actionDataToNodeTypeSelectedPayload(actionData)]);
|
|
354
|
+
if (telemetry) setAddedNodeActionParameters(actionData, telemetry, rootView.value);
|
|
355
|
+
}
|
|
356
|
+
function trackActionsView() {
|
|
357
|
+
const activeViewStack = useViewStacks().activeViewStack;
|
|
358
|
+
const trigger_action_count = (activeViewStack.baselineItems || [])?.filter((action$1) => action$1.key.toLowerCase().includes("trigger")).length;
|
|
359
|
+
const trackingPayload = {
|
|
360
|
+
app_identifier: [...actions.value, ...placeholderTriggerActions][0].key,
|
|
361
|
+
actions: (activeViewStack.baselineItems || [])?.map((action$1) => action$1.properties.displayName),
|
|
362
|
+
regular_action_count: (activeViewStack.baselineItems || [])?.length - trigger_action_count,
|
|
363
|
+
trigger_action_count
|
|
364
|
+
};
|
|
365
|
+
useExternalHooks().run("nodeCreateList.onViewActions", trackingPayload);
|
|
366
|
+
nodeCreatorStore.onViewActions(trackingPayload);
|
|
367
|
+
}
|
|
368
|
+
function resetSearch$1() {
|
|
369
|
+
updateCurrentViewStack({ search: "" });
|
|
370
|
+
}
|
|
371
|
+
function addHttpNode() {
|
|
372
|
+
const updateData = {
|
|
373
|
+
name: "",
|
|
374
|
+
key: HTTP_REQUEST_NODE_TYPE,
|
|
375
|
+
value: { authentication: "predefinedCredentialType" }
|
|
376
|
+
};
|
|
377
|
+
emit("nodeTypeSelected", [{ type: HTTP_REQUEST_NODE_TYPE }]);
|
|
378
|
+
if (telemetry) setAddedNodeActionParameters(updateData);
|
|
379
|
+
const app_identifier = actions.value[0]?.key;
|
|
380
|
+
if (!app_identifier) return;
|
|
381
|
+
useExternalHooks().run("nodeCreateList.onActionsCustmAPIClicked", { app_identifier });
|
|
382
|
+
nodeCreatorStore.onActionsCustomAPIClicked({ app_identifier });
|
|
383
|
+
}
|
|
384
|
+
onMounted(() => {
|
|
385
|
+
trackActionsView();
|
|
386
|
+
});
|
|
387
|
+
const callouts = computed(() => getActiveViewCallouts(useViewStacks().activeViewStack.title, calloutHelpers.isPreBuiltAgentsCalloutVisible.value, calloutHelpers.getPreBuiltAgentNodeCreatorItems()));
|
|
388
|
+
return (_ctx, _cache) => {
|
|
389
|
+
const _directive_n8n_html = resolveDirective("n8n-html");
|
|
390
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass({
|
|
391
|
+
[_ctx.$style.container]: true,
|
|
392
|
+
[_ctx.$style.containerPaddingBottom]: !communityNodeDetails.value
|
|
393
|
+
}) }, [
|
|
394
|
+
createVNode(ItemsRenderer_default, {
|
|
395
|
+
elements: callouts.value,
|
|
396
|
+
class: normalizeClass(_ctx.$style.items),
|
|
397
|
+
onSelected
|
|
398
|
+
}, null, 8, ["elements", "class"]),
|
|
399
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeInfo_default, { key: 0 })) : createCommentVNode("", true),
|
|
400
|
+
rootView.value ? (openBlock(), createBlock(OrderSwitcher_default, {
|
|
401
|
+
key: 1,
|
|
402
|
+
"root-view": rootView.value
|
|
403
|
+
}, createSlots({ _: 2 }, [shouldShowTriggers.value ? {
|
|
404
|
+
name: "triggers",
|
|
405
|
+
fn: withCtx(() => [withMemo([search.value], () => createVNode(CategorizedItemsRenderer_default, {
|
|
406
|
+
elements: parsedTriggerActions.value,
|
|
407
|
+
category: triggerCategoryName.value,
|
|
408
|
+
"mouse-over-tooltip": unref(i18n$1).baseText("nodeCreator.actionsTooltip.triggersStartWorkflow"),
|
|
409
|
+
"is-trigger-category": "",
|
|
410
|
+
expanded: isTriggerRootView.value || parsedActionActions.value.length === 0,
|
|
411
|
+
onSelected
|
|
412
|
+
}, createSlots({ _: 2 }, [hasNoTriggerActions.value ? {
|
|
413
|
+
name: "empty",
|
|
414
|
+
fn: withCtx(() => [hasNoTriggerActions.value ? (openBlock(), createBlock(unref(N8nCallout_default), {
|
|
415
|
+
key: 0,
|
|
416
|
+
theme: "info",
|
|
417
|
+
iconless: "",
|
|
418
|
+
slim: "",
|
|
419
|
+
"data-test-id": "actions-panel-no-triggers-callout"
|
|
420
|
+
}, {
|
|
421
|
+
default: withCtx(() => [withDirectives(createBaseVNode("span", null, null, 512), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsCallout.noTriggerItems", { interpolate: { nodeName: subcategory.value ?? "" } })]])]),
|
|
422
|
+
_: 1
|
|
423
|
+
})) : createCommentVNode("", true), createVNode(ItemsRenderer_default, {
|
|
424
|
+
elements: unref(placeholderTriggerActions),
|
|
425
|
+
onSelected
|
|
426
|
+
}, null, 8, ["elements"])]),
|
|
427
|
+
key: "0"
|
|
428
|
+
} : {
|
|
429
|
+
name: "empty",
|
|
430
|
+
fn: withCtx(() => [withDirectives(createBaseVNode("p", {
|
|
431
|
+
class: normalizeClass(_ctx.$style.resetSearch),
|
|
432
|
+
onClick: resetSearch$1
|
|
433
|
+
}, null, 2), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsCategory.noMatchingTriggers")]])]),
|
|
434
|
+
key: "1"
|
|
435
|
+
}]), 1032, [
|
|
436
|
+
"elements",
|
|
437
|
+
"category",
|
|
438
|
+
"mouse-over-tooltip",
|
|
439
|
+
"expanded"
|
|
440
|
+
]), _cache, 0)]),
|
|
441
|
+
key: "0"
|
|
442
|
+
} : void 0, !isTriggerRootView.value || parsedActionActionsBaseline.value.length !== 0 ? {
|
|
443
|
+
name: "actions",
|
|
444
|
+
fn: withCtx(() => [withMemo([search.value], () => createVNode(CategorizedItemsRenderer_default, {
|
|
445
|
+
elements: parsedActionActions.value,
|
|
446
|
+
category: unref(actionsCategoryLocales).actions,
|
|
447
|
+
"mouse-over-tooltip": unref(i18n$1).baseText("nodeCreator.actionsTooltip.actionsPerformStep"),
|
|
448
|
+
expanded: !isTriggerRootView.value || parsedTriggerActions.value.length === 0,
|
|
449
|
+
onSelected
|
|
450
|
+
}, {
|
|
451
|
+
empty: withCtx(() => [!search.value ? (openBlock(), createBlock(unref(N8nInfoTip_default), {
|
|
452
|
+
key: 0,
|
|
453
|
+
theme: "info",
|
|
454
|
+
type: "note",
|
|
455
|
+
class: normalizeClass(_ctx.$style.actionsEmpty)
|
|
456
|
+
}, {
|
|
457
|
+
default: withCtx(() => [withDirectives(createBaseVNode("span", null, null, 512), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsCallout.noActionItems", { interpolate: { nodeName: subcategory.value ?? "" } })]])]),
|
|
458
|
+
_: 1
|
|
459
|
+
}, 8, ["class"])) : withDirectives((openBlock(), createElementBlock("p", {
|
|
460
|
+
key: 1,
|
|
461
|
+
class: normalizeClass(_ctx.$style.resetSearch),
|
|
462
|
+
"data-test-id": "actions-panel-no-matching-actions",
|
|
463
|
+
onClick: resetSearch$1
|
|
464
|
+
}, null, 2)), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsCategory.noMatchingActions")]])]),
|
|
465
|
+
default: withCtx(() => [!unref(userActivated) && isTriggerRootView.value ? (openBlock(), createBlock(unref(N8nCallout_default), {
|
|
466
|
+
key: 0,
|
|
467
|
+
theme: "info",
|
|
468
|
+
iconless: "",
|
|
469
|
+
slim: "",
|
|
470
|
+
"data-test-id": "actions-panel-activation-callout"
|
|
471
|
+
}, {
|
|
472
|
+
default: withCtx(() => [withDirectives(createBaseVNode("span", null, null, 512), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsCallout.triggersStartWorkflow")]])]),
|
|
473
|
+
_: 1
|
|
474
|
+
})) : createCommentVNode("", true)]),
|
|
475
|
+
_: 1
|
|
476
|
+
}, 8, [
|
|
477
|
+
"elements",
|
|
478
|
+
"category",
|
|
479
|
+
"mouse-over-tooltip",
|
|
480
|
+
"expanded"
|
|
481
|
+
]), _cache, 1)]),
|
|
482
|
+
key: "1"
|
|
483
|
+
} : void 0]), 1032, ["root-view"])) : createCommentVNode("", true),
|
|
484
|
+
containsAPIAction.value && !communityNodeDetails.value ? (openBlock(), createElementBlock("div", {
|
|
485
|
+
key: 2,
|
|
486
|
+
class: normalizeClass(_ctx.$style.apiHint)
|
|
487
|
+
}, [withDirectives(createBaseVNode("span", { onClick: withModifiers(addHttpNode, ["prevent"]) }, null, 512), [[_directive_n8n_html, unref(i18n$1).baseText("nodeCreator.actionsList.apiCall", { interpolate: { node: subcategory.value ?? "" } })]])], 2)) : createCommentVNode("", true),
|
|
488
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeFooter_default, {
|
|
489
|
+
key: 3,
|
|
490
|
+
class: normalizeClass(_ctx.$style.communityNodeFooter),
|
|
491
|
+
"package-name": communityNodeDetails.value.packageName,
|
|
492
|
+
"show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
|
|
493
|
+
}, null, 8, [
|
|
494
|
+
"class",
|
|
495
|
+
"package-name",
|
|
496
|
+
"show-manage"
|
|
497
|
+
])) : createCommentVNode("", true)
|
|
498
|
+
], 2);
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
var ActionsMode_vue_vue_type_style_index_0_lang_module_default = {
|
|
503
|
+
container: "_container_12w99_123",
|
|
504
|
+
containerPaddingBottom: "_containerPaddingBottom_12w99_129",
|
|
505
|
+
communityNodeFooter: "_communityNodeFooter_12w99_133",
|
|
506
|
+
resetSearch: "_resetSearch_12w99_137",
|
|
507
|
+
actionsEmpty: "_actionsEmpty_12w99_151",
|
|
508
|
+
apiHint: "_apiHint_12w99_159"
|
|
509
|
+
};
|
|
510
|
+
var ActionsMode_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ActionsMode_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ActionsMode_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
511
|
+
var import_camelCase = /* @__PURE__ */ __toESM(require_camelCase());
|
|
512
|
+
var _sfc_main = {};
|
|
513
|
+
var _hoisted_1$2 = {
|
|
514
|
+
width: "75px",
|
|
515
|
+
height: "75px",
|
|
516
|
+
viewBox: "0 0 75 75",
|
|
517
|
+
version: "1.1",
|
|
518
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
519
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
520
|
+
};
|
|
521
|
+
function _sfc_render(_ctx, _cache) {
|
|
522
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [createStaticVNode("<title>no-nodes-keyart</title><g id=\"Nodes-panel-prototype-V2.1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"nodes-panel-(component)\" transform=\"translate(-2085.000000, -352.000000)\"><g id=\"nodes_panel\" transform=\"translate(1880.000000, 151.000000)\"><g id=\"Panel\" transform=\"translate(50.000000, 0.000000)\"><g id=\"Group-3\" transform=\"translate(105.000000, 171.000000)\"><g id=\"no-nodes-keyart\" transform=\"translate(50.000000, 30.000000)\"><rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"75\" height=\"75\"></rect><g id=\"Group\" transform=\"translate(6.562500, 8.164062)\" fill=\"#C4C8D1\" fill-rule=\"nonzero\"><polygon id=\"Rectangle\" transform=\"translate(49.192016, 45.302553) rotate(-45.000000) translate(-49.192016, -45.302553) \" points=\"44.5045606 32.0526802 53.8794707 32.0526802 53.8794707 58.5524261 44.5045606 58.5524261\"></polygon><path id=\"Path\" d=\"M48.125,23.0859375 C54.15625,23.0859375 59.0625,18.1796875 59.0625,12.1484375 C59.0625,10.3359375 58.5625,8.6484375 57.78125,7.1484375 L49.34375,15.5859375 L44.6875,10.9296875 L53.125,2.4921875 C51.625,1.7109375 49.9375,1.2109375 48.125,1.2109375 C42.09375,1.2109375 37.1875,6.1171875 37.1875,12.1484375 C37.1875,13.4296875 37.4375,14.6484375 37.84375,15.7734375 L32.0625,21.5546875 L26.5,15.9921875 L28.71875,13.7734375 L24.3125,9.3671875 L30.9375,2.7421875 C27.28125,-0.9140625 21.34375,-0.9140625 17.6875,2.7421875 L6.625,13.8046875 L11.03125,18.2109375 L2.21875,18.2109375 L1.38777878e-15,20.4296875 L11.0625,31.4921875 L13.28125,29.2734375 L13.28125,20.4296875 L17.6875,24.8359375 L19.90625,22.6171875 L25.46875,28.1796875 L2.3125,51.3359375 L8.9375,57.9609375 L44.5,22.4296875 C45.625,22.8359375 46.84375,23.0859375 48.125,23.0859375 Z\"></path></g></g></g></g></g></g></g>", 2)]));
|
|
523
|
+
}
|
|
524
|
+
var NoResultsIcon_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
525
|
+
var _hoisted_1$1 = ["textContent"];
|
|
526
|
+
var _hoisted_2$1 = ["textContent"];
|
|
527
|
+
var NoResults_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
528
|
+
__name: "NoResults",
|
|
529
|
+
props: {
|
|
530
|
+
showIcon: { type: Boolean },
|
|
531
|
+
showRequest: { type: Boolean },
|
|
532
|
+
rootView: {}
|
|
533
|
+
},
|
|
534
|
+
setup(__props) {
|
|
535
|
+
const i18n$1 = useI18n();
|
|
536
|
+
return (_ctx, _cache) => {
|
|
537
|
+
return openBlock(), createElementBlock("div", {
|
|
538
|
+
class: normalizeClass({
|
|
539
|
+
[_ctx.$style.noResults]: true,
|
|
540
|
+
[_ctx.$style.iconless]: !_ctx.showIcon
|
|
541
|
+
}),
|
|
542
|
+
"data-test-id": "node-creator-no-results"
|
|
543
|
+
}, [
|
|
544
|
+
_ctx.showIcon ? (openBlock(), createElementBlock("div", {
|
|
545
|
+
key: 0,
|
|
546
|
+
class: normalizeClass(_ctx.$style.icon)
|
|
547
|
+
}, [createVNode(NoResultsIcon_default)], 2)) : createCommentVNode("", true),
|
|
548
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.title) }, [
|
|
549
|
+
renderSlot(_ctx.$slots, "title"),
|
|
550
|
+
createBaseVNode("p", { textContent: toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.weDidntMakeThatYet")) }, null, 8, _hoisted_1$1),
|
|
551
|
+
_ctx.rootView === unref("Regular") || _ctx.rootView === unref("Trigger") ? (openBlock(), createElementBlock("div", {
|
|
552
|
+
key: 0,
|
|
553
|
+
class: normalizeClass(_ctx.$style.action)
|
|
554
|
+
}, [
|
|
555
|
+
createTextVNode(toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe")) + " ", 1),
|
|
556
|
+
_ctx.rootView === unref("Regular") ? (openBlock(), createBlock(unref(N8nLink_default), {
|
|
557
|
+
key: 0,
|
|
558
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("addHttpNode"))
|
|
559
|
+
}, {
|
|
560
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.httpRequest")), 1)]),
|
|
561
|
+
_: 1
|
|
562
|
+
})) : createCommentVNode("", true),
|
|
563
|
+
_ctx.rootView === unref("Trigger") ? (openBlock(), createBlock(unref(N8nLink_default), {
|
|
564
|
+
key: 1,
|
|
565
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("addWebhookNode"))
|
|
566
|
+
}, {
|
|
567
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.webhook")), 1)]),
|
|
568
|
+
_: 1
|
|
569
|
+
})) : createCommentVNode("", true),
|
|
570
|
+
createTextVNode(" " + toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.node")), 1)
|
|
571
|
+
], 2)) : createCommentVNode("", true)
|
|
572
|
+
], 2),
|
|
573
|
+
_ctx.showRequest ? (openBlock(), createElementBlock("div", {
|
|
574
|
+
key: 1,
|
|
575
|
+
class: normalizeClass(_ctx.$style.request)
|
|
576
|
+
}, [createBaseVNode("p", { textContent: toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.wantUsToMakeItFaster")) }, null, 8, _hoisted_2$1), createBaseVNode("div", null, [createVNode(unref(N8nLink_default), { to: unref(REQUEST_NODE_FORM_URL) }, {
|
|
577
|
+
default: withCtx(() => [
|
|
578
|
+
createBaseVNode("span", null, toDisplayString(unref(i18n$1).baseText("nodeCreator.noResults.requestTheNode")), 1),
|
|
579
|
+
_cache[2] || (_cache[2] = createTextVNode("\xA0 ")),
|
|
580
|
+
createBaseVNode("span", null, [createVNode(unref(N8nIcon_default), {
|
|
581
|
+
class: normalizeClass(_ctx.$style.external),
|
|
582
|
+
icon: "external-link",
|
|
583
|
+
title: unref(i18n$1).baseText("nodeCreator.noResults.requestTheNode")
|
|
584
|
+
}, null, 8, ["class", "title"])])
|
|
585
|
+
]),
|
|
586
|
+
_: 1
|
|
587
|
+
}, 8, ["to"])])], 2)) : createCommentVNode("", true)
|
|
588
|
+
], 2);
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
var NoResults_vue_vue_type_style_index_0_lang_module_default = {
|
|
593
|
+
noResults: "_noResults_1w8hr_123",
|
|
594
|
+
title: "_title_1w8hr_136",
|
|
595
|
+
action: "_action_1w8hr_145",
|
|
596
|
+
request: "_request_1w8hr_146",
|
|
597
|
+
icon: "_icon_1w8hr_162",
|
|
598
|
+
external: "_external_1w8hr_168"
|
|
599
|
+
};
|
|
600
|
+
var NoResults_default = /* @__PURE__ */ __plugin_vue_export_helper_default(NoResults_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": NoResults_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
601
|
+
var NodesMode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
602
|
+
__name: "NodesMode",
|
|
603
|
+
emits: ["nodeTypeSelected"],
|
|
604
|
+
setup(__props, { emit: __emit }) {
|
|
605
|
+
const emit = __emit;
|
|
606
|
+
const i18n$1 = useI18n();
|
|
607
|
+
const calloutHelpers = useCalloutHelpers();
|
|
608
|
+
const { mergedNodes, actions, onSubcategorySelected } = useNodeCreatorStore();
|
|
609
|
+
const { pushViewStack, popViewStack, isAiSubcategoryView } = useViewStacks();
|
|
610
|
+
const { setAddedNodeActionParameters, nodeCreateElementToNodeTypeSelectedPayload } = useActions();
|
|
611
|
+
const { registerKeyHook } = useKeyboardNavigation();
|
|
612
|
+
const activeViewStack = computed(() => useViewStacks().activeViewStack);
|
|
613
|
+
const globalSearchItemsDiff = computed(() => useViewStacks().globalSearchItemsDiff);
|
|
614
|
+
const communityNodesAndActions = computed(() => useNodeTypesStore().communityNodesAndActions);
|
|
615
|
+
const moreFromCommunity = computed(() => {
|
|
616
|
+
return filterAndSearchNodes(communityNodesAndActions.value.mergedNodes, activeViewStack.value.search ?? "", isAiSubcategoryView(activeViewStack.value));
|
|
617
|
+
});
|
|
618
|
+
const isSearchResultEmpty = computed(() => {
|
|
619
|
+
return (activeViewStack.value.items || []).length === 0 && globalCallouts.value.length + globalSearchItemsDiff.value.length + moreFromCommunity.value.length === 0;
|
|
620
|
+
});
|
|
621
|
+
function getFilteredActions(node, actions$1) {
|
|
622
|
+
const nodeActions = actions$1?.[node.key] || [];
|
|
623
|
+
if (activeViewStack.value.subcategory === "Human in the Loop") return getHumanInTheLoopActions(nodeActions);
|
|
624
|
+
if (activeViewStack.value.actionsFilter) return activeViewStack.value.actionsFilter(nodeActions);
|
|
625
|
+
return nodeActions;
|
|
626
|
+
}
|
|
627
|
+
function onSelected(item) {
|
|
628
|
+
if (item.key === "pre-built-agents-collection") {
|
|
629
|
+
calloutHelpers.openPreBuiltAgentsCollection({
|
|
630
|
+
telemetry: {
|
|
631
|
+
source: "nodeCreator",
|
|
632
|
+
section: activeViewStack.value.title
|
|
633
|
+
},
|
|
634
|
+
resetStacks: false
|
|
635
|
+
});
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
if (item.type === "subcategory") {
|
|
639
|
+
const subcategoryKey = (0, import_camelCase.default)(item.properties.title);
|
|
640
|
+
const title$3 = i18n$1.baseText(`nodeCreator.subcategoryNames.${subcategoryKey}`);
|
|
641
|
+
const infoKey = `nodeCreator.subcategoryInfos.${subcategoryKey}`;
|
|
642
|
+
const info$2 = i18n$1.baseText(infoKey);
|
|
643
|
+
const extendedInfo = info$2 !== infoKey ? { info: info$2 } : {};
|
|
644
|
+
const nodeIcon$3 = item.properties.icon ? {
|
|
645
|
+
type: "icon",
|
|
646
|
+
name: item.properties.icon
|
|
647
|
+
} : void 0;
|
|
648
|
+
pushViewStack({
|
|
649
|
+
subcategory: item.key,
|
|
650
|
+
mode: "nodes",
|
|
651
|
+
title: title$3,
|
|
652
|
+
nodeIcon: nodeIcon$3,
|
|
653
|
+
...extendedInfo,
|
|
654
|
+
...item.properties.panelClass ? { panelClass: item.properties.panelClass } : {},
|
|
655
|
+
rootView: activeViewStack.value.rootView,
|
|
656
|
+
forceIncludeNodes: item.properties.forceIncludeNodes,
|
|
657
|
+
baseFilter: baseSubcategoriesFilter,
|
|
658
|
+
itemsMapper: subcategoriesMapper,
|
|
659
|
+
sections: item.properties.sections
|
|
660
|
+
});
|
|
661
|
+
onSubcategorySelected({ subcategory: item.key });
|
|
662
|
+
}
|
|
663
|
+
if (item.type === "node") {
|
|
664
|
+
let nodeActions = getFilteredActions(item, actions);
|
|
665
|
+
if (shouldShowCommunityNodeDetails(isCommunityPackageName(item.key), activeViewStack.value)) {
|
|
666
|
+
if (!nodeActions.length) nodeActions = getFilteredActions(item, communityNodesAndActions.value.actions);
|
|
667
|
+
pushViewStack(prepareCommunityNodeDetailsViewStack(item, getNodeIconSource(item.properties), activeViewStack.value.rootView, nodeActions));
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
const payload = nodeCreateElementToNodeTypeSelectedPayload(item);
|
|
671
|
+
if (nodeActions.length === 1) {
|
|
672
|
+
emit("nodeTypeSelected", [payload]);
|
|
673
|
+
setAddedNodeActionParameters({
|
|
674
|
+
name: nodeActions[0].defaults.name ?? item.properties.displayName,
|
|
675
|
+
key: item.key,
|
|
676
|
+
value: nodeActions[0].values
|
|
677
|
+
});
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
if (nodeActions.length === 0 || activeViewStack.value.hideActions) {
|
|
681
|
+
emit("nodeTypeSelected", [payload]);
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
const transformedActions = nodeActions?.map((a) => transformNodeType(a, item.properties.displayName, "action"));
|
|
685
|
+
pushViewStack({
|
|
686
|
+
subcategory: item.properties.displayName,
|
|
687
|
+
title: item.properties.displayName,
|
|
688
|
+
nodeIcon: getNodeIconSource(item.properties),
|
|
689
|
+
rootView: activeViewStack.value.rootView,
|
|
690
|
+
hasSearch: true,
|
|
691
|
+
mode: "actions",
|
|
692
|
+
items: transformedActions
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
if (item.type === "view") {
|
|
696
|
+
const views = {
|
|
697
|
+
[TRIGGER_NODE_CREATOR_VIEW]: TriggerView,
|
|
698
|
+
[REGULAR_NODE_CREATOR_VIEW]: RegularView,
|
|
699
|
+
["AI"]: AIView,
|
|
700
|
+
[AI_OTHERS_NODE_CREATOR_VIEW]: AINodesView
|
|
701
|
+
};
|
|
702
|
+
const itemKey = item.key;
|
|
703
|
+
const matchedView = views[itemKey];
|
|
704
|
+
if (!matchedView) {
|
|
705
|
+
console.warn(`No view found for ${itemKey}`);
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
const view = matchedView(mergedNodes);
|
|
709
|
+
pushViewStack({
|
|
710
|
+
title: view.title,
|
|
711
|
+
subtitle: view?.subtitle ?? "",
|
|
712
|
+
info: view?.info ?? "",
|
|
713
|
+
items: view.items,
|
|
714
|
+
hasSearch: true,
|
|
715
|
+
rootView: view.value,
|
|
716
|
+
mode: "nodes",
|
|
717
|
+
searchItems: mergedNodes
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
if (item.type === "link") window.open(item.properties.url, "_blank");
|
|
721
|
+
if (item.type === "openTemplate") calloutHelpers.openSampleWorkflowTemplate(item.properties.templateId, { telemetry: {
|
|
722
|
+
source: "nodeCreator",
|
|
723
|
+
section: activeViewStack.value.title
|
|
724
|
+
} });
|
|
725
|
+
}
|
|
726
|
+
function subcategoriesMapper(item) {
|
|
727
|
+
if (item.type !== "node") return item;
|
|
728
|
+
const hasTriggerGroup = item.properties.group.includes("trigger");
|
|
729
|
+
const hasActions = getFilteredActions(item, actions).length > 0;
|
|
730
|
+
if (hasTriggerGroup && hasActions) {
|
|
731
|
+
if (item.properties?.codex) item.properties.codex.alias = [...item.properties.codex?.alias || [], item.properties.displayName];
|
|
732
|
+
item.properties.displayName = item.properties.displayName.replace(" Trigger", "");
|
|
733
|
+
}
|
|
734
|
+
return item;
|
|
735
|
+
}
|
|
736
|
+
function baseSubcategoriesFilter(item) {
|
|
737
|
+
if (item.type === "section") return true;
|
|
738
|
+
if (item.type !== "node") return false;
|
|
739
|
+
const hasTriggerGroup = item.properties.group.includes("trigger");
|
|
740
|
+
const hasActions = getFilteredActions(item, actions).length > 0;
|
|
741
|
+
if (activeViewStack.value.rootView === "Trigger") return hasActions || hasTriggerGroup;
|
|
742
|
+
return hasActions || !hasTriggerGroup;
|
|
743
|
+
}
|
|
744
|
+
const globalCallouts = computed(() => [...getRootSearchCallouts(activeViewStack.value.search ?? "", { isRagStarterCalloutVisible: calloutHelpers.isRagStarterCalloutVisible.value }), ...getActiveViewCallouts(activeViewStack.value.title, calloutHelpers.isPreBuiltAgentsCalloutVisible.value, calloutHelpers.getPreBuiltAgentNodeCreatorItems())]);
|
|
745
|
+
function arrowLeft() {
|
|
746
|
+
popViewStack();
|
|
747
|
+
}
|
|
748
|
+
function onKeySelect(activeItemId) {
|
|
749
|
+
const item = flattenCreateElements([
|
|
750
|
+
...globalCallouts.value ?? [],
|
|
751
|
+
...activeViewStack.value.items ?? [],
|
|
752
|
+
...globalSearchItemsDiff.value ?? [],
|
|
753
|
+
...moreFromCommunity.value ?? []
|
|
754
|
+
]).find((i) => i.uuid === activeItemId);
|
|
755
|
+
if (!item) return;
|
|
756
|
+
onSelected(item);
|
|
757
|
+
}
|
|
758
|
+
registerKeyHook("MainViewArrowRight", {
|
|
759
|
+
keyboardKeys: ["ArrowRight", "Enter"],
|
|
760
|
+
condition: (type) => [
|
|
761
|
+
"subcategory",
|
|
762
|
+
"node",
|
|
763
|
+
"link",
|
|
764
|
+
"view",
|
|
765
|
+
"openTemplate"
|
|
766
|
+
].includes(type),
|
|
767
|
+
handler: onKeySelect
|
|
768
|
+
});
|
|
769
|
+
registerKeyHook("MainViewArrowLeft", {
|
|
770
|
+
keyboardKeys: ["ArrowLeft"],
|
|
771
|
+
condition: (type) => [
|
|
772
|
+
"subcategory",
|
|
773
|
+
"node",
|
|
774
|
+
"link",
|
|
775
|
+
"view",
|
|
776
|
+
"openTemplate"
|
|
777
|
+
].includes(type),
|
|
778
|
+
handler: arrowLeft
|
|
779
|
+
});
|
|
780
|
+
return (_ctx, _cache) => {
|
|
781
|
+
return openBlock(), createElementBlock("span", null, [
|
|
782
|
+
createVNode(ItemsRenderer_default, {
|
|
783
|
+
elements: globalCallouts.value,
|
|
784
|
+
class: normalizeClass(_ctx.$style.items),
|
|
785
|
+
onSelected
|
|
786
|
+
}, null, 8, ["elements", "class"]),
|
|
787
|
+
withMemo([activeViewStack.value.search], () => createVNode(ItemsRenderer_default, {
|
|
788
|
+
elements: activeViewStack.value.items,
|
|
789
|
+
class: normalizeClass(_ctx.$style.items),
|
|
790
|
+
onSelected
|
|
791
|
+
}, createSlots({ _: 2 }, [isSearchResultEmpty.value ? {
|
|
792
|
+
name: "empty",
|
|
793
|
+
fn: withCtx(() => [createVNode(NoResults_default, {
|
|
794
|
+
"root-view": activeViewStack.value.rootView,
|
|
795
|
+
"show-icon": "",
|
|
796
|
+
"show-request": "",
|
|
797
|
+
onAddWebhookNode: _cache[0] || (_cache[0] = ($event) => emit("nodeTypeSelected", [{ type: unref("n8n-nodes-base.webhook") }])),
|
|
798
|
+
onAddHttpNode: _cache[1] || (_cache[1] = ($event) => emit("nodeTypeSelected", [{ type: unref("n8n-nodes-base.httpRequest") }]))
|
|
799
|
+
}, null, 8, ["root-view"])]),
|
|
800
|
+
key: "0"
|
|
801
|
+
} : void 0]), 1032, ["elements", "class"]), _cache, 2),
|
|
802
|
+
globalSearchItemsDiff.value.length > 0 ? (openBlock(), createBlock(CategorizedItemsRenderer_default, {
|
|
803
|
+
key: 0,
|
|
804
|
+
elements: globalSearchItemsDiff.value,
|
|
805
|
+
category: unref(i18n$1).baseText("nodeCreator.categoryNames.otherCategories"),
|
|
806
|
+
expanded: true,
|
|
807
|
+
onSelected
|
|
808
|
+
}, null, 8, ["elements", "category"])) : createCommentVNode("", true),
|
|
809
|
+
moreFromCommunity.value.length > 0 ? (openBlock(), createBlock(CategorizedItemsRenderer_default, {
|
|
810
|
+
key: 1,
|
|
811
|
+
elements: moreFromCommunity.value,
|
|
812
|
+
category: unref(i18n$1).baseText("nodeCreator.categoryNames.moreFromCommunity"),
|
|
813
|
+
expanded: true,
|
|
814
|
+
onSelected
|
|
815
|
+
}, null, 8, ["elements", "category"])) : createCommentVNode("", true)
|
|
816
|
+
]);
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
var NodesMode_vue_vue_type_style_index_0_lang_module_default = { items: "_items_bf97l_123" };
|
|
821
|
+
var NodesMode_default = /* @__PURE__ */ __plugin_vue_export_helper_default(NodesMode_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": NodesMode_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
822
|
+
var CommunityNodeDetails_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
823
|
+
__name: "CommunityNodeDetails",
|
|
824
|
+
setup(__props) {
|
|
825
|
+
const { activeViewStack, pushViewStack, popViewStack, getAllNodeCreateElements, updateCurrentViewStack } = useViewStacks();
|
|
826
|
+
const { communityNodeDetails } = activeViewStack;
|
|
827
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
828
|
+
const { installNode, loading } = useInstallNode();
|
|
829
|
+
const isOwner = computed(() => useUsersStore().isInstanceOwner);
|
|
830
|
+
const updateViewStack = (key) => {
|
|
831
|
+
const installedNodeKey = removePreviewToken(key);
|
|
832
|
+
const installedNode = getAllNodeCreateElements().find((node) => node.key === installedNodeKey);
|
|
833
|
+
if (installedNode) {
|
|
834
|
+
const nodeActions = nodeCreatorStore.actions?.[installedNode.key] || [];
|
|
835
|
+
popViewStack();
|
|
836
|
+
updateCurrentViewStack({ searchItems: nodeCreatorStore.mergedNodes });
|
|
837
|
+
pushViewStack(prepareCommunityNodeDetailsViewStack(installedNode, getNodeIconSource(installedNode.properties), activeViewStack.rootView, nodeActions), { transitionDirection: "none" });
|
|
838
|
+
} else {
|
|
839
|
+
const viewStack = { ...activeViewStack };
|
|
840
|
+
viewStack.communityNodeDetails.installed = true;
|
|
841
|
+
pushViewStack(activeViewStack, { resetStacks: true });
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
const updateStoresAndViewStack = (key) => {
|
|
845
|
+
updateViewStack(key);
|
|
846
|
+
nodeCreatorStore.removeNodeFromMergedNodes(key);
|
|
847
|
+
};
|
|
848
|
+
const onInstall = async () => {
|
|
849
|
+
if (isOwner.value && activeViewStack.communityNodeDetails && !communityNodeDetails?.installed) {
|
|
850
|
+
const { key, packageName } = activeViewStack.communityNodeDetails;
|
|
851
|
+
if ((await installNode({
|
|
852
|
+
type: "verified",
|
|
853
|
+
packageName,
|
|
854
|
+
nodeType: key
|
|
855
|
+
})).success) updateStoresAndViewStack(key);
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
return (_ctx, _cache) => {
|
|
859
|
+
return unref(communityNodeDetails) ? (openBlock(), createElementBlock("div", {
|
|
860
|
+
key: 0,
|
|
861
|
+
class: normalizeClass(_ctx.$style.container)
|
|
862
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.header) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.title) }, [
|
|
863
|
+
unref(communityNodeDetails).nodeIcon ? (openBlock(), createBlock(NodeIcon_default, {
|
|
864
|
+
key: 0,
|
|
865
|
+
class: normalizeClass(_ctx.$style.nodeIcon),
|
|
866
|
+
"icon-source": unref(communityNodeDetails).nodeIcon,
|
|
867
|
+
circle: false,
|
|
868
|
+
"show-tooltip": false
|
|
869
|
+
}, null, 8, ["class", "icon-source"])) : createCommentVNode("", true),
|
|
870
|
+
createBaseVNode("span", null, toDisplayString(unref(communityNodeDetails).title), 1),
|
|
871
|
+
unref(communityNodeDetails).official ? (openBlock(), createBlock(unref(N8nTooltip_default), {
|
|
872
|
+
key: 1,
|
|
873
|
+
placement: "bottom",
|
|
874
|
+
"show-after": 500
|
|
875
|
+
}, {
|
|
876
|
+
content: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("generic.officialNode.tooltip", { interpolate: { author: unref(communityNodeDetails).companyName ?? unref(communityNodeDetails).title } })), 1)]),
|
|
877
|
+
default: withCtx(() => [createVNode(unref(verified_default), { class: normalizeClass(_ctx.$style.officialIcon) }, null, 8, ["class"])]),
|
|
878
|
+
_: 1
|
|
879
|
+
})) : createCommentVNode("", true)
|
|
880
|
+
], 2), createBaseVNode("div", null, [unref(communityNodeDetails).installed ? (openBlock(), createElementBlock("div", {
|
|
881
|
+
key: 0,
|
|
882
|
+
class: normalizeClass(_ctx.$style.installed)
|
|
883
|
+
}, [!unref(communityNodeDetails).official ? (openBlock(), createBlock(unref(N8nIcon_default), {
|
|
884
|
+
key: 0,
|
|
885
|
+
class: normalizeClass(_ctx.$style.installedIcon),
|
|
886
|
+
icon: "box"
|
|
887
|
+
}, null, 8, ["class"])) : createCommentVNode("", true), createVNode(unref(N8nText_default), {
|
|
888
|
+
color: "text-light",
|
|
889
|
+
size: "small",
|
|
890
|
+
bold: ""
|
|
891
|
+
}, {
|
|
892
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeDetails.installed")), 1)]),
|
|
893
|
+
_: 1
|
|
894
|
+
})], 2)) : createCommentVNode("", true), isOwner.value && !unref(communityNodeDetails).installed ? (openBlock(), createBlock(unref(N8nButton_default), {
|
|
895
|
+
key: 1,
|
|
896
|
+
loading: unref(loading),
|
|
897
|
+
disabled: unref(loading),
|
|
898
|
+
label: unref(i18n).baseText("communityNodeDetails.install"),
|
|
899
|
+
size: "small",
|
|
900
|
+
"data-test-id": "install-community-node-button",
|
|
901
|
+
onClick: onInstall
|
|
902
|
+
}, null, 8, [
|
|
903
|
+
"loading",
|
|
904
|
+
"disabled",
|
|
905
|
+
"label"
|
|
906
|
+
])) : createCommentVNode("", true)])], 2)], 2)) : createCommentVNode("", true);
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
var CommunityNodeDetails_vue_vue_type_style_index_0_lang_module_default = {
|
|
911
|
+
container: "_container_1ibv8_123",
|
|
912
|
+
header: "_header_1ibv8_131",
|
|
913
|
+
title: "_title_1ibv8_138",
|
|
914
|
+
nodeIcon: "_nodeIcon_1ibv8_146",
|
|
915
|
+
installedIcon: "_installedIcon_1ibv8_151",
|
|
916
|
+
officialIcon: "_officialIcon_1ibv8_157",
|
|
917
|
+
installed: "_installed_1ibv8_151"
|
|
918
|
+
};
|
|
919
|
+
var CommunityNodeDetails_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CommunityNodeDetails_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CommunityNodeDetails_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
920
|
+
var CommunityNodeDocsLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
921
|
+
__name: "CommunityNodeDocsLink",
|
|
922
|
+
props: { packageName: {} },
|
|
923
|
+
setup(__props) {
|
|
924
|
+
const props = __props;
|
|
925
|
+
const openCommunityNodeDocsPage = () => {
|
|
926
|
+
const newTab = window.open(`https://www.npmjs.com/package/${props.packageName}`, "_blank");
|
|
927
|
+
if (newTab) newTab.opener = null;
|
|
928
|
+
};
|
|
929
|
+
return (_ctx, _cache) => {
|
|
930
|
+
return openBlock(), createBlock(unref(N8nLink_default), {
|
|
931
|
+
theme: "text",
|
|
932
|
+
class: normalizeClass(_ctx.$style.container),
|
|
933
|
+
title: unref(i18n).baseText("communityNodesDocsLink.link.title"),
|
|
934
|
+
onClick: openCommunityNodeDocsPage
|
|
935
|
+
}, {
|
|
936
|
+
default: withCtx(() => [createVNode(unref(N8nText_default), {
|
|
937
|
+
size: "small",
|
|
938
|
+
bold: "",
|
|
939
|
+
style: { "margin-right": "5px" }
|
|
940
|
+
}, {
|
|
941
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("communityNodesDocsLink.title")), 1)]),
|
|
942
|
+
_: 1
|
|
943
|
+
}), createVNode(unref(N8nIcon_default), { icon: "external-link" })]),
|
|
944
|
+
_: 1
|
|
945
|
+
}, 8, ["class", "title"]);
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
var CommunityNodeDocsLink_vue_vue_type_style_index_0_lang_module_default = { container: "_container_1ms6i_123" };
|
|
950
|
+
var CommunityNodeDocsLink_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CommunityNodeDocsLink_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CommunityNodeDocsLink_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
951
|
+
var _hoisted_1 = ["textContent"];
|
|
952
|
+
var _hoisted_2 = ["textContent"];
|
|
953
|
+
var NodesListPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
954
|
+
__name: "NodesListPanel",
|
|
955
|
+
setup(__props) {
|
|
956
|
+
const i18n$1 = useI18n();
|
|
957
|
+
const { callDebounced } = useDebounce();
|
|
958
|
+
const { mergedNodes } = useNodeCreatorStore();
|
|
959
|
+
const { pushViewStack, popViewStack, updateCurrentViewStack } = useViewStacks();
|
|
960
|
+
const { setActiveItemIndex, attachKeydownEvent, detachKeydownEvent } = useKeyboardNavigation();
|
|
961
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
962
|
+
const { isInstanceOwner } = useUsersStore();
|
|
963
|
+
const activeViewStack = computed(() => useViewStacks().activeViewStack);
|
|
964
|
+
const communityNodeDetails = computed(() => activeViewStack.value.communityNodeDetails);
|
|
965
|
+
const viewStacks = computed(() => useViewStacks().viewStacks);
|
|
966
|
+
const isActionsMode = computed(() => useViewStacks().activeViewStackMode === "actions");
|
|
967
|
+
const searchPlaceholder = computed(() => {
|
|
968
|
+
let node = activeViewStack.value?.title;
|
|
969
|
+
if (communityNodeDetails.value) node = communityNodeDetails.value.title;
|
|
970
|
+
if (isActionsMode.value) return i18n$1.baseText("nodeCreator.actionsCategory.searchActions", { interpolate: { node } });
|
|
971
|
+
return i18n$1.baseText("nodeCreator.searchBar.searchNodes");
|
|
972
|
+
});
|
|
973
|
+
const showSearchBar = computed(() => {
|
|
974
|
+
if (activeViewStack.value.communityNodeDetails) return false;
|
|
975
|
+
return activeViewStack.value.hasSearch;
|
|
976
|
+
});
|
|
977
|
+
const nodeCreatorView = computed(() => useNodeCreatorStore().selectedView);
|
|
978
|
+
const isCommunityNodeActionsMode = computed(() => {
|
|
979
|
+
return communityNodeDetails.value && isActionsMode.value && activeViewStack.value.subcategory;
|
|
980
|
+
});
|
|
981
|
+
function getDefaultActiveIndex(search = "") {
|
|
982
|
+
if (activeViewStack.value.mode === "actions") return 1;
|
|
983
|
+
else if (activeViewStack.value.sections) return search ? 0 : 1;
|
|
984
|
+
return 0;
|
|
985
|
+
}
|
|
986
|
+
function onSearch(value) {
|
|
987
|
+
if (activeViewStack.value.uuid) {
|
|
988
|
+
updateCurrentViewStack({ search: value });
|
|
989
|
+
setActiveItemIndex(getDefaultActiveIndex(value));
|
|
990
|
+
if (value.length) callDebounced(nodeCreatorStore.onNodeFilterChanged, {
|
|
991
|
+
trailing: true,
|
|
992
|
+
debounceTime: 2e3
|
|
993
|
+
}, {
|
|
994
|
+
newValue: value,
|
|
995
|
+
filteredNodes: activeViewStack.value.items ?? [],
|
|
996
|
+
filterMode: activeViewStack.value.rootView ?? "Regular",
|
|
997
|
+
subcategory: activeViewStack.value.subcategory,
|
|
998
|
+
title: activeViewStack.value.title
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
function onTransitionEnd() {
|
|
1003
|
+
setActiveItemIndex(getDefaultActiveIndex());
|
|
1004
|
+
}
|
|
1005
|
+
onMounted(() => {
|
|
1006
|
+
attachKeydownEvent();
|
|
1007
|
+
setActiveItemIndex(getDefaultActiveIndex());
|
|
1008
|
+
});
|
|
1009
|
+
onUnmounted(() => {
|
|
1010
|
+
detachKeydownEvent();
|
|
1011
|
+
});
|
|
1012
|
+
watch(() => nodeCreatorView.value, (selectedView) => {
|
|
1013
|
+
const views = {
|
|
1014
|
+
[TRIGGER_NODE_CREATOR_VIEW]: TriggerView,
|
|
1015
|
+
[REGULAR_NODE_CREATOR_VIEW]: RegularView,
|
|
1016
|
+
["AI"]: AIView,
|
|
1017
|
+
[AI_OTHERS_NODE_CREATOR_VIEW]: AINodesView,
|
|
1018
|
+
[AI_UNCATEGORIZED_CATEGORY]: AINodesView,
|
|
1019
|
+
[AI_EVALUATION]: AINodesView
|
|
1020
|
+
};
|
|
1021
|
+
const itemKey = selectedView;
|
|
1022
|
+
const matchedView = views[itemKey];
|
|
1023
|
+
if (!matchedView) {
|
|
1024
|
+
console.warn(`No view found for ${itemKey}`);
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
const view = matchedView(mergedNodes);
|
|
1028
|
+
pushViewStack({
|
|
1029
|
+
title: view.title,
|
|
1030
|
+
subtitle: view?.subtitle ?? "",
|
|
1031
|
+
items: view.items,
|
|
1032
|
+
info: view.info,
|
|
1033
|
+
hasSearch: true,
|
|
1034
|
+
mode: "nodes",
|
|
1035
|
+
rootView: selectedView,
|
|
1036
|
+
searchItems: mergedNodes
|
|
1037
|
+
});
|
|
1038
|
+
}, { immediate: true });
|
|
1039
|
+
function onBackButton() {
|
|
1040
|
+
popViewStack();
|
|
1041
|
+
}
|
|
1042
|
+
return (_ctx, _cache) => {
|
|
1043
|
+
return viewStacks.value.length > 0 ? (openBlock(), createBlock(Transition, {
|
|
1044
|
+
key: 0,
|
|
1045
|
+
name: `panel-slide-${activeViewStack.value.transitionDirection}`,
|
|
1046
|
+
onAfterLeave: onTransitionEnd
|
|
1047
|
+
}, {
|
|
1048
|
+
default: withCtx(() => [(openBlock(), createElementBlock("aside", {
|
|
1049
|
+
key: `${activeViewStack.value.uuid}`,
|
|
1050
|
+
class: normalizeClass([_ctx.$style.nodesListPanel, activeViewStack.value.panelClass]),
|
|
1051
|
+
onKeydownCapture: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
1052
|
+
}, [
|
|
1053
|
+
createBaseVNode("header", {
|
|
1054
|
+
class: normalizeClass({
|
|
1055
|
+
[_ctx.$style.header]: true,
|
|
1056
|
+
[_ctx.$style.hasBg]: !activeViewStack.value.subtitle,
|
|
1057
|
+
"nodes-list-panel-header": true
|
|
1058
|
+
}),
|
|
1059
|
+
"data-test-id": "nodes-list-header"
|
|
1060
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.top) }, [
|
|
1061
|
+
viewStacks.value.length > 1 && !activeViewStack.value.preventBack ? (openBlock(), createElementBlock("button", {
|
|
1062
|
+
key: 0,
|
|
1063
|
+
class: normalizeClass(_ctx.$style.backButton),
|
|
1064
|
+
onClick: onBackButton
|
|
1065
|
+
}, [createVNode(unref(N8nIcon_default), {
|
|
1066
|
+
class: normalizeClass(_ctx.$style.backButtonIcon),
|
|
1067
|
+
icon: "arrow-left",
|
|
1068
|
+
size: 22
|
|
1069
|
+
}, null, 8, ["class"])], 2)) : createCommentVNode("", true),
|
|
1070
|
+
activeViewStack.value.nodeIcon ? (openBlock(), createBlock(NodeIcon_default, {
|
|
1071
|
+
key: 1,
|
|
1072
|
+
class: normalizeClass(_ctx.$style.nodeIcon),
|
|
1073
|
+
"icon-source": activeViewStack.value.nodeIcon,
|
|
1074
|
+
circle: false,
|
|
1075
|
+
"show-tooltip": false,
|
|
1076
|
+
size: 20
|
|
1077
|
+
}, null, 8, ["class", "icon-source"])) : createCommentVNode("", true),
|
|
1078
|
+
activeViewStack.value.title ? (openBlock(), createElementBlock("p", {
|
|
1079
|
+
key: 2,
|
|
1080
|
+
class: normalizeClass(_ctx.$style.title),
|
|
1081
|
+
textContent: toDisplayString(activeViewStack.value.title)
|
|
1082
|
+
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
1083
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDocsLink_default, {
|
|
1084
|
+
key: 3,
|
|
1085
|
+
"package-name": communityNodeDetails.value.packageName
|
|
1086
|
+
}, null, 8, ["package-name"])) : createCommentVNode("", true)
|
|
1087
|
+
], 2), activeViewStack.value.subtitle ? (openBlock(), createElementBlock("p", {
|
|
1088
|
+
key: 0,
|
|
1089
|
+
class: normalizeClass({
|
|
1090
|
+
[_ctx.$style.subtitle]: true,
|
|
1091
|
+
[_ctx.$style.offsetSubtitle]: viewStacks.value.length > 1
|
|
1092
|
+
}),
|
|
1093
|
+
textContent: toDisplayString(activeViewStack.value.subtitle)
|
|
1094
|
+
}, null, 10, _hoisted_2)) : createCommentVNode("", true)], 2),
|
|
1095
|
+
showSearchBar.value ? (openBlock(), createBlock(SearchBar_default, {
|
|
1096
|
+
key: 0,
|
|
1097
|
+
class: normalizeClass(_ctx.$style.searchBar),
|
|
1098
|
+
placeholder: searchPlaceholder.value ? searchPlaceholder.value : unref(i18n$1).baseText("nodeCreator.searchBar.searchNodes"),
|
|
1099
|
+
"model-value": activeViewStack.value.search,
|
|
1100
|
+
"onUpdate:modelValue": onSearch
|
|
1101
|
+
}, null, 8, [
|
|
1102
|
+
"class",
|
|
1103
|
+
"placeholder",
|
|
1104
|
+
"model-value"
|
|
1105
|
+
])) : createCommentVNode("", true),
|
|
1106
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDetails_default, { key: 1 })) : createCommentVNode("", true),
|
|
1107
|
+
communityNodeDetails.value && !isActionsMode.value ? (openBlock(), createBlock(CommunityNodeInfo_default, { key: 2 })) : createCommentVNode("", true),
|
|
1108
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.renderedItems) }, [activeViewStack.value.info && !activeViewStack.value.search ? (openBlock(), createBlock(unref(N8nNotice_default), {
|
|
1109
|
+
key: 0,
|
|
1110
|
+
class: normalizeClass(_ctx.$style.info),
|
|
1111
|
+
content: activeViewStack.value.info,
|
|
1112
|
+
theme: "warning"
|
|
1113
|
+
}, null, 8, ["class", "content"])) : createCommentVNode("", true), isActionsMode.value && activeViewStack.value.subcategory ? (openBlock(), createBlock(ActionsMode_default, normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)), null, 16)) : (openBlock(), createBlock(NodesMode_default, mergeProps({
|
|
1114
|
+
key: 2,
|
|
1115
|
+
"root-view": nodeCreatorView.value
|
|
1116
|
+
}, _ctx.$attrs), null, 16, ["root-view"]))], 2),
|
|
1117
|
+
communityNodeDetails.value && !isCommunityNodeActionsMode.value ? (openBlock(), createBlock(CommunityNodeFooter_default, {
|
|
1118
|
+
key: 3,
|
|
1119
|
+
"package-name": communityNodeDetails.value.packageName,
|
|
1120
|
+
"show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
|
|
1121
|
+
}, null, 8, ["package-name", "show-manage"])) : createCommentVNode("", true)
|
|
1122
|
+
], 34))]),
|
|
1123
|
+
_: 1
|
|
1124
|
+
}, 8, ["name"])) : createCommentVNode("", true);
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
});
|
|
1128
|
+
var NodesListPanel_vue_vue_type_style_index_0_lang_module_default = {
|
|
1129
|
+
info: "_info_aetc2_145",
|
|
1130
|
+
backButton: "_backButton_aetc2_149",
|
|
1131
|
+
backButtonIcon: "_backButtonIcon_aetc2_156",
|
|
1132
|
+
nodeIcon: "_nodeIcon_aetc2_161",
|
|
1133
|
+
renderedItems: "_renderedItems_aetc2_167",
|
|
1134
|
+
searchBar: "_searchBar_aetc2_179",
|
|
1135
|
+
nodesListPanel: "_nodesListPanel_aetc2_183",
|
|
1136
|
+
footer: "_footer_aetc2_201",
|
|
1137
|
+
top: "_top_aetc2_212",
|
|
1138
|
+
header: "_header_aetc2_217",
|
|
1139
|
+
hasBg: "_hasBg_aetc2_223",
|
|
1140
|
+
title: "_title_aetc2_228",
|
|
1141
|
+
subtitle: "_subtitle_aetc2_239",
|
|
1142
|
+
offsetSubtitle: "_offsetSubtitle_aetc2_247"
|
|
1143
|
+
};
|
|
1144
|
+
var NodesListPanel_default = /* @__PURE__ */ __plugin_vue_export_helper_default(NodesListPanel_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": NodesListPanel_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
1145
|
+
var NodeCreator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1146
|
+
__name: "NodeCreator",
|
|
1147
|
+
props: {
|
|
1148
|
+
active: { type: Boolean },
|
|
1149
|
+
onNodeTypeSelected: { type: Function }
|
|
1150
|
+
},
|
|
1151
|
+
emits: ["closeNodeCreator", "nodeTypeSelected"],
|
|
1152
|
+
setup(__props, { emit: __emit }) {
|
|
1153
|
+
const OUTSIDE_CLICK_WHITELIST = [".el-overlay-dialog"];
|
|
1154
|
+
const props = __props;
|
|
1155
|
+
const { resetViewStacks } = useViewStacks();
|
|
1156
|
+
const { registerKeyHook } = useKeyboardNavigation();
|
|
1157
|
+
const emit = __emit;
|
|
1158
|
+
const uiStore = useUIStore();
|
|
1159
|
+
const bannersStore = useBannersStore();
|
|
1160
|
+
const chatPanelStore = useChatPanelStore();
|
|
1161
|
+
const { setShowScrim, setActions, setMergeNodes } = useNodeCreatorStore();
|
|
1162
|
+
const { generateMergedNodesAndActions } = useActionsGenerator();
|
|
1163
|
+
const state = reactive({
|
|
1164
|
+
nodeCreator: null,
|
|
1165
|
+
mousedownInsideEvent: null
|
|
1166
|
+
});
|
|
1167
|
+
const showScrim = computed(() => useNodeCreatorStore().showScrim);
|
|
1168
|
+
const viewStacksLength = computed(() => useViewStacks().viewStacks.length);
|
|
1169
|
+
const nodeCreatorInlineStyle = computed(() => {
|
|
1170
|
+
const rightPosition = getRightOffset();
|
|
1171
|
+
return {
|
|
1172
|
+
top: `${bannersStore.bannersHeight + uiStore.headerHeight}px`,
|
|
1173
|
+
right: `${rightPosition}px`
|
|
1174
|
+
};
|
|
1175
|
+
});
|
|
1176
|
+
function getRightOffset() {
|
|
1177
|
+
if (chatPanelStore.isOpen) return chatPanelStore.width;
|
|
1178
|
+
return 0;
|
|
1179
|
+
}
|
|
1180
|
+
function onMouseUpOutside() {
|
|
1181
|
+
if (state.mousedownInsideEvent) {
|
|
1182
|
+
const clickEvent = new MouseEvent("click", {
|
|
1183
|
+
bubbles: true,
|
|
1184
|
+
cancelable: true
|
|
1185
|
+
});
|
|
1186
|
+
state.mousedownInsideEvent.target?.dispatchEvent(clickEvent);
|
|
1187
|
+
state.mousedownInsideEvent = null;
|
|
1188
|
+
unBindOnMouseUpOutside();
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
function unBindOnMouseUpOutside() {
|
|
1192
|
+
document.removeEventListener("mouseup", onMouseUpOutside);
|
|
1193
|
+
document.removeEventListener("touchstart", onMouseUpOutside);
|
|
1194
|
+
}
|
|
1195
|
+
function onMouseUp() {
|
|
1196
|
+
state.mousedownInsideEvent = null;
|
|
1197
|
+
unBindOnMouseUpOutside();
|
|
1198
|
+
}
|
|
1199
|
+
function onMouseDown(event) {
|
|
1200
|
+
state.mousedownInsideEvent = event;
|
|
1201
|
+
document.addEventListener("mouseup", onMouseUpOutside);
|
|
1202
|
+
document.addEventListener("touchstart", onMouseUpOutside);
|
|
1203
|
+
}
|
|
1204
|
+
function onDragOver(event) {
|
|
1205
|
+
event.preventDefault();
|
|
1206
|
+
}
|
|
1207
|
+
function onDrop(event) {
|
|
1208
|
+
if (!event.dataTransfer) return;
|
|
1209
|
+
const dragData = event.dataTransfer.getData(DRAG_EVENT_DATA_KEY);
|
|
1210
|
+
const nodeCreatorBoundingRect = state.nodeCreator.getBoundingClientRect();
|
|
1211
|
+
if (dragData && event.pageX >= nodeCreatorBoundingRect.x && event.pageY >= nodeCreatorBoundingRect.y) event.stopPropagation();
|
|
1212
|
+
}
|
|
1213
|
+
watch(() => props.active, (isActive) => {
|
|
1214
|
+
if (!isActive) {
|
|
1215
|
+
setShowScrim(false);
|
|
1216
|
+
resetViewStacks();
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
watch(viewStacksLength, (value) => {
|
|
1220
|
+
if (value === 0) {
|
|
1221
|
+
emit("closeNodeCreator");
|
|
1222
|
+
setShowScrim(false);
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
registerKeyHook("NodeCreatorCloseEscape", {
|
|
1226
|
+
keyboardKeys: ["Escape"],
|
|
1227
|
+
handler: () => emit("closeNodeCreator")
|
|
1228
|
+
});
|
|
1229
|
+
registerKeyHook("NodeCreatorCloseTab", {
|
|
1230
|
+
keyboardKeys: ["Tab"],
|
|
1231
|
+
handler: () => emit("closeNodeCreator")
|
|
1232
|
+
});
|
|
1233
|
+
watch(() => ({
|
|
1234
|
+
httpOnlyCredentials: useCredentialsStore().httpOnlyCredentialTypes,
|
|
1235
|
+
nodeTypes: useNodeTypesStore().visibleNodeTypes
|
|
1236
|
+
}), ({ nodeTypes, httpOnlyCredentials }) => {
|
|
1237
|
+
const { actions, mergedNodes } = generateMergedNodesAndActions(nodeTypes, httpOnlyCredentials);
|
|
1238
|
+
setActions(actions);
|
|
1239
|
+
setMergeNodes(mergedNodes);
|
|
1240
|
+
}, { immediate: true });
|
|
1241
|
+
const { nodeCreator: nodeCreator$1 } = toRefs(state);
|
|
1242
|
+
onBeforeUnmount(() => {
|
|
1243
|
+
unBindOnMouseUpOutside();
|
|
1244
|
+
});
|
|
1245
|
+
onClickOutside(nodeCreator$1, () => {
|
|
1246
|
+
emit("closeNodeCreator");
|
|
1247
|
+
}, { ignore: OUTSIDE_CLICK_WHITELIST });
|
|
1248
|
+
return (_ctx, _cache) => {
|
|
1249
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1250
|
+
createBaseVNode("aside", { class: normalizeClass({
|
|
1251
|
+
[_ctx.$style.nodeCreatorScrim]: true,
|
|
1252
|
+
[_ctx.$style.active]: showScrim.value
|
|
1253
|
+
}) }, null, 2),
|
|
1254
|
+
_ctx.active ? (openBlock(), createBlock(unref(N8nIconButton_default), {
|
|
1255
|
+
key: 0,
|
|
1256
|
+
class: normalizeClass(_ctx.$style.close),
|
|
1257
|
+
type: "secondary",
|
|
1258
|
+
icon: "x",
|
|
1259
|
+
"aria-label": "Close Node Creator",
|
|
1260
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("closeNodeCreator"))
|
|
1261
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
1262
|
+
createVNode(SlideTransition_default, null, {
|
|
1263
|
+
default: withCtx(() => [_ctx.active ? (openBlock(), createElementBlock("div", {
|
|
1264
|
+
key: 0,
|
|
1265
|
+
ref_key: "nodeCreator",
|
|
1266
|
+
ref: nodeCreator$1,
|
|
1267
|
+
class: normalizeClass({ [_ctx.$style.nodeCreator]: true }),
|
|
1268
|
+
style: normalizeStyle(nodeCreatorInlineStyle.value),
|
|
1269
|
+
"data-test-id": "node-creator",
|
|
1270
|
+
onDragover: onDragOver,
|
|
1271
|
+
onDrop,
|
|
1272
|
+
onMousedown: onMouseDown,
|
|
1273
|
+
onMouseup: onMouseUp
|
|
1274
|
+
}, [createVNode(NodesListPanel_default, { onNodeTypeSelected: _ctx.onNodeTypeSelected }, null, 8, ["onNodeTypeSelected"])], 38)) : createCommentVNode("", true)]),
|
|
1275
|
+
_: 1
|
|
1276
|
+
})
|
|
1277
|
+
]);
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
var NodeCreator_vue_vue_type_style_index_0_lang_module_default = {
|
|
1282
|
+
nodeCreator: "_nodeCreator_1htj5_127",
|
|
1283
|
+
nodeCreatorScrim: "_nodeCreatorScrim_1htj5_139",
|
|
1284
|
+
active: "_active_1htj5_151",
|
|
1285
|
+
close: "_close_1htj5_155"
|
|
1286
|
+
};
|
|
1287
|
+
var NodeCreator_default = /* @__PURE__ */ __plugin_vue_export_helper_default(NodeCreator_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": NodeCreator_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
1288
|
+
export { NodeCreator_default as default };
|