@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,144 @@
|
|
|
1
|
+
import { C as computed } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { rt as useI18n } from "./core-CRbPymLT.js";
|
|
3
|
+
import { aa as useUIStore, ms as useSettingsStore, yr as hasPermission } from "./builder.store-Czk2ipDE.js";
|
|
4
|
+
import { v as useRouter } from "./get-BcEmeOxn.js";
|
|
5
|
+
import { Ro as VIEWS } from "./constants-C8OH4tTq.js";
|
|
6
|
+
function useUserHelpers(router) {
|
|
7
|
+
const canUserAccessRouteByName = (name) => {
|
|
8
|
+
return canUserAccessRoute(router.resolve({ name }));
|
|
9
|
+
};
|
|
10
|
+
const canUserAccessRoute = (route) => {
|
|
11
|
+
const middleware = route.meta?.middleware;
|
|
12
|
+
const middlewareOptions = route.meta?.middlewareOptions;
|
|
13
|
+
if (!middleware) return true;
|
|
14
|
+
return hasPermission(middleware, middlewareOptions);
|
|
15
|
+
};
|
|
16
|
+
return { canUserAccessRouteByName };
|
|
17
|
+
}
|
|
18
|
+
function useSettingsItems() {
|
|
19
|
+
const router = useRouter();
|
|
20
|
+
const i18n = useI18n();
|
|
21
|
+
const uiStore = useUIStore();
|
|
22
|
+
const settingsStore = useSettingsStore();
|
|
23
|
+
const { canUserAccessRouteByName } = useUserHelpers(router);
|
|
24
|
+
const settingsItems = computed(() => {
|
|
25
|
+
const menuItems = [
|
|
26
|
+
{
|
|
27
|
+
id: "settings-usage-and-plan",
|
|
28
|
+
icon: "chart-column-decreasing",
|
|
29
|
+
label: i18n.baseText("settings.usageAndPlan.title"),
|
|
30
|
+
position: "top",
|
|
31
|
+
available: canUserAccessRouteByName(VIEWS.USAGE),
|
|
32
|
+
route: { to: { name: VIEWS.USAGE } }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "settings-personal",
|
|
36
|
+
icon: "circle-user-round",
|
|
37
|
+
label: i18n.baseText("settings.personal"),
|
|
38
|
+
position: "top",
|
|
39
|
+
available: canUserAccessRouteByName(VIEWS.PERSONAL_SETTINGS),
|
|
40
|
+
route: { to: { name: VIEWS.PERSONAL_SETTINGS } }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "settings-users",
|
|
44
|
+
icon: "user-round",
|
|
45
|
+
label: i18n.baseText("settings.users"),
|
|
46
|
+
position: "top",
|
|
47
|
+
available: canUserAccessRouteByName(VIEWS.USERS_SETTINGS),
|
|
48
|
+
route: { to: { name: VIEWS.USERS_SETTINGS } }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "settings-project-roles",
|
|
52
|
+
icon: "user-round",
|
|
53
|
+
label: i18n.baseText("settings.projectRoles"),
|
|
54
|
+
position: "top",
|
|
55
|
+
available: canUserAccessRouteByName(VIEWS.PROJECT_ROLES_SETTINGS),
|
|
56
|
+
route: { to: { name: VIEWS.PROJECT_ROLES_SETTINGS } }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "settings-api",
|
|
60
|
+
icon: "plug",
|
|
61
|
+
label: i18n.baseText("settings.n8napi"),
|
|
62
|
+
position: "top",
|
|
63
|
+
available: settingsStore.isPublicApiEnabled && canUserAccessRouteByName(VIEWS.API_SETTINGS),
|
|
64
|
+
route: { to: { name: VIEWS.API_SETTINGS } }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "settings-external-secrets",
|
|
68
|
+
icon: "vault",
|
|
69
|
+
label: i18n.baseText("settings.externalSecrets.title"),
|
|
70
|
+
position: "top",
|
|
71
|
+
available: canUserAccessRouteByName(VIEWS.EXTERNAL_SECRETS_SETTINGS),
|
|
72
|
+
route: { to: { name: VIEWS.EXTERNAL_SECRETS_SETTINGS } }
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "settings-credential-resolvers",
|
|
76
|
+
icon: "key-round",
|
|
77
|
+
label: i18n.baseText("credentialResolver.view.title"),
|
|
78
|
+
position: "top",
|
|
79
|
+
available: canUserAccessRouteByName(VIEWS.RESOLVERS),
|
|
80
|
+
route: { to: { name: VIEWS.RESOLVERS } }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "settings-source-control",
|
|
84
|
+
icon: "git-branch",
|
|
85
|
+
label: i18n.baseText("settings.sourceControl.title"),
|
|
86
|
+
position: "top",
|
|
87
|
+
available: canUserAccessRouteByName(VIEWS.SOURCE_CONTROL),
|
|
88
|
+
route: { to: { name: VIEWS.SOURCE_CONTROL } }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "settings-sso",
|
|
92
|
+
icon: "user-lock",
|
|
93
|
+
label: i18n.baseText("settings.sso"),
|
|
94
|
+
position: "top",
|
|
95
|
+
available: canUserAccessRouteByName(VIEWS.SSO_SETTINGS),
|
|
96
|
+
route: { to: { name: VIEWS.SSO_SETTINGS } }
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "settings-ldap",
|
|
100
|
+
icon: "network",
|
|
101
|
+
label: i18n.baseText("settings.ldap"),
|
|
102
|
+
position: "top",
|
|
103
|
+
available: canUserAccessRouteByName(VIEWS.LDAP_SETTINGS),
|
|
104
|
+
route: { to: { name: VIEWS.LDAP_SETTINGS } }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "settings-workersview",
|
|
108
|
+
icon: "waypoints",
|
|
109
|
+
label: i18n.baseText("mainSidebar.workersView"),
|
|
110
|
+
position: "top",
|
|
111
|
+
available: settingsStore.isQueueModeEnabled && hasPermission(["rbac"], { rbac: { scope: "workersView:manage" } }),
|
|
112
|
+
route: { to: { name: VIEWS.WORKER_VIEW } }
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
menuItems.push({
|
|
116
|
+
id: "settings-log-streaming",
|
|
117
|
+
icon: "log-in",
|
|
118
|
+
label: i18n.baseText("settings.log-streaming"),
|
|
119
|
+
position: "top",
|
|
120
|
+
available: canUserAccessRouteByName(VIEWS.LOG_STREAMING_SETTINGS),
|
|
121
|
+
route: { to: { name: VIEWS.LOG_STREAMING_SETTINGS } }
|
|
122
|
+
});
|
|
123
|
+
menuItems.push({
|
|
124
|
+
id: "settings-community-nodes",
|
|
125
|
+
icon: "box",
|
|
126
|
+
label: i18n.baseText("settings.communityNodes"),
|
|
127
|
+
position: "top",
|
|
128
|
+
available: canUserAccessRouteByName(VIEWS.COMMUNITY_NODES),
|
|
129
|
+
route: { to: { name: VIEWS.COMMUNITY_NODES } }
|
|
130
|
+
});
|
|
131
|
+
menuItems.push({
|
|
132
|
+
id: "settings-migration-report",
|
|
133
|
+
icon: "list-checks",
|
|
134
|
+
label: i18n.baseText("settings.migrationReport"),
|
|
135
|
+
position: "top",
|
|
136
|
+
available: canUserAccessRouteByName(VIEWS.MIGRATION_REPORT),
|
|
137
|
+
route: { to: { name: VIEWS.MIGRATION_REPORT } }
|
|
138
|
+
});
|
|
139
|
+
const moduleItems = uiStore.settingsSidebarItems;
|
|
140
|
+
return menuItems.concat(moduleItems.filter((item) => !menuItems.some((m) => m.id === item.id)));
|
|
141
|
+
});
|
|
142
|
+
return { settingsItems: computed(() => settingsItems.value.filter((item) => item.available)) };
|
|
143
|
+
}
|
|
144
|
+
export { useSettingsItems as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { D as createElementBlock, P as defineComponent, et as openBlock, nt as provide, st as resolveDirective, vn as normalizeClass, xt as withDirectives, z as inject } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
3
|
+
import { tc as TelemetryContextSymbol } from "./constants-C8OH4tTq.js";
|
|
4
|
+
var MappingPill_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "MappingPill",
|
|
6
|
+
props: {
|
|
7
|
+
html: {},
|
|
8
|
+
canDrop: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
const _directive_n8n_html = resolveDirective("n8n-html");
|
|
16
|
+
return withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.$style.dragPill, _ctx.canDrop ? _ctx.$style.droppablePill : _ctx.$style.defaultPill]) }, null, 2)), [[_directive_n8n_html, _ctx.html]]);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
var MappingPill_vue_vue_type_style_index_0_lang_module_default = {
|
|
21
|
+
dragPill: "_dragPill_wasb1_123",
|
|
22
|
+
droppablePill: "_droppablePill_wasb1_141",
|
|
23
|
+
defaultPill: "_defaultPill_wasb1_148"
|
|
24
|
+
};
|
|
25
|
+
var MappingPill_default = /* @__PURE__ */ __plugin_vue_export_helper_default(MappingPill_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": MappingPill_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
26
|
+
function useTelemetryContext(overrides = {}) {
|
|
27
|
+
const merged = {
|
|
28
|
+
...inject(TelemetryContextSymbol, {}),
|
|
29
|
+
...overrides
|
|
30
|
+
};
|
|
31
|
+
provide(TelemetryContextSymbol, merged);
|
|
32
|
+
return merged;
|
|
33
|
+
}
|
|
34
|
+
export { MappingPill_default as n, useTelemetryContext as t };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { It as ref } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { rt as useI18n } from "./core-CRbPymLT.js";
|
|
3
|
+
import { P as useWorkflowsStore, aa as useUIStore, g as useNpsSurveyStore, k as useTelemetry, n as useWorkflowSaving, os as activateWorkflow, ps as useStorage, ss as deactivateWorkflow, x as useExternalHooks, y as useToast, zn as useWorkflowHelpers } from "./builder.store-Czk2ipDE.js";
|
|
4
|
+
import { v as useRouter } from "./get-BcEmeOxn.js";
|
|
5
|
+
import { Cs as LOCAL_STORAGE_ACTIVATION_FLAG, ps as WORKFLOW_ACTIVE_MODAL_KEY } from "./constants-C8OH4tTq.js";
|
|
6
|
+
import { r as useRootStore } from "./_baseOrderBy-N8Be_6z6.js";
|
|
7
|
+
function useWorkflowActivate() {
|
|
8
|
+
const updatingWorkflowActivation = ref(false);
|
|
9
|
+
const router = useRouter();
|
|
10
|
+
const workflowHelpers = useWorkflowHelpers();
|
|
11
|
+
const workflowSaving = useWorkflowSaving({ router });
|
|
12
|
+
const workflowsStore = useWorkflowsStore();
|
|
13
|
+
const uiStore = useUIStore();
|
|
14
|
+
const telemetry = useTelemetry();
|
|
15
|
+
const toast = useToast();
|
|
16
|
+
const i18n = useI18n();
|
|
17
|
+
const npsSurveyStore = useNpsSurveyStore();
|
|
18
|
+
const rootStore = useRootStore();
|
|
19
|
+
const updateWorkflowActivation = async (workflowId, newActiveState, telemetrySource) => {
|
|
20
|
+
updatingWorkflowActivation.value = true;
|
|
21
|
+
const nodesIssuesExist = workflowsStore.nodesIssuesExist;
|
|
22
|
+
let currWorkflowId = workflowId;
|
|
23
|
+
const existingWorkflow = currWorkflowId ? workflowsStore.workflowsById[currWorkflowId] : null;
|
|
24
|
+
if (!currWorkflowId || !existingWorkflow?.id) {
|
|
25
|
+
if (!await workflowSaving.saveCurrentWorkflow()) {
|
|
26
|
+
updatingWorkflowActivation.value = false;
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
currWorkflowId = workflowsStore.workflowId;
|
|
30
|
+
}
|
|
31
|
+
const isCurrentWorkflow = currWorkflowId === workflowsStore.workflowId;
|
|
32
|
+
const isWorkflowActive = workflowsStore.activeWorkflows.includes(currWorkflowId);
|
|
33
|
+
const telemetryPayload = {
|
|
34
|
+
workflow_id: currWorkflowId,
|
|
35
|
+
is_active: newActiveState,
|
|
36
|
+
previous_status: isWorkflowActive,
|
|
37
|
+
ndv_input: telemetrySource === "ndv"
|
|
38
|
+
};
|
|
39
|
+
telemetry.track("User set workflow active status", telemetryPayload);
|
|
40
|
+
useExternalHooks().run("workflowActivate.updateWorkflowActivation", telemetryPayload);
|
|
41
|
+
try {
|
|
42
|
+
if (isWorkflowActive && newActiveState) {
|
|
43
|
+
toast.showMessage({
|
|
44
|
+
title: i18n.baseText("workflowActivator.workflowIsActive"),
|
|
45
|
+
type: "success"
|
|
46
|
+
});
|
|
47
|
+
updatingWorkflowActivation.value = false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (isCurrentWorkflow && nodesIssuesExist && newActiveState) {
|
|
51
|
+
toast.showMessage({
|
|
52
|
+
title: i18n.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title"),
|
|
53
|
+
message: i18n.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message"),
|
|
54
|
+
type: "error"
|
|
55
|
+
});
|
|
56
|
+
updatingWorkflowActivation.value = false;
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (uiStore.stateIsDirty) await workflowHelpers.updateWorkflow({ workflowId: currWorkflowId }, false);
|
|
60
|
+
let workflow;
|
|
61
|
+
if (newActiveState) workflow = await activateWorkflow(rootStore.restApiContext, currWorkflowId, { versionId: workflowsStore.workflow.versionId });
|
|
62
|
+
else workflow = await deactivateWorkflow(rootStore.restApiContext, currWorkflowId);
|
|
63
|
+
if (!workflow.checksum) throw new Error("Failed to activate or deactivate workflow");
|
|
64
|
+
if (workflow.activeVersion) workflowsStore.setWorkflowActive(currWorkflowId, workflow.activeVersion, true);
|
|
65
|
+
else workflowsStore.setWorkflowInactive(currWorkflowId);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
const newStateName = newActiveState ? "activated" : "deactivated";
|
|
68
|
+
toast.showError(error, i18n.baseText("workflowActivator.showError.title", { interpolate: { newStateName } }) + ":");
|
|
69
|
+
updatingWorkflowActivation.value = false;
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
const activationEventName = isCurrentWorkflow ? "workflow.activeChangeCurrent" : "workflow.activeChange";
|
|
73
|
+
useExternalHooks().run(activationEventName, {
|
|
74
|
+
workflowId: currWorkflowId,
|
|
75
|
+
active: newActiveState
|
|
76
|
+
});
|
|
77
|
+
updatingWorkflowActivation.value = false;
|
|
78
|
+
if (isCurrentWorkflow) if (newActiveState && useStorage("N8N_HIDE_ACTIVATION_ALERT").value !== "true") uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);
|
|
79
|
+
else await npsSurveyStore.fetchPromptsData();
|
|
80
|
+
return newActiveState;
|
|
81
|
+
};
|
|
82
|
+
const activateCurrentWorkflow = async (telemetrySource) => {
|
|
83
|
+
const workflowId = workflowsStore.workflowId;
|
|
84
|
+
return await updateWorkflowActivation(workflowId, true, telemetrySource);
|
|
85
|
+
};
|
|
86
|
+
const publishWorkflow = async (workflowId, versionId, options) => {
|
|
87
|
+
updatingWorkflowActivation.value = true;
|
|
88
|
+
const hadPublishedVersion = !!workflowsStore.getWorkflowById(workflowId).activeVersion;
|
|
89
|
+
if (!hadPublishedVersion) {
|
|
90
|
+
const telemetryPayload = {
|
|
91
|
+
workflow_id: workflowId,
|
|
92
|
+
is_active: true,
|
|
93
|
+
previous_status: false,
|
|
94
|
+
ndv_input: false
|
|
95
|
+
};
|
|
96
|
+
useExternalHooks().run("workflowActivate.updateWorkflowActivation", telemetryPayload);
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
const expectedChecksum = workflowId === workflowsStore.workflowId ? workflowsStore.workflowChecksum : void 0;
|
|
100
|
+
const updatedWorkflow = await workflowsStore.publishWorkflow(workflowId, {
|
|
101
|
+
versionId,
|
|
102
|
+
name: options?.name,
|
|
103
|
+
description: options?.description,
|
|
104
|
+
expectedChecksum
|
|
105
|
+
});
|
|
106
|
+
if (!updatedWorkflow.activeVersion || !updatedWorkflow.checksum) throw new Error("Failed to publish workflow");
|
|
107
|
+
workflowsStore.setWorkflowActive(workflowId, updatedWorkflow.activeVersion, true);
|
|
108
|
+
if (workflowId === workflowsStore.workflowId) workflowsStore.setWorkflowVersionId(updatedWorkflow.versionId, updatedWorkflow.checksum);
|
|
109
|
+
useExternalHooks().run("workflow.published", {
|
|
110
|
+
workflowId,
|
|
111
|
+
versionId: updatedWorkflow.activeVersion.versionId
|
|
112
|
+
});
|
|
113
|
+
if (!hadPublishedVersion && useStorage("N8N_HIDE_ACTIVATION_ALERT").value !== "true") uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);
|
|
114
|
+
return true;
|
|
115
|
+
} catch (error) {
|
|
116
|
+
toast.showError(error, i18n.baseText("workflowActivator.showError.title", { interpolate: { newStateName: "published" } }) + ":");
|
|
117
|
+
if (!error.meta?.validationError) workflowsStore.setWorkflowInactive(workflowId);
|
|
118
|
+
return false;
|
|
119
|
+
} finally {
|
|
120
|
+
updatingWorkflowActivation.value = false;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const unpublishWorkflowFromHistory = async (workflowId) => {
|
|
124
|
+
updatingWorkflowActivation.value = true;
|
|
125
|
+
const telemetryPayload = {
|
|
126
|
+
workflow_id: workflowId,
|
|
127
|
+
is_active: false,
|
|
128
|
+
previous_status: !!workflowsStore.getWorkflowById(workflowId).activeVersion,
|
|
129
|
+
ndv_input: false
|
|
130
|
+
};
|
|
131
|
+
telemetry.track("User set workflow active status", telemetryPayload);
|
|
132
|
+
useExternalHooks().run("workflowActivate.updateWorkflowActivation", telemetryPayload);
|
|
133
|
+
try {
|
|
134
|
+
await workflowsStore.deactivateWorkflow(workflowId);
|
|
135
|
+
useExternalHooks().run("workflow.unpublished", { workflowId });
|
|
136
|
+
return true;
|
|
137
|
+
} catch (error) {
|
|
138
|
+
toast.showError(error, i18n.baseText("workflowActivator.showError.title", { interpolate: { newStateName: "deactivated" } }) + ":");
|
|
139
|
+
return false;
|
|
140
|
+
} finally {
|
|
141
|
+
updatingWorkflowActivation.value = false;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
return {
|
|
145
|
+
activateCurrentWorkflow,
|
|
146
|
+
updateWorkflowActivation,
|
|
147
|
+
updatingWorkflowActivation,
|
|
148
|
+
publishWorkflow,
|
|
149
|
+
unpublishWorkflowFromHistory
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export { useWorkflowActivate as t };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { It as ref } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { Da as jsonParse } from "./constants-C8OH4tTq.js";
|
|
3
|
+
async function indexedDbCache(dbName, storeName) {
|
|
4
|
+
let cache = {};
|
|
5
|
+
await loadCache();
|
|
6
|
+
async function loadCache() {
|
|
7
|
+
await transaction("readonly", async (store, db) => {
|
|
8
|
+
return await new Promise((resolve, reject) => {
|
|
9
|
+
const request = store.openCursor();
|
|
10
|
+
request.onsuccess = (event) => {
|
|
11
|
+
const cursor = event.target.result;
|
|
12
|
+
if (cursor) {
|
|
13
|
+
cache[cursor.key] = cursor.value.value;
|
|
14
|
+
cursor.continue();
|
|
15
|
+
} else {
|
|
16
|
+
db.close();
|
|
17
|
+
resolve();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
request.onerror = (event) => {
|
|
21
|
+
db.close();
|
|
22
|
+
reject(event);
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async function openDb() {
|
|
28
|
+
return await new Promise((resolve, reject) => {
|
|
29
|
+
const request = indexedDB.open(dbName, 1);
|
|
30
|
+
request.onupgradeneeded = () => {
|
|
31
|
+
request.result.createObjectStore(storeName, { keyPath: "key" });
|
|
32
|
+
};
|
|
33
|
+
request.onsuccess = () => resolve(request.result);
|
|
34
|
+
request.onerror = () => reject(request.error);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function setItem(key, value) {
|
|
38
|
+
cache[key] = value;
|
|
39
|
+
persistToIndexedDB(key, value);
|
|
40
|
+
}
|
|
41
|
+
function getItem(key) {
|
|
42
|
+
return cache[key] ?? null;
|
|
43
|
+
}
|
|
44
|
+
function removeItem(key) {
|
|
45
|
+
delete cache[key];
|
|
46
|
+
deleteFromIndexedDB(key);
|
|
47
|
+
}
|
|
48
|
+
function clear() {
|
|
49
|
+
cache = {};
|
|
50
|
+
clearIndexedDB();
|
|
51
|
+
}
|
|
52
|
+
async function getAllWithPrefix(prefix) {
|
|
53
|
+
const keyRange = IDBKeyRange.bound(prefix, prefix + "", false, false);
|
|
54
|
+
const results = {};
|
|
55
|
+
return await transaction("readonly", async (store) => {
|
|
56
|
+
return await new Promise((resolve, reject) => {
|
|
57
|
+
const request = store.openCursor(keyRange);
|
|
58
|
+
request.onsuccess = (event) => {
|
|
59
|
+
const cursor = event.target.result;
|
|
60
|
+
if (cursor) {
|
|
61
|
+
results[cursor.key] = cursor.value.value;
|
|
62
|
+
cursor.continue();
|
|
63
|
+
} else resolve(results);
|
|
64
|
+
};
|
|
65
|
+
request.onerror = () => {
|
|
66
|
+
reject(request.error);
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
async function transaction(mode, action) {
|
|
72
|
+
const db = await openDb();
|
|
73
|
+
const tx = db.transaction(storeName, mode);
|
|
74
|
+
const result = await action(tx.objectStore(storeName), db);
|
|
75
|
+
return await new Promise((resolve, reject) => {
|
|
76
|
+
tx.oncomplete = () => {
|
|
77
|
+
db.close();
|
|
78
|
+
resolve(result);
|
|
79
|
+
};
|
|
80
|
+
tx.onerror = () => {
|
|
81
|
+
db.close();
|
|
82
|
+
reject(tx.error);
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async function persistToIndexedDB(key, value) {
|
|
87
|
+
await transaction("readwrite", (store) => {
|
|
88
|
+
store.put({
|
|
89
|
+
key,
|
|
90
|
+
value
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async function deleteFromIndexedDB(key) {
|
|
95
|
+
await transaction("readwrite", (store) => {
|
|
96
|
+
store.delete(key);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
async function clearIndexedDB() {
|
|
100
|
+
await transaction("readwrite", (store) => {
|
|
101
|
+
store.clear();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
getItem,
|
|
106
|
+
removeItem,
|
|
107
|
+
setItem,
|
|
108
|
+
clear,
|
|
109
|
+
getAllWithPrefix
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function useWorkflowSettingsCache() {
|
|
113
|
+
const isCacheLoading = ref(true);
|
|
114
|
+
const cachePromise = ref(indexedDbCache("n8n-local", "workflows").finally(() => {
|
|
115
|
+
isCacheLoading.value = false;
|
|
116
|
+
}));
|
|
117
|
+
async function getWorkflowsCache() {
|
|
118
|
+
return await cachePromise.value;
|
|
119
|
+
}
|
|
120
|
+
async function getWorkflowSettings(workflowId) {
|
|
121
|
+
return jsonParse((await getWorkflowsCache()).getItem(workflowId) ?? "", { fallbackValue: {} });
|
|
122
|
+
}
|
|
123
|
+
async function getMergedWorkflowSettings(workflowId) {
|
|
124
|
+
const workflowSettings = await getWorkflowSettings(workflowId);
|
|
125
|
+
const globalPreferences = jsonParse((await getWorkflowsCache()).getItem("*") ?? "", { fallbackValue: {} });
|
|
126
|
+
workflowSettings.suggestedActions = {
|
|
127
|
+
...workflowSettings.suggestedActions ?? {},
|
|
128
|
+
...globalPreferences.suggestedActions ?? {}
|
|
129
|
+
};
|
|
130
|
+
return workflowSettings;
|
|
131
|
+
}
|
|
132
|
+
async function upsertWorkflowSettings(workflowId, updates) {
|
|
133
|
+
const cache = await getWorkflowsCache();
|
|
134
|
+
const existingSettings = await getWorkflowSettings(workflowId);
|
|
135
|
+
const updatedSettings = {
|
|
136
|
+
...existingSettings,
|
|
137
|
+
...updates
|
|
138
|
+
};
|
|
139
|
+
if (updates.suggestedActions) updatedSettings.suggestedActions = {
|
|
140
|
+
...existingSettings.suggestedActions ?? {},
|
|
141
|
+
...updates.suggestedActions
|
|
142
|
+
};
|
|
143
|
+
cache.setItem(workflowId, JSON.stringify(updatedSettings));
|
|
144
|
+
}
|
|
145
|
+
async function updateFirstActivatedAt(workflowId) {
|
|
146
|
+
if (!(await getWorkflowSettings(workflowId))?.firstActivatedAt) await upsertWorkflowSettings(workflowId, { firstActivatedAt: Date.now() });
|
|
147
|
+
}
|
|
148
|
+
async function ignoreSuggestedAction(workflowId, action) {
|
|
149
|
+
await upsertWorkflowSettings(workflowId, { suggestedActions: { [action]: { ignored: true } } });
|
|
150
|
+
}
|
|
151
|
+
async function getEvaluationPreferences(workflowId) {
|
|
152
|
+
return (await getWorkflowSettings(workflowId))?.evaluationRuns ?? {
|
|
153
|
+
order: [],
|
|
154
|
+
visibility: {}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
async function saveEvaluationPreferences(workflowId, evaluationRuns) {
|
|
158
|
+
await upsertWorkflowSettings(workflowId, { evaluationRuns });
|
|
159
|
+
}
|
|
160
|
+
async function ignoreAllSuggestedActionsForAllWorkflows(actionsToIgnore) {
|
|
161
|
+
await upsertWorkflowSettings("*", actionsToIgnore.reduce((accu, key) => {
|
|
162
|
+
accu.suggestedActions = accu.suggestedActions ?? {};
|
|
163
|
+
accu.suggestedActions[key] = { ignored: true };
|
|
164
|
+
return accu;
|
|
165
|
+
}, {}));
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
getWorkflowSettings,
|
|
169
|
+
getMergedWorkflowSettings,
|
|
170
|
+
upsertWorkflowSettings,
|
|
171
|
+
updateFirstActivatedAt,
|
|
172
|
+
ignoreSuggestedAction,
|
|
173
|
+
ignoreAllSuggestedActionsForAllWorkflows,
|
|
174
|
+
getEvaluationPreferences,
|
|
175
|
+
saveEvaluationPreferences,
|
|
176
|
+
isCacheLoading
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export { useWorkflowSettingsCache as t };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Ft as readonly, It as ref } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { Rs as getProvisioningConfig, zs as saveProvisioningConfig } from "./builder.store-Czk2ipDE.js";
|
|
3
|
+
import { k as defineStore, r as useRootStore } from "./_baseOrderBy-N8Be_6z6.js";
|
|
4
|
+
const useUserRoleProvisioningStore = defineStore("userRoleProvisioning", () => {
|
|
5
|
+
const rootStore = useRootStore();
|
|
6
|
+
const provisioningConfig = ref();
|
|
7
|
+
const getProvisioningConfig$1 = async () => {
|
|
8
|
+
try {
|
|
9
|
+
const config = await getProvisioningConfig(rootStore.restApiContext);
|
|
10
|
+
provisioningConfig.value = config;
|
|
11
|
+
return config;
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error("Failed to fetch provisioning config:", error);
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const saveProvisioningConfig$1 = async (config) => {
|
|
18
|
+
try {
|
|
19
|
+
const updatedConfig = await saveProvisioningConfig(rootStore.restApiContext, config);
|
|
20
|
+
provisioningConfig.value = updatedConfig;
|
|
21
|
+
return updatedConfig;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error("Failed to save provisioning config:", error);
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
provisioningConfig: readonly(provisioningConfig),
|
|
29
|
+
getProvisioningConfig: getProvisioningConfig$1,
|
|
30
|
+
saveProvisioningConfig: saveProvisioningConfig$1
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export { useUserRoleProvisioningStore as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { o as __toESM } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { t as require_dateformat } from "./dateformat-hG8NERse.js";
|
|
3
|
+
var import_dateformat = /* @__PURE__ */ __toESM(require_dateformat());
|
|
4
|
+
const getLastPublishedVersion = (workflowPublishHistory) => {
|
|
5
|
+
return workflowPublishHistory.findLast((history) => history.event === "activated");
|
|
6
|
+
};
|
|
7
|
+
const generateVersionName = (versionId) => {
|
|
8
|
+
return `Version ${versionId.substring(0, 8)}`;
|
|
9
|
+
};
|
|
10
|
+
const formatTimestamp = (value) => {
|
|
11
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
12
|
+
const [date, time] = (0, import_dateformat.default)(value, `${value.startsWith(currentYear) ? "" : "yyyy "}mmm d"#"HH:MM:ss`).split("#");
|
|
13
|
+
return {
|
|
14
|
+
date,
|
|
15
|
+
time
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
const computeTimelineEntries = (items) => {
|
|
19
|
+
const entries = [];
|
|
20
|
+
let currentGroup = [];
|
|
21
|
+
let groupCounter = 0;
|
|
22
|
+
const flushGroup = () => {
|
|
23
|
+
if (currentGroup.length > 0) {
|
|
24
|
+
entries.push({
|
|
25
|
+
type: "group-header",
|
|
26
|
+
groupId: `group-${groupCounter++}`,
|
|
27
|
+
count: currentGroup.length,
|
|
28
|
+
versions: [...currentGroup]
|
|
29
|
+
});
|
|
30
|
+
currentGroup = [];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
for (let i = 0; i < items.length; i++) {
|
|
34
|
+
const item = items[i];
|
|
35
|
+
if (!(i === 0) && !item.name?.trim()) currentGroup.push({
|
|
36
|
+
type: "version",
|
|
37
|
+
item,
|
|
38
|
+
originalIndex: i,
|
|
39
|
+
isGrouped: true
|
|
40
|
+
});
|
|
41
|
+
else {
|
|
42
|
+
flushGroup();
|
|
43
|
+
entries.push({
|
|
44
|
+
type: "version",
|
|
45
|
+
item,
|
|
46
|
+
originalIndex: i,
|
|
47
|
+
isGrouped: false
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
flushGroup();
|
|
52
|
+
return entries;
|
|
53
|
+
};
|
|
54
|
+
export { getLastPublishedVersion as i, formatTimestamp as n, generateVersionName as r, computeTimelineEntries as t };
|