@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,435 @@
|
|
|
1
|
+
import { o as __toESM } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { Bt as toRaw, C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, It as ref, M as createVNode, P as defineComponent, T as createBlock, _ as Fragment, bt as withCtx, et as openBlock, it as renderList, j as createTextVNode, vn as normalizeClass, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
3
|
+
import { rt as useI18n, s as useAsyncState } from "./core-CRbPymLT.js";
|
|
4
|
+
import { W as N8nFormInput_default, at as N8nLoading_default, bn as N8nText_default, ht as N8nTooltip_default, vn as N8nHeading_default, xn as N8nButton_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 { fn as require_sortBy, h as useMessage, k as useTelemetry, y as useToast } from "./builder.store-Czk2ipDE.js";
|
|
10
|
+
import "./empty-BuGRxzl4.js";
|
|
11
|
+
import { v as useRouter } from "./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 { Ro as VIEWS, ho as require_isEqual, rs as MODAL_CONFIRM } from "./constants-C8OH4tTq.js";
|
|
17
|
+
import "./merge-DhuTk1HM.js";
|
|
18
|
+
import "./_baseOrderBy-N8Be_6z6.js";
|
|
19
|
+
import "./dateformat-hG8NERse.js";
|
|
20
|
+
import "./useDebounce-Br5_1ug-.js";
|
|
21
|
+
import { t as useRolesStore } from "./roles.store-CRf_zJTb.js";
|
|
22
|
+
var import_isEqual = /* @__PURE__ */ __toESM(require_isEqual());
|
|
23
|
+
var import_sortBy = /* @__PURE__ */ __toESM(require_sortBy());
|
|
24
|
+
var _hoisted_1 = { key: 0 };
|
|
25
|
+
var _hoisted_2 = { style: { "flex": "1" } };
|
|
26
|
+
var _hoisted_3 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "mt-xl"
|
|
29
|
+
};
|
|
30
|
+
var ProjectRoleView_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
31
|
+
__name: "ProjectRoleView",
|
|
32
|
+
props: { roleSlug: {} },
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const rolesStore = useRolesStore();
|
|
35
|
+
const router = useRouter();
|
|
36
|
+
const { showError, showMessage } = useToast();
|
|
37
|
+
const i18n = useI18n();
|
|
38
|
+
const message = useMessage();
|
|
39
|
+
const telemetry = useTelemetry();
|
|
40
|
+
const props = __props;
|
|
41
|
+
const defaultForm = () => ({
|
|
42
|
+
displayName: "",
|
|
43
|
+
description: "",
|
|
44
|
+
scopes: structuredClone(toRaw(rolesStore.processedProjectRoles.find((role) => role.slug === "project:viewer")?.scopes || []))
|
|
45
|
+
});
|
|
46
|
+
const initialState = ref();
|
|
47
|
+
const { state: form, isLoading } = useAsyncState(async () => {
|
|
48
|
+
if (!props.roleSlug) return defaultForm();
|
|
49
|
+
try {
|
|
50
|
+
const role = await rolesStore.fetchRoleBySlug({ slug: props.roleSlug });
|
|
51
|
+
initialState.value = structuredClone(role);
|
|
52
|
+
return {
|
|
53
|
+
displayName: role.displayName,
|
|
54
|
+
description: role.description,
|
|
55
|
+
scopes: role.scopes
|
|
56
|
+
};
|
|
57
|
+
} catch (error) {
|
|
58
|
+
showError(error, "Error fetching role");
|
|
59
|
+
return defaultForm();
|
|
60
|
+
}
|
|
61
|
+
}, defaultForm(), { shallow: false });
|
|
62
|
+
const hasUnsavedChanges = computed(() => {
|
|
63
|
+
if (!initialState.value) return false;
|
|
64
|
+
if (!(0, import_isEqual.default)(initialState.value.displayName, form.value.displayName)) return true;
|
|
65
|
+
if (!(0, import_isEqual.default)(initialState.value.description ?? null, form.value.description || null)) return true;
|
|
66
|
+
if (!(0, import_isEqual.default)((0, import_sortBy.default)(initialState.value.scopes), (0, import_sortBy.default)(form.value.scopes))) return true;
|
|
67
|
+
return false;
|
|
68
|
+
});
|
|
69
|
+
function resetForm(payload) {
|
|
70
|
+
form.value = payload ? {
|
|
71
|
+
displayName: payload.displayName,
|
|
72
|
+
description: payload.description,
|
|
73
|
+
scopes: payload.scopes
|
|
74
|
+
} : defaultForm();
|
|
75
|
+
}
|
|
76
|
+
const project = [
|
|
77
|
+
"read",
|
|
78
|
+
"update",
|
|
79
|
+
"delete"
|
|
80
|
+
].map((action) => `project:${action}`);
|
|
81
|
+
const folder = [
|
|
82
|
+
"read",
|
|
83
|
+
"update",
|
|
84
|
+
"create",
|
|
85
|
+
"move",
|
|
86
|
+
"delete"
|
|
87
|
+
].map((action) => `folder:${action}`);
|
|
88
|
+
const workflow = [
|
|
89
|
+
"read",
|
|
90
|
+
"update",
|
|
91
|
+
"create",
|
|
92
|
+
"publish",
|
|
93
|
+
"move",
|
|
94
|
+
"delete"
|
|
95
|
+
].map((action) => `workflow:${action}`);
|
|
96
|
+
const credential = [
|
|
97
|
+
"read",
|
|
98
|
+
"update",
|
|
99
|
+
"create",
|
|
100
|
+
"share",
|
|
101
|
+
"move",
|
|
102
|
+
"delete"
|
|
103
|
+
].map((action) => `credential:${action}`);
|
|
104
|
+
const sourceControl = ["push"].map((action) => `sourceControl:${action}`);
|
|
105
|
+
const dataTable = [
|
|
106
|
+
"read",
|
|
107
|
+
"readRow",
|
|
108
|
+
"update",
|
|
109
|
+
"writeRow",
|
|
110
|
+
"create",
|
|
111
|
+
"delete"
|
|
112
|
+
].map((action) => `dataTable:${action}`);
|
|
113
|
+
const projectVariable = [
|
|
114
|
+
"read",
|
|
115
|
+
"update",
|
|
116
|
+
"create",
|
|
117
|
+
"delete"
|
|
118
|
+
].map((action) => `projectVariable:${action}`);
|
|
119
|
+
const scopeTypes = [
|
|
120
|
+
"project",
|
|
121
|
+
"folder",
|
|
122
|
+
"workflow",
|
|
123
|
+
"credential",
|
|
124
|
+
"dataTable",
|
|
125
|
+
"projectVariable",
|
|
126
|
+
"sourceControl"
|
|
127
|
+
];
|
|
128
|
+
const scopes = {
|
|
129
|
+
project,
|
|
130
|
+
folder,
|
|
131
|
+
workflow,
|
|
132
|
+
credential,
|
|
133
|
+
sourceControl,
|
|
134
|
+
dataTable,
|
|
135
|
+
projectVariable
|
|
136
|
+
};
|
|
137
|
+
function toggleScope(scope) {
|
|
138
|
+
const index = form.value.scopes.indexOf(scope);
|
|
139
|
+
if (index !== -1) form.value.scopes.splice(index, 1);
|
|
140
|
+
else form.value.scopes.push(scope);
|
|
141
|
+
if (scope.startsWith("dataTable:") && scope.endsWith(":read")) {
|
|
142
|
+
toggleScope(scope.replace(":read", ":listProject"));
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (scope.endsWith(":read")) toggleScope(scope.replace(":read", ":list"));
|
|
146
|
+
if (scope === "workflow:update") toggleScope("workflow:execute");
|
|
147
|
+
}
|
|
148
|
+
async function createProjectRole() {
|
|
149
|
+
try {
|
|
150
|
+
const role = await rolesStore.createProjectRole({
|
|
151
|
+
...form.value,
|
|
152
|
+
description: form.value.description ?? void 0,
|
|
153
|
+
roleType: "project"
|
|
154
|
+
});
|
|
155
|
+
rolesStore.fetchRoles();
|
|
156
|
+
telemetry.track("User successfully created new role", {
|
|
157
|
+
role_id: role.slug,
|
|
158
|
+
role_name: role.displayName,
|
|
159
|
+
permissions: role.scopes
|
|
160
|
+
});
|
|
161
|
+
router.replace({
|
|
162
|
+
name: VIEWS.PROJECT_ROLE_SETTINGS,
|
|
163
|
+
params: { roleSlug: role.slug }
|
|
164
|
+
});
|
|
165
|
+
showMessage({
|
|
166
|
+
type: "success",
|
|
167
|
+
message: i18n.baseText("projectRoles.action.create.success")
|
|
168
|
+
});
|
|
169
|
+
initialState.value = structuredClone(role);
|
|
170
|
+
return role;
|
|
171
|
+
} catch (error) {
|
|
172
|
+
showError(error, i18n.baseText("projectRoles.action.create.error"));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
async function confirmRoleUpdate(usedByUsers) {
|
|
177
|
+
if (!usedByUsers) return true;
|
|
178
|
+
return await message.confirm(i18n.baseText("projectRoles.action.update.text", { interpolate: { count: usedByUsers } }), i18n.baseText("projectRoles.action.update.title", { interpolate: { count: usedByUsers } }), {
|
|
179
|
+
type: "warning",
|
|
180
|
+
confirmButtonText: i18n.baseText("projectRoles.action.update"),
|
|
181
|
+
cancelButtonText: i18n.baseText("projectRoles.action.cancel")
|
|
182
|
+
}) === MODAL_CONFIRM;
|
|
183
|
+
}
|
|
184
|
+
async function updateProjectRole(slug) {
|
|
185
|
+
if (!await confirmRoleUpdate(initialState?.value?.usedByUsers)) return;
|
|
186
|
+
try {
|
|
187
|
+
const role = await rolesStore.updateProjectRole(slug, {
|
|
188
|
+
...form.value,
|
|
189
|
+
description: form.value.description ?? void 0
|
|
190
|
+
});
|
|
191
|
+
rolesStore.fetchRoles();
|
|
192
|
+
telemetry.track("User updated role", {
|
|
193
|
+
role_id: role.slug,
|
|
194
|
+
role_name: role.displayName,
|
|
195
|
+
permissions_from: initialState.value?.scopes,
|
|
196
|
+
permissions_to: role.scopes
|
|
197
|
+
});
|
|
198
|
+
initialState.value = structuredClone(role);
|
|
199
|
+
showMessage({
|
|
200
|
+
type: "success",
|
|
201
|
+
message: i18n.baseText("projectRoles.action.update.success")
|
|
202
|
+
});
|
|
203
|
+
return role;
|
|
204
|
+
} catch (error) {
|
|
205
|
+
showError(error, i18n.baseText("projectRoles.action.update.error"));
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function handleSubmit() {
|
|
210
|
+
if (props.roleSlug) await updateProjectRole(props.roleSlug);
|
|
211
|
+
else await createProjectRole();
|
|
212
|
+
}
|
|
213
|
+
function setPreset(slug) {
|
|
214
|
+
const preset = rolesStore.processedProjectRoles.find((role) => role.slug === slug);
|
|
215
|
+
if (!preset) return;
|
|
216
|
+
form.value.scopes = structuredClone(toRaw(preset.scopes));
|
|
217
|
+
}
|
|
218
|
+
async function deleteRole() {
|
|
219
|
+
if (!initialState?.value) return;
|
|
220
|
+
if (await message.confirm(i18n.baseText("projectRoles.action.delete.text", { interpolate: { roleName: initialState.value.displayName } }), i18n.baseText("projectRoles.action.delete.title", { interpolate: { roleName: initialState.value.displayName } }), {
|
|
221
|
+
type: "warning",
|
|
222
|
+
confirmButtonText: i18n.baseText("projectRoles.action.delete"),
|
|
223
|
+
cancelButtonText: i18n.baseText("projectRoles.action.cancel")
|
|
224
|
+
}) !== "confirm") return;
|
|
225
|
+
telemetry.track("User clicked delete role", {
|
|
226
|
+
role_id: initialState.value.slug,
|
|
227
|
+
role_name: initialState.value.displayName,
|
|
228
|
+
permissions: initialState.value?.scopes
|
|
229
|
+
});
|
|
230
|
+
try {
|
|
231
|
+
await rolesStore.deleteProjectRole(initialState.value.slug);
|
|
232
|
+
const index = rolesStore.roles.project.findIndex((role) => role.slug === initialState.value?.slug);
|
|
233
|
+
if (index !== -1) rolesStore.roles.project.splice(index, 1);
|
|
234
|
+
showMessage({
|
|
235
|
+
title: i18n.baseText("projectRoles.action.delete.success"),
|
|
236
|
+
type: "success"
|
|
237
|
+
});
|
|
238
|
+
telemetry.track("User successfully deleted role", {
|
|
239
|
+
role_id: initialState.value.slug,
|
|
240
|
+
role_name: initialState.value.displayName,
|
|
241
|
+
permissions: initialState.value?.scopes
|
|
242
|
+
});
|
|
243
|
+
router.back();
|
|
244
|
+
} catch (error) {
|
|
245
|
+
showError(error, i18n.baseText("projectRoles.action.delete.error"));
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
const displayNameValidationRules = [{ name: "REQUIRED" }, {
|
|
250
|
+
name: "MIN_LENGTH",
|
|
251
|
+
config: { minimum: 2 }
|
|
252
|
+
}];
|
|
253
|
+
return (_ctx, _cache) => {
|
|
254
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["pb-xl", _ctx.$style.container]) }, [
|
|
255
|
+
createVNode(unref(N8nButton_default), {
|
|
256
|
+
icon: "arrow-left",
|
|
257
|
+
type: "secondary",
|
|
258
|
+
class: normalizeClass(_ctx.$style.backButton),
|
|
259
|
+
text: "",
|
|
260
|
+
onClick: _cache[0] || (_cache[0] = () => unref(router).back())
|
|
261
|
+
}, {
|
|
262
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.backToRoleList")), 1)]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["class"]),
|
|
265
|
+
createBaseVNode("div", { class: normalizeClass(["mb-xl", _ctx.$style.headerContainer]) }, [createVNode(unref(N8nHeading_default), {
|
|
266
|
+
tag: "h1",
|
|
267
|
+
size: "2xlarge"
|
|
268
|
+
}, {
|
|
269
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.roleSlug ? `Role "${unref(form).displayName}"` : unref(i18n).baseText("projectRoles.newRole")), 1)]),
|
|
270
|
+
_: 1
|
|
271
|
+
}), initialState.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(N8nButton_default), {
|
|
272
|
+
type: "secondary",
|
|
273
|
+
disabled: !hasUnsavedChanges.value,
|
|
274
|
+
class: "mr-xs",
|
|
275
|
+
onClick: _cache[1] || (_cache[1] = ($event) => resetForm(initialState.value))
|
|
276
|
+
}, {
|
|
277
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.discardChanges")), 1)]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["disabled"]), createVNode(unref(N8nButton_default), {
|
|
280
|
+
disabled: !hasUnsavedChanges.value,
|
|
281
|
+
onClick: handleSubmit
|
|
282
|
+
}, {
|
|
283
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.save")), 1)]),
|
|
284
|
+
_: 1
|
|
285
|
+
}, 8, ["disabled"])])) : (openBlock(), createBlock(unref(N8nButton_default), {
|
|
286
|
+
key: 1,
|
|
287
|
+
onClick: handleSubmit
|
|
288
|
+
}, {
|
|
289
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.create")), 1)]),
|
|
290
|
+
_: 1
|
|
291
|
+
}))], 2),
|
|
292
|
+
createBaseVNode("div", { class: normalizeClass(["mb-l", _ctx.$style.formContainer]) }, [createVNode(unref(N8nFormInput_default), {
|
|
293
|
+
modelValue: unref(form).displayName,
|
|
294
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(form).displayName = $event),
|
|
295
|
+
label: unref(i18n).baseText("projectRoles.roleName"),
|
|
296
|
+
"validate-on-blur": "",
|
|
297
|
+
"validation-rules": displayNameValidationRules,
|
|
298
|
+
class: "mb-s",
|
|
299
|
+
"show-required-asterisk": "",
|
|
300
|
+
required: "",
|
|
301
|
+
maxlength: 100
|
|
302
|
+
}, null, 8, ["modelValue", "label"]), createVNode(unref(N8nFormInput_default), {
|
|
303
|
+
modelValue: unref(form).description,
|
|
304
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(form).description = $event),
|
|
305
|
+
label: unref(i18n).baseText("projectRoles.description"),
|
|
306
|
+
placeholder: unref(i18n).baseText("projectRoles.optional"),
|
|
307
|
+
type: "textarea",
|
|
308
|
+
maxlength: 500,
|
|
309
|
+
autosize: {
|
|
310
|
+
minRows: 2,
|
|
311
|
+
maxRows: 4
|
|
312
|
+
}
|
|
313
|
+
}, null, 8, [
|
|
314
|
+
"modelValue",
|
|
315
|
+
"label",
|
|
316
|
+
"placeholder"
|
|
317
|
+
])], 2),
|
|
318
|
+
createVNode(unref(N8nHeading_default), {
|
|
319
|
+
tag: "h2",
|
|
320
|
+
size: "xlarge",
|
|
321
|
+
class: "mb-s"
|
|
322
|
+
}, {
|
|
323
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.permissions")), 1)]),
|
|
324
|
+
_: 1
|
|
325
|
+
}),
|
|
326
|
+
createVNode(unref(N8nText_default), {
|
|
327
|
+
color: "text-light",
|
|
328
|
+
class: "mb-2xs",
|
|
329
|
+
tag: "p"
|
|
330
|
+
}, {
|
|
331
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.preset")), 1)]),
|
|
332
|
+
_: 1
|
|
333
|
+
}),
|
|
334
|
+
createBaseVNode("div", { class: normalizeClass(["mb-s", _ctx.$style.presetsContainer]) }, [
|
|
335
|
+
createVNode(unref(N8nButton_default), {
|
|
336
|
+
type: "secondary",
|
|
337
|
+
onClick: _cache[4] || (_cache[4] = ($event) => setPreset("project:admin"))
|
|
338
|
+
}, {
|
|
339
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.admin")), 1)]),
|
|
340
|
+
_: 1
|
|
341
|
+
}),
|
|
342
|
+
createVNode(unref(N8nButton_default), {
|
|
343
|
+
type: "secondary",
|
|
344
|
+
onClick: _cache[5] || (_cache[5] = ($event) => setPreset("project:editor"))
|
|
345
|
+
}, {
|
|
346
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.editor")), 1)]),
|
|
347
|
+
_: 1
|
|
348
|
+
}),
|
|
349
|
+
createVNode(unref(N8nButton_default), {
|
|
350
|
+
type: "secondary",
|
|
351
|
+
onClick: _cache[6] || (_cache[6] = ($event) => setPreset("project:viewer"))
|
|
352
|
+
}, {
|
|
353
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.viewer")), 1)]),
|
|
354
|
+
_: 1
|
|
355
|
+
})
|
|
356
|
+
], 2),
|
|
357
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.cardContainer) }, [(openBlock(), createElementBlock(Fragment, null, renderList(scopeTypes, (type) => {
|
|
358
|
+
return createBaseVNode("div", {
|
|
359
|
+
key: type,
|
|
360
|
+
class: normalizeClass(["mb-s mt-s", _ctx.$style.card])
|
|
361
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.cardTitle) }, toDisplayString(unref(i18n).baseText(`projectRoles.type.${type}`)), 3), createBaseVNode("div", _hoisted_2, [unref(isLoading) ? (openBlock(), createBlock(unref(N8nLoading_default), {
|
|
362
|
+
key: 0,
|
|
363
|
+
rows: scopes[type].length,
|
|
364
|
+
"shrink-last": false
|
|
365
|
+
}, null, 8, ["rows"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(scopes[type], (scope) => {
|
|
366
|
+
return openBlock(), createElementBlock("div", {
|
|
367
|
+
key: scope,
|
|
368
|
+
class: "mb-2xs"
|
|
369
|
+
}, [createVNode(unref(N8nTooltip_default), {
|
|
370
|
+
content: unref(i18n).baseText(`projectRoles.${scope}.tooltip`),
|
|
371
|
+
placement: "right",
|
|
372
|
+
enterable: false,
|
|
373
|
+
"show-after": 250
|
|
374
|
+
}, {
|
|
375
|
+
default: withCtx(() => [createVNode(unref(N8nFormInput_default), {
|
|
376
|
+
"data-test-id": `scope-checkbox-${scope}`,
|
|
377
|
+
"model-value": unref(form).scopes.includes(scope),
|
|
378
|
+
label: unref(i18n).baseText(`projectRoles.${scope}`),
|
|
379
|
+
"validate-on-blur": "",
|
|
380
|
+
type: "checkbox",
|
|
381
|
+
class: normalizeClass(_ctx.$style.checkbox),
|
|
382
|
+
"onUpdate:modelValue": () => toggleScope(scope)
|
|
383
|
+
}, null, 8, [
|
|
384
|
+
"data-test-id",
|
|
385
|
+
"model-value",
|
|
386
|
+
"label",
|
|
387
|
+
"class",
|
|
388
|
+
"onUpdate:modelValue"
|
|
389
|
+
])]),
|
|
390
|
+
_: 2
|
|
391
|
+
}, 1032, ["content"])]);
|
|
392
|
+
}), 128))])], 2);
|
|
393
|
+
}), 64))], 2),
|
|
394
|
+
_ctx.roleSlug && !initialState.value?.systemRole ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
395
|
+
createVNode(unref(N8nHeading_default), {
|
|
396
|
+
tag: "h2",
|
|
397
|
+
class: "mb-2xs",
|
|
398
|
+
size: "large"
|
|
399
|
+
}, {
|
|
400
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.dangerZone")), 1)]),
|
|
401
|
+
_: 1
|
|
402
|
+
}),
|
|
403
|
+
createVNode(unref(N8nText_default), {
|
|
404
|
+
tag: "p",
|
|
405
|
+
class: "mb-s"
|
|
406
|
+
}, {
|
|
407
|
+
default: withCtx(() => [initialState.value?.usedByUsers ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.action.delete.useWarning", { interpolate: { count: initialState.value.usedByUsers } })), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.action.delete.warning")), 1)], 64))]),
|
|
408
|
+
_: 1
|
|
409
|
+
}),
|
|
410
|
+
createVNode(unref(N8nButton_default), {
|
|
411
|
+
type: "danger",
|
|
412
|
+
disabled: Boolean(initialState.value?.usedByUsers),
|
|
413
|
+
onClick: deleteRole
|
|
414
|
+
}, {
|
|
415
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.action.delete.button")), 1)]),
|
|
416
|
+
_: 1
|
|
417
|
+
}, 8, ["disabled"])
|
|
418
|
+
])) : createCommentVNode("", true)
|
|
419
|
+
], 2);
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
var ProjectRoleView_vue_vue_type_style_index_0_lang_module_default = {
|
|
424
|
+
container: "_container_14r2u_2",
|
|
425
|
+
cardContainer: "_cardContainer_14r2u_9",
|
|
426
|
+
card: "_card_14r2u_9",
|
|
427
|
+
cardTitle: "_cardTitle_14r2u_28",
|
|
428
|
+
backButton: "_backButton_14r2u_32",
|
|
429
|
+
headerContainer: "_headerContainer_14r2u_38",
|
|
430
|
+
formContainer: "_formContainer_14r2u_44",
|
|
431
|
+
presetsContainer: "_presetsContainer_14r2u_48",
|
|
432
|
+
checkbox: "_checkbox_14r2u_53"
|
|
433
|
+
};
|
|
434
|
+
var ProjectRoleView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ProjectRoleView_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ProjectRoleView_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
435
|
+
export { ProjectRoleView_default as default };
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { o as __toESM } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, It as ref, M as createVNode, P as defineComponent, T as createBlock, Z as onMounted, _ as Fragment, bt as withCtx, c as useCssModule, et as openBlock, j as createTextVNode, vn as normalizeClass, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
3
|
+
import { rt as useI18n } from "./core-CRbPymLT.js";
|
|
4
|
+
import { Cn as N8nIcon_default, Ct as N8nActionBox_default, bn as N8nText_default, it as N8nActionToggle_default, u as N8nDataTableServer_default, vn as N8nHeading_default, x as N8nTag_default, xn as N8nButton_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 { Xn as useDocumentTitle, h as useMessage, k as useTelemetry, ms as useSettingsStore, y as useToast } from "./builder.store-Czk2ipDE.js";
|
|
10
|
+
import "./empty-BuGRxzl4.js";
|
|
11
|
+
import { v as useRouter } from "./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 { Ro as VIEWS, rs as MODAL_CONFIRM } from "./constants-C8OH4tTq.js";
|
|
17
|
+
import "./merge-DhuTk1HM.js";
|
|
18
|
+
import "./_baseOrderBy-N8Be_6z6.js";
|
|
19
|
+
import { t as require_dateformat } from "./dateformat-hG8NERse.js";
|
|
20
|
+
import "./useDebounce-Br5_1ug-.js";
|
|
21
|
+
import "./versions.store-B1z2OrLE.js";
|
|
22
|
+
import { t as usePageRedirectionHelper } from "./usePageRedirectionHelper-DjkznpX6.js";
|
|
23
|
+
import { t as useRolesStore } from "./roles.store-CRf_zJTb.js";
|
|
24
|
+
var import_dateformat = /* @__PURE__ */ __toESM(require_dateformat());
|
|
25
|
+
var _hoisted_1 = { class: "pb-xl" };
|
|
26
|
+
var ProjectRolesView_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
27
|
+
__name: "ProjectRolesView",
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const { showError, showMessage } = useToast();
|
|
30
|
+
const rolesStore = useRolesStore();
|
|
31
|
+
const router = useRouter();
|
|
32
|
+
const message = useMessage();
|
|
33
|
+
const i18n = useI18n();
|
|
34
|
+
const $style = useCssModule();
|
|
35
|
+
const settingsStore = useSettingsStore();
|
|
36
|
+
const { goToUpgrade } = usePageRedirectionHelper();
|
|
37
|
+
const telemetry = useTelemetry();
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
useDocumentTitle().set(i18n.baseText("settings.projectRoles"));
|
|
40
|
+
});
|
|
41
|
+
const headers = ref([
|
|
42
|
+
{
|
|
43
|
+
title: i18n.baseText("projectRoles.sourceControl.table.name"),
|
|
44
|
+
key: "displayName",
|
|
45
|
+
width: 400,
|
|
46
|
+
disableSort: true,
|
|
47
|
+
resize: false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: i18n.baseText("projectRoles.sourceControl.table.type"),
|
|
51
|
+
key: "systemRole",
|
|
52
|
+
disableSort: true,
|
|
53
|
+
resize: false
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: i18n.baseText("projectRoles.sourceControl.table.assignedTo"),
|
|
57
|
+
key: "usedByUsers",
|
|
58
|
+
disableSort: true,
|
|
59
|
+
align: "end",
|
|
60
|
+
value: (item) => item.usedByUsers ?? 0,
|
|
61
|
+
width: 75,
|
|
62
|
+
resize: false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: i18n.baseText("projectRoles.sourceControl.table.lastEdited"),
|
|
66
|
+
key: "updatedAt",
|
|
67
|
+
value: (item) => item.updatedAt && !item.systemRole ? (0, import_dateformat.default)(item.updatedAt, "d mmm, yyyy") : "—",
|
|
68
|
+
disableSort: true,
|
|
69
|
+
resize: false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: "",
|
|
73
|
+
key: "actions",
|
|
74
|
+
value: () => "",
|
|
75
|
+
width: 50,
|
|
76
|
+
minWidth: 50,
|
|
77
|
+
disableSort: true,
|
|
78
|
+
align: "center",
|
|
79
|
+
resize: false
|
|
80
|
+
}
|
|
81
|
+
]);
|
|
82
|
+
async function deleteRole(item) {
|
|
83
|
+
i18n.baseText("projectRoles.action.delete.text", { interpolate: { roleName: item.displayName } });
|
|
84
|
+
if (await message.confirm(i18n.baseText("projectRoles.action.delete.text", { interpolate: { roleName: item.displayName } }), i18n.baseText("projectRoles.action.delete.title", { interpolate: { roleName: item.displayName } }), {
|
|
85
|
+
type: "warning",
|
|
86
|
+
confirmButtonText: i18n.baseText("projectRoles.action.delete"),
|
|
87
|
+
cancelButtonText: i18n.baseText("projectRoles.action.cancel")
|
|
88
|
+
}) !== "confirm") return;
|
|
89
|
+
try {
|
|
90
|
+
await rolesStore.deleteProjectRole(item.slug);
|
|
91
|
+
const index = rolesStore.roles.project.findIndex((role) => role.slug === item.slug);
|
|
92
|
+
if (index !== -1) rolesStore.roles.project.splice(index, 1);
|
|
93
|
+
showMessage({
|
|
94
|
+
title: i18n.baseText("projectRoles.action.delete.success"),
|
|
95
|
+
type: "success"
|
|
96
|
+
});
|
|
97
|
+
} catch (error) {
|
|
98
|
+
showError(error, i18n.baseText("projectRoles.action.delete.error"));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async function duplicateRole(item) {
|
|
103
|
+
try {
|
|
104
|
+
const displayName = i18n.baseText("projectRoles.action.duplicate.name", { interpolate: { roleName: item.displayName } });
|
|
105
|
+
const role = await rolesStore.createProjectRole({
|
|
106
|
+
displayName,
|
|
107
|
+
description: item.description ?? void 0,
|
|
108
|
+
roleType: "project",
|
|
109
|
+
scopes: item.scopes
|
|
110
|
+
});
|
|
111
|
+
rolesStore.roles.project.push(role);
|
|
112
|
+
rolesStore.fetchRoles();
|
|
113
|
+
telemetry.track("User duplicated role", {
|
|
114
|
+
role_id: item.slug,
|
|
115
|
+
role_name: item.displayName,
|
|
116
|
+
permissions: item.scopes
|
|
117
|
+
});
|
|
118
|
+
showMessage({
|
|
119
|
+
type: "success",
|
|
120
|
+
message: i18n.baseText("projectRoles.action.duplicate.success", { interpolate: {
|
|
121
|
+
roleName: item.displayName,
|
|
122
|
+
roleDuplicateName: displayName
|
|
123
|
+
} })
|
|
124
|
+
});
|
|
125
|
+
return role;
|
|
126
|
+
} catch (error) {
|
|
127
|
+
showError(error, i18n.baseText("projectRoles.action.duplicate.error"));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const actions = {
|
|
132
|
+
duplicate: duplicateRole,
|
|
133
|
+
delete: deleteRole
|
|
134
|
+
};
|
|
135
|
+
function rowProps(row) {
|
|
136
|
+
const className = [$style.tallRow];
|
|
137
|
+
if (!row.systemRole) className.push($style.clickableRow);
|
|
138
|
+
return { class: className };
|
|
139
|
+
}
|
|
140
|
+
function rowActions(item) {
|
|
141
|
+
return [{
|
|
142
|
+
label: i18n.baseText("projectRoles.action.duplicate"),
|
|
143
|
+
value: "duplicate"
|
|
144
|
+
}, {
|
|
145
|
+
label: i18n.baseText("projectRoles.action.delete"),
|
|
146
|
+
value: "delete",
|
|
147
|
+
disabled: item.usedByUsers !== 0
|
|
148
|
+
}];
|
|
149
|
+
}
|
|
150
|
+
function handleAction(action, item) {
|
|
151
|
+
actions[action](item);
|
|
152
|
+
}
|
|
153
|
+
function handleRowClick(item) {
|
|
154
|
+
if (item.systemRole) return;
|
|
155
|
+
router.push({
|
|
156
|
+
name: VIEWS.PROJECT_ROLE_SETTINGS,
|
|
157
|
+
params: { roleSlug: item.slug }
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function addRole() {
|
|
161
|
+
telemetry.track("User clicked add role");
|
|
162
|
+
router.push({ name: VIEWS.PROJECT_NEW_ROLE });
|
|
163
|
+
}
|
|
164
|
+
return (_ctx, _cache) => {
|
|
165
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createBaseVNode("div", { class: normalizeClass(["mb-xl", unref($style).headerContainer]) }, [createBaseVNode("div", { class: normalizeClass(unref($style).headerTitle) }, [createVNode(unref(N8nHeading_default), {
|
|
166
|
+
tag: "h1",
|
|
167
|
+
size: "2xlarge"
|
|
168
|
+
}, {
|
|
169
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("settings.projectRoles")), 1)]),
|
|
170
|
+
_: 1
|
|
171
|
+
}), createVNode(unref(N8nTag_default), {
|
|
172
|
+
clickable: false,
|
|
173
|
+
text: "Beta"
|
|
174
|
+
})], 2), unref(settingsStore).isCustomRolesFeatureEnabled ? (openBlock(), createBlock(unref(N8nButton_default), {
|
|
175
|
+
key: 0,
|
|
176
|
+
type: "secondary",
|
|
177
|
+
onClick: addRole
|
|
178
|
+
}, {
|
|
179
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.addRole")), 1)]),
|
|
180
|
+
_: 1
|
|
181
|
+
})) : createCommentVNode("", true)], 2), !unref(settingsStore).isCustomRolesFeatureEnabled ? (openBlock(), createBlock(unref(N8nActionBox_default), {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: "mt-2xl mb-l",
|
|
184
|
+
"button-text": unref(i18n).baseText("settings.externalSecrets.actionBox.buttonText"),
|
|
185
|
+
description: "yes",
|
|
186
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(goToUpgrade)("custom-roles", "upgrade-custom-roles"))
|
|
187
|
+
}, {
|
|
188
|
+
heading: withCtx(() => [createBaseVNode("span", null, toDisplayString(unref(i18n).baseText("projectRoles.manageRoles.paywall.title")), 1)]),
|
|
189
|
+
description: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.manageRoles.paywall.text")), 1)]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["button-text"])) : (openBlock(), createBlock(unref(N8nDataTableServer_default), {
|
|
192
|
+
key: 1,
|
|
193
|
+
items: unref(rolesStore).processedProjectRoles,
|
|
194
|
+
headers: headers.value,
|
|
195
|
+
"items-length": unref(rolesStore).processedProjectRoles.length,
|
|
196
|
+
"items-per-page": unref(rolesStore).processedProjectRoles.length,
|
|
197
|
+
"page-sizes": [unref(rolesStore).processedProjectRoles.length],
|
|
198
|
+
"row-props": rowProps,
|
|
199
|
+
"onClick:row": _cache[1] || (_cache[1] = (_event, { item }) => handleRowClick(item))
|
|
200
|
+
}, {
|
|
201
|
+
[`item.displayName`]: withCtx(({ item }) => [createVNode(unref(N8nText_default), {
|
|
202
|
+
tag: "div",
|
|
203
|
+
class: "mb-4xs"
|
|
204
|
+
}, {
|
|
205
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.displayName), 1)]),
|
|
206
|
+
_: 2
|
|
207
|
+
}, 1024), createVNode(unref(N8nText_default), {
|
|
208
|
+
tag: "div",
|
|
209
|
+
size: "small",
|
|
210
|
+
color: "text-light"
|
|
211
|
+
}, {
|
|
212
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.description), 1)]),
|
|
213
|
+
_: 2
|
|
214
|
+
}, 1024)]),
|
|
215
|
+
[`item.systemRole`]: withCtx(({ item }) => [item.systemRole ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(N8nIcon_default), { icon: "lock" }), createTextVNode(" " + toDisplayString(unref(i18n).baseText("projectRoles.literal.system")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(i18n).baseText("projectRoles.literal.custom")), 1)], 64))]),
|
|
216
|
+
[`item.actions`]: withCtx(({ item }) => [!item.systemRole ? (openBlock(), createBlock(unref(N8nActionToggle_default), {
|
|
217
|
+
key: 0,
|
|
218
|
+
actions: rowActions(item),
|
|
219
|
+
onAction: ($event) => handleAction($event, item)
|
|
220
|
+
}, null, 8, ["actions", "onAction"])) : createCommentVNode("", true)]),
|
|
221
|
+
_: 2
|
|
222
|
+
}, 1032, [
|
|
223
|
+
"items",
|
|
224
|
+
"headers",
|
|
225
|
+
"items-length",
|
|
226
|
+
"items-per-page",
|
|
227
|
+
"page-sizes"
|
|
228
|
+
]))]);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
var ProjectRolesView_vue_vue_type_style_index_0_lang_module_default = {
|
|
233
|
+
headerContainer: "_headerContainer_1yma8_2",
|
|
234
|
+
headerTitle: "_headerTitle_1yma8_8",
|
|
235
|
+
clickableRow: "_clickableRow_1yma8_14",
|
|
236
|
+
tallRow: "_tallRow_1yma8_18"
|
|
237
|
+
};
|
|
238
|
+
var ProjectRolesView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ProjectRolesView_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ProjectRolesView_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
239
|
+
export { ProjectRolesView_default as default };
|