@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.
Files changed (310) hide show
  1. package/.stylelintcache +1 -0
  2. package/README.md +59 -0
  3. package/biome.jsonc +8 -0
  4. package/build.log +55 -0
  5. package/data/node-popularity.json +3998 -0
  6. package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
  7. package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
  8. package/dist/assets/Alert-Dy86dyOr.js +102 -0
  9. package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
  10. package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
  11. package/dist/assets/AuthView-D2LWHrMp.js +106 -0
  12. package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
  13. package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
  14. package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
  15. package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
  16. package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
  17. package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
  18. package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
  19. package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
  20. package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
  21. package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
  22. package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
  23. package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
  24. package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
  25. package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
  26. package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
  27. package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
  28. package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
  29. package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
  30. package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
  31. package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
  32. package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
  33. package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
  34. package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
  35. package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
  36. package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
  37. package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
  38. package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
  39. package/dist/assets/ErrorView-zT9cX76a.js +61 -0
  40. package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
  41. package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
  42. package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
  43. package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
  44. package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
  45. package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
  46. package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
  47. package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
  48. package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
  49. package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
  50. package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
  51. package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
  52. package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
  53. package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
  54. package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
  55. package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
  56. package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
  57. package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
  58. package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
  59. package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
  60. package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
  61. package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
  62. package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
  63. package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
  64. package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
  65. package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
  66. package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
  67. package/dist/assets/Modal-CIzXlZdZ.js +204 -0
  68. package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
  69. package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
  70. package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
  71. package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
  72. package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
  73. package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
  74. package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
  75. package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
  76. package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
  77. package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
  78. package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
  79. package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
  80. package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
  81. package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
  82. package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
  83. package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
  84. package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
  85. package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
  86. package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
  87. package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
  88. package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
  89. package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
  90. package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
  91. package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
  92. package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
  93. package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
  94. package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
  95. package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
  96. package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
  97. package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
  98. package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
  99. package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
  100. package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
  101. package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
  102. package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
  103. package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
  104. package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
  105. package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
  106. package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
  107. package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
  108. package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
  109. package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
  110. package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
  111. package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
  112. package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
  113. package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
  114. package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
  115. package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
  116. package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
  117. package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
  118. package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
  119. package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
  120. package/dist/assets/SetupView-VORZ-L_u.js +112 -0
  121. package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
  122. package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
  123. package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
  124. package/dist/assets/SigninView-D9_Pm16j.js +358 -0
  125. package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
  126. package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
  127. package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
  128. package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
  129. package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
  130. package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
  131. package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
  132. package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
  133. package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
  134. package/dist/assets/TemplatesView-025CcmIY.js +57 -0
  135. package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
  136. package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
  137. package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
  138. package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
  139. package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
  140. package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
  141. package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
  142. package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
  143. package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
  144. package/dist/assets/WorkerView-Caznsljo.js +563 -0
  145. package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
  146. package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
  147. package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
  148. package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
  149. package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
  150. package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
  151. package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
  152. package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
  153. package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
  154. package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
  155. package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
  156. package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
  157. package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
  158. package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
  159. package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
  160. package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
  161. package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
  162. package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
  163. package/dist/assets/assistant.store-CNywgN4S.js +518 -0
  164. package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
  165. package/dist/assets/banners.store-CGEcBTDn.js +195 -0
  166. package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
  167. package/dist/assets/buttons.esm-yintpW2E.js +364 -0
  168. package/dist/assets/chart-CNvyywtJ.js +10958 -0
  169. package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
  170. package/dist/assets/chat.store-290YeyrQ.js +865 -0
  171. package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
  172. package/dist/assets/chunk-6z4oVpB-.js +36 -0
  173. package/dist/assets/col-Cmt4cmuS.js +158 -0
  174. package/dist/assets/constants-C8OH4tTq.js +106256 -0
  175. package/dist/assets/constants-DMrsrpD7.js +32 -0
  176. package/dist/assets/core-B9gt_4yk.js +4 -0
  177. package/dist/assets/core-CP5FY4aX.js +1202 -0
  178. package/dist/assets/core-CRbPymLT.js +9741 -0
  179. package/dist/assets/dataTable.store-DmipQsol.js +207 -0
  180. package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
  181. package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
  182. package/dist/assets/dateformat-hG8NERse.js +181 -0
  183. package/dist/assets/dialog-lMho1TD8.js +425 -0
  184. package/dist/assets/dist-Cw46Is-h.js +151 -0
  185. package/dist/assets/doppler-B__k0MeW.webp +0 -0
  186. package/dist/assets/element-icons-B-tDfklg.woff +0 -0
  187. package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
  188. package/dist/assets/empty-BuGRxzl4.js +2210 -0
  189. package/dist/assets/en-CF30SCh2.js +95 -0
  190. package/dist/assets/en-DyO2pPiC.js +2 -0
  191. package/dist/assets/es-BkUFJVtD.js +43338 -0
  192. package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
  193. package/dist/assets/executions.store-B9uRYwgv.js +205 -0
  194. package/dist/assets/exports-Crx_gvt_.js +1799 -0
  195. package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
  196. package/dist/assets/fileUtils-CRWqOQje.js +20 -0
  197. package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
  198. package/dist/assets/get-BcEmeOxn.js +2781 -0
  199. package/dist/assets/index-SL8542zQ.js +28372 -0
  200. package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
  201. package/dist/assets/insights.store-BFc3kDUo.js +61 -0
  202. package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
  203. package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
  204. package/dist/assets/languageModules-9LyndCqU.js +13862 -0
  205. package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
  206. package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
  207. package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
  208. package/dist/assets/merge-DhuTk1HM.js +564 -0
  209. package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
  210. package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
  211. package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
  212. package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
  213. package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
  214. package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
  215. package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
  216. package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
  217. package/dist/assets/radio-CSce3UT0.js +262 -0
  218. package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
  219. package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
  220. package/dist/assets/retry-BgHaYzbB.js +23 -0
  221. package/dist/assets/roles.store-CRf_zJTb.js +51 -0
  222. package/dist/assets/router-DNpzz3GH.js +2631 -0
  223. package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
  224. package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
  225. package/dist/assets/semver-Bk6DGseV.js +1306 -0
  226. package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
  227. package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
  228. package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
  229. package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
  230. package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
  231. package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
  232. package/dist/assets/src-jviYSG25.js +55454 -0
  233. package/dist/assets/sso.store-DyApJwhx.js +139 -0
  234. package/dist/assets/style-E3CrYFV8.css +111829 -0
  235. package/dist/assets/table-we1DjFMV.js +3944 -0
  236. package/dist/assets/templateActions-bEDSARw2.js +65 -0
  237. package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
  238. package/dist/assets/truncate-C0KYt7i3.js +4176 -0
  239. package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
  240. package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
  241. package/dist/assets/usage.store-CU5J_nGm.js +100 -0
  242. package/dist/assets/useActions-B1JckIRj.js +255 -0
  243. package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
  244. package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
  245. package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
  246. package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
  247. package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
  248. package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
  249. package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
  250. package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
  251. package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
  252. package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
  253. package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
  254. package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
  255. package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
  256. package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
  257. package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
  258. package/dist/assets/useMcp-DoMOIfqT.js +27 -0
  259. package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
  260. package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
  261. package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
  262. package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
  263. package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
  264. package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
  265. package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
  266. package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
  267. package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
  268. package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
  269. package/dist/assets/utils-DI7dLldp.js +54 -0
  270. package/dist/assets/versions.store-B1z2OrLE.js +191 -0
  271. package/dist/assets/vue-CydWIhxN.js +4378 -0
  272. package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
  273. package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
  274. package/dist/assets/xml-B_oj6Mle.js +2060 -0
  275. package/dist/favicon.ico +0 -0
  276. package/dist/index.html +157 -0
  277. package/dist/static/base-path.js +1 -0
  278. package/dist/static/community_package_tooltip_img.png +0 -0
  279. package/dist/static/data-mapping-gif.gif +0 -0
  280. package/dist/static/form-grey.svg +1 -0
  281. package/dist/static/google-auth/disabled.dark.png +0 -0
  282. package/dist/static/google-auth/disabled.png +0 -0
  283. package/dist/static/google-auth/focus.dark.png +0 -0
  284. package/dist/static/google-auth/focus.png +0 -0
  285. package/dist/static/google-auth/normal.dark.png +0 -0
  286. package/dist/static/google-auth/normal.png +0 -0
  287. package/dist/static/google-auth/pressed.dark.png +0 -0
  288. package/dist/static/google-auth/pressed.png +0 -0
  289. package/dist/static/n8n-logo.png +0 -0
  290. package/dist/static/og_image.png +0 -0
  291. package/dist/static/open-ai.svg +1 -0
  292. package/dist/static/openChat.png +0 -0
  293. package/dist/static/posthog.init.js +41 -0
  294. package/dist/static/prefers-color-scheme.css +5 -0
  295. package/dist/static/webhook-icon.svg +1 -0
  296. package/dist/tree-sitter-bash.wasm +0 -0
  297. package/dist/tree-sitter.wasm +0 -0
  298. package/eslint.config.mjs +59 -0
  299. package/index.html +45 -0
  300. package/index.js +0 -0
  301. package/package.json +147 -0
  302. package/postcss.config.cjs +6 -0
  303. package/scripts/fetch-node-popularity.mjs +102 -0
  304. package/stylelint.config.mjs +9 -0
  305. package/tailwind.config.js +8 -0
  306. package/tsconfig.json +36 -0
  307. package/vite/i18n-locales-hmr-helpers.ts +19 -0
  308. package/vite/source-map-js-shim.ts +1 -0
  309. package/vite/vite-plugin-node-popularity.mts +32 -0
  310. package/vite.config.mts +304 -0
