abstra 3.23.8__py3-none-any.whl → 3.23.10__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.
- {abstra-3.23.8.dist-info → abstra-3.23.10.dist-info}/METADATA +1 -1
- {abstra-3.23.8.dist-info → abstra-3.23.10.dist-info}/RECORD +172 -169
- abstra_internals/contracts_generated.py +551 -663
- abstra_internals/entities/forms/template.py +84 -5
- abstra_internals/modules_test.py +2 -2
- abstra_internals/services/file_watcher.py +17 -14
- abstra_internals/utils/file.py +62 -0
- abstra_internals/utils/platform.py +5 -0
- abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.ab120641.js +2 -0
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.23cf85ee.js +2 -0
- abstra_statics/dist/assets/ApiKeys.f5b7fcec.js +2 -0
- abstra_statics/dist/assets/App.46bd8dd6.js +2 -0
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.2264189c.js +2 -0
- abstra_statics/dist/assets/BaseLayout.77f1c4c9.js +2 -0
- abstra_statics/dist/assets/{Billing.b9f77b65.js → Billing.44a9d31b.js} +2 -2
- abstra_statics/dist/assets/{Breadcrumb.d0cc2c91.js → Breadcrumb.ef8bd191.js} +2 -2
- abstra_statics/dist/assets/{Builds.18e4ba1a.js → Builds.4efe7d0f.js} +2 -2
- abstra_statics/dist/assets/{Card.957a87b2.js → Card.897ad69d.js} +5 -5
- abstra_statics/dist/assets/{CircularLoading.3e4ddd6d.js → CircularLoading.ea5d27d2.js} +2 -2
- abstra_statics/dist/assets/CloseCircleOutlined.3d4e81d4.js +2 -0
- abstra_statics/dist/assets/{ConnectorsView.17764dde.css → ConnectorsView.aeb00ce8.css} +1 -1
- abstra_statics/dist/assets/ConnectorsView.b274568b.js +2 -0
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.99b3af8f.js +2 -0
- abstra_statics/dist/assets/ContentLayout.866d5dde.js +2 -0
- abstra_statics/dist/assets/{CrudView.8fb84eac.js → CrudView.d06da8d4.js} +2 -2
- abstra_statics/dist/assets/CrudView.e24590ae.css +1 -0
- abstra_statics/dist/assets/DocsButton.vue_vue_type_script_setup_true_lang.a3f96825.js +2 -0
- abstra_statics/dist/assets/{EditorLogin.02eb6050.js → EditorLogin.22bca314.js} +2 -2
- abstra_statics/dist/assets/{EditorsView.f0ea00fc.js → EditorsView.367f6a9a.js} +2 -2
- abstra_statics/dist/assets/EnvVars.afb25010.js +2 -0
- abstra_statics/dist/assets/{Error.a81122c4.js → Error.c2ad341a.js} +2 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.5510023c.js +2 -0
- abstra_statics/dist/assets/{Files.f23b9c53.js → Files.aba4c92b.js} +2 -2
- abstra_statics/dist/assets/{Form.bfea5673.js → Form.ab1706e4.js} +2 -2
- abstra_statics/dist/assets/{FormRunner.8bbe841e.js → FormRunner.ce5ad4fd.js} +2 -2
- abstra_statics/dist/assets/Home.a001fbb0.js +2 -0
- abstra_statics/dist/assets/Home.ee572768.js +2 -0
- abstra_statics/dist/assets/{Live.5dc821b6.js → Live.c14662db.js} +2 -2
- abstra_statics/dist/assets/LoadingContainer.c883bb34.js +2 -0
- abstra_statics/dist/assets/LoadingOutlined.f4b4629a.js +2 -0
- abstra_statics/dist/assets/{Login.c702642b.js → Login.2ef78ae0.js} +2 -2
- abstra_statics/dist/assets/Login.efd0eb05.js +2 -0
- abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.a92a80d0.js → Login.vue_vue_type_script_setup_true_lang.b006d8d3.js} +2 -2
- abstra_statics/dist/assets/Logo.648566b5.js +2 -0
- abstra_statics/dist/assets/{Logs.eebc0504.js → Logs.072f55c6.js} +2 -2
- abstra_statics/dist/assets/{LogsController.eb1b811d.js → LogsController.395d93f5.js} +2 -2
- abstra_statics/dist/assets/Main.e6027f81.js +2 -0
- abstra_statics/dist/assets/{MockForm.c3318be9.js → MockForm.fdc58df0.js} +2 -2
- abstra_statics/dist/assets/Navbar.7add3eb0.js +2 -0
- abstra_statics/dist/assets/NewEditor.6771ba53.js +8 -0
- abstra_statics/dist/assets/{NewEditor.0044878f.css → NewEditor.6dd8f03b.css} +1 -1
- abstra_statics/dist/assets/OidcLoginCallback.f56f78fc.js +2 -0
- abstra_statics/dist/assets/OidcLogoutCallback.437c4101.js +2 -0
- abstra_statics/dist/assets/{OmniChat.8a35a659.css → OmniChat.078af315.css} +1 -1
- abstra_statics/dist/assets/OmniChat.de7b834a.js +6 -0
- abstra_statics/dist/assets/{OnboardingView.1c034f0d.js → OnboardingView.51adcf60.js} +2 -2
- abstra_statics/dist/assets/{Organization.855f95a9.js → Organization.e9e92d40.js} +2 -2
- abstra_statics/dist/assets/Organizations.a6fb836d.js +2 -0
- abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.76c9e146.js → PhArrowCounterClockwise.vue.a4f3391b.js} +2 -2
- abstra_statics/dist/assets/{PhArrowSquareOut.vue.ecfa9cb2.js → PhArrowSquareOut.vue.6554aa1c.js} +2 -2
- abstra_statics/dist/assets/{PhBookBookmark.vue.f8f803d9.js → PhBookBookmark.vue.c37eb773.js} +2 -2
- abstra_statics/dist/assets/{PhChats.vue.dfda946c.js → PhChats.vue.1d971c96.js} +2 -2
- abstra_statics/dist/assets/{PhClockCounterClockwise.vue.cd77fd26.js → PhClockCounterClockwise.vue.f3d7a5f0.js} +2 -2
- abstra_statics/dist/assets/{PhCopy.vue.a63b48dd.js → PhCopy.vue.e433af1d.js} +2 -2
- abstra_statics/dist/assets/{PhCopySimple.vue.ecffb042.js → PhCopySimple.vue.b8cedde5.js} +2 -2
- abstra_statics/dist/assets/{PhCube.vue.b5b96a33.js → PhCube.vue.8321d975.js} +2 -2
- abstra_statics/dist/assets/{PhDotsThreeVertical.vue.2db678ef.js → PhDotsThreeVertical.vue.377e8248.js} +2 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.4c39fa52.js +2 -0
- abstra_statics/dist/assets/{PhFolderPlus.vue.dfb9b117.js → PhFolderPlus.vue.26f4fc08.js} +2 -2
- abstra_statics/dist/assets/{PhGear.vue.6e1aeed0.js → PhGear.vue.bde6cc31.js} +2 -2
- abstra_statics/dist/assets/{PhKey.vue.50d82bb5.js → PhKey.vue.6aba158a.js} +2 -2
- abstra_statics/dist/assets/{PhPencil.vue.ae2943da.js → PhPencil.vue.55f0d005.js} +2 -2
- abstra_statics/dist/assets/{PhPencilSimple.vue.9042e169.js → PhPencilSimple.vue.82f128f3.js} +2 -2
- abstra_statics/dist/assets/{PhPencilSimpleLine.vue.f840cf0d.js → PhPencilSimpleLine.vue.64631777.js} +2 -2
- abstra_statics/dist/assets/{PhRocket.vue.3b5927aa.js → PhRocket.vue.ff778122.js} +2 -2
- abstra_statics/dist/assets/{PhSignOut.vue.d00d3657.js → PhSignOut.vue.8f5bfa41.js} +2 -2
- abstra_statics/dist/assets/{PhSparkle.vue.8a94f3a0.js → PhSparkle.vue.2d12a12f.js} +2 -2
- abstra_statics/dist/assets/{PhUserList.vue.3791cb59.js → PhUserList.vue.5cfe135b.js} +2 -2
- abstra_statics/dist/assets/{PhUsersThree.vue.ef0376b6.js → PhUsersThree.vue.ddb0f571.js} +2 -2
- abstra_statics/dist/assets/{PhWebhooksLogo.vue.fe81fb65.js → PhWebhooksLogo.vue.f667599c.js} +2 -2
- abstra_statics/dist/assets/{PlayerConfigProvider.2acd3a77.js → PlayerConfigProvider.ef1e8f48.js} +2 -2
- abstra_statics/dist/assets/{PlayerNavbar.13876ce7.js → PlayerNavbar.ca2f19cb.js} +2 -2
- abstra_statics/dist/assets/{Project.0277535f.js → Project.4e2f44e3.js} +2 -2
- abstra_statics/dist/assets/ProjectLogin.2d8bb827.js +2 -0
- abstra_statics/dist/assets/{ProjectSettings.652a838b.js → ProjectSettings.952cec7a.js} +2 -2
- abstra_statics/dist/assets/{ProjectsView.c5ec993b.js → ProjectsView.67e79ccf.js} +2 -2
- abstra_statics/dist/assets/{SaveButton.ac38b361.js → SaveButton.d14631e9.js} +2 -2
- abstra_statics/dist/assets/{ScrollArea.vue_vue_type_script_setup_true_lang.a58564d3.js → ScrollArea.vue_vue_type_script_setup_true_lang.49642b53.js} +2 -2
- abstra_statics/dist/assets/{Sidebar.56e51ab5.js → Sidebar.964fcb1c.js} +2 -2
- abstra_statics/dist/assets/Sql.afd70c7f.js +5 -0
- abstra_statics/dist/assets/Steps.4482ff19.js +2 -0
- abstra_statics/dist/assets/{TableEditor.df6a4852.js → TableEditor.9584d010.js} +2 -2
- abstra_statics/dist/assets/Tables.ea01768b.js +2 -0
- abstra_statics/dist/assets/{TablesDiagram.811d464d.js → TablesDiagram.e6ce884d.js} +2 -2
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.1a057f69.js +2 -0
- abstra_statics/dist/assets/Tasks.f57e239d.js +2 -0
- abstra_statics/dist/assets/{UploadOutlined.b601a592.js → UploadOutlined.68e6d0cf.js} +2 -2
- abstra_statics/dist/assets/{View.7a2ccc33.js → View.f549262c.js} +2 -2
- abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.8e0a328b.js +2 -0
- abstra_statics/dist/assets/{Watermark.40c8c47e.js → Watermark.37fe047e.js} +2 -2
- abstra_statics/dist/assets/{WebEditor.82a3accf.js → WebEditor.8ff1601b.js} +2 -2
- abstra_statics/dist/assets/WidgetPreview.bc7a6646.js +2 -0
- abstra_statics/dist/assets/{ant-design.544de4a0.js → ant-design.876f2f8d.js} +2 -2
- abstra_statics/dist/assets/apiKey.1d723817.js +2 -0
- abstra_statics/dist/assets/asyncComputed.7b34952b.js +2 -0
- abstra_statics/dist/assets/{build.997fec15.js → build.71b8e04b.js} +2 -2
- abstra_statics/dist/assets/colorHelpers.5dd0cb4f.js +2 -0
- abstra_statics/dist/assets/{console.54ab975c.js → console.6a1ae26d.js} +4 -4
- abstra_statics/dist/assets/constants.60cb557d.js +2 -0
- abstra_statics/dist/assets/contracts.generated.6e0d1816.js +2 -0
- abstra_statics/dist/assets/{cssMode.c1aa21d7.js → cssMode.6a4a4184.js} +2 -2
- abstra_statics/dist/assets/datetime.2d5b6900.js +2 -0
- abstra_statics/dist/assets/dayjs.0eae9c2d.js +2 -0
- abstra_statics/dist/assets/editor.776db77c.js +2 -0
- abstra_statics/dist/assets/editor.main.7f316986.js +2 -0
- abstra_statics/dist/assets/fetch.cbf466d2.js +2 -0
- abstra_statics/dist/assets/{folder.41d37eb7.js → folder.f5b64034.js} +2 -2
- abstra_statics/dist/assets/{freemarker2.40778f3f.js → freemarker2.b87986e8.js} +2 -2
- abstra_statics/dist/assets/{handlebars.92d4ff2a.js → handlebars.cc213cd7.js} +2 -2
- abstra_statics/dist/assets/{html.b3c0c53a.js → html.77746bba.js} +3 -3
- abstra_statics/dist/assets/{htmlMode.1212da49.js → htmlMode.db862c25.js} +2 -2
- abstra_statics/dist/assets/{index.5e22e010.js → index.00fb5b89.js} +2 -2
- abstra_statics/dist/assets/{index.36d8b30a.js → index.045179c5.js} +5 -5
- abstra_statics/dist/assets/{index.3ff1c0be.js → index.09f330ad.js} +3 -3
- abstra_statics/dist/assets/index.3404e7dd.js +2 -0
- abstra_statics/dist/assets/{index.9e0166fe.js → index.34fb5fc2.js} +2 -2
- abstra_statics/dist/assets/{index.d181a22c.js → index.d928bc3c.js} +2 -2
- abstra_statics/dist/assets/{index.a7b8e25e.js → index.ddb85c9b.js} +2 -2
- abstra_statics/dist/assets/{index.37c46161.js → index.e6c377d2.js} +2 -2
- abstra_statics/dist/assets/index.f04176ea.js +2 -0
- abstra_statics/dist/assets/{javascript.f9710043.js → javascript.54e5f980.js} +3 -3
- abstra_statics/dist/assets/{jsonMode.16d00c0d.js → jsonMode.fc4496f7.js} +2 -2
- abstra_statics/dist/assets/{jwt-decode.esm.992666e9.js → jwt-decode.esm.7fb8faf4.js} +8 -8
- abstra_statics/dist/assets/linters.910a9028.js +2 -0
- abstra_statics/dist/assets/{liquid.9a777e1a.js → liquid.2595976e.js} +3 -3
- abstra_statics/dist/assets/{member.6b2b3438.js → member.4e942dca.js} +2 -2
- abstra_statics/dist/assets/{metadata.cfad5458.js → metadata.bd2832f8.js} +2 -2
- abstra_statics/dist/assets/omniChatStore.83648f7c.js +8 -0
- abstra_statics/dist/assets/{organization.53636095.js → organization.0e5f192f.js} +2 -2
- abstra_statics/dist/assets/player.5f97b741.js +2 -0
- abstra_statics/dist/assets/{plotly.min.9b8bef5c.js → plotly.min.8ee43c36.js} +2 -2
- abstra_statics/dist/assets/polling.41905ad0.js +2 -0
- abstra_statics/dist/assets/{project.76f0af14.js → project.47800fcd.js} +2 -2
- abstra_statics/dist/assets/{python.ae8270c8.js → python.adb76dee.js} +2 -2
- abstra_statics/dist/assets/{razor.4f24e19e.js → razor.8c0f414a.js} +3 -3
- abstra_statics/dist/assets/{record.87ef3b68.js → record.5fbe6782.js} +2 -2
- abstra_statics/dist/assets/redirect.0e6a5558.js +2 -0
- abstra_statics/dist/assets/{repository.9d5310b6.js → repository.22769dca.js} +2 -2
- abstra_statics/dist/assets/{repository.af418855.js → repository.f466c79e.js} +2 -2
- abstra_statics/dist/assets/{router.1324a1a9.js → router.643f183e.js} +3 -3
- abstra_statics/dist/assets/router.71aa46ba.js +2 -0
- abstra_statics/dist/assets/string.d8337a2b.js +2 -0
- abstra_statics/dist/assets/{tables.c26107a1.js → tables.736ccb3d.js} +2 -2
- abstra_statics/dist/assets/tasksController.4a937a41.js +4 -0
- abstra_statics/dist/assets/{toggleHighContrast.fc60753d.js → toggleHighContrast.15446005.js} +49 -49
- abstra_statics/dist/assets/{tsMode.a4b9b524.js → tsMode.6e8249dd.js} +2 -2
- abstra_statics/dist/assets/{typescript.ab90fd1d.js → typescript.2c2237b9.js} +3 -3
- abstra_statics/dist/assets/url.4e737b7f.js +2 -0
- abstra_statics/dist/assets/useCodebaseEvents.28978c2b.js +2 -0
- abstra_statics/dist/assets/userStore.f3109854.js +2 -0
- abstra_statics/dist/assets/uuid.0f9d5a19.js +2 -0
- abstra_statics/dist/assets/{vue-flow-background.8e4c22c3.js → vue-flow-background.b301f87f.js} +2 -2
- abstra_statics/dist/assets/{vue-quill.esm-bundler.64c5837f.js → vue-quill.esm-bundler.b4fd1194.js} +2 -2
- abstra_statics/dist/assets/{workspaceStore.4f0c433f.js → workspaceStore.de299d82.js} +2 -2
- abstra_statics/dist/assets/{xml.3541c340.js → xml.685038e1.js} +3 -3
- abstra_statics/dist/assets/{yaml.314312d8.js → yaml.1a2cf10b.js} +3 -3
- abstra_statics/dist/console.html +15 -15
- abstra_statics/dist/editor.html +13 -11
- abstra_statics/dist/player.html +9 -9
- abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js +0 -2
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js +0 -2
- abstra_statics/dist/assets/ApiKeys.7fefafb4.js +0 -2
- abstra_statics/dist/assets/App.c29df54f.js +0 -2
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.efd9d3fa.js +0 -2
- abstra_statics/dist/assets/BaseLayout.b60c33b8.js +0 -2
- abstra_statics/dist/assets/CloseCircleOutlined.4e05b917.js +0 -2
- abstra_statics/dist/assets/ConnectorsView.562a5007.js +0 -2
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.1d09cfdd.js +0 -2
- abstra_statics/dist/assets/ContentLayout.7d5c9f09.js +0 -2
- abstra_statics/dist/assets/CrudView.c883bb05.css +0 -1
- abstra_statics/dist/assets/DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js +0 -2
- abstra_statics/dist/assets/EnvVars.063644bb.js +0 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.d410fb9a.js +0 -2
- abstra_statics/dist/assets/Home.3bf2f131.js +0 -2
- abstra_statics/dist/assets/Home.42964d5b.js +0 -2
- abstra_statics/dist/assets/LoadingContainer.6e72d482.js +0 -2
- abstra_statics/dist/assets/LoadingOutlined.ee72932a.js +0 -2
- abstra_statics/dist/assets/Login.0b618d09.js +0 -2
- abstra_statics/dist/assets/Logo.83b476a4.js +0 -2
- abstra_statics/dist/assets/Main.88719eb3.js +0 -2
- abstra_statics/dist/assets/Navbar.abf206e9.js +0 -2
- abstra_statics/dist/assets/NewEditor.5650f697.js +0 -8
- abstra_statics/dist/assets/OidcLoginCallback.df2bdeb0.js +0 -2
- abstra_statics/dist/assets/OidcLogoutCallback.2ba5316d.js +0 -2
- abstra_statics/dist/assets/OmniChat.de828c54.js +0 -6
- abstra_statics/dist/assets/Organizations.3db82ab2.js +0 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.cbca4f9b.js +0 -2
- abstra_statics/dist/assets/ProjectLogin.46d5036b.js +0 -2
- abstra_statics/dist/assets/Sql.6961306b.js +0 -5
- abstra_statics/dist/assets/Steps.f820fb18.js +0 -2
- abstra_statics/dist/assets/Tables.198b84c5.js +0 -2
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.e6074880.js +0 -2
- abstra_statics/dist/assets/Tasks.df69d20e.js +0 -2
- abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.424410a2.js +0 -2
- abstra_statics/dist/assets/WidgetPreview.0f938200.js +0 -2
- abstra_statics/dist/assets/apiKey.95126643.js +0 -2
- abstra_statics/dist/assets/asyncComputed.1b787534.js +0 -2
- abstra_statics/dist/assets/colorHelpers.d4f3f275.js +0 -2
- abstra_statics/dist/assets/constants.36bf7d70.js +0 -2
- abstra_statics/dist/assets/datetime.adc0acc4.js +0 -2
- abstra_statics/dist/assets/dayjs.a6bd0ee0.js +0 -2
- abstra_statics/dist/assets/editor.0ce52658.js +0 -2
- abstra_statics/dist/assets/editor.main.353e9a8f.js +0 -2
- abstra_statics/dist/assets/fetch.83d89bdc.js +0 -2
- abstra_statics/dist/assets/index.3d2a7b6d.js +0 -2
- abstra_statics/dist/assets/index.3e7471f4.js +0 -2
- abstra_statics/dist/assets/linters.3c5f0c83.js +0 -2
- abstra_statics/dist/assets/omniChatStore.2b85c342.js +0 -8
- abstra_statics/dist/assets/player.5b7eaa25.js +0 -2
- abstra_statics/dist/assets/polling.88a266b3.js +0 -2
- abstra_statics/dist/assets/redirect.2fa4f8cf.js +0 -2
- abstra_statics/dist/assets/router.55c0ff56.js +0 -2
- abstra_statics/dist/assets/string.f6a7565f.js +0 -2
- abstra_statics/dist/assets/tasksController.22584849.js +0 -4
- abstra_statics/dist/assets/url.f490879d.js +0 -2
- abstra_statics/dist/assets/userStore.9e7a540a.js +0 -2
- abstra_statics/dist/assets/uuid.9161765c.js +0 -2
- {abstra-3.23.8.dist-info → abstra-3.23.10.dist-info}/WHEEL +0 -0
- {abstra-3.23.8.dist-info → abstra-3.23.10.dist-info}/entry_points.txt +0 -0
- {abstra-3.23.8.dist-info → abstra-3.23.10.dist-info}/top_level.txt +0 -0
|
@@ -18,7 +18,43 @@ from abstra_internals.entities.forms.widgets.widget_base import InputWidget, Wid
|
|
|
18
18
|
@dataclass
|
|
19
19
|
class Button:
|
|
20
20
|
"""
|
|
21
|
-
|
|
21
|
+
Render buttons with custom functionality in your form for conditional logic and branching paths.
|
|
22
|
+
|
|
23
|
+
Buttons allow users to trigger custom Python functions, processing or different form behaviors. When a button is pressed, its key becomes `True` in the form state, enabling conditional logic to determine the next steps in your workflow. This makes buttons essential for creating approval workflows, multi-path forms, and interactive decision trees.
|
|
24
|
+
|
|
25
|
+
Unlike automatic navigation buttons (NextButton/BackButton), custom Button widgets give you full control over widget behavior within a page and can be used to implement complex conditional logic based on user choices.
|
|
26
|
+
|
|
27
|
+
## How Button State Works
|
|
28
|
+
|
|
29
|
+
When a user clicks a button, the button's key is set to `True` in the form state. You can then check this state using `state.get("button_key")` to determine which button was pressed and conditionally render different widgets or forms.
|
|
30
|
+
|
|
31
|
+
## Usage Pattern
|
|
32
|
+
|
|
33
|
+
Buttons are optionally returned from your Page function (a function that returns a list of widgets). You have two options:
|
|
34
|
+
|
|
35
|
+
**Option 1: Return only widgets (default behavior)**
|
|
36
|
+
```python
|
|
37
|
+
def my_page(state):
|
|
38
|
+
return [TextOutput("Hello"), TextOutput("world!")] # Default navigation buttons will be used
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Option 2: Return widgets + custom buttons as a tuple**
|
|
42
|
+
```python
|
|
43
|
+
def my_page(state):
|
|
44
|
+
widgets = [TextOutput("Hello"), TextOutput("world!")]
|
|
45
|
+
buttons = [Button("Label 1", key="key1"), Button("Label 2", key="key2")]
|
|
46
|
+
return widgets, buttons
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you don't return buttons (Option 1), the system automatically provides default navigation buttons (Next/Back). If you want custom buttons, you must return a tuple with widgets as the first element and a list of Button objects as the second element.
|
|
50
|
+
|
|
51
|
+
## Common Use Cases
|
|
52
|
+
|
|
53
|
+
- **Approval Workflows**: Create "Approve" and "Reject" buttons for document review processes
|
|
54
|
+
- **Data Reload**: Refresh page content with updated information from external APIs or databases
|
|
55
|
+
- **Multi-path Forms**: Allow users to choose between different information collection paths
|
|
56
|
+
- **Decision Trees**: Build complex conditional forms based on user choices
|
|
57
|
+
- **Custom Navigation**: Implement non-linear form progression with custom logic
|
|
22
58
|
|
|
23
59
|
Args:
|
|
24
60
|
label (str): The text displayed on the button.
|
|
@@ -50,8 +86,26 @@ class Button:
|
|
|
50
86
|
|
|
51
87
|
class NextButton(Button):
|
|
52
88
|
"""
|
|
53
|
-
|
|
54
|
-
|
|
89
|
+
Automatic navigation button for progressing to the next step in multi-step forms.
|
|
90
|
+
|
|
91
|
+
NextButton is automatically added to forms when using multi-step workflows created with the `run()` function. It handles forward navigation between form steps without requiring manual implementation. The button is automatically labeled with internationalized "Next" text that adapts to the user's language settings.
|
|
92
|
+
|
|
93
|
+
## Automatic Behavior
|
|
94
|
+
|
|
95
|
+
- **Auto-added**: NextButton appears automatically on each step of a multi-step form (you don't need to import or create it)
|
|
96
|
+
- **Smart positioning**: Only shows when there are more steps ahead
|
|
97
|
+
- **Internationalized**: Button text automatically translates based on user locale
|
|
98
|
+
- **State preservation**: User input is preserved when navigating between steps
|
|
99
|
+
|
|
100
|
+
## When to Use
|
|
101
|
+
|
|
102
|
+
NextButton is ideal for:
|
|
103
|
+
- **Linear workflows**: Step-by-step data collection processes
|
|
104
|
+
- **Wizards**: Multi-step onboarding or configuration flows
|
|
105
|
+
- **Progressive forms**: Breaking long forms into manageable sections
|
|
106
|
+
- **Data collection pipelines**: Structured information gathering processes
|
|
107
|
+
|
|
108
|
+
Unlike custom Button widgets, NextButton doesn't require state management or conditional logic - it's handled automatically by the form system.
|
|
55
109
|
"""
|
|
56
110
|
|
|
57
111
|
def __init__(self):
|
|
@@ -61,8 +115,33 @@ class NextButton(Button):
|
|
|
61
115
|
|
|
62
116
|
class BackButton(Button):
|
|
63
117
|
"""
|
|
64
|
-
|
|
65
|
-
|
|
118
|
+
Automatic navigation button for returning to previous steps in multi-step forms.
|
|
119
|
+
|
|
120
|
+
BackButton is automatically added to forms starting from step 2 onwards in multi-step workflows. It enables backward navigation while preserving all user input, allowing users to review and modify their previous responses without losing data. The button is automatically labeled with internationalized "Back" text that adapts to the user's language settings.
|
|
121
|
+
|
|
122
|
+
## Automatic Behavior
|
|
123
|
+
|
|
124
|
+
- **Auto-added**: BackButton appears automatically from step 2 onwards in multi-step forms (you don't need to import or create it)
|
|
125
|
+
- **Smart positioning**: Only shows when there are previous steps to navigate to
|
|
126
|
+
- **Internationalized**: Button text automatically translates based on user locale
|
|
127
|
+
- **Data preservation**: All user input is maintained when navigating backwards
|
|
128
|
+
- **Seamless integration**: Works automatically with the form system's navigation logic
|
|
129
|
+
|
|
130
|
+
## Key Features
|
|
131
|
+
|
|
132
|
+
- **Non-destructive navigation**: Users can go back without losing their progress
|
|
133
|
+
- **Form state management**: Previous inputs are automatically restored when returning
|
|
134
|
+
- **User-friendly**: Provides confidence for users to explore and correct their inputs
|
|
135
|
+
|
|
136
|
+
## When BackButton Appears
|
|
137
|
+
|
|
138
|
+
BackButton is ideal for:
|
|
139
|
+
- **Multi-step wizards**: Allow users to review and modify previous steps
|
|
140
|
+
- **Data collection forms**: Enable correction of earlier responses
|
|
141
|
+
- **Progressive workflows**: Provide flexibility in non-linear completion
|
|
142
|
+
- **Review processes**: Allow users to double-check their inputs before submission
|
|
143
|
+
|
|
144
|
+
Unlike custom Button widgets, BackButton doesn't require any implementation - it's automatically managed by the form system.
|
|
66
145
|
"""
|
|
67
146
|
|
|
68
147
|
def __init__(self):
|
abstra_internals/modules_test.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import os
|
|
2
|
-
import platform
|
|
3
2
|
from unittest import TestCase, skipIf
|
|
4
3
|
|
|
5
4
|
from abstra_internals.modules import import_as_new, reload_module
|
|
@@ -7,11 +6,12 @@ from abstra_internals.repositories.project.project import (
|
|
|
7
6
|
LocalProjectRepository,
|
|
8
7
|
ScriptStage,
|
|
9
8
|
)
|
|
9
|
+
from abstra_internals.utils.platform import is_windows
|
|
10
10
|
from tests.fixtures import clear_dir, init_dir
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def can_create_symlinks():
|
|
14
|
-
if
|
|
14
|
+
if not is_windows():
|
|
15
15
|
return True
|
|
16
16
|
|
|
17
17
|
try:
|
|
@@ -15,6 +15,7 @@ from watchdog.observers import Observer
|
|
|
15
15
|
|
|
16
16
|
from abstra_internals.settings import Settings
|
|
17
17
|
from abstra_internals.utils.crdt import CRDTManager
|
|
18
|
+
from abstra_internals.utils.file import safe_read_file, safe_write_file
|
|
18
19
|
|
|
19
20
|
IGNORED_PATHS = [
|
|
20
21
|
".abstra/",
|
|
@@ -55,19 +56,21 @@ class FileWatcher(FileSystemEventHandler):
|
|
|
55
56
|
event_type = "moved"
|
|
56
57
|
elif isinstance(event, FileModifiedEvent):
|
|
57
58
|
event_type = "changed"
|
|
58
|
-
content = (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
crdt_managers[filepath_str].
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
content = safe_read_file(filepath, 2.0)
|
|
60
|
+
|
|
61
|
+
if content is not None:
|
|
62
|
+
if (
|
|
63
|
+
filepath_str not in crdt_managers
|
|
64
|
+
or crdt_managers[filepath_str] is None
|
|
65
|
+
):
|
|
66
|
+
crdt_managers[filepath_str] = CRDTManager(file_path=filepath)
|
|
67
|
+
|
|
68
|
+
old_content = crdt_managers[filepath_str].get_content()
|
|
69
|
+
if old_content != content:
|
|
70
|
+
crdt_managers[filepath_str].apply_operations_from_diff(content)
|
|
71
|
+
new_content = crdt_managers[filepath_str].get_content()
|
|
72
|
+
if content != new_content:
|
|
73
|
+
safe_write_file(filepath, new_content, 2.0)
|
|
71
74
|
|
|
72
75
|
else:
|
|
73
76
|
return
|
|
@@ -90,7 +93,7 @@ class FileWatcher(FileSystemEventHandler):
|
|
|
90
93
|
|
|
91
94
|
self._debounce_timers[filepath_str] = threading.Timer(
|
|
92
95
|
interval=0.5, function=execute_handlers
|
|
93
|
-
)
|
|
96
|
+
)
|
|
94
97
|
self._debounce_timers[filepath_str].start()
|
|
95
98
|
|
|
96
99
|
def should_ignore_path(self, path: Path) -> bool:
|
abstra_internals/utils/file.py
CHANGED
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
import pathlib
|
|
5
5
|
import shutil
|
|
6
6
|
import tempfile
|
|
7
|
+
import time
|
|
7
8
|
import typing as t
|
|
8
9
|
import uuid
|
|
9
10
|
import warnings
|
|
@@ -13,6 +14,7 @@ from typing import Generator, Optional, Set, Union
|
|
|
13
14
|
from werkzeug.datastructures import FileStorage
|
|
14
15
|
|
|
15
16
|
from abstra_internals.utils.ast_cache import ASTCache
|
|
17
|
+
from abstra_internals.utils.platform import is_windows
|
|
16
18
|
|
|
17
19
|
FILE_TYPES = {
|
|
18
20
|
"txt": {
|
|
@@ -544,3 +546,63 @@ def extension_to_mime(extension: str) -> str:
|
|
|
544
546
|
if extension_without_dot in FILE_TYPES:
|
|
545
547
|
return FILE_TYPES[extension_without_dot]["mime"]
|
|
546
548
|
return FILE_TYPES["unknown"]["mime"]
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
def is_file_locked(filepath: Path) -> bool:
|
|
552
|
+
if not filepath.exists():
|
|
553
|
+
return False
|
|
554
|
+
|
|
555
|
+
try:
|
|
556
|
+
if is_windows():
|
|
557
|
+
with open(filepath, "a", encoding="utf-8"):
|
|
558
|
+
pass
|
|
559
|
+
|
|
560
|
+
with open(filepath, "r", encoding="utf-8"):
|
|
561
|
+
pass
|
|
562
|
+
else:
|
|
563
|
+
with open(filepath, "r+", encoding="utf-8"):
|
|
564
|
+
pass
|
|
565
|
+
return False
|
|
566
|
+
except (PermissionError, OSError):
|
|
567
|
+
return True
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
def wait_for_file_unlock(
|
|
571
|
+
filepath: Path, timeout: float = 2.0, check_interval: float = 0.05
|
|
572
|
+
) -> bool:
|
|
573
|
+
if not filepath.exists():
|
|
574
|
+
return True
|
|
575
|
+
|
|
576
|
+
start_time = time.time()
|
|
577
|
+
while time.time() - start_time < timeout:
|
|
578
|
+
if not is_file_locked(filepath):
|
|
579
|
+
return True
|
|
580
|
+
time.sleep(check_interval)
|
|
581
|
+
|
|
582
|
+
return False
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
def safe_read_file(filepath: Path, timeout: float = 2.0) -> Optional[str]:
|
|
586
|
+
if not filepath.is_file():
|
|
587
|
+
return None
|
|
588
|
+
|
|
589
|
+
if not wait_for_file_unlock(filepath, timeout):
|
|
590
|
+
return None
|
|
591
|
+
|
|
592
|
+
try:
|
|
593
|
+
return filepath.read_text(encoding="utf-8")
|
|
594
|
+
except (PermissionError, OSError, UnicodeDecodeError) as e:
|
|
595
|
+
print(f"Error reading {filepath}: {e}")
|
|
596
|
+
return None
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
def safe_write_file(filepath: Path, content: str, timeout: float = 2.0) -> bool:
|
|
600
|
+
if not wait_for_file_unlock(filepath, timeout):
|
|
601
|
+
return False
|
|
602
|
+
|
|
603
|
+
try:
|
|
604
|
+
filepath.write_text(content, encoding="utf-8")
|
|
605
|
+
return True
|
|
606
|
+
except (PermissionError, OSError) as e:
|
|
607
|
+
print(f"Error writing {filepath}: {e}")
|
|
608
|
+
return False
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as c,c as b,o as r,a as d,b as a,f as l,u as n,de as i,a7 as p,h as u,ez as f,eA as g,bR as y,aV as m,e6 as _}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ebf30417-5466-4e9e-a73c-838640747bd8",t._sentryDebugIdIdentifier="sentry-dbid-ebf30417-5466-4e9e-a73c-838640747bd8")}catch{}})();const h=c({__name:"AbstraButton",props:{disabledTooltip:{},tooltip:{},prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(t){const e=t,s=b(()=>e.disabledTooltip&&e.disabled?e.disabledTooltip:e.tooltip);return(o,k)=>s.value?(r(),d(n(m),{key:0,title:s.value},{default:a(()=>[l(n(y),f(g(o.$props)),{default:a(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?u("",!0):p(o.$slots,"default",{key:0})]),_:3})]),_:3},16)]),_:3},8,["title"])):(r(),d(n(y),f(_({key:1},o.$props)),{default:a(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?u("",!0):p(o.$slots,"default",{key:0})]),_:3})]),_:3},16))}});export{h as _};
|
|
2
|
+
//# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.ab120641.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as d}from"./Logo.648566b5.js";import{d as t,o as n,a as r,u as i}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2954ead6-09bf-44b8-96dd-ded76f48a446",e._sentryDebugIdIdentifier="sentry-dbid-2954ead6-09bf-44b8-96dd-ded76f48a446")}catch{}})();const f="/assets/logo.0faadfa2.svg",b=t({__name:"AbstraLogo",props:{hideText:{type:Boolean},size:{}},setup(e){return(s,a)=>{var o;return n(),r(d,{"image-url":i(f),"brand-name":"Abstra","hide-text":s.hideText,size:(o=s.size)!=null?o:"small"},null,8,["image-url","hide-text","size"])}}});export{b as _};
|
|
2
|
+
//# sourceMappingURL=AbstraLogo.vue_vue_type_script_setup_true_lang.23cf85ee.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{C as w}from"./CrudView.d06da8d4.js";import{d as _,r as k,eb as x,c as v,a5 as C,f as l,u as i,b as d,aR as P,o as h,d9 as D,g as y,da as M,ed as j,M as N,ee as K,eq as T}from"./jwt-decode.esm.7fb8faf4.js";import{a as V}from"./asyncComputed.7b34952b.js";import{A as c}from"./apiKey.1d723817.js";import"./router.643f183e.js";import{M as B}from"./member.4e942dca.js";import{a as E}from"./project.47800fcd.js";import"./tables.736ccb3d.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a3f96825.js";import"./constants.60cb557d.js";import"./url.4e737b7f.js";import"./PhDotsThreeVertical.vue.377e8248.js";import"./index.3404e7dd.js";import"./index.d928bc3c.js";import"./record.5fbe6782.js";import"./string.d8337a2b.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="1a781ea4-204b-4f2f-a1a8-03737ee69a51",n._sentryDebugIdIdentifier="sentry-dbid-1a781ea4-204b-4f2f-a1a8-03737ee69a51")}catch{}})();const ee=_({__name:"ApiKeys",setup(n){const o=k(null),p=[{key:"name",label:"API key name"}],s=x().params.projectId,f=new B,{loading:g,result:I,refetch:u}=V(async()=>Promise.all([c.list(s),E.get(s).then(e=>f.list(e.organizationId))]).then(([e,t])=>e.map(a=>({apiKey:a,member:t.find(r=>r.authorId===a.ownerId)})))),b=async e=>{const t=await c.create({projectId:s,name:e.name});u(),o.value=t.value},A=v(()=>{var e,t;return{columns:[{title:"Name"},{title:"Creation date"},{title:"Owner"},{title:"",align:"right"}],rows:(t=(e=I.value)==null?void 0:e.map(({apiKey:a,member:r})=>{var m;return{key:a.id,cells:[{type:"text",text:a.name},{type:"text",text:K(a.createdAt)},{type:"text",text:(m=r==null?void 0:r.email)!=null?m:"Unknown"},{type:"actions",actions:[{label:"Delete",icon:T,dangerous:!0,onClick:async()=>{await c.delete(s,a.id),u()}}]}]}}))!=null?t:[]}});return(e,t)=>(h(),C(P,null,[l(w,{"entity-name":"API key","create-button-text":"Create API Key",loading:i(g),title:"API Keys",description:"API Keys are used to deploy your project from the local editor.","empty-title":"No API keys here yet",table:A.value,fields:p,create:b},null,8,["loading","table"]),l(i(N),{open:!!o.value,title:"Api key generated",onCancel:t[0]||(t[0]=a=>o.value=null)},{footer:d(()=>[]),default:d(()=>[l(i(D),null,{default:d(()=>[y("Your API key was successfully generated. Use this code to login on your local development environment or deploy using CI")]),_:1}),l(i(M),{code:"",copyable:""},{default:d(()=>[y(j(o.value),1)]),_:1})]),_:1},8,["open"])],64))}});export{ee as default};
|
|
2
|
+
//# sourceMappingURL=ApiKeys.f5b7fcec.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./App.vue_vue_type_style_index_0_lang.2264189c.js";import{_ as u}from"./App.vue_vue_type_style_index_0_lang.2264189c.js";import"./userStore.f3109854.js";import"./jwt-decode.esm.7fb8faf4.js";import"./PlayerConfigProvider.ef1e8f48.js";import"./colorHelpers.5dd0cb4f.js";import"./workspaceStore.de299d82.js";import"./url.4e737b7f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d79e4bf7-1eb7-4b06-9eef-0224d8223164",e._sentryDebugIdIdentifier="sentry-dbid-d79e4bf7-1eb7-4b06-9eef-0224d8223164")}catch{}})();export{u as default};
|
|
2
|
+
//# sourceMappingURL=App.46bd8dd6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as r}from"./userStore.f3109854.js";import{W as n}from"./PlayerConfigProvider.ef1e8f48.js";import{u as c}from"./workspaceStore.de299d82.js";import{d,w as i,i as f,u as o,a as p,b as u,h as l,o as m,f as _}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="dc1a0d7f-448a-4aa3-bed2-e5b627e53eac",t._sentryDebugIdIdentifier="sentry-dbid-dc1a0d7f-448a-4aa3-bed2-e5b627e53eac")}catch{}})();const v=d({__name:"App",setup(t){const a=r(),e=c();return e.actions.fetch(),i(()=>a.jwt,e.actions.fetch),(w,y)=>{const s=f("RouterView");return o(e).state.workspace?(m(),p(n,{key:0,"main-color":o(e).state.workspace.mainColor,background:o(e).state.workspace.theme,"font-family":o(e).state.workspace.fontFamily,locale:o(e).state.workspace.language},{default:u(()=>[_(s,{style:{height:"100vh",width:"100%"}})]),_:1},8,["main-color","background","font-family","locale"])):l("",!0)}}});export{v as _};
|
|
2
|
+
//# sourceMappingURL=App.vue_vue_type_style_index_0_lang.2264189c.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as c,o,a5 as n,a7 as s,e as a,h as d}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="eab81425-7098-4cff-aea6-388065b65449",e._sentryDebugIdIdentifier="sentry-dbid-eab81425-7098-4cff-aea6-388065b65449")}catch{}})();const r={},i={class:"base-layout"},_={class:"base-middle"},f={class:"content"},l={class:"left"},u={key:0,class:"base-footer"},b={key:0};function y(e,t){return o(),n("div",i,[s(e.$slots,"sidebar",{},void 0,!0),a("section",_,[s(e.$slots,"navbar",{},void 0,!0),a("section",f,[a("section",l,[s(e.$slots,"content",{},void 0,!0),e.$slots.footer?(o(),n("section",u,[s(e.$slots,"footer",{},void 0,!0)])):d("",!0)]),e.$slots.chat?(o(),n("section",b,[s(e.$slots,"chat",{},void 0,!0)])):d("",!0)])])])}const g=c(r,[["render",y],["__scopeId","data-v-da85ecdc"]]);export{g as B};
|
|
2
|
+
//# sourceMappingURL=BaseLayout.77f1c4c9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _}from"./asyncComputed.
|
|
2
|
-
//# sourceMappingURL=Billing.
|
|
1
|
+
import{a as _}from"./asyncComputed.7b34952b.js";import{d as b,eb as w,J as h,u as e,a as d,a5 as k,f as o,b as t,h as I,o as n,A as f,g as l,ed as C,bR as x,de as c,e as N}from"./jwt-decode.esm.7fb8faf4.js";import{l as g,c as v}from"./router.643f183e.js";import{a as z}from"./organization.0e5f192f.js";import"./tables.736ccb3d.js";import{L as B}from"./LoadingContainer.c883bb34.js";import"./index.d928bc3c.js";import"./record.5fbe6782.js";import"./string.d8337a2b.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="4332ef02-b917-491b-87ac-d7db82b733c6",a._sentryDebugIdIdentifier="sentry-dbid-4332ef02-b917-491b-87ac-d7db82b733c6")}catch{}})();const D={key:1},U=["src"],J=b({__name:"Billing",setup(a){const u=w().params.organizationId,{loading:m,result:r}=_(async()=>{const i=await z.get(u),p=await i.getUsageReportUrl();return{organization:i,reportUrl:p}});h(()=>{location.search.includes("upgrade")&&g.showNewMessage("I want to upgrade my plan")});const y=()=>g.showNewMessage("I want to upgrade my plan");return(i,p)=>e(m)?(n(),d(B,{key:0})):e(r)?(n(),k("div",D,[o(e(c),{justify:"space-between",align:"center"},{default:t(()=>[o(e(f),{level:3},{default:t(()=>[l("Current plan: "+C(e(r).organization.coalescedPlan),1)]),_:1}),o(e(x),{type:"primary",onClick:y},{default:t(()=>[l("Upgrade")]),_:1})]),_:1}),o(e(v),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(n(),d(e(c),{key:0,align:"center",justify:"center"},{default:t(()=>[N("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,U)]),_:1})):(n(),d(e(c),{key:1,align:"center",justify:"center"},{default:t(()=>[o(e(f),{level:4},{default:t(()=>[l("No usage report available")]),_:1})]),_:1}))])):I("",!0)}});export{J as default};
|
|
2
|
+
//# sourceMappingURL=Billing.44a9d31b.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{d as O,ag as w,bT as I,f as c,aj as f,av as R,as as A,e4 as D,bn as P,bP as j,ab as X,ac as z,X as B,an as M,dX as E,aD as N,az as H,ce as L,bx as F}from"./jwt-decode.esm.
|
|
1
|
+
import{d as O,ag as w,bT as I,f as c,aj as f,av as R,as as A,e4 as D,bn as P,bP as j,ab as X,ac as z,X as B,an as M,dX as E,aD as N,az as H,ce as L,bx as F}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="218ef538-0e9d-4e9d-9551-7a510371d04b",r._sentryDebugIdIdentifier="sentry-dbid-218ef538-0e9d-4e9d-9551-7a510371d04b")}catch{}})();var U=globalThis&&globalThis.__rest||function(r,e){var a={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(r);t<n.length;t++)e.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(r,n[t])&&(a[n[t]]=r[n[t]]);return a};const V=()=>({prefixCls:String,href:String,separator:R.any,dropdownProps:A(),overlay:R.any,onClick:D()}),K=O({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:V(),slots:Object,setup(r,e){let{slots:a,attrs:n,emit:t}=e;const{prefixCls:u}=w("breadcrumb",r),y=(d,h)=>{const b=I(a,r,"overlay");return b?c(j,f(f({},r.dropdownProps),{},{overlay:b,placement:"bottom"}),{default:()=>[c("span",{class:`${h}-overlay-link`},[d,c(P,null,null)])]}):d},_=d=>{t("click",d)};return()=>{var d;const h=(d=I(a,r,"separator"))!==null&&d!==void 0?d:"/",b=I(a,r),{class:l,style:s}=n,o=U(n,["class","style"]);let i;return r.href!==void 0?i=c("a",f({class:`${u.value}-link`,onClick:_},o),[b]):i=c("span",f({class:`${u.value}-link`,onClick:_},o),[b]),i=y(i,u.value),b!=null?c("li",{class:l,style:s},[i,h&&c("span",{class:`${u.value}-separator`},[h])]):null}}}),W=r=>{const{componentCls:e,iconCls:a}=r;return{[e]:B(B({},M(r)),{color:r.breadcrumbBaseColor,fontSize:r.breadcrumbFontSize,[a]:{fontSize:r.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:B({color:r.breadcrumbLinkColor,transition:`color ${r.motionDurationMid}`,padding:`0 ${r.paddingXXS}px`,borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",marginInline:-r.marginXXS,"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover}},E(r)),["li:last-child"]:{color:r.breadcrumbLastItemColor,[`& > ${e}-separator`]:{display:"none"}},[`${e}-separator`]:{marginInline:r.breadcrumbSeparatorMargin,color:r.breadcrumbSeparatorColor},[`${e}-link`]:{[`
|
|
2
2
|
> ${a} + span,
|
|
3
3
|
> ${a} + a
|
|
4
4
|
`]:{marginInlineStart:r.marginXXS}},[`${e}-overlay-link`]:{borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",padding:`0 ${r.paddingXXS}px`,marginInline:-r.marginXXS,[`> ${a}`]:{marginInlineStart:r.marginXXS,fontSize:r.fontSizeIcon},"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover,a:{color:r.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${r.componentCls}-rtl`]:{direction:"rtl"}})}},q=X("Breadcrumb",r=>{const e=z(r,{breadcrumbBaseColor:r.colorTextDescription,breadcrumbFontSize:r.fontSize,breadcrumbIconFontSize:r.fontSize,breadcrumbLinkColor:r.colorTextDescription,breadcrumbLinkColorHover:r.colorText,breadcrumbLastItemColor:r.colorText,breadcrumbSeparatorMargin:r.marginXS,breadcrumbSeparatorColor:r.colorTextDescription});return[W(e)]}),G=()=>({prefixCls:String,routes:{type:Array},params:R.any,separator:R.any,itemRender:{type:Function}});function J(r,e){if(!r.breadcrumbName)return null;const a=Object.keys(e).join("|");return r.breadcrumbName.replace(new RegExp(`:(${a})`,"g"),(t,u)=>e[u]||t)}function $(r){const{route:e,params:a,routes:n,paths:t}=r,u=n.indexOf(e)===n.length-1,y=J(e,a);return u?c("span",null,[y]):c("a",{href:`#/${t.join("/")}`},[y])}const Y=O({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:G(),slots:Object,setup(r,e){let{slots:a,attrs:n}=e;const{prefixCls:t,direction:u}=w("breadcrumb",r),[y,_]=q(t),d=(l,s)=>(l=(l||"").replace(/^\//,""),Object.keys(s).forEach(o=>{l=l.replace(`:${o}`,s[o])}),l),h=(l,s,o)=>{const i=[...l],m=d(s||"",o);return m&&i.push(m),i},b=l=>{let{routes:s=[],params:o={},separator:i,itemRender:m=$}=l;const S=[];return s.map(p=>{const C=d(p.path,o);C&&S.push(C);const g=[...S];let v=null;p.children&&p.children.length&&(v=c(F,{items:p.children.map(x=>({key:x.path||x.breadcrumbName,label:m({route:x,params:o,routes:s,paths:h(g,x.path,o)})}))},null));const T={separator:i};return v&&(T.overlay=v),c(K,f(f({},T),{},{key:C||p.breadcrumbName}),{default:()=>[m({route:p,params:o,routes:s,paths:g})]})})};return()=>{var l;let s;const{routes:o,params:i={}}=r,m=N(I(a,r)),S=(l=I(a,r,"separator"))!==null&&l!==void 0?l:"/",p=r.itemRender||a.itemRender||$;o&&o.length>0?s=b({routes:o,params:i,separator:S,itemRender:p}):m.length&&(s=m.map((g,v)=>(H(typeof g.type=="object"&&(g.type.__ANT_BREADCRUMB_ITEM||g.type.__ANT_BREADCRUMB_SEPARATOR)),L(g,{separator:S,key:v}))));const C={[t.value]:!0,[`${t.value}-rtl`]:u.value==="rtl",[`${n.class}`]:!!n.class,[_.value]:!0};return y(c("nav",f(f({},n),{},{class:C}),[c("ol",null,[s])]))}}});export{K as A,Y as B};
|
|
5
|
-
//# sourceMappingURL=Breadcrumb.
|
|
5
|
+
//# sourceMappingURL=Breadcrumb.ef8bd191.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as H}from"./CrudView.8fb84eac.js";import{d as $,am as P,c as x,o as c,a5 as v,a7 as q,h as _,e6 as U,e as C,f as u,e7 as z,f1 as Q,e5 as W,a as f,b as i,u as r,bP as Y,bx as J,bw as X,da as k,g as y,ed as b,cx as K,eb as ee,k as te,j as re,r as ae,aR as le,aV as ne,cN as oe,d9 as ie,a6 as se,d4 as ue,S as ce,M as de,ee as pe,_ as fe}from"./jwt-decode.esm.992666e9.js";import{a as L}from"./asyncComputed.1b787534.js";import{g as me}from"./datetime.adc0acc4.js";import{u as ge}from"./polling.88a266b3.js";import{G as ye}from"./PhArrowCounterClockwise.vue.76c9e146.js";import{H as be}from"./PhCube.vue.b5b96a33.js";import{G as he}from"./PhDownloadSimple.vue.cbca4f9b.js";import{e as ve,d as _e,r as ke}from"./router.1324a1a9.js";import{a as Ce,B as Ae}from"./build.997fec15.js";import{a as Oe}from"./project.76f0af14.js";import"./tables.c26107a1.js";import{G as we}from"./PhClockCounterClockwise.vue.cd77fd26.js";import{F as xe,G as Se,I as Pe}from"./PhUserList.vue.3791cb59.js";import{G as Ze}from"./PhWebhooksLogo.vue.fe81fb65.js";import{A as Z}from"./index.3d2a7b6d.js";import{E as Me}from"./ExclamationCircleOutlined.d410fb9a.js";import{C as je}from"./CloseCircleOutlined.4e05b917.js";import{L as I}from"./LoadingOutlined.ee72932a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import"./constants.36bf7d70.js";import"./url.f490879d.js";import"./PhDotsThreeVertical.vue.2db678ef.js";import"./index.d181a22c.js";import"./record.87ef3b68.js";import"./string.f6a7565f.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[e]="6b1a09e0-4196-4b8f-9161-2a5e028fbe98",l._sentryDebugIdIdentifier="sentry-dbid-6b1a09e0-4196-4b8f-9161-2a5e028fbe98")}catch{}})();var Ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const $e=Ie;var ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const De=ze,Be=["width","height","fill","transform"],Ve={key:0},Ne=C("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Le=[Ne],Ee={key:1},Ge=C("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Te=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Fe=[Ge,Te],Re={key:2},He=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),qe=[He],Ue={key:3},Qe=C("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),We=[Qe],Ye={key:4},Je=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Xe=[Je],Ke={key:5},et=C("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),tt=[et],rt={name:"PhDotsThreeCircle"},at=$({...rt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const e=l,a=P("weight","regular"),d=P("size","1em"),s=P("color","currentColor"),S=P("mirrored",!1),p=x(()=>{var m;return(m=e.weight)!=null?m:a}),w=x(()=>{var m;return(m=e.size)!=null?m:d}),h=x(()=>{var m;return(m=e.color)!=null?m:s}),A=x(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:S?"scale(-1, 1)":void 0);return(m,M)=>(c(),v("svg",U({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:h.value,transform:A.value},m.$attrs),[q(m.$slots,"default"),p.value==="bold"?(c(),v("g",Ve,Le)):p.value==="duotone"?(c(),v("g",Ee,Fe)):p.value==="fill"?(c(),v("g",Re,qe)):p.value==="light"?(c(),v("g",Ue,We)):p.value==="regular"?(c(),v("g",Ye,Xe)):p.value==="thin"?(c(),v("g",Ke,tt)):_("",!0)],16,Be))}});function E(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){lt(l,s,a[s])})}return l}function lt(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var D=function(e,a){var d=E({},e,a.attrs);return u(z,E({},d,{icon:Q}),null)};D.displayName="CheckCircleOutlined";D.inheritAttrs=!1;const nt=D;function G(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){ot(l,s,a[s])})}return l}function ot(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var B=function(e,a){var d=G({},e,a.attrs);return u(z,G({},d,{icon:$e}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function T(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){st(l,s,a[s])})}return l}function st(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var V=function(e,a){var d=T({},e,a.attrs);return u(z,T({},d,{icon:De}),null)};V.displayName="PauseCircleOutlined";V.inheritAttrs=!1;const ut=V,ct={style:{display:"flex","align-items":"center",gap:"5px"}},dt={key:1},pt=$({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const e=l,a=W(),d=s=>{a.push({name:"logs",params:{projectId:e.buildSpec.projectId},query:s.logQuery})};return(s,S)=>s.buildSpec.runtimes.length>0?(c(),f(r(_e),{key:0,"item-layout":"horizontal","data-source":s.buildSpec.runtimes},{renderItem:i(({item:p})=>[u(r(ve),null,{actions:i(()=>[u(r(Y),null,{overlay:i(()=>[u(r(J),null,{default:i(()=>[u(r(X),{onClick:w=>d(p)},{default:i(()=>[C("div",ct,[u(r(we)),u(r(k),null,{default:i(()=>[y(" View Logs")]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:i(()=>[u(r(at),{style:{cursor:"pointer"}})]),_:2},1024)]),default:i(()=>[p.type=="form"?(c(),f(r(Z),{key:0,size:"large"},{default:i(()=>[u(r(xe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="job"?(c(),f(r(Z),{key:1,size:"large"},{default:i(()=>[u(r(Se)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y(b(p.schedule),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="hook"?(c(),f(r(Z),{key:2,size:"large"},{default:i(()=>[u(r(Ze)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/_hooks/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="script"?(c(),f(r(Z),{key:3,size:"large"},{default:i(()=>[u(r(Pe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024)]),_:2},1024)):_("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),v("div",dt,[u(r(K),{description:"No runtimes found. Make sure your project has forms, hooks or jobs before deploying it"})]))}}),ft=$({__name:"Builds",setup(l){const a=ee().params.projectId,{loading:d,result:s,refetch:S}=L(async()=>{const[t,o]=await Promise.all([Ce.list(a),Oe.getStatus(a)]);return{b:t.map(g=>({build:g,status:o.filter(O=>O.buildId==g.id).map(O=>O.status)})),status:o}}),{startPolling:p,endPolling:w}=ge({task:S,interval:1e4});te(()=>p()),re(()=>w());const h=ae(null),A=L(async()=>h.value?await Ae.get(h.value):null),m=()=>{var n;const t=(n=s.value)==null?void 0:n.b.find(g=>g.build.id===h.value);return`Version ${t==null?void 0:t.build.id.slice(0,8)} - ${t==null?void 0:t.build.createdAt.toLocaleString()}`},M=[{text:"Deploying",tagColor:"blue",check:t=>{var o,n;return(n=t.build.latest&&t.status.some(g=>g=="Running")&&((o=s.value)==null?void 0:o.status.some(g=>g.buildId!==t.build.id)))!=null?n:!1},loading:!0},{text:"Deactivating",tagColor:"orange",check:t=>t.build.status==="success"&&!t.build.latest&&t.status.some(o=>o=="Running"),loading:!0},{text:"Live",tagColor:"green",check:t=>t.build.latest&&t.status.some(o=>o=="Running")},{text:"Sleeping",tagColor:"cyan",check:t=>t.build.latest&&t.status.length===0},{text:"Failed",tagColor:"red",check:t=>t.build.latest&&t.status.some(o=>o=="Failed")},{text:"Inactive",tagColor:"default",check:t=>t.build.status==="success"},{text:"Aborted",tagColor:"default",check:t=>t.build.status==="aborted"||t.build.status==="aborted-by-user"},{text:"Failed",tagColor:"orange",check:t=>t.build.status==="failure"},{text:"Deploying",tagColor:"blue",check:t=>t.build.status==="in-progress",loading:!0},{text:"Uploading",tagColor:"yellow",check:t=>t.build.status==="pending"}];function F(t){var o,n,g,O,N;return{text:(n=(o=M.find(j=>j.check(t)))==null?void 0:o.text)!=null?n:"unknown",tagColor:(O=(g=M.find(j=>j.check(t)))==null?void 0:g.tagColor)!=null?O:"default",hover:(N=t.build.log)!=null?N:void 0}}const R=x(()=>{const t=[{title:"Id"},{title:"Date"},{title:"Abstra Version"},{title:"Status"},{title:"",align:"right"}];return s.value?{columns:t,rows:s.value.b.map(o=>{var n;return{key:o.build.id,cells:[{type:"text",text:o.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:me(o.build.createdAt,{weekday:void 0}),distance:pe(o.build.createdAt)}},{type:"text",text:(n=o.build.abstraVersion)!=null?n:"-"},{key:"status",type:"slot",payload:F(o)},{type:"actions",actions:[{icon:be,label:"Inspect version",onClick:async()=>{h.value=o.build.id,A.refetch()}},{icon:ye,label:"View application logs",onClick:()=>{ke.push({name:"logs",params:{projectId:a},query:{buildId:o.build.id}})}},{icon:he,label:"Download files",onClick:()=>o.build.download()}]}]}})}:{columns:t,rows:[]}});return(t,o)=>(c(),v(le,null,[u(H,{"entity-name":"build",loading:r(d),title:"Version History",description:"You can create a new version by publishing your project from the local editor.","empty-title":"No versions here yet",table:R.value,live:""},{date:i(({payload:n})=>[u(r(ne),null,{title:i(()=>[y(b(n.distance),1)]),default:i(()=>[y(b(n.date)+" ",1)]),_:2},1024)]),status:i(({payload:n})=>[u(r(oe),{open:n.hover?void 0:!1},{content:i(()=>[u(r(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:n.hover,copyable:""},null,8,["content"])]),default:i(()=>[n.text!=="unknown"?(c(),f(r(ue),{key:0,color:n.tagColor,style:se({cursor:n.hover?"pointer":"default"})},{default:i(()=>[n.text==="Live"?(c(),f(r(nt),{key:0})):n.text==="Inactive"?(c(),f(r(it),{key:1})):n.text==="Failed"?(c(),f(r(Me),{key:2})):n.text==="Aborted"?(c(),f(r(je),{key:3})):n.text==="Sleeping"?(c(),f(r(ut),{key:4})):n.text==="Uploading"?(c(),f(r(I),{key:5})):n.text==="Deploying"?(c(),f(r(I),{key:6})):n.text==="Deactivating"?(c(),f(r(I),{key:7})):_("",!0),y(" "+b(n.text),1)]),_:2},1032,["color","style"])):_("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","table"]),h.value?(c(),f(r(de),{key:0,footer:null,open:!!h.value,size:"large",width:"80%",title:m(),onCancel:o[0]||(o[0]=n=>h.value=null)},{default:i(()=>[!r(A).result.value||r(A).loading.value?(c(),f(r(ce),{key:0})):r(A).result.value?(c(),f(pt,{key:1,"build-spec":r(A).result.value},null,8,["build-spec"])):_("",!0)]),_:1},8,["open","title"])):_("",!0)],64))}});const Et=fe(ft,[["__scopeId","data-v-9615f578"]]);export{Et as default};
|
|
2
|
-
//# sourceMappingURL=Builds.
|
|
1
|
+
import{C as H}from"./CrudView.d06da8d4.js";import{d as $,am as P,c as x,o as c,a5 as v,a7 as q,h as _,e6 as U,e as C,f as u,e7 as z,f1 as J,e5 as Q,a as f,b as i,u as r,bP as W,bx as Y,bw as X,da as k,g as y,ed as b,cx as K,eb as ee,J as te,I as re,r as ae,aR as le,aV as ne,cN as oe,d9 as ie,a6 as se,d4 as ue,S as ce,M as de,ee as pe,_ as fe}from"./jwt-decode.esm.7fb8faf4.js";import{a as L}from"./asyncComputed.7b34952b.js";import{g as me}from"./datetime.2d5b6900.js";import{u as ge}from"./polling.41905ad0.js";import{G as ye}from"./PhArrowCounterClockwise.vue.a4f3391b.js";import{H as be}from"./PhCube.vue.8321d975.js";import{G as he}from"./PhDownloadSimple.vue.4c39fa52.js";import{e as ve,d as _e,r as ke}from"./router.643f183e.js";import{a as Ce,B as Ae}from"./build.71b8e04b.js";import{a as Oe}from"./project.47800fcd.js";import"./tables.736ccb3d.js";import{G as we}from"./PhClockCounterClockwise.vue.f3d7a5f0.js";import{F as xe,G as Se,I as Pe}from"./PhUserList.vue.5cfe135b.js";import{G as Ze}from"./PhWebhooksLogo.vue.f667599c.js";import{A as Z}from"./index.3404e7dd.js";import{E as Me}from"./ExclamationCircleOutlined.5510023c.js";import{C as Ie}from"./CloseCircleOutlined.3d4e81d4.js";import{L as j}from"./LoadingOutlined.f4b4629a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a3f96825.js";import"./constants.60cb557d.js";import"./url.4e737b7f.js";import"./PhDotsThreeVertical.vue.377e8248.js";import"./index.d928bc3c.js";import"./record.5fbe6782.js";import"./string.d8337a2b.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[e]="bda48949-b0ec-4aef-9648-471c29eeed35",l._sentryDebugIdIdentifier="sentry-dbid-bda48949-b0ec-4aef-9648-471c29eeed35")}catch{}})();var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const $e=je;var ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const De=ze,Be=["width","height","fill","transform"],Ve={key:0},Ne=C("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Le=[Ne],Ee={key:1},Ge=C("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Te=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Fe=[Ge,Te],Re={key:2},He=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),qe=[He],Ue={key:3},Je=C("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),Qe=[Je],We={key:4},Ye=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Xe=[Ye],Ke={key:5},et=C("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),tt=[et],rt={name:"PhDotsThreeCircle"},at=$({...rt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const e=l,a=P("weight","regular"),d=P("size","1em"),s=P("color","currentColor"),S=P("mirrored",!1),p=x(()=>{var m;return(m=e.weight)!=null?m:a}),w=x(()=>{var m;return(m=e.size)!=null?m:d}),h=x(()=>{var m;return(m=e.color)!=null?m:s}),A=x(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:S?"scale(-1, 1)":void 0);return(m,M)=>(c(),v("svg",U({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:h.value,transform:A.value},m.$attrs),[q(m.$slots,"default"),p.value==="bold"?(c(),v("g",Ve,Le)):p.value==="duotone"?(c(),v("g",Ee,Fe)):p.value==="fill"?(c(),v("g",Re,qe)):p.value==="light"?(c(),v("g",Ue,Qe)):p.value==="regular"?(c(),v("g",We,Xe)):p.value==="thin"?(c(),v("g",Ke,tt)):_("",!0)],16,Be))}});function E(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){lt(l,s,a[s])})}return l}function lt(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var D=function(e,a){var d=E({},e,a.attrs);return u(z,E({},d,{icon:J}),null)};D.displayName="CheckCircleOutlined";D.inheritAttrs=!1;const nt=D;function G(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){ot(l,s,a[s])})}return l}function ot(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var B=function(e,a){var d=G({},e,a.attrs);return u(z,G({},d,{icon:$e}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function T(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){st(l,s,a[s])})}return l}function st(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var V=function(e,a){var d=T({},e,a.attrs);return u(z,T({},d,{icon:De}),null)};V.displayName="PauseCircleOutlined";V.inheritAttrs=!1;const ut=V,ct={style:{display:"flex","align-items":"center",gap:"5px"}},dt={key:1},pt=$({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const e=l,a=Q(),d=s=>{a.push({name:"logs",params:{projectId:e.buildSpec.projectId},query:s.logQuery})};return(s,S)=>s.buildSpec.runtimes.length>0?(c(),f(r(_e),{key:0,"item-layout":"horizontal","data-source":s.buildSpec.runtimes},{renderItem:i(({item:p})=>[u(r(ve),null,{actions:i(()=>[u(r(W),null,{overlay:i(()=>[u(r(Y),null,{default:i(()=>[u(r(X),{onClick:w=>d(p)},{default:i(()=>[C("div",ct,[u(r(we)),u(r(k),null,{default:i(()=>[y(" View Logs")]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:i(()=>[u(r(at),{style:{cursor:"pointer"}})]),_:2},1024)]),default:i(()=>[p.type=="form"?(c(),f(r(Z),{key:0,size:"large"},{default:i(()=>[u(r(xe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="job"?(c(),f(r(Z),{key:1,size:"large"},{default:i(()=>[u(r(Se)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y(b(p.schedule),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="hook"?(c(),f(r(Z),{key:2,size:"large"},{default:i(()=>[u(r(Ze)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/_hooks/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="script"?(c(),f(r(Z),{key:3,size:"large"},{default:i(()=>[u(r(Pe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024)]),_:2},1024)):_("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),v("div",dt,[u(r(K),{description:"No runtimes found. Make sure your project has forms, hooks or jobs before deploying it"})]))}}),ft=$({__name:"Builds",setup(l){const a=ee().params.projectId,{loading:d,result:s,refetch:S}=L(async()=>{const[t,o]=await Promise.all([Ce.list(a),Oe.getStatus(a)]);return{b:t.map(g=>({build:g,status:o.filter(O=>O.buildId==g.id).map(O=>O.status)})),status:o}}),{startPolling:p,endPolling:w}=ge({task:S,interval:1e4});te(()=>p()),re(()=>w());const h=ae(null),A=L(async()=>h.value?await Ae.get(h.value):null),m=()=>{var n;const t=(n=s.value)==null?void 0:n.b.find(g=>g.build.id===h.value);return`Version ${t==null?void 0:t.build.id.slice(0,8)} - ${t==null?void 0:t.build.createdAt.toLocaleString()}`},M=[{text:"Deploying",tagColor:"blue",check:t=>{var o,n;return(n=t.build.latest&&t.status.some(g=>g=="Running")&&((o=s.value)==null?void 0:o.status.some(g=>g.buildId!==t.build.id)))!=null?n:!1},loading:!0},{text:"Deactivating",tagColor:"orange",check:t=>t.build.status==="success"&&!t.build.latest&&t.status.some(o=>o=="Running"),loading:!0},{text:"Live",tagColor:"green",check:t=>t.build.latest&&t.status.some(o=>o=="Running")},{text:"Sleeping",tagColor:"cyan",check:t=>t.build.latest&&t.status.length===0},{text:"Failed",tagColor:"red",check:t=>t.build.latest&&t.status.some(o=>o=="Failed")},{text:"Inactive",tagColor:"default",check:t=>t.build.status==="success"},{text:"Aborted",tagColor:"default",check:t=>t.build.status==="aborted"||t.build.status==="aborted-by-user"},{text:"Failed",tagColor:"orange",check:t=>t.build.status==="failure"},{text:"Deploying",tagColor:"blue",check:t=>t.build.status==="in-progress",loading:!0},{text:"Uploading",tagColor:"yellow",check:t=>t.build.status==="pending"}];function F(t){var o,n,g,O,N;return{text:(n=(o=M.find(I=>I.check(t)))==null?void 0:o.text)!=null?n:"unknown",tagColor:(O=(g=M.find(I=>I.check(t)))==null?void 0:g.tagColor)!=null?O:"default",hover:(N=t.build.log)!=null?N:void 0}}const R=x(()=>{const t=[{title:"Id"},{title:"Date"},{title:"Abstra Version"},{title:"Status"},{title:"",align:"right"}];return s.value?{columns:t,rows:s.value.b.map(o=>{var n;return{key:o.build.id,cells:[{type:"text",text:o.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:me(o.build.createdAt,{weekday:void 0}),distance:pe(o.build.createdAt)}},{type:"text",text:(n=o.build.abstraVersion)!=null?n:"-"},{key:"status",type:"slot",payload:F(o)},{type:"actions",actions:[{icon:be,label:"Inspect version",onClick:async()=>{h.value=o.build.id,A.refetch()}},{icon:ye,label:"View application logs",onClick:()=>{ke.push({name:"logs",params:{projectId:a},query:{buildId:o.build.id}})}},{icon:he,label:"Download files",onClick:()=>o.build.download()}]}]}})}:{columns:t,rows:[]}});return(t,o)=>(c(),v(le,null,[u(H,{"entity-name":"build",loading:r(d),title:"Version History",description:"You can create a new version by publishing your project from the local editor.","empty-title":"No versions here yet",table:R.value,live:""},{date:i(({payload:n})=>[u(r(ne),null,{title:i(()=>[y(b(n.distance),1)]),default:i(()=>[y(b(n.date)+" ",1)]),_:2},1024)]),status:i(({payload:n})=>[u(r(oe),{open:n.hover?void 0:!1},{content:i(()=>[u(r(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:n.hover,copyable:""},null,8,["content"])]),default:i(()=>[n.text!=="unknown"?(c(),f(r(ue),{key:0,color:n.tagColor,style:se({cursor:n.hover?"pointer":"default"})},{default:i(()=>[n.text==="Live"?(c(),f(r(nt),{key:0})):n.text==="Inactive"?(c(),f(r(it),{key:1})):n.text==="Failed"?(c(),f(r(Me),{key:2})):n.text==="Aborted"?(c(),f(r(Ie),{key:3})):n.text==="Sleeping"?(c(),f(r(ut),{key:4})):n.text==="Uploading"?(c(),f(r(j),{key:5})):n.text==="Deploying"?(c(),f(r(j),{key:6})):n.text==="Deactivating"?(c(),f(r(j),{key:7})):_("",!0),y(" "+b(n.text),1)]),_:2},1032,["color","style"])):_("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","table"]),h.value?(c(),f(r(de),{key:0,footer:null,open:!!h.value,size:"large",width:"80%",title:m(),onCancel:o[0]||(o[0]=n=>h.value=null)},{default:i(()=>[!r(A).result.value||r(A).loading.value?(c(),f(r(ce),{key:0})):r(A).result.value?(c(),f(pt,{key:1,"build-spec":r(A).result.value},null,8,["build-spec"])):_("",!0)]),_:1},8,["open","title"])):_("",!0)],64))}});const Et=fe(ft,[["__scopeId","data-v-9615f578"]]);export{Et as default};
|
|
2
|
+
//# sourceMappingURL=Builds.4efe7d0f.js.map
|