prefect 3.6.14.dev4__py3-none-any.whl → 3.6.14.dev5__py3-none-any.whl

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 (211) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/events/clients.py +36 -3
  3. prefect/server/api/events.py +3 -2
  4. prefect/server/ui-v2/assets/{artifact-card-DmR_0bKj.js → artifact-card-DprxJzPy.js} +2 -2
  5. prefect/server/ui-v2/assets/{artifact-card-DmR_0bKj.js.map → artifact-card-DprxJzPy.js.map} +1 -1
  6. prefect/server/ui-v2/assets/{artifact._id-BF4365i6.js → artifact._id-CXcnU7_U.js} +2 -2
  7. prefect/server/ui-v2/assets/{artifact._id-BF4365i6.js.map → artifact._id-CXcnU7_U.js.map} +1 -1
  8. prefect/server/ui-v2/assets/{automation-wizard-DMI3p_HA.js → automation-wizard-DPKDA6ji.js} +2 -2
  9. prefect/server/ui-v2/assets/{automation-wizard-DMI3p_HA.js.map → automation-wizard-DPKDA6ji.js.map} +1 -1
  10. prefect/server/ui-v2/assets/{automation._id-C_ZATYDQ.js → automation._id-BvFFkDrn.js} +2 -2
  11. prefect/server/ui-v2/assets/{automation._id-C_ZATYDQ.js.map → automation._id-BvFFkDrn.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation_._id.edit-Dkc09fFA.js → automation_._id.edit-vpFy8Znl.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation_._id.edit-Dkc09fFA.js.map → automation_._id.edit-vpFy8Znl.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automations-header-H_FW9LY7.js → automations-header-eG-shDxp.js} +2 -2
  15. prefect/server/ui-v2/assets/{automations-header-H_FW9LY7.js.map → automations-header-eG-shDxp.js.map} +1 -1
  16. prefect/server/ui-v2/assets/{base-job-template-form-section-CVnxwfEi.js → base-job-template-form-section-du3c8HMM.js} +2 -2
  17. prefect/server/ui-v2/assets/{base-job-template-form-section-CVnxwfEi.js.map → base-job-template-form-section-du3c8HMM.js.map} +1 -1
  18. prefect/server/ui-v2/assets/{block-type-details-BIzTWlfj.js → block-type-details-CIGWaz9i.js} +2 -2
  19. prefect/server/ui-v2/assets/{block-type-details-BIzTWlfj.js.map → block-type-details-CIGWaz9i.js.map} +1 -1
  20. prefect/server/ui-v2/assets/{block-type-logo-B3XAhRSL.js → block-type-logo-B3oMH8dS.js} +2 -2
  21. prefect/server/ui-v2/assets/{block-type-logo-B3XAhRSL.js.map → block-type-logo-B3oMH8dS.js.map} +1 -1
  22. prefect/server/ui-v2/assets/{block._id-Bj0YEdv1.js → block._id-Cay2vm3g.js} +2 -2
  23. prefect/server/ui-v2/assets/{block._id-Bj0YEdv1.js.map → block._id-Cay2vm3g.js.map} +1 -1
  24. prefect/server/ui-v2/assets/{block_._id.edit-C7sUQ8mQ.js → block_._id.edit-bNSemu_v.js} +2 -2
  25. prefect/server/ui-v2/assets/{block_._id.edit-C7sUQ8mQ.js.map → block_._id.edit-bNSemu_v.js.map} +1 -1
  26. prefect/server/ui-v2/assets/{catalog-Cywf-iho.js → catalog-B3SdxUVJ.js} +2 -2
  27. prefect/server/ui-v2/assets/{catalog-Cywf-iho.js.map → catalog-B3SdxUVJ.js.map} +1 -1
  28. prefect/server/ui-v2/assets/{catalog_._slug-qLWMRQt3.js → catalog_._slug-BfQw_9GK.js} +2 -2
  29. prefect/server/ui-v2/assets/{catalog_._slug-qLWMRQt3.js.map → catalog_._slug-BfQw_9GK.js.map} +1 -1
  30. prefect/server/ui-v2/assets/{catalog_._slug_.create-LslFlpde.js → catalog_._slug_.create-k_HRDFv7.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog_._slug_.create-LslFlpde.js.map → catalog_._slug_.create-k_HRDFv7.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{collapsible-BszH-EeY.js → collapsible-CjJyAdbn.js} +2 -2
  33. prefect/server/ui-v2/assets/{collapsible-BszH-EeY.js.map → collapsible-CjJyAdbn.js.map} +1 -1
  34. prefect/server/ui-v2/assets/{concurrency-limit._id-Dam_Ftkw.js → concurrency-limit._id-B3Gnqcjc.js} +2 -2
  35. prefect/server/ui-v2/assets/{concurrency-limit._id-Dam_Ftkw.js.map → concurrency-limit._id-B3Gnqcjc.js.map} +1 -1
  36. prefect/server/ui-v2/assets/create-AIgXW0ut.js +2 -0
  37. prefect/server/ui-v2/assets/{create-B11nNTmT.js.map → create-AIgXW0ut.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{create-B8EFPjmO.js → create-CWAzl36x.js} +2 -2
  39. prefect/server/ui-v2/assets/{create-B8EFPjmO.js.map → create-CWAzl36x.js.map} +1 -1
  40. prefect/server/ui-v2/assets/{data-table-C1eRvlXV.js → data-table-B3EtpFhV.js} +2 -2
  41. prefect/server/ui-v2/assets/{data-table-C1eRvlXV.js.map → data-table-B3EtpFhV.js.map} +1 -1
  42. prefect/server/ui-v2/assets/{delete-confirmation-dialog-DCmC1ZTD.js → delete-confirmation-dialog-DyUMWSB-.js} +2 -2
  43. prefect/server/ui-v2/assets/{delete-confirmation-dialog-DCmC1ZTD.js.map → delete-confirmation-dialog-DyUMWSB-.js.map} +1 -1
  44. prefect/server/ui-v2/assets/{deployment-action-header-WD51TIyE.js → deployment-action-header-BJ8WZ6O0.js} +2 -2
  45. prefect/server/ui-v2/assets/{deployment-action-header-WD51TIyE.js.map → deployment-action-header-BJ8WZ6O0.js.map} +1 -1
  46. prefect/server/ui-v2/assets/{deployment-form-FaqDdnNa.js → deployment-form-DXZUK11h.js} +3 -3
  47. prefect/server/ui-v2/assets/{deployment-form-FaqDdnNa.js.map → deployment-form-DXZUK11h.js.map} +1 -1
  48. prefect/server/ui-v2/assets/{deployment-links-CLax44tW.js → deployment-links-bbtRf3OX.js} +2 -2
  49. prefect/server/ui-v2/assets/{deployment-links-CLax44tW.js.map → deployment-links-bbtRf3OX.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment._id-DrtOyhFC.js → deployment._id-DFzzDIAz.js} +2 -2
  51. prefect/server/ui-v2/assets/{deployment._id-DrtOyhFC.js.map → deployment._id-DFzzDIAz.js.map} +1 -1
  52. prefect/server/ui-v2/assets/{deployment._id-CbWiylvh.js → deployment._id-GmnYU2jN.js} +2 -2
  53. prefect/server/ui-v2/assets/{deployment._id-CbWiylvh.js.map → deployment._id-GmnYU2jN.js.map} +1 -1
  54. prefect/server/ui-v2/assets/deployment_._id.duplicate--_rm26pJ.js +2 -0
  55. prefect/server/ui-v2/assets/{deployment_._id.duplicate-CqlNWQfz.js.map → deployment_._id.duplicate--_rm26pJ.js.map} +1 -1
  56. prefect/server/ui-v2/assets/deployment_._id.edit-BS799pF4.js +2 -0
  57. prefect/server/ui-v2/assets/{deployment_._id.edit-CbvCe2YU.js.map → deployment_._id.edit-BS799pF4.js.map} +1 -1
  58. prefect/server/ui-v2/assets/{deployment_._id.run-BnIFeR-d.js → deployment_._id.run-c02Fu6v1.js} +2 -2
  59. prefect/server/ui-v2/assets/{deployment_._id.run-BnIFeR-d.js.map → deployment_._id.run-c02Fu6v1.js.map} +1 -1
  60. prefect/server/ui-v2/assets/{dropdown-menu-Bhox1zoa.js → dropdown-menu-6cSdnzsr.js} +2 -2
  61. prefect/server/ui-v2/assets/{dropdown-menu-Bhox1zoa.js.map → dropdown-menu-6cSdnzsr.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{event-resource-display-65B76oFV.js → event-resource-display-DeFGeJR9.js} +2 -2
  63. prefect/server/ui-v2/assets/{event-resource-display-65B76oFV.js.map → event-resource-display-DeFGeJR9.js.map} +1 -1
  64. prefect/server/ui-v2/assets/{event._eventDate._eventId-CxPjH2H7.js → event._eventDate._eventId-CKnfHNoF.js} +2 -2
  65. prefect/server/ui-v2/assets/{event._eventDate._eventId-CxPjH2H7.js.map → event._eventDate._eventId-CKnfHNoF.js.map} +1 -1
  66. prefect/server/ui-v2/assets/{flow-run-graph-ZOatFLjv.js → flow-run-graph-aynL8fbE.js} +2 -2
  67. prefect/server/ui-v2/assets/{flow-run-graph-ZOatFLjv.js.map → flow-run-graph-aynL8fbE.js.map} +1 -1
  68. prefect/server/ui-v2/assets/{flow-run._id-CDFeuz16.js → flow-run._id-4lwBtUgU.js} +2 -2
  69. prefect/server/ui-v2/assets/{flow-run._id-CDFeuz16.js.map → flow-run._id-4lwBtUgU.js.map} +1 -1
  70. prefect/server/ui-v2/assets/{flow-run._id-1RC-URiA.js → flow-run._id-CT2imMDV.js} +2 -2
  71. prefect/server/ui-v2/assets/{flow-run._id-1RC-URiA.js.map → flow-run._id-CT2imMDV.js.map} +1 -1
  72. prefect/server/ui-v2/assets/{flow-run._id-U6rzXfvR.js → flow-run._id-s3t6dDIS.js} +3 -3
  73. prefect/server/ui-v2/assets/{flow-run._id-U6rzXfvR.js.map → flow-run._id-s3t6dDIS.js.map} +1 -1
  74. prefect/server/ui-v2/assets/{flow-runs-pagination-D_d5hdM0.js → flow-runs-pagination-DvDLs5GM.js} +2 -2
  75. prefect/server/ui-v2/assets/{flow-runs-pagination-D_d5hdM0.js.map → flow-runs-pagination-DvDLs5GM.js.map} +1 -1
  76. prefect/server/ui-v2/assets/{flow._id-DkeN8TLS.js → flow._id-U31aNcVQ.js} +2 -2
  77. prefect/server/ui-v2/assets/{flow._id-DkeN8TLS.js.map → flow._id-U31aNcVQ.js.map} +1 -1
  78. prefect/server/ui-v2/assets/{form-CJfDUosd.js → form-DvAgEGjn.js} +2 -2
  79. prefect/server/ui-v2/assets/{form-CJfDUosd.js.map → form-DvAgEGjn.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{header-MZZX5lQ8.js → header-Bq61DIIv.js} +2 -2
  81. prefect/server/ui-v2/assets/{header-MZZX5lQ8.js.map → header-Bq61DIIv.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{header-C5liWcfp.js → header-QiKDPn2b.js} +2 -2
  83. prefect/server/ui-v2/assets/{header-C5liWcfp.js.map → header-QiKDPn2b.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-vYbWNFdK.js → header-YbYlGgAg.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-vYbWNFdK.js.map → header-YbYlGgAg.js.map} +1 -1
  86. prefect/server/ui-v2/assets/{index-BPmw935P.js → index--QEAQOap.js} +2 -2
  87. prefect/server/ui-v2/assets/{index-BPmw935P.js.map → index--QEAQOap.js.map} +1 -1
  88. prefect/server/ui-v2/assets/{index-4xVLy12E.js → index-BJJn5VNO.js} +2 -2
  89. prefect/server/ui-v2/assets/{index-4xVLy12E.js.map → index-BJJn5VNO.js.map} +1 -1
  90. prefect/server/ui-v2/assets/{index-B_3WKH2_.js → index-BToZEh2M.js} +2 -2
  91. prefect/server/ui-v2/assets/{index-B_3WKH2_.js.map → index-BToZEh2M.js.map} +1 -1
  92. prefect/server/ui-v2/assets/{index-DeeA9nPM.js → index-BzE5jxe7.js} +2 -2
  93. prefect/server/ui-v2/assets/{index-DeeA9nPM.js.map → index-BzE5jxe7.js.map} +1 -1
  94. prefect/server/ui-v2/assets/{index-BR6bwuK4.js → index-C-uTnVrI.js} +2 -2
  95. prefect/server/ui-v2/assets/{index-BR6bwuK4.js.map → index-C-uTnVrI.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-CbJNJTr8.js → index-C19BICb6.js} +2 -2
  97. prefect/server/ui-v2/assets/{index-CbJNJTr8.js.map → index-C19BICb6.js.map} +1 -1
  98. prefect/server/ui-v2/assets/{index-CCCwtbSq.js → index-C84_3iOG.js} +2 -2
  99. prefect/server/ui-v2/assets/{index-CCCwtbSq.js.map → index-C84_3iOG.js.map} +1 -1
  100. prefect/server/ui-v2/assets/{index-BOVwKiXn.js → index-CGt_907f.js} +2 -2
  101. prefect/server/ui-v2/assets/{index-BOVwKiXn.js.map → index-CGt_907f.js.map} +1 -1
  102. prefect/server/ui-v2/assets/{index-7bWZ2Znt.js → index-COtFm673.js} +2 -2
  103. prefect/server/ui-v2/assets/{index-7bWZ2Znt.js.map → index-COtFm673.js.map} +1 -1
  104. prefect/server/ui-v2/assets/{index-DLuXqHi9.js → index-CQlQauOE.js} +4 -4
  105. prefect/server/ui-v2/assets/{index-DLuXqHi9.js.map → index-CQlQauOE.js.map} +1 -1
  106. prefect/server/ui-v2/assets/{index-ClXbR8i0.js → index-CovPzmtX.js} +2 -2
  107. prefect/server/ui-v2/assets/{index-ClXbR8i0.js.map → index-CovPzmtX.js.map} +1 -1
  108. prefect/server/ui-v2/assets/{index-BgOHAC5L.js → index-CzZJA-g2.js} +2 -2
  109. prefect/server/ui-v2/assets/{index-BgOHAC5L.js.map → index-CzZJA-g2.js.map} +1 -1
  110. prefect/server/ui-v2/assets/{index-Bmd9p_xN.js → index-D9O_iUny.js} +2 -2
  111. prefect/server/ui-v2/assets/{index-Bmd9p_xN.js.map → index-D9O_iUny.js.map} +1 -1
  112. prefect/server/ui-v2/assets/{index-CfHvTOAO.js → index-DBhG-F3c.js} +2 -2
  113. prefect/server/ui-v2/assets/{index-CfHvTOAO.js.map → index-DBhG-F3c.js.map} +1 -1
  114. prefect/server/ui-v2/assets/{index-5fQrQZ3K.js → index-DEijvsFf.js} +2 -2
  115. prefect/server/ui-v2/assets/{index-5fQrQZ3K.js.map → index-DEijvsFf.js.map} +1 -1
  116. prefect/server/ui-v2/assets/{index-enqoJV8x.js → index-DJx6_wL3.js} +2 -2
  117. prefect/server/ui-v2/assets/{index-enqoJV8x.js.map → index-DJx6_wL3.js.map} +1 -1
  118. prefect/server/ui-v2/assets/{index-BmdTLblr.js → index-DzylsDQg.js} +2 -2
  119. prefect/server/ui-v2/assets/{index-BmdTLblr.js.map → index-DzylsDQg.js.map} +1 -1
  120. prefect/server/ui-v2/assets/{index-CcyfsgGP.js → index-MqrX6o60.js} +2 -2
  121. prefect/server/ui-v2/assets/{index-CcyfsgGP.js.map → index-MqrX6o60.js.map} +1 -1
  122. prefect/server/ui-v2/assets/{index-MeJBhX-C.js → index-Xbikq0U9.js} +2 -2
  123. prefect/server/ui-v2/assets/{index-MeJBhX-C.js.map → index-Xbikq0U9.js.map} +1 -1
  124. prefect/server/ui-v2/assets/{index-Cyw9YHlj.js → index-xd6ftCzl.js} +2 -2
  125. prefect/server/ui-v2/assets/{index-Cyw9YHlj.js.map → index-xd6ftCzl.js.map} +1 -1
  126. prefect/server/ui-v2/assets/{json-input-CJ1Ipjax.js → json-input-CUdR2ooF.js} +2 -2
  127. prefect/server/ui-v2/assets/{json-input-CJ1Ipjax.js.map → json-input-CUdR2ooF.js.map} +1 -1
  128. prefect/server/ui-v2/assets/{key._key-B0wb5Umi.js → key._key-Dkjl-3EA.js} +2 -2
  129. prefect/server/ui-v2/assets/{key._key-B0wb5Umi.js.map → key._key-Dkjl-3EA.js.map} +1 -1
  130. prefect/server/ui-v2/assets/{lazy-markdown-sP3PYQgB.js → lazy-markdown-B5J5jhCs.js} +2 -2
  131. prefect/server/ui-v2/assets/{lazy-markdown-sP3PYQgB.js.map → lazy-markdown-B5J5jhCs.js.map} +1 -1
  132. prefect/server/ui-v2/assets/{login-DNY0o3XU.js → login-DzDO0DVR.js} +2 -2
  133. prefect/server/ui-v2/assets/{login-DNY0o3XU.js.map → login-DzDO0DVR.js.map} +1 -1
  134. prefect/server/ui-v2/assets/{markdown-input-Bos2JYXW.js → markdown-input-BYRT3e1M.js} +2 -2
  135. prefect/server/ui-v2/assets/{markdown-input-Bos2JYXW.js.map → markdown-input-BYRT3e1M.js.map} +1 -1
  136. prefect/server/ui-v2/assets/{python-example-snippet-CWSJRd48.js → python-example-snippet-BMLiEUYL.js} +3 -3
  137. prefect/server/ui-v2/assets/{python-example-snippet-CWSJRd48.js.map → python-example-snippet-BMLiEUYL.js.map} +1 -1
  138. prefect/server/ui-v2/assets/{python-input-Bu4995lK.js → python-input-xovZoSSG.js} +2 -2
  139. prefect/server/ui-v2/assets/{python-input-Bu4995lK.js.map → python-input-xovZoSSG.js.map} +1 -1
  140. prefect/server/ui-v2/assets/{radio-group-C0D0oLYd.js → radio-group-B4HH3BMW.js} +2 -2
  141. prefect/server/ui-v2/assets/{radio-group-C0D0oLYd.js.map → radio-group-B4HH3BMW.js.map} +1 -1
  142. prefect/server/ui-v2/assets/{route-error-state-DzKu_Iw_.js → route-error-state-BI1VOaRa.js} +2 -2
  143. prefect/server/ui-v2/assets/{route-error-state-DzKu_Iw_.js.map → route-error-state-BI1VOaRa.js.map} +1 -1
  144. prefect/server/ui-v2/assets/schema-form-DvPKoIJV.js +2 -0
  145. prefect/server/ui-v2/assets/schema-form-DvPKoIJV.js.map +1 -0
  146. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DyDs1jNl.js → schema-form-input-string-format-datetime-FBLeet2k.js} +4 -4
  147. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DyDs1jNl.js.map → schema-form-input-string-format-datetime-FBLeet2k.js.map} +1 -1
  148. prefect/server/ui-v2/assets/{settings-a90cwhBe.js → settings-LiwgpMzF.js} +2 -2
  149. prefect/server/ui-v2/assets/{settings-a90cwhBe.js.map → settings-LiwgpMzF.js.map} +1 -1
  150. prefect/server/ui-v2/assets/{sort-filter-CCltjs1E.js → sort-filter-BdZ0BjdE.js} +2 -2
  151. prefect/server/ui-v2/assets/{sort-filter-CCltjs1E.js.map → sort-filter-BdZ0BjdE.js.map} +1 -1
  152. prefect/server/ui-v2/assets/{table-CrPymfJD.js → table--kjjs3jN.js} +2 -2
  153. prefect/server/ui-v2/assets/{table-CrPymfJD.js.map → table--kjjs3jN.js.map} +1 -1
  154. prefect/server/ui-v2/assets/{tags-input-BdNYl8nS.js → tags-input-9pBchAz7.js} +2 -2
  155. prefect/server/ui-v2/assets/{tags-input-BdNYl8nS.js.map → tags-input-9pBchAz7.js.map} +1 -1
  156. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-B4bdiAgf.js → task-run-concurrency-limits-reset-dialog-B3XhJqIQ.js} +2 -2
  157. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-B4bdiAgf.js.map → task-run-concurrency-limits-reset-dialog-B3XhJqIQ.js.map} +1 -1
  158. prefect/server/ui-v2/assets/{task-run._id-BzeMfM08.js → task-run._id-BdlPyINB.js} +2 -2
  159. prefect/server/ui-v2/assets/{task-run._id-BzeMfM08.js.map → task-run._id-BdlPyINB.js.map} +1 -1
  160. prefect/server/ui-v2/assets/{task-run._id-BQac40_I.js → task-run._id-BnZwcX9a.js} +2 -2
  161. prefect/server/ui-v2/assets/{task-run._id-BQac40_I.js.map → task-run._id-BnZwcX9a.js.map} +1 -1
  162. prefect/server/ui-v2/assets/{task-runs-pagination-WFGIqR6p.js → task-runs-pagination-ClbepGWu.js} +2 -2
  163. prefect/server/ui-v2/assets/{task-runs-pagination-WFGIqR6p.js.map → task-runs-pagination-ClbepGWu.js.map} +1 -1
  164. prefect/server/ui-v2/assets/{textarea-CGFflH-n.js → textarea-CjmPCtZi.js} +2 -2
  165. prefect/server/ui-v2/assets/{textarea-CGFflH-n.js.map → textarea-CjmPCtZi.js.map} +1 -1
  166. prefect/server/ui-v2/assets/{timezone-select-ClE9nfKA.js → timezone-select-5WxUFUXB.js} +2 -2
  167. prefect/server/ui-v2/assets/{timezone-select-ClE9nfKA.js.map → timezone-select-5WxUFUXB.js.map} +1 -1
  168. prefect/server/ui-v2/assets/{toggle-group-Dnv_LMnU.js → toggle-group-DjbSsHsv.js} +2 -2
  169. prefect/server/ui-v2/assets/{toggle-group-Dnv_LMnU.js.map → toggle-group-DjbSsHsv.js.map} +1 -1
  170. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-CRGV6wvn.js → use-delete-automation-confirmation-dialog-C7nas8eR.js} +2 -2
  171. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-CRGV6wvn.js.map → use-delete-automation-confirmation-dialog-C7nas8eR.js.map} +1 -1
  172. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DNMP_gtr.js → use-delete-block-document-confirmation-dialog-Cz3znU4m.js} +2 -2
  173. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DNMP_gtr.js.map → use-delete-block-document-confirmation-dialog-Cz3znU4m.js.map} +1 -1
  174. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D3-TVsRL.js → use-flow-runs-selected-rows-B_7PiPKo.js} +2 -2
  175. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D3-TVsRL.js.map → use-flow-runs-selected-rows-B_7PiPKo.js.map} +1 -1
  176. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-I3Wb9fOV.js → use-get-artifacts-flow-task-runs-BitcuQLc.js} +2 -2
  177. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-I3Wb9fOV.js.map → use-get-artifacts-flow-task-runs-BitcuQLc.js.map} +1 -1
  178. prefect/server/ui-v2/assets/{use-quick-run-Be-i6Tzi.js → use-quick-run-IfBGzpj9.js} +2 -2
  179. prefect/server/ui-v2/assets/{use-quick-run-Be-i6Tzi.js.map → use-quick-run-IfBGzpj9.js.map} +1 -1
  180. prefect/server/ui-v2/assets/{use-state-favicon-DtW_I9k3.js → use-state-favicon-kNCf3RcS.js} +2 -2
  181. prefect/server/ui-v2/assets/{use-state-favicon-DtW_I9k3.js.map → use-state-favicon-kNCf3RcS.js.map} +1 -1
  182. prefect/server/ui-v2/assets/{use-stepper-BSvi_u_j.js → use-stepper-DRdSNO1_.js} +2 -2
  183. prefect/server/ui-v2/assets/{use-stepper-BSvi_u_j.js.map → use-stepper-DRdSNO1_.js.map} +1 -1
  184. prefect/server/ui-v2/assets/{utilities-BCBDUmEl.js → utilities-B74wofJY.js} +2 -2
  185. prefect/server/ui-v2/assets/{utilities-BCBDUmEl.js.map → utilities-B74wofJY.js.map} +1 -1
  186. prefect/server/ui-v2/assets/{work-pool-filter-BuJB9elW.js → work-pool-filter-BD0cywQF.js} +2 -2
  187. prefect/server/ui-v2/assets/{work-pool-filter-BuJB9elW.js.map → work-pool-filter-BD0cywQF.js.map} +1 -1
  188. prefect/server/ui-v2/assets/{work-pool-queue-toggle-DP2ONU28.js → work-pool-queue-toggle-Dd3mOecD.js} +2 -2
  189. prefect/server/ui-v2/assets/{work-pool-queue-toggle-DP2ONU28.js.map → work-pool-queue-toggle-Dd3mOecD.js.map} +1 -1
  190. prefect/server/ui-v2/assets/{work-pool._workPoolName-BjhJe3F4.js → work-pool._workPoolName-Dxf0Y-lV.js} +2 -2
  191. prefect/server/ui-v2/assets/{work-pool._workPoolName-BjhJe3F4.js.map → work-pool._workPoolName-Dxf0Y-lV.js.map} +1 -1
  192. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-B0Y9VwYX.js +2 -0
  193. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-lHDf1Aih.js.map → work-pool_._workPoolName.edit-B0Y9VwYX.js.map} +1 -1
  194. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js → work-pool_._workPoolName.queue._workQueueName-ZHSn4vVg.js} +2 -2
  195. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js.map → work-pool_._workPoolName.queue._workQueueName-ZHSn4vVg.js.map} +1 -1
  196. prefect/server/ui-v2/assets/{work-queue-icon-text-4iEAtZOh.js → work-queue-icon-text-GE7b8Ro1.js} +2 -2
  197. prefect/server/ui-v2/assets/{work-queue-icon-text-4iEAtZOh.js.map → work-queue-icon-text-GE7b8Ro1.js.map} +1 -1
  198. prefect/server/ui-v2/index.html +1 -1
  199. prefect/server/utilities/subscriptions.py +25 -8
  200. prefect/testing/fixtures.py +31 -1
  201. {prefect-3.6.14.dev4.dist-info → prefect-3.6.14.dev5.dist-info}/METADATA +1 -1
  202. {prefect-3.6.14.dev4.dist-info → prefect-3.6.14.dev5.dist-info}/RECORD +205 -205
  203. prefect/server/ui-v2/assets/create-B11nNTmT.js +0 -2
  204. prefect/server/ui-v2/assets/deployment_._id.duplicate-CqlNWQfz.js +0 -2
  205. prefect/server/ui-v2/assets/deployment_._id.edit-CbvCe2YU.js +0 -2
  206. prefect/server/ui-v2/assets/schema-form-BD95b0iS.js +0 -2
  207. prefect/server/ui-v2/assets/schema-form-BD95b0iS.js.map +0 -1
  208. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-lHDf1Aih.js +0 -2
  209. {prefect-3.6.14.dev4.dist-info → prefect-3.6.14.dev5.dist-info}/WHEEL +0 -0
  210. {prefect-3.6.14.dev4.dist-info → prefect-3.6.14.dev5.dist-info}/entry_points.txt +0 -0
  211. {prefect-3.6.14.dev4.dist-info → prefect-3.6.14.dev5.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"create-B8EFPjmO.js","sources":["../../src/components/automations/automations-create-header/automations-create-header.tsx","../../src/routes/automations/create.tsx?tsr-split=component"],"sourcesContent":["import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\n\nexport const AutomationsCreateHeader = () => (\n\t<div className=\"flex items-center justify-between\">\n\t\t<NavHeader />\n\t\t<DocsLink label=\"Documentation\" id=\"automations-guide\" />\n\t</div>\n);\n\nconst NavHeader = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/automations\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tAutomations\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>Create</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { useQuery } from \"@tanstack/react-query\";\nimport { createFileRoute, useNavigate } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateAutomation } from \"@/api/automations\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport type { components } from \"@/api/prefect\";\nimport { AutomationsCreateHeader } from \"@/components/automations/automations-create-header\";\nimport {\n\tAutomationWizard,\n\ttype AutomationWizardSchemaType,\n\ttransformEventToTrigger,\n} from \"@/components/automations/automations-wizard\";\n\ntype AutomationCreate = components[\"schemas\"][\"AutomationCreate\"];\n\n/**\n * Search params schema for the create automation route.\n * Supports pre-populating the wizard from an event.\n */\nconst searchParams = z.object({\n\tactions: z.record(z.unknown()).optional(),\n\t/** Event ID to pre-populate the trigger from */\n\teventId: z.string().optional(),\n\t/** Event date in YYYY-MM-DD format for fetching the event */\n\teventDate: z.string().optional(),\n});\n\n/**\n * Parses a YYYY-MM-DD date string into a Date object.\n */\nfunction parseRouteDate(dateStr: string): Date {\n\tconst [year, month, day] = dateStr.split(\"-\").map(Number);\n\treturn new Date(year, month - 1, day);\n}\n\nexport const Route = createFileRoute(\"/automations/create\")({\n\tcomponent: RouteComponent,\n\tvalidateSearch: zodValidator(searchParams),\n\tloaderDeps: ({ search }) => ({\n\t\teventId: search.eventId,\n\t\teventDate: search.eventDate,\n\t}),\n\tloader: ({ deps, context: { queryClient } }) => {\n\t\t// Prefetch event data if eventId and eventDate are provided\n\t\tif (deps.eventId && deps.eventDate) {\n\t\t\tconst eventDate = parseRouteDate(deps.eventDate);\n\t\t\tvoid queryClient.prefetchQuery(\n\t\t\t\tbuildGetEventQuery(deps.eventId, eventDate),\n\t\t\t);\n\t\t}\n\t},\n\twrapInSuspense: true,\n});\n\n/**\n * Hook to get default values for the automation wizard when pre-populating from an event.\n * Returns undefined if no event params are provided.\n */\nfunction useEventDefaultValues() {\n\tconst { eventId, eventDate } = Route.useSearch();\n\n\t// Only fetch if both params are provided\n\tconst shouldFetch = Boolean(eventId && eventDate);\n\n\t// Use useQuery (not useSuspenseQuery) because useSuspenseQuery doesn't support enabled option\n\tconst { data: event } = useQuery({\n\t\t...buildGetEventQuery(\n\t\t\teventId ?? \"\",\n\t\t\teventDate ? parseRouteDate(eventDate) : new Date(),\n\t\t),\n\t\tenabled: shouldFetch,\n\t});\n\n\tif (!shouldFetch || !event) {\n\t\treturn undefined;\n\t}\n\n\tconst { trigger, triggerTemplate } = transformEventToTrigger(event);\n\treturn {\n\t\ttrigger,\n\t\ttriggerTemplate,\n\t};\n}\n\nfunction RouteComponent() {\n\tconst { createAutomation, isPending } = useCreateAutomation();\n\tconst navigate = useNavigate();\n\tconst eventDefaultValues = useEventDefaultValues();\n\n\tconst handleSubmit = (values: AutomationWizardSchemaType) => {\n\t\tconst automationData: AutomationCreate = {\n\t\t\tname: values.name,\n\t\t\tdescription: values.description ?? \"\",\n\t\t\tenabled: true,\n\t\t\ttrigger: values.trigger,\n\t\t\tactions: values.actions,\n\t\t};\n\n\t\tcreateAutomation(automationData, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Automation created successfully\");\n\t\t\t\tvoid navigate({ to: \"/automations\" });\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\ttoast.error(`Failed to create automation: ${error.message}`);\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<AutomationsCreateHeader />\n\t\t\t<AutomationWizard\n\t\t\t\tdefaultValues={eventDefaultValues}\n\t\t\t\tonSubmit={handleSubmit}\n\t\t\t\tisSubmitting={isPending}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["AutomationsCreateHeader","jsxs","jsx","NavHeader","DocsLink","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage","parseRouteDate","dateStr","year","month","day","split","map","Number","Date","useEventDefaultValues","eventId","eventDate","Route","useSearch","shouldFetch","Boolean","data","event","useQuery","buildGetEventQuery","enabled","trigger","triggerTemplate","transformEventToTrigger","RouteComponent","createAutomation","isPending","useCreateAutomation","navigate","useNavigate","eventDefaultValues","handleSubmit","values","automationData","name","description","actions","onSuccess","toast","success","to","onError","error","message","AutomationWizard"],"mappings":"suBAUO,MAAMA,EAA0B,IACtCC,EAAAA,KAAC,MAAA,CAAI,UAAU,oCACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAU,EACXD,EAAAA,IAACE,EAAA,CAAS,MAAM,gBAAgB,GAAG,mBAAA,CAAoB,CAAA,EACxD,EAGKD,EAAY,IACjBD,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAACG,EAAA,CACA,SAAAJ,EAAAA,KAACK,EAAA,CACA,SAAA,CAAAJ,EAAAA,IAACK,EAAA,CACA,eAACC,EAAA,CAAe,GAAG,eAAe,UAAU,wBAAwB,uBAEpE,CAAA,CACD,QACCC,EAAA,EAAoB,QACpBF,EAAA,CAAe,UAAU,wBACzB,SAAAL,EAAAA,IAACQ,EAAA,CAAe,kBAAM,CAAA,CACvB,CAAA,CAAA,CACD,EACD,EACD,ECAD,SAASC,EAAeC,EAAuB,CAC9C,KAAM,CAACC,EAAMC,EAAOC,CAAG,EAAIH,EAAQI,MAAM,GAAG,EAAEC,IAAIC,MAAM,EACxD,OAAO,IAAIC,KAAKN,EAAMC,EAAQ,EAAGC,CAAG,CACrC,CAyBA,SAASK,GAAwB,CAChC,KAAM,CAAEC,QAAAA,EAASC,UAAAA,CAAAA,EAAcC,EAAMC,UAAAA,EAG/BC,EAAcC,GAAQL,GAAWC,GAGjC,CAAEK,KAAMC,CAAAA,EAAUC,EAAS,CAChC,GAAGC,EACFT,GAAW,GACXC,EAAYX,EAAeW,CAAS,EAAI,IAAIH,IAC7C,EACAY,QAASN,CAAAA,CACT,EAED,GAAI,CAACA,GAAe,CAACG,EACpB,OAGD,KAAM,CAAEI,QAAAA,EAASC,gBAAAA,CAAAA,EAAoBC,EAAwBN,CAAK,EAClE,MAAO,CACNI,QAAAA,EACAC,gBAAAA,CAAAA,CAEF,CAEA,SAASE,GAAiB,CACzB,KAAM,CAAEC,iBAAAA,EAAkBC,UAAAA,CAAAA,EAAcC,EAAAA,EAClCC,EAAWC,EAAAA,EACXC,EAAqBrB,EAAAA,EAErBsB,EAAgBC,GAAuC,CAC5D,MAAMC,EAAmC,CACxCC,KAAMF,EAAOE,KACbC,YAAaH,EAAOG,aAAe,GACnCf,QAAS,GACTC,QAASW,EAAOX,QAChBe,QAASJ,EAAOI,OAAAA,EAGjBX,EAAiBQ,EAAgB,CAChCI,UAAWA,IAAM,CAChBC,EAAMC,QAAQ,iCAAiC,EAC1CX,EAAS,CAAEY,GAAI,cAAA,CAAgB,CACrC,EACAC,QAAUC,GAAU,CACnBJ,EAAMI,MAAM,gCAAgCA,EAAMC,OAAO,EAAE,CAC5D,CAAA,CACA,CACF,EAEA,OACCrD,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACF,EAAA,EAAuB,QACvBuD,EAAA,CACA,cAAed,EACf,SAAUC,EACV,aAAcL,CAAAA,CAAU,CAAA,EAE1B,CAEF"}
1
+ {"version":3,"file":"create-CWAzl36x.js","sources":["../../src/components/automations/automations-create-header/automations-create-header.tsx","../../src/routes/automations/create.tsx?tsr-split=component"],"sourcesContent":["import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\n\nexport const AutomationsCreateHeader = () => (\n\t<div className=\"flex items-center justify-between\">\n\t\t<NavHeader />\n\t\t<DocsLink label=\"Documentation\" id=\"automations-guide\" />\n\t</div>\n);\n\nconst NavHeader = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/automations\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tAutomations\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>Create</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { useQuery } from \"@tanstack/react-query\";\nimport { createFileRoute, useNavigate } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateAutomation } from \"@/api/automations\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport type { components } from \"@/api/prefect\";\nimport { AutomationsCreateHeader } from \"@/components/automations/automations-create-header\";\nimport {\n\tAutomationWizard,\n\ttype AutomationWizardSchemaType,\n\ttransformEventToTrigger,\n} from \"@/components/automations/automations-wizard\";\n\ntype AutomationCreate = components[\"schemas\"][\"AutomationCreate\"];\n\n/**\n * Search params schema for the create automation route.\n * Supports pre-populating the wizard from an event.\n */\nconst searchParams = z.object({\n\tactions: z.record(z.unknown()).optional(),\n\t/** Event ID to pre-populate the trigger from */\n\teventId: z.string().optional(),\n\t/** Event date in YYYY-MM-DD format for fetching the event */\n\teventDate: z.string().optional(),\n});\n\n/**\n * Parses a YYYY-MM-DD date string into a Date object.\n */\nfunction parseRouteDate(dateStr: string): Date {\n\tconst [year, month, day] = dateStr.split(\"-\").map(Number);\n\treturn new Date(year, month - 1, day);\n}\n\nexport const Route = createFileRoute(\"/automations/create\")({\n\tcomponent: RouteComponent,\n\tvalidateSearch: zodValidator(searchParams),\n\tloaderDeps: ({ search }) => ({\n\t\teventId: search.eventId,\n\t\teventDate: search.eventDate,\n\t}),\n\tloader: ({ deps, context: { queryClient } }) => {\n\t\t// Prefetch event data if eventId and eventDate are provided\n\t\tif (deps.eventId && deps.eventDate) {\n\t\t\tconst eventDate = parseRouteDate(deps.eventDate);\n\t\t\tvoid queryClient.prefetchQuery(\n\t\t\t\tbuildGetEventQuery(deps.eventId, eventDate),\n\t\t\t);\n\t\t}\n\t},\n\twrapInSuspense: true,\n});\n\n/**\n * Hook to get default values for the automation wizard when pre-populating from an event.\n * Returns undefined if no event params are provided.\n */\nfunction useEventDefaultValues() {\n\tconst { eventId, eventDate } = Route.useSearch();\n\n\t// Only fetch if both params are provided\n\tconst shouldFetch = Boolean(eventId && eventDate);\n\n\t// Use useQuery (not useSuspenseQuery) because useSuspenseQuery doesn't support enabled option\n\tconst { data: event } = useQuery({\n\t\t...buildGetEventQuery(\n\t\t\teventId ?? \"\",\n\t\t\teventDate ? parseRouteDate(eventDate) : new Date(),\n\t\t),\n\t\tenabled: shouldFetch,\n\t});\n\n\tif (!shouldFetch || !event) {\n\t\treturn undefined;\n\t}\n\n\tconst { trigger, triggerTemplate } = transformEventToTrigger(event);\n\treturn {\n\t\ttrigger,\n\t\ttriggerTemplate,\n\t};\n}\n\nfunction RouteComponent() {\n\tconst { createAutomation, isPending } = useCreateAutomation();\n\tconst navigate = useNavigate();\n\tconst eventDefaultValues = useEventDefaultValues();\n\n\tconst handleSubmit = (values: AutomationWizardSchemaType) => {\n\t\tconst automationData: AutomationCreate = {\n\t\t\tname: values.name,\n\t\t\tdescription: values.description ?? \"\",\n\t\t\tenabled: true,\n\t\t\ttrigger: values.trigger,\n\t\t\tactions: values.actions,\n\t\t};\n\n\t\tcreateAutomation(automationData, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Automation created successfully\");\n\t\t\t\tvoid navigate({ to: \"/automations\" });\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\ttoast.error(`Failed to create automation: ${error.message}`);\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<AutomationsCreateHeader />\n\t\t\t<AutomationWizard\n\t\t\t\tdefaultValues={eventDefaultValues}\n\t\t\t\tonSubmit={handleSubmit}\n\t\t\t\tisSubmitting={isPending}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["AutomationsCreateHeader","jsxs","jsx","NavHeader","DocsLink","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage","parseRouteDate","dateStr","year","month","day","split","map","Number","Date","useEventDefaultValues","eventId","eventDate","Route","useSearch","shouldFetch","Boolean","data","event","useQuery","buildGetEventQuery","enabled","trigger","triggerTemplate","transformEventToTrigger","RouteComponent","createAutomation","isPending","useCreateAutomation","navigate","useNavigate","eventDefaultValues","handleSubmit","values","automationData","name","description","actions","onSuccess","toast","success","to","onError","error","message","AutomationWizard"],"mappings":"suBAUO,MAAMA,EAA0B,IACtCC,EAAAA,KAAC,MAAA,CAAI,UAAU,oCACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAU,EACXD,EAAAA,IAACE,EAAA,CAAS,MAAM,gBAAgB,GAAG,mBAAA,CAAoB,CAAA,EACxD,EAGKD,EAAY,IACjBD,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAACG,EAAA,CACA,SAAAJ,EAAAA,KAACK,EAAA,CACA,SAAA,CAAAJ,EAAAA,IAACK,EAAA,CACA,eAACC,EAAA,CAAe,GAAG,eAAe,UAAU,wBAAwB,uBAEpE,CAAA,CACD,QACCC,EAAA,EAAoB,QACpBF,EAAA,CAAe,UAAU,wBACzB,SAAAL,EAAAA,IAACQ,EAAA,CAAe,kBAAM,CAAA,CACvB,CAAA,CAAA,CACD,EACD,EACD,ECAD,SAASC,EAAeC,EAAuB,CAC9C,KAAM,CAACC,EAAMC,EAAOC,CAAG,EAAIH,EAAQI,MAAM,GAAG,EAAEC,IAAIC,MAAM,EACxD,OAAO,IAAIC,KAAKN,EAAMC,EAAQ,EAAGC,CAAG,CACrC,CAyBA,SAASK,GAAwB,CAChC,KAAM,CAAEC,QAAAA,EAASC,UAAAA,CAAAA,EAAcC,EAAMC,UAAAA,EAG/BC,EAAcC,GAAQL,GAAWC,GAGjC,CAAEK,KAAMC,CAAAA,EAAUC,EAAS,CAChC,GAAGC,EACFT,GAAW,GACXC,EAAYX,EAAeW,CAAS,EAAI,IAAIH,IAC7C,EACAY,QAASN,CAAAA,CACT,EAED,GAAI,CAACA,GAAe,CAACG,EACpB,OAGD,KAAM,CAAEI,QAAAA,EAASC,gBAAAA,CAAAA,EAAoBC,EAAwBN,CAAK,EAClE,MAAO,CACNI,QAAAA,EACAC,gBAAAA,CAAAA,CAEF,CAEA,SAASE,GAAiB,CACzB,KAAM,CAAEC,iBAAAA,EAAkBC,UAAAA,CAAAA,EAAcC,EAAAA,EAClCC,EAAWC,EAAAA,EACXC,EAAqBrB,EAAAA,EAErBsB,EAAgBC,GAAuC,CAC5D,MAAMC,EAAmC,CACxCC,KAAMF,EAAOE,KACbC,YAAaH,EAAOG,aAAe,GACnCf,QAAS,GACTC,QAASW,EAAOX,QAChBe,QAASJ,EAAOI,OAAAA,EAGjBX,EAAiBQ,EAAgB,CAChCI,UAAWA,IAAM,CAChBC,EAAMC,QAAQ,iCAAiC,EAC1CX,EAAS,CAAEY,GAAI,cAAA,CAAgB,CACrC,EACAC,QAAUC,GAAU,CACnBJ,EAAMI,MAAM,gCAAgCA,EAAMC,OAAO,EAAE,CAC5D,CAAA,CACA,CACF,EAEA,OACCrD,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACF,EAAA,EAAuB,QACvBuD,EAAA,CACA,cAAed,EACf,SAAUC,EACV,aAAcL,CAAAA,CAAU,CAAA,EAE1B,CAEF"}
@@ -1,2 +1,2 @@
1
- import{j as e,K as r}from"./vendor-tanstack-CWDKYA_B.js";import{S as h,a as j,b as f,c as p,e as l,b6 as P,aW as S,b7 as C,b8 as o,cs as v,b9 as D,ba as N,ct as T}from"./index-DLuXqHi9.js";import{T as z,a as b,b as c,c as w,d as M,e as x}from"./table-CrPymfJD.js";function k({table:n,onPrefetchPage:i}){return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(z,{children:[e.jsx(b,{children:n.getHeaderGroups().map(a=>e.jsx(c,{children:a.headers.map(s=>e.jsx(w,{style:{...s.column.columnDef.maxSize&&{maxWidth:`${s.column.columnDef.maxSize}px`},...s.column.columnDef.size&&{width:`${s.column.columnDef.size}px`}},children:s.isPlaceholder?null:r(s.column.columnDef.header,s.getContext())},s.id))},a.id))}),e.jsx(M,{children:n.getRowModel().rows?.length?n.getRowModel().rows.map(a=>e.jsx(c,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(s=>e.jsx(x,{style:{...s.column.columnDef.maxSize&&{maxWidth:`${s.column.columnDef.maxSize}px`},...s.column.columnDef.size&&{width:`${s.column.columnDef.size}px`}},children:r(s.column.columnDef.cell,s.getContext())},s.id))},a.id)):e.jsx(c,{children:e.jsx(x,{colSpan:n.getAllColumns().length,className:"h-24 text-center",children:"No results."})})})]})}),e.jsxs("div",{className:"flex flex-row justify-between items-center",children:[e.jsx(I,{table:n}),e.jsx(y,{table:n,onPrefetchPage:i})]})]})}function I({table:n}){return e.jsxs("div",{className:"flex flex-row items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Items per page"}),e.jsxs(h,{value:n.getState().pagination.pageSize.toString(),onValueChange:i=>{n.setPageSize(Number(i))},children:[e.jsx(j,{"aria-label":"Items per page",children:e.jsx(f,{placeholder:"Theme"})}),e.jsxs(p,{children:[e.jsx(l,{value:"5",children:"5"}),e.jsx(l,{value:"10",children:"10"}),e.jsx(l,{value:"25",children:"25"}),e.jsx(l,{value:"50",children:"50"})]})]})]})}function y({table:n,className:i,onPrefetchPage:a}){const s=n.getPageCount(),t=Math.min(Math.ceil(n.getState().pagination.pageIndex+1),s),d=()=>{t>1&&a?.(1)},m=()=>{t>1&&a?.(t-1)},u=()=>{t<s&&a?.(t+1)},g=()=>{t<s&&a?.(s)};return e.jsx(P,{className:S("justify-end",i),children:e.jsxs(C,{children:[e.jsxs(o,{children:[e.jsx(v,{onClick:()=>n.firstPage(),onMouseEnter:d,disabled:!n.getCanPreviousPage()}),e.jsx(D,{onClick:()=>n.previousPage(),onMouseEnter:m,disabled:!n.getCanPreviousPage()})]}),e.jsxs(o,{className:"text-sm",children:["Page ",t," of ",s]}),e.jsx(o,{children:e.jsx(N,{onClick:()=>n.nextPage(),onMouseEnter:u,disabled:!n.getCanNextPage()})}),e.jsx(o,{children:e.jsx(T,{onClick:()=>n.lastPage(),onMouseEnter:g,disabled:!n.getCanNextPage()})})]})})}export{k as D};
2
- //# sourceMappingURL=data-table-C1eRvlXV.js.map
1
+ import{j as e,K as r}from"./vendor-tanstack-CWDKYA_B.js";import{S as h,a as j,b as f,c as p,e as l,b6 as P,aW as S,b7 as C,b8 as o,cs as v,b9 as D,ba as N,ct as T}from"./index-CQlQauOE.js";import{T as z,a as b,b as c,c as w,d as M,e as x}from"./table--kjjs3jN.js";function k({table:n,onPrefetchPage:i}){return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(z,{children:[e.jsx(b,{children:n.getHeaderGroups().map(a=>e.jsx(c,{children:a.headers.map(s=>e.jsx(w,{style:{...s.column.columnDef.maxSize&&{maxWidth:`${s.column.columnDef.maxSize}px`},...s.column.columnDef.size&&{width:`${s.column.columnDef.size}px`}},children:s.isPlaceholder?null:r(s.column.columnDef.header,s.getContext())},s.id))},a.id))}),e.jsx(M,{children:n.getRowModel().rows?.length?n.getRowModel().rows.map(a=>e.jsx(c,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(s=>e.jsx(x,{style:{...s.column.columnDef.maxSize&&{maxWidth:`${s.column.columnDef.maxSize}px`},...s.column.columnDef.size&&{width:`${s.column.columnDef.size}px`}},children:r(s.column.columnDef.cell,s.getContext())},s.id))},a.id)):e.jsx(c,{children:e.jsx(x,{colSpan:n.getAllColumns().length,className:"h-24 text-center",children:"No results."})})})]})}),e.jsxs("div",{className:"flex flex-row justify-between items-center",children:[e.jsx(I,{table:n}),e.jsx(y,{table:n,onPrefetchPage:i})]})]})}function I({table:n}){return e.jsxs("div",{className:"flex flex-row items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Items per page"}),e.jsxs(h,{value:n.getState().pagination.pageSize.toString(),onValueChange:i=>{n.setPageSize(Number(i))},children:[e.jsx(j,{"aria-label":"Items per page",children:e.jsx(f,{placeholder:"Theme"})}),e.jsxs(p,{children:[e.jsx(l,{value:"5",children:"5"}),e.jsx(l,{value:"10",children:"10"}),e.jsx(l,{value:"25",children:"25"}),e.jsx(l,{value:"50",children:"50"})]})]})]})}function y({table:n,className:i,onPrefetchPage:a}){const s=n.getPageCount(),t=Math.min(Math.ceil(n.getState().pagination.pageIndex+1),s),d=()=>{t>1&&a?.(1)},m=()=>{t>1&&a?.(t-1)},u=()=>{t<s&&a?.(t+1)},g=()=>{t<s&&a?.(s)};return e.jsx(P,{className:S("justify-end",i),children:e.jsxs(C,{children:[e.jsxs(o,{children:[e.jsx(v,{onClick:()=>n.firstPage(),onMouseEnter:d,disabled:!n.getCanPreviousPage()}),e.jsx(D,{onClick:()=>n.previousPage(),onMouseEnter:m,disabled:!n.getCanPreviousPage()})]}),e.jsxs(o,{className:"text-sm",children:["Page ",t," of ",s]}),e.jsx(o,{children:e.jsx(N,{onClick:()=>n.nextPage(),onMouseEnter:u,disabled:!n.getCanNextPage()})}),e.jsx(o,{children:e.jsx(T,{onClick:()=>n.lastPage(),onMouseEnter:g,disabled:!n.getCanNextPage()})})]})})}export{k as D};
2
+ //# sourceMappingURL=data-table-B3EtpFhV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-C1eRvlXV.js","sources":["../../src/components/ui/data-table.tsx"],"sourcesContent":["import { flexRender, type Table as TanstackTable } from \"@tanstack/react-table\";\nimport {\n\tPagination,\n\tPaginationContent,\n\tPaginationFirstButton,\n\tPaginationItem,\n\tPaginationLastButton,\n\tPaginationNextButton,\n\tPaginationPreviousButton,\n} from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/utils\";\n\nexport function DataTable<TData>({\n\ttable,\n\tonPrefetchPage,\n}: {\n\ttable: TanstackTable<TData>;\n\tonPrefetchPage?: (page: number) => void;\n}) {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t...(header.column.columnDef.maxSize && {\n\t\t\t\t\t\t\t\t\t\t\t\tmaxWidth: `${header.column.columnDef.maxSize}px`,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t...(header.column.columnDef.size && {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: `${header.column.columnDef.size}px`,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t...(cell.column.columnDef.maxSize && {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaxWidth: `${cell.column.columnDef.maxSize}px`,\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\t...(cell.column.columnDef.size && {\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: `${cell.column.columnDef.size}px`,\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tcolSpan={table.getAllColumns().length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNo results.\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-row justify-between items-center\">\n\t\t\t\t<DataTablePageSize table={table} />\n\t\t\t\t<DataTablePagination table={table} onPrefetchPage={onPrefetchPage} />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\ninterface DataTablePageSizeProps<TData> {\n\ttable: TanstackTable<TData>;\n}\n\nfunction DataTablePageSize<TData>({ table }: DataTablePageSizeProps<TData>) {\n\treturn (\n\t\t<div className=\"flex flex-row items-center gap-2 text-xs text-muted-foreground\">\n\t\t\t<span className=\"whitespace-nowrap\">Items per page</span>\n\t\t\t<Select\n\t\t\t\tvalue={table.getState().pagination.pageSize.toString()}\n\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\ttable.setPageSize(Number(value));\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<SelectTrigger aria-label=\"Items per page\">\n\t\t\t\t\t<SelectValue placeholder=\"Theme\" />\n\t\t\t\t</SelectTrigger>\n\t\t\t\t<SelectContent>\n\t\t\t\t\t<SelectItem value=\"5\">5</SelectItem>\n\t\t\t\t\t<SelectItem value=\"10\">10</SelectItem>\n\t\t\t\t\t<SelectItem value=\"25\">25</SelectItem>\n\t\t\t\t\t<SelectItem value=\"50\">50</SelectItem>\n\t\t\t\t</SelectContent>\n\t\t\t</Select>\n\t\t</div>\n\t);\n}\n\ninterface DataTablePaginationProps<TData> {\n\ttable: TanstackTable<TData>;\n\tclassName?: string;\n\tonPrefetchPage?: (page: number) => void;\n}\n\nexport function DataTablePagination<TData>({\n\ttable,\n\tclassName,\n\tonPrefetchPage,\n}: DataTablePaginationProps<TData>) {\n\tconst totalPages = table.getPageCount();\n\tconst currentPage = Math.min(\n\t\tMath.ceil(table.getState().pagination.pageIndex + 1),\n\t\ttotalPages,\n\t);\n\n\tconst handlePrefetchFirstPage = () => {\n\t\tif (currentPage > 1) onPrefetchPage?.(1);\n\t};\n\tconst handlePrefetchPreviousPage = () => {\n\t\tif (currentPage > 1) onPrefetchPage?.(currentPage - 1);\n\t};\n\tconst handlePrefetchNextPage = () => {\n\t\tif (currentPage < totalPages) onPrefetchPage?.(currentPage + 1);\n\t};\n\tconst handlePrefetchLastPage = () => {\n\t\tif (currentPage < totalPages) onPrefetchPage?.(totalPages);\n\t};\n\n\treturn (\n\t\t<Pagination className={cn(\"justify-end\", className)}>\n\t\t\t<PaginationContent>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationFirstButton\n\t\t\t\t\t\tonClick={() => table.firstPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchFirstPage}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t/>\n\t\t\t\t\t<PaginationPreviousButton\n\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchPreviousPage}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem className=\"text-sm\">\n\t\t\t\t\tPage {currentPage} of {totalPages}\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationNextButton\n\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchNextPage}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationLastButton\n\t\t\t\t\t\tonClick={() => table.lastPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchLastPage}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t</PaginationContent>\n\t\t</Pagination>\n\t);\n}\n"],"names":["DataTable","table","onPrefetchPage","jsxs","jsx","Table","TableHeader","headerGroup","TableRow","header","TableHead","flexRender","TableBody","row","cell","TableCell","DataTablePageSize","DataTablePagination","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","className","totalPages","currentPage","handlePrefetchFirstPage","handlePrefetchPreviousPage","handlePrefetchNextPage","handlePrefetchLastPage","Pagination","cn","PaginationContent","PaginationItem","PaginationFirstButton","PaginationPreviousButton","PaginationNextButton","PaginationLastButton"],"mappings":"wQA2BO,SAASA,EAAiB,CAChC,MAAAC,EACA,eAAAC,CACD,EAGG,CACF,OACCC,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,MAAC,MAAA,CAAI,UAAU,oBACd,SAAAD,EAAAA,KAACE,EAAA,CACA,SAAA,CAAAD,EAAAA,IAACE,EAAA,CACC,SAAAL,EAAM,gBAAA,EAAkB,IAAKM,GAC7BH,EAAAA,IAACI,EAAA,CACC,SAAAD,EAAY,QAAQ,IAAKE,GACzBL,EAAAA,IAACM,EAAA,CAEA,MAAO,CACN,GAAID,EAAO,OAAO,UAAU,SAAW,CACtC,SAAU,GAAGA,EAAO,OAAO,UAAU,OAAO,IAAA,EAE7C,GAAIA,EAAO,OAAO,UAAU,MAAQ,CACnC,MAAO,GAAGA,EAAO,OAAO,UAAU,IAAI,IAAA,CACvC,EAGA,SAAAA,EAAO,cACL,KACAE,EACAF,EAAO,OAAO,UAAU,OACxBA,EAAO,WAAA,CAAW,CACnB,EAfGA,EAAO,EAAA,CAiBb,GApBaF,EAAY,EAqB3B,CACA,CAAA,CACF,EACAH,EAAAA,IAACQ,EAAA,CACC,SAAAX,EAAM,YAAA,EAAc,MAAM,OAC1BA,EAAM,YAAA,EAAc,K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,CACA,SAAA9B,EAAAA,IAACiC,EAAA,CACA,QAAS,IAAMpC,EAAM,SAAA,EACrB,aAAc4B,EACd,SAAU,CAAC5B,EAAM,eAAA,CAAe,CAAA,EAElC,QACCiC,EAAA,CACA,SAAA9B,EAAAA,IAACkC,EAAA,CACA,QAAS,IAAMrC,EAAM,SAAA,EACrB,aAAc6B,EACd,SAAU,CAAC7B,EAAM,eAAA,CAAe,CAAA,CACjC,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
1
+ {"version":3,"file":"data-table-B3EtpFhV.js","sources":["../../src/components/ui/data-table.tsx"],"sourcesContent":["import { flexRender, type Table as TanstackTable } from \"@tanstack/react-table\";\nimport {\n\tPagination,\n\tPaginationContent,\n\tPaginationFirstButton,\n\tPaginationItem,\n\tPaginationLastButton,\n\tPaginationNextButton,\n\tPaginationPreviousButton,\n} from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/utils\";\n\nexport function DataTable<TData>({\n\ttable,\n\tonPrefetchPage,\n}: {\n\ttable: TanstackTable<TData>;\n\tonPrefetchPage?: (page: number) => void;\n}) {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t...(header.column.columnDef.maxSize && {\n\t\t\t\t\t\t\t\t\t\t\t\tmaxWidth: `${header.column.columnDef.maxSize}px`,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t...(header.column.columnDef.size && {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: `${header.column.columnDef.size}px`,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t...(cell.column.columnDef.maxSize && {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaxWidth: `${cell.column.columnDef.maxSize}px`,\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\t...(cell.column.columnDef.size && {\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: `${cell.column.columnDef.size}px`,\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tcolSpan={table.getAllColumns().length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNo results.\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-row justify-between items-center\">\n\t\t\t\t<DataTablePageSize table={table} />\n\t\t\t\t<DataTablePagination table={table} onPrefetchPage={onPrefetchPage} />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\ninterface DataTablePageSizeProps<TData> {\n\ttable: TanstackTable<TData>;\n}\n\nfunction DataTablePageSize<TData>({ table }: DataTablePageSizeProps<TData>) {\n\treturn (\n\t\t<div className=\"flex flex-row items-center gap-2 text-xs text-muted-foreground\">\n\t\t\t<span className=\"whitespace-nowrap\">Items per page</span>\n\t\t\t<Select\n\t\t\t\tvalue={table.getState().pagination.pageSize.toString()}\n\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\ttable.setPageSize(Number(value));\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<SelectTrigger aria-label=\"Items per page\">\n\t\t\t\t\t<SelectValue placeholder=\"Theme\" />\n\t\t\t\t</SelectTrigger>\n\t\t\t\t<SelectContent>\n\t\t\t\t\t<SelectItem value=\"5\">5</SelectItem>\n\t\t\t\t\t<SelectItem value=\"10\">10</SelectItem>\n\t\t\t\t\t<SelectItem value=\"25\">25</SelectItem>\n\t\t\t\t\t<SelectItem value=\"50\">50</SelectItem>\n\t\t\t\t</SelectContent>\n\t\t\t</Select>\n\t\t</div>\n\t);\n}\n\ninterface DataTablePaginationProps<TData> {\n\ttable: TanstackTable<TData>;\n\tclassName?: string;\n\tonPrefetchPage?: (page: number) => void;\n}\n\nexport function DataTablePagination<TData>({\n\ttable,\n\tclassName,\n\tonPrefetchPage,\n}: DataTablePaginationProps<TData>) {\n\tconst totalPages = table.getPageCount();\n\tconst currentPage = Math.min(\n\t\tMath.ceil(table.getState().pagination.pageIndex + 1),\n\t\ttotalPages,\n\t);\n\n\tconst handlePrefetchFirstPage = () => {\n\t\tif (currentPage > 1) onPrefetchPage?.(1);\n\t};\n\tconst handlePrefetchPreviousPage = () => {\n\t\tif (currentPage > 1) onPrefetchPage?.(currentPage - 1);\n\t};\n\tconst handlePrefetchNextPage = () => {\n\t\tif (currentPage < totalPages) onPrefetchPage?.(currentPage + 1);\n\t};\n\tconst handlePrefetchLastPage = () => {\n\t\tif (currentPage < totalPages) onPrefetchPage?.(totalPages);\n\t};\n\n\treturn (\n\t\t<Pagination className={cn(\"justify-end\", className)}>\n\t\t\t<PaginationContent>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationFirstButton\n\t\t\t\t\t\tonClick={() => table.firstPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchFirstPage}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t/>\n\t\t\t\t\t<PaginationPreviousButton\n\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchPreviousPage}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem className=\"text-sm\">\n\t\t\t\t\tPage {currentPage} of {totalPages}\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationNextButton\n\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchNextPage}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t\t<PaginationItem>\n\t\t\t\t\t<PaginationLastButton\n\t\t\t\t\t\tonClick={() => table.lastPage()}\n\t\t\t\t\t\tonMouseEnter={handlePrefetchLastPage}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t/>\n\t\t\t\t</PaginationItem>\n\t\t\t</PaginationContent>\n\t\t</Pagination>\n\t);\n}\n"],"names":["DataTable","table","onPrefetchPage","jsxs","jsx","Table","TableHeader","headerGroup","TableRow","header","TableHead","flexRender","TableBody","row","cell","TableCell","DataTablePageSize","DataTablePagination","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","className","totalPages","currentPage","handlePrefetchFirstPage","handlePrefetchPreviousPage","handlePrefetchNextPage","handlePrefetchLastPage","Pagination","cn","PaginationContent","PaginationItem","PaginationFirstButton","PaginationPreviousButton","PaginationNextButton","PaginationLastButton"],"mappings":"wQA2BO,SAASA,EAAiB,CAChC,MAAAC,EACA,eAAAC,CACD,EAGG,CACF,OACCC,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,MAAC,MAAA,CAAI,UAAU,oBACd,SAAAD,EAAAA,KAACE,EAAA,CACA,SAAA,CAAAD,EAAAA,IAACE,EAAA,CACC,SAAAL,EAAM,gBAAA,EAAkB,IAAKM,GAC7BH,EAAAA,IAACI,EAAA,CACC,SAAAD,EAAY,QAAQ,IAAKE,GACzBL,EAA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W,UAAWC,EAAG,cAAeR,CAAS,EACjD,gBAACS,EAAA,CACA,SAAA,CAAA9B,OAAC+B,EAAA,CACA,SAAA,CAAA9B,EAAAA,IAAC+B,EAAA,CACA,QAAS,IAAMlC,EAAM,UAAA,EACrB,aAAc0B,EACd,SAAU,CAAC1B,EAAM,mBAAA,CAAmB,CAAA,EAErCG,EAAAA,IAACgC,EAAA,CACA,QAAS,IAAMnC,EAAM,aAAA,EACrB,aAAc2B,EACd,SAAU,CAAC3B,EAAM,mBAAA,CAAmB,CAAA,CACrC,EACD,EACAE,EAAAA,KAAC+B,EAAA,CAAe,UAAU,UAAU,SAAA,CAAA,QAC7BR,EAAY,OAAKD,CAAA,EACxB,QACCS,EAAA,CACA,SAAA9B,EAAAA,IAACiC,EAAA,CACA,QAAS,IAAMpC,EAAM,SAAA,EACrB,aAAc4B,EACd,SAAU,CAAC5B,EAAM,eAAA,CAAe,CAAA,EAElC,QACCiC,EAAA,CACA,SAAA9B,EAAAA,IAACkC,EAAA,CACA,QAAS,IAAMrC,EAAM,SAAA,EACrB,aAAc6B,EACd,SAAU,CAAC7B,EAAM,eAAA,CAAe,CAAA,CACjC,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{r as x,j as e}from"./vendor-tanstack-CWDKYA_B.js";import{cW as g,cX as u,cY as C,cZ as m,c_ as A,i as f,p as v,c$ as b,d0 as k,d1 as y}from"./index-DLuXqHi9.js";const I=({isOpen:r,title:i,description:o,onConfirm:c,onClose:d,confirmText:l,isLoading:a=!1,loadingText:h="Deleting..."})=>{const[t,s]=x.useState(""),n=()=>{s(""),d()},p=()=>{c(),s("")},D=a||!!l&&t!==l;return e.jsx(g,{open:r,onOpenChange:n,children:e.jsxs(u,{children:[e.jsxs(C,{children:[e.jsx(m,{children:i}),e.jsx(A,{children:o})]}),l&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs(f,{htmlFor:"confirm-text",children:["Type ",e.jsx("strong",{children:l})," to confirm:"]}),e.jsx(v,{id:"confirm-text",value:t,onChange:j=>s(j.target.value),placeholder:l})]}),e.jsxs(b,{children:[e.jsx(k,{onClick:n,children:"Cancel"}),e.jsx(y,{variant:"destructive",onClick:p,disabled:D,children:a?h:"Delete"})]})]})})};export{I as D};
2
- //# sourceMappingURL=delete-confirmation-dialog-DCmC1ZTD.js.map
1
+ import{r as x,j as e}from"./vendor-tanstack-CWDKYA_B.js";import{cW as g,cX as u,cY as C,cZ as m,c_ as A,i as f,p as v,c$ as b,d0 as k,d1 as y}from"./index-CQlQauOE.js";const I=({isOpen:r,title:i,description:o,onConfirm:c,onClose:d,confirmText:l,isLoading:a=!1,loadingText:h="Deleting..."})=>{const[t,s]=x.useState(""),n=()=>{s(""),d()},p=()=>{c(),s("")},D=a||!!l&&t!==l;return e.jsx(g,{open:r,onOpenChange:n,children:e.jsxs(u,{children:[e.jsxs(C,{children:[e.jsx(m,{children:i}),e.jsx(A,{children:o})]}),l&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs(f,{htmlFor:"confirm-text",children:["Type ",e.jsx("strong",{children:l})," to confirm:"]}),e.jsx(v,{id:"confirm-text",value:t,onChange:j=>s(j.target.value),placeholder:l})]}),e.jsxs(b,{children:[e.jsx(k,{onClick:n,children:"Cancel"}),e.jsx(y,{variant:"destructive",onClick:p,disabled:D,children:a?h:"Delete"})]})]})})};export{I as D};
2
+ //# sourceMappingURL=delete-confirmation-dialog-DyUMWSB-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-confirmation-dialog-DCmC1ZTD.js","sources":["../../src/components/ui/delete-confirmation-dialog/delete-confirmation-dialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n} from \"@/components/ui/alert-dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\nexport type DeleteConfirmationDialogProps = {\n\tisOpen: boolean;\n\ttitle: string;\n\tdescription: string;\n\tonConfirm: () => void;\n\tonClose: () => void;\n\tconfirmText?: string;\n\tisLoading?: boolean;\n\tloadingText?: string;\n};\n\nexport const DeleteConfirmationDialog = ({\n\tisOpen,\n\ttitle,\n\tdescription,\n\tonConfirm,\n\tonClose,\n\tconfirmText,\n\tisLoading = false,\n\tloadingText = \"Deleting...\",\n}: DeleteConfirmationDialogProps) => {\n\tconst [inputValue, setInputValue] = useState(\"\");\n\n\tconst handleClose = () => {\n\t\tsetInputValue(\"\");\n\t\tonClose();\n\t};\n\n\tconst handleConfirm = () => {\n\t\tonConfirm();\n\t\tsetInputValue(\"\");\n\t};\n\n\tconst isConfirmDisabled =\n\t\tisLoading || (!!confirmText && inputValue !== confirmText);\n\n\treturn (\n\t\t<AlertDialog open={isOpen} onOpenChange={handleClose}>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>{title}</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>{description}</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t{confirmText && (\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<Label htmlFor=\"confirm-text\">\n\t\t\t\t\t\t\tType <strong>{confirmText}</strong> to confirm:\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"confirm-text\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\tonChange={(e) => setInputValue(e.target.value)}\n\t\t\t\t\t\t\tplaceholder={confirmText}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel onClick={handleClose}>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={handleConfirm}\n\t\t\t\t\t\tdisabled={isConfirmDisabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isLoading ? loadingText : \"Delete\"}\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"],"names":["DeleteConfirmationDialog","isOpen","title","description","onConfirm","onClose","confirmText","isLoading","loadingText","inputValue","setInputValue","useState","handleClose","handleConfirm","isConfirmDisabled","AlertDialog","AlertDialogContent","jsxs","AlertDialogHeader","jsx","AlertDialogTitle","AlertDialogDescription","Label","Input","e","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"mappings":"wKAyBO,MAAMA,EAA2B,CAAC,CACxC,OAAAC,EACA,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,YAAAC,EAAc,aACf,IAAqC,CACpC,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAE,EAEzCC,EAAc,IAAM,CACzBF,EAAc,EAAE,EAChBL,EAAA,CACD,EAEMQ,EAAgB,IAAM,CAC3BT,EAAA,EACAM,EAAc,EAAE,CACjB,EAEMI,EACLP,GAAc,CAAC,CAACD,GAAeG,IAAeH,EAE/C,aACES,EAAA,CAAY,KAAMd,EAAQ,aAAcW,EACxC,gBAACI,EAAA,CACA,SAAA,CAAAC,OAACC,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,GAAkB,SAAAlB,CAAA,CAAM,EACzBiB,EAAAA,IAACE,GAAwB,SAAAlB,CAAA,CAAY,CAAA,EACtC,EACCG,GACAW,EAAAA,KAAC,MAAA,CAAI,UAAU,YACd,SAAA,CAAAA,EAAAA,KAACK,EAAA,CAAM,QAAQ,eAAe,SAAA,CAAA,QACxBH,EAAAA,IAAC,UAAQ,SAAAb,CAAA,CAAY,EAAS,cAAA,EACpC,EACAa,EAAAA,IAACI,EAAA,CACA,GAAG,eACH,MAAOd,EACP,SAAWe,GAAMd,EAAcc,EAAE,OAAO,KAAK,EAC7C,YAAalB,CAAA,CAAA,CACd,EACD,SAEAmB,EAAA,CACA,SAAA,CAAAN,EAAAA,IAACO,EAAA,CAAkB,QAASd,EAAa,SAAA,SAAM,EAC/CO,EAAAA,IAACQ,EAAA,CACA,QAAQ,cACR,QAASd,EACT,SAAUC,EAET,WAAYN,EAAc,QAAA,CAAA,CAC5B,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
1
+ {"version":3,"file":"delete-confirmation-dialog-DyUMWSB-.js","sources":["../../src/components/ui/delete-confirmation-dialog/delete-confirmation-dialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n} from \"@/components/ui/alert-dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\nexport type DeleteConfirmationDialogProps = {\n\tisOpen: boolean;\n\ttitle: string;\n\tdescription: string;\n\tonConfirm: () => void;\n\tonClose: () => void;\n\tconfirmText?: string;\n\tisLoading?: boolean;\n\tloadingText?: string;\n};\n\nexport const DeleteConfirmationDialog = ({\n\tisOpen,\n\ttitle,\n\tdescription,\n\tonConfirm,\n\tonClose,\n\tconfirmText,\n\tisLoading = false,\n\tloadingText = \"Deleting...\",\n}: DeleteConfirmationDialogProps) => {\n\tconst [inputValue, setInputValue] = useState(\"\");\n\n\tconst handleClose = () => {\n\t\tsetInputValue(\"\");\n\t\tonClose();\n\t};\n\n\tconst handleConfirm = () => {\n\t\tonConfirm();\n\t\tsetInputValue(\"\");\n\t};\n\n\tconst isConfirmDisabled =\n\t\tisLoading || (!!confirmText && inputValue !== confirmText);\n\n\treturn (\n\t\t<AlertDialog open={isOpen} onOpenChange={handleClose}>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>{title}</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>{description}</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t{confirmText && (\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<Label htmlFor=\"confirm-text\">\n\t\t\t\t\t\t\tType <strong>{confirmText}</strong> to confirm:\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"confirm-text\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\tonChange={(e) => setInputValue(e.target.value)}\n\t\t\t\t\t\t\tplaceholder={confirmText}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel onClick={handleClose}>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={handleConfirm}\n\t\t\t\t\t\tdisabled={isConfirmDisabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isLoading ? loadingText : \"Delete\"}\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"],"names":["DeleteConfirmationDialog","isOpen","title","description","onConfirm","onClose","confirmText","isLoading","loadingText","inputValue","setInputValue","useState","handleClose","handleConfirm","isConfirmDisabled","AlertDialog","AlertDialogContent","jsxs","AlertDialogHeader","jsx","AlertDialogTitle","AlertDialogDescription","Label","Input","e","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"mappings":"wKAyBO,MAAMA,EAA2B,CAAC,CACxC,OAAAC,EACA,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,YAAAC,EAAc,aACf,IAAqC,CACpC,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAE,EAEzCC,EAAc,IAAM,CACzBF,EAAc,EAAE,EAChBL,EAAA,CACD,EAEMQ,EAAgB,IAAM,CAC3BT,EAAA,EACAM,EAAc,EAAE,CACjB,EAEMI,EACLP,GAAc,CAAC,CAACD,GAAeG,IAAeH,EAE/C,aACES,EAAA,CAAY,KAAMd,EAAQ,aAAcW,EACxC,gBAACI,EAAA,CACA,SAAA,CAAAC,OAACC,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,GAAkB,SAAAlB,CAAA,CAAM,EACzBiB,EAAAA,IAACE,GAAwB,SAAAlB,CAAA,CAAY,CAAA,EACtC,EACCG,GACAW,EAAAA,KAAC,MAAA,CAAI,UAAU,YACd,SAAA,CAAAA,EAAAA,KAACK,EAAA,CAAM,QAAQ,eAAe,SAAA,CAAA,QACxBH,EAAAA,IAAC,UAAQ,SAAAb,CAAA,CAAY,EAAS,cAAA,EACpC,EACAa,EAAAA,IAACI,EAAA,CACA,GAAG,eACH,MAAOd,EACP,SAAWe,GAAMd,EAAcc,EAAE,OAAO,KAAK,EAC7C,YAAalB,CAAA,CAAA,CACd,EACD,SAEAmB,EAAA,CACA,SAAA,CAAAN,EAAAA,IAACO,EAAA,CAAkB,QAASd,EAAa,SAAA,SAAM,EAC/CO,EAAAA,IAACQ,EAAA,CACA,QAAQ,cACR,QAASd,EACT,SAAUC,EAET,WAAYN,EAAc,QAAA,CAAA,CAC5B,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{j as e,r as o,s as p}from"./vendor-tanstack-CWDKYA_B.js";import{dF as f,ac as S,ad as B,ae as g,af as y,ah as L,ag as k,ai as D,aj as u,B as v,g as w,h as d,bs as x,bB as b,bD as W}from"./index-DLuXqHi9.js";const E=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>e.jsx(o.Suspense,{children:e.jsx(I,{presetOptions:r,selected:s,onSelect:l,workPoolName:t})}),I=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>{const[c,m]=o.useState(""),{data:i}=p(f({work_pool_name:t})),n=o.useDeferredValue(c),h=o.useMemo(()=>i.filter(a=>a.name.toLowerCase().includes(n.toLowerCase())),[i,n]),j=o.useMemo(()=>r.filter(a=>a.label.toLowerCase().includes(n.toLowerCase())),[n,r]);return e.jsxs(S,{children:[e.jsx(B,{selected:!!s,"aria-label":"Select a work queue",children:s}),e.jsxs(g,{children:[e.jsx(y,{value:c,onValueChange:m,placeholder:"Search for a work queue..."}),e.jsx(L,{children:"No work queue found"}),e.jsx(k,{children:e.jsxs(D,{children:[j.map(a=>e.jsx(u,{selected:s===a.value,onSelect:()=>{l(a.value),m("")},value:String(a.label),children:a.label},a.label)),h.map(a=>e.jsx(u,{selected:s===a.name,onSelect:C=>{l(C),m("")},value:a.name,children:a.name},a.id))]})})]})]})},P=({deployment:r,action:s})=>e.jsx(v,{children:e.jsxs(w,{children:[e.jsx(d,{children:e.jsx(x,{to:"/deployments",className:"text-xl font-semibold",children:"Deployments"})}),e.jsx(b,{}),e.jsx(d,{children:e.jsx(x,{to:"/deployments/deployment/$id",params:{id:r.id},className:"text-xl font-semibold",children:r.name})}),e.jsx(b,{}),e.jsx(d,{className:"text-xl font-semibold",children:e.jsx(W,{children:s})})]})});export{P as D,E as W};
2
- //# sourceMappingURL=deployment-action-header-WD51TIyE.js.map
1
+ import{j as e,r as o,s as p}from"./vendor-tanstack-CWDKYA_B.js";import{dG as f,ac as S,ad as B,ae as g,af as y,ah as L,ag as k,ai as D,aj as u,B as v,g as w,h as d,bs as x,bB as b,bD as W}from"./index-CQlQauOE.js";const E=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>e.jsx(o.Suspense,{children:e.jsx(I,{presetOptions:r,selected:s,onSelect:l,workPoolName:t})}),I=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>{const[c,m]=o.useState(""),{data:i}=p(f({work_pool_name:t})),n=o.useDeferredValue(c),h=o.useMemo(()=>i.filter(a=>a.name.toLowerCase().includes(n.toLowerCase())),[i,n]),j=o.useMemo(()=>r.filter(a=>a.label.toLowerCase().includes(n.toLowerCase())),[n,r]);return e.jsxs(S,{children:[e.jsx(B,{selected:!!s,"aria-label":"Select a work queue",children:s}),e.jsxs(g,{children:[e.jsx(y,{value:c,onValueChange:m,placeholder:"Search for a work queue..."}),e.jsx(L,{children:"No work queue found"}),e.jsx(k,{children:e.jsxs(D,{children:[j.map(a=>e.jsx(u,{selected:s===a.value,onSelect:()=>{l(a.value),m("")},value:String(a.label),children:a.label},a.label)),h.map(a=>e.jsx(u,{selected:s===a.name,onSelect:C=>{l(C),m("")},value:a.name,children:a.name},a.id))]})})]})]})},P=({deployment:r,action:s})=>e.jsx(v,{children:e.jsxs(w,{children:[e.jsx(d,{children:e.jsx(x,{to:"/deployments",className:"text-xl font-semibold",children:"Deployments"})}),e.jsx(b,{}),e.jsx(d,{children:e.jsx(x,{to:"/deployments/deployment/$id",params:{id:r.id},className:"text-xl font-semibold",children:r.name})}),e.jsx(b,{}),e.jsx(d,{className:"text-xl font-semibold",children:e.jsx(W,{children:s})})]})});export{P as D,E as W};
2
+ //# sourceMappingURL=deployment-action-header-BJ8WZ6O0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployment-action-header-WD51TIyE.js","sources":["../../src/components/work-pools/work-queue-select/work-queue-select.tsx","../../src/components/deployments/deployment-action-header.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildFilterWorkPoolWorkQueuesQuery } from \"@/api/work-queues\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype WorkQueueSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n\tworkPoolName: string;\n};\n\nexport const WorkQueueSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n\tworkPoolName,\n}: WorkQueueSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<WorkQueueSelecImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tworkPoolName={workPoolName}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst WorkQueueSelecImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n\tworkPoolName,\n}: WorkQueueSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(\n\t\tbuildFilterWorkPoolWorkQueuesQuery({ work_pool_name: workPoolName }),\n\t);\n\n\t// nb: because work queues API does not have filtering _like by name, do client-side filtering\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((workQueue) =>\n\t\t\tworkQueue.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a work queue\"\n\t\t\t>\n\t\t\t\t{selected}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a work queue...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>No work queue found</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((workQueue) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={workQueue.id}\n\t\t\t\t\t\t\t\tselected={selected === workQueue.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={workQueue.name}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{workQueue.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { Deployment } from \"@/api/deployments\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\n\ntype DeploymentActionHeaderProps = {\n\tdeployment: Deployment;\n\taction: \"Edit\" | \"Duplicate\" | \"Run\";\n};\n\nexport const DeploymentActionHeader = ({\n\tdeployment,\n\taction,\n}: DeploymentActionHeaderProps) => {\n\treturn (\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/deployments\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tDeployments\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\tto=\"/deployments/deployment/$id\"\n\t\t\t\t\t\tparams={{ id: deployment.id }}\n\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{deployment.name}\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>{action}</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t);\n};\n"],"names":["WorkQueueSelect","presetOptions","selected","onSelect","workPoolName","Suspense","jsx","WorkQueueSelecImplementation","search","setSearch","useState","data","useSuspenseQuery","buildFilterWorkPoolWorkQueuesQuery","deferredSearch","useDeferredValue","filteredData","useMemo","workQueue","filteredPresetOptions","option","Combobox","ComboboxTrigger","ComboboxContent","ComboboxCommandInput","ComboboxCommandEmtpy","ComboboxCommandList","jsxs","ComboboxCommandGroup","ComboboxCommandItem","value","DeploymentActionHeader","deployment","action","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","B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,EAASiB,EAAO,KAAK,EACrBX,EAAU,EAAE,CACb,EAEA,MAAO,OAAOW,EAAO,KAAK,EAEzB,SAAAA,EAAO,KAAA,EATHA,EAAO,KAAA,CAWb,EACAJ,EAAa,IAAKE,GAClBZ,EAAAA,IAACuB,EAAA,CAEA,SAAU3B,IAAagB,EAAU,KACjC,SAAWY,GAAU,CACpB3B,EAAS2B,CAAK,EACdrB,EAAU,EAAE,CACb,EACA,MAAOS,EAAU,KAEhB,SAAAA,EAAU,IAAA,EARNA,EAAU,EAAA,CAUhB,CAAA,CAAA,CACF,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,CAEF,ECvGaa,EAAyB,CAAC,CACtC,WAAAC,EACA,OAAAC,CACD,IAEE3B,EAAAA,IAAC4B,EAAA,CACA,SAAAP,EAAAA,KAACQ,EAAA,CACA,SAAA,CAAA7B,EAAAA,IAAC8B,EAAA,CACA,eAACC,EAAA,CAAe,GAAG,eAAe,UAAU,wBAAwB,uBAEpE,CAAA,CACD,QACCC,EAAA,EAAoB,QAEpBF,EAAA,CACA,SAAA9B,EAAAA,IAAC+B,EAAA,CACA,GAAG,8BACH,OAAQ,CAAE,GAAIL,EAAW,EAAA,EACzB,UAAU,wBAET,SAAAA,EAAW,IAAA,CAAA,EAEd,QACCM,EAAA,EAAoB,QAEpBF,EAAA,CAAe,UAAU,wBACzB,SAAA9B,EAAAA,IAACiC,EAAA,CAAgB,WAAO,CAAA,CACzB,CAAA,CAAA,CACD,CAAA,CACD"}
1
+ {"version":3,"file":"deployment-action-header-BJ8WZ6O0.js","sources":["../../src/components/work-pools/work-queue-select/work-queue-select.tsx","../../src/components/deployments/deployment-action-header.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildFilterWorkPoolWorkQueuesQuery } from \"@/api/work-queues\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype WorkQueueSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n\tworkPoolName: string;\n};\n\nexport const WorkQueueSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n\tworkPoolName,\n}: WorkQueueSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<WorkQueueSelecImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tworkPoolName={workPoolName}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst WorkQueueSelecImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n\tworkPoolName,\n}: WorkQueueSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(\n\t\tbuildFilterWorkPoolWorkQueuesQuery({ work_pool_name: workPoolName }),\n\t);\n\n\t// nb: because work queues API does not have filtering _like by name, do client-side filtering\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((workQueue) =>\n\t\t\tworkQueue.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a work queue\"\n\t\t\t>\n\t\t\t\t{selected}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a work queue...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>No work queue found</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((workQueue) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={workQueue.id}\n\t\t\t\t\t\t\t\tselected={selected === workQueue.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={workQueue.name}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{workQueue.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { Deployment } from \"@/api/deployments\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\n\ntype DeploymentActionHeaderProps = {\n\tdeployment: Deployment;\n\taction: \"Edit\" | \"Duplicate\" | \"Run\";\n};\n\nexport const DeploymentActionHeader = ({\n\tdeployment,\n\taction,\n}: DeploymentActionHeaderProps) => {\n\treturn (\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/deployments\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tDeployments\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink\n\t\t\t\t\t\tto=\"/deployments/deployment/$id\"\n\t\t\t\t\t\tparams={{ id: deployment.id }}\n\t\t\t\t\t\tclassName=\"text-xl font-semibold\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{deployment.name}\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>{action}</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t);\n};\n"],"names":["WorkQueueSelect","presetOptions","selected","onSelect","workPoolName","Suspense","jsx","WorkQueueSelecImplementation","search","setSearch","useState","data","useSuspenseQuery","buildFilterWorkPoolWorkQueuesQuery","deferredSearch","useDeferredValue","filteredData","useMemo","workQueue","filteredPresetOptions","option","Combobox","ComboboxTrigger","ComboboxContent","ComboboxCommandInput","ComboboxCommandEmtpy","ComboboxCommandList","jsxs","ComboboxCommandGroup","ComboboxCommandItem","value","DeploymentActionHeader","deployment","action","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage"],"mappings":"sNA0BO,MAAMA,EAAkB,CAAC,CAC/B,cAAAC,EAAgB,CAAA,EAChB,SAAAC,EACA,SAAAC,EACA,aAAAC,CACD,UAEGC,EAAAA,SAAA,CACA,SAAAC,EAAAA,IAACC,EAAA,CACA,cAAAN,EACA,SAAAC,EACA,SAAAC,EACA,aAAAC,CAAA,CAAA,EAEF,EAIIG,EAA+B,CAAC,CACrC,cAAAN,EAAgB,CAAA,EAChB,SAAAC,EACA,SAAAC,EACA,aAAAC,CACD,IAA4B,CAC3B,KAAM,CAACI,EAAQC,CAAS,EAAIC,EAAAA,SAAS,EAAE,EACjC,CAAE,KAAAC,GAASC,EAChBC,EAAmC,CAAE,eAAgBT,CAAA,CAAc,CAAA,EAI9DU,EAAiBC,EAAAA,iBAAiBP,CAAM,EACxCQ,EAAeC,EAAAA,QAAQ,IACrBN,EAAK,OAAQO,GACnBA,EAAU,KAAK,cAAc,SAASJ,EAAe,YAAA,CAAa,CAAA,EAEjE,CAACH,EAAMG,CAAc,CAAC,EAEnBK,EAAwBF,EAAAA,QAAQ,IAC9BhB,EAAc,OAAQmB,GAC5BA,EAAO,MAAM,cAAc,SAASN,EAAe,YAAA,CAAa,CAAA,EAE/D,CAACA,EAAgBb,CAAa,CAAC,EAElC,cACEoB,EAAA,CACA,SAAA,CAAAf,EAAAA,IAACgB,EAAA,CACA,SAAU,EAAQpB,EAClB,aAAW,sBAEV,SAAAA,CAAA,CAAA,SAEDqB,EAAA,CACA,SAAA,CAAAjB,EAAAA,IAACkB,EAAA,CACA,MAAOhB,EACP,cAAeC,EACf,YAAY,4BAAA,CAAA,EAEbH,EAAAA,IAACmB,GAAqB,SAAA,qBAAA,CAAmB,EACzCnB,EAAAA,IAACoB,EAAA,CACA,SAAAC,EAAAA,KAACC,EAAA,CACC,SAAA,CAAAT,EAAsB,IAAKC,GAC3Bd,EAAAA,IAACuB,EAAA,CAEA,SAAU3B,IAAakB,EAAO,MAC9B,SAAU,IAAM,CACfjB,EAASiB,EAAO,KAAK,EACrBX,EAAU,EAAE,CACb,EAEA,MAAO,OAAOW,EAAO,KAAK,EAEzB,SAAAA,EAAO,KAAA,EATHA,EAAO,KAAA,CAWb,EACAJ,EAAa,IAAKE,GAClBZ,EAAAA,IAACuB,EAAA,CAEA,SAAU3B,IAAagB,EAAU,KACjC,SAAWY,GAAU,CACpB3B,EAAS2B,CAAK,EACdrB,EAAU,EAAE,CACb,EACA,MAAOS,EAAU,KAEhB,SAAAA,EAAU,IAAA,EARNA,EAAU,EAAA,CAUhB,CAAA,CAAA,CACF,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,CAEF,ECvGaa,EAAyB,CAAC,CACtC,WAAAC,EACA,OAAAC,CACD,IAEE3B,EAAAA,IAAC4B,EAAA,CACA,SAAAP,EAAAA,KAACQ,EAAA,CACA,SAAA,CAAA7B,EAAAA,IAAC8B,EAAA,CACA,eAACC,EAAA,CAAe,GAAG,eAAe,UAAU,wBAAwB,uBAEpE,CAAA,CACD,QACCC,EAAA,EAAoB,QAEpBF,EAAA,CACA,SAAA9B,EAAAA,IAAC+B,EAAA,CACA,GAAG,8BACH,OAAQ,CAAE,GAAIL,EAAW,EAAA,EACzB,UAAU,wBAET,SAAAA,EAAW,IAAA,CAAA,EAEd,QACCM,EAAA,EAAoB,QAEpBF,EAAA,CAAe,UAAU,wBACzB,SAAA9B,EAAAA,IAACiC,EAAA,CAAgB,WAAO,CAAA,CACzB,CAAA,CAAA,CACD,CAAA,CACD"}
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-input-Bos2JYXW.js","assets/vendor-tanstack-CWDKYA_B.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-codemirror-OTxfneaa.js","assets/index-DLuXqHi9.js","assets/vendor-radix-DRMjKWJW.js","assets/vendor-recharts-BGjDGXVf.js","assets/vendor-forms-D-iybWES.js","assets/vendor-date-CRz8gtWZ.js","assets/index-CYc_PWA3.css"])))=>i.map(i=>d[i]);
2
- import{j as e,r as c,s as A,d as H,L as K}from"./vendor-tanstack-CWDKYA_B.js";import{dH as X,ac as G,ad as q,ae as J,af as z,ah as R,ag as $,ai as B,aj as V,b5 as Y,cc as Z,M as ee,S as re,a as ae,b as oe,c as se,d as ne,e as W,dI as le,cM as te,y as C,al as f,p as ce,G as ie,L as me,q as M}from"./index-DLuXqHi9.js";import{l as de,L as ue}from"./schema-form-input-string-format-datetime-DyDs1jNl.js";import"./toggle-group-Dnv_LMnU.js";import{F as pe,a as m,b as d,c as u,d as p,e as h}from"./form-CJfDUosd.js";import{T as he}from"./tags-input-BdNYl8nS.js";import{W as je}from"./deployment-action-header-WD51TIyE.js";import{a as xe}from"./zod-CjGf5GIv.js";import{c as _e,o as Q,s as y,r as be,b as ye,a as ge,u as ve,N as Se,e as Ce}from"./vendor-forms-D-iybWES.js";const fe=({presetOptions:o=[],selected:s,onSelect:a})=>e.jsx(c.Suspense,{children:e.jsx(Ee,{presetOptions:o,selected:s,onSelect:a})}),Ee=({presetOptions:o=[],selected:s,onSelect:a})=>{const[t,n]=c.useState(""),{data:i}=A(X()),l=c.useDeferredValue(t),j=c.useMemo(()=>i.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())),[i,l]),x=c.useMemo(()=>o.filter(r=>r.label.toLowerCase().includes(l.toLowerCase())),[l,o]);return e.jsxs(G,{children:[e.jsx(q,{selected:!!s,"aria-label":"Select a global concurrency limit",children:i.find(r=>r.id===s)?.name}),e.jsxs(J,{children:[e.jsx(z,{value:t,onValueChange:n,placeholder:"Search for a global concurrency limit..."}),e.jsx(R,{children:"No global concurrency limit found"}),e.jsx($,{children:e.jsxs(B,{children:[x.map(r=>e.jsx(V,{selected:s===r.value,onSelect:()=>{a(r.value),n("")},value:String(r.label),children:r.label},r.label)),j.map(r=>e.jsx(V,{selected:s===r.name,onSelect:N=>{a(N),n("")},value:r.id,children:r.name},r.id))]})})]})]})},Ne=c.lazy(()=>Z(()=>import("./markdown-input-Bos2JYXW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(o=>({default:o.MarkdownInput})));function we({className:o,...s}){return e.jsx(c.Suspense,{fallback:e.jsx(Y,{className:`min-h-[200px] ${o??""}`}),children:e.jsx(Ne,{className:o,...s})})}const ke=({presetOptions:o=[],selected:s,onSelect:a})=>e.jsx(c.Suspense,{children:e.jsx(Le,{presetOptions:o,selected:s,onSelect:a})}),Le=({presetOptions:o=[],selected:s,onSelect:a})=>{const[t,n]=c.useState(""),{data:i}=A(ee()),l=c.useDeferredValue(t),j=c.useMemo(()=>i.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())),[i,l]),x=c.useMemo(()=>o.filter(r=>r.label.toLowerCase().includes(l.toLowerCase())),[l,o]);return e.jsxs(G,{children:[e.jsx(q,{selected:!!s,"aria-label":"Select a work pool",children:s}),e.jsxs(J,{children:[e.jsx(z,{value:t,onValueChange:n,placeholder:"Search for a work pool..."}),e.jsx(R,{children:"No work pool found"}),e.jsx($,{children:e.jsxs(B,{children:[x.map(r=>e.jsx(V,{selected:s===r.value,onSelect:()=>{a(r.value),n("")},value:String(r.label),children:r.label},r.label)),j.map(r=>e.jsx(V,{selected:s===r.name,onSelect:N=>{a(N),n("")},value:r.name,children:r.name},r.id))]})})]})]})},E={ENQUEUE:"ENQUEUE",CANCEL_NEW:"CANCEL_NEW"},Fe=({onValueChange:o,value:s})=>e.jsxs(re,{value:s,onValueChange:a=>{o(a===""?void 0:a)},children:[e.jsx(ae,{children:e.jsx(oe,{placeholder:E.ENQUEUE})}),e.jsx(se,{children:e.jsxs(ne,{children:[e.jsx(W,{value:E.ENQUEUE,children:E.ENQUEUE}),e.jsx(W,{value:E.CANCEL_NEW,children:E.CANCEL_NEW})]})})]}),Ie=(o,{mode:s})=>Q({name:y().refine(a=>s==="edit"?!0:a!==o.name,{message:"Name must be different from the original deployment"}),description:y().nullable().optional(),work_pool_name:y().nullable().optional(),work_queue_name:y().nullable().optional(),tags:ge(y()).optional(),concurrency_options:Q({collision_strategy:Ce(["ENQUEUE","CANCEL_NEW"]).optional()}).nullable().optional(),job_variables:y().superRefine((a,t)=>{try{return a?JSON.parse(a):void 0}catch(n){return console.error(n),t.addIssue({code:"custom",message:"Invalid JSON"}),Se}}),enforce_parameter_schema:ye(),parameter_openapi_schema:be(ve()).optional().nullable().readonly(),global_concurrency_limit_id:y().uuid().optional().nullable()}),Ve={name:"",description:"",tags:[],job_variables:"",enforce_parameter_schema:!0,global_concurrency_limit_id:null},Oe=(o,{mode:s})=>{const a=H(),t=_e({resolver:xe(Ie(o,{mode:s})),defaultValues:Ve}),{values:n,setValues:i,errors:l,validateForm:j}=de(),{createDeployment:x}=le(),{updateDeployment:r}=te();return c.useEffect(()=>{const{name:O,description:T,work_pool_name:w,work_queue_name:k,tags:L,concurrency_options:F,parameter_openapi_schema:I,enforce_parameter_schema:g,job_variables:v,global_concurrency_limit:S}=o;i(o.parameters),t.reset({description:T,name:O,work_pool_name:w,work_queue_name:k,tags:L,concurrency_options:F,parameter_openapi_schema:I,enforce_parameter_schema:g,job_variables:v?JSON.stringify(v):"",global_concurrency_limit_id:S?.id})},[t,o,i]),{form:t,onSave:async O=>{const{name:T,job_variables:w,description:k,work_pool_name:L,work_queue_name:F,tags:I,enforce_parameter_schema:g,concurrency_options:v,parameter_openapi_schema:S,global_concurrency_limit_id:U}=O,D=w?JSON.parse(w):void 0;if(S&&g)try{await j({schema:S})}catch(b){const _="Unknown error while updating validating schema.";C.error(_),console.error(_,b)}if(l.length>0)return;const P=v?.collision_strategy?{collision_strategy:v.collision_strategy}:void 0;switch(s){case"duplicate":x({concurrency_options:P,description:k,enforce_parameter_schema:g,flow_id:o.flow_id,job_variables:D,name:T,parameters:n,parameter_openapi_schema:S||void 0,paused:o.paused,tags:I,work_pool_name:L||null,work_queue_name:F||null,global_concurrency_limit_id:U},{onSuccess:({id:b})=>{C.success("Deployment created"),a({to:"/deployments/deployment/$id",params:{id:b}})},onError:b=>{const _=b.message||"Unknown error while creating deployment.";console.error(_),C.error(_)}});break;case"edit":r({concurrency_options:P,description:k,enforce_parameter_schema:g,id:o.id,job_variables:D,parameters:n,paused:o.paused,tags:I,work_pool_name:L||null,work_queue_name:F||null,global_concurrency_limit_id:U},{onSuccess:()=>{C.success("Deployment updated"),a({to:"/deployments/deployment/$id",params:{id:o.id}})},onError:b=>{const _=b.message||"Unknown error while updating deployment.";console.error(_),C.error(_)}});break}},parametersFormValues:n,setParametersFormValues:i,parameterFormErrors:l}},qe=({deployment:o,mode:s})=>{const{form:a,onSave:t,parameterFormErrors:n,setParametersFormValues:i,parametersFormValues:l}=Oe(o,{mode:s}),j=a.watch("work_pool_name"),x=a.getValues("parameter_openapi_schema");return e.jsx(pe,{...a,children:e.jsxs("form",{onSubmit:r=>{a.handleSubmit(t)(r)},className:"space-y-4",children:[e.jsx(m,{children:a.formState.errors.root?.message}),e.jsx(f,{variant:"h3",children:"General"}),e.jsx(d,{control:a.control,name:"name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Name"}),e.jsx(h,{children:e.jsx(ce,{...r,value:r.value,disabled:s==="edit"})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"description",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Description (Optional)"}),e.jsx(h,{children:e.jsx(we,{"aria-label":"deployment description input",value:r.value??"",onChange:r.onChange})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"work_pool_name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Work Pool (Optional)"}),e.jsx(h,{children:e.jsx(ke,{presetOptions:[{label:"None",value:""}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),j&&e.jsx(d,{control:a.control,name:"work_queue_name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Work Queue (Optional)"}),e.jsx(h,{children:e.jsx(je,{workPoolName:j,presetOptions:[{label:"None",value:""}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"tags",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Tags (Optional)"}),e.jsx(h,{children:e.jsx(he,{...r})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"concurrency_options.collision_strategy",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:e.jsxs("div",{className:"col gap-1 mb-0.5",children:[e.jsx(f,{variant:"bodySmall",children:"Concurrency Limit Collision Strategy (Optional)"}),e.jsx(f,{variant:"bodySmall",className:"text-muted-foreground",children:"Configure behavior for runs once the concurrency limit is reached."})]})}),e.jsx(h,{children:e.jsx(Fe,{value:r.value,onValueChange:r.onChange})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"global_concurrency_limit_id",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Global concurrency limit"}),e.jsx(h,{children:e.jsx(fe,{presetOptions:[{label:"None",value:null}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsx(f,{variant:"h3",className:"mb-4",children:"Parameters"}),x&&e.jsx(ue,{schema:x,errors:n,values:l,onValuesChange:i,kinds:["json"]}),e.jsx(d,{control:a.control,name:"enforce_parameter_schema",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Enforce Parameter Schema"}),e.jsx(h,{children:e.jsx(ie,{className:"block",checked:r.value,onCheckedChange:r.onChange})}),e.jsx(m,{})]})})]}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsx(f,{variant:"h3",className:"mb-4",children:"Job Variables"}),e.jsx(d,{control:a.control,name:"job_variables",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Job Variables (Optional)"}),e.jsx(h,{children:e.jsx(me,{...r})}),e.jsx(m,{})]})})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(K,{to:"/deployments/deployment/$id",params:{id:o.id},children:e.jsx(M,{variant:"secondary",children:"Cancel"})}),e.jsx(M,{type:"submit",children:"Save"})]})]})})};export{qe as D};
3
- //# sourceMappingURL=deployment-form-FaqDdnNa.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-input-BYRT3e1M.js","assets/vendor-tanstack-CWDKYA_B.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-codemirror-OTxfneaa.js","assets/index-CQlQauOE.js","assets/vendor-radix-DRMjKWJW.js","assets/vendor-recharts-BGjDGXVf.js","assets/vendor-forms-D-iybWES.js","assets/vendor-date-CRz8gtWZ.js","assets/index-CYc_PWA3.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as c,s as A,d as H,L as K}from"./vendor-tanstack-CWDKYA_B.js";import{dI as X,ac as G,ad as J,ae as q,af as z,ah as R,ag as $,ai as B,aj as V,b5 as Y,cc as Z,M as ee,S as re,a as ae,b as oe,c as se,d as ne,e as W,dJ as le,cM as te,y as C,al as f,p as ce,G as ie,L as me,q as M}from"./index-CQlQauOE.js";import{l as de,L as ue}from"./schema-form-input-string-format-datetime-FBLeet2k.js";import"./toggle-group-DjbSsHsv.js";import{F as pe,a as m,b as d,c as u,d as p,e as h}from"./form-DvAgEGjn.js";import{T as he}from"./tags-input-9pBchAz7.js";import{W as je}from"./deployment-action-header-BJ8WZ6O0.js";import{a as xe}from"./zod-CjGf5GIv.js";import{c as _e,o as Q,s as y,r as be,b as ye,a as ge,u as ve,N as Se,e as Ce}from"./vendor-forms-D-iybWES.js";const fe=({presetOptions:o=[],selected:s,onSelect:a})=>e.jsx(c.Suspense,{children:e.jsx(Ee,{presetOptions:o,selected:s,onSelect:a})}),Ee=({presetOptions:o=[],selected:s,onSelect:a})=>{const[t,n]=c.useState(""),{data:i}=A(X()),l=c.useDeferredValue(t),j=c.useMemo(()=>i.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())),[i,l]),x=c.useMemo(()=>o.filter(r=>r.label.toLowerCase().includes(l.toLowerCase())),[l,o]);return e.jsxs(G,{children:[e.jsx(J,{selected:!!s,"aria-label":"Select a global concurrency limit",children:i.find(r=>r.id===s)?.name}),e.jsxs(q,{children:[e.jsx(z,{value:t,onValueChange:n,placeholder:"Search for a global concurrency limit..."}),e.jsx(R,{children:"No global concurrency limit found"}),e.jsx($,{children:e.jsxs(B,{children:[x.map(r=>e.jsx(V,{selected:s===r.value,onSelect:()=>{a(r.value),n("")},value:String(r.label),children:r.label},r.label)),j.map(r=>e.jsx(V,{selected:s===r.name,onSelect:N=>{a(N),n("")},value:r.id,children:r.name},r.id))]})})]})]})},Ne=c.lazy(()=>Z(()=>import("./markdown-input-BYRT3e1M.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(o=>({default:o.MarkdownInput})));function we({className:o,...s}){return e.jsx(c.Suspense,{fallback:e.jsx(Y,{className:`min-h-[200px] ${o??""}`}),children:e.jsx(Ne,{className:o,...s})})}const ke=({presetOptions:o=[],selected:s,onSelect:a})=>e.jsx(c.Suspense,{children:e.jsx(Le,{presetOptions:o,selected:s,onSelect:a})}),Le=({presetOptions:o=[],selected:s,onSelect:a})=>{const[t,n]=c.useState(""),{data:i}=A(ee()),l=c.useDeferredValue(t),j=c.useMemo(()=>i.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())),[i,l]),x=c.useMemo(()=>o.filter(r=>r.label.toLowerCase().includes(l.toLowerCase())),[l,o]);return e.jsxs(G,{children:[e.jsx(J,{selected:!!s,"aria-label":"Select a work pool",children:s}),e.jsxs(q,{children:[e.jsx(z,{value:t,onValueChange:n,placeholder:"Search for a work pool..."}),e.jsx(R,{children:"No work pool found"}),e.jsx($,{children:e.jsxs(B,{children:[x.map(r=>e.jsx(V,{selected:s===r.value,onSelect:()=>{a(r.value),n("")},value:String(r.label),children:r.label},r.label)),j.map(r=>e.jsx(V,{selected:s===r.name,onSelect:N=>{a(N),n("")},value:r.name,children:r.name},r.id))]})})]})]})},E={ENQUEUE:"ENQUEUE",CANCEL_NEW:"CANCEL_NEW"},Fe=({onValueChange:o,value:s})=>e.jsxs(re,{value:s,onValueChange:a=>{o(a===""?void 0:a)},children:[e.jsx(ae,{children:e.jsx(oe,{placeholder:E.ENQUEUE})}),e.jsx(se,{children:e.jsxs(ne,{children:[e.jsx(W,{value:E.ENQUEUE,children:E.ENQUEUE}),e.jsx(W,{value:E.CANCEL_NEW,children:E.CANCEL_NEW})]})})]}),Ie=(o,{mode:s})=>Q({name:y().refine(a=>s==="edit"?!0:a!==o.name,{message:"Name must be different from the original deployment"}),description:y().nullable().optional(),work_pool_name:y().nullable().optional(),work_queue_name:y().nullable().optional(),tags:ge(y()).optional(),concurrency_options:Q({collision_strategy:Ce(["ENQUEUE","CANCEL_NEW"]).optional()}).nullable().optional(),job_variables:y().superRefine((a,t)=>{try{return a?JSON.parse(a):void 0}catch(n){return console.error(n),t.addIssue({code:"custom",message:"Invalid JSON"}),Se}}),enforce_parameter_schema:ye(),parameter_openapi_schema:be(ve()).optional().nullable().readonly(),global_concurrency_limit_id:y().uuid().optional().nullable()}),Ve={name:"",description:"",tags:[],job_variables:"",enforce_parameter_schema:!0,global_concurrency_limit_id:null},Oe=(o,{mode:s})=>{const a=H(),t=_e({resolver:xe(Ie(o,{mode:s})),defaultValues:Ve}),{values:n,setValues:i,errors:l,validateForm:j}=de(),{createDeployment:x}=le(),{updateDeployment:r}=te();return c.useEffect(()=>{const{name:O,description:T,work_pool_name:w,work_queue_name:k,tags:L,concurrency_options:F,parameter_openapi_schema:I,enforce_parameter_schema:g,job_variables:v,global_concurrency_limit:S}=o;i(o.parameters),t.reset({description:T,name:O,work_pool_name:w,work_queue_name:k,tags:L,concurrency_options:F,parameter_openapi_schema:I,enforce_parameter_schema:g,job_variables:v?JSON.stringify(v):"",global_concurrency_limit_id:S?.id})},[t,o,i]),{form:t,onSave:async O=>{const{name:T,job_variables:w,description:k,work_pool_name:L,work_queue_name:F,tags:I,enforce_parameter_schema:g,concurrency_options:v,parameter_openapi_schema:S,global_concurrency_limit_id:U}=O,D=w?JSON.parse(w):void 0;if(S&&g)try{await j({schema:S})}catch(b){const _="Unknown error while updating validating schema.";C.error(_),console.error(_,b)}if(l.length>0)return;const P=v?.collision_strategy?{collision_strategy:v.collision_strategy}:void 0;switch(s){case"duplicate":x({concurrency_options:P,description:k,enforce_parameter_schema:g,flow_id:o.flow_id,job_variables:D,name:T,parameters:n,parameter_openapi_schema:S||void 0,paused:o.paused,tags:I,work_pool_name:L||null,work_queue_name:F||null,global_concurrency_limit_id:U},{onSuccess:({id:b})=>{C.success("Deployment created"),a({to:"/deployments/deployment/$id",params:{id:b}})},onError:b=>{const _=b.message||"Unknown error while creating deployment.";console.error(_),C.error(_)}});break;case"edit":r({concurrency_options:P,description:k,enforce_parameter_schema:g,id:o.id,job_variables:D,parameters:n,paused:o.paused,tags:I,work_pool_name:L||null,work_queue_name:F||null,global_concurrency_limit_id:U},{onSuccess:()=>{C.success("Deployment updated"),a({to:"/deployments/deployment/$id",params:{id:o.id}})},onError:b=>{const _=b.message||"Unknown error while updating deployment.";console.error(_),C.error(_)}});break}},parametersFormValues:n,setParametersFormValues:i,parameterFormErrors:l}},Je=({deployment:o,mode:s})=>{const{form:a,onSave:t,parameterFormErrors:n,setParametersFormValues:i,parametersFormValues:l}=Oe(o,{mode:s}),j=a.watch("work_pool_name"),x=a.getValues("parameter_openapi_schema");return e.jsx(pe,{...a,children:e.jsxs("form",{onSubmit:r=>{a.handleSubmit(t)(r)},className:"space-y-4",children:[e.jsx(m,{children:a.formState.errors.root?.message}),e.jsx(f,{variant:"h3",children:"General"}),e.jsx(d,{control:a.control,name:"name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Name"}),e.jsx(h,{children:e.jsx(ce,{...r,value:r.value,disabled:s==="edit"})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"description",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Description (Optional)"}),e.jsx(h,{children:e.jsx(we,{"aria-label":"deployment description input",value:r.value??"",onChange:r.onChange})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"work_pool_name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Work Pool (Optional)"}),e.jsx(h,{children:e.jsx(ke,{presetOptions:[{label:"None",value:""}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),j&&e.jsx(d,{control:a.control,name:"work_queue_name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Work Queue (Optional)"}),e.jsx(h,{children:e.jsx(je,{workPoolName:j,presetOptions:[{label:"None",value:""}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"tags",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Tags (Optional)"}),e.jsx(h,{children:e.jsx(he,{...r})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"concurrency_options.collision_strategy",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:e.jsxs("div",{className:"col gap-1 mb-0.5",children:[e.jsx(f,{variant:"bodySmall",children:"Concurrency Limit Collision Strategy (Optional)"}),e.jsx(f,{variant:"bodySmall",className:"text-muted-foreground",children:"Configure behavior for runs once the concurrency limit is reached."})]})}),e.jsx(h,{children:e.jsx(Fe,{value:r.value,onValueChange:r.onChange})}),e.jsx(m,{})]})}),e.jsx(d,{control:a.control,name:"global_concurrency_limit_id",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Global concurrency limit"}),e.jsx(h,{children:e.jsx(fe,{presetOptions:[{label:"None",value:null}],onSelect:r.onChange,selected:r.value})}),e.jsx(m,{})]})}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsx(f,{variant:"h3",className:"mb-4",children:"Parameters"}),x&&e.jsx(ue,{schema:x,errors:n,values:l,onValuesChange:i,kinds:["json"]}),e.jsx(d,{control:a.control,name:"enforce_parameter_schema",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Enforce Parameter Schema"}),e.jsx(h,{children:e.jsx(ie,{className:"block",checked:r.value,onCheckedChange:r.onChange})}),e.jsx(m,{})]})})]}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsx(f,{variant:"h3",className:"mb-4",children:"Job Variables"}),e.jsx(d,{control:a.control,name:"job_variables",render:({field:r})=>e.jsxs(u,{children:[e.jsx(p,{children:"Job Variables (Optional)"}),e.jsx(h,{children:e.jsx(me,{...r})}),e.jsx(m,{})]})})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(K,{to:"/deployments/deployment/$id",params:{id:o.id},children:e.jsx(M,{variant:"secondary",children:"Cancel"})}),e.jsx(M,{type:"submit",children:"Save"})]})]})})};export{Je as D};
3
+ //# sourceMappingURL=deployment-form-DXZUK11h.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";+vBAyBO,MAAMA,GAA+B,CAAC,CAC5C,cAAAC,EAAgB,GAChB,SAAAC,EACA,SAAAC,CACD,UAEGC,WAAA,CACA,SAAAC,MAACC,GAAA,CACA,cAAAL,EACA,SAAAC,EACA,SAAAC,CAAA,GAEF,EAIIG,GAA6C,CAAC,CACnD,cAAAL,EAAgB,GAChB,SAAAC,EACA,SAAAC,CACD,IAAyC,CACxC,KAAM,CAACI,EAAQC,CAAS,EAAIC,WAAS,EAAE,EACjC,CAAE,KAAAC,CAAA,EAASC,EAAiBC,GAAuC,EAEnEC,EAAiBC,mBAAiBP,CAAM,EACxCQ,EAAeC,UAAQ,IACrBN,EAAK,OAAQO,GACnBA,EAAuB,KACrB,cACA,SAASJ,EAAe,aAAa,GAEtC,CAACH,EAAMG,CAAc,CAAC,EAEnBK,EAAwBF,UAAQ,IAC9Bf,EAAc,OAAQkB,GAC5BA,EAAO,MAAM,cAAc,SAASN,EAAe,aAAa,GAE/D,CAACA,EAAgBZ,CAAa,CAAC,EAElC,cACEmB,EAAA,CACA,UAAAf,MAACgB,EAAA,CACA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Q,KAAK,UAAU,OAAO,sBAE1C,EACCJ,GACAlG,MAACgH,GAAA,CACA,OAAQd,EACR,OAAQ7B,EACR,OAAQF,EACR,eAAgBC,EAChB,MAAO,CAAC,MAAM,IAGhBpE,MAACuG,EAAA,CACA,QAASvC,EAAK,QACd,KAAK,2BACL,OAAQ,CAAC,CAAE,MAAAwC,CAAA,WACTC,EAAA,CACA,UAAAzG,MAAC0G,GAAU,oCAAwB,QAClCC,EAAA,CACA,SAAA3G,MAACiH,GAAA,CACA,UAAU,QACV,QAAST,EAAM,MACf,gBAAiBA,EAAM,WAEzB,QACCH,EAAA,EAAY,GACd,GAEF,EACD,EAEAhF,OAAC,OAAI,UAAU,gBACd,UAAArB,MAACsG,EAAA,CAAW,QAAQ,KAAK,UAAU,OAAO,yBAE1C,EACAtG,MAACuG,EAAA,CACA,QAASvC,EAAK,QACd,KAAK,gBACL,OAAQ,CAAC,CAAE,MAAAwC,CAAA,WACTC,EAAA,CACA,UAAAzG,MAAC0G,GAAU,oCAAwB,QAClCC,EAAA,CACA,SAAA3G,MAACkH,GAAA,CAAW,GAAGV,EAAO,EACvB,QACCH,EAAA,EAAY,GACd,GAEF,EACD,EAEAhF,OAAC,OAAI,UAAU,yBACd,UAAArB,MAACmH,EAAA,CAAK,GAAG,8BAA8B,OAAQ,CAAE,GAAIpE,EAAW,IAC/D,SAAA/C,MAACoH,EAAA,CAAO,QAAQ,YAAY,kBAAM,EACnC,EACApH,MAACoH,EAAA,CAAO,KAAK,SAAS,gBAAI,GAC3B,KAEF,CAEF","names":["GlobalConcurrencyLimitSelect","presetOptions","selected","onSelect","Suspense","jsx","GlobalConcurrencyLimitSelectImplementation","search","setSearch","useState","data","useSuspenseQuery","buildListGlobalConcurrencyLimitsQuery","deferredSearch","useDeferredValue","filteredData","useMemo","globalConcurrencyLimit","filteredPresetOptions","option","Combobox","ComboboxTrigger","ComboboxContent","ComboboxCommandInput","ComboboxCommandEmtpy","ComboboxCommandList","jsxs","ComboboxCommandGroup","ComboboxCommandItem","value","MarkdownInputLazy","lazy","__vitePreload","mod","LazyMarkdownInput","className","props","Skeleton","WorkPoolSelect","WorkPoolSelectImplementation","buildFilterWorkPoolsQuery","workPool","LIMIT_COLLISSION_STRATEGIES","LimitCollissionStrategySelect","onValueChange","Select","SelectTrigger","SelectValue","SelectContent","SelectGroup","SelectItem","createFormSchema","deployment","mode","z.object","z.string","z.array","z.enum","val","ctx","err","z.NEVER","z.boolean","z.record","z.unknown","DEFAULT_VALUES","useDeploymentForm","navigate","useNavigate","form","useForm","zodResolver","parametersFormValues","setParametersFormValues","parameterFormErrors","validateParametersForm","useSchemaForm","createDeployment","useCreateDeployment","updateDeployment","useUpdateDeployment","useEffect","name","description","work_pool_name","work_queue_name","tags","concurrency_options","parameter_openapi_schema","enforce_parameter_schema","job_variables","global_concurrency_limit","values","global_concurrency_limit_id","jobVariablesPayload","message","toast","concurrencyOptions","id","error","DeploymentForm","onSave","watchPoolName","parametersOpenAPISchema","Form","e","FormMessage","Typography","FormField","field","FormItem","FormLabel","FormControl","Input","MarkdownInput","WorkQueueSelect","TagsInput","LazySchemaForm","Switch","JsonInput","Link","Button"],"ignoreList":[],"sources":["../../src/components/global-concurrency-limit/global-concurrency-limit-select/global-concurrency-limit-select.tsx","../../src/components/ui/markdown-input-lazy.tsx","../../src/components/work-pools/work-pool-select/work-pool-select.tsx","../../src/components/deployments/deployment-form/limit-collision-strategy-select.tsx","../../src/components/deployments/deployment-form/use-deployment-form.ts","../../src/components/deployments/deployment-form/deployment-form.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype GlobalConcurrencyLimitSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n};\n\nexport const GlobalConcurrencyLimitSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: GlobalConcurrencyLimitSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<GlobalConcurrencyLimitSelectImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst GlobalConcurrencyLimitSelectImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: GlobalConcurrencyLimitSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(buildListGlobalConcurrencyLimitsQuery());\n\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((globalConcurrencyLimit) =>\n\t\t\tglobalConcurrencyLimit.name\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a global concurrency limit\"\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\tdata.find(\n\t\t\t\t\t\t(globalConcurrencyLimit) => globalConcurrencyLimit.id === selected,\n\t\t\t\t\t)?.name\n\t\t\t\t}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a global concurrency limit...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>\n\t\t\t\t\tNo global concurrency limit found\n\t\t\t\t</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((globalConcurrencyLimit) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={globalConcurrencyLimit.id}\n\t\t\t\t\t\t\t\tselected={selected === globalConcurrencyLimit.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={globalConcurrencyLimit.id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{globalConcurrencyLimit.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst MarkdownInputLazy = lazy(() =>\n\timport(\"./markdown-input\").then((mod) => ({ default: mod.MarkdownInput })),\n);\n\ntype LazyMarkdownInputProps = ComponentProps<typeof MarkdownInputLazy>;\n\nexport function LazyMarkdownInput({\n\tclassName,\n\t...props\n}: LazyMarkdownInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<MarkdownInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildFilterWorkPoolsQuery } from \"@/api/work-pools\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype WorkPoolSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n};\n\nexport const WorkPoolSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: WorkPoolSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<WorkPoolSelectImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst WorkPoolSelectImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: WorkPoolSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(buildFilterWorkPoolsQuery());\n\n\t// nb: because work pools API does not have filtering _like by name, do client-side filtering\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((workPool) =>\n\t\t\tworkPool.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a work pool\"\n\t\t\t>\n\t\t\t\t{selected}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a work pool...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>No work pool found</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((workPool) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={workPool.id}\n\t\t\t\t\t\t\t\tselected={selected === workPool.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={workPool.name}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{workPool.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { components } from \"@/api/prefect\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\n\ntype LimitCollissionStrategy =\n\tcomponents[\"schemas\"][\"ConcurrencyLimitStrategy\"];\n\nconst LIMIT_COLLISSION_STRATEGIES = {\n\tENQUEUE: \"ENQUEUE\",\n\tCANCEL_NEW: \"CANCEL_NEW\",\n} satisfies Record<LimitCollissionStrategy, LimitCollissionStrategy>;\n\ntype LimitCollissionStrategySelectProps = {\n\tonValueChange: (value: LimitCollissionStrategy | undefined) => void;\n\tvalue: LimitCollissionStrategy | undefined;\n};\n\nexport const LimitCollissionStrategySelect = ({\n\tonValueChange,\n\tvalue,\n}: LimitCollissionStrategySelectProps) => {\n\treturn (\n\t\t<Select\n\t\t\tvalue={value}\n\t\t\tonValueChange={(value) => {\n\t\t\t\tif (value === \"\") {\n\t\t\t\t\tonValueChange(undefined);\n\t\t\t\t} else {\n\t\t\t\t\tonValueChange(value as LimitCollissionStrategy);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<SelectTrigger>\n\t\t\t\t<SelectValue placeholder={LIMIT_COLLISSION_STRATEGIES.ENQUEUE} />\n\t\t\t</SelectTrigger>\n\t\t\t<SelectContent>\n\t\t\t\t<SelectGroup>\n\t\t\t\t\t<SelectItem value={LIMIT_COLLISSION_STRATEGIES.ENQUEUE}>\n\t\t\t\t\t\t{LIMIT_COLLISSION_STRATEGIES.ENQUEUE}\n\t\t\t\t\t</SelectItem>\n\t\t\t\t\t<SelectItem value={LIMIT_COLLISSION_STRATEGIES.CANCEL_NEW}>\n\t\t\t\t\t\t{LIMIT_COLLISSION_STRATEGIES.CANCEL_NEW}\n\t\t\t\t\t</SelectItem>\n\t\t\t\t</SelectGroup>\n\t\t\t</SelectContent>\n\t\t</Select>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useNavigate } from \"@tanstack/react-router\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype Deployment,\n\tuseCreateDeployment,\n\tuseUpdateDeployment,\n} from \"@/api/deployments\";\nimport { useSchemaForm } from \"@/components/schemas\";\n\ntype FormMode = \"edit\" | \"duplicate\";\n\nconst createFormSchema = (\n\tdeployment: Deployment,\n\t{ mode }: { mode: FormMode },\n) =>\n\tz.object({\n\t\tname: z.string().refine(\n\t\t\t(value) => {\n\t\t\t\tif (mode === \"edit\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn value !== deployment.name;\n\t\t\t},\n\t\t\t{ message: \"Name must be different from the original deployment\" },\n\t\t),\n\t\tdescription: z.string().nullable().optional(),\n\t\twork_pool_name: z.string().nullable().optional(),\n\t\twork_queue_name: z.string().nullable().optional(),\n\t\ttags: z.array(z.string()).optional(),\n\t\tconcurrency_options: z\n\t\t\t.object({\n\t\t\t\tcollision_strategy: z.enum([\"ENQUEUE\", \"CANCEL_NEW\"]).optional(),\n\t\t\t})\n\t\t\t.nullable()\n\t\t\t.optional(),\n\t\tjob_variables: z.string().superRefine((val, ctx) => {\n\t\t\ttry {\n\t\t\t\tif (!val) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn JSON.parse(val) as Record<string, unknown>;\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t\tctx.addIssue({ code: \"custom\", message: \"Invalid JSON\" });\n\t\t\t\treturn z.NEVER;\n\t\t\t}\n\t\t}),\n\t\tenforce_parameter_schema: z.boolean(),\n\t\tparameter_openapi_schema: z\n\t\t\t.record(z.unknown())\n\t\t\t.optional()\n\t\t\t.nullable()\n\t\t\t.readonly(),\n\t\tglobal_concurrency_limit_id: z.string().uuid().optional().nullable(),\n\t});\n\nexport type DeploymentFormSchema = z.infer<ReturnType<typeof createFormSchema>>;\n\nconst DEFAULT_VALUES: DeploymentFormSchema = {\n\tname: \"\",\n\tdescription: \"\",\n\ttags: [],\n\tjob_variables: \"\",\n\tenforce_parameter_schema: true,\n\tglobal_concurrency_limit_id: null,\n};\n\nexport const useDeploymentForm = (\n\tdeployment: Deployment,\n\t{ mode }: { mode: FormMode },\n) => {\n\tconst navigate = useNavigate();\n\tconst form = useForm({\n\t\tresolver: zodResolver(createFormSchema(deployment, { mode })),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\tconst {\n\t\tvalues: parametersFormValues,\n\t\tsetValues: setParametersFormValues,\n\t\terrors: parameterFormErrors,\n\t\tvalidateForm: validateParametersForm,\n\t} = useSchemaForm();\n\n\tconst { createDeployment } = useCreateDeployment();\n\tconst { updateDeployment } = useUpdateDeployment();\n\n\t// syncs form state to deployment to update\n\tuseEffect(() => {\n\t\tconst {\n\t\t\tname,\n\t\t\tdescription,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tenforce_parameter_schema,\n\t\t\tjob_variables,\n\t\t\tglobal_concurrency_limit,\n\t\t} = deployment;\n\n\t\t// nb: parameter form state and validation is handled separately using SchemaForm\n\t\t// parameters has poor typings from openAPI\n\t\tsetParametersFormValues(deployment.parameters as Record<string, unknown>);\n\n\t\t// nb: Handle remaining form fields using react-hook-form\n\t\tform.reset({\n\t\t\tdescription,\n\t\t\tname,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tenforce_parameter_schema,\n\t\t\tjob_variables: job_variables ? JSON.stringify(job_variables) : \"\",\n\t\t\tglobal_concurrency_limit_id: global_concurrency_limit?.id,\n\t\t});\n\t}, [form, deployment, setParametersFormValues]);\n\n\tconst onSave = async (values: DeploymentFormSchema) => {\n\t\tconst {\n\t\t\tname,\n\t\t\tjob_variables,\n\t\t\tdescription,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tenforce_parameter_schema,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tglobal_concurrency_limit_id,\n\t\t} = values;\n\n\t\tconst jobVariablesPayload = job_variables\n\t\t\t? (JSON.parse(job_variables) as Record<string, unknown>)\n\t\t\t: undefined;\n\n\t\tif (parameter_openapi_schema && enforce_parameter_schema) {\n\t\t\ttry {\n\t\t\t\tawait validateParametersForm({ schema: parameter_openapi_schema });\n\t\t\t} catch (err) {\n\t\t\t\tconst message = \"Unknown error while updating validating schema.\";\n\t\t\t\ttoast.error(message);\n\t\t\t\tconsole.error(message, err);\n\t\t\t}\n\t\t}\n\n\t\t// Early exit if there's errors\n\t\tif (parameterFormErrors.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst concurrencyOptions = concurrency_options?.collision_strategy\n\t\t\t? { collision_strategy: concurrency_options.collision_strategy }\n\t\t\t: undefined;\n\n\t\tswitch (mode) {\n\t\t\tcase \"duplicate\":\n\t\t\t\tcreateDeployment(\n\t\t\t\t\t{\n\t\t\t\t\t\tconcurrency_options: concurrencyOptions,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tenforce_parameter_schema,\n\t\t\t\t\t\tflow_id: deployment.flow_id,\n\t\t\t\t\t\tjob_variables: jobVariablesPayload,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tparameters: parametersFormValues,\n\t\t\t\t\t\tparameter_openapi_schema: parameter_openapi_schema || undefined,\n\t\t\t\t\t\tpaused: deployment.paused,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_pool_name: work_pool_name || null,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_queue_name: work_queue_name || null,\n\t\t\t\t\t\tglobal_concurrency_limit_id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tonSuccess: ({ id }) => {\n\t\t\t\t\t\t\ttoast.success(\"Deployment created\");\n\t\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\t\t\t\t\tparams: { id },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\t\terror.message || \"Unknown error while creating deployment.\";\n\t\t\t\t\t\t\tconsole.error(message);\n\t\t\t\t\t\t\ttoast.error(message);\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase \"edit\":\n\t\t\t\tupdateDeployment(\n\t\t\t\t\t{\n\t\t\t\t\t\tconcurrency_options: concurrencyOptions,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tenforce_parameter_schema,\n\t\t\t\t\t\tid: deployment.id,\n\t\t\t\t\t\tjob_variables: jobVariablesPayload,\n\t\t\t\t\t\tparameters: parametersFormValues,\n\t\t\t\t\t\tpaused: deployment.paused,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_pool_name: work_pool_name || null,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_queue_name: work_queue_name || null,\n\t\t\t\t\t\tglobal_concurrency_limit_id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\t\ttoast.success(\"Deployment updated\");\n\t\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\t\t\t\t\tparams: { id: deployment.id },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\t\terror.message || \"Unknown error while updating deployment.\";\n\t\t\t\t\t\t\tconsole.error(message);\n\t\t\t\t\t\t\ttoast.error(message);\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tonSave,\n\t\tparametersFormValues,\n\t\tsetParametersFormValues,\n\t\tparameterFormErrors,\n\t};\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { Deployment } from \"@/api/deployments\";\nimport { GlobalConcurrencyLimitSelect } from \"@/components/global-concurrency-limit/global-concurrency-limit-select\";\nimport { LazySchemaForm, type PrefectSchemaObject } from \"@/components/schemas\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { LazyJsonInput as JsonInput } from \"@/components/ui/json-input-lazy\";\nimport { LazyMarkdownInput as MarkdownInput } from \"@/components/ui/markdown-input-lazy\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { TagsInput } from \"@/components/ui/tags-input\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { WorkPoolSelect } from \"@/components/work-pools/work-pool-select\";\nimport { WorkQueueSelect } from \"@/components/work-pools/work-queue-select\";\nimport { LimitCollissionStrategySelect } from \"./limit-collision-strategy-select\";\nimport { useDeploymentForm } from \"./use-deployment-form\";\n\ntype DeploymentFormProps = {\n\tdeployment: Deployment;\n\tmode: \"edit\" | \"duplicate\";\n};\n\nexport const DeploymentForm = ({ deployment, mode }: DeploymentFormProps) => {\n\tconst {\n\t\tform,\n\t\tonSave,\n\t\tparameterFormErrors,\n\t\tsetParametersFormValues,\n\t\tparametersFormValues,\n\t} = useDeploymentForm(deployment, { mode });\n\tconst watchPoolName = form.watch(\"work_pool_name\");\n\tconst parametersOpenAPISchema = form.getValues(\"parameter_openapi_schema\");\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={(e) => void form.handleSubmit(onSave)(e)}\n\t\t\t\tclassName=\"space-y-4\"\n\t\t\t>\n\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\n\t\t\t\t<Typography variant=\"h3\">General</Typography>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"name\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\tdisabled={mode === \"edit\"}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"description\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Description (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<MarkdownInput\n\t\t\t\t\t\t\t\t\taria-label=\"deployment description input\"\n\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"work_pool_name\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Work Pool (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<WorkPoolSelect\n\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: \"\" }]}\n\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t{watchPoolName && (\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"work_queue_name\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Work Queue (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<WorkQueueSelect\n\t\t\t\t\t\t\t\t\t\tworkPoolName={watchPoolName}\n\t\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: \"\" }]}\n\t\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"tags\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Tags (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<TagsInput {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"concurrency_options.collision_strategy\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t<div className=\"col gap-1 mb-0.5\">\n\t\t\t\t\t\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\t\t\t\t\t\tConcurrency Limit Collision Strategy (Optional)\n\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\tvariant=\"bodySmall\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tConfigure behavior for runs once the concurrency limit is\n\t\t\t\t\t\t\t\t\t\treached.\n\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<LimitCollissionStrategySelect\n\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"global_concurrency_limit_id\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Global concurrency limit</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<GlobalConcurrencyLimitSelect\n\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: null }]}\n\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"pt-4 border-t\">\n\t\t\t\t\t<Typography variant=\"h3\" className=\"mb-4\">\n\t\t\t\t\t\tParameters\n\t\t\t\t\t</Typography>\n\t\t\t\t\t{parametersOpenAPISchema && (\n\t\t\t\t\t\t<LazySchemaForm\n\t\t\t\t\t\t\tschema={parametersOpenAPISchema as unknown as PrefectSchemaObject}\n\t\t\t\t\t\t\terrors={parameterFormErrors}\n\t\t\t\t\t\t\tvalues={parametersFormValues}\n\t\t\t\t\t\t\tonValuesChange={setParametersFormValues}\n\t\t\t\t\t\t\tkinds={[\"json\"]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"enforce_parameter_schema\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Enforce Parameter Schema</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"pt-4 border-t\">\n\t\t\t\t\t<Typography variant=\"h3\" className=\"mb-4\">\n\t\t\t\t\t\tJob Variables\n\t\t\t\t\t</Typography>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"job_variables\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Job Variables (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<JsonInput {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex gap-3 justify-end\">\n\t\t\t\t\t<Link to=\"/deployments/deployment/$id\" params={{ id: deployment.id }}>\n\t\t\t\t\t\t<Button variant=\"secondary\">Cancel</Button>\n\t\t\t\t\t</Link>\n\t\t\t\t\t<Button type=\"submit\">Save</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"],"file":"deployment-form-FaqDdnNa.js"}
1
+ {"version":3,"mappings":";+vBAyBO,MAAMA,GAA+B,CAAC,CAC5C,cAAAC,EAAgB,GAChB,SAAAC,EACA,SAAAC,CACD,UAEGC,WAAA,CACA,SAAAC,MAACC,GAAA,CACA,cAAAL,EACA,SAAAC,EACA,SAAA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,GACd,GAEF,EACD,EAEAhF,OAAC,OAAI,UAAU,yBACd,UAAArB,MAACmH,EAAA,CAAK,GAAG,8BAA8B,OAAQ,CAAE,GAAIpE,EAAW,IAC/D,SAAA/C,MAACoH,EAAA,CAAO,QAAQ,YAAY,kBAAM,EACnC,EACApH,MAACoH,EAAA,CAAO,KAAK,SAAS,gBAAI,GAC3B,KAEF,CAEF","names":["GlobalConcurrencyLimitSelect","presetOptions","selected","onSelect","Suspense","jsx","GlobalConcurrencyLimitSelectImplementation","search","setSearch","useState","data","useSuspenseQuery","buildListGlobalConcurrencyLimitsQuery","deferredSearch","useDeferredValue","filteredData","useMemo","globalConcurrencyLimit","filteredPresetOptions","option","Combobox","ComboboxTrigger","ComboboxContent","ComboboxCommandInput","ComboboxCommandEmtpy","ComboboxCommandList","jsxs","ComboboxCommandGroup","ComboboxCommandItem","value","MarkdownInputLazy","lazy","__vitePreload","mod","LazyMarkdownInput","className","props","Skeleton","WorkPoolSelect","WorkPoolSelectImplementation","buildFilterWorkPoolsQuery","workPool","LIMIT_COLLISSION_STRATEGIES","LimitCollissionStrategySelect","onValueChange","Select","SelectTrigger","SelectValue","SelectContent","SelectGroup","SelectItem","createFormSchema","deployment","mode","z.object","z.string","z.array","z.enum","val","ctx","err","z.NEVER","z.boolean","z.record","z.unknown","DEFAULT_VALUES","useDeploymentForm","navigate","useNavigate","form","useForm","zodResolver","parametersFormValues","setParametersFormValues","parameterFormErrors","validateParametersForm","useSchemaForm","createDeployment","useCreateDeployment","updateDeployment","useUpdateDeployment","useEffect","name","description","work_pool_name","work_queue_name","tags","concurrency_options","parameter_openapi_schema","enforce_parameter_schema","job_variables","global_concurrency_limit","values","global_concurrency_limit_id","jobVariablesPayload","message","toast","concurrencyOptions","id","error","DeploymentForm","onSave","watchPoolName","parametersOpenAPISchema","Form","e","FormMessage","Typography","FormField","field","FormItem","FormLabel","FormControl","Input","MarkdownInput","WorkQueueSelect","TagsInput","LazySchemaForm","Switch","JsonInput","Link","Button"],"ignoreList":[],"sources":["../../src/components/global-concurrency-limit/global-concurrency-limit-select/global-concurrency-limit-select.tsx","../../src/components/ui/markdown-input-lazy.tsx","../../src/components/work-pools/work-pool-select/work-pool-select.tsx","../../src/components/deployments/deployment-form/limit-collision-strategy-select.tsx","../../src/components/deployments/deployment-form/use-deployment-form.ts","../../src/components/deployments/deployment-form/deployment-form.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype GlobalConcurrencyLimitSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n};\n\nexport const GlobalConcurrencyLimitSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: GlobalConcurrencyLimitSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<GlobalConcurrencyLimitSelectImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst GlobalConcurrencyLimitSelectImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: GlobalConcurrencyLimitSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(buildListGlobalConcurrencyLimitsQuery());\n\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((globalConcurrencyLimit) =>\n\t\t\tglobalConcurrencyLimit.name\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a global concurrency limit\"\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\tdata.find(\n\t\t\t\t\t\t(globalConcurrencyLimit) => globalConcurrencyLimit.id === selected,\n\t\t\t\t\t)?.name\n\t\t\t\t}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a global concurrency limit...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>\n\t\t\t\t\tNo global concurrency limit found\n\t\t\t\t</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((globalConcurrencyLimit) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={globalConcurrencyLimit.id}\n\t\t\t\t\t\t\t\tselected={selected === globalConcurrencyLimit.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={globalConcurrencyLimit.id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{globalConcurrencyLimit.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst MarkdownInputLazy = lazy(() =>\n\timport(\"./markdown-input\").then((mod) => ({ default: mod.MarkdownInput })),\n);\n\ntype LazyMarkdownInputProps = ComponentProps<typeof MarkdownInputLazy>;\n\nexport function LazyMarkdownInput({\n\tclassName,\n\t...props\n}: LazyMarkdownInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<MarkdownInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport { buildFilterWorkPoolsQuery } from \"@/api/work-pools\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\ntype PresetOption = {\n\tlabel: string;\n\tvalue: string | null | undefined;\n};\n\ntype WorkPoolSelectProps = {\n\tpresetOptions?: Array<PresetOption>;\n\tselected: string | undefined | null;\n\tonSelect: (name: string | undefined | null) => void;\n};\n\nexport const WorkPoolSelect = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: WorkPoolSelectProps) => {\n\treturn (\n\t\t<Suspense>\n\t\t\t<WorkPoolSelectImplementation\n\t\t\t\tpresetOptions={presetOptions}\n\t\t\t\tselected={selected}\n\t\t\t\tonSelect={onSelect}\n\t\t\t/>\n\t\t</Suspense>\n\t);\n};\n\nconst WorkPoolSelectImplementation = ({\n\tpresetOptions = [],\n\tselected,\n\tonSelect,\n}: WorkPoolSelectProps) => {\n\tconst [search, setSearch] = useState(\"\");\n\tconst { data } = useSuspenseQuery(buildFilterWorkPoolsQuery());\n\n\t// nb: because work pools API does not have filtering _like by name, do client-side filtering\n\tconst deferredSearch = useDeferredValue(search);\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((workPool) =>\n\t\t\tworkPool.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\tconst filteredPresetOptions = useMemo(() => {\n\t\treturn presetOptions.filter((option) =>\n\t\t\toption.label.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [deferredSearch, presetOptions]);\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\tselected={Boolean(selected)}\n\t\t\t\taria-label=\"Select a work pool\"\n\t\t\t>\n\t\t\t\t{selected}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search for a work pool...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>No work pool found</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t{filteredPresetOptions.map((option) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={option.label}\n\t\t\t\t\t\t\t\tselected={selected === option.value}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tonSelect(option.value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t//nb: Stringifies label so that UX has a hoverable state\n\t\t\t\t\t\t\t\tvalue={String(option.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{filteredData.map((workPool) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={workPool.id}\n\t\t\t\t\t\t\t\tselected={selected === workPool.name}\n\t\t\t\t\t\t\t\tonSelect={(value) => {\n\t\t\t\t\t\t\t\t\tonSelect(value);\n\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={workPool.name}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{workPool.name}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n};\n","import type { components } from \"@/api/prefect\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\n\ntype LimitCollissionStrategy =\n\tcomponents[\"schemas\"][\"ConcurrencyLimitStrategy\"];\n\nconst LIMIT_COLLISSION_STRATEGIES = {\n\tENQUEUE: \"ENQUEUE\",\n\tCANCEL_NEW: \"CANCEL_NEW\",\n} satisfies Record<LimitCollissionStrategy, LimitCollissionStrategy>;\n\ntype LimitCollissionStrategySelectProps = {\n\tonValueChange: (value: LimitCollissionStrategy | undefined) => void;\n\tvalue: LimitCollissionStrategy | undefined;\n};\n\nexport const LimitCollissionStrategySelect = ({\n\tonValueChange,\n\tvalue,\n}: LimitCollissionStrategySelectProps) => {\n\treturn (\n\t\t<Select\n\t\t\tvalue={value}\n\t\t\tonValueChange={(value) => {\n\t\t\t\tif (value === \"\") {\n\t\t\t\t\tonValueChange(undefined);\n\t\t\t\t} else {\n\t\t\t\t\tonValueChange(value as LimitCollissionStrategy);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<SelectTrigger>\n\t\t\t\t<SelectValue placeholder={LIMIT_COLLISSION_STRATEGIES.ENQUEUE} />\n\t\t\t</SelectTrigger>\n\t\t\t<SelectContent>\n\t\t\t\t<SelectGroup>\n\t\t\t\t\t<SelectItem value={LIMIT_COLLISSION_STRATEGIES.ENQUEUE}>\n\t\t\t\t\t\t{LIMIT_COLLISSION_STRATEGIES.ENQUEUE}\n\t\t\t\t\t</SelectItem>\n\t\t\t\t\t<SelectItem value={LIMIT_COLLISSION_STRATEGIES.CANCEL_NEW}>\n\t\t\t\t\t\t{LIMIT_COLLISSION_STRATEGIES.CANCEL_NEW}\n\t\t\t\t\t</SelectItem>\n\t\t\t\t</SelectGroup>\n\t\t\t</SelectContent>\n\t\t</Select>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useNavigate } from \"@tanstack/react-router\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype Deployment,\n\tuseCreateDeployment,\n\tuseUpdateDeployment,\n} from \"@/api/deployments\";\nimport { useSchemaForm } from \"@/components/schemas\";\n\ntype FormMode = \"edit\" | \"duplicate\";\n\nconst createFormSchema = (\n\tdeployment: Deployment,\n\t{ mode }: { mode: FormMode },\n) =>\n\tz.object({\n\t\tname: z.string().refine(\n\t\t\t(value) => {\n\t\t\t\tif (mode === \"edit\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn value !== deployment.name;\n\t\t\t},\n\t\t\t{ message: \"Name must be different from the original deployment\" },\n\t\t),\n\t\tdescription: z.string().nullable().optional(),\n\t\twork_pool_name: z.string().nullable().optional(),\n\t\twork_queue_name: z.string().nullable().optional(),\n\t\ttags: z.array(z.string()).optional(),\n\t\tconcurrency_options: z\n\t\t\t.object({\n\t\t\t\tcollision_strategy: z.enum([\"ENQUEUE\", \"CANCEL_NEW\"]).optional(),\n\t\t\t})\n\t\t\t.nullable()\n\t\t\t.optional(),\n\t\tjob_variables: z.string().superRefine((val, ctx) => {\n\t\t\ttry {\n\t\t\t\tif (!val) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn JSON.parse(val) as Record<string, unknown>;\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t\tctx.addIssue({ code: \"custom\", message: \"Invalid JSON\" });\n\t\t\t\treturn z.NEVER;\n\t\t\t}\n\t\t}),\n\t\tenforce_parameter_schema: z.boolean(),\n\t\tparameter_openapi_schema: z\n\t\t\t.record(z.unknown())\n\t\t\t.optional()\n\t\t\t.nullable()\n\t\t\t.readonly(),\n\t\tglobal_concurrency_limit_id: z.string().uuid().optional().nullable(),\n\t});\n\nexport type DeploymentFormSchema = z.infer<ReturnType<typeof createFormSchema>>;\n\nconst DEFAULT_VALUES: DeploymentFormSchema = {\n\tname: \"\",\n\tdescription: \"\",\n\ttags: [],\n\tjob_variables: \"\",\n\tenforce_parameter_schema: true,\n\tglobal_concurrency_limit_id: null,\n};\n\nexport const useDeploymentForm = (\n\tdeployment: Deployment,\n\t{ mode }: { mode: FormMode },\n) => {\n\tconst navigate = useNavigate();\n\tconst form = useForm({\n\t\tresolver: zodResolver(createFormSchema(deployment, { mode })),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\tconst {\n\t\tvalues: parametersFormValues,\n\t\tsetValues: setParametersFormValues,\n\t\terrors: parameterFormErrors,\n\t\tvalidateForm: validateParametersForm,\n\t} = useSchemaForm();\n\n\tconst { createDeployment } = useCreateDeployment();\n\tconst { updateDeployment } = useUpdateDeployment();\n\n\t// syncs form state to deployment to update\n\tuseEffect(() => {\n\t\tconst {\n\t\t\tname,\n\t\t\tdescription,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tenforce_parameter_schema,\n\t\t\tjob_variables,\n\t\t\tglobal_concurrency_limit,\n\t\t} = deployment;\n\n\t\t// nb: parameter form state and validation is handled separately using SchemaForm\n\t\t// parameters has poor typings from openAPI\n\t\tsetParametersFormValues(deployment.parameters as Record<string, unknown>);\n\n\t\t// nb: Handle remaining form fields using react-hook-form\n\t\tform.reset({\n\t\t\tdescription,\n\t\t\tname,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tenforce_parameter_schema,\n\t\t\tjob_variables: job_variables ? JSON.stringify(job_variables) : \"\",\n\t\t\tglobal_concurrency_limit_id: global_concurrency_limit?.id,\n\t\t});\n\t}, [form, deployment, setParametersFormValues]);\n\n\tconst onSave = async (values: DeploymentFormSchema) => {\n\t\tconst {\n\t\t\tname,\n\t\t\tjob_variables,\n\t\t\tdescription,\n\t\t\twork_pool_name,\n\t\t\twork_queue_name,\n\t\t\ttags,\n\t\t\tenforce_parameter_schema,\n\t\t\tconcurrency_options,\n\t\t\tparameter_openapi_schema,\n\t\t\tglobal_concurrency_limit_id,\n\t\t} = values;\n\n\t\tconst jobVariablesPayload = job_variables\n\t\t\t? (JSON.parse(job_variables) as Record<string, unknown>)\n\t\t\t: undefined;\n\n\t\tif (parameter_openapi_schema && enforce_parameter_schema) {\n\t\t\ttry {\n\t\t\t\tawait validateParametersForm({ schema: parameter_openapi_schema });\n\t\t\t} catch (err) {\n\t\t\t\tconst message = \"Unknown error while updating validating schema.\";\n\t\t\t\ttoast.error(message);\n\t\t\t\tconsole.error(message, err);\n\t\t\t}\n\t\t}\n\n\t\t// Early exit if there's errors\n\t\tif (parameterFormErrors.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst concurrencyOptions = concurrency_options?.collision_strategy\n\t\t\t? { collision_strategy: concurrency_options.collision_strategy }\n\t\t\t: undefined;\n\n\t\tswitch (mode) {\n\t\t\tcase \"duplicate\":\n\t\t\t\tcreateDeployment(\n\t\t\t\t\t{\n\t\t\t\t\t\tconcurrency_options: concurrencyOptions,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tenforce_parameter_schema,\n\t\t\t\t\t\tflow_id: deployment.flow_id,\n\t\t\t\t\t\tjob_variables: jobVariablesPayload,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tparameters: parametersFormValues,\n\t\t\t\t\t\tparameter_openapi_schema: parameter_openapi_schema || undefined,\n\t\t\t\t\t\tpaused: deployment.paused,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_pool_name: work_pool_name || null,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_queue_name: work_queue_name || null,\n\t\t\t\t\t\tglobal_concurrency_limit_id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tonSuccess: ({ id }) => {\n\t\t\t\t\t\t\ttoast.success(\"Deployment created\");\n\t\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\t\t\t\t\tparams: { id },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\t\terror.message || \"Unknown error while creating deployment.\";\n\t\t\t\t\t\t\tconsole.error(message);\n\t\t\t\t\t\t\ttoast.error(message);\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase \"edit\":\n\t\t\t\tupdateDeployment(\n\t\t\t\t\t{\n\t\t\t\t\t\tconcurrency_options: concurrencyOptions,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tenforce_parameter_schema,\n\t\t\t\t\t\tid: deployment.id,\n\t\t\t\t\t\tjob_variables: jobVariablesPayload,\n\t\t\t\t\t\tparameters: parametersFormValues,\n\t\t\t\t\t\tpaused: deployment.paused,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_pool_name: work_pool_name || null,\n\t\t\t\t\t\t// If value is \"\", set as null\n\t\t\t\t\t\twork_queue_name: work_queue_name || null,\n\t\t\t\t\t\tglobal_concurrency_limit_id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\t\ttoast.success(\"Deployment updated\");\n\t\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\t\t\t\t\tparams: { id: deployment.id },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\t\terror.message || \"Unknown error while updating deployment.\";\n\t\t\t\t\t\t\tconsole.error(message);\n\t\t\t\t\t\t\ttoast.error(message);\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tonSave,\n\t\tparametersFormValues,\n\t\tsetParametersFormValues,\n\t\tparameterFormErrors,\n\t};\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { Deployment } from \"@/api/deployments\";\nimport { GlobalConcurrencyLimitSelect } from \"@/components/global-concurrency-limit/global-concurrency-limit-select\";\nimport { LazySchemaForm, type PrefectSchemaObject } from \"@/components/schemas\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { LazyJsonInput as JsonInput } from \"@/components/ui/json-input-lazy\";\nimport { LazyMarkdownInput as MarkdownInput } from \"@/components/ui/markdown-input-lazy\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { TagsInput } from \"@/components/ui/tags-input\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { WorkPoolSelect } from \"@/components/work-pools/work-pool-select\";\nimport { WorkQueueSelect } from \"@/components/work-pools/work-queue-select\";\nimport { LimitCollissionStrategySelect } from \"./limit-collision-strategy-select\";\nimport { useDeploymentForm } from \"./use-deployment-form\";\n\ntype DeploymentFormProps = {\n\tdeployment: Deployment;\n\tmode: \"edit\" | \"duplicate\";\n};\n\nexport const DeploymentForm = ({ deployment, mode }: DeploymentFormProps) => {\n\tconst {\n\t\tform,\n\t\tonSave,\n\t\tparameterFormErrors,\n\t\tsetParametersFormValues,\n\t\tparametersFormValues,\n\t} = useDeploymentForm(deployment, { mode });\n\tconst watchPoolName = form.watch(\"work_pool_name\");\n\tconst parametersOpenAPISchema = form.getValues(\"parameter_openapi_schema\");\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={(e) => void form.handleSubmit(onSave)(e)}\n\t\t\t\tclassName=\"space-y-4\"\n\t\t\t>\n\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\n\t\t\t\t<Typography variant=\"h3\">General</Typography>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"name\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\tdisabled={mode === \"edit\"}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"description\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Description (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<MarkdownInput\n\t\t\t\t\t\t\t\t\taria-label=\"deployment description input\"\n\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"work_pool_name\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Work Pool (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<WorkPoolSelect\n\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: \"\" }]}\n\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t{watchPoolName && (\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"work_queue_name\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Work Queue (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<WorkQueueSelect\n\t\t\t\t\t\t\t\t\t\tworkPoolName={watchPoolName}\n\t\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: \"\" }]}\n\t\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"tags\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Tags (Optional)</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<TagsInput {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"concurrency_options.collision_strategy\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t<div className=\"col gap-1 mb-0.5\">\n\t\t\t\t\t\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\t\t\t\t\t\tConcurrency Limit Collision Strategy (Optional)\n\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\tvariant=\"bodySmall\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tConfigure behavior for runs once the concurrency limit is\n\t\t\t\t\t\t\t\t\t\treached.\n\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<LimitCollissionStrategySelect\n\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"global_concurrency_limit_id\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Global concurrency limit</FormLabel>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<GlobalConcurrencyLimitSelect\n\t\t\t\t\t\t\t\t\tpresetOptions={[{ label: \"None\", value: null }]}\n\t\t\t\t\t\t\t\t\tonSelect={field.onChange}\n\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"pt-4 border-t\">\n\t\t\t\t\t<Typography variant=\"h3\" className=\"mb-4\">\n\t\t\t\t\t\tParameters\n\t\t\t\t\t</Typography>\n\t\t\t\t\t{parametersOpenAPISchema && (\n\t\t\t\t\t\t<LazySchemaForm\n\t\t\t\t\t\t\tschema={parametersOpenAPISchema as unknown as PrefectSchemaObject}\n\t\t\t\t\t\t\terrors={parameterFormErrors}\n\t\t\t\t\t\t\tvalues={parametersFormValues}\n\t\t\t\t\t\t\tonValuesChange={setParametersFormValues}\n\t\t\t\t\t\t\tkinds={[\"json\"]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"enforce_parameter_schema\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Enforce Parameter Schema</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"pt-4 border-t\">\n\t\t\t\t\t<Typography variant=\"h3\" className=\"mb-4\">\n\t\t\t\t\t\tJob Variables\n\t\t\t\t\t</Typography>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"job_variables\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Job Variables (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<JsonInput {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex gap-3 justify-end\">\n\t\t\t\t\t<Link to=\"/deployments/deployment/$id\" params={{ id: deployment.id }}>\n\t\t\t\t\t\t<Button variant=\"secondary\">Cancel</Button>\n\t\t\t\t\t</Link>\n\t\t\t\t\t<Button type=\"submit\">Save</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"],"file":"deployment-form-DXZUK11h.js"}
@@ -1,2 +1,2 @@
1
- import{j as r}from"./vendor-tanstack-CWDKYA_B.js";import{F as a,a as e,W as s}from"./work-queue-icon-text-4iEAtZOh.js";const u=({deployment:o})=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(a,{flowId:o.flow_id}),o.work_pool_name&&r.jsx(e,{workPoolName:o.work_pool_name}),o.work_pool_name&&o.work_queue_name&&r.jsx(s,{workPoolName:o.work_pool_name,workQueueName:o.work_queue_name,showLabel:!0,showStatus:!0})]});export{u as D};
2
- //# sourceMappingURL=deployment-links-CLax44tW.js.map
1
+ import{j as r}from"./vendor-tanstack-CWDKYA_B.js";import{F as a,a as e,W as s}from"./work-queue-icon-text-GE7b8Ro1.js";const u=({deployment:o})=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(a,{flowId:o.flow_id}),o.work_pool_name&&r.jsx(e,{workPoolName:o.work_pool_name}),o.work_pool_name&&o.work_queue_name&&r.jsx(s,{workPoolName:o.work_pool_name,workQueueName:o.work_queue_name,showLabel:!0,showStatus:!0})]});export{u as D};
2
+ //# sourceMappingURL=deployment-links-bbtRf3OX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployment-links-CLax44tW.js","sources":["../../src/components/deployments/deployment-links.tsx"],"sourcesContent":["import type { Deployment } from \"@/api/deployments\";\nimport { FlowLink } from \"@/components/flows/flow-link\";\nimport { WorkPoolLink } from \"@/components/work-pools/work-pool-link\";\nimport { WorkQueueIconText } from \"@/components/work-pools/work-queue-icon-text\";\n\ntype DeploymentLinksProps = {\n\tdeployment: Deployment;\n};\n\nexport const DeploymentLinks = ({ deployment }: DeploymentLinksProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-4\">\n\t\t\t<FlowLink flowId={deployment.flow_id} />\n\t\t\t{deployment.work_pool_name && (\n\t\t\t\t<WorkPoolLink workPoolName={deployment.work_pool_name} />\n\t\t\t)}\n\t\t\t{deployment.work_pool_name && deployment.work_queue_name && (\n\t\t\t\t<WorkQueueIconText\n\t\t\t\t\tworkPoolName={deployment.work_pool_name}\n\t\t\t\t\tworkQueueName={deployment.work_queue_name}\n\t\t\t\t\tshowLabel\n\t\t\t\t\tshowStatus\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"names":["DeploymentLinks","deployment","jsxs","jsx","FlowLink","WorkPoolLink","WorkQueueIconText"],"mappings":"uHASO,MAAMA,EAAkB,CAAC,CAAE,WAAAC,KAEhCC,EAAAA,KAAC,MAAA,CAAI,UAAU,0BACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAS,OAAQH,EAAW,OAAA,CAAS,EACrCA,EAAW,gBACXE,MAACE,EAAA,CAAa,aAAcJ,EAAW,eAAgB,EAEvDA,EAAW,gBAAkBA,EAAW,iBACxCE,EAAAA,IAACG,EAAA,CACA,aAAcL,EAAW,eACzB,cAAeA,EAAW,gBAC1B,UAAS,GACT,WAAU,EAAA,CAAA,CACX,EAEF"}
1
+ {"version":3,"file":"deployment-links-bbtRf3OX.js","sources":["../../src/components/deployments/deployment-links.tsx"],"sourcesContent":["import type { Deployment } from \"@/api/deployments\";\nimport { FlowLink } from \"@/components/flows/flow-link\";\nimport { WorkPoolLink } from \"@/components/work-pools/work-pool-link\";\nimport { WorkQueueIconText } from \"@/components/work-pools/work-queue-icon-text\";\n\ntype DeploymentLinksProps = {\n\tdeployment: Deployment;\n};\n\nexport const DeploymentLinks = ({ deployment }: DeploymentLinksProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-4\">\n\t\t\t<FlowLink flowId={deployment.flow_id} />\n\t\t\t{deployment.work_pool_name && (\n\t\t\t\t<WorkPoolLink workPoolName={deployment.work_pool_name} />\n\t\t\t)}\n\t\t\t{deployment.work_pool_name && deployment.work_queue_name && (\n\t\t\t\t<WorkQueueIconText\n\t\t\t\t\tworkPoolName={deployment.work_pool_name}\n\t\t\t\t\tworkQueueName={deployment.work_queue_name}\n\t\t\t\t\tshowLabel\n\t\t\t\t\tshowStatus\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"names":["DeploymentLinks","deployment","jsxs","jsx","FlowLink","WorkPoolLink","WorkQueueIconText"],"mappings":"uHASO,MAAMA,EAAkB,CAAC,CAAE,WAAAC,KAEhCC,EAAAA,KAAC,MAAA,CAAI,UAAU,0BACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAS,OAAQH,EAAW,OAAA,CAAS,EACrCA,EAAW,gBACXE,MAACE,EAAA,CAAa,aAAcJ,EAAW,eAAgB,EAEvDA,EAAW,gBAAkBA,EAAW,iBACxCE,EAAAA,IAACG,EAAA,CACA,aAAcL,EAAW,eACzB,cAAeA,EAAW,gBAC1B,UAAS,GACT,WAAU,EAAA,CAAA,CACX,EAEF"}