sqlmesh 0.181.2.dev23__py3-none-any.whl → 0.181.2.dev24__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 (62) hide show
  1. sqlmesh/_version.py +2 -2
  2. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/METADATA +1 -1
  3. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/RECORD +50 -49
  4. web/client/dist/assets/Audits-7rP8WdsD.js +1 -0
  5. web/client/dist/assets/{Banner-OvD39mOq.js → Banner-jMPu9_jP.js} +1 -1
  6. web/client/dist/assets/{ChevronDownIcon-BqleRn_G.js → ChevronDownIcon-BZk6URUK.js} +1 -1
  7. web/client/dist/assets/{ChevronRightIcon-CXKkTIzW.js → ChevronRightIcon-Ctcbr61G.js} +1 -1
  8. web/client/dist/assets/{Content-COW0vEIQ.js → Content-C43kcRta.js} +2 -2
  9. web/client/dist/assets/Content-DITnFT31.js +1 -0
  10. web/client/dist/assets/Data-B5q1KzIa.js +1 -0
  11. web/client/dist/assets/{DataCatalog-iRjvB2C3.js → DataCatalog-BRzSrlJL.js} +2 -2
  12. web/client/dist/assets/{Editor-BLhCfpzx.js → Editor-7muj9lbw.js} +1 -1
  13. web/client/dist/assets/Editor-CAMzYH0x.js +1 -0
  14. web/client/dist/assets/Errors-Bbd2EOQg.js +1 -0
  15. web/client/dist/assets/{FileExplorer-gjDFmLLh.js → FileExplorer-DMR02idl.js} +3 -3
  16. web/client/dist/assets/{Footer-CfHqR8wm.js → Footer-Cnu_IoqE.js} +1 -1
  17. web/client/dist/assets/{Header-sstE4Gqk.js → Header-NJkxh8bb.js} +1 -1
  18. web/client/dist/assets/Input-CYm3h-zG.js +41 -0
  19. web/client/dist/assets/Lineage-HZl7aUI5.js +1 -0
  20. web/client/dist/assets/{ListboxShow-nvacUoI1.js → ListboxShow-CwgOYGSe.js} +1 -1
  21. web/client/dist/assets/ModelLineage-Bnes5PV4.js +1 -0
  22. web/client/dist/assets/Models-B_sukTY5.js +1 -0
  23. web/client/dist/assets/{Page-D0nUv5ck.js → Page-DxTzPmYT.js} +1 -1
  24. web/client/dist/assets/{Plan-Cj_0vc_H.js → Plan-B2b637kI.js} +1 -1
  25. web/client/dist/assets/{PlusCircleIcon-C2xHHnL-.js → PlusCircleIcon-FgfUjgrM.js} +1 -1
  26. web/client/dist/assets/{ReportErrors-D88IZz3n.js → ReportErrors-xnNgNULg.js} +1 -1
  27. web/client/dist/assets/Root-BMcIwqdc.js +1 -0
  28. web/client/dist/assets/{SearchList-Dltx9F6k.js → SearchList-9n_6_E0k.js} +1 -1
  29. web/client/dist/assets/{SelectEnvironment-CZAVUJhY.js → SelectEnvironment-DC6x26Ax.js} +1 -1
  30. web/client/dist/assets/{SourceList-Diwt0dWW.js → SourceList-Chz492Ne.js} +1 -1
  31. web/client/dist/assets/{SourceListItem-CjW93oYe.js → SourceListItem-DIieM0S_.js} +1 -1
  32. web/client/dist/assets/{SplitPane-B-vlCkrS.js → SplitPane-CmzNrZQN.js} +1 -1
  33. web/client/dist/assets/Tests-DbVFKqeG.js +1 -0
  34. web/client/dist/assets/{Welcome-DbFwSigj.js → Welcome-DxKW_LKA.js} +1 -1
  35. web/client/dist/assets/{context-Dvup3XDX.js → context-CzM900aY.js} +1 -1
  36. web/client/dist/assets/{context-CA-MXfZ6.js → context-DhymIb_N.js} +4 -4
  37. web/client/dist/assets/{editor-DmJY3IbC.js → editor-Bf9rhumO.js} +2 -2
  38. web/client/dist/assets/{file-DYgUpg8u.js → file-CcK5Oobc.js} +1 -1
  39. web/client/dist/assets/{help-CNdZX-7b.js → help-DtLmoC0U.js} +1 -1
  40. web/client/dist/assets/index-BdXOfeCo.js +1 -0
  41. web/client/dist/assets/{index-D-9edHVb.js → index-CLuHMKlN.js} +2 -2
  42. web/client/dist/assets/index-KZcJd7F1.js +58 -0
  43. web/client/dist/assets/{plan-Cdj5QED6.js → plan-e4fPD47J.js} +1 -1
  44. web/client/dist/assets/{project-BlT_dmGo.js → project-CjyecwCx.js} +1 -1
  45. web/client/dist/assets/{transition-nHCHMLQ-.js → transition-C8EjNcgL.js} +2 -2
  46. web/client/dist/index.html +1 -1
  47. web/client/dist/assets/Audits-BZWk3jlL.js +0 -1
  48. web/client/dist/assets/Content-CkK8L7V3.js +0 -1
  49. web/client/dist/assets/Data-CQQQmeF1.js +0 -1
  50. web/client/dist/assets/Editor-DKqRG32p.js +0 -1
  51. web/client/dist/assets/Errors-x-oFeSch.js +0 -1
  52. web/client/dist/assets/Input-A6Hrwz1k.js +0 -41
  53. web/client/dist/assets/Lineage-CzdZCXc6.js +0 -1
  54. web/client/dist/assets/ModelLineage-B6geDuI6.js +0 -1
  55. web/client/dist/assets/Models-B1vLawzn.js +0 -1
  56. web/client/dist/assets/Root-DCNtqbqI.js +0 -1
  57. web/client/dist/assets/Tests-D8lyWcVm.js +0 -1
  58. web/client/dist/assets/index-L7UJWCGi.js +0 -74
  59. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/WHEEL +0 -0
  60. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/entry_points.txt +0 -0
  61. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/licenses/LICENSE +0 -0
  62. {sqlmesh-0.181.2.dev23.dist-info → sqlmesh-0.181.2.dev24.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.181.2.dev23'
21
- __version_tuple__ = version_tuple = (0, 181, 2, 'dev23')
20
+ __version__ = version = '0.181.2.dev24'
21
+ __version_tuple__ = version_tuple = (0, 181, 2, 'dev24')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlmesh
3
- Version: 0.181.2.dev23
3
+ Version: 0.181.2.dev24
4
4
  Summary: Next-generation data transformation framework
5
5
  Author-email: "TobikoData Inc." <engineering@tobikodata.com>
6
6
  License: Apache License
@@ -1,5 +1,5 @@
1
1
  sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
2
- sqlmesh/_version.py,sha256=AEHs2XDp7WWyGxzYf5uyhFoO5VbZRv0qjTvxI5h4zDY,530
2
+ sqlmesh/_version.py,sha256=y37SSDbJ-WLv8Txg5FeUa9StWqKrEb9Gn3VpcwowkqY,530
3
3
  sqlmesh/magics.py,sha256=9oY1Uz8uwsuTtPRg9HTYDxnGiJ7-OVRCpmCgAhbKHUU,39431
4
4
  sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -266,52 +266,53 @@ sqlmesh/utils/pandas.py,sha256=j_tYhuPcWpzuPceZZ6IhdTVbmxYyGJW7l4FHr4bQqjM,1824
266
266
  sqlmesh/utils/pydantic.py,sha256=ioaAzYF42PutEJRyAS11-AHguiCG3yWI6VRcTVa2G-g,10470
267
267
  sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
268
268
  sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
269
- sqlmesh-0.181.2.dev23.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
269
+ sqlmesh-0.181.2.dev24.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
270
270
  web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
271
- web/client/dist/index.html,sha256=kfVXu8Tq5mRsS79jQ_xuT_JgfS_IyJ9v8Gg_fz4tW0U,5472
272
- web/client/dist/assets/Audits-BZWk3jlL.js,sha256=ZYBPidshR7qK2yHbZbBlDieNtWtzy74T1KvN-JO3Ajc,997
273
- web/client/dist/assets/Banner-OvD39mOq.js,sha256=OBvLqQi2QBX8IekFdWbv2JWPYkq33VvhqQ4b4Kofww8,1544
274
- web/client/dist/assets/ChevronDownIcon-BqleRn_G.js,sha256=xCVg27ZeN5Wgf57lMqT3sKYOk3OzhrYaRzHkd57hJmI,553
275
- web/client/dist/assets/ChevronRightIcon-CXKkTIzW.js,sha256=uC7XnsK-tS4TVi4QX_SnkVg3mlSRhlc_i6ckaF3-b9c,553
276
- web/client/dist/assets/Content-COW0vEIQ.js,sha256=-o6_n-5IqiTfxcCSZdsxaun-Cnsqx1JDW38Fsre4qsg,37120
277
- web/client/dist/assets/Content-CkK8L7V3.js,sha256=lXlmur8GkIs8IAYCyOGfEyQx94HoAJsvpZLe00IFxXg,762
278
- web/client/dist/assets/Data-CQQQmeF1.js,sha256=uWZLufA-ZQepq7IdGaiG12QjQxwUy5zD9weRB5YMogc,935
279
- web/client/dist/assets/DataCatalog-iRjvB2C3.js,sha256=l0qszHpFZ8OcZfM4l4NOJ8jH5bPjYPUtBMC519m3Ons,122423
280
- web/client/dist/assets/Editor-BLhCfpzx.js,sha256=prAdpGoOqJ6fSpWS4PTXwybXSLCdNVsd0brTct-Us3s,1490
281
- web/client/dist/assets/Editor-DKqRG32p.js,sha256=0s4pETfZHmecRRzUt0xAjnckgRhP36z1kz4gC2ZRhco,43432
282
- web/client/dist/assets/Errors-x-oFeSch.js,sha256=YLTybCCC61NX3H3j50OJ--iCVmWh0eWUokUjQERcucA,1322
283
- web/client/dist/assets/FileExplorer-gjDFmLLh.js,sha256=q3Ov4P15qqkGlVLvcObWkYKueNbRFs9sLDLV2hZPBHk,111732
284
- web/client/dist/assets/Footer-CfHqR8wm.js,sha256=CkNGYuDPMkzdA9y-SaKlWjpT8cTXdtCEd0vGYYOwVzg,700
285
- web/client/dist/assets/Header-sstE4Gqk.js,sha256=0LZn_aDZStLqLn4AmusAJqPTyBpUKQ7RSKRsqknhSWY,11424
286
- web/client/dist/assets/Input-A6Hrwz1k.js,sha256=LhDzrUk_uHZgi2TXfRALQC4WIL4OC6FaYRZZSuW8TTA,74100
287
- web/client/dist/assets/Lineage-CzdZCXc6.js,sha256=wxUYIWhgPInB5mSyKuXwhqZSNcB4GO8tlcWebr-hEtc,961
288
- web/client/dist/assets/ListboxShow-nvacUoI1.js,sha256=o7ONrobEb3vmFHlqrAxzdevvfUTkMHP0NTtUv5CtCJk,17746
289
- web/client/dist/assets/ModelLineage-B6geDuI6.js,sha256=ojWNMDCXDy-lDVB9dksijChX8LDMeteWiG1zH-71RSA,16556
290
- web/client/dist/assets/Models-B1vLawzn.js,sha256=oUxIZ9gUWvtcI_uq6Pz-K8WQri8isyEbF-zyAfNcrsg,2153
291
- web/client/dist/assets/Page-D0nUv5ck.js,sha256=T0uBdvmlp6wY6u5dNQpmrf8gBr-LW1_iZNRv5Y641Ms,589
292
- web/client/dist/assets/Plan-Cj_0vc_H.js,sha256=f5L5PJAZdRnLIrD0LP9idCHLkQAVdJ5t87sM143iK4A,666
293
- web/client/dist/assets/PlusCircleIcon-C2xHHnL-.js,sha256=kFsdR6qbJArNEFw8chwxX-400OFVPvzgimPUreW3bkM,11175
294
- web/client/dist/assets/ReportErrors-D88IZz3n.js,sha256=tK273d-wGRk7OMBOM39cMvFl8tNpyObzP6Ip_6eItUw,5417
295
- web/client/dist/assets/Root-DCNtqbqI.js,sha256=SZ__ZckdR_uMkCWDRYQn2oMVKmL0_k4YhZueu7FCfVE,46591
296
- web/client/dist/assets/SearchList-Dltx9F6k.js,sha256=rWvLqAPBa6nbx23NU-pCwJ3mwe46wSZ8E3vpTFTHmMI,291986
297
- web/client/dist/assets/SelectEnvironment-CZAVUJhY.js,sha256=alwT_-9Lj0j-DjAhKxDe-QijCqjlFZGYBu1hbre03Tk,33099
298
- web/client/dist/assets/SourceList-Diwt0dWW.js,sha256=VceF9GpWhxKHdjFRONwy8txZIddVe6UeWFoyN7OtUvM,3205
299
- web/client/dist/assets/SourceListItem-CjW93oYe.js,sha256=c2OMvXrjcjNPh5jXv8FatpUyU5iJV0IceQx_jjZzIeY,1106
300
- web/client/dist/assets/SplitPane-B-vlCkrS.js,sha256=3KllzqC1aX4KodPycpWub0sVCAvtddCrfye9UZE5t2k,10439
301
- web/client/dist/assets/Tests-D8lyWcVm.js,sha256=u_1ydlHdRXFP0nwq9SCxqOcIcVGBUz5wbg9UO0gejew,975
302
- web/client/dist/assets/Welcome-DbFwSigj.js,sha256=ZMurDuqI-bAeOJTBsaGzFmBJKT7BzsXv7g3J1aGbDmg,354
271
+ web/client/dist/index.html,sha256=gu6BZFnNXruXRtJ4jr8uNH2Bo51Y3R6dY47iL5tSJ6U,5472
272
+ web/client/dist/assets/Audits-7rP8WdsD.js,sha256=CUEscMKOKMaJCauHyMcEO-HQF0SFa1-bfqZpdjE--NM,1025
273
+ web/client/dist/assets/Banner-jMPu9_jP.js,sha256=16OtbxD1aeQ5FCn7DXcQJhRGA3Xsz6KagMEWjpHy3CE,1544
274
+ web/client/dist/assets/ChevronDownIcon-BZk6URUK.js,sha256=5p8NQejRCvQwF2fmX2YVgIvyvDuoVk6XrPVWhBnqGV8,553
275
+ web/client/dist/assets/ChevronRightIcon-Ctcbr61G.js,sha256=P0hpU7p1OZ4gcRe5WuFQOjzLgzpNIMsqw3P9Ea-WCZM,553
276
+ web/client/dist/assets/Content-C43kcRta.js,sha256=5B8CIHwpPO74ZYiq4GpHk7KG27tKpxNDeyF38VcHgik,37148
277
+ web/client/dist/assets/Content-DITnFT31.js,sha256=GyxPPPIqqovnGeN7TJPgnKA9fjBYRC8xT8QQQqMyf-Q,790
278
+ web/client/dist/assets/Data-B5q1KzIa.js,sha256=4n9vVRaMotWVwCRh4oWS3Q3oiufBlPwxgPZnwgdTXnA,963
279
+ web/client/dist/assets/DataCatalog-BRzSrlJL.js,sha256=bluFXahYXioEUZi9cty9Odyi07tyF9JCV-41Nt638Ug,122451
280
+ web/client/dist/assets/Editor-7muj9lbw.js,sha256=ZTd2R6aSabyewIu4l9_rPJfnLFH93A2oP4q_OccaJy8,1490
281
+ web/client/dist/assets/Editor-CAMzYH0x.js,sha256=gTdYmFVKMh2L_0m0eo-gwUHk5ncDCXosN8OXZvxK4I8,43460
282
+ web/client/dist/assets/Errors-Bbd2EOQg.js,sha256=HGarba0PVnguVj3o3lN9ah3Y4UhBlRbZtayVZOsnpdg,1350
283
+ web/client/dist/assets/FileExplorer-DMR02idl.js,sha256=DjU0Nc2pcJaXL-0qtoPTQE-O1DKWfECzQbatXF78098,111763
284
+ web/client/dist/assets/Footer-Cnu_IoqE.js,sha256=a8dKURIA2OWXR-S2bhq7iIFwVvwu5a98iKmtAsCDszU,700
285
+ web/client/dist/assets/Header-NJkxh8bb.js,sha256=_OxUxl1WIqYtjqniCl86mMdJroEo8gB8QhIKpz9V6Jk,11424
286
+ web/client/dist/assets/Input-CYm3h-zG.js,sha256=d6GDZLikHZcmGJ-ByDjhgUrHSZfiboo2UffirJj2sfs,74131
287
+ web/client/dist/assets/Lineage-HZl7aUI5.js,sha256=mbFzHuqxwTpOIraWoFVid7-pSWNUa8H_xAaITOIadIQ,989
288
+ web/client/dist/assets/ListboxShow-CwgOYGSe.js,sha256=f3PVWBHKCUPlKDaCExUbHnKnfXsvh03lxnnqj8GOSqw,17746
289
+ web/client/dist/assets/ModelLineage-Bnes5PV4.js,sha256=JdusBLgO0Bgpx-71Vf5C-lWJmjDdZDn072ob3-DQqdU,16584
290
+ web/client/dist/assets/Models-B_sukTY5.js,sha256=JmTQ3J4Uf7cW38r88NOeJ5x_PjZ-QxJD6DoEi5QNTno,2181
291
+ web/client/dist/assets/Page-DxTzPmYT.js,sha256=8KXZMqg0YNXB5vk7rGGGhnqlpgG6L5qefLgrxzc9u7k,589
292
+ web/client/dist/assets/Plan-B2b637kI.js,sha256=llbrG-vDP7HImCIJ2agA_4LmiQBQwI98tXFxp9klGhY,666
293
+ web/client/dist/assets/PlusCircleIcon-FgfUjgrM.js,sha256=OPqjmU3_WCpFaS2KBz6HrLmYbVgLAck0imQtvKwvW0Q,11175
294
+ web/client/dist/assets/ReportErrors-xnNgNULg.js,sha256=dnyn_GiSCd5E4rFPdooduk5DGdcwIqyB6YN4MBgBtwA,5417
295
+ web/client/dist/assets/Root-BMcIwqdc.js,sha256=xUkGWW5hUalL-3wRjAhrge0DbjQz0M7foiFtg2qXfek,46619
296
+ web/client/dist/assets/SearchList-9n_6_E0k.js,sha256=eUOMrTVOMD3wmCZdUAjDZ6TyGkDDiQKVcKOEX19qIO0,291986
297
+ web/client/dist/assets/SelectEnvironment-DC6x26Ax.js,sha256=NKsE7cyVkah2nWmMvnYFWMFKV_BZvewJXF34UlxGtXA,33099
298
+ web/client/dist/assets/SourceList-Chz492Ne.js,sha256=rHrcyZ0ULoHIshPdzOvRtyjqvsmavrU_tBDm2EZkgbw,3205
299
+ web/client/dist/assets/SourceListItem-DIieM0S_.js,sha256=AX1gN8O-6jpX0--7WfAzku5QdHNibWJfNzyhQZWYdkg,1106
300
+ web/client/dist/assets/SplitPane-CmzNrZQN.js,sha256=hPMNYmDLKn46yARdj2E2a2ut76o9__2MS_UvjFnW3eg,10439
301
+ web/client/dist/assets/Tests-DbVFKqeG.js,sha256=LQrN0tmdrKKOzFKph8HuBwJUTr849PBUL0BAPx2iucI,1003
302
+ web/client/dist/assets/Welcome-DxKW_LKA.js,sha256=W_RkTZYQfzuVVI6WHje4xSMEeA9J12TBuhLnsxs8T58,354
303
303
  web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
304
- web/client/dist/assets/context-CA-MXfZ6.js,sha256=B8Zbh65nJR2vsaBW3zFjFF5xyxD3r3DMhFKxNSWA4-A,2052791
305
- web/client/dist/assets/context-Dvup3XDX.js,sha256=vZ0sFAI2smjxXk3A2yT52FPn9jnvkwEi78k-hKraMas,4522
306
- web/client/dist/assets/editor-DmJY3IbC.js,sha256=YC2Nj-ZpFccGLpMP2KF4GV5CVTdzjJGPuZMrMbbymoU,7858
307
- web/client/dist/assets/file-DYgUpg8u.js,sha256=jky9aROg23hLFkaBICA4_7Z6UkLvpYBxnDLvX8FePIE,2350
304
+ web/client/dist/assets/context-CzM900aY.js,sha256=sMXhyIeCi2WemJzOWyVSZ5jzAWNto56Q14hgq6-v-vY,4522
305
+ web/client/dist/assets/context-DhymIb_N.js,sha256=RKrIRD2npB0OzL9vs-rCzFayJxfUOwZOjO2JERE67tw,2052819
306
+ web/client/dist/assets/editor-Bf9rhumO.js,sha256=dAhCqNFK7bQln0KtLsGxrRcopk2iIpLIbgt0HFn0zqg,7858
307
+ web/client/dist/assets/file-CcK5Oobc.js,sha256=YqRvbiti1ZOL_MQdSaU7-fQnPiNlputdZSPzx4KnDBQ,2350
308
308
  web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
309
- web/client/dist/assets/help-CNdZX-7b.js,sha256=2UUkwNU5mnwHM1Fhb43wZV610SxK-NTHN2eU0UI3cXM,57842
310
- web/client/dist/assets/index-D-9edHVb.js,sha256=ORrX_xvMWGSaYOX6YV0lPiEgw9CagWXBioFQkwjyOu0,13514
311
- web/client/dist/assets/index-L7UJWCGi.js,sha256=jQTExou99emfZ4Ow0QXu0Kz4fkCvwMeM5qU1T90uxnE,516998
312
- web/client/dist/assets/plan-Cdj5QED6.js,sha256=MpNKHslv0ZFJPsJ56b7DM6amm5N6b-pwKxsx6keWPlU,13755
313
- web/client/dist/assets/project-BlT_dmGo.js,sha256=sH_bmCmWdLXsw7VR4maFcgnHct19i2jKr18ksCGAdLg,3338
314
- web/client/dist/assets/transition-nHCHMLQ-.js,sha256=PA-Zgn16cNf4LdfeUm2Vo39j9A2ILBv6HBvJyT2mdHM,34243
309
+ web/client/dist/assets/help-DtLmoC0U.js,sha256=VnhIbULlcYnFaWWZePG0uHbsas7lBfXPH2ExQopLSpI,57842
310
+ web/client/dist/assets/index-BdXOfeCo.js,sha256=OtdmsDF4DmtryzV-cdSOKxohD9zow77GmjlHatA53Q0,95
311
+ web/client/dist/assets/index-CLuHMKlN.js,sha256=p_jmYva0_LmKZ2s47JdkcdaL12c8lL6YOuebtPIoPhU,13546
312
+ web/client/dist/assets/index-KZcJd7F1.js,sha256=9YsyTVDSRAtxroQzUnDice_oMGKljq4bUQNX83SCkwM,531311
313
+ web/client/dist/assets/plan-e4fPD47J.js,sha256=FEmZWBK29Kfkc_PWAAP8z6Z3tRztCIAJ70MfV0FVplE,13755
314
+ web/client/dist/assets/project-CjyecwCx.js,sha256=FS4YoiN4Fh4NPihzFI1N1taw-83XcNVq33dRGynFSV4,3338
315
+ web/client/dist/assets/transition-C8EjNcgL.js,sha256=_UhtShjWHbyrVomDWY2tAicfEdQomQTN7uVYhMC5IAU,34275
315
316
  web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
316
317
  web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
317
318
  web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
@@ -383,8 +384,8 @@ web/server/api/endpoints/models.py,sha256=SzS5bshzdXyM6hb948sZ_3k-xhpGCHkxkb7pHz
383
384
  web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
384
385
  web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
385
386
  web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
386
- sqlmesh-0.181.2.dev23.dist-info/METADATA,sha256=lNL5JLxT9MS0aX8PRFpVxmLdhEiYSpmtvr2t4LQup4E,25253
387
- sqlmesh-0.181.2.dev23.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
388
- sqlmesh-0.181.2.dev23.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
389
- sqlmesh-0.181.2.dev23.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
390
- sqlmesh-0.181.2.dev23.dist-info/RECORD,,
387
+ sqlmesh-0.181.2.dev24.dist-info/METADATA,sha256=0K0pnUvQRJBO5sBf9txHSz_JAG354UKnAgElS2PFhMc,25253
388
+ sqlmesh-0.181.2.dev24.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
389
+ sqlmesh-0.181.2.dev24.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
390
+ sqlmesh-0.181.2.dev24.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
391
+ sqlmesh-0.181.2.dev24.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ import{y as u,j as s,O as f,e as t,I as c,B as p,n as d,m as x}from"./index-KZcJd7F1.js";import{P as j}from"./Page-DxTzPmYT.js";import{u as h}from"./project-CjyecwCx.js";import{S as v}from"./SourceList-Chz492Ne.js";import{S as y}from"./SourceListItem-DIieM0S_.js";import"./SplitPane-CmzNrZQN.js";import"./file-CcK5Oobc.js";import"./Input-CYm3h-zG.js";import"./index-BdXOfeCo.js";import"./index-CLuHMKlN.js";function k(){const{pathname:a}=u(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:n=!1})=>s.jsx(y,{to:e,name:o,text:l,description:m,disabled:n})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:x.sm,variant:d.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
@@ -1 +1 @@
1
- import{j as s,c as i,m as a,n,I as p}from"./index-L7UJWCGi.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
1
+ import{j as s,c as i,m as a,n,I as p}from"./index-KZcJd7F1.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
@@ -1 +1 @@
1
- import{r as e}from"./index-L7UJWCGi.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
1
+ import{r as e}from"./index-KZcJd7F1.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
@@ -1 +1 @@
1
- import{r as e}from"./index-L7UJWCGi.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
1
+ import{r as e}from"./index-KZcJd7F1.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
@@ -1,4 +1,4 @@
1
- import{r as y,R as J,a as O,j as e,n as I,t as Me,b as C,B as te,w as B,m as T,c as g,M as Pe,g as V,J as ze,K as ie,i as M,P as Q,h as H,T as Re,I as re,Q as xe,D as Ue,C as U,s as Le,L as $e,d as Ve,l as Ge,p as He,q as qe,U as Ke,V as Ze,e as Ye}from"./index-L7UJWCGi.js";import{G as Je,B as Qe,F as We,w as Xe,u as Z,S as es,A as ss,a as ge,b as E,E as A,P as L,c as as}from"./SelectEnvironment-CZAVUJhY.js";import{u as x,a as Y,E as z}from"./plan-Cdj5QED6.js";import{B as F}from"./Banner-OvD39mOq.js";import{A as $,F as ye,a as we,p as ns}from"./PlusCircleIcon-C2xHHnL-.js";import{U as ts,C as Ee,I as ls,y as is,o as le,T as rs,p as os,b as cs,F as ds,c as ms,A as us,z as Te,D as ee}from"./transition-nHCHMLQ-.js";import{I as q}from"./Input-A6Hrwz1k.js";import{T as ps,p as fs}from"./ListboxShow-nvacUoI1.js";import{u as Be}from"./project-BlT_dmGo.js";import{F as je}from"./context-CA-MXfZ6.js";import"./ModelLineage-B6geDuI6.js";import"./editor-DmJY3IbC.js";import"./file-DYgUpg8u.js";import"./SearchList-Dltx9F6k.js";import"./help-6Q7f7fjd.js";import"./ChevronDownIcon-BqleRn_G.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-Diwt0dWW.js";import"./index-D-9edHVb.js";function hs({title:s,titleId:a,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?y.createElement("title",{id:a},s):null,y.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const W=y.forwardRef(hs);let be=y.createContext(null);be.displayName="GroupContext";let xs=y.Fragment;function js(s){var a;let[t,r]=y.useState(null),[l,i]=We(),[o,u]=Xe(),c=y.useMemo(()=>({switch:t,setSwitch:r,labelledby:l,describedby:o}),[t,r,l,o]),d={},p=s;return J.createElement(u,{name:"Switch.Description"},J.createElement(i,{name:"Switch.Label",props:{htmlFor:(a=c.switch)==null?void 0:a.id,onClick(n){t&&(n.currentTarget.tagName==="LABEL"&&n.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(be.Provider,{value:c},Ee({ourProps:d,theirProps:p,defaultTag:xs,name:"Switch.Group"}))))}let vs="button";function gs(s,a){var t;let r=ls(),{id:l=`headlessui-switch-${r}`,checked:i,defaultChecked:o=!1,onChange:u,disabled:c=!1,name:d,value:p,form:n,...j}=s,m=y.useContext(be),f=y.useRef(null),h=is(f,a,m===null?null:m.setSwitch),[P,S]=ps(i,u,o),D=le(()=>S==null?void 0:S(!P)),N=le(_=>{if(us(_.currentTarget))return _.preventDefault();_.preventDefault(),D()}),k=le(_=>{_.key===Te.Space?(_.preventDefault(),D()):_.key===Te.Enter&&fs(_.currentTarget)}),w=le(_=>_.preventDefault()),R=y.useMemo(()=>({checked:P}),[P]),pe={id:l,ref:h,role:"switch",type:rs(s,f),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:c,onClick:N,onKeyUp:k,onKeyPress:w},fe=os();return y.useEffect(()=>{var _;let b=(_=f.current)==null?void 0:_.closest("form");b&&o!==void 0&&fe.addEventListener(b,"reset",()=>{S(o)})},[f,S]),J.createElement(J.Fragment,null,d!=null&&P&&J.createElement(cs,{features:ms.Hidden,...ds({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:c,form:n,checked:P,name:d,value:p})}),Ee({ourProps:pe,theirProps:j,slot:R,defaultTag:vs,name:"Switch"}))}let ys=ts(gs),ws=js,he=Object.assign(ys,{Group:ws,Label:Qe,Description:Je});function bs(){const s=O(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(F,{variant:I.Warning,children:e.jsx($,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(F.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ye,{className:"w-5 text-warning-500"}):e.jsx(we,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx($.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(F.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ns(s=0){return y.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function ks({run:s,apply:a,cancel:t,reset:r}){const l=Me(),{change_categorization:i}=Z(),o=O(b=>b.modules),u=O(b=>b.environment),c=O(b=>b.environments),d=O(b=>b.addConfirmation),p=O(b=>b.setShowConfirmation),n=x(b=>b.planAction),j=x(b=>b.planOverview),m=x(b=>b.planApply),f=x(b=>b.planCancel),h=Ns();function P(b){b.stopPropagation(),r()}function S(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const Oe=u.isProd&&C(u.isInitial),ke=Array.from(i.values()).some(Ie=>B(Ie.category));Oe?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:ke?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${c.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[c.size>1&&e.jsx(es,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{p(!1)},size:T.md}),e.jsx(ss,{className:"w-full",size:T.md,onAdd:()=>{p(!1)}})]})]})}):ke?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const w=j.isFailed||m.isFailed||f.isSuccessful,R=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(w),pe=n.isApplying||f.isCancelling||m.isRunning&&j.isFinished,fe=w||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),_=o.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(ee,{appear:!0,show:R,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:R&&e.jsx(te,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:h,variant:f.isSuccessful?I.Danger:I.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[z.RunningTask,z.Running,z.Run,z.Applying,z.ApplyBackfill,z.ApplyVirtual,z.ApplyChangesAndBackfill,z.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[pe&&e.jsx(te,{onClick:S,variant:I.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[z.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),fe&&e.jsx(te,{onClick:P,variant:I.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),_&&e.jsx(te,{onClick:D,variant:I.Info,children:"Go Back"})]})]})})}function Ps({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:o}){return e.jsxs(he.Group,{as:"div",className:"m-1",children:[e.jsxs(he,{checked:i?!1:a,onChange:t,className:g("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",o,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:g("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(he.Label,{className:g("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function K({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:g("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(Ps,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ts({disabled:s=!1,className:a}){const t=ge(),{start:r,end:l,isInitialPlanRun:i}=Z();return e.jsxs("div",{className:g("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(q,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2023-12-13",value:r,onInput:c=>{c.stopPropagation(),t({type:E.DateStart,start:c.target.value})}})}),e.jsx(q,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2022-12-13",value:l,onInput:c=>{c.stopPropagation(),t({type:E.DateEnd,end:c.target.value})}})})]})}function Cs(){const s=ge(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:o,restate_models:u,isInitialPlanRun:c,create_from:d,include_unmodified:p}=Z(),n=y.useRef(null),j=x(N=>N.planAction),m=x(N=>N.planOverview),f=x(N=>N.planApply),h=O(N=>N.environment),P=O(N=>N.environments),S=Pe.getOnlyRemote(Array.from(P));y.useEffect(()=>{s({type:E.PlanOptions,...m.plan_options,skip_tests:!1})},[]);const D=j.isProcessing||j.isDone||f.isFinished||m.isLatest&&C(j.isRun)||m.isVirtualUpdate;return y.useEffect(()=>{var N;B(n.current)||j.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,j]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:g(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ts,{className:g(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(F,{children:e.jsx($,{defaultOpen:j.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{ref:n,className:g("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(F.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ye,{className:"h-5 w-5 text-neutral-400"}):e.jsx(we,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs($.Panel,{unmount:!1,className:g("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:g(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(h.isProd)&&e.jsx(q,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:S.length<2,children:({className:k,disabled:w})=>e.jsx(q.Selector,{className:g(k,"w-full"),list:Pe.getOnlyRemote(Array.from(P)).filter(R=>R!==h).map(R=>({value:R.name,text:R.name})),onChange:R=>{s({type:E.PlanOptions,create_from:R})},value:d,disabled:w})}),e.jsx(q,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
1
+ import{r as y,R as J,a as O,j as e,n as I,t as Me,b as C,B as te,w as B,m as T,c as g,M as Pe,g as V,J as ze,K as ie,i as M,P as Q,h as H,T as Re,I as re,Q as xe,D as Ue,C as U,s as Le,L as $e,d as Ve,l as Ge,p as He,q as qe,U as Ke,V as Ze,e as Ye}from"./index-KZcJd7F1.js";import{G as Je,B as Qe,F as We,w as Xe,u as Z,S as es,A as ss,a as ge,b as E,E as A,P as L,c as as}from"./SelectEnvironment-DC6x26Ax.js";import{u as x,a as Y,E as z}from"./plan-e4fPD47J.js";import{B as F}from"./Banner-jMPu9_jP.js";import{A as $,F as ye,a as we,p as ns}from"./PlusCircleIcon-FgfUjgrM.js";import{U as ts,C as Ee,I as ls,y as is,o as le,T as rs,p as os,b as cs,F as ds,c as ms,A as us,z as Te,D as ee}from"./transition-C8EjNcgL.js";import{I as q}from"./Input-CYm3h-zG.js";import{T as ps,p as fs}from"./ListboxShow-CwgOYGSe.js";import{u as Be}from"./project-CjyecwCx.js";import{F as je}from"./context-DhymIb_N.js";import"./ModelLineage-Bnes5PV4.js";import"./editor-Bf9rhumO.js";import"./file-CcK5Oobc.js";import"./SearchList-9n_6_E0k.js";import"./help-6Q7f7fjd.js";import"./ChevronDownIcon-BZk6URUK.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-BdXOfeCo.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";function hs({title:s,titleId:a,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?y.createElement("title",{id:a},s):null,y.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const W=y.forwardRef(hs);let be=y.createContext(null);be.displayName="GroupContext";let xs=y.Fragment;function js(s){var a;let[t,r]=y.useState(null),[l,i]=We(),[o,u]=Xe(),c=y.useMemo(()=>({switch:t,setSwitch:r,labelledby:l,describedby:o}),[t,r,l,o]),d={},p=s;return J.createElement(u,{name:"Switch.Description"},J.createElement(i,{name:"Switch.Label",props:{htmlFor:(a=c.switch)==null?void 0:a.id,onClick(n){t&&(n.currentTarget.tagName==="LABEL"&&n.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(be.Provider,{value:c},Ee({ourProps:d,theirProps:p,defaultTag:xs,name:"Switch.Group"}))))}let vs="button";function gs(s,a){var t;let r=ls(),{id:l=`headlessui-switch-${r}`,checked:i,defaultChecked:o=!1,onChange:u,disabled:c=!1,name:d,value:p,form:n,...j}=s,m=y.useContext(be),f=y.useRef(null),h=is(f,a,m===null?null:m.setSwitch),[P,S]=ps(i,u,o),D=le(()=>S==null?void 0:S(!P)),N=le(_=>{if(us(_.currentTarget))return _.preventDefault();_.preventDefault(),D()}),k=le(_=>{_.key===Te.Space?(_.preventDefault(),D()):_.key===Te.Enter&&fs(_.currentTarget)}),w=le(_=>_.preventDefault()),R=y.useMemo(()=>({checked:P}),[P]),pe={id:l,ref:h,role:"switch",type:rs(s,f),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:c,onClick:N,onKeyUp:k,onKeyPress:w},fe=os();return y.useEffect(()=>{var _;let b=(_=f.current)==null?void 0:_.closest("form");b&&o!==void 0&&fe.addEventListener(b,"reset",()=>{S(o)})},[f,S]),J.createElement(J.Fragment,null,d!=null&&P&&J.createElement(cs,{features:ms.Hidden,...ds({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:c,form:n,checked:P,name:d,value:p})}),Ee({ourProps:pe,theirProps:j,slot:R,defaultTag:vs,name:"Switch"}))}let ys=ts(gs),ws=js,he=Object.assign(ys,{Group:ws,Label:Qe,Description:Je});function bs(){const s=O(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(F,{variant:I.Warning,children:e.jsx($,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(F.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ye,{className:"w-5 text-warning-500"}):e.jsx(we,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx($.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(F.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ns(s=0){return y.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function ks({run:s,apply:a,cancel:t,reset:r}){const l=Me(),{change_categorization:i}=Z(),o=O(b=>b.modules),u=O(b=>b.environment),c=O(b=>b.environments),d=O(b=>b.addConfirmation),p=O(b=>b.setShowConfirmation),n=x(b=>b.planAction),j=x(b=>b.planOverview),m=x(b=>b.planApply),f=x(b=>b.planCancel),h=Ns();function P(b){b.stopPropagation(),r()}function S(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const Oe=u.isProd&&C(u.isInitial),ke=Array.from(i.values()).some(Ie=>B(Ie.category));Oe?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:ke?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${c.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[c.size>1&&e.jsx(es,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{p(!1)},size:T.md}),e.jsx(ss,{className:"w-full",size:T.md,onAdd:()=>{p(!1)}})]})]})}):ke?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const w=j.isFailed||m.isFailed||f.isSuccessful,R=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(w),pe=n.isApplying||f.isCancelling||m.isRunning&&j.isFinished,fe=w||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),_=o.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(ee,{appear:!0,show:R,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:R&&e.jsx(te,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:h,variant:f.isSuccessful?I.Danger:I.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[z.RunningTask,z.Running,z.Run,z.Applying,z.ApplyBackfill,z.ApplyVirtual,z.ApplyChangesAndBackfill,z.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[pe&&e.jsx(te,{onClick:S,variant:I.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[z.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),fe&&e.jsx(te,{onClick:P,variant:I.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),_&&e.jsx(te,{onClick:D,variant:I.Info,children:"Go Back"})]})]})})}function Ps({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:o}){return e.jsxs(he.Group,{as:"div",className:"m-1",children:[e.jsxs(he,{checked:i?!1:a,onChange:t,className:g("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",o,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:g("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(he.Label,{className:g("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function K({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:g("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(Ps,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ts({disabled:s=!1,className:a}){const t=ge(),{start:r,end:l,isInitialPlanRun:i}=Z();return e.jsxs("div",{className:g("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(q,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2023-12-13",value:r,onInput:c=>{c.stopPropagation(),t({type:E.DateStart,start:c.target.value})}})}),e.jsx(q,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2022-12-13",value:l,onInput:c=>{c.stopPropagation(),t({type:E.DateEnd,end:c.target.value})}})})]})}function Cs(){const s=ge(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:o,restate_models:u,isInitialPlanRun:c,create_from:d,include_unmodified:p}=Z(),n=y.useRef(null),j=x(N=>N.planAction),m=x(N=>N.planOverview),f=x(N=>N.planApply),h=O(N=>N.environment),P=O(N=>N.environments),S=Pe.getOnlyRemote(Array.from(P));y.useEffect(()=>{s({type:E.PlanOptions,...m.plan_options,skip_tests:!1})},[]);const D=j.isProcessing||j.isDone||f.isFinished||m.isLatest&&C(j.isRun)||m.isVirtualUpdate;return y.useEffect(()=>{var N;B(n.current)||j.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,j]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:g(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ts,{className:g(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(F,{children:e.jsx($,{defaultOpen:j.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{ref:n,className:g("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(F.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ye,{className:"h-5 w-5 text-neutral-400"}):e.jsx(we,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs($.Panel,{unmount:!1,className:g("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:g(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(h.isProd)&&e.jsx(q,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:S.length<2,children:({className:k,disabled:w})=>e.jsx(q.Selector,{className:g(k,"w-full"),list:Pe.getOnlyRemote(Array.from(P)).filter(R=>R!==h).map(R=>({value:R.name,text:R.name})),onChange:R=>{s({type:E.PlanOptions,create_from:R})},value:d,disabled:w})}),e.jsx(q,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
2
2
  downstream from the one specified. For production
3
3
  environment, all related model versions will have
4
4
  their intervals wiped, but only the current
@@ -7,4 +7,4 @@ import{r as y,R as J,a as O,j as e,n as I,t as Me,b as C,B as te,w as B,m as T,c
7
7
  be affected`,children:({className:k})=>e.jsx(q.Textfield,{className:g(k,"w-full"),placeholder:"project.model1, project.model2",disabled:c,value:u??"",onInput:w=>{w.stopPropagation(),s({type:E.PlanOptions,restate_models:w.target.value})}})})]})}),e.jsxs("div",{className:g("flex flex-wrap md:flex-nowrap w-full mt-3",D&&"pointer-events-none"),children:[e.jsxs("div",{className:"w-full md:mr-2",children:[e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"Skip Tests",info:`Skip tests prior to generating the plan if they
8
8
  are defined`,enabled:!!a,setEnabled:k=>{s({type:E.PlanOptions,skip_tests:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"No Gaps",info:`Ensure that new snapshots have no data gaps when
9
9
  comparing to existing snapshots for matching
10
- models in the target environment`,enabled:!!t||!!r&&h.isInitialProd||h.isInitialProd,disabled:c||!!r&&h.isInitialProd||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,no_gaps:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"Skip Backfill",info:"Skip the backfill step",enabled:!!r,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,skip_backfill:k})}})})]}),e.jsxs("div",{className:"w-full md:ml-2",children:[e.jsxs("div",{className:"block my-2",children:[e.jsx(K,{label:"Include Unmodified",info:"Indicates whether to create views for all models in the target development environment or only for modified ones",enabled:!!p,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,include_unmodified:k})}}),e.jsx(K,{label:"Forward Only",info:"Create a plan for forward-only changes",enabled:!!l,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,forward_only:k})}})]}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"Auto Apply",info:"Automatically apply the plan after it is generated",enabled:!!i,setEnabled:k=>{s({type:E.PlanOptions,auto_apply:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"No Auto Categorization",info:"Set category manually",enabled:!!o,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,no_auto_categorization:k})}})})]})]})]})]})},String(j.isRun))})})]})}function As(s){const{start:a,end:t,skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:o,include_unmodified:u,no_auto_categorization:c,restate_models:d,auto_apply:p,create_from:n,change_categorization:j}=Z(),m=O(D=>D.environment),f=B(m==null?void 0:m.isDefault)||V(m==null?void 0:m.isDefault),h=y.useMemo(()=>{if(!m.isProd)return{start:a,end:f&&ze(d)?void 0:t}},[m,a,t,f,d]),P=y.useMemo(()=>m.isInitialProd?{include_unmodified:!0,no_gaps:!0,skip_tests:r,auto_apply:p}:{skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:o,create_from:n,no_auto_categorization:c,restate_models:d,include_unmodified:u,auto_apply:p},[m,l,i,o,u,n,c,r,d,p]),S=y.useMemo(()=>Array.from(j.values()).reduce((D,{category:N,change:k})=>(D[k.displayName]=(N==null?void 0:N.value)??ie.NUMBER_1,D),{}),[j]);return{planOptions:{...P,...s},planDates:h,categories:S}}function Fs(){const{start:s,end:a,skip_tests:t,no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:o,no_auto_categorization:u,restate_models:c,create_from:d,change_categorization:p}=Z(),n=O(h=>h.environment),j=B(n==null?void 0:n.isDefault)||V(n==null?void 0:n.isDefault),m=y.useMemo(()=>{if(!j)return{start:s,end:a}},[s,a,j]),f=y.useMemo(()=>Array.from(p.values()).reduce((h,{category:P,change:S})=>(h[S.displayName]=(P==null?void 0:P.value)??ie.NUMBER_1,h),{}),[p]);return{planDates:m,planOptions:{no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:o,create_from:d,no_auto_categorization:u,skip_tests:t,restate_models:c},categories:f}}function X(s,a,t){var o;const r=(s.isFinished&&(a.isLatest||a.isRunning)||t.isFinished||C((o=s.overview)==null?void 0:o.isFailed))&&M(s.overview),l=r?s.overview:a,i=r?s:a;return{meta:i.meta,start:i.start,end:i.end,hasChanges:l.hasChanges,hasBackfills:l.hasBackfills,backfills:i.backfills??[],added:i.added??[],removed:i.removed??[],direct:i.direct??[],indirect:i.indirect??[],metadata:i.metadata??[],plan_options:i.plan_options,stageValidation:i.stageValidation,stageBackfills:i.stageBackfills,stageChanges:i.stageChanges,isFailed:l.isFailed||t.isFailed||s.isFailed}}const Ce=3;function se({progress:s=0,delay:a=0,duration:t=0,startFromZero:r=!0,className:l}){return C(r)&&(s=s<Ce?Ce:s),e.jsx("div",{className:g("w-full h-1 bg-neutral-30 overflow-hidden flex items-center rounded-lg my-1",l),children:e.jsx("div",{className:"transition-[width] h-full bg-success-500 rounded-lg",style:{width:`${s}%`,transitionDelay:`${a}ms`,transitionDuration:`${t}ms`}})})}const v=function({children:a,setRefTasksOverview:t,tasks:r}){const{models:l,taskCompleted:i,taskTotal:o,batchesTotal:u,batchesCompleted:c}=y.useMemo(()=>{const d=Object.values(r),p=d.length;let n=0,j=0,m=0;return d.forEach(f=>{n=f.completed===f.total?n+1:n,j+=f.total,m+=f.completed}),{models:d,taskCompleted:n,taskTotal:p,batchesTotal:j,batchesCompleted:m}},[r]);return e.jsx("div",{className:"text-prose",ref:t,children:a({models:l,completed:i,total:o,totalBatches:u,completedBatches:c})})};function Ss({className:s,headline:a,environment:t,completed:r,total:l,updatedAt:i,updateType:o,completedBatches:u,totalBatches:c}){return e.jsx(Ne,{className:s,children:e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:e.jsx(_e,{headline:a,environment:t})}),e.jsxs(me,{children:[e.jsx(ae,{completed:r,total:l,unit:"task"}),e.jsx(ne,{}),e.jsx(ae,{completed:u,total:c,unit:"batches"}),e.jsx(ne,{}),e.jsx(ue,{completed:u,total:c})]})]}),e.jsx(se,{progress:Q(u,c)}),M(i)&&e.jsx(Rs,{updatedAt:i,updateType:o})]})})}function Ds({models:s,className:a,added:t,removed:r,direct:l,indirect:i,metadata:o,showBatches:u=!0,showProgress:c=!0,showVirtualUpdate:d=!1,queue:p}){return e.jsxs(e.Fragment,{children:[e.jsx(ee,{show:H(p),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:e.jsxs("div",{className:"px-4 pt-3 pb-2 mt-4 shadow-lg rounded-lg",children:[e.jsx(Re,{text:"Currently in proccess"}),e.jsx(ve,{models:p,children:n=>e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsxs(de,{children:[H(n.interval)&&e.jsx(Ae,{start:n.interval[0],end:n.interval[1]}),e.jsx(Se,{modelName:n.displayViewName,changeType:De({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:o})})]}),e.jsxs(me,{children:[u&&e.jsx(ae,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(ne,{}),c&&e.jsx(e.Fragment,{children:B(n.end)||B(n.start)?e.jsx(ue,{total:n.total,completed:n.completed}):e.jsx(Fe,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),c?e.jsx(se,{startFromZero:!1,progress:Q(n.completed,n.total)}):e.jsx(re,{className:"my-1 border-neutral-200 opacity-50"})]})})]})}),e.jsx(Ne,{className:a,children:e.jsx(ve,{models:s,children:n=>e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsxs(de,{children:[H(n.interval)&&e.jsx(Ae,{start:n.interval[0],end:n.interval[1]}),e.jsx(Se,{modelName:n.displayViewName,changeType:De({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:o})})]}),e.jsxs(me,{children:[u&&e.jsx(ae,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(ne,{}),c&&e.jsx(e.Fragment,{children:B(n.end)||B(n.start)?e.jsx(ue,{total:n.total,completed:n.completed}):e.jsx(Fe,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),c?e.jsx(se,{progress:Q(n.completed,n.total),startFromZero:p.findIndex(j=>j.name===n.name)===-1}):e.jsx(re,{className:"my-1 border-neutral-200 opacity-50"})]})})})]})}function Ne({className:s,children:a}){return e.jsx("div",{className:g("max-h-[50vh] overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a})}function oe({className:s,children:a}){return e.jsx("div",{className:g("px-2",s),children:a})}function ve({className:s,models:a,children:t}){return e.jsx("ul",{className:g("rounded-lg pt-4 overflow-auto text-prose hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a.map(r=>e.jsx("li",{className:"mb-2",children:t(r)},r.name))})}function ce({className:s,children:a}){return e.jsx("div",{className:g("flex sm:justify-between sm:items-baseline text-xs",s),children:a})}function _e({className:s,headline:a,environment:t}){return e.jsxs("span",{className:g("flex items-center",s),children:[e.jsx("span",{className:"block whitespace-nowrap text-sm font-medium",children:a}),M(t)&&e.jsx("small",{className:"inline-block ml-1 px-2 py-[0.125rem] text-xs font-bold bg-neutral-10 rounded-md",children:t})]})}function de({className:s,children:a}){return e.jsx("div",{className:g("flex mr-6 w-full sm:w-auto overflow-hidden",s),children:a})}function me({className:s,children:a}){return e.jsx("div",{className:g("flex items-center",s),children:a})}function Ae({className:s,start:a,end:t}){return e.jsxs("span",{className:g("inline-block mr-2 whitespace-nowrap font-mono",s),children:[a," – ",t]})}function ae({className:s,total:a,completed:t,unit:r}){return e.jsxs("span",{className:g("inline-block whitespace-nowrap",s),children:[t," of ",a," ",ns(r,a)]})}function ne({className:s}){return e.jsx("span",{className:g("inline-block mx-2",s),children:"|"})}function ue({className:s,total:a,completed:t}){return e.jsxs("span",{className:g("inline-block whitespace-nowrap font-bold",s),children:[Math.ceil(Q(t,a)),"%"]})}function Fe({className:s,start:a,end:t}){return e.jsx("span",{className:g("inline-block whitespace-nowrap font-bold",s),children:`${Math.floor((t-a)/6e4)}:${String(Math.ceil((t-a)/1e3%60)).padStart(2,"0")}`})}function Rs({updateType:s,updatedAt:a}){return e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Update Type:"}),e.jsx("span",{className:"inline-block ml-1",children:s})]}),e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Last Update:"}),e.jsx("span",{className:"inline-block ml-1",children:xe(new Date(a),"yyyy-mm-dd hh-mm-ss",!1)})]})]})}function Se({className:s,modelName:a,changeType:t}){return e.jsx("span",{className:g("font-bold whitespace-nowrap",t===A.Add&&"text-success-600 dark:text-success-500",t===A.Remove&&"text-danger-500",t===A.Direct&&"text-secondary-500 dark:text-primary-500",t===A.Indirect&&"text-warning-500",t===A.Default&&"text-prose",s),children:a})}v.Block=Ne;v.Summary=Ss;v.Details=Ds;v.DetailsProgress=me;v.Task=oe;v.Tasks=ve;v.TaskDetails=ce;v.TaskProgress=ue;v.TaskSize=ae;v.TaskDivider=ne;v.TaskInfo=de;v.TaskHeadline=_e;function De({modelName:s,added:a,removed:t,direct:r,indirect:l,metadata:i}){return a.some(o=>o.name===s)?A.Add:t.some(o=>o.name===s)?A.Remove:r.some(o=>o.name===s)?A.Direct:l.some(o=>o.name===s)?A.Indirect:i.some(o=>o.name===s)?A.Metadata:A.Default}function Es({report:s}){var a;return e.jsxs("div",{children:[e.jsxs("div",{className:"py-2",children:[e.jsxs("p",{children:["Total: ",s.total]}),e.jsxs("p",{children:["Succeeded: ",s.successful]}),e.jsxs("p",{children:["Failed: ",s.failures]}),e.jsxs("p",{children:["Errors: ",s.errors]}),e.jsxs("p",{children:["Dialect: ",s.dialect]})]}),e.jsx("ul",{children:(a=s.details)==null?void 0:a.map(t=>e.jsxs("li",{className:"flex mb-1",children:[e.jsx("span",{className:"inline-block mr-4",children:"—"}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("span",{className:"inline-block mb-2",children:t.message}),e.jsx("code",{className:"inline-block max-h-[50vh] bg-theme py-2 px-4 rounded-lg w-full overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.jsx("pre",{children:t.details})})]})]},t.message))})]})}function Bs(){var f;const s=Be(h=>h.tests),a=x(h=>h.planApply),t=x(h=>h.planOverview),r=x(h=>h.planCancel),l=x(h=>h.planAction),{plan_options:i,hasChanges:o,hasBackfills:u,isFailed:c}=X(a,t,r),d=M(s)&&!!s.total,p=M(s)&&!!s.message&&C(d),n=M(s)&&(!!s.failures||!!s.errors),j=C(l.isProcessing)&&C(l.isDone)&&C(r.isFinished),m=c&&[n,d,o,u].every(Ue);return e.jsx(ee,{appear:!0,show:C(l.isRun),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:g("my-2 rounded-xl",c&&"bg-danger-5"),children:m?e.jsxs(F,{className:"flex items-center",size:T.sm,variant:I.Danger,children:[e.jsx(je,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}):e.jsxs(e.Fragment,{children:[c&&e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,variant:I.Danger,children:[e.jsx(je,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}),V(i==null?void 0:i.skip_tests)?e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Tests Skipped"})]}):d?e.jsx(Ms,{isOpen:!0,report:s}):p?e.jsx(Is,{report:s}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Tests"})]}),C(n)&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{isOpen:j}),e.jsx(Os,{isOpen:j}),e.jsx(Gs,{}),a.shouldShowEvaluation&&e.jsxs(zs,{start:a.evaluationStart,end:a.isFinished?a.evaluationEnd??((f=r.meta)==null?void 0:f.end):void 0,children:[e.jsx(Us,{}),e.jsx(Ls,{}),e.jsx($s,{}),e.jsx(Vs,{})]})]})]})})}function _s({isOpen:s=!1}){var d;const a=x(p=>p.planApply),t=x(p=>p.planOverview),r=x(p=>p.planCancel),{meta:l,stageChanges:i,hasChanges:o}=X(a,t,r),u=(i==null?void 0:i.meta)??l;return Le([U.init,U.fail],(d=i==null?void 0:i.meta)==null?void 0:d.status)||V(o)?e.jsx(G,{meta:u,states:["Changes","Failed Getting Changes","Getting Changes..."],isOpen:s&&V(o),panel:e.jsx(Hs,{})}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Changes"})]})}function Os({isOpen:s=!1}){const{change_categorization:a}=Z(),t=x(m=>m.planApply),r=x(m=>m.planOverview),l=x(m=>m.planCancel),{meta:i,stageBackfills:o,backfills:u,hasBackfills:c}=X(t,r,l),d=(o==null?void 0:o.meta)??i,p=y.useMemo(()=>Array.from(a.values()).reduce((m,{category:f,change:h})=>{var P;return(f==null?void 0:f.value)!==ie.NUMBER_3&&m.add(h.name),(B(f)||f.value===ie.NUMBER_1)&&((P=h.indirect)==null||P.forEach(S=>m.add(S.name))),m},new Set),[a]),n=y.useMemo(()=>a.size>0?u.filter(m=>p.has(m.name)):u,[u,p]);return((d==null?void 0:d.status)===U.init||V(c))&&(a.size>0?n.length>0:!0)?e.jsx(G,{meta:d,states:["Backfills","Failed Getting Backfills","Getting Backfills..."],isOpen:s&&V(c),panel:e.jsx(L,{headline:`Models ${n.length}`,type:A.Default,children:e.jsx(L.Default,{type:A.Default,changes:n})})}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Backfills"})]})}function Is({report:s}){return e.jsx(G,{meta:{status:U.success,...s},states:["Tests Completed","Failed Tests","Running Tests..."],children:s.message})}function Ms({report:s,isOpen:a=!1}){return e.jsx(G,{variant:I.Danger,meta:{status:U.fail,...s},isOpen:a,states:["Tests Failed","One or More Tests Failed","Running Tests..."],shouldCollapse:!1,children:e.jsx(Es,{report:s})})}function zs({start:s,end:a,children:t}){const r=y.useRef(null);return y.useEffect(()=>{setTimeout(()=>{var l;(l=r.current)==null||l.scrollIntoView({behavior:"smooth",block:"start"})},500)},[]),B(s)?e.jsx(e.Fragment,{}):e.jsxs("div",{ref:r,className:"pt-4 pb-2 text-xs",children:[e.jsxs("span",{className:"text-neutral-500 block px-4 mb-1",children:["Evaluation started at"," ",xe(new Date(s),"yyyy-mm-dd hh-mm-ss")]}),e.jsx(re,{}),e.jsx("div",{className:"py-2",children:t}),M(a)&&e.jsxs(e.Fragment,{children:[e.jsx(re,{}),e.jsxs("span",{className:"text-neutral-500 block px-4 mt-1",children:["Evaluation stopped at"," ",xe(new Date(a),"yyyy-mm-dd hh-mm-ss")]})]})]})}function Us({isOpen:s}){var t;const a=x(r=>r.planApply);return B(a.stageCreation)?e.jsx(e.Fragment,{}):e.jsx(G,{meta:(t=a.stageCreation)==null?void 0:t.meta,states:["Snapshot Tables Created","Snapshot Tables Creation Failed","Creating Snapshot Tables..."],isOpen:s,children:e.jsx(v.Block,{children:e.jsxs(v.Task,{children:[e.jsxs(v.TaskDetails,{children:[e.jsx(v.TaskInfo,{children:e.jsx(v.TaskHeadline,{headline:"Snapshot Tables"})}),e.jsxs(v.DetailsProgress,{children:[e.jsx(v.TaskSize,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks,unit:"task"}),e.jsx(v.TaskDivider,{}),e.jsx(v.TaskProgress,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks})]})]}),e.jsx(se,{progress:Q(a.stageCreation.num_tasks,a.stageCreation.total_tasks)})]})})})}function Ls(){var a;const s=x(t=>t.planApply);return B(s.stageRestate)?e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Models To Restate"})]}):e.jsx(G,{meta:(a=s.stageRestate)==null?void 0:a.meta,states:["Restate Models","Restate Models Failed","Restating Models..."]})}function $s(){const s=x(d=>d.planApply),a=x(d=>d.planAction),t=x(d=>d.planOverview),r=x(d=>d.planCancel),l=s.environment,i=s.stageBackfill,{backfills:o}=X(s,t,r),u=y.useMemo(()=>Object.values(s.tasks).reduce((d,p)=>{const n=o.find(j=>j.name===p.name);return p.interval=(n==null?void 0:n.interval)??[],d[p.name]=p,d},{}),[o,s.tasks]);return M(i)&&M(l)?e.jsx(G,{meta:i.meta,states:["Backfilled","Backfilling Failed","Backfilling Intervals..."],showDetails:!0,isOpen:!0,shouldCollapse:!1,children:e.jsx(v,{tasks:u,children:({total:d,completed:p,models:n,completedBatches:j,totalBatches:m})=>e.jsxs(e.Fragment,{children:[e.jsx(v.Summary,{headline:"Target Environment",environment:l,completed:p,total:d,completedBatches:j,totalBatches:m,updateType:a.isApplyVirtual?"Virtual":"Backfill"}),M(n)&&e.jsx(v.Details,{models:n,added:s.added,removed:s.removed,direct:s.direct,indirect:s.indirect,metadata:s.metadata,queue:s.queue,showBatches:!0,showVirtualUpdate:a.isApplyVirtual,showProgress:!0})]})})}):e.jsx(e.Fragment,{})}function Vs(){var a;const s=x(t=>t.planApply);return B(s.stagePromote)?e.jsx(e.Fragment,{}):e.jsx("div",{children:e.jsx(G,{meta:(a=s.stagePromote)==null?void 0:a.meta,states:["Environment Promoted","Promotion Failed","Promoting Environment..."],children:e.jsx(v.Block,{children:e.jsxs(v.Task,{children:[e.jsxs(v.TaskDetails,{children:[e.jsx(v.TaskInfo,{children:e.jsx(v.TaskHeadline,{headline:`Promote Environment: ${s.stagePromote.target_environment}`})}),e.jsxs(v.DetailsProgress,{children:[e.jsx(v.TaskSize,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks,unit:"task"}),e.jsx(v.TaskDivider,{}),e.jsx(v.TaskProgress,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks})]})]}),e.jsx(se,{progress:Q(s.stagePromote.num_tasks,s.stagePromote.total_tasks)})]})})})})}function Gs(){var u;const{virtualUpdateDescription:s}=Z(),a=x(c=>c.planApply),t=x(c=>c.planOverview),r=x(c=>c.planCancel),{isFailed:l}=X(a,t,r),i=((u=a.overview)==null?void 0:u.isVirtualUpdate)??t.isVirtualUpdate,o=V(a.isFinished);return i&&C(l)?e.jsx(G,{meta:{status:U.success,done:o},states:[o?"Virtual Update Completed":"Virtual Update","Virtual Update Failed","Applying Virtual Update..."],children:s}):e.jsx(e.Fragment,{})}function Hs(){const s=x(n=>n.planAction),a=x(n=>n.planOverview),t=x(n=>n.planApply),r=x(n=>n.planCancel),{hasChanges:l,added:i,removed:o,direct:u,indirect:c,metadata:d}=X(t,a,r),p=s.isProcessing||s.isDone||t.isFinished||a.isLatest&&C(s.isRun)||a.isVirtualUpdate;return e.jsx("div",{className:"w-full my-2",children:V(l)&&e.jsxs(e.Fragment,{children:[H(i)&&e.jsx(L,{className:"w-full my-2",headline:"Added Models",type:A.Add,children:e.jsx(L.Default,{type:A.Add,changes:i})}),H(o)&&e.jsx(L,{className:"w-full my-2",headline:"Removed Models",type:A.Remove,children:e.jsx(L.Default,{type:A.Remove,changes:o})}),H(u)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Directly",type:A.Direct,children:e.jsx(L.Direct,{changes:u,disabled:p})}),H(c)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Indirectly",type:A.Indirect,children:e.jsx(L.Indirect,{changes:c})}),H(d)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Metadata",type:A.Default,children:e.jsx(L.Default,{type:A.Default,changes:d})})]})})}function G({meta:s,states:a=["Success","Failed","Running"],isOpen:t=!1,trigger:r,panel:l,children:i,showDetails:o=!0,shouldCollapse:u=!0}){const c=y.useRef(null),d=x(R=>R.planOverview),p=x(R=>R.planApply),n=(s==null?void 0:s.status)!==U.fail&&M(l)||M(i),[j,m]=y.useState(t);y.useEffect(()=>{var R;B(c.current)||u&&(p.isFinished||d.isLatest)&&c.current.classList.contains("--is-open")&&((R=c.current)==null||R.click())},[c,d,p,u]),y.useEffect(()=>{m(t&&n)},[t,n]);const f=(s==null?void 0:s.status)===U.fail,h=(s==null?void 0:s.status)===U.success,P=(s==null?void 0:s.status)===U.init,S=h?I.Success:f?I.Danger:I.Info,[D,N,k]=a,w=h?D:f?N:k;return e.jsx(ee,{appear:!0,show:M(s),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"my-2",children:e.jsxs($,{children:[e.jsx(F,{className:"mb-1",variant:S,size:T.sm,hasBackground:!1,hasBackgroundOnHover:n,children:e.jsx($.Button,{ref:c,className:g("w-full flex flex-col",j&&"--is-open",C(n)&&"cursor-default"),onClick:()=>m(R=>!R),children:B(r)?e.jsxs(e.Fragment,{children:[P&&e.jsx($e,{text:w,hasSpinner:!0,size:T.sm,variant:I.Primary,className:"w-full"}),C(P)&&e.jsxs("div",{className:"flex items-center h-full",children:[o&&n?e.jsx(e.Fragment,{children:j?e.jsx(ye,{className:"w-4 mr-2"}):e.jsx(we,{className:"w-4 mr-2"})}):e.jsxs(e.Fragment,{children:[(s==null?void 0:s.status)===U.success&&e.jsx(W,{className:"min-w-4 max-w-4 mr-2"}),(s==null?void 0:s.status)===U.fail&&e.jsx(je,{className:"min-w-4 max-w-4 mr-2"})]}),e.jsx(F.Label,{className:"mr-2 text-sm",children:e.jsx(Re,{text:w,size:T.sm,variant:S})})]})]}):r})}),e.jsx(ee,{appear:!0,show:j,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:e.jsxs($.Panel,{static:!0,className:"px-2 text-xs mb-2",children:[M(i)&&e.jsx("div",{className:g("p-4 rounded-md",S===I.Danger?"bg-danger-5 text-danger-500":"bg-neutral-5"),children:i}),(s==null?void 0:s.status)!==U.fail&&l]})})]})})}function qs(){const s=ge(),{clearErrors:a}=Ve(),t=O(w=>w.environment),r=x(w=>w.planAction),l=x(w=>w.setPlanAction),i=x(w=>w.resetPlanTrackers),o=x(w=>w.resetPlanCancel),u=x(w=>w.clearPlanApply),c=Be(w=>w.setTests),d=As(),p=Fs(),{refetch:n,cancel:j}=Ge(t.name,d),{refetch:m,cancel:f}=He(t.name,p),{refetch:h}=qe();function P(){a(),s([{type:E.ResetPlanDates},{type:E.ResetPlanOptions},{type:E.ResetTestsReport},{type:E.ResetCategories}])}function S(){l(new Y({value:z.Run})),u(),P(),setTimeout(()=>i(),500)}function D(){l(new Y({value:z.Cancelling})),o(),s([{type:E.ResetTestsReport}]);let w;r.isApplying?w=j:w=f,w(),h()}function N(){l(new Y({value:z.Applying})),u(),s([{type:E.ResetTestsReport}]),m().catch(console.log)}function k(){l(new Y({value:z.Running})),i(),c(void 0),s([{type:E.ResetTestsReport}]),n().catch(console.log)}return e.jsxs("div",{className:"flex flex-col w-full h-full max-w-[80rem]",children:[t.isProd&&e.jsx(bs,{}),e.jsxs("div",{className:"relative w-full h-full flex flex-col pt-2 pl-4 pr-2 overflow-y-scroll hover:scrollbar scrollbar--vertical",children:[e.jsx(Cs,{}),e.jsx(Bs,{})]}),e.jsx(ks,{apply:N,run:k,cancel:D,reset:S})]})}function ua(){const{environmentName:s}=Ke(),a=O(l=>l.environment),t=O(l=>l.environments),r=O(l=>l.setEnvironment);return y.useEffect(()=>{if(a.isInitialProd||s===a.name)return;const l=Array.from(t).find(i=>i.name===s);B(l)||r(l)},[s]),e.jsx(as,{children:B(a)?e.jsx(Ze,{link:Ye.Plan,description:B(s)?void 0:`Environment ${s} Does Not Exist`,message:"Back To Data Catalog"}):e.jsx(qs,{})})}export{ua as default};
10
+ models in the target environment`,enabled:!!t||!!r&&h.isInitialProd||h.isInitialProd,disabled:c||!!r&&h.isInitialProd||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,no_gaps:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"Skip Backfill",info:"Skip the backfill step",enabled:!!r,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,skip_backfill:k})}})})]}),e.jsxs("div",{className:"w-full md:ml-2",children:[e.jsxs("div",{className:"block my-2",children:[e.jsx(K,{label:"Include Unmodified",info:"Indicates whether to create views for all models in the target development environment or only for modified ones",enabled:!!p,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,include_unmodified:k})}}),e.jsx(K,{label:"Forward Only",info:"Create a plan for forward-only changes",enabled:!!l,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,forward_only:k})}})]}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"Auto Apply",info:"Automatically apply the plan after it is generated",enabled:!!i,setEnabled:k=>{s({type:E.PlanOptions,auto_apply:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(K,{label:"No Auto Categorization",info:"Set category manually",enabled:!!o,disabled:c||h.isInitialProd,setEnabled:k=>{s({type:E.PlanOptions,no_auto_categorization:k})}})})]})]})]})]})},String(j.isRun))})})]})}function As(s){const{start:a,end:t,skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:o,include_unmodified:u,no_auto_categorization:c,restate_models:d,auto_apply:p,create_from:n,change_categorization:j}=Z(),m=O(D=>D.environment),f=B(m==null?void 0:m.isDefault)||V(m==null?void 0:m.isDefault),h=y.useMemo(()=>{if(!m.isProd)return{start:a,end:f&&ze(d)?void 0:t}},[m,a,t,f,d]),P=y.useMemo(()=>m.isInitialProd?{include_unmodified:!0,no_gaps:!0,skip_tests:r,auto_apply:p}:{skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:o,create_from:n,no_auto_categorization:c,restate_models:d,include_unmodified:u,auto_apply:p},[m,l,i,o,u,n,c,r,d,p]),S=y.useMemo(()=>Array.from(j.values()).reduce((D,{category:N,change:k})=>(D[k.displayName]=(N==null?void 0:N.value)??ie.NUMBER_1,D),{}),[j]);return{planOptions:{...P,...s},planDates:h,categories:S}}function Fs(){const{start:s,end:a,skip_tests:t,no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:o,no_auto_categorization:u,restate_models:c,create_from:d,change_categorization:p}=Z(),n=O(h=>h.environment),j=B(n==null?void 0:n.isDefault)||V(n==null?void 0:n.isDefault),m=y.useMemo(()=>{if(!j)return{start:s,end:a}},[s,a,j]),f=y.useMemo(()=>Array.from(p.values()).reduce((h,{category:P,change:S})=>(h[S.displayName]=(P==null?void 0:P.value)??ie.NUMBER_1,h),{}),[p]);return{planDates:m,planOptions:{no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:o,create_from:d,no_auto_categorization:u,skip_tests:t,restate_models:c},categories:f}}function X(s,a,t){var o;const r=(s.isFinished&&(a.isLatest||a.isRunning)||t.isFinished||C((o=s.overview)==null?void 0:o.isFailed))&&M(s.overview),l=r?s.overview:a,i=r?s:a;return{meta:i.meta,start:i.start,end:i.end,hasChanges:l.hasChanges,hasBackfills:l.hasBackfills,backfills:i.backfills??[],added:i.added??[],removed:i.removed??[],direct:i.direct??[],indirect:i.indirect??[],metadata:i.metadata??[],plan_options:i.plan_options,stageValidation:i.stageValidation,stageBackfills:i.stageBackfills,stageChanges:i.stageChanges,isFailed:l.isFailed||t.isFailed||s.isFailed}}const Ce=3;function se({progress:s=0,delay:a=0,duration:t=0,startFromZero:r=!0,className:l}){return C(r)&&(s=s<Ce?Ce:s),e.jsx("div",{className:g("w-full h-1 bg-neutral-30 overflow-hidden flex items-center rounded-lg my-1",l),children:e.jsx("div",{className:"transition-[width] h-full bg-success-500 rounded-lg",style:{width:`${s}%`,transitionDelay:`${a}ms`,transitionDuration:`${t}ms`}})})}const v=function({children:a,setRefTasksOverview:t,tasks:r}){const{models:l,taskCompleted:i,taskTotal:o,batchesTotal:u,batchesCompleted:c}=y.useMemo(()=>{const d=Object.values(r),p=d.length;let n=0,j=0,m=0;return d.forEach(f=>{n=f.completed===f.total?n+1:n,j+=f.total,m+=f.completed}),{models:d,taskCompleted:n,taskTotal:p,batchesTotal:j,batchesCompleted:m}},[r]);return e.jsx("div",{className:"text-prose",ref:t,children:a({models:l,completed:i,total:o,totalBatches:u,completedBatches:c})})};function Ss({className:s,headline:a,environment:t,completed:r,total:l,updatedAt:i,updateType:o,completedBatches:u,totalBatches:c}){return e.jsx(Ne,{className:s,children:e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:e.jsx(_e,{headline:a,environment:t})}),e.jsxs(me,{children:[e.jsx(ae,{completed:r,total:l,unit:"task"}),e.jsx(ne,{}),e.jsx(ae,{completed:u,total:c,unit:"batches"}),e.jsx(ne,{}),e.jsx(ue,{completed:u,total:c})]})]}),e.jsx(se,{progress:Q(u,c)}),M(i)&&e.jsx(Rs,{updatedAt:i,updateType:o})]})})}function Ds({models:s,className:a,added:t,removed:r,direct:l,indirect:i,metadata:o,showBatches:u=!0,showProgress:c=!0,showVirtualUpdate:d=!1,queue:p}){return e.jsxs(e.Fragment,{children:[e.jsx(ee,{show:H(p),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:e.jsxs("div",{className:"px-4 pt-3 pb-2 mt-4 shadow-lg rounded-lg",children:[e.jsx(Re,{text:"Currently in proccess"}),e.jsx(ve,{models:p,children:n=>e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsxs(de,{children:[H(n.interval)&&e.jsx(Ae,{start:n.interval[0],end:n.interval[1]}),e.jsx(Se,{modelName:n.displayViewName,changeType:De({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:o})})]}),e.jsxs(me,{children:[u&&e.jsx(ae,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(ne,{}),c&&e.jsx(e.Fragment,{children:B(n.end)||B(n.start)?e.jsx(ue,{total:n.total,completed:n.completed}):e.jsx(Fe,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),c?e.jsx(se,{startFromZero:!1,progress:Q(n.completed,n.total)}):e.jsx(re,{className:"my-1 border-neutral-200 opacity-50"})]})})]})}),e.jsx(Ne,{className:a,children:e.jsx(ve,{models:s,children:n=>e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsxs(de,{children:[H(n.interval)&&e.jsx(Ae,{start:n.interval[0],end:n.interval[1]}),e.jsx(Se,{modelName:n.displayViewName,changeType:De({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:o})})]}),e.jsxs(me,{children:[u&&e.jsx(ae,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(ne,{}),c&&e.jsx(e.Fragment,{children:B(n.end)||B(n.start)?e.jsx(ue,{total:n.total,completed:n.completed}):e.jsx(Fe,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),c?e.jsx(se,{progress:Q(n.completed,n.total),startFromZero:p.findIndex(j=>j.name===n.name)===-1}):e.jsx(re,{className:"my-1 border-neutral-200 opacity-50"})]})})})]})}function Ne({className:s,children:a}){return e.jsx("div",{className:g("max-h-[50vh] overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a})}function oe({className:s,children:a}){return e.jsx("div",{className:g("px-2",s),children:a})}function ve({className:s,models:a,children:t}){return e.jsx("ul",{className:g("rounded-lg pt-4 overflow-auto text-prose hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a.map(r=>e.jsx("li",{className:"mb-2",children:t(r)},r.name))})}function ce({className:s,children:a}){return e.jsx("div",{className:g("flex sm:justify-between sm:items-baseline text-xs",s),children:a})}function _e({className:s,headline:a,environment:t}){return e.jsxs("span",{className:g("flex items-center",s),children:[e.jsx("span",{className:"block whitespace-nowrap text-sm font-medium",children:a}),M(t)&&e.jsx("small",{className:"inline-block ml-1 px-2 py-[0.125rem] text-xs font-bold bg-neutral-10 rounded-md",children:t})]})}function de({className:s,children:a}){return e.jsx("div",{className:g("flex mr-6 w-full sm:w-auto overflow-hidden",s),children:a})}function me({className:s,children:a}){return e.jsx("div",{className:g("flex items-center",s),children:a})}function Ae({className:s,start:a,end:t}){return e.jsxs("span",{className:g("inline-block mr-2 whitespace-nowrap font-mono",s),children:[a," – ",t]})}function ae({className:s,total:a,completed:t,unit:r}){return e.jsxs("span",{className:g("inline-block whitespace-nowrap",s),children:[t," of ",a," ",ns(r,a)]})}function ne({className:s}){return e.jsx("span",{className:g("inline-block mx-2",s),children:"|"})}function ue({className:s,total:a,completed:t}){return e.jsxs("span",{className:g("inline-block whitespace-nowrap font-bold",s),children:[Math.ceil(Q(t,a)),"%"]})}function Fe({className:s,start:a,end:t}){return e.jsx("span",{className:g("inline-block whitespace-nowrap font-bold",s),children:`${Math.floor((t-a)/6e4)}:${String(Math.ceil((t-a)/1e3%60)).padStart(2,"0")}`})}function Rs({updateType:s,updatedAt:a}){return e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Update Type:"}),e.jsx("span",{className:"inline-block ml-1",children:s})]}),e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Last Update:"}),e.jsx("span",{className:"inline-block ml-1",children:xe(new Date(a),"yyyy-mm-dd hh-mm-ss",!1)})]})]})}function Se({className:s,modelName:a,changeType:t}){return e.jsx("span",{className:g("font-bold whitespace-nowrap",t===A.Add&&"text-success-600 dark:text-success-500",t===A.Remove&&"text-danger-500",t===A.Direct&&"text-secondary-500 dark:text-primary-500",t===A.Indirect&&"text-warning-500",t===A.Default&&"text-prose",s),children:a})}v.Block=Ne;v.Summary=Ss;v.Details=Ds;v.DetailsProgress=me;v.Task=oe;v.Tasks=ve;v.TaskDetails=ce;v.TaskProgress=ue;v.TaskSize=ae;v.TaskDivider=ne;v.TaskInfo=de;v.TaskHeadline=_e;function De({modelName:s,added:a,removed:t,direct:r,indirect:l,metadata:i}){return a.some(o=>o.name===s)?A.Add:t.some(o=>o.name===s)?A.Remove:r.some(o=>o.name===s)?A.Direct:l.some(o=>o.name===s)?A.Indirect:i.some(o=>o.name===s)?A.Metadata:A.Default}function Es({report:s}){var a;return e.jsxs("div",{children:[e.jsxs("div",{className:"py-2",children:[e.jsxs("p",{children:["Total: ",s.total]}),e.jsxs("p",{children:["Succeeded: ",s.successful]}),e.jsxs("p",{children:["Failed: ",s.failures]}),e.jsxs("p",{children:["Errors: ",s.errors]}),e.jsxs("p",{children:["Dialect: ",s.dialect]})]}),e.jsx("ul",{children:(a=s.details)==null?void 0:a.map(t=>e.jsxs("li",{className:"flex mb-1",children:[e.jsx("span",{className:"inline-block mr-4",children:"—"}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("span",{className:"inline-block mb-2",children:t.message}),e.jsx("code",{className:"inline-block max-h-[50vh] bg-theme py-2 px-4 rounded-lg w-full overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.jsx("pre",{children:t.details})})]})]},t.message))})]})}function Bs(){var f;const s=Be(h=>h.tests),a=x(h=>h.planApply),t=x(h=>h.planOverview),r=x(h=>h.planCancel),l=x(h=>h.planAction),{plan_options:i,hasChanges:o,hasBackfills:u,isFailed:c}=X(a,t,r),d=M(s)&&!!s.total,p=M(s)&&!!s.message&&C(d),n=M(s)&&(!!s.failures||!!s.errors),j=C(l.isProcessing)&&C(l.isDone)&&C(r.isFinished),m=c&&[n,d,o,u].every(Ue);return e.jsx(ee,{appear:!0,show:C(l.isRun),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:g("my-2 rounded-xl",c&&"bg-danger-5"),children:m?e.jsxs(F,{className:"flex items-center",size:T.sm,variant:I.Danger,children:[e.jsx(je,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}):e.jsxs(e.Fragment,{children:[c&&e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,variant:I.Danger,children:[e.jsx(je,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}),V(i==null?void 0:i.skip_tests)?e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"Tests Skipped"})]}):d?e.jsx(Ms,{isOpen:!0,report:s}):p?e.jsx(Is,{report:s}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Tests"})]}),C(n)&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{isOpen:j}),e.jsx(Os,{isOpen:j}),e.jsx(Gs,{}),a.shouldShowEvaluation&&e.jsxs(zs,{start:a.evaluationStart,end:a.isFinished?a.evaluationEnd??((f=r.meta)==null?void 0:f.end):void 0,children:[e.jsx(Us,{}),e.jsx(Ls,{}),e.jsx($s,{}),e.jsx(Vs,{})]})]})]})})}function _s({isOpen:s=!1}){var d;const a=x(p=>p.planApply),t=x(p=>p.planOverview),r=x(p=>p.planCancel),{meta:l,stageChanges:i,hasChanges:o}=X(a,t,r),u=(i==null?void 0:i.meta)??l;return Le([U.init,U.fail],(d=i==null?void 0:i.meta)==null?void 0:d.status)||V(o)?e.jsx(G,{meta:u,states:["Changes","Failed Getting Changes","Getting Changes..."],isOpen:s&&V(o),panel:e.jsx(Hs,{})}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Changes"})]})}function Os({isOpen:s=!1}){const{change_categorization:a}=Z(),t=x(m=>m.planApply),r=x(m=>m.planOverview),l=x(m=>m.planCancel),{meta:i,stageBackfills:o,backfills:u,hasBackfills:c}=X(t,r,l),d=(o==null?void 0:o.meta)??i,p=y.useMemo(()=>Array.from(a.values()).reduce((m,{category:f,change:h})=>{var P;return(f==null?void 0:f.value)!==ie.NUMBER_3&&m.add(h.name),(B(f)||f.value===ie.NUMBER_1)&&((P=h.indirect)==null||P.forEach(S=>m.add(S.name))),m},new Set),[a]),n=y.useMemo(()=>a.size>0?u.filter(m=>p.has(m.name)):u,[u,p]);return((d==null?void 0:d.status)===U.init||V(c))&&(a.size>0?n.length>0:!0)?e.jsx(G,{meta:d,states:["Backfills","Failed Getting Backfills","Getting Backfills..."],isOpen:s&&V(c),panel:e.jsx(L,{headline:`Models ${n.length}`,type:A.Default,children:e.jsx(L.Default,{type:A.Default,changes:n})})}):e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Backfills"})]})}function Is({report:s}){return e.jsx(G,{meta:{status:U.success,...s},states:["Tests Completed","Failed Tests","Running Tests..."],children:s.message})}function Ms({report:s,isOpen:a=!1}){return e.jsx(G,{variant:I.Danger,meta:{status:U.fail,...s},isOpen:a,states:["Tests Failed","One or More Tests Failed","Running Tests..."],shouldCollapse:!1,children:e.jsx(Es,{report:s})})}function zs({start:s,end:a,children:t}){const r=y.useRef(null);return y.useEffect(()=>{setTimeout(()=>{var l;(l=r.current)==null||l.scrollIntoView({behavior:"smooth",block:"start"})},500)},[]),B(s)?e.jsx(e.Fragment,{}):e.jsxs("div",{ref:r,className:"pt-4 pb-2 text-xs",children:[e.jsxs("span",{className:"text-neutral-500 block px-4 mb-1",children:["Evaluation started at"," ",xe(new Date(s),"yyyy-mm-dd hh-mm-ss")]}),e.jsx(re,{}),e.jsx("div",{className:"py-2",children:t}),M(a)&&e.jsxs(e.Fragment,{children:[e.jsx(re,{}),e.jsxs("span",{className:"text-neutral-500 block px-4 mt-1",children:["Evaluation stopped at"," ",xe(new Date(a),"yyyy-mm-dd hh-mm-ss")]})]})]})}function Us({isOpen:s}){var t;const a=x(r=>r.planApply);return B(a.stageCreation)?e.jsx(e.Fragment,{}):e.jsx(G,{meta:(t=a.stageCreation)==null?void 0:t.meta,states:["Snapshot Tables Created","Snapshot Tables Creation Failed","Creating Snapshot Tables..."],isOpen:s,children:e.jsx(v.Block,{children:e.jsxs(v.Task,{children:[e.jsxs(v.TaskDetails,{children:[e.jsx(v.TaskInfo,{children:e.jsx(v.TaskHeadline,{headline:"Snapshot Tables"})}),e.jsxs(v.DetailsProgress,{children:[e.jsx(v.TaskSize,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks,unit:"task"}),e.jsx(v.TaskDivider,{}),e.jsx(v.TaskProgress,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks})]})]}),e.jsx(se,{progress:Q(a.stageCreation.num_tasks,a.stageCreation.total_tasks)})]})})})}function Ls(){var a;const s=x(t=>t.planApply);return B(s.stageRestate)?e.jsxs(F,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(W,{className:"w-4 mr-2"}),e.jsx(F.Label,{className:"mr-2 text-sm",children:"No Models To Restate"})]}):e.jsx(G,{meta:(a=s.stageRestate)==null?void 0:a.meta,states:["Restate Models","Restate Models Failed","Restating Models..."]})}function $s(){const s=x(d=>d.planApply),a=x(d=>d.planAction),t=x(d=>d.planOverview),r=x(d=>d.planCancel),l=s.environment,i=s.stageBackfill,{backfills:o}=X(s,t,r),u=y.useMemo(()=>Object.values(s.tasks).reduce((d,p)=>{const n=o.find(j=>j.name===p.name);return p.interval=(n==null?void 0:n.interval)??[],d[p.name]=p,d},{}),[o,s.tasks]);return M(i)&&M(l)?e.jsx(G,{meta:i.meta,states:["Backfilled","Backfilling Failed","Backfilling Intervals..."],showDetails:!0,isOpen:!0,shouldCollapse:!1,children:e.jsx(v,{tasks:u,children:({total:d,completed:p,models:n,completedBatches:j,totalBatches:m})=>e.jsxs(e.Fragment,{children:[e.jsx(v.Summary,{headline:"Target Environment",environment:l,completed:p,total:d,completedBatches:j,totalBatches:m,updateType:a.isApplyVirtual?"Virtual":"Backfill"}),M(n)&&e.jsx(v.Details,{models:n,added:s.added,removed:s.removed,direct:s.direct,indirect:s.indirect,metadata:s.metadata,queue:s.queue,showBatches:!0,showVirtualUpdate:a.isApplyVirtual,showProgress:!0})]})})}):e.jsx(e.Fragment,{})}function Vs(){var a;const s=x(t=>t.planApply);return B(s.stagePromote)?e.jsx(e.Fragment,{}):e.jsx("div",{children:e.jsx(G,{meta:(a=s.stagePromote)==null?void 0:a.meta,states:["Environment Promoted","Promotion Failed","Promoting Environment..."],children:e.jsx(v.Block,{children:e.jsxs(v.Task,{children:[e.jsxs(v.TaskDetails,{children:[e.jsx(v.TaskInfo,{children:e.jsx(v.TaskHeadline,{headline:`Promote Environment: ${s.stagePromote.target_environment}`})}),e.jsxs(v.DetailsProgress,{children:[e.jsx(v.TaskSize,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks,unit:"task"}),e.jsx(v.TaskDivider,{}),e.jsx(v.TaskProgress,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks})]})]}),e.jsx(se,{progress:Q(s.stagePromote.num_tasks,s.stagePromote.total_tasks)})]})})})})}function Gs(){var u;const{virtualUpdateDescription:s}=Z(),a=x(c=>c.planApply),t=x(c=>c.planOverview),r=x(c=>c.planCancel),{isFailed:l}=X(a,t,r),i=((u=a.overview)==null?void 0:u.isVirtualUpdate)??t.isVirtualUpdate,o=V(a.isFinished);return i&&C(l)?e.jsx(G,{meta:{status:U.success,done:o},states:[o?"Virtual Update Completed":"Virtual Update","Virtual Update Failed","Applying Virtual Update..."],children:s}):e.jsx(e.Fragment,{})}function Hs(){const s=x(n=>n.planAction),a=x(n=>n.planOverview),t=x(n=>n.planApply),r=x(n=>n.planCancel),{hasChanges:l,added:i,removed:o,direct:u,indirect:c,metadata:d}=X(t,a,r),p=s.isProcessing||s.isDone||t.isFinished||a.isLatest&&C(s.isRun)||a.isVirtualUpdate;return e.jsx("div",{className:"w-full my-2",children:V(l)&&e.jsxs(e.Fragment,{children:[H(i)&&e.jsx(L,{className:"w-full my-2",headline:"Added Models",type:A.Add,children:e.jsx(L.Default,{type:A.Add,changes:i})}),H(o)&&e.jsx(L,{className:"w-full my-2",headline:"Removed Models",type:A.Remove,children:e.jsx(L.Default,{type:A.Remove,changes:o})}),H(u)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Directly",type:A.Direct,children:e.jsx(L.Direct,{changes:u,disabled:p})}),H(c)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Indirectly",type:A.Indirect,children:e.jsx(L.Indirect,{changes:c})}),H(d)&&e.jsx(L,{className:"my-2 w-full",headline:"Modified Metadata",type:A.Default,children:e.jsx(L.Default,{type:A.Default,changes:d})})]})})}function G({meta:s,states:a=["Success","Failed","Running"],isOpen:t=!1,trigger:r,panel:l,children:i,showDetails:o=!0,shouldCollapse:u=!0}){const c=y.useRef(null),d=x(R=>R.planOverview),p=x(R=>R.planApply),n=(s==null?void 0:s.status)!==U.fail&&M(l)||M(i),[j,m]=y.useState(t);y.useEffect(()=>{var R;B(c.current)||u&&(p.isFinished||d.isLatest)&&c.current.classList.contains("--is-open")&&((R=c.current)==null||R.click())},[c,d,p,u]),y.useEffect(()=>{m(t&&n)},[t,n]);const f=(s==null?void 0:s.status)===U.fail,h=(s==null?void 0:s.status)===U.success,P=(s==null?void 0:s.status)===U.init,S=h?I.Success:f?I.Danger:I.Info,[D,N,k]=a,w=h?D:f?N:k;return e.jsx(ee,{appear:!0,show:M(s),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"my-2",children:e.jsxs($,{children:[e.jsx(F,{className:"mb-1",variant:S,size:T.sm,hasBackground:!1,hasBackgroundOnHover:n,children:e.jsx($.Button,{ref:c,className:g("w-full flex flex-col",j&&"--is-open",C(n)&&"cursor-default"),onClick:()=>m(R=>!R),children:B(r)?e.jsxs(e.Fragment,{children:[P&&e.jsx($e,{text:w,hasSpinner:!0,size:T.sm,variant:I.Primary,className:"w-full"}),C(P)&&e.jsxs("div",{className:"flex items-center h-full",children:[o&&n?e.jsx(e.Fragment,{children:j?e.jsx(ye,{className:"w-4 mr-2"}):e.jsx(we,{className:"w-4 mr-2"})}):e.jsxs(e.Fragment,{children:[(s==null?void 0:s.status)===U.success&&e.jsx(W,{className:"min-w-4 max-w-4 mr-2"}),(s==null?void 0:s.status)===U.fail&&e.jsx(je,{className:"min-w-4 max-w-4 mr-2"})]}),e.jsx(F.Label,{className:"mr-2 text-sm",children:e.jsx(Re,{text:w,size:T.sm,variant:S})})]})]}):r})}),e.jsx(ee,{appear:!0,show:j,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:e.jsxs($.Panel,{static:!0,className:"px-2 text-xs mb-2",children:[M(i)&&e.jsx("div",{className:g("p-4 rounded-md",S===I.Danger?"bg-danger-5 text-danger-500":"bg-neutral-5"),children:i}),(s==null?void 0:s.status)!==U.fail&&l]})})]})})}function qs(){const s=ge(),{clearErrors:a}=Ve(),t=O(w=>w.environment),r=x(w=>w.planAction),l=x(w=>w.setPlanAction),i=x(w=>w.resetPlanTrackers),o=x(w=>w.resetPlanCancel),u=x(w=>w.clearPlanApply),c=Be(w=>w.setTests),d=As(),p=Fs(),{refetch:n,cancel:j}=Ge(t.name,d),{refetch:m,cancel:f}=He(t.name,p),{refetch:h}=qe();function P(){a(),s([{type:E.ResetPlanDates},{type:E.ResetPlanOptions},{type:E.ResetTestsReport},{type:E.ResetCategories}])}function S(){l(new Y({value:z.Run})),u(),P(),setTimeout(()=>i(),500)}function D(){l(new Y({value:z.Cancelling})),o(),s([{type:E.ResetTestsReport}]);let w;r.isApplying?w=j:w=f,w(),h()}function N(){l(new Y({value:z.Applying})),u(),s([{type:E.ResetTestsReport}]),m().catch(console.log)}function k(){l(new Y({value:z.Running})),i(),c(void 0),s([{type:E.ResetTestsReport}]),n().catch(console.log)}return e.jsxs("div",{className:"flex flex-col w-full h-full max-w-[80rem]",children:[t.isProd&&e.jsx(bs,{}),e.jsxs("div",{className:"relative w-full h-full flex flex-col pt-2 pl-4 pr-2 overflow-y-scroll hover:scrollbar scrollbar--vertical",children:[e.jsx(Cs,{}),e.jsx(Bs,{})]}),e.jsx(ks,{apply:N,run:k,cancel:D,reset:S})]})}function pa(){const{environmentName:s}=Ke(),a=O(l=>l.environment),t=O(l=>l.environments),r=O(l=>l.setEnvironment);return y.useEffect(()=>{if(a.isInitialProd||s===a.name)return;const l=Array.from(t).find(i=>i.name===s);B(l)||r(l)},[s]),e.jsx(as,{children:B(a)?e.jsx(Ze,{link:Ye.Plan,description:B(s)?void 0:`Environment ${s} Does Not Exist`,message:"Back To Data Catalog"}):e.jsx(qs,{})})}export{pa as default};
@@ -0,0 +1 @@
1
+ import{d as a,U as l,w as e,j as r,V as n,e as d}from"./index-KZcJd7F1.js";import{D as u}from"./ReportErrors-xnNgNULg.js";import"./PlusCircleIcon-FgfUjgrM.js";import"./transition-C8EjNcgL.js";import"./index-BdXOfeCo.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-CmzNrZQN.js";function E(){const{errors:i}=a(),{id:o}=l(),s=e(o)?void 0:Array.from(i).find(t=>t.id===o);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(s)?r.jsx(n,{link:d.Errors,description:e(o)?void 0:`Error ${o} Does Not Exist`,message:"Back To Errors"}):r.jsx("div",{className:"p-4 h-full w-full",children:r.jsx("div",{className:"w-full h-full p-4 rounded-lg bg-danger-5 text-danger-700",children:r.jsx(u,{error:s,scope:s.key,withSplitPane:!0})})})})}export{E as default};
@@ -0,0 +1 @@
1
+ import{U as x,a as m,w as h,Q as a,a5 as c,a6 as D,a7 as T,r as b,j as u}from"./index-KZcJd7F1.js";import{g,T as E}from"./help-DtLmoC0U.js";import{u as r}from"./editor-Bf9rhumO.js";import"./index-CLuHMKlN.js";import"./index-BdXOfeCo.js";import"./Input-CYm3h-zG.js";import"./file-CcK5Oobc.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),f=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(o)||o===(s==null?void 0:s.name)?s:p.get(encodeURI(o)),l={model:t.displayName,start:a(c(Date.now()-d)),end:a(new Date),execution_time:a(c(Date.now()-d)),limit:1e3},{refetch:v}=D(l),{refetch:w}=T(l);return b.useEffect(()=>{i(void 0),n(void 0),v().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(g(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(E,{headline:t==null?void 0:t.displayName,data:f??[[],[]]})})}export{S as default};