sqlmesh 0.196.4.dev13__py3-none-any.whl → 0.196.4.dev15__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 (53) hide show
  1. sqlmesh/_version.py +2 -2
  2. sqlmesh/core/engine_adapter/mssql.py +85 -2
  3. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.dist-info}/METADATA +1 -1
  4. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.dist-info}/RECORD +51 -51
  5. web/client/dist/assets/{Audits-DrNQaTQA.js → Audits-DKgXravk.js} +1 -1
  6. web/client/dist/assets/{Banner-DsG8aGIL.js → Banner-BlNaPns_.js} +1 -1
  7. web/client/dist/assets/{ChevronDownIcon-CpQjfO01.js → ChevronDownIcon-MZBJpOO8.js} +1 -1
  8. web/client/dist/assets/{ChevronRightIcon-B-9lnqGr.js → ChevronRightIcon-Bdxx50QS.js} +1 -1
  9. web/client/dist/assets/{Content-CSMzf1cU.js → Content-ClpOw61F.js} +1 -1
  10. web/client/dist/assets/{Content-vfltDlhj.js → Content-DRsp6uQI.js} +1 -1
  11. web/client/dist/assets/{Data-k1Dz6qdS.js → Data-91WCokZa.js} +1 -1
  12. web/client/dist/assets/{DataCatalog-DlbWZyBp.js → DataCatalog-C63qcucX.js} +2 -2
  13. web/client/dist/assets/{Editor--iBTA9xH.js → Editor-DRDwxpI2.js} +1 -1
  14. web/client/dist/assets/{Editor-C2pcRDlN.js → Editor-PtL9tfk8.js} +1 -1
  15. web/client/dist/assets/{Errors-CQW3lhsM.js → Errors-C-Webrjw.js} +1 -1
  16. web/client/dist/assets/{FileExplorer-IAIPoTxM.js → FileExplorer-ylHWQwsm.js} +1 -1
  17. web/client/dist/assets/{Footer-D77vCxKH.js → Footer-CasDkGte.js} +1 -1
  18. web/client/dist/assets/{Header-Ccb81kaP.js → Header-DyL7LEVP.js} +1 -1
  19. web/client/dist/assets/{Input-D_Fp4W_B.js → Input-DZamwNGa.js} +1 -1
  20. web/client/dist/assets/Lineage-BPGCodgf.js +1 -0
  21. web/client/dist/assets/{ListboxShow-BIPQ-cqE.js → ListboxShow-DSFZEE-M.js} +1 -1
  22. web/client/dist/assets/{ModelLineage-BrTZ2lm3.js → ModelLineage-BQmZD--B.js} +1 -1
  23. web/client/dist/assets/{Models-B6cHeIlA.js → Models-C2AYU-74.js} +1 -1
  24. web/client/dist/assets/{Page-S1ykkm5T.js → Page-BlOb3Ql3.js} +1 -1
  25. web/client/dist/assets/{Plan-DCD4m0nD.js → Plan-DWeacCNs.js} +1 -1
  26. web/client/dist/assets/{PlusCircleIcon-C40sAC-m.js → PlusCircleIcon-DD7nOhwQ.js} +1 -1
  27. web/client/dist/assets/{ReportErrors-CxqgDcYY.js → ReportErrors-CH5Vf5lv.js} +1 -1
  28. web/client/dist/assets/{Root-DtUrFfE_.js → Root-DZ2xKltj.js} +1 -1
  29. web/client/dist/assets/{SearchList-DoRflby9.js → SearchList-BpsOOoGh.js} +6 -6
  30. web/client/dist/assets/{SelectEnvironment-equ86mF1.js → SelectEnvironment-DLsh1BMi.js} +1 -1
  31. web/client/dist/assets/{SourceList-DT-sBCAQ.js → SourceList-Dg2mc7aY.js} +1 -1
  32. web/client/dist/assets/{SourceListItem-MFS9vpg9.js → SourceListItem-2mO71O7W.js} +1 -1
  33. web/client/dist/assets/{SplitPane-D2cB3Qkv.js → SplitPane-BbVgMyQB.js} +1 -1
  34. web/client/dist/assets/{Tests-Duzk1K8j.js → Tests-LDkS-T5R.js} +1 -1
  35. web/client/dist/assets/{Welcome-BgAHQe0m.js → Welcome-C0UCzzcU.js} +1 -1
  36. web/client/dist/assets/context-CGAXyfSr.js +71 -0
  37. web/client/dist/assets/{context-g_ECqgnp.js → context-D4y_v88x.js} +1 -1
  38. web/client/dist/assets/{editor-BddPKujl.js → editor-BOTuvmku.js} +1 -1
  39. web/client/dist/assets/{file-DUr_Gx7F.js → file-CXPqyzKt.js} +1 -1
  40. web/client/dist/assets/{floating-ui.react-dom-DTKAUIBI.js → floating-ui.react-dom-X8vTMPq7.js} +1 -1
  41. web/client/dist/assets/{help-LQUMs6nO.js → help-65lcCO6u.js} +1 -1
  42. web/client/dist/assets/{index-BsS6H8XQ.js → index-C7dOv_Xt.js} +8 -8
  43. web/client/dist/assets/{index-DvxjegO0.js → index-Cf0u2ogu.js} +1 -1
  44. web/client/dist/assets/{plan-DS237yuz.js → plan-D5w005YE.js} +1 -1
  45. web/client/dist/assets/{popover-CiiY17g7.js → popover-CQm70UjD.js} +1 -1
  46. web/client/dist/assets/{project-DUHOhQT2.js → project-CUisbOpA.js} +1 -1
  47. web/client/dist/index.html +1 -1
  48. web/client/dist/assets/Lineage-BHLfUAmC.js +0 -1
  49. web/client/dist/assets/context-CXV8eAaM.js +0 -68
  50. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.dist-info}/WHEEL +0 -0
  51. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.dist-info}/entry_points.txt +0 -0
  52. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.dist-info}/licenses/LICENSE +0 -0
  53. {sqlmesh-0.196.4.dev13.dist-info → sqlmesh-0.196.4.dev15.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.196.4.dev13'
21
- __version_tuple__ = version_tuple = (0, 196, 4, 'dev13')
20
+ __version__ = version = '0.196.4.dev15'
21
+ __version_tuple__ = version_tuple = (0, 196, 4, 'dev15')
@@ -6,11 +6,13 @@ import typing as t
6
6
 
7
7
  from sqlglot import exp
8
8
 
9
- from sqlmesh.core.dialect import to_schema
9
+ from sqlmesh.core.dialect import to_schema, add_table
10
10
  from sqlmesh.core.engine_adapter.base import (
11
11
  EngineAdapterWithIndexSupport,
12
12
  EngineAdapter,
13
13
  InsertOverwriteStrategy,
14
+ MERGE_SOURCE_ALIAS,
15
+ MERGE_TARGET_ALIAS,
14
16
  )
15
17
  from sqlmesh.core.engine_adapter.mixins import (
16
18
  GetCurrentCatalogFromFunctionMixin,
@@ -32,7 +34,7 @@ from sqlmesh.core.schema_diff import SchemaDiffer
32
34
 
33
35
  if t.TYPE_CHECKING:
34
36
  from sqlmesh.core._typing import SchemaName, TableName
35
- from sqlmesh.core.engine_adapter._typing import DF, Query
37
+ from sqlmesh.core.engine_adapter._typing import DF, Query, QueryOrDF
36
38
 
37
39
 
38
40
  @set_catalog()
@@ -188,6 +190,87 @@ class MSSQLEngineAdapter(
188
190
  )
189
191
  super().drop_schema(schema_name, ignore_if_not_exists=ignore_if_not_exists, cascade=False)
190
192
 
193
+ def merge(
194
+ self,
195
+ target_table: TableName,
196
+ source_table: QueryOrDF,
197
+ columns_to_types: t.Optional[t.Dict[str, exp.DataType]],
198
+ unique_key: t.Sequence[exp.Expression],
199
+ when_matched: t.Optional[exp.Whens] = None,
200
+ merge_filter: t.Optional[exp.Expression] = None,
201
+ ) -> None:
202
+ source_queries, columns_to_types = self._get_source_queries_and_columns_to_types(
203
+ source_table, columns_to_types, target_table=target_table
204
+ )
205
+ columns_to_types = columns_to_types or self.columns(target_table)
206
+ on = exp.and_(
207
+ *(
208
+ add_table(part, MERGE_TARGET_ALIAS).eq(add_table(part, MERGE_SOURCE_ALIAS))
209
+ for part in unique_key
210
+ )
211
+ )
212
+ if merge_filter:
213
+ on = exp.and_(merge_filter, on)
214
+
215
+ if not when_matched:
216
+ match_condition = None
217
+ unique_key_names = [y.name for y in unique_key]
218
+ columns_to_types_no_keys = [c for c in columns_to_types if c not in unique_key_names]
219
+
220
+ target_columns_no_keys = [
221
+ exp.column(c, MERGE_TARGET_ALIAS) for c in columns_to_types_no_keys
222
+ ]
223
+ source_columns_no_keys = [
224
+ exp.column(c, MERGE_SOURCE_ALIAS) for c in columns_to_types_no_keys
225
+ ]
226
+
227
+ match_condition = exp.Exists(
228
+ this=exp.select(*target_columns_no_keys).except_(
229
+ exp.select(*source_columns_no_keys)
230
+ )
231
+ )
232
+
233
+ match_expressions = [
234
+ exp.When(
235
+ matched=True,
236
+ source=False,
237
+ condition=match_condition,
238
+ then=exp.Update(
239
+ expressions=[
240
+ exp.column(col, MERGE_TARGET_ALIAS).eq(
241
+ exp.column(col, MERGE_SOURCE_ALIAS)
242
+ )
243
+ for col in columns_to_types_no_keys
244
+ ],
245
+ ),
246
+ )
247
+ ]
248
+ else:
249
+ match_expressions = when_matched.copy().expressions
250
+
251
+ match_expressions.append(
252
+ exp.When(
253
+ matched=False,
254
+ source=False,
255
+ then=exp.Insert(
256
+ this=exp.Tuple(expressions=[exp.column(col) for col in columns_to_types]),
257
+ expression=exp.Tuple(
258
+ expressions=[
259
+ exp.column(col, MERGE_SOURCE_ALIAS) for col in columns_to_types
260
+ ]
261
+ ),
262
+ ),
263
+ )
264
+ )
265
+ for source_query in source_queries:
266
+ with source_query as query:
267
+ self._merge(
268
+ target_table=target_table,
269
+ query=query,
270
+ on=on,
271
+ whens=exp.Whens(expressions=match_expressions),
272
+ )
273
+
191
274
  def _convert_df_datetime(self, df: DF, columns_to_types: t.Dict[str, exp.DataType]) -> None:
192
275
  import pandas as pd
193
276
  from pandas.api.types import is_datetime64_any_dtype # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlmesh
3
- Version: 0.196.4.dev13
3
+ Version: 0.196.4.dev15
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=QjwaamJIdW7voXoS880yAx7tHm-Im4_mqGA-XJgafos,7631
2
- sqlmesh/_version.py,sha256=c3yTTaUVWA6DGa4KmkReWNu0hBkas1y50pabyEXVeQc,530
2
+ sqlmesh/_version.py,sha256=JlpBDibXcqUt2F9HyzRDYtRJDb11w2foRGLAbgCHwC8,530
3
3
  sqlmesh/magics.py,sha256=nMfwSW5rIkdnyO9MXYm9u24hNl6dqgAWybC-MnRcNnE,41451
4
4
  sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -66,7 +66,7 @@ sqlmesh/core/engine_adapter/clickhouse.py,sha256=LoPdm_s_s-ZxS1XJPA3Et0iOHeJ1Lgq
66
66
  sqlmesh/core/engine_adapter/databricks.py,sha256=8ZExPIeT3dDh9MTJW8udvmh9LiY-f9HkRAN1Q5Qebhs,14541
67
67
  sqlmesh/core/engine_adapter/duckdb.py,sha256=TlSFSWNzUfjGdhuMyCi1CLwhBaEKyNKtasub9OsYwrc,5199
68
68
  sqlmesh/core/engine_adapter/mixins.py,sha256=HMB0Z9O3p5jaTZMolKiWKqpVDZokf5GoI99YXwEJ8bc,22470
69
- sqlmesh/core/engine_adapter/mssql.py,sha256=_rnnhZMBzVTUMBZpm7RM3Nfo8KdpO6Imn4mAvfs96Es,14250
69
+ sqlmesh/core/engine_adapter/mssql.py,sha256=KY9ruyofPOxsIPQdfFIQIuMOO4lMl9cynnPYgLKmIH4,17311
70
70
  sqlmesh/core/engine_adapter/mysql.py,sha256=lVC-siXZK3iSfqCmBjZNw8uy09Z8la8v8_oUZ-E2OwI,6966
71
71
  sqlmesh/core/engine_adapter/postgres.py,sha256=fdQrsBodfGlNf8lZYkS99U_gjoDyaYKEVKLgScduv3I,4601
72
72
  sqlmesh/core/engine_adapter/redshift.py,sha256=B4GsPggz-xyvBpx5qubvVwEeKF3vk7n5SMExL-Q5Ysw,16754
@@ -283,53 +283,53 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
283
283
  sqlmesh/utils/rich.py,sha256=BpB47G0-JcU41LkGkeGKroexj4NOV5fox4-GOIXPgIc,3545
284
284
  sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
285
285
  sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
286
- sqlmesh-0.196.4.dev13.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
286
+ sqlmesh-0.196.4.dev15.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
287
287
  web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
288
- web/client/dist/index.html,sha256=drXwzSCEVDTMfaIwzJYjnT8Xk4c-Y4wNJz-CflUa_vY,5472
289
- web/client/dist/assets/Audits-DrNQaTQA.js,sha256=E8JF632bsRUm6LGtgXlyHrJOYQe5VW2CgRZPaZNKvgg,1041
290
- web/client/dist/assets/Banner-DsG8aGIL.js,sha256=B8J1i6H33J5zFZpN2hW-cWNeZa-lwa6hTDVHZLFGepg,1549
291
- web/client/dist/assets/ChevronDownIcon-CpQjfO01.js,sha256=ruKkBHPI7NYM-Mv0BPUxLR7gFFfkIkuSscPrBBLF1Z4,553
292
- web/client/dist/assets/ChevronRightIcon-B-9lnqGr.js,sha256=4uR7m3cGipngmPVt9QuTRrV25EvuxycJJCdTSmxQfbA,553
293
- web/client/dist/assets/Content-CSMzf1cU.js,sha256=NsXU2HQp2btqlAe1Ky-GfDtJGXzXmWdBFXd1i7DusxM,37525
294
- web/client/dist/assets/Content-vfltDlhj.js,sha256=bpNUHByRIVb6N-sgteaqs6DAmKVdUTYu1-e4kWJeJXg,803
295
- web/client/dist/assets/Data-k1Dz6qdS.js,sha256=IU5oY5w2tnGERpb2U08XJOvO0UDA48VtOeeifCMitR4,984
296
- web/client/dist/assets/DataCatalog-DlbWZyBp.js,sha256=0_lkynGdxmBSb5qGJDLQYW6qGZpraRKFhD2wfKt3HYw,122486
297
- web/client/dist/assets/Editor--iBTA9xH.js,sha256=PZ30z73dR4md9NVwLOuDjYvxWkEocY7o0qSNbzhdbDI,1490
298
- web/client/dist/assets/Editor-C2pcRDlN.js,sha256=c7gLfBmYRsrSPL3GN8kE0hqosL82M0p7zUcz0aihIT4,43614
299
- web/client/dist/assets/Errors-CQW3lhsM.js,sha256=sBPlsJJ7kg7X8Y44rgVc3M58o1ec1qUpch-U4Bf60sA,1361
300
- web/client/dist/assets/FileExplorer-IAIPoTxM.js,sha256=x2RUmVfZoj8bnXa8dSbXr-mIEXssXyxTRZhMS9tN68M,87619
301
- web/client/dist/assets/Footer-D77vCxKH.js,sha256=U6viM5rVRn721-RlPrvaAVHmIziYbZt20FgreIxNR2M,700
302
- web/client/dist/assets/Header-Ccb81kaP.js,sha256=HnACZRbKQSIlu8112mv5I14ybMmHoqeDuazs8rWEIBw,11424
303
- web/client/dist/assets/Input-D_Fp4W_B.js,sha256=-VoFLRN9NI9kqYCatZhN01nFxnwCbd-qwim5AjLcdCk,54814
304
- web/client/dist/assets/Lineage-BHLfUAmC.js,sha256=kNtsnLT-uWdmetqQWcGxYyxbtwokGeReDQ6wcxTkB4Y,1002
305
- web/client/dist/assets/ListboxShow-BIPQ-cqE.js,sha256=J0xVGHsIY8Jymt8moKgGgA0UcSRlgPVRmDHRxMqgqso,29911
306
- web/client/dist/assets/ModelLineage-BrTZ2lm3.js,sha256=-Kwq0pNEtnH7JfH8iR1uevFxXkzOnOyvjulYt4t4_qw,15546
307
- web/client/dist/assets/Models-B6cHeIlA.js,sha256=jLL3XfR5a5Cd0a2iA9TpSO2Raq2VE-9h5VeLEvJCJ7k,2194
308
- web/client/dist/assets/Page-S1ykkm5T.js,sha256=jkaG3R5RRkSOcOXU1FeVcXOKt6c2hpW8L7R1oBhi7W4,589
309
- web/client/dist/assets/Plan-DCD4m0nD.js,sha256=XC1Wsu7Kh2ucSr48moUcXS7wH9F0GYPhUxlrGVH1UrA,666
310
- web/client/dist/assets/PlusCircleIcon-C40sAC-m.js,sha256=U2Kj8AXiCxc42XXHtQD6QcWYwD7tKWgyZphB9q04cx0,11698
311
- web/client/dist/assets/ReportErrors-CxqgDcYY.js,sha256=iT3T4k7fueG9PToWGCFZUFVaJj1AsVAqq5Wx19WwfwU,5419
312
- web/client/dist/assets/Root-DtUrFfE_.js,sha256=TedlUvWQhbf68FRXVy9_AnS3qqIbvQLktsu1HfWR0Ls,42195
313
- web/client/dist/assets/SearchList-DoRflby9.js,sha256=ZXcEi3giqMQCUZ8gCSZccO8FJxqLqmI955O00gbaA4Y,291947
314
- web/client/dist/assets/SelectEnvironment-equ86mF1.js,sha256=dxMQj5Ww7WqetFQCbMF0IPxx2mNOEdxPrJm_CV9wOCE,37637
315
- web/client/dist/assets/SourceList-DT-sBCAQ.js,sha256=bNTKYKC4XOltcr-WbYWkTP-uDlZMEq7Fb2AyU4H6Hy4,3205
316
- web/client/dist/assets/SourceListItem-MFS9vpg9.js,sha256=Ou6IQTTRTu4R2qWmydrnkpOsw40NYfBmTc_Kmh0-puM,1106
317
- web/client/dist/assets/SplitPane-D2cB3Qkv.js,sha256=HA97cZh-gpD1jX_jEJZ3woGBk5z94Ec6meZgMwobYVw,10439
318
- web/client/dist/assets/Tests-Duzk1K8j.js,sha256=zbLQsApR79cceYyvY11hOcvimsFWDV0xap_YN1-hwmk,1014
319
- web/client/dist/assets/Welcome-BgAHQe0m.js,sha256=LENgtOzsvgFGz5HJSRcM1PA2uXPkv-3P8nFsZR2iQnU,354
288
+ web/client/dist/index.html,sha256=kNpFjWxt34Pf-P-cROtPWi3GNSVk6zqA3eoN9tlZXI0,5472
289
+ web/client/dist/assets/Audits-DKgXravk.js,sha256=SaVQhNlislD_yQc_KivO7SPi1JH0ts1GnDPD5Zssutw,1041
290
+ web/client/dist/assets/Banner-BlNaPns_.js,sha256=dU8F7P_GpQFdeKvuKAFDZrcttD1xhWitVA7Y-W5yngU,1549
291
+ web/client/dist/assets/ChevronDownIcon-MZBJpOO8.js,sha256=eTwOg2gXT6yKVUXF4P5R9tzRIRjouck_8EIzzQcNFc4,553
292
+ web/client/dist/assets/ChevronRightIcon-Bdxx50QS.js,sha256=uaMp24NEXtHi_WQJlABXszPDwSrITo1wd8GwoJVRwbo,553
293
+ web/client/dist/assets/Content-ClpOw61F.js,sha256=DujvsLv-OgllNP-q1ge6vT0MTW972GjagPl6-_wppcs,37525
294
+ web/client/dist/assets/Content-DRsp6uQI.js,sha256=7_7z2ZaV8opYV4NHICTaDboR0LHUXRxI0m8yyQHHeHg,803
295
+ web/client/dist/assets/Data-91WCokZa.js,sha256=scD1FMqUfOFlNTOd54UjCyW9Ym3Nd3rq3ZZ9wbjlbKA,984
296
+ web/client/dist/assets/DataCatalog-C63qcucX.js,sha256=wI2cBWhdx7MLuC9gvuvO-sx1yn76vAzfL8nVEuk6X0c,122464
297
+ web/client/dist/assets/Editor-DRDwxpI2.js,sha256=v2fze3hwgfhkr546Q9ZJ6PL44sBmxZpY80BRCy5JZCM,1490
298
+ web/client/dist/assets/Editor-PtL9tfk8.js,sha256=GFKIfCFrSIWJ2E7vwadEGSR0mg2A0f_Vt_3Bani4IH8,43614
299
+ web/client/dist/assets/Errors-C-Webrjw.js,sha256=tWpNvw86SBPYabGEwtIc4uuqFieZsOqvbVF4JjEqPh0,1361
300
+ web/client/dist/assets/FileExplorer-ylHWQwsm.js,sha256=5NkjiHjFS4nm3ZlNuEmEYRagpCZXtJi5SMdvXMztnRY,87619
301
+ web/client/dist/assets/Footer-CasDkGte.js,sha256=LIWl8C4u2jGJG9y6prAbnDIi0uxwuwOydKEXr-pQmMA,700
302
+ web/client/dist/assets/Header-DyL7LEVP.js,sha256=dktJUNkVcwk8VqTxv4YmnzCgY48qAtf5J5HLcQvWgWo,11424
303
+ web/client/dist/assets/Input-DZamwNGa.js,sha256=aWQBBkQ9BLF50kBFX9JTt7pEZfQFKFsUXzPqYFXCXuw,54814
304
+ web/client/dist/assets/Lineage-BPGCodgf.js,sha256=f_mE0QI6PhwOTYPmF2kTBPenCboWT0OpLK0klABWlpM,1002
305
+ web/client/dist/assets/ListboxShow-DSFZEE-M.js,sha256=QcDGqmnZI1OX93Hmu0B4RfcjoNiinQpMDvKKD4IV6X8,29911
306
+ web/client/dist/assets/ModelLineage-BQmZD--B.js,sha256=e4_N2v2sSZ6RoqzGjOLVhCVisp3lygEzByJxDbV_EmU,15546
307
+ web/client/dist/assets/Models-C2AYU-74.js,sha256=wGORGFoSjGmemrB2iH5Lw8nJP85UEOanrZmyVfuCDt0,2194
308
+ web/client/dist/assets/Page-BlOb3Ql3.js,sha256=-ZDrYKGJLEWSnqz0XKZJ9_4eRIEZeUdr5fCfJ6cMFEs,589
309
+ web/client/dist/assets/Plan-DWeacCNs.js,sha256=Y0Xjb2uZnYc_AN4A5SWrTYMiKCE4Uapf-3jrku4O3xM,666
310
+ web/client/dist/assets/PlusCircleIcon-DD7nOhwQ.js,sha256=CC6Ayhxbj4JywlmaHKCYAr9APAcPkFw9giR_njjmLxY,11698
311
+ web/client/dist/assets/ReportErrors-CH5Vf5lv.js,sha256=hBew8_2Nbm0Qk_cKalD30n_s9u4qWHOFDQtioErcjNE,5419
312
+ web/client/dist/assets/Root-DZ2xKltj.js,sha256=PNMDir0v9EnuKxXWt2YMLcMndUGIjjTyleRM1G1JuKk,42195
313
+ web/client/dist/assets/SearchList-BpsOOoGh.js,sha256=-Jz_6o5W8zFAwv49lTR1Ryl9e1ypmHLedMg3Lhjh_-8,291983
314
+ web/client/dist/assets/SelectEnvironment-DLsh1BMi.js,sha256=Idj_Cp7h6uf8VA0F1rikxE1cEVkgYUg9hQh-XJYtBf4,37637
315
+ web/client/dist/assets/SourceList-Dg2mc7aY.js,sha256=r5jqdGlsrBnTj-8SlvAg5c3A6KoDBFhUmW9--FqAZeI,3205
316
+ web/client/dist/assets/SourceListItem-2mO71O7W.js,sha256=hodK2_xstWTRQEpn_nuNaIrXmfmHE2Ml3btY86lTeqw,1106
317
+ web/client/dist/assets/SplitPane-BbVgMyQB.js,sha256=Rv9-J8n-qJWTBM4r2TFslzLPLHD38byOtHLePBE4IaA,10439
318
+ web/client/dist/assets/Tests-LDkS-T5R.js,sha256=eNpdgKlmJ8Kq62xjt4BX913M-GjcaiPLKiE6gINKfkA,1014
319
+ web/client/dist/assets/Welcome-C0UCzzcU.js,sha256=L5lxeAmUaAgBLHymS1WL5wA3HEx6kfqZ1Zodsjb2M5c,354
320
320
  web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
321
- web/client/dist/assets/context-CXV8eAaM.js,sha256=ODp9lRKw-mqvt1iBAbae7JrBuJVgkIm4d0hDIaF1oMQ,2043860
322
- web/client/dist/assets/context-g_ECqgnp.js,sha256=UtztxIl-wsPnI7N0UwPBnv8HewNt0AyGO1s7W3YE-cw,4517
323
- web/client/dist/assets/editor-BddPKujl.js,sha256=atNPvyv88Dq5_8GQKeKv4FWaW70aAP3EA2xccoEm8XM,7858
324
- web/client/dist/assets/file-DUr_Gx7F.js,sha256=V4Qj8P81pNlgU6McP4_uX0xeebG_v9K0tjigqVbro6M,2349
325
- web/client/dist/assets/floating-ui.react-dom-DTKAUIBI.js,sha256=m3PQm46eRa3HbtFp0TQ01uT0o7OETJECs5Y9mCHpP9Q,22266
321
+ web/client/dist/assets/context-CGAXyfSr.js,sha256=yCJ7c31C4jOQDLAIzDpUMBBEouoONRFkQ55M4tdyN7E,2205504
322
+ web/client/dist/assets/context-D4y_v88x.js,sha256=EIHnuiiDSOwPyhWUU7hN0JdRx7IxS8HwZ3_dFryfuX4,4517
323
+ web/client/dist/assets/editor-BOTuvmku.js,sha256=LhEz-Y1eMj8M-A3MVe0025LuJyazT8Id19cSTWF2cpE,7858
324
+ web/client/dist/assets/file-CXPqyzKt.js,sha256=jAya_v4xQVYoQMCd7rcDpqBOGpA7mt_4JZGu5trjd_8,2349
325
+ web/client/dist/assets/floating-ui.react-dom-X8vTMPq7.js,sha256=1lH6XbqpOP5U7MY2YCtDN5_VyTo9RsJDjT0Tp7IR6og,22266
326
+ web/client/dist/assets/help-65lcCO6u.js,sha256=6e4Qrd3E4DeOi08rlGtosYyzyftcH6maA_HyQ6gZcQw,57842
326
327
  web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
327
- web/client/dist/assets/help-LQUMs6nO.js,sha256=l2cwwwdeaceDNk4nPftIej4HeJTz_DTvkTCRNGPHbLQ,57842
328
- web/client/dist/assets/index-BsS6H8XQ.js,sha256=nN9r-FZW6wJEQGXg7maavjQumirIUwJdxlSIBTdOSSo,531639
329
- web/client/dist/assets/index-DvxjegO0.js,sha256=Ys22S83iTRrHlhETcv8QqTVsZTfBraJvkMobbTEvAgA,13582
330
- web/client/dist/assets/plan-DS237yuz.js,sha256=AhbKQZSYSpiq56aPNkVqE650R9dLeJXzfxyLFtMUqXw,13754
331
- web/client/dist/assets/popover-CiiY17g7.js,sha256=Yi7NB2kj-TCBtUTJ9cGmILRDmtR07Hrn1BR-mWbnTeg,68101
332
- web/client/dist/assets/project-DUHOhQT2.js,sha256=_67V2SqDm-5whUOtvulTmwH2RwrLvS_L0BklOY_Yyd8,3338
328
+ web/client/dist/assets/index-C7dOv_Xt.js,sha256=ce-DOqmdxFFplWTetNGJcystXONMyVdP8jqzjNkhKeM,531620
329
+ web/client/dist/assets/index-Cf0u2ogu.js,sha256=zox5dvbkt8GGSHSX_M_Jvb9mh9IuRhaC1YM9-woA4Rg,13582
330
+ web/client/dist/assets/plan-D5w005YE.js,sha256=EwCFvYW1obh6eGP8sK9um9aYeKrdaQF39fkgiLHrHl8,13754
331
+ web/client/dist/assets/popover-CQm70UjD.js,sha256=C10XMmGTgaUcxH9CEsDvPTmeQGUJhjDXtVvGhv7383M,68101
332
+ web/client/dist/assets/project-CUisbOpA.js,sha256=W5TKHZgnwBnpS_-O7xJAw9FWSNdJj_kcgpyCFRxBK-o,3338
333
333
  web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
334
334
  web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
335
335
  web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
@@ -401,8 +401,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
401
401
  web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
402
402
  web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
403
403
  web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
404
- sqlmesh-0.196.4.dev13.dist-info/METADATA,sha256=yDvjtbq4AT-YKDarS_WMPHcpft0uZXJszOLXFNDKHDs,26542
405
- sqlmesh-0.196.4.dev13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
406
- sqlmesh-0.196.4.dev13.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
407
- sqlmesh-0.196.4.dev13.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
408
- sqlmesh-0.196.4.dev13.dist-info/RECORD,,
404
+ sqlmesh-0.196.4.dev15.dist-info/METADATA,sha256=ZUlQVtRCcgKx-Yxr_EukrMunZ-E4SCZsV41FPMCRyd0,26542
405
+ sqlmesh-0.196.4.dev15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
406
+ sqlmesh-0.196.4.dev15.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
407
+ sqlmesh-0.196.4.dev15.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
408
+ sqlmesh-0.196.4.dev15.dist-info/RECORD,,
@@ -1 +1 @@
1
- import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-BsS6H8XQ.js";import{P as j}from"./Page-S1ykkm5T.js";import{u as h}from"./project-DUHOhQT2.js";import{S as v}from"./SourceList-DT-sBCAQ.js";import{S as A}from"./SourceListItem-MFS9vpg9.js";import"./SplitPane-D2cB3Qkv.js";import"./file-DUr_Gx7F.js";import"./Input-D_Fp4W_B.js";import"./floating-ui.react-dom-DTKAUIBI.js";import"./index-DvxjegO0.js";function k(){const{pathname:a}=n(),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:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
1
+ import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-C7dOv_Xt.js";import{P as j}from"./Page-BlOb3Ql3.js";import{u as h}from"./project-CUisbOpA.js";import{S as v}from"./SourceList-Dg2mc7aY.js";import{S as A}from"./SourceListItem-2mO71O7W.js";import"./SplitPane-BbVgMyQB.js";import"./file-CXPqyzKt.js";import"./Input-DZamwNGa.js";import"./floating-ui.react-dom-X8vTMPq7.js";import"./index-Cf0u2ogu.js";function k(){const{pathname:a}=n(),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:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
@@ -1 +1 @@
1
- import{j as s,c as i,l as a,m as n,H as p}from"./index-BsS6H8XQ.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,l as a,m as n,H as p}from"./index-C7dOv_Xt.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-BsS6H8XQ.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-C7dOv_Xt.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-BsS6H8XQ.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-C7dOv_Xt.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 v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-BsS6H8XQ.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-equ86mF1.js";import{u as j,a as Y,E as M}from"./plan-DS237yuz.js";import{B as S}from"./Banner-DsG8aGIL.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-C40sAC-m.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-CiiY17g7.js";import{I as K}from"./Input-D_Fp4W_B.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-BIPQ-cqE.js";import{u as ze}from"./project-DUHOhQT2.js";import{F as we}from"./context-CXV8eAaM.js";import"./ModelLineage-BrTZ2lm3.js";import"./editor-BddPKujl.js";import"./file-DUr_Gx7F.js";import"./SearchList-DoRflby9.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-DTKAUIBI.js";import"./ChevronDownIcon-CpQjfO01.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-DT-sBCAQ.js";import"./index-DvxjegO0.js";function Os({title:s,titleId:a,...t},r){return v.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?v.createElement("title",{id:a},s):null,v.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 X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.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 Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?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:re?["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:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?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 g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.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(se,{appear:!0,show: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",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("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",c,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:w("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(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("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(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.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(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
1
+ import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-C7dOv_Xt.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-DLsh1BMi.js";import{u as j,a as Y,E as M}from"./plan-D5w005YE.js";import{B as S}from"./Banner-BlNaPns_.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-DD7nOhwQ.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-CQm70UjD.js";import{I as K}from"./Input-DZamwNGa.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-DSFZEE-M.js";import{u as ze}from"./project-CUisbOpA.js";import{F as we}from"./context-CGAXyfSr.js";import"./ModelLineage-BQmZD--B.js";import"./editor-BOTuvmku.js";import"./file-CXPqyzKt.js";import"./SearchList-BpsOOoGh.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-X8vTMPq7.js";import"./ChevronDownIcon-MZBJpOO8.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-Dg2mc7aY.js";import"./index-Cf0u2ogu.js";function Os({title:s,titleId:a,...t},r){return v.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?v.createElement("title",{id:a},s):null,v.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 X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.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 Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?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:re?["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:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?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 g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.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(se,{appear:!0,show: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",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("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",c,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:w("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(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("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(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.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(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{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
@@ -1 +1 @@
1
- import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-BsS6H8XQ.js";import{D as u}from"./ReportErrors-CxqgDcYY.js";import"./PlusCircleIcon-C40sAC-m.js";import"./popover-CiiY17g7.js";import"./floating-ui.react-dom-DTKAUIBI.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-D2cB3Qkv.js";function v(){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{v as default};
1
+ import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-C7dOv_Xt.js";import{D as u}from"./ReportErrors-CH5Vf5lv.js";import"./PlusCircleIcon-DD7nOhwQ.js";import"./popover-CQm70UjD.js";import"./floating-ui.react-dom-X8vTMPq7.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-BbVgMyQB.js";function v(){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{v as default};
@@ -1 +1 @@
1
- import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-BsS6H8XQ.js";import{g as b,T as g}from"./help-LQUMs6nO.js";import{u as r}from"./editor-BddPKujl.js";import"./index-DvxjegO0.js";import"./floating-ui.react-dom-DTKAUIBI.js";import"./Input-D_Fp4W_B.js";import"./file-DUr_Gx7F.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=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:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default};
1
+ import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-C7dOv_Xt.js";import{g as b,T as g}from"./help-65lcCO6u.js";import{u as r}from"./editor-BOTuvmku.js";import"./index-Cf0u2ogu.js";import"./floating-ui.react-dom-X8vTMPq7.js";import"./Input-DZamwNGa.js";import"./file-CXPqyzKt.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=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:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default};