@elyx-code/editor-ui 0.0.2
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.
- package/README.md +2 -0
- package/package.json +109 -0
- package/src/App.tsx +31 -0
- package/src/Router.tsx +115 -0
- package/src/__mocks__/defaultModuleMock.ts +1 -0
- package/src/__mocks__/fileMock.ts +1 -0
- package/src/__mocks__/styleMock.ts +1 -0
- package/src/assets/Clock-11.1s-18px.svg +16 -0
- package/src/assets/Clock-11.1s-28px.svg +16 -0
- package/src/assets/authentication.svg +1 -0
- package/src/assets/canvas-backdrop-0.png +0 -0
- package/src/assets/canvas-backdrop-1.png +0 -0
- package/src/assets/canvas-backdrop-2.png +0 -0
- package/src/assets/canvas-backdrop-3.png +0 -0
- package/src/assets/canvas-backdrop-4.png +0 -0
- package/src/assets/canvas-backdrop-5.png +0 -0
- package/src/assets/canvas-backdrop.png +0 -0
- package/src/assets/checkmark-animation.gif +0 -0
- package/src/assets/checkmark-animation.mp4 +0 -0
- package/src/assets/code-formatting/format-black.svg +6 -0
- package/src/assets/code-formatting/format-dark-grey.svg +6 -0
- package/src/assets/code-formatting/format-light-grey.svg +6 -0
- package/src/assets/code-formatting/format-white.svg +6 -0
- package/src/assets/code-formatting/inline-black.svg +5 -0
- package/src/assets/code-formatting/inline-dark-grey.svg +5 -0
- package/src/assets/code-formatting/inline-light-grey.svg +5 -0
- package/src/assets/code-formatting/inline-white.svg +5 -0
- package/src/assets/contained-logo-full-word.png +0 -0
- package/src/assets/cron-job-color.png +0 -0
- package/src/assets/cron-job.png +0 -0
- package/src/assets/database-table-color.png +0 -0
- package/src/assets/database-table.png +0 -0
- package/src/assets/datatype-icons/black/any.svg +1 -0
- package/src/assets/datatype-icons/black/binary.svg +1 -0
- package/src/assets/datatype-icons/black/boolean.svg +3 -0
- package/src/assets/datatype-icons/black/date-time.svg +3 -0
- package/src/assets/datatype-icons/black/definition-entity.svg +6 -0
- package/src/assets/datatype-icons/black/key-file.svg +1 -0
- package/src/assets/datatype-icons/black/list.svg +3 -0
- package/src/assets/datatype-icons/black/null.svg +3 -0
- package/src/assets/datatype-icons/black/number.svg +13 -0
- package/src/assets/datatype-icons/black/project.svg +12 -0
- package/src/assets/datatype-icons/black/sql-program.svg +2 -0
- package/src/assets/datatype-icons/black/text.svg +3 -0
- package/src/assets/datatype-icons/black/unknown.svg +3 -0
- package/src/assets/datatype-icons/black/uuid.svg +4 -0
- package/src/assets/datatype-icons/black/void.svg +1 -0
- package/src/assets/datatype-icons/dark-grey/any.svg +1 -0
- package/src/assets/datatype-icons/dark-grey/boolean.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/date-time.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/definition-entity.svg +6 -0
- package/src/assets/datatype-icons/dark-grey/list.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/null.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/number.svg +13 -0
- package/src/assets/datatype-icons/dark-grey/project.svg +12 -0
- package/src/assets/datatype-icons/dark-grey/sql-program.svg +2 -0
- package/src/assets/datatype-icons/dark-grey/text.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/unknown.svg +3 -0
- package/src/assets/datatype-icons/dark-grey/uuid.svg +4 -0
- package/src/assets/datatype-icons/dark-grey/void.svg +1 -0
- package/src/assets/datatype-icons/light-grey/any.svg +1 -0
- package/src/assets/datatype-icons/light-grey/boolean.svg +3 -0
- package/src/assets/datatype-icons/light-grey/date-time.svg +3 -0
- package/src/assets/datatype-icons/light-grey/definition-entity.svg +6 -0
- package/src/assets/datatype-icons/light-grey/list.svg +3 -0
- package/src/assets/datatype-icons/light-grey/null.svg +3 -0
- package/src/assets/datatype-icons/light-grey/number.svg +13 -0
- package/src/assets/datatype-icons/light-grey/project.svg +12 -0
- package/src/assets/datatype-icons/light-grey/sql-program.svg +2 -0
- package/src/assets/datatype-icons/light-grey/text.svg +3 -0
- package/src/assets/datatype-icons/light-grey/unknown.svg +3 -0
- package/src/assets/datatype-icons/light-grey/uuid.svg +4 -0
- package/src/assets/datatype-icons/light-grey/void.svg +1 -0
- package/src/assets/edit.png +0 -0
- package/src/assets/execution.svg +13 -0
- package/src/assets/favicon.svg +14 -0
- package/src/assets/file-search.svg +1 -0
- package/src/assets/http-endpoint.png +0 -0
- package/src/assets/image-input-placeholder.png +0 -0
- package/src/assets/logo-full-word-white.png +0 -0
- package/src/assets/logo-full-word.png +0 -0
- package/src/assets/password.svg +85 -0
- package/src/assets/pencil.png +0 -0
- package/src/assets/publish-project-rich-icon-2.svg +1 -0
- package/src/assets/publish-project-rich-icon.svg +1 -0
- package/src/assets/relational-database.png +0 -0
- package/src/assets/resources.svg +3 -0
- package/src/assets/resume-icon-14px.png +0 -0
- package/src/assets/server.png +0 -0
- package/src/assets/small-status/checkmark.svg +4 -0
- package/src/assets/small-status/error.svg +4 -0
- package/src/assets/small-status/loading.svg +4 -0
- package/src/assets/small-status/skipped.svg +11 -0
- package/src/assets/sql-connection-config.svg +1 -0
- package/src/assets/sql-row-transformer.svg +1 -0
- package/src/assets/ssl-certificate-config.svg +1 -0
- package/src/assets/sync.svg +1 -0
- package/src/assets/testing-logic-icon.svg +1 -0
- package/src/assets/versions.svg +25 -0
- package/src/assets/visual-programming-icon.svg +1 -0
- package/src/assets/warning-sign-24px.png +0 -0
- package/src/auth/index.ts +318 -0
- package/src/components/DialogLoader.tsx +94 -0
- package/src/components/EntityDialogHeader.tsx +110 -0
- package/src/components/EntityDialogSectionHeader.tsx +214 -0
- package/src/components/GalleryAddExternalIntegrationInfoDialog.tsx +87 -0
- package/src/components/GenerateProjectStartingLogicPromptDialog.tsx +281 -0
- package/src/components/LegacyRouteRedirector.tsx +55 -0
- package/src/components/ProPlanChip.tsx +23 -0
- package/src/components/ReportBugDialog.tsx +412 -0
- package/src/components/RequestIntegrationAccessDialog.tsx +261 -0
- package/src/components/UseTemplateProjectDialog.tsx +193 -0
- package/src/components/WorkspaceLayout.tsx +152 -0
- package/src/components/animated-svg/AnimatedCheckmark.tsx +41 -0
- package/src/components/animated-svg/AnimatedCrossmark.tsx +51 -0
- package/src/components/animated-svg/AnimatedEmailSending.tsx +38 -0
- package/src/components/animated-svg/AnimatedLoading.tsx +72 -0
- package/src/components/animated-svg/animated-svg.css +239 -0
- package/src/components/canvas/Canvas.tsx +16 -0
- package/src/components/canvas/CreateEntityMenu.tsx +2020 -0
- package/src/components/canvas/canvas.css +10 -0
- package/src/components/canvas/create-entity-menu.css +579 -0
- package/src/components/canvas-search/CanvasSearch.tsx +501 -0
- package/src/components/canvas-search/canvas-search.css +126 -0
- package/src/components/canvas-settings-menu/CanvasSettingsMenuButton.tsx +515 -0
- package/src/components/canvas-settings-menu/canvas-settings-menu.css +96 -0
- package/src/components/circular-image-upload/CircularImageUpload.tsx +113 -0
- package/src/components/circular-image-upload/circular-image-upload.css +69 -0
- package/src/components/costs/CostsDialog.tsx +459 -0
- package/src/components/data-type/DataTypeBuilder.tsx +3127 -0
- package/src/components/data-type/data-type-builder.css +45 -0
- package/src/components/dialogs/BetaAcknowledgeDialog.tsx +43 -0
- package/src/components/dialogs/ComplexDataDialog.tsx +458 -0
- package/src/components/dialogs/CronBuilderDialog.tsx +2145 -0
- package/src/components/dialogs/ExternalIntegrationConnections.tsx +565 -0
- package/src/components/dialogs/JsonEditorDialog.tsx +1392 -0
- package/src/components/dialogs/StringEditorDialog.tsx +268 -0
- package/src/components/dialogs/argument-declaration/ArgumentDeclaration.tsx +1167 -0
- package/src/components/dialogs/argument-declaration/ArgumentDeclarationDialogContent.tsx +128 -0
- package/src/components/dialogs/beta-dialog.css +165 -0
- package/src/components/dialogs/condition/Condition.tsx +431 -0
- package/src/components/dialogs/condition/ConditionDialogContent.tsx +126 -0
- package/src/components/dialogs/definition-entity/DefinitionEntityDialogContent.tsx +973 -0
- package/src/components/dialogs/function-call/FunctionCall.tsx +442 -0
- package/src/components/dialogs/function-call/FunctionCallDialogContent.tsx +126 -0
- package/src/components/dialogs/function-declaration/FunctionDeclaration.tsx +926 -0
- package/src/components/dialogs/function-declaration/FunctionDeclarationDialogContent.tsx +124 -0
- package/src/components/dialogs/generating-project-starting-logic-overlay/GeneratingProjectStartingLogicOverlay.tsx +176 -0
- package/src/components/dialogs/generating-project-starting-logic-overlay/generating-project-starting-logic-overlay.css +13 -0
- package/src/components/dialogs/global-event/GlobalEvent.tsx +475 -0
- package/src/components/dialogs/global-event/GlobalEventDialogContent.tsx +126 -0
- package/src/components/dialogs/help/HelpDialog.tsx +217 -0
- package/src/components/dialogs/help/HelpDilalogHomeContent.tsx +178 -0
- package/src/components/dialogs/help/help-dialog.css +116 -0
- package/src/components/dialogs/help/help-icon/HelpIconButton.tsx +41 -0
- package/src/components/dialogs/help/help-icon/help-icon.css +9 -0
- package/src/components/dialogs/input-map/InputMap.tsx +635 -0
- package/src/components/dialogs/input-map/InputMapDialogContent.tsx +126 -0
- package/src/components/dialogs/json-editor-dialog.css +4 -0
- package/src/components/dialogs/loop/Loop.tsx +650 -0
- package/src/components/dialogs/loop/LoopDialogContent.tsx +122 -0
- package/src/components/dialogs/operation/Operation.tsx +440 -0
- package/src/components/dialogs/operation/OperationDialogContent.tsx +126 -0
- package/src/components/dialogs/output-map/OutputMap.tsx +536 -0
- package/src/components/dialogs/output-map/OutputMapDialogContent.tsx +126 -0
- package/src/components/dialogs/property/Property.tsx +1490 -0
- package/src/components/dialogs/property/PropertyDialogContent.tsx +106 -0
- package/src/components/dialogs/search-statement/ColumnSelector.tsx +334 -0
- package/src/components/dialogs/search-statement/ConditionBuilder.tsx +750 -0
- package/src/components/dialogs/search-statement/DataAggregationSection.tsx +621 -0
- package/src/components/dialogs/search-statement/DataSourceSelection.tsx +734 -0
- package/src/components/dialogs/search-statement/EntityMetadataSection.tsx +135 -0
- package/src/components/dialogs/search-statement/FilterConditionsSection.tsx +151 -0
- package/src/components/dialogs/search-statement/InlineInputMap.tsx +153 -0
- package/src/components/dialogs/search-statement/LiteralValue.tsx +616 -0
- package/src/components/dialogs/search-statement/MainSourceAndInputsSection.tsx +271 -0
- package/src/components/dialogs/search-statement/NestedSearchStatementBuilder.tsx +170 -0
- package/src/components/dialogs/search-statement/OutputFormatSection.tsx +1779 -0
- package/src/components/dialogs/search-statement/ResultsSection.tsx +344 -0
- package/src/components/dialogs/search-statement/SearchStatementBuilder.tsx +251 -0
- package/src/components/dialogs/search-statement/SearchStatementDialogContent.tsx +398 -0
- package/src/components/dialogs/search-statement/ValueSelector.tsx +766 -0
- package/src/components/dialogs/search-statement/search-statement-context.tsx +1630 -0
- package/src/components/dialogs/search-statement/search-statement-dialog.css +56 -0
- package/src/components/dialogs/search-statement/test.sql +111 -0
- package/src/components/dialogs/value-descriptor/ValueDescriptor.tsx +824 -0
- package/src/components/dialogs/value-descriptor/ValueDescriptorDialogContent.tsx +124 -0
- package/src/components/dialogs/variable-declaration/VariableDeclaration.tsx +836 -0
- package/src/components/dialogs/variable-declaration/VariableDeclarationDialogContent.tsx +106 -0
- package/src/components/dialogs/variable-instance/VariableInstance.tsx +443 -0
- package/src/components/dialogs/variable-instance/VariableInstanceDialogContent.tsx +124 -0
- package/src/components/draggable-entity-card/ArgumentDeclaration.tsx +736 -0
- package/src/components/draggable-entity-card/CollapseEntityButton.tsx +170 -0
- package/src/components/draggable-entity-card/ConditionCard.tsx +1062 -0
- package/src/components/draggable-entity-card/ConnectionDeleteButton.tsx +309 -0
- package/src/components/draggable-entity-card/DataTypeIcon.tsx +624 -0
- package/src/components/draggable-entity-card/DraggableEntityCard.tsx +617 -0
- package/src/components/draggable-entity-card/ErrorMapProperty.tsx +464 -0
- package/src/components/draggable-entity-card/EventCard.tsx +700 -0
- package/src/components/draggable-entity-card/ExecutionInProgressValue.tsx +327 -0
- package/src/components/draggable-entity-card/FunctionDeclarationCard.tsx +819 -0
- package/src/components/draggable-entity-card/InputMapProperty.tsx +1067 -0
- package/src/components/draggable-entity-card/InternalCall.tsx +978 -0
- package/src/components/draggable-entity-card/InternalCallExecutionNode.tsx +643 -0
- package/src/components/draggable-entity-card/LogicScopeCallerNode.tsx +262 -0
- package/src/components/draggable-entity-card/LoopCard.tsx +791 -0
- package/src/components/draggable-entity-card/MainValueInput.tsx +523 -0
- package/src/components/draggable-entity-card/MainValueOutput.tsx +458 -0
- package/src/components/draggable-entity-card/MethodDeclaration.tsx +1088 -0
- package/src/components/draggable-entity-card/NestedCondition.tsx +1025 -0
- package/src/components/draggable-entity-card/OutputMapProperty.tsx +843 -0
- package/src/components/draggable-entity-card/PassthroughEntityCard.tsx +1247 -0
- package/src/components/draggable-entity-card/ReturnedError.tsx +549 -0
- package/src/components/draggable-entity-card/SmallSuccessFailureNodes.tsx +523 -0
- package/src/components/draggable-entity-card/SuccessFailureNodes.tsx +509 -0
- package/src/components/draggable-entity-card/TestEntityButton.tsx +946 -0
- package/src/components/draggable-entity-card/TestMenu.tsx +523 -0
- package/src/components/draggable-entity-card/TestMenuValidationDropdown.tsx +84 -0
- package/src/components/draggable-entity-card/UnreachableMarker.tsx +114 -0
- package/src/components/draggable-entity-card/VariableCard.tsx +1577 -0
- package/src/components/draggable-entity-card/VariableScopeMarker.tsx +117 -0
- package/src/components/draggable-entity-card/collapse-entity-button.css +44 -0
- package/src/components/draggable-entity-card/definition-entity/DefinitionEntityCard.tsx +1181 -0
- package/src/components/draggable-entity-card/definition-entity/DefinitionEntityIcon.tsx +36 -0
- package/src/components/draggable-entity-card/definition-entity/DefinitionEntityProperty.tsx +478 -0
- package/src/components/draggable-entity-card/definition-entity/DynamicFooterActions.tsx +112 -0
- package/src/components/draggable-entity-card/definition-entity/actions/external-integration-connection/ExportCredentialsFooterAction.tsx +461 -0
- package/src/components/draggable-entity-card/definition-entity/actions/external-integration-connection/RestablishConnectionFooterAction.tsx +199 -0
- package/src/components/draggable-entity-card/definition-entity/actions/external-integration-connection/restablish-connection-footer-action.css +85 -0
- package/src/components/draggable-entity-card/definition-entity/actions/google-drive/GoogleDriveFilePickerAPIFooterAction.tsx +277 -0
- package/src/components/draggable-entity-card/definition-entity/actions/google-drive/google-drive-file-picker-api-footer-action.css +107 -0
- package/src/components/draggable-entity-card/definition-entity/actions/persisted-entity/DatabaseFooterAction.tsx +452 -0
- package/src/components/draggable-entity-card/definition-entity/actions/persisted-entity/database-footer-action.css +86 -0
- package/src/components/draggable-entity-card/definition-entity/definition-entity-card.css +17 -0
- package/src/components/draggable-entity-card/draggable-entity-card.css +1140 -0
- package/src/components/draggable-entity-card/entity-locked-icon/EntityLockedIcon.tsx +133 -0
- package/src/components/draggable-entity-card/entity-locked-icon/entity-locked.css +8 -0
- package/src/components/draggable-entity-card/expand-properties-icon-button/ExpandPropertiesIconButton.tsx +84 -0
- package/src/components/draggable-entity-card/expand-properties-icon-button/expand-properties-icon-button.css +21 -0
- package/src/components/draggable-entity-card/implement-entity-icon/ImplementEntityIcon.tsx +74 -0
- package/src/components/draggable-entity-card/implement-entity-icon/implement-entity-icon.css +13 -0
- package/src/components/draggable-entity-card/logic-error/LogicErrorIconMenu.tsx +424 -0
- package/src/components/draggable-entity-card/logic-error/logic-error.css +23 -0
- package/src/components/draggable-entity-card/new-card-input-button/NewCardInputButton.tsx +193 -0
- package/src/components/draggable-entity-card/new-card-input-button/NewDynamicInputButton.tsx +214 -0
- package/src/components/draggable-entity-card/new-card-input-button/new-card-input-button.css +71 -0
- package/src/components/draggable-entity-card/new-card-output-button/NewCardOutputButton.tsx +192 -0
- package/src/components/draggable-entity-card/new-card-output-button/new-card-output-button.css +71 -0
- package/src/components/draggable-entity-card/termination-statement/TerminationStatementCard.tsx +1543 -0
- package/src/components/draggable-entity-card/termination-statement/termination-statement-card.css +17 -0
- package/src/components/draggable-entity-card/test-entity-button.css +55 -0
- package/src/components/draggable-entity-card/test-menu.css +181 -0
- package/src/components/draggable-entity-card/unreachable-marker.css +43 -0
- package/src/components/draggable-entity-card/variable-scope-marker.css +22 -0
- package/src/components/dynamic-value/DynamicValue.tsx +2395 -0
- package/src/components/dynamic-value/DynamicValueEntry.tsx +1957 -0
- package/src/components/dynamic-value/dynamic-value.css +230 -0
- package/src/components/editor/ElyxMonacoEditor.tsx +38 -0
- package/src/components/entity-error/EntityErrorListItem.tsx +47 -0
- package/src/components/entity-error/entity-error.css +198 -0
- package/src/components/entity-icon/EntityIcon.tsx +292 -0
- package/src/components/entity-icon/entity-icon.css +39 -0
- package/src/components/gallery-card/CreateNewProject.tsx +222 -0
- package/src/components/gallery-card/GalleryCard.tsx +171 -0
- package/src/components/gallery-card/MarketplaceCard.tsx +87 -0
- package/src/components/gallery-card/ProjectDuplicationCard.tsx +575 -0
- package/src/components/gallery-card/gallery-card.css +25 -0
- package/src/components/notifications/NotificationsIconButton.tsx +124 -0
- package/src/components/notifications/NotificationsPanel.tsx +385 -0
- package/src/components/notifications/notifications.css +189 -0
- package/src/components/online-users/LocalOnlineUsers.tsx +175 -0
- package/src/components/online-users/PageOnlineUsers.tsx +297 -0
- package/src/components/online-users/online-users.css +72 -0
- package/src/components/page-backdrop/PageBackdrop.tsx +8 -0
- package/src/components/page-backdrop/page-backdrop.css +7 -0
- package/src/components/project-configuration/DeleteProjectConfirmationDialog.tsx +134 -0
- package/src/components/project-configuration/ProjectConfigurationDialog.tsx +972 -0
- package/src/components/project-configuration/ProjectDataForm.tsx +121 -0
- package/src/components/project-configuration/UnpublishProjectConfirmationDialog.tsx +162 -0
- package/src/components/project-configuration/project-configuration-content.css +209 -0
- package/src/components/project-name/ProjectName.tsx +2025 -0
- package/src/components/project-name/project-name.css +599 -0
- package/src/components/publishing/Publication.tsx +133 -0
- package/src/components/publishing/history/PublicationHistoryContent.tsx +414 -0
- package/src/components/publishing/history/PublicationHistoryDialog.tsx +234 -0
- package/src/components/publishing/preview/PublicationPreviewDialog.tsx +1158 -0
- package/src/components/publishing/preview/PublishingPriceForecast.tsx +160 -0
- package/src/components/publishing/preview/PublishingResourcesDetails.tsx +91 -0
- package/src/components/publishing/publication-sequence/PublishingSequenceContent.tsx +375 -0
- package/src/components/publishing/publication-sequence/PublishingSequenceDialog.tsx +344 -0
- package/src/components/publishing/publishing-dialog.css +142 -0
- package/src/components/publishing/utils.ts +227 -0
- package/src/components/resources/ResourcesDialog.tsx +591 -0
- package/src/components/resources/UpgradeBanner.tsx +102 -0
- package/src/components/resources/codebase/CodebaseDetails.tsx +156 -0
- package/src/components/resources/cron-job/CronJobsList.tsx +532 -0
- package/src/components/resources/functions/FunctionsList.tsx +454 -0
- package/src/components/resources/http-api/HttpAPI.tsx +566 -0
- package/src/components/resources/http-api/HttpAPIClientModule.tsx +37 -0
- package/src/components/resources/logs/LogsViewer.tsx +768 -0
- package/src/components/resources/query.ts +74 -0
- package/src/components/resources/relational-database/DatabaseTable.tsx +905 -0
- package/src/components/resources/relational-database/RelationalDatabase.tsx +83 -0
- package/src/components/resources/relational-database/RelationalDatabaseSecrets.tsx +361 -0
- package/src/components/resources/resources-dialog.css +74 -0
- package/src/components/test-relational-database/DatabaseTable.tsx +913 -0
- package/src/components/test-relational-database/TestDatabaseDialogContent.tsx +670 -0
- package/src/components/test-relational-database/query.ts +74 -0
- package/src/components/toolbar/ToolBar.tsx +236 -0
- package/src/components/toolbar/toolbar.css +78 -0
- package/src/components/transaction-history/TransactionHistoryDialog.tsx +268 -0
- package/src/components/user/CurrentUserAvatar.tsx +65 -0
- package/src/components/user/UserChip.tsx +62 -0
- package/src/components/user/user.css +39 -0
- package/src/components/user-profile/ChangePasswordForm.tsx +67 -0
- package/src/components/user-profile/OwnUserProfileContent.tsx +665 -0
- package/src/components/user-profile/PublicUserProfileContent.tsx +99 -0
- package/src/components/user-profile/UserDataForm.tsx +75 -0
- package/src/components/user-profile/UserProfileDialog.tsx +110 -0
- package/src/components/user-profile/user-profile-content.css +25 -0
- package/src/config.ts +130 -0
- package/src/globals.d.ts +13 -0
- package/src/index.html +27 -0
- package/src/index.tsx +23 -0
- package/src/lib/badge/Badge.tsx +35 -0
- package/src/lib/badge/badge.css +32 -0
- package/src/lib/button/Button.tsx +129 -0
- package/src/lib/button/button.css +145 -0
- package/src/lib/canvas/canvas-undo-redo.ts +263 -0
- package/src/lib/canvas/defs.ts +170 -0
- package/src/lib/canvas/index.test.ts +189 -0
- package/src/lib/canvas/index.ts +6999 -0
- package/src/lib/canvas/utils.ts +59 -0
- package/src/lib/card/Card.tsx +62 -0
- package/src/lib/card/LoadingCard.tsx +82 -0
- package/src/lib/card/card.css +259 -0
- package/src/lib/chip/Chip.tsx +79 -0
- package/src/lib/chip/chip.css +0 -0
- package/src/lib/dialog/Dialog.tsx +122 -0
- package/src/lib/dialog/SmallDialog.tsx +61 -0
- package/src/lib/dialog/dialog.css +40 -0
- package/src/lib/display-data-structure/index.tsx +21 -0
- package/src/lib/dropdown/CanvasDropdownMenuCard.tsx +68 -0
- package/src/lib/dropdown/CanvasDropdownMenuCardOption.tsx +136 -0
- package/src/lib/dropdown/DropdownButton.tsx +104 -0
- package/src/lib/dropdown/DropdownMenuCard.tsx +324 -0
- package/src/lib/dropdown/DropdownMenuPopup.tsx +27 -0
- package/src/lib/dropdown/dropdown-button.css +76 -0
- package/src/lib/dropdown/dropdown-menu.css +151 -0
- package/src/lib/json-editor/RawJsonEditor.tsx +137 -0
- package/src/lib/json-editor/json-editor.css +35 -0
- package/src/lib/loader/Loader.tsx +120 -0
- package/src/lib/loader/loader.css +38 -0
- package/src/lib/pagination/Pagination.tsx +64 -0
- package/src/lib/popup/CanvasPopupBaseComponent.tsx +103 -0
- package/src/lib/popup/Popup.tsx +243 -0
- package/src/lib/popup/popup.css +16 -0
- package/src/lib/table/RowForm.tsx +301 -0
- package/src/lib/table/Table.tsx +1069 -0
- package/src/lib/table/table.css +249 -0
- package/src/lib/table/types.ts +108 -0
- package/src/lib/text-area/TextArea.tsx +183 -0
- package/src/lib/text-area/text-area.css +156 -0
- package/src/lib/text-field/TextField.tsx +218 -0
- package/src/lib/text-field/index.ts +8 -0
- package/src/lib/text-field/text-field.css +201 -0
- package/src/lib/tooltip/Tooltip.tsx +24 -0
- package/src/lib/tooltip/tooltip.css +17 -0
- package/src/localization/index.ts +47 -0
- package/src/main.css +343 -0
- package/src/pages/Auth.tsx +848 -0
- package/src/pages/Editor.tsx +883 -0
- package/src/pages/ErrorPage.tsx +179 -0
- package/src/pages/Gallery.tsx +1693 -0
- package/src/pages/NewPaymentMethodCallback.tsx +53 -0
- package/src/pages/NotFoundPage.tsx +126 -0
- package/src/pages/PricingPlans.tsx +155 -0
- package/src/pages/auth.css +304 -0
- package/src/pages/gallery.css +421 -0
- package/src/payments/index.ts +187 -0
- package/src/popup-notification/index.ts +90 -0
- package/src/services/database/index.ts +1 -0
- package/src/services/database/utils.ts +1301 -0
- package/src/services/editor/CanvasElement.tsx +2934 -0
- package/src/services/editor/CanvasElementConnectionDeleteButton.ts +204 -0
- package/src/services/editor/CanvasPopup.tsx +749 -0
- package/src/services/editor/EditorService.ts +8157 -0
- package/src/services/editor/area.ts +1312 -0
- package/src/services/editor/connections.ts +1019 -0
- package/src/services/editor/create/condition.ts +25 -0
- package/src/services/editor/create/definition-entity.ts +29 -0
- package/src/services/editor/create/function-call.ts +25 -0
- package/src/services/editor/create/global-event.ts +33 -0
- package/src/services/editor/create/loop.ts +25 -0
- package/src/services/editor/create/operation.ts +30 -0
- package/src/services/editor/create/utils.ts +140 -0
- package/src/services/editor/create/variable-declaration.ts +135 -0
- package/src/services/editor/create/variable-instance.ts +100 -0
- package/src/services/editor/editor-ui-extensions-context.ts +43 -0
- package/src/services/editor/entities-metadata.json +9310 -0
- package/src/services/editor/icons.ts +1093 -0
- package/src/services/editor/index.ts +1 -0
- package/src/services/editor/layout.ts +102 -0
- package/src/services/editor/modules/built-in-function-implementations/base.ts +14 -0
- package/src/services/editor/modules/built-in-function-implementations/create-persisted-entity/index.ts +56 -0
- package/src/services/editor/modules/built-in-function-implementations/delete-persisted-entity/index.ts +55 -0
- package/src/services/editor/modules/built-in-function-implementations/index.ts +4 -0
- package/src/services/editor/modules/built-in-function-implementations/update-persisted-entity/index.ts +56 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-drive/get-files.ts +183 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-drive/list-drives.ts +124 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-drive/list-root-folders.ts +125 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-drive/smart-fetch-document.ts +702 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-drive/upload-document.ts +535 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-gemini/generate-content.ts +193 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-mail/get-emails.ts +586 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/google-mail/send-email.ts +386 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/index.ts +12 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/slack/channels.ts +240 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/slack/messages.ts +210 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/slack/replies.ts +200 -0
- package/src/services/editor/modules/operations-implementations/external-integrations/slack/send-message.ts +177 -0
- package/src/services/editor/modules/operations-implementations/index.ts +1 -0
- package/src/services/editor/modules/search-node-implementation/index.ts +42 -0
- package/src/services/editor/modules/sql-migrations-generation.tsx +1054 -0
- package/src/services/editor/publication/publication.ts +578 -0
- package/src/services/editor/ui.ts +1348 -0
- package/src/services/editor/utils.ts +5868 -0
- package/src/services/editor/value-store.ts +619 -0
- package/src/services/execution/built-in-function-implementations.ts +422 -0
- package/src/services/execution/index.ts +4747 -0
- package/src/services/execution/logic.ts +121 -0
- package/src/services/execution/test-instance.tsx +2296 -0
- package/src/services/execution/utils.ts +33 -0
- package/src/services/execution/value-resolution.test.ts +424 -0
- package/src/services/execution/value-resolution.ts +4087 -0
- package/src/services/integrations/ExternalIntegrationsService.ts +439 -0
- package/src/services/integrations/api.ts +175 -0
- package/src/services/local-relational-database/idb_helper.ts +66 -0
- package/src/services/local-relational-database/index.ts +3308 -0
- package/src/services/local-relational-database/utils.ts +403 -0
- package/src/services/notifications/index.ts +525 -0
- package/src/services/user/index.ts +144 -0
- package/src/setupTests.ts +1 -0
- package/src/socket/socket.ts +248 -0
- package/src/socket/utils.ts +10 -0
- package/src/store/workspace.ts +12 -0
- package/src/theme.ts +19 -0
- package/src/utils/DOM.ts +39 -0
- package/src/utils/date.ts +169 -0
- package/src/utils/index.ts +158 -0
- package/src/utils/react.tsx +679 -0
- package/src/utils/testing.ts +103 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip as MuiTooltip, IconButton } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
const EntityDialogSectionHeader: React.FC<{
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
hideShowSuffix?: string;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onToggle?: () => void;
|
|
10
|
+
headerEndIcon?: React.ReactNode;
|
|
11
|
+
headerStartIcon?: React.ReactNode;
|
|
12
|
+
expandIcon?: React.ReactNode;
|
|
13
|
+
expandable?: boolean;
|
|
14
|
+
}> = ({
|
|
15
|
+
title,
|
|
16
|
+
subtitle,
|
|
17
|
+
hideShowSuffix,
|
|
18
|
+
open,
|
|
19
|
+
onToggle,
|
|
20
|
+
headerEndIcon,
|
|
21
|
+
headerStartIcon,
|
|
22
|
+
expandIcon,
|
|
23
|
+
expandable = true,
|
|
24
|
+
}) => {
|
|
25
|
+
if (!expandable) {
|
|
26
|
+
return (
|
|
27
|
+
<div
|
|
28
|
+
style={{
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
width: '100%',
|
|
32
|
+
padding: '20px 0',
|
|
33
|
+
justifyContent: 'space-between',
|
|
34
|
+
paddingRight: 40,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
style={{
|
|
39
|
+
display: 'flex',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
marginLeft: !headerStartIcon ? 80 : 0,
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{!!headerStartIcon ? (
|
|
45
|
+
<div
|
|
46
|
+
style={{
|
|
47
|
+
width: 80,
|
|
48
|
+
display: 'flex',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{headerStartIcon}
|
|
54
|
+
</div>
|
|
55
|
+
) : null}
|
|
56
|
+
|
|
57
|
+
<div
|
|
58
|
+
style={{
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'column',
|
|
61
|
+
gap: 4,
|
|
62
|
+
alignItems: 'flex-start',
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<h2
|
|
66
|
+
style={{
|
|
67
|
+
margin: 0,
|
|
68
|
+
fontSize: 16,
|
|
69
|
+
fontWeight: 400,
|
|
70
|
+
color: 'black',
|
|
71
|
+
textAlign: 'left',
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
{title}
|
|
75
|
+
</h2>
|
|
76
|
+
<p
|
|
77
|
+
style={{
|
|
78
|
+
margin: 0,
|
|
79
|
+
fontSize: 10,
|
|
80
|
+
color: 'rgba(0,0,0,0.54)',
|
|
81
|
+
textAlign: 'left',
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
{subtitle}
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div
|
|
90
|
+
style={{
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
gap: 12,
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
{headerEndIcon}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
onClick={() => onToggle()}
|
|
105
|
+
style={{
|
|
106
|
+
width: '100%',
|
|
107
|
+
padding: '20px 0',
|
|
108
|
+
cursor: 'pointer',
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
<div
|
|
112
|
+
style={{
|
|
113
|
+
display: 'flex',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
width: '100%',
|
|
116
|
+
justifyContent: 'space-between',
|
|
117
|
+
paddingRight: 40,
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
<div
|
|
121
|
+
style={{
|
|
122
|
+
display: 'flex',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
marginLeft: !headerStartIcon ? 80 : 0,
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
{!!headerStartIcon ? (
|
|
128
|
+
<div
|
|
129
|
+
style={{
|
|
130
|
+
width: 80,
|
|
131
|
+
display: 'flex',
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
justifyContent: 'center',
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
{headerStartIcon}
|
|
137
|
+
</div>
|
|
138
|
+
) : null}
|
|
139
|
+
|
|
140
|
+
<div
|
|
141
|
+
style={{
|
|
142
|
+
display: 'flex',
|
|
143
|
+
flexDirection: 'column',
|
|
144
|
+
gap: 4,
|
|
145
|
+
alignItems: 'flex-start',
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
<h2
|
|
149
|
+
style={{
|
|
150
|
+
margin: 0,
|
|
151
|
+
fontSize: 16,
|
|
152
|
+
fontWeight: 400,
|
|
153
|
+
color: 'black',
|
|
154
|
+
textAlign: 'left',
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
{title}
|
|
158
|
+
</h2>
|
|
159
|
+
<p
|
|
160
|
+
style={{
|
|
161
|
+
margin: 0,
|
|
162
|
+
fontSize: 10,
|
|
163
|
+
color: 'rgba(0,0,0,0.54)',
|
|
164
|
+
textAlign: 'left',
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
{subtitle}
|
|
168
|
+
</p>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div
|
|
173
|
+
style={{
|
|
174
|
+
display: 'flex',
|
|
175
|
+
alignItems: 'center',
|
|
176
|
+
gap: 12,
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
179
|
+
{headerEndIcon}
|
|
180
|
+
<MuiTooltip
|
|
181
|
+
placement='bottom'
|
|
182
|
+
enterDelay={300}
|
|
183
|
+
leaveDelay={200}
|
|
184
|
+
arrow
|
|
185
|
+
title={`${open ? 'Hide' : 'Show'} ${hideShowSuffix || 'section'}`}
|
|
186
|
+
>
|
|
187
|
+
<IconButton
|
|
188
|
+
id='collapse-entity-metadata-section-button'
|
|
189
|
+
aria-label='collapse'
|
|
190
|
+
size='small'
|
|
191
|
+
// color='primary'
|
|
192
|
+
style={{ width: 24, height: 24, fontSize: 16 }}
|
|
193
|
+
onClick={(e) => {
|
|
194
|
+
e.stopPropagation();
|
|
195
|
+
onToggle?.();
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
{/* Add rotation class to chevron if it is open */}
|
|
199
|
+
{expandIcon || (
|
|
200
|
+
<i
|
|
201
|
+
className={`search-statement-dialog__collapse_section-icon fa-regular fa-chevron-down ${
|
|
202
|
+
open ? 'rotate-180' : ''
|
|
203
|
+
}`}
|
|
204
|
+
/>
|
|
205
|
+
)}
|
|
206
|
+
</IconButton>
|
|
207
|
+
</MuiTooltip>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export default EntityDialogSectionHeader;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SmallDialog from '../lib/dialog/SmallDialog';
|
|
3
|
+
import { useNavigate, useParams, useLocation } from 'react-router-dom';
|
|
4
|
+
import { envConfig } from '../config';
|
|
5
|
+
import { useWorkspaceStore } from '../store/workspace';
|
|
6
|
+
|
|
7
|
+
export default function GalleryAddExternalIntegrationInfoDialog() {
|
|
8
|
+
const { providerKey } = useParams<{ providerKey: string }>();
|
|
9
|
+
const navigate = useNavigate();
|
|
10
|
+
const location = useLocation();
|
|
11
|
+
const providerName = (location.state as any)?.providerName || providerKey;
|
|
12
|
+
|
|
13
|
+
const activeWorkspace = useWorkspaceStore((state) => state.activeWorkspace);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<SmallDialog
|
|
17
|
+
overlayStyle={{ zIndex: 2 }}
|
|
18
|
+
style={{ width: '500px', minHeight: 'auto' }}
|
|
19
|
+
onClose={() => navigate(`/ws/${activeWorkspace?.slug}/gallery`)}
|
|
20
|
+
>
|
|
21
|
+
<div
|
|
22
|
+
style={{
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
height: '100%',
|
|
26
|
+
justifyContent: 'space-between',
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
30
|
+
<div
|
|
31
|
+
style={{
|
|
32
|
+
display: 'flex',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
marginBottom: '20px',
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<button
|
|
38
|
+
className='dialog_back_button'
|
|
39
|
+
onClick={() => navigate(`/ws/${activeWorkspace?.slug}/gallery`)}
|
|
40
|
+
>
|
|
41
|
+
<i className='fa-solid fa-arrow-left' />
|
|
42
|
+
</button>
|
|
43
|
+
<h2
|
|
44
|
+
style={{
|
|
45
|
+
margin: 0,
|
|
46
|
+
fontWeight: 500,
|
|
47
|
+
width: '100%',
|
|
48
|
+
textAlign: 'center',
|
|
49
|
+
marginRight: '26px',
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
Add {providerName} to your project
|
|
53
|
+
</h2>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, alignItems: 'center', marginBottom: 20 }}>
|
|
57
|
+
<img
|
|
58
|
+
src={`${envConfig.EXTERNAL_INTEGRATIONS_LOGOS_URL}/${providerKey}.svg`}
|
|
59
|
+
alt={providerKey}
|
|
60
|
+
style={{ width: 60, height: 60, objectFit: 'contain' }}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
<p
|
|
64
|
+
style={{
|
|
65
|
+
color: 'rgb(0, 0, 0, 0.87)',
|
|
66
|
+
fontSize: 14,
|
|
67
|
+
textAlign: 'center',
|
|
68
|
+
marginBottom: '10px'
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
To add a feature from the market place to one of your projects
|
|
72
|
+
</p>
|
|
73
|
+
<p
|
|
74
|
+
style={{
|
|
75
|
+
color: 'rgb(0, 0, 0, 0.87)',
|
|
76
|
+
fontSize: 14,
|
|
77
|
+
textAlign: 'center',
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
Navigate to the project, then simply search for their operations in
|
|
81
|
+
the canvas an add them!
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</SmallDialog>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import React, { useEffect, useState, useCallback } from 'react';
|
|
2
|
+
import SmallDialog from '../lib/dialog/SmallDialog';
|
|
3
|
+
import { useNavigate, useParams } from 'react-router-dom';
|
|
4
|
+
import { getAccessToken, getRefreshToken } from '../auth';
|
|
5
|
+
import TextArea from '../lib/text-area/TextArea';
|
|
6
|
+
import Tooltip from '../lib/tooltip/Tooltip';
|
|
7
|
+
import { IComponentLifecycleProps } from '../utils/react';
|
|
8
|
+
import { EditorService } from '../services/editor';
|
|
9
|
+
import { ILiveMessageDTO, LiveMessageEventType } from '@elyx-code/definitions';
|
|
10
|
+
import { ProjectState } from '@elyx-code/project-logic-tree';
|
|
11
|
+
import { Logger } from '@elyx-code/common-ts-utils';
|
|
12
|
+
import Button from '../lib/button/Button';
|
|
13
|
+
|
|
14
|
+
export interface IGenerateProjectStartingLogicPromptDialogProps
|
|
15
|
+
extends IComponentLifecycleProps {
|
|
16
|
+
project: EditorService;
|
|
17
|
+
ready: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const DEMO_USER_PROMPT_1 =
|
|
21
|
+
'Develop a basic task management application to test the capabilities and integration of a new tech stack. The app will allow users to create, view, update, and delete tasks.';
|
|
22
|
+
export const DEMO_USER_PROMPT_2 =
|
|
23
|
+
"A simple endpoint to act as a webhook for Jira automations. When the endpoint is called, it will send me a SLACK message. You can assume that I will add the SLACK API token to the headers of any API call and that I will add the endpoint you provide to the Jira automation. I would prefer not to have any state on the app, so DON'T create any databases.";
|
|
24
|
+
export const DEMO_USER_PROMPT_3 = `A URL shortener. Users can give us long URLs and get short one in return which redirects any traffic behind the scenes to the long one.
|
|
25
|
+
|
|
26
|
+
We need to:
|
|
27
|
+
Have an endpoint to register URLS that returns a short URL that will from that moment on redirect to the user given one.
|
|
28
|
+
The endpoint to register a URL should a POST endpoint and take a URL in the body of the request.
|
|
29
|
+
Then store it in a relational db where the primary key is a short unique id of some sort.
|
|
30
|
+
|
|
31
|
+
We also need a general endpoint with an empty path, so the root of the current environment domain, as a GET endpoint.
|
|
32
|
+
It will have a path parameter which is a short id that makes this URL unique.
|
|
33
|
+
We will use the short id from the path parameter to look up the database, find the matching primary key row and get the full URL, then redirect with the headers of the return statement of the endpoint handler so the HTTP protocols do the redirect.`;
|
|
34
|
+
|
|
35
|
+
export const DEMO_USER_PROMPT_4 =
|
|
36
|
+
'Create an HTTP endpoint with the path "/time" that when called with a GET request returns the current server time in ISO 8601 format.';
|
|
37
|
+
export const DEMO_USER_PROMPT_5 =
|
|
38
|
+
'Send me an email to "herrerocontact@gmail.com" once the project publishes successfully. The email should have the subject "Project Published" and the body should read "The project has been published successfully at [current date and time]."';
|
|
39
|
+
export const DEMO_USER_PROMPT_6 =
|
|
40
|
+
'Send me an email, every morning at 8 AM, to "herrerocontact@gmail.com" with the subject "Daily joke" and the body containing a different joke everyday generated by AI.';
|
|
41
|
+
|
|
42
|
+
export const DEMO_USER_PROMPT_7 = `I want a simple test of Elyx's SQL capabilities. Can you please create a database, then a table for it caller "User" with columns "id" (primary key) and "name" and unique "email". Then, globally, we create a search to get a user by their email, then loop over the results (even if it is one, or none found). I also want a separate global variable-declaration to instanciate a new user which then saves it. It is ok if none of this is connected to anything. I will test it manually in the canvas.\nKeep it as minimal as possible.`;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export default function GenerateProjectStartingLogicPromptDialog(
|
|
46
|
+
props: IGenerateProjectStartingLogicPromptDialogProps
|
|
47
|
+
) {
|
|
48
|
+
const [isGenerating, setIsGenerating] = useState<boolean>(false);
|
|
49
|
+
const [description, setDescription] = useState<string>('');
|
|
50
|
+
const [error, setError] = useState<string | null>(null);
|
|
51
|
+
const { id: projectId } = useParams<{ id: string }>();
|
|
52
|
+
const navigate = useNavigate();
|
|
53
|
+
|
|
54
|
+
const server = props.project?.socket;
|
|
55
|
+
|
|
56
|
+
const beginProjectStartingLogicGeneration = async () => {
|
|
57
|
+
setIsGenerating(true);
|
|
58
|
+
|
|
59
|
+
const [accessToken, refreshToken] = await Promise.all([
|
|
60
|
+
getAccessToken(),
|
|
61
|
+
getRefreshToken(),
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
server?.send({
|
|
65
|
+
action: 'start-project-starting-logic-generation',
|
|
66
|
+
actionId: ProjectState.UUID.uuid(),
|
|
67
|
+
userAuthor: ProjectState.sessionAuthor,
|
|
68
|
+
agentAuthor: null,
|
|
69
|
+
emittedAt: new Date().toISOString(),
|
|
70
|
+
channel: props.project.PROJECT_NOTIFICATIONS_CHANNEL,
|
|
71
|
+
sessionId: props.project.sessionId as string,
|
|
72
|
+
authorization: 'Bearer ' + accessToken,
|
|
73
|
+
refreshToken: refreshToken,
|
|
74
|
+
type: LiveMessageEventType.Post,
|
|
75
|
+
workspaceId: props.project.activeWorkspace?.id || null,
|
|
76
|
+
event: null,
|
|
77
|
+
message: null,
|
|
78
|
+
payload: {
|
|
79
|
+
projectId,
|
|
80
|
+
prompt: description,
|
|
81
|
+
project: props.project.logic.toShallowJSON(),
|
|
82
|
+
branchId: props.project.branchHead?.branchId,
|
|
83
|
+
triggeredBy: {
|
|
84
|
+
token: 'Bearer ' + accessToken,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// stable message handler
|
|
91
|
+
const handleIncomingMessage = useCallback(
|
|
92
|
+
(message: ILiveMessageDTO) => {
|
|
93
|
+
Logger.log('message', message);
|
|
94
|
+
|
|
95
|
+
switch (message.event) {
|
|
96
|
+
case 'generate-starting-logic-start':
|
|
97
|
+
Logger.warn('generate-starting-logic-start', message);
|
|
98
|
+
break;
|
|
99
|
+
case 'prompt-validation':
|
|
100
|
+
if (!message.payload.isUserProvidedPromptValid) {
|
|
101
|
+
setError(
|
|
102
|
+
'The prompt is not valid. Please describe a valid software project that you want to build.'
|
|
103
|
+
);
|
|
104
|
+
setIsGenerating(false);
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
default:
|
|
108
|
+
if (message.message === 'Internal Server Error') {
|
|
109
|
+
setError(
|
|
110
|
+
'An error occurred while processing your request. Please try again later.'
|
|
111
|
+
);
|
|
112
|
+
setIsGenerating(false);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
[navigate, projectId]
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
// subscribe
|
|
121
|
+
server?.on('message', handleIncomingMessage);
|
|
122
|
+
|
|
123
|
+
// cleanup: unsubscribe the same callback
|
|
124
|
+
return () => {
|
|
125
|
+
server?.off('message', handleIncomingMessage);
|
|
126
|
+
};
|
|
127
|
+
}, [server, handleIncomingMessage]);
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<SmallDialog
|
|
131
|
+
onClose={() => {
|
|
132
|
+
navigate(props.project?.editorBasePath);
|
|
133
|
+
}}
|
|
134
|
+
overlayStyle={{ zIndex: 2 }}
|
|
135
|
+
style={{ width: '500px' }}
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
style={{
|
|
139
|
+
display: 'flex',
|
|
140
|
+
flexDirection: 'column',
|
|
141
|
+
height: '100%',
|
|
142
|
+
justifyContent: 'space-between',
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
146
|
+
<div
|
|
147
|
+
style={{
|
|
148
|
+
display: 'flex',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
marginBottom: '10px',
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
<button
|
|
154
|
+
className='dialog_back_button'
|
|
155
|
+
disabled={isGenerating}
|
|
156
|
+
onClick={() => navigate(props.project?.editorBasePath)}
|
|
157
|
+
>
|
|
158
|
+
<i className='fa-solid fa-arrow-left' />
|
|
159
|
+
</button>
|
|
160
|
+
<h2
|
|
161
|
+
style={{
|
|
162
|
+
margin: 0,
|
|
163
|
+
fontWeight: 500,
|
|
164
|
+
width: '100%',
|
|
165
|
+
textAlign: 'center',
|
|
166
|
+
marginRight: '26px',
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
Auto-generate project logic
|
|
170
|
+
</h2>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
|
174
|
+
<span style={{ textAlign: 'center', marginTop: 6, width: '100%' }}>
|
|
175
|
+
<p style={{ margin: 0, color: 'rgba(0,0,0,0.54)', fontSize: 14 }}>
|
|
176
|
+
Let the{' '}
|
|
177
|
+
<b style={{ color: 'var(--color-main-primary)' }}>
|
|
178
|
+
artificial intelligence
|
|
179
|
+
</b>{' '}
|
|
180
|
+
generate the logic for you.
|
|
181
|
+
</p>
|
|
182
|
+
</span>
|
|
183
|
+
<p
|
|
184
|
+
style={{
|
|
185
|
+
margin: 0,
|
|
186
|
+
fontSize: 10,
|
|
187
|
+
color: 'rgba(0,0,0,0.54)',
|
|
188
|
+
textAlign: 'center',
|
|
189
|
+
}}
|
|
190
|
+
>
|
|
191
|
+
Describe in as much detail as possible what you want to achieve
|
|
192
|
+
with your project.
|
|
193
|
+
<br />
|
|
194
|
+
What do you want to build, and how should it work?
|
|
195
|
+
</p>
|
|
196
|
+
|
|
197
|
+
<TextArea
|
|
198
|
+
name='description'
|
|
199
|
+
label='Project description'
|
|
200
|
+
disabled={!props.project?.logic || isGenerating || !props.ready}
|
|
201
|
+
variant='filled'
|
|
202
|
+
inputProps={{ className: 'project-description-field' }}
|
|
203
|
+
value={description}
|
|
204
|
+
error={!!error}
|
|
205
|
+
helperText={error}
|
|
206
|
+
onInput={(value: string) => {
|
|
207
|
+
setDescription(value);
|
|
208
|
+
}}
|
|
209
|
+
/>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div
|
|
214
|
+
style={{
|
|
215
|
+
display: 'flex',
|
|
216
|
+
justifyContent: 'center',
|
|
217
|
+
flexDirection: 'column',
|
|
218
|
+
gap: 20,
|
|
219
|
+
alignItems: 'center',
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
222
|
+
<div
|
|
223
|
+
style={{
|
|
224
|
+
display: 'flex',
|
|
225
|
+
justifyContent: 'center',
|
|
226
|
+
flexDirection: 'column',
|
|
227
|
+
gap: 14,
|
|
228
|
+
alignItems: 'center',
|
|
229
|
+
}}
|
|
230
|
+
>
|
|
231
|
+
<p
|
|
232
|
+
style={{
|
|
233
|
+
margin: 0,
|
|
234
|
+
fontSize: 10,
|
|
235
|
+
color: 'rgba(0,0,0,0.54)',
|
|
236
|
+
textAlign: 'center',
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
Click to start generating. It might take a few minutes.
|
|
240
|
+
<br />
|
|
241
|
+
You can follow the progress live.
|
|
242
|
+
</p>
|
|
243
|
+
<Button
|
|
244
|
+
size='medium'
|
|
245
|
+
// loading={isGenerating}
|
|
246
|
+
variant='contained'
|
|
247
|
+
disabled={!description || isGenerating || !props.ready}
|
|
248
|
+
id='generate-project-starting-logic-button'
|
|
249
|
+
onClick={beginProjectStartingLogicGeneration}
|
|
250
|
+
>
|
|
251
|
+
Generate
|
|
252
|
+
</Button>
|
|
253
|
+
{!description && (
|
|
254
|
+
<Tooltip
|
|
255
|
+
anchorQuerySelector='#generate-project-starting-logic-button'
|
|
256
|
+
placement='bottom'
|
|
257
|
+
>
|
|
258
|
+
Please provide a description for your project.
|
|
259
|
+
</Tooltip>
|
|
260
|
+
)}
|
|
261
|
+
</div>
|
|
262
|
+
<Button
|
|
263
|
+
size='small'
|
|
264
|
+
variant='outlined'
|
|
265
|
+
// loading={isGenerating}
|
|
266
|
+
disabled={isGenerating}
|
|
267
|
+
id='skip-starting-project-logic-button'
|
|
268
|
+
onClick={() => {
|
|
269
|
+
navigate(props.project?.editorBasePath);
|
|
270
|
+
}}
|
|
271
|
+
// style={{
|
|
272
|
+
// marginTop: 16,
|
|
273
|
+
// }}
|
|
274
|
+
>
|
|
275
|
+
Skip
|
|
276
|
+
</Button>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
</SmallDialog>
|
|
280
|
+
);
|
|
281
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Navigate, useLocation } from 'react-router-dom';
|
|
3
|
+
import { getCurrentUserOrLogoutRedirect } from '../auth';
|
|
4
|
+
import Loader from '../lib/loader/Loader'; // Assuming you have a standard loader
|
|
5
|
+
|
|
6
|
+
const LegacyRouteRedirector: React.FC = () => {
|
|
7
|
+
const location = useLocation();
|
|
8
|
+
const [defaultWorkspaceSlug, setDefaultWorkspaceSlug] = useState<string | null>(
|
|
9
|
+
null,
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const fetchAndRedirect = async () => {
|
|
14
|
+
const user = await getCurrentUserOrLogoutRedirect();
|
|
15
|
+
|
|
16
|
+
// Assuming your legacy user object has the workspace info attached
|
|
17
|
+
const workspaceId = user?.workspace?.slug || user?.workspace?.id || user?.workspaces?.[0]?.id;
|
|
18
|
+
|
|
19
|
+
if (workspaceId) {
|
|
20
|
+
setDefaultWorkspaceSlug(workspaceId);
|
|
21
|
+
} else {
|
|
22
|
+
// Fallback: If for some reason they don't have one, maybe redirect to a creation page or auth
|
|
23
|
+
window.location.replace('/auth/sign-in');
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
fetchAndRedirect();
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
if (!defaultWorkspaceSlug) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
style={{
|
|
34
|
+
display: 'flex',
|
|
35
|
+
height: '100vh',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<Loader size={60} color='primary' />
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Redirect to the new workspace route, preserving the path and query params
|
|
46
|
+
// Example: /editor/123 -> /ws/abc/editor/123
|
|
47
|
+
return (
|
|
48
|
+
<Navigate
|
|
49
|
+
to={`/ws/${defaultWorkspaceSlug}${location.pathname}${location.search}`}
|
|
50
|
+
replace
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default LegacyRouteRedirector;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Chip } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export const ProPlanChip: React.FC<{ disabled?: boolean }> = ({ disabled }) => (
|
|
5
|
+
<Chip
|
|
6
|
+
// sensible defaults, individually overridable
|
|
7
|
+
size='small'
|
|
8
|
+
color='primary'
|
|
9
|
+
variant='filled'
|
|
10
|
+
className='card-tag'
|
|
11
|
+
style={disabled ? { filter: 'grayscale(100%)' } : undefined}
|
|
12
|
+
label={
|
|
13
|
+
// Crown and "Pro" label
|
|
14
|
+
<span>
|
|
15
|
+
<i
|
|
16
|
+
className='fa-solid fa-crown'
|
|
17
|
+
style={{ marginRight: 4, color: '#FFD700' }}
|
|
18
|
+
></i>
|
|
19
|
+
Pro
|
|
20
|
+
</span>
|
|
21
|
+
}
|
|
22
|
+
/>
|
|
23
|
+
);
|