@@ -0,0 +1,1230 @@
1
+ import { o as __toESM, t as __commonJSMin } from "./chunk-6z4oVpB-.js";
2
+ import { C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, G as nextTick, Gt as unref, It as ref, M as createVNode, P as defineComponent, T as createBlock, W as mergeProps, Z as onMounted, _ as Fragment, _t as watch, at as renderSlot, bn as normalizeStyle, bt as withCtx, et as openBlock, it as renderList, j as createTextVNode, k as createSlots, p as vShow, q as onBeforeMount, st as resolveDirective, vn as normalizeClass, w as createBaseVNode, xt as withDirectives } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
3
+ import { rt as useI18n } from "./core-CRbPymLT.js";
4
+ import { Cn as N8nIcon_default, Lt as ElCheckbox, at as N8nLoading_default, bn as N8nText_default, et as N8nCard_default, vn as N8nHeading_default, xn as N8nButton_default, yt as N8nInput_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 { Er as useUsersStore, Xn as useDocumentTitle, k as useTelemetry, l as useTemplatesStore, ms as useSettingsStore, y as useToast } from "./builder.store-Czk2ipDE.js";
10
+ import "./empty-BuGRxzl4.js";
11
+ import { _ as useRoute, g as onBeforeRouteLeave, 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 { c as require_isObject } from "./_MapCache-CcdIl4Ae.js";
16
+ import { Ro as VIEWS, u as CREATOR_HUB_URL } from "./constants-C8OH4tTq.js";
17
+ import "./merge-DhuTk1HM.js";
18
+ import "./_baseOrderBy-N8Be_6z6.js";
19
+ import "./dateformat-hG8NERse.js";
20
+ import { n as require_debounce, t as useDebounce } from "./useDebounce-Br5_1ug-.js";
21
+ import "./nodeIcon-D6X-ENYt.js";
22
+ import "./NodeIcon-B9VW6tX6.js";
23
+ import "./TimeAgo-C6EN4lCs.js";
24
+ import { t as require_orderBy } from "./orderBy-Cu9F9DU_.js";
25
+ import { t as TemplatesView_default } from "./TemplatesView-025CcmIY.js";
26
+ import { n as NodeList_default, t as TemplateList_default } from "./TemplateList-DKvbwuiY.js";
27
+ var _hoisted_1$3 = ["textContent"];
28
+ var CollectionWorkflowCard_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
29
+ __name: "CollectionWorkflowCard",
30
+ props: {
31
+ loading: { type: Boolean },
32
+ title: {}
33
+ },
34
+ setup(__props) {
35
+ return (_ctx, _cache) => {
36
+ return openBlock(), createBlock(unref(N8nCard_default), mergeProps({ class: _ctx.$style.card }, _ctx.$attrs), createSlots({
37
+ default: withCtx(() => [createVNode(unref(N8nLoading_default), {
38
+ loading: _ctx.loading,
39
+ rows: 3,
40
+ variant: "p"
41
+ }, null, 8, ["loading"])]),
42
+ _: 2
43
+ }, [!_ctx.loading && _ctx.title ? {
44
+ name: "header",
45
+ fn: withCtx(() => [createBaseVNode("span", {
46
+ class: normalizeClass(_ctx.$style.title),
47
+ textContent: toDisplayString(_ctx.title)
48
+ }, null, 10, _hoisted_1$3)]),
49
+ key: "0"
50
+ } : void 0, !_ctx.loading ? {
51
+ name: "footer",
52
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
53
+ key: "1"
54
+ } : void 0]), 1040, ["class"]);
55
+ };
56
+ }
57
+ });
58
+ var CollectionWorkflowCard_vue_vue_type_style_index_0_lang_module_default = {
59
+ card: "_card_1goyo_123",
60
+ title: "_title_1goyo_139"
61
+ };
62
+ var CollectionWorkflowCard_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CollectionWorkflowCard_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CollectionWorkflowCard_vue_vue_type_style_index_0_lang_module_default }]]);
63
+ var TemplatesInfoCard_default = /* @__PURE__ */ defineComponent({
64
+ __name: "TemplatesInfoCard",
65
+ props: {
66
+ collection: {},
67
+ loading: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ showItemCount: {
72
+ type: Boolean,
73
+ default: true
74
+ },
75
+ width: {}
76
+ },
77
+ setup(__props) {
78
+ const i18n = useI18n();
79
+ return (_ctx, _cache) => {
80
+ return openBlock(), createBlock(CollectionWorkflowCard_default, {
81
+ loading: _ctx.loading,
82
+ title: _ctx.collection.name,
83
+ style: normalizeStyle({ width: _ctx.width })
84
+ }, {
85
+ footer: withCtx(() => [createBaseVNode("span", null, [withDirectives(createVNode(unref(N8nText_default), {
86
+ size: "small",
87
+ color: "text-light"
88
+ }, {
89
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.collection.workflows.length) + " " + toDisplayString(unref(i18n).baseText("templates.workflows")), 1)]),
90
+ _: 1
91
+ }, 512), [[vShow, _ctx.showItemCount]])]), createVNode(NodeList_default, {
92
+ nodes: _ctx.collection.nodes,
93
+ "show-more": false
94
+ }, null, 8, ["nodes"])]),
95
+ _: 1
96
+ }, 8, [
97
+ "loading",
98
+ "title",
99
+ "style"
100
+ ]);
101
+ };
102
+ }
103
+ });
104
+ var handlers_default = { methods: {
105
+ handleMouseDown(e) {
106
+ this.isMouseDown = true;
107
+ if (e.type.indexOf("touch") !== -1) {
108
+ this.dragStartX = e.touches[0].clientX;
109
+ this.dragStartY = e.touches[0].clientY;
110
+ }
111
+ if (e.type.indexOf("mouse") !== -1) {
112
+ this.dragStartX = e.clientX;
113
+ this.dragStartY = e.clientY;
114
+ }
115
+ },
116
+ handleMouseMove(e) {
117
+ let positionX;
118
+ let positionY;
119
+ if (e.type.indexOf("touch") !== -1) {
120
+ positionX = e.touches[0].clientX;
121
+ positionY = e.touches[0].clientY;
122
+ }
123
+ if (e.type.indexOf("mouse") !== -1) {
124
+ positionX = e.clientX;
125
+ positionY = e.clientY;
126
+ }
127
+ if (Math.abs(positionX - this.dragStartX) > 3 * Math.abs(positionY - this.dragStartY)) {
128
+ this.disableScroll();
129
+ this.dragDistance = positionX - this.dragStartX;
130
+ }
131
+ },
132
+ handleMouseUp() {
133
+ this.isMouseDown = false;
134
+ this.enableScroll();
135
+ },
136
+ handleMouseOver(element) {
137
+ if (this.settings.autoplay) {
138
+ if (element === "dot" && this.settings.pauseOnDotsHover || element === "track" && this.settings.pauseOnHover) this.isAutoplayPaused = true;
139
+ }
140
+ },
141
+ handleMouseOut(element) {
142
+ if (this.settings.autoplay) {
143
+ if (element === "dot" && this.settings.pauseOnDotsHover || element === "track" && this.settings.pauseOnHover) this.isAutoplayPaused = false;
144
+ }
145
+ }
146
+ } };
147
+ var helpers_default = { methods: {
148
+ getWidth() {
149
+ if (this.isSSR) return false;
150
+ this.widthWindow = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
151
+ this.widthContainer = this.$refs.list.clientWidth;
152
+ },
153
+ htmlCollectionToArray(collection) {
154
+ return Array.prototype.slice.call(collection, 0);
155
+ }
156
+ } };
157
+ var methods_default = { methods: {
158
+ clearAutoPlayPause() {
159
+ clearTimeout(this.autoplayTimeout);
160
+ this.autoplayRemaining = null;
161
+ },
162
+ disableAutoPlay() {
163
+ clearInterval(this.autoplayInterval);
164
+ this.autoplayInterval = null;
165
+ },
166
+ disableScroll() {
167
+ document.ontouchmove = (e) => e.preventDefault();
168
+ },
169
+ enableScroll() {
170
+ document.ontouchmove = () => true;
171
+ },
172
+ restartAutoPlay() {
173
+ this.disableAutoPlay();
174
+ this.toggleAutoPlay();
175
+ },
176
+ toggleAutoPlay() {
177
+ const enabled = !this.settings.unagile && this.settings.autoplay;
178
+ if (!this.autoplayInterval && enabled) this.autoplayInterval = setInterval(() => {
179
+ if (!document.hidden) if (!this.canGoToNext) this.disableAutoPlay();
180
+ else this.goToNext();
181
+ }, this.settings.autoplaySpeed);
182
+ else this.disableAutoPlay();
183
+ },
184
+ toggleFade() {
185
+ const enabled = !this.settings.unagile && this.settings.fade;
186
+ for (let i = 0; i < this.countSlides; i++) {
187
+ this.slides[i].style.transition = enabled ? "opacity " + this.settings.timing + " " + this.settings.speed + "ms" : "none";
188
+ this.slides[i].style.transform = enabled ? `translate(-${i * this.widthSlide}px)` : "none";
189
+ }
190
+ }
191
+ } };
192
+ var preparations_default = { methods: {
193
+ prepareSlides() {
194
+ this.slides = this.htmlCollectionToArray(this.$refs.slides.children);
195
+ if (this.slidesCloned) {
196
+ this.slidesClonedBefore = this.htmlCollectionToArray(this.$refs.slidesClonedBefore.children);
197
+ this.slidesClonedAfter = this.htmlCollectionToArray(this.$refs.slidesClonedAfter.children);
198
+ }
199
+ for (const slide of this.slidesAll) slide.classList.add("agile__slide");
200
+ },
201
+ prepareSlidesClasses() {
202
+ if (this.currentSlide === null) return false;
203
+ for (let i = 0; i < this.countSlides; i++) {
204
+ this.slides[i].classList.remove("agile__slide--active");
205
+ this.slides[i].classList.remove("agile__slide--current");
206
+ }
207
+ setTimeout(() => this.slides[this.currentSlide].classList.add("agile__slide--active"), this.changeDelay);
208
+ let start = this.slidesCloned ? this.countSlides + this.currentSlide : this.currentSlide;
209
+ if (this.centerMode) start -= Math.floor(this.settings.slidesToShow / 2) - +(this.settings.slidesToShow % 2 === 0);
210
+ for (let i = Math.max(start, 0); i < Math.min(start + this.settings.slidesToShow, this.countSlides); i++) this.slidesAll[i].classList.add("agile__slide--current");
211
+ },
212
+ prepareCarousel() {
213
+ if (this.settings.unagile) this.translateX = 0;
214
+ else {
215
+ if (this.currentSlide === null && this.countSlides) this.currentSlide = this.settings.initialSlide;
216
+ if (this.currentSlide > this.countSlides) this.currentSlide = this.countSlides - 1;
217
+ this.goTo(this.currentSlide, false, false);
218
+ }
219
+ }
220
+ } };
221
+ var import_orderBy = /* @__PURE__ */ __toESM(require_orderBy());
222
+ var settings_default = {
223
+ props: {
224
+ asNavFor: {
225
+ type: Array,
226
+ default: function() {
227
+ return [];
228
+ }
229
+ },
230
+ autoplay: {
231
+ type: Boolean,
232
+ default: false
233
+ },
234
+ autoplaySpeed: {
235
+ type: Number,
236
+ default: 3e3
237
+ },
238
+ centerMode: {
239
+ type: Boolean,
240
+ default: false
241
+ },
242
+ centerPadding: {
243
+ type: String,
244
+ default: "15%"
245
+ },
246
+ changeDelay: {
247
+ type: Number,
248
+ default: 0
249
+ },
250
+ dots: {
251
+ type: Boolean,
252
+ default: true
253
+ },
254
+ fade: {
255
+ type: Boolean,
256
+ default: false
257
+ },
258
+ infinite: {
259
+ type: Boolean,
260
+ default: true
261
+ },
262
+ initialSlide: {
263
+ type: Number,
264
+ default: 0
265
+ },
266
+ mobileFirst: {
267
+ type: Boolean,
268
+ default: true
269
+ },
270
+ navButtons: {
271
+ type: Boolean,
272
+ default: true
273
+ },
274
+ options: {
275
+ type: Object,
276
+ default: () => null
277
+ },
278
+ pauseOnDotsHover: {
279
+ type: Boolean,
280
+ default: false
281
+ },
282
+ pauseOnHover: {
283
+ type: Boolean,
284
+ default: true
285
+ },
286
+ responsive: {
287
+ type: Array,
288
+ default: () => null
289
+ },
290
+ rtl: {
291
+ type: Boolean,
292
+ default: false
293
+ },
294
+ slidesToScroll: {
295
+ type: Number,
296
+ default: 1
297
+ },
298
+ slidesToShow: {
299
+ type: Number,
300
+ default: 1
301
+ },
302
+ speed: {
303
+ type: Number,
304
+ default: 300
305
+ },
306
+ swipeDistance: {
307
+ type: Number,
308
+ default: 50
309
+ },
310
+ throttleDelay: {
311
+ type: Number,
312
+ default: 500
313
+ },
314
+ timing: {
315
+ type: String,
316
+ default: "ease",
317
+ validator: (value) => {
318
+ return [
319
+ "ease",
320
+ "linear",
321
+ "ease-in",
322
+ "ease-out",
323
+ "ease-in-out"
324
+ ].indexOf(value) !== -1;
325
+ }
326
+ },
327
+ unagile: {
328
+ type: Boolean,
329
+ default: false
330
+ }
331
+ },
332
+ computed: {
333
+ initialSettings: function() {
334
+ let { options,...initialSettings } = this.$props;
335
+ if (options) initialSettings = {
336
+ ...initialSettings,
337
+ ...options
338
+ };
339
+ if (initialSettings.responsive) initialSettings.responsive = (0, import_orderBy.default)(initialSettings.responsive, "breakpoint");
340
+ return initialSettings;
341
+ },
342
+ settings: function() {
343
+ const { responsive,...settings } = this.initialSettings;
344
+ if (responsive) responsive.forEach((option) => {
345
+ if (settings.mobileFirst ? option.breakpoint < this.widthWindow : option.breakpoint > this.widthWindow) for (const key in option.settings) settings[key] = option.settings[key];
346
+ });
347
+ return settings;
348
+ }
349
+ }
350
+ };
351
+ var import_throttle = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
352
+ var debounce = require_debounce(), isObject = require_isObject();
353
+ var FUNC_ERROR_TEXT = "Expected a function";
354
+ function throttle$1(func, wait, options) {
355
+ var leading = true, trailing = true;
356
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
357
+ if (isObject(options)) {
358
+ leading = "leading" in options ? !!options.leading : leading;
359
+ trailing = "trailing" in options ? !!options.trailing : trailing;
360
+ }
361
+ return debounce(func, wait, {
362
+ "leading": leading,
363
+ "maxWait": wait,
364
+ "trailing": trailing
365
+ });
366
+ }
367
+ module.exports = throttle$1;
368
+ })))());
369
+ var _sfc_main = {
370
+ name: "agile",
371
+ mixins: [
372
+ handlers_default,
373
+ helpers_default,
374
+ methods_default,
375
+ preparations_default,
376
+ settings_default,
377
+ { created() {
378
+ this.goTo = (0, import_throttle.default)(this.goTo, this.throttleDelay);
379
+ this.getWidth = (0, import_throttle.default)(this.getWidth, 500);
380
+ } },
381
+ { watch: {
382
+ currentBreakpoint() {
383
+ this.$emit("breakpoint", { breakpoint: this.currentBreakpoint });
384
+ },
385
+ currentSlide() {
386
+ this.prepareSlidesClasses();
387
+ this.autoplayStartTimestamp = this.settings.autoplay ? +/* @__PURE__ */ new Date() : null;
388
+ this.$emit("after-change", { currentSlide: this.currentSlide });
389
+ },
390
+ dragDistance() {
391
+ if (this.isMouseDown) {
392
+ const { rtl } = this.settings;
393
+ const dragDistance = this.dragDistance * (rtl ? -1 : 1);
394
+ if (dragDistance > this.swipeDistance && this.canGoToPrev) {
395
+ this.goToPrev();
396
+ this.handleMouseUp();
397
+ }
398
+ if (dragDistance < -1 * this.swipeDistance && this.canGoToNext) {
399
+ this.goToNext();
400
+ this.handleMouseUp();
401
+ }
402
+ }
403
+ },
404
+ isAutoplayPaused(nevValue) {
405
+ if (nevValue) {
406
+ this.remaining = this.settings.autoplaySpeed - (+/* @__PURE__ */ new Date() - this.autoplayStartTimestamp);
407
+ this.disableAutoPlay();
408
+ this.clearAutoPlayPause();
409
+ } else this.autoplayTimeout = setTimeout(() => {
410
+ this.clearAutoPlayPause();
411
+ this.goToNext();
412
+ this.toggleAutoPlay();
413
+ }, this.remaining);
414
+ },
415
+ "settings.autoplay"() {
416
+ this.toggleAutoPlay();
417
+ },
418
+ "settings.fade"() {
419
+ this.toggleFade();
420
+ },
421
+ "settings.unagile"() {},
422
+ widthSlide() {
423
+ for (let i = 0; i < this.countSlidesAll; i++) this.slidesAll[i].style.width = `${this.widthSlide}${this.widthSlide !== "auto" ? "px" : ""}`;
424
+ },
425
+ widthWindow(newValue, oldValue) {
426
+ if (oldValue) {
427
+ this.prepareCarousel();
428
+ this.toggleFade();
429
+ }
430
+ }
431
+ } }
432
+ ],
433
+ emits: [
434
+ "before-change",
435
+ "after-change",
436
+ "breakpoint"
437
+ ],
438
+ data() {
439
+ return {
440
+ autoplayInterval: null,
441
+ autoplayRemaining: null,
442
+ autoplayStartTimestamp: null,
443
+ autoplayTimeout: null,
444
+ currentSlide: null,
445
+ dragDistance: 0,
446
+ dragStartX: 0,
447
+ dragStartY: 0,
448
+ isAutoplayPaused: false,
449
+ isMouseDown: false,
450
+ slides: [],
451
+ slidesClonedAfter: [],
452
+ slidesClonedBefore: [],
453
+ isSSR: typeof window === "undefined",
454
+ transitionDelay: 0,
455
+ translateX: 0,
456
+ widthWindow: 0,
457
+ widthContainer: 0
458
+ };
459
+ },
460
+ computed: {
461
+ breakpoints: function() {
462
+ return !this.initialSettings.responsive ? [] : this.initialSettings.responsive.map((item$1) => item$1.breakpoint);
463
+ },
464
+ canGoToPrev: function() {
465
+ return this.settings.infinite || this.currentSlide > 0;
466
+ },
467
+ canGoToNext: function() {
468
+ return this.settings.infinite || this.currentSlide < this.countSlides - 1;
469
+ },
470
+ countSlides: function() {
471
+ return this.isSSR ? this.htmlCollectionToArray(this.$slots.default).length : this.slides.length;
472
+ },
473
+ countSlidesAll: function() {
474
+ return this.slidesAll.length;
475
+ },
476
+ currentBreakpoint: function() {
477
+ const breakpoints = this.breakpoints.map((item$1) => item$1).reverse();
478
+ return this.initialSettings.mobileFirst ? breakpoints.find((item$1) => item$1 < this.widthWindow) || 0 : breakpoints.find((item$1) => item$1 > this.widthWindow) || null;
479
+ },
480
+ marginX: function() {
481
+ if (this.settings.unagile) return 0;
482
+ let marginX = this.slidesCloned ? this.countSlides * this.widthSlide : 0;
483
+ if (this.settings.centerMode) marginX -= (Math.floor(this.settings.slidesToShow / 2) - +(this.settings.slidesToShow % 2 === 0)) * this.widthSlide;
484
+ return this.settings.rtl ? marginX : -1 * marginX;
485
+ },
486
+ slidesCloned: function() {
487
+ return !this.settings.unagile && !this.settings.fade && this.settings.infinite;
488
+ },
489
+ slidesAll: function() {
490
+ return this.slidesCloned ? [
491
+ ...this.slidesClonedBefore,
492
+ ...this.slides,
493
+ ...this.slidesClonedAfter
494
+ ] : this.slides;
495
+ },
496
+ widthSlide: function() {
497
+ return !this.settings.unagile ? this.widthContainer / this.settings.slidesToShow : "auto";
498
+ }
499
+ },
500
+ mounted() {
501
+ window.addEventListener("resize", this.getWidth);
502
+ this.$refs.track.addEventListener("touchstart", this.handleMouseDown);
503
+ this.$refs.track.addEventListener("touchend", this.handleMouseUp);
504
+ this.$refs.track.addEventListener("touchmove", this.handleMouseMove);
505
+ this.$refs.track.addEventListener("mousedown", this.handleMouseDown);
506
+ this.$refs.track.addEventListener("mouseup", this.handleMouseUp);
507
+ this.$refs.track.addEventListener("mousemove", this.handleMouseMove);
508
+ this.isSSR = false;
509
+ this.reload();
510
+ },
511
+ beforeUnmount() {
512
+ this.destroy();
513
+ },
514
+ methods: {
515
+ destroy() {
516
+ window.removeEventListener("resize", this.getWidth);
517
+ this.$refs.track.removeEventListener("touchstart", this.handleMouseDown);
518
+ this.$refs.track.removeEventListener("touchend", this.handleMouseUp);
519
+ this.$refs.track.removeEventListener("touchmove", this.handleMouseMove);
520
+ this.$refs.track.removeEventListener("mousedown", this.handleMouseDown);
521
+ this.$refs.track.removeEventListener("mouseup", this.handleMouseUp);
522
+ this.$refs.track.removeEventListener("mousemove", this.handleMouseMove);
523
+ this.disableAutoPlay();
524
+ },
525
+ getCurrentBreakpoint() {
526
+ return this.currentBreakpoint;
527
+ },
528
+ getCurrentSettings() {
529
+ return this.settings;
530
+ },
531
+ getCurrentSlide() {
532
+ return this.currentSlide;
533
+ },
534
+ getInitialSettings() {
535
+ return this.initialSettings;
536
+ },
537
+ goTo(n, transition = true, asNav = false) {
538
+ if (this.settings.unagile) return false;
539
+ if (!asNav) this.settings.asNavFor.forEach((carousel) => {
540
+ if (carousel) carousel.goTo(n, transition, true);
541
+ });
542
+ let slideNextReal = n;
543
+ if (transition) {
544
+ if (this.settings.infinite && n < 0) slideNextReal = this.countSlides - 1;
545
+ else if (n >= this.countSlides) slideNextReal = 0;
546
+ this.$emit("before-change", {
547
+ currentSlide: this.currentSlide,
548
+ nextSlide: slideNextReal
549
+ });
550
+ this.currentSlide = slideNextReal;
551
+ if (n !== slideNextReal) setTimeout(() => {
552
+ this.goTo(slideNextReal, false);
553
+ }, this.settings.speed);
554
+ }
555
+ const translateX = !this.settings.fade ? n * this.widthSlide * this.settings.slidesToScroll : 0;
556
+ this.transitionDelay = transition ? this.speed : 0;
557
+ if (this.infinite || this.currentSlide + this.slidesToShow <= this.countSlides) this.translateX = this.settings.rtl ? translateX : -1 * translateX;
558
+ },
559
+ goToNext() {
560
+ if (this.canGoToNext) this.goTo(this.currentSlide + 1);
561
+ },
562
+ goToPrev() {
563
+ if (this.canGoToPrev) this.goTo(this.currentSlide - 1);
564
+ },
565
+ reload() {
566
+ this.getWidth();
567
+ this.prepareSlides();
568
+ this.prepareCarousel();
569
+ this.toggleFade();
570
+ this.toggleAutoPlay();
571
+ }
572
+ }
573
+ };
574
+ var _hoisted_1$2 = {
575
+ ref: "list",
576
+ class: "agile__list"
577
+ };
578
+ var _hoisted_2$1 = {
579
+ ref: "slidesClonedBefore",
580
+ class: "agile__slides agile__slides--cloned"
581
+ };
582
+ var _hoisted_3 = {
583
+ ref: "slides",
584
+ class: "agile__slides agile__slides--regular"
585
+ };
586
+ var _hoisted_4 = {
587
+ ref: "slidesClonedAfter",
588
+ class: "agile__slides agile__slides--cloned"
589
+ };
590
+ var _hoisted_5 = {
591
+ key: 0,
592
+ class: "agile__caption"
593
+ };
594
+ var _hoisted_6 = {
595
+ key: 1,
596
+ class: "agile__actions"
597
+ };
598
+ var _hoisted_7 = ["disabled"];
599
+ var _hoisted_8 = {
600
+ key: 1,
601
+ ref: "dots",
602
+ class: "agile__dots"
603
+ };
604
+ var _hoisted_9 = ["onClick"];
605
+ var _hoisted_10 = ["disabled"];
606
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
607
+ return openBlock(), createElementBlock("div", {
608
+ class: normalizeClass([{
609
+ "agile--ssr": $data.isSSR,
610
+ "agile--auto-play": _ctx.settings.autoplay,
611
+ "agile--disabled": _ctx.settings.unagile,
612
+ "agile--fade": _ctx.settings.fade && !_ctx.settings.unagile,
613
+ "agile--rtl": _ctx.settings.rtl,
614
+ "agile--no-nav-buttons": !_ctx.settings.navButtons
615
+ }, "agile"]),
616
+ onTouchstart: () => {}
617
+ }, [
618
+ createBaseVNode("div", _hoisted_1$2, [createBaseVNode("div", {
619
+ ref: "track",
620
+ style: normalizeStyle({
621
+ transform: `translate(${$data.translateX + $options.marginX}px)`,
622
+ transition: `transform ${_ctx.settings.timing} ${$data.transitionDelay}ms`
623
+ }),
624
+ class: "agile__track",
625
+ onMouseout: _cache[0] || (_cache[0] = ($event) => _ctx.handleMouseOut("track")),
626
+ onMouseover: _cache[1] || (_cache[1] = ($event) => _ctx.handleMouseOver("track"))
627
+ }, [
628
+ withDirectives(createBaseVNode("div", _hoisted_2$1, [renderSlot(_ctx.$slots, "default")], 512), [[vShow, $options.slidesCloned]]),
629
+ createBaseVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "default")], 512),
630
+ withDirectives(createBaseVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")], 512), [[vShow, $options.slidesCloned]])
631
+ ], 36)], 512),
632
+ _ctx.$slots.caption ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true),
633
+ !_ctx.settings.unagile && (_ctx.settings.navButtons || _ctx.settings.dots) ? (openBlock(), createElementBlock("div", _hoisted_6, [
634
+ _ctx.settings.navButtons && !_ctx.settings.unagile ? (openBlock(), createElementBlock("button", {
635
+ key: 0,
636
+ ref: "prevButton",
637
+ disabled: !$options.canGoToPrev,
638
+ "aria-label": "Previous",
639
+ class: "agile__nav-button agile__nav-button--prev",
640
+ type: "button",
641
+ onClick: _cache[2] || (_cache[2] = ($event) => ($options.goToPrev(), _ctx.restartAutoPlay()))
642
+ }, [renderSlot(_ctx.$slots, "prevButton", {}, () => [_cache[6] || (_cache[6] = createTextVNode(" ← "))])], 8, _hoisted_7)) : createCommentVNode("", true),
643
+ _ctx.settings.dots && !_ctx.settings.unagile ? (openBlock(), createElementBlock("ul", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList($options.countSlides, (n) => {
644
+ return openBlock(), createElementBlock("li", {
645
+ key: n,
646
+ class: normalizeClass([{ "agile__dot--current": n - 1 === $data.currentSlide }, "agile__dot"]),
647
+ onMouseout: _cache[3] || (_cache[3] = ($event) => _ctx.handleMouseOut("dot")),
648
+ onMouseover: _cache[4] || (_cache[4] = ($event) => _ctx.handleMouseOver("dot"))
649
+ }, [createBaseVNode("button", {
650
+ type: "button",
651
+ onClick: ($event) => ($options.goTo(n - 1), _ctx.restartAutoPlay())
652
+ }, toDisplayString(n), 9, _hoisted_9)], 34);
653
+ }), 128))], 512)) : createCommentVNode("", true),
654
+ _ctx.settings.navButtons && !_ctx.settings.unagile ? (openBlock(), createElementBlock("button", {
655
+ key: 2,
656
+ ref: "nextButton",
657
+ disabled: !$options.canGoToNext,
658
+ "aria-label": "Next",
659
+ class: "agile__nav-button agile__nav-button--next",
660
+ type: "button",
661
+ onClick: _cache[5] || (_cache[5] = ($event) => ($options.goToNext(), _ctx.restartAutoPlay()))
662
+ }, [renderSlot(_ctx.$slots, "nextButton", {}, () => [_cache[7] || (_cache[7] = createTextVNode(" → "))])], 8, _hoisted_10)) : createCommentVNode("", true)
663
+ ])) : createCommentVNode("", true)
664
+ ], 34);
665
+ }
666
+ var Agile_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
667
+ var TemplatesInfoCarousel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
668
+ __name: "TemplatesInfoCarousel",
669
+ props: {
670
+ collections: {},
671
+ loading: {
672
+ type: Boolean,
673
+ default: false
674
+ },
675
+ showItemCount: {
676
+ type: Boolean,
677
+ default: true
678
+ },
679
+ showNavigation: {
680
+ type: Boolean,
681
+ default: true
682
+ },
683
+ cardsWidth: { default: "240px" }
684
+ },
685
+ emits: ["openCollection"],
686
+ setup(__props, { emit: __emit }) {
687
+ const props = __props;
688
+ const emit = __emit;
689
+ const carouselScrollPosition = ref(0);
690
+ const cardWidth = ref(parseInt(props.cardsWidth, 10));
691
+ const scrollEnd = ref(false);
692
+ const listElement = ref(null);
693
+ const sliderRef = ref(null);
694
+ const updateCarouselScroll = () => {
695
+ if (listElement.value) {
696
+ carouselScrollPosition.value = Number(listElement.value.scrollLeft.toFixed());
697
+ const width = listElement.value.clientWidth;
698
+ const scrollWidth = listElement.value.scrollWidth;
699
+ const scrollLeft$1 = carouselScrollPosition.value;
700
+ scrollEnd.value = scrollWidth - width <= scrollLeft$1 + 7;
701
+ }
702
+ };
703
+ const onCardClick = (event, id) => {
704
+ emit("openCollection", {
705
+ event,
706
+ id
707
+ });
708
+ };
709
+ const scrollLeft = () => {
710
+ if (listElement.value) listElement.value.scrollBy({
711
+ left: -(cardWidth.value * 2),
712
+ top: 0,
713
+ behavior: "smooth"
714
+ });
715
+ };
716
+ const scrollRight = () => {
717
+ if (listElement.value) listElement.value.scrollBy({
718
+ left: cardWidth.value * 2,
719
+ top: 0,
720
+ behavior: "smooth"
721
+ });
722
+ };
723
+ watch(() => props.collections, () => {
724
+ setTimeout(() => {
725
+ updateCarouselScroll();
726
+ }, 0);
727
+ });
728
+ watch(() => props.loading, () => {
729
+ setTimeout(() => {
730
+ updateCarouselScroll();
731
+ }, 0);
732
+ });
733
+ onMounted(async () => {
734
+ await nextTick();
735
+ if (!sliderRef.value) return;
736
+ listElement.value = sliderRef.value.$el.querySelector(".agile__list");
737
+ if (listElement.value) listElement.value.addEventListener("scroll", updateCarouselScroll);
738
+ });
739
+ onBeforeMount(() => {
740
+ if (sliderRef.value) sliderRef.value.destroy();
741
+ window.addEventListener("scroll", updateCarouselScroll);
742
+ });
743
+ return (_ctx, _cache) => {
744
+ return withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.$style.container) }, [
745
+ createVNode(unref(Agile_default), {
746
+ ref_key: "sliderRef",
747
+ ref: sliderRef,
748
+ dots: false,
749
+ "nav-buttons": false,
750
+ infinite: false,
751
+ "slides-to-show": 4,
752
+ onAfterChange: updateCarouselScroll
753
+ }, {
754
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.loading ? 4 : 0, (n) => {
755
+ return openBlock(), createBlock(CollectionWorkflowCard_default, {
756
+ key: `loading-${n}`,
757
+ loading: _ctx.loading
758
+ }, null, 8, ["loading"]);
759
+ }), 128)), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.loading ? [] : _ctx.collections, (collection) => {
760
+ return openBlock(), createBlock(TemplatesInfoCard_default, {
761
+ key: collection.id,
762
+ "data-test-id": "templates-info-card",
763
+ collection,
764
+ "show-item-count": _ctx.showItemCount,
765
+ width: _ctx.cardsWidth,
766
+ onClick: (e) => onCardClick(e, collection.id)
767
+ }, null, 8, [
768
+ "collection",
769
+ "show-item-count",
770
+ "width",
771
+ "onClick"
772
+ ]);
773
+ }), 128))]),
774
+ _: 1
775
+ }, 512),
776
+ withDirectives(createBaseVNode("button", {
777
+ class: normalizeClass({ [_ctx.$style.leftButton]: true }),
778
+ onClick: scrollLeft
779
+ }, [createVNode(unref(N8nIcon_default), { icon: "chevron-left" })], 2), [[vShow, _ctx.showNavigation && carouselScrollPosition.value > 0]]),
780
+ withDirectives(createBaseVNode("button", {
781
+ class: normalizeClass({ [_ctx.$style.rightButton]: true }),
782
+ onClick: scrollRight
783
+ }, [createVNode(unref(N8nIcon_default), { icon: "chevron-right" })], 2), [[vShow, _ctx.showNavigation && !scrollEnd.value]])
784
+ ], 2)), [[vShow, _ctx.loading || _ctx.collections.length]]);
785
+ };
786
+ }
787
+ });
788
+ var TemplatesInfoCarousel_vue_vue_type_style_index_0_lang_module_default = {
789
+ container: "_container_3t1vn_123",
790
+ button: "_button_3t1vn_127",
791
+ leftButton: "_leftButton_3t1vn_148 _button_3t1vn_127",
792
+ rightButton: "_rightButton_3t1vn_157 _button_3t1vn_127"
793
+ };
794
+ var TemplatesInfoCarousel_default = /* @__PURE__ */ __plugin_vue_export_helper_default(TemplatesInfoCarousel_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": TemplatesInfoCarousel_vue_vue_type_style_index_0_lang_module_default }]]);
795
+ var _hoisted_1$1 = ["textContent"];
796
+ var _hoisted_2 = ["data-test-id"];
797
+ var TemplateFilters_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
798
+ __name: "TemplateFilters",
799
+ props: {
800
+ categories: { default: () => [] },
801
+ sortOnPopulate: {
802
+ type: Boolean,
803
+ default: false
804
+ },
805
+ expandLimit: { default: 12 },
806
+ loading: {
807
+ type: Boolean,
808
+ default: false
809
+ },
810
+ selected: { default: () => [] }
811
+ },
812
+ emits: [
813
+ "clearAll",
814
+ "select",
815
+ "clear"
816
+ ],
817
+ setup(__props, { emit: __emit }) {
818
+ const props = __props;
819
+ const emit = __emit;
820
+ const i18n = useI18n();
821
+ const collapsed = ref(true);
822
+ const sortedCategories = ref([]);
823
+ const allSelected = computed(() => {
824
+ return props.selected.length === 0;
825
+ });
826
+ function sortCategories() {
827
+ if (!props.sortOnPopulate) sortedCategories.value = props.categories;
828
+ else {
829
+ const selected = props.selected || [];
830
+ const selectedCategories = props.categories.filter((cat) => selected.includes(cat));
831
+ const notSelectedCategories = props.categories.filter((cat) => !selected.includes(cat));
832
+ sortedCategories.value = selectedCategories.concat(notSelectedCategories);
833
+ }
834
+ }
835
+ function collapseAction() {
836
+ collapsed.value = false;
837
+ }
838
+ function handleCheckboxChanged(value, selectedCategory) {
839
+ if (value) emit("select", selectedCategory);
840
+ else emit("clear", selectedCategory);
841
+ }
842
+ function isSelected(category) {
843
+ return props.selected.includes(category);
844
+ }
845
+ function resetCategories() {
846
+ emit("clearAll");
847
+ }
848
+ watch(() => props.sortOnPopulate, (value) => {
849
+ if (value) sortCategories();
850
+ }, { immediate: true });
851
+ watch(() => props.categories, (categories$1) => {
852
+ if (categories$1.length > 0) sortCategories();
853
+ }, { immediate: true });
854
+ return (_ctx, _cache) => {
855
+ return openBlock(), createElementBlock("div", {
856
+ class: normalizeClass([_ctx.$style.filters, "template-filters"]),
857
+ "data-test-id": "templates-filter-container"
858
+ }, [
859
+ createBaseVNode("div", {
860
+ class: normalizeClass(_ctx.$style.title),
861
+ textContent: toDisplayString(unref(i18n).baseText("templates.categoriesHeading"))
862
+ }, null, 10, _hoisted_1$1),
863
+ _ctx.loading ? (openBlock(), createElementBlock("div", {
864
+ key: 0,
865
+ class: normalizeClass(_ctx.$style.list)
866
+ }, [createVNode(unref(N8nLoading_default), {
867
+ loading: _ctx.loading,
868
+ rows: _ctx.expandLimit
869
+ }, null, 8, ["loading", "rows"])], 2)) : createCommentVNode("", true),
870
+ !_ctx.loading ? (openBlock(), createElementBlock("ul", {
871
+ key: 1,
872
+ class: normalizeClass(_ctx.$style.categories)
873
+ }, [createBaseVNode("li", {
874
+ class: normalizeClass(_ctx.$style.item),
875
+ "data-test-id": "template-filter-all-categories"
876
+ }, [createVNode(unref(ElCheckbox), {
877
+ "model-value": allSelected.value,
878
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = () => resetCategories())
879
+ }, {
880
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("templates.allCategories")), 1)]),
881
+ _: 1
882
+ }, 8, ["model-value"])], 2), (openBlock(true), createElementBlock(Fragment, null, renderList(collapsed.value ? sortedCategories.value.slice(0, _ctx.expandLimit) : sortedCategories.value, (category, index) => {
883
+ return openBlock(), createElementBlock("li", {
884
+ key: index,
885
+ class: normalizeClass(_ctx.$style.item),
886
+ "data-test-id": `template-filter-${category.name.toLowerCase().replaceAll(" ", "-")}`
887
+ }, [createVNode(unref(ElCheckbox), {
888
+ "model-value": isSelected(category),
889
+ "onUpdate:modelValue": (value) => handleCheckboxChanged(typeof value === "boolean" ? value : Boolean(value), category)
890
+ }, {
891
+ default: withCtx(() => [createTextVNode(toDisplayString(category.name), 1)]),
892
+ _: 2
893
+ }, 1032, ["model-value", "onUpdate:modelValue"])], 10, _hoisted_2);
894
+ }), 128))], 2)) : createCommentVNode("", true),
895
+ sortedCategories.value.length > _ctx.expandLimit && collapsed.value && !_ctx.loading ? (openBlock(), createElementBlock("div", {
896
+ key: 2,
897
+ class: normalizeClass(_ctx.$style.button),
898
+ "data-test-id": "expand-categories-button",
899
+ onClick: collapseAction
900
+ }, [createVNode(unref(N8nText_default), {
901
+ size: "small",
902
+ color: "primary"
903
+ }, {
904
+ default: withCtx(() => [createTextVNode(" + " + toDisplayString(`${sortedCategories.value.length - _ctx.expandLimit} more`), 1)]),
905
+ _: 1
906
+ })], 2)) : createCommentVNode("", true)
907
+ ], 2);
908
+ };
909
+ }
910
+ });
911
+ var TemplateFilters_vue_vue_type_style_index_0_lang_module_default = {
912
+ title: "_title_jr0i7_123",
913
+ categories: "_categories_jr0i7_128",
914
+ item: "_item_jr0i7_133",
915
+ button: "_button_jr0i7_140"
916
+ };
917
+ var TemplateFilters_default = /* @__PURE__ */ __plugin_vue_export_helper_default(TemplateFilters_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": TemplateFilters_vue_vue_type_style_index_0_lang_module_default }]]);
918
+ var _hoisted_1 = ["textContent"];
919
+ var TemplatesSearchView_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
920
+ __name: "TemplatesSearchView",
921
+ setup(__props) {
922
+ const areCategoriesPrepopulated = ref(false);
923
+ const categories$1 = ref([]);
924
+ const loadingCategories = ref(true);
925
+ const loadingCollections = ref(true);
926
+ const loadingWorkflows = ref(true);
927
+ const search$1 = ref("");
928
+ const searchEventToTrack = ref(null);
929
+ const errorLoadingWorkflows = ref(false);
930
+ const { callDebounced } = useDebounce();
931
+ const toast = useToast();
932
+ const documentTitle = useDocumentTitle();
933
+ const settingsStore = useSettingsStore();
934
+ const templatesStore = useTemplatesStore();
935
+ const usersStore = useUsersStore();
936
+ const i18n = useI18n();
937
+ const route = useRoute();
938
+ const router = useRouter();
939
+ const telemetry = useTelemetry();
940
+ const createQueryObject = (categoryId) => {
941
+ return {
942
+ categories: categories$1.value.map((category) => categoryId === "name" ? category.name : String(category.id)),
943
+ search: search$1.value
944
+ };
945
+ };
946
+ const totalWorkflows = computed(() => templatesStore.getSearchedWorkflowsTotal(createQueryObject("name")));
947
+ const workflows = computed(() => templatesStore.getSearchedWorkflows(createQueryObject("name")) ?? []);
948
+ const collections = computed(() => templatesStore.getSearchedCollections(createQueryObject("id")) ?? []);
949
+ const endOfSearchMessage = computed(() => {
950
+ if (loadingWorkflows.value) return null;
951
+ if (!loadingCollections.value && workflows.value.length === 0 && collections.value.length === 0) {
952
+ if (!settingsStore.isTemplatesEndpointReachable && errorLoadingWorkflows.value) return i18n.baseText("templates.connectionWarning");
953
+ return i18n.baseText("templates.noSearchResults");
954
+ }
955
+ return null;
956
+ });
957
+ const updateQueryParam = (search$2, category) => {
958
+ const query = Object.assign({}, route.query);
959
+ if (category.length) query.categories = category;
960
+ else delete query.categories;
961
+ if (search$2.length) query.search = search$2;
962
+ else delete query.search;
963
+ router.replace({ query });
964
+ };
965
+ const updateSearch = () => {
966
+ updateQueryParam(search$1.value, categories$1.value.map((category) => category.id).join(","));
967
+ loadWorkflowsAndCollections(false);
968
+ };
969
+ const loadWorkflows = async () => {
970
+ try {
971
+ loadingWorkflows.value = true;
972
+ await templatesStore.getWorkflows({
973
+ search: search$1.value,
974
+ categories: categories$1.value.map((category) => category.name)
975
+ });
976
+ errorLoadingWorkflows.value = false;
977
+ } catch (e) {
978
+ errorLoadingWorkflows.value = true;
979
+ }
980
+ loadingWorkflows.value = false;
981
+ };
982
+ const loadCollections = async () => {
983
+ try {
984
+ loadingCollections.value = true;
985
+ await templatesStore.getCollections({
986
+ categories: categories$1.value.map((category) => String(category.id)),
987
+ search: search$1.value
988
+ });
989
+ } catch (e) {}
990
+ loadingCollections.value = false;
991
+ };
992
+ const updateSearchTracking = (search$2, categories$2) => {
993
+ if (!search$2) return;
994
+ if (searchEventToTrack.value && searchEventToTrack.value.search_string.length > search$2.length) return;
995
+ searchEventToTrack.value = {
996
+ search_string: search$2,
997
+ workflow_results_count: workflows.value.length,
998
+ collection_results_count: collections.value.length,
999
+ categories_applied: categories$2.map((categoryId) => templatesStore.getCategoryById(categoryId.toString())),
1000
+ wf_template_repo_session_id: templatesStore.currentSessionId
1001
+ };
1002
+ };
1003
+ const trackCategories = () => {
1004
+ if (categories$1.value.length) telemetry.track("User changed template filters", {
1005
+ search_string: search$1.value,
1006
+ categories_applied: categories$1.value,
1007
+ wf_template_repo_session_id: templatesStore.currentSessionId
1008
+ });
1009
+ };
1010
+ const loadWorkflowsAndCollections = async (initialLoad) => {
1011
+ const _categories = [...categories$1.value];
1012
+ const _search = search$1.value;
1013
+ await Promise.all([loadWorkflows(), loadCollections()]);
1014
+ if (!initialLoad) updateSearchTracking(_search, _categories.map((category) => category.id));
1015
+ };
1016
+ const navigateTo = (e, page, id) => {
1017
+ if (e.metaKey || e.ctrlKey) {
1018
+ const route$1 = router.resolve({
1019
+ name: page,
1020
+ params: { id }
1021
+ });
1022
+ window.open(route$1.href, "_blank");
1023
+ return;
1024
+ } else router.push({
1025
+ name: page,
1026
+ params: { id }
1027
+ });
1028
+ };
1029
+ const onOpenCollection = ({ event, id }) => {
1030
+ navigateTo(event, VIEWS.COLLECTION, id);
1031
+ };
1032
+ const onOpenTemplate = ({ event, id }) => {
1033
+ navigateTo(event, VIEWS.TEMPLATE, id);
1034
+ };
1035
+ const trackSearch = () => {
1036
+ if (searchEventToTrack.value) {
1037
+ telemetry.track("User searched workflow templates", searchEventToTrack.value);
1038
+ searchEventToTrack.value = null;
1039
+ }
1040
+ };
1041
+ const onSearchInput = (searchText) => {
1042
+ loadingWorkflows.value = true;
1043
+ loadingCollections.value = true;
1044
+ search$1.value = searchText;
1045
+ callDebounced(updateSearch, {
1046
+ debounceTime: 500,
1047
+ trailing: true
1048
+ });
1049
+ if (searchText.length === 0) trackSearch();
1050
+ };
1051
+ const onCategorySelected = (selected) => {
1052
+ categories$1.value = categories$1.value.concat(selected);
1053
+ updateSearch();
1054
+ trackCategories();
1055
+ };
1056
+ const onCategoryUnselected = (selected) => {
1057
+ categories$1.value = categories$1.value.filter((category) => category.id !== selected.id);
1058
+ updateSearch();
1059
+ trackCategories();
1060
+ };
1061
+ const onCategoriesCleared = () => {
1062
+ categories$1.value = [];
1063
+ updateSearch();
1064
+ };
1065
+ const onLoadMore = async () => {
1066
+ if (workflows.value.length >= totalWorkflows.value) return;
1067
+ try {
1068
+ loadingWorkflows.value = true;
1069
+ await templatesStore.getMoreWorkflows({
1070
+ categories: categories$1.value.map((category) => category.name),
1071
+ search: search$1.value
1072
+ });
1073
+ } catch (e) {
1074
+ toast.showMessage({
1075
+ title: "Error",
1076
+ message: "Could not load more workflows",
1077
+ type: "error"
1078
+ });
1079
+ } finally {
1080
+ loadingWorkflows.value = false;
1081
+ }
1082
+ };
1083
+ const loadCategories = async () => {
1084
+ try {
1085
+ await templatesStore.getCategories();
1086
+ } catch (e) {}
1087
+ loadingCategories.value = false;
1088
+ };
1089
+ const scrollTo = (position, behavior = "smooth") => {
1090
+ setTimeout(() => {
1091
+ const contentArea = document.getElementById("content");
1092
+ if (contentArea) contentArea.scrollTo({
1093
+ top: position,
1094
+ behavior
1095
+ });
1096
+ }, 0);
1097
+ };
1098
+ const restoreSearchFromRoute = () => {
1099
+ let shouldUpdateSearch = false;
1100
+ if (route.query.search && typeof route.query.search === "string") {
1101
+ search$1.value = route.query.search;
1102
+ shouldUpdateSearch = true;
1103
+ }
1104
+ if (typeof route.query.categories === "string" && route.query.categories.length) {
1105
+ const categoriesFromURL = route.query.categories.split(",");
1106
+ categories$1.value = templatesStore.allCategories.filter((category) => categoriesFromURL.includes(category.id.toString()));
1107
+ shouldUpdateSearch = true;
1108
+ }
1109
+ if (shouldUpdateSearch) {
1110
+ updateSearch();
1111
+ trackCategories();
1112
+ areCategoriesPrepopulated.value = true;
1113
+ }
1114
+ };
1115
+ onMounted(async () => {
1116
+ documentTitle.set("Templates");
1117
+ await loadCategories();
1118
+ loadWorkflowsAndCollections(true);
1119
+ usersStore.showPersonalizationSurvey();
1120
+ restoreSearchFromRoute();
1121
+ if (settingsStore.isTemplatesEnabled) settingsStore.testTemplatesEndpoint().catch(() => {});
1122
+ setTimeout(() => {
1123
+ const scrollOffset = route.meta?.scrollOffset;
1124
+ if (typeof scrollOffset === "number" && scrollOffset > 0) scrollTo(scrollOffset, "auto");
1125
+ }, 100);
1126
+ });
1127
+ onBeforeRouteLeave((_to, _from, next) => {
1128
+ const contentArea = document.getElementById("content");
1129
+ if (contentArea) route.meta?.setScrollPosition?.(contentArea.scrollTop);
1130
+ trackSearch();
1131
+ next();
1132
+ });
1133
+ watch(workflows, (newWorkflows) => {
1134
+ if (newWorkflows.length === 0) window.scrollTo(0, 0);
1135
+ });
1136
+ return (_ctx, _cache) => {
1137
+ const _directive_n8n_html = resolveDirective("n8n-html");
1138
+ return openBlock(), createBlock(TemplatesView_default, null, {
1139
+ header: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.$style.wrapper) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.title) }, [createVNode(unref(N8nHeading_default), {
1140
+ tag: "h1",
1141
+ size: "2xlarge"
1142
+ }, {
1143
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("templates.heading")), 1)]),
1144
+ _: 1
1145
+ })], 2), createBaseVNode("div", { class: normalizeClass(_ctx.$style.button) }, [createVNode(unref(N8nButton_default), {
1146
+ size: "large",
1147
+ type: "secondary",
1148
+ element: "a",
1149
+ href: unref(CREATOR_HUB_URL),
1150
+ label: unref(i18n).baseText("templates.shareWorkflow"),
1151
+ target: "_blank"
1152
+ }, null, 8, ["href", "label"])], 2)], 2)]),
1153
+ content: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.$style.contentWrapper) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.filters) }, [createVNode(TemplateFilters_default, {
1154
+ categories: unref(templatesStore).allCategories,
1155
+ "sort-on-populate": areCategoriesPrepopulated.value,
1156
+ selected: categories$1.value,
1157
+ loading: loadingCategories.value,
1158
+ onClear: onCategoryUnselected,
1159
+ onClearAll: onCategoriesCleared,
1160
+ onSelect: onCategorySelected
1161
+ }, null, 8, [
1162
+ "categories",
1163
+ "sort-on-populate",
1164
+ "selected",
1165
+ "loading"
1166
+ ])], 2), createBaseVNode("div", { class: normalizeClass(_ctx.$style.search) }, [
1167
+ createVNode(unref(N8nInput_default), {
1168
+ "model-value": search$1.value,
1169
+ placeholder: unref(i18n).baseText("templates.searchPlaceholder"),
1170
+ clearable: "",
1171
+ "data-test-id": "template-search-input",
1172
+ "onUpdate:modelValue": onSearchInput,
1173
+ onBlur: trackSearch
1174
+ }, {
1175
+ prefix: withCtx(() => [createVNode(unref(N8nIcon_default), { icon: "search" })]),
1176
+ _: 1
1177
+ }, 8, ["model-value", "placeholder"]),
1178
+ withDirectives(createBaseVNode("div", { class: normalizeClass(_ctx.$style.carouselContainer) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.header) }, [createVNode(unref(N8nHeading_default), {
1179
+ bold: true,
1180
+ size: "medium",
1181
+ color: "text-light"
1182
+ }, {
1183
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("templates.collections")) + " ", 1), !loadingCollections.value ? (openBlock(), createElementBlock("span", {
1184
+ key: 0,
1185
+ "data-test-id": "collection-count-label",
1186
+ textContent: toDisplayString(`(${collections.value.length})`)
1187
+ }, null, 8, _hoisted_1)) : createCommentVNode("", true)]),
1188
+ _: 1
1189
+ })], 2), createVNode(TemplatesInfoCarousel_default, {
1190
+ collections: collections.value,
1191
+ loading: loadingCollections.value,
1192
+ onOpenCollection
1193
+ }, null, 8, ["collections", "loading"])], 2), [[vShow, collections.value.length || loadingCollections.value]]),
1194
+ createVNode(TemplateList_default, {
1195
+ "infinite-scroll-enabled": true,
1196
+ loading: loadingWorkflows.value,
1197
+ workflows: workflows.value,
1198
+ "total-count": totalWorkflows.value,
1199
+ onLoadMore,
1200
+ onOpenTemplate
1201
+ }, null, 8, [
1202
+ "loading",
1203
+ "workflows",
1204
+ "total-count"
1205
+ ]),
1206
+ endOfSearchMessage.value ? (openBlock(), createElementBlock("div", {
1207
+ key: 0,
1208
+ class: normalizeClass(_ctx.$style.endText)
1209
+ }, [createVNode(unref(N8nText_default), {
1210
+ size: "medium",
1211
+ color: "text-base"
1212
+ }, {
1213
+ default: withCtx(() => [withDirectives(createBaseVNode("span", null, null, 512), [[_directive_n8n_html, endOfSearchMessage.value]])]),
1214
+ _: 1
1215
+ })], 2)) : createCommentVNode("", true)
1216
+ ], 2)], 2)]),
1217
+ _: 1
1218
+ });
1219
+ };
1220
+ }
1221
+ });
1222
+ var TemplatesSearchView_vue_vue_type_style_index_0_lang_module_default = {
1223
+ wrapper: "_wrapper_xumc9_123",
1224
+ contentWrapper: "_contentWrapper_xumc9_128",
1225
+ filters: "_filters_xumc9_138",
1226
+ search: "_search_xumc9_144",
1227
+ header: "_header_xumc9_156"
1228
+ };
1229
+ var TemplatesSearchView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(TemplatesSearchView_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": TemplatesSearchView_vue_vue_type_style_index_0_lang_module_default }]]);
1230
+ export { TemplatesSearchView_default as default };