@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,843 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
useCallback,
|
|
3
|
+
useEffect,
|
|
4
|
+
useMemo,
|
|
5
|
+
useRef,
|
|
6
|
+
useState
|
|
7
|
+
} from 'react';
|
|
8
|
+
import './draggable-entity-card.css';
|
|
9
|
+
import {
|
|
10
|
+
entityDisabledReasonToShortReadableError,
|
|
11
|
+
getCanvasEntityDOMId,
|
|
12
|
+
getCardColorCSSVariable,
|
|
13
|
+
getCardSupportColorCSSVariable,
|
|
14
|
+
highlightElementIndefinetly,
|
|
15
|
+
highlightElementSuccess,
|
|
16
|
+
removeHighlightElementIndefinetly,
|
|
17
|
+
removeHighlightElementSuccess,
|
|
18
|
+
resolveEntityColorClass,
|
|
19
|
+
safeResolveEntityName
|
|
20
|
+
} from '../../services/editor/ui';
|
|
21
|
+
import Button from '../../lib/button/Button';
|
|
22
|
+
import { Canvas } from '../../lib/canvas';
|
|
23
|
+
import DynamicValue from '../dynamic-value/DynamicValue';
|
|
24
|
+
import {
|
|
25
|
+
OutputMapState,
|
|
26
|
+
VariableDeclarationState,
|
|
27
|
+
EntityType,
|
|
28
|
+
lowercaseFirstLetter,
|
|
29
|
+
CanvasEntityDisabledReason,
|
|
30
|
+
CanvasEntityOtherDisabledReason,
|
|
31
|
+
READABLE_ENTITY_TYPES,
|
|
32
|
+
PassThroughCallableEntityState,
|
|
33
|
+
CanvasEntityConnectionDisabledReason
|
|
34
|
+
} from '@elyx-code/project-logic-tree';
|
|
35
|
+
import DataTypeIcon from './DataTypeIcon';
|
|
36
|
+
import { ConnectionNodeType, EditorService } from '../../services/editor';
|
|
37
|
+
import {
|
|
38
|
+
IDynamicValue,
|
|
39
|
+
IValueInheritanceLink
|
|
40
|
+
} from '../../services/editor/value-store';
|
|
41
|
+
import { resolveValue } from '../../services/execution/value-resolution';
|
|
42
|
+
import CanvasPopup, { useCanvasPopup } from '../../services/editor/CanvasPopup';
|
|
43
|
+
import CanvasPopupBaseComponent from '../../lib/popup/CanvasPopupBaseComponent';
|
|
44
|
+
import CanvasDropdownMenuCard from '../../lib/dropdown/CanvasDropdownMenuCard';
|
|
45
|
+
import LogicErrorIconMenu from './logic-error/LogicErrorIconMenu';
|
|
46
|
+
import { CanvasEntityElement } from '../../services/editor/CanvasElement';
|
|
47
|
+
import EntityLockedIconMenu from './entity-locked-icon/EntityLockedIcon';
|
|
48
|
+
import { popupNotification } from '../../popup-notification';
|
|
49
|
+
|
|
50
|
+
interface IOutputMapPropertyProps {
|
|
51
|
+
outputMap: OutputMapState;
|
|
52
|
+
entity: PassThroughCallableEntityState;
|
|
53
|
+
canvasElement: CanvasEntityElement;
|
|
54
|
+
size?: 'small' | 'default';
|
|
55
|
+
project: EditorService;
|
|
56
|
+
parentDisabledReasons: CanvasEntityDisabledReason[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default function OutputMapProperty(props: IOutputMapPropertyProps) {
|
|
60
|
+
if (props.project.destroyed) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const outputMap = props.outputMap;
|
|
65
|
+
|
|
66
|
+
const rootElementRef = useRef(null);
|
|
67
|
+
|
|
68
|
+
const [updateKey, setValue] = useState(0);
|
|
69
|
+
|
|
70
|
+
const useForceUpdate = () => {
|
|
71
|
+
return () => setValue((value) => value + 1);
|
|
72
|
+
};
|
|
73
|
+
const forceUpdate = useForceUpdate(); // Update the component
|
|
74
|
+
|
|
75
|
+
const dynamicValue: IDynamicValue | null = useMemo(() => {
|
|
76
|
+
const dynamicValueResolutionResult = !!outputMap
|
|
77
|
+
? resolveValue(outputMap, props.project)
|
|
78
|
+
: null;
|
|
79
|
+
|
|
80
|
+
return dynamicValueResolutionResult;
|
|
81
|
+
}, [outputMap, props.project, updateKey]);
|
|
82
|
+
|
|
83
|
+
const resolveTooltip = () => {
|
|
84
|
+
return (
|
|
85
|
+
<h3 style={{ marginTop: 0, marginBottom: 5 }}>
|
|
86
|
+
Click and drag to connect to another value
|
|
87
|
+
</h3>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const memoizedCanvasSocketTooltipBody = useCallback(
|
|
92
|
+
() => (
|
|
93
|
+
<CanvasPopupBaseComponent
|
|
94
|
+
id={
|
|
95
|
+
'canvas-output-map-socket-tooltip-' +
|
|
96
|
+
props.outputMap.id +
|
|
97
|
+
'--popup--body'
|
|
98
|
+
}
|
|
99
|
+
containerClasses={['tooltip', 'tooltip--large-font']}
|
|
100
|
+
>
|
|
101
|
+
{resolveTooltip()}
|
|
102
|
+
</CanvasPopupBaseComponent>
|
|
103
|
+
),
|
|
104
|
+
[]
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
const canvasSocketTooltip = useCanvasPopup(
|
|
108
|
+
{
|
|
109
|
+
editor: props.project,
|
|
110
|
+
id:
|
|
111
|
+
'canvas-output-map-socket-tooltip-' +
|
|
112
|
+
props.outputMap.id +
|
|
113
|
+
'--popup',
|
|
114
|
+
anchorQuerySelector:
|
|
115
|
+
'#canvas-output-map-socket-tooltip-' +
|
|
116
|
+
props.outputMap.id +
|
|
117
|
+
'--popup',
|
|
118
|
+
placement: 'right',
|
|
119
|
+
parentCanvasObject: props.canvasElement.draggableObject,
|
|
120
|
+
arrowContainerSelector:
|
|
121
|
+
'#canvas-output-map-socket-tooltip-' +
|
|
122
|
+
props.outputMap.id +
|
|
123
|
+
'--popup--body'
|
|
124
|
+
},
|
|
125
|
+
memoizedCanvasSocketTooltipBody,
|
|
126
|
+
[]
|
|
127
|
+
).setupHover({
|
|
128
|
+
openDelay: 600,
|
|
129
|
+
closeDelay: 400
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Recursively unfold the inheritance tree and resolve all dependencies so we subscribe them as events
|
|
133
|
+
// This function now returns a "cleanup" function
|
|
134
|
+
const subscribeValueInheritanceUpdates = useCallback(
|
|
135
|
+
(inheritanceLink: IValueInheritanceLink): (() => void) => {
|
|
136
|
+
const allCleanupFunctions: (() => void)[] = [];
|
|
137
|
+
|
|
138
|
+
// Use a stable handler for all recursive subscriptions
|
|
139
|
+
const handleInheritanceUpdate = () => {
|
|
140
|
+
forceUpdate();
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const subscribeRecursive = (link: IValueInheritanceLink) => {
|
|
144
|
+
link.sources.forEach((sourceLink) => {
|
|
145
|
+
if (!sourceLink) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const ownerId = sourceLink.valueOwner.id;
|
|
150
|
+
props.project.on(ownerId, handleInheritanceUpdate);
|
|
151
|
+
allCleanupFunctions.push(() =>
|
|
152
|
+
props.project.off(ownerId, handleInheritanceUpdate)
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const dataType = (
|
|
156
|
+
sourceLink.valueOwner as VariableDeclarationState
|
|
157
|
+
).dataType;
|
|
158
|
+
if (dataType) {
|
|
159
|
+
const dataTypeId = dataType.id;
|
|
160
|
+
props.project.on(dataTypeId, handleInheritanceUpdate);
|
|
161
|
+
allCleanupFunctions.push(() =>
|
|
162
|
+
props.project.off(
|
|
163
|
+
dataTypeId,
|
|
164
|
+
handleInheritanceUpdate
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (sourceLink.inheritanceLink) {
|
|
170
|
+
subscribeRecursive(sourceLink.inheritanceLink);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// Start the recursive subscription
|
|
176
|
+
subscribeRecursive(inheritanceLink);
|
|
177
|
+
|
|
178
|
+
// Return a single function that runs all collected cleanup functions
|
|
179
|
+
return () => {
|
|
180
|
+
allCleanupFunctions.forEach((cleanup) => cleanup());
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
[props.project, forceUpdate]
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
const editDisabledReasons: string[] = (() => {
|
|
187
|
+
const reasons: string[] = [];
|
|
188
|
+
|
|
189
|
+
if (!!props.outputMap.declaration?.required) {
|
|
190
|
+
reasons.push('Output is required');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (props.outputMap.parent.type === EntityType.Loop) {
|
|
194
|
+
reasons.push(
|
|
195
|
+
`Outputs of a loop are managed by the logic in the loop's body`
|
|
196
|
+
);
|
|
197
|
+
} else if (props.outputMap.parent.type === EntityType.Search) {
|
|
198
|
+
reasons.push(
|
|
199
|
+
`The output of a search result is managed by the search statement builder and represents the chosen format of the resulting data`
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return reasons;
|
|
204
|
+
})();
|
|
205
|
+
|
|
206
|
+
const canEdit = !editDisabledReasons.length;
|
|
207
|
+
|
|
208
|
+
const memoizedCanvasPopupBody = useCallback(
|
|
209
|
+
(popup: CanvasPopup) => (
|
|
210
|
+
<CanvasPopupBaseComponent>
|
|
211
|
+
<CanvasDropdownMenuCard
|
|
212
|
+
options={[
|
|
213
|
+
// {
|
|
214
|
+
// onClick: async () => {
|
|
215
|
+
// Logger.log('delete output map');
|
|
216
|
+
// await props.project.remove(props.outputMap.declaration.id);
|
|
217
|
+
// Logger.log('deleted its declaration');
|
|
218
|
+
// await props.project.remove(outputMap.id);
|
|
219
|
+
// Logger.log('deleted output map');
|
|
220
|
+
// },
|
|
221
|
+
// label: 'Delete',
|
|
222
|
+
// color: 'error',
|
|
223
|
+
// iconEnd: 'fa-solid fa-trash-can',
|
|
224
|
+
// // disabled: false,
|
|
225
|
+
// tooltip: 'Forever delete this output',
|
|
226
|
+
// parentCanvasObject: popup.self,
|
|
227
|
+
// id:
|
|
228
|
+
// 'canvas--' +
|
|
229
|
+
// props.entity.type +
|
|
230
|
+
// '--return-map--' +
|
|
231
|
+
// props.outputMap.id +
|
|
232
|
+
// '--delete',
|
|
233
|
+
// },
|
|
234
|
+
// For now there is not use for editing an output map
|
|
235
|
+
{
|
|
236
|
+
project: props.project,
|
|
237
|
+
onClick: async () => {
|
|
238
|
+
props.project?.canvas?.unselectAll();
|
|
239
|
+
|
|
240
|
+
const isInferredProperty =
|
|
241
|
+
props.outputMap.declaration.type ===
|
|
242
|
+
EntityType.Property &&
|
|
243
|
+
props.outputMap.declaration.parent?.type ===
|
|
244
|
+
EntityType.DefinitionEntity &&
|
|
245
|
+
props.outputMap.declaration.parent?.parent
|
|
246
|
+
.type === EntityType.DataType;
|
|
247
|
+
|
|
248
|
+
if (isInferredProperty) {
|
|
249
|
+
EditorService.navigate(
|
|
250
|
+
`${props.project?.editorBasePath}/entity/${props.outputMap.declaration.type}/${props.outputMap.declaration.id}`
|
|
251
|
+
);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
EditorService.navigate(
|
|
256
|
+
`${props.project?.editorBasePath}/entity/${EntityType.OutputMap}/${props.outputMap.id}`
|
|
257
|
+
);
|
|
258
|
+
},
|
|
259
|
+
label: 'Edit',
|
|
260
|
+
iconEnd: 'fa-solid fa-pencil',
|
|
261
|
+
disabled: !canEdit,
|
|
262
|
+
tooltip: (() => {
|
|
263
|
+
const isInferredProperty =
|
|
264
|
+
props.outputMap.declaration.type ===
|
|
265
|
+
EntityType.Property &&
|
|
266
|
+
props.outputMap.declaration.parent?.type ===
|
|
267
|
+
EntityType.DefinitionEntity &&
|
|
268
|
+
props.outputMap.declaration.parent?.parent
|
|
269
|
+
.type === EntityType.DataType;
|
|
270
|
+
|
|
271
|
+
if (isInferredProperty) {
|
|
272
|
+
if (!props.outputMap.declaration.editable) {
|
|
273
|
+
return `This ${lowercaseFirstLetter(
|
|
274
|
+
READABLE_ENTITY_TYPES[
|
|
275
|
+
EntityType.Property
|
|
276
|
+
].singular
|
|
277
|
+
)} cannot be edited. Because the system need to refer to it over time.`;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return `Edit this ${lowercaseFirstLetter(
|
|
281
|
+
READABLE_ENTITY_TYPES[
|
|
282
|
+
EntityType.Property
|
|
283
|
+
].singular
|
|
284
|
+
)} for all variable instances`;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (!outputMap.editable) {
|
|
288
|
+
return `This output cannot be edited. Because the system need to refer to it over time.`;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return canEdit
|
|
292
|
+
? 'Edit this output'
|
|
293
|
+
: `Cannot edit output because: ${editDisabledReasons
|
|
294
|
+
.map((r) => lowercaseFirstLetter(r))
|
|
295
|
+
.join(', ')}`;
|
|
296
|
+
})(),
|
|
297
|
+
parentCanvasObject: popup.self,
|
|
298
|
+
id:
|
|
299
|
+
'canvas--' +
|
|
300
|
+
props.entity.type +
|
|
301
|
+
'--return-map--' +
|
|
302
|
+
props.outputMap.id +
|
|
303
|
+
'--edit'
|
|
304
|
+
},
|
|
305
|
+
...(true
|
|
306
|
+
? [
|
|
307
|
+
{
|
|
308
|
+
project: props.project,
|
|
309
|
+
onClick: async () => {
|
|
310
|
+
await props.project.remove(
|
|
311
|
+
props.outputMap.id
|
|
312
|
+
);
|
|
313
|
+
},
|
|
314
|
+
label: 'Force delete',
|
|
315
|
+
color: 'error',
|
|
316
|
+
iconEnd: 'fa-solid fa-trash-can',
|
|
317
|
+
tooltip: 'Forever delete this output',
|
|
318
|
+
parentCanvasObject: popup.self,
|
|
319
|
+
id:
|
|
320
|
+
'canvas--return-map--' +
|
|
321
|
+
props.outputMap.id +
|
|
322
|
+
'--force-delete'
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
: ([] as any)),
|
|
326
|
+
{
|
|
327
|
+
project: props.project,
|
|
328
|
+
onClick: async () => {
|
|
329
|
+
navigator.clipboard.writeText(
|
|
330
|
+
props.outputMap.id
|
|
331
|
+
);
|
|
332
|
+
popupNotification({
|
|
333
|
+
text: `Copied ID: ${props.outputMap.id}`,
|
|
334
|
+
color: 'success'
|
|
335
|
+
});
|
|
336
|
+
},
|
|
337
|
+
label: 'Copy ID',
|
|
338
|
+
color: 'warning',
|
|
339
|
+
iconEnd: 'fa-solid fa-bug',
|
|
340
|
+
tooltip:
|
|
341
|
+
'Copy this node ID to clipboard for debugging',
|
|
342
|
+
parentCanvasObject: popup.self,
|
|
343
|
+
id: 'copy-id-' + props.outputMap.id
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
project: props.project,
|
|
347
|
+
onClick: async () => {
|
|
348
|
+
await props.project.recalculateValidateEntity(
|
|
349
|
+
props.outputMap
|
|
350
|
+
);
|
|
351
|
+
popupNotification({
|
|
352
|
+
text: `Re-validated node successfully`,
|
|
353
|
+
color: 'success'
|
|
354
|
+
});
|
|
355
|
+
},
|
|
356
|
+
label: 'Re-validate',
|
|
357
|
+
color: 'warning',
|
|
358
|
+
iconEnd: 'fa-solid fa-bug',
|
|
359
|
+
tooltip:
|
|
360
|
+
"Re-validate this node's state and its errors",
|
|
361
|
+
parentCanvasObject: popup.self,
|
|
362
|
+
id: 're-validate-' + props.outputMap.id
|
|
363
|
+
}
|
|
364
|
+
]}
|
|
365
|
+
/>
|
|
366
|
+
</CanvasPopupBaseComponent>
|
|
367
|
+
),
|
|
368
|
+
[
|
|
369
|
+
props.outputMap,
|
|
370
|
+
props.entity,
|
|
371
|
+
props.project,
|
|
372
|
+
canEdit,
|
|
373
|
+
editDisabledReasons
|
|
374
|
+
]
|
|
375
|
+
);
|
|
376
|
+
|
|
377
|
+
const canvasPopup = useCanvasPopup(
|
|
378
|
+
{
|
|
379
|
+
editor: props.project,
|
|
380
|
+
id:
|
|
381
|
+
'canvas-property-entity-card-menu-button-' +
|
|
382
|
+
props.outputMap.id +
|
|
383
|
+
'--popup',
|
|
384
|
+
anchorQuerySelector:
|
|
385
|
+
'#canvas-property-card-menu-button-' + props.outputMap.id,
|
|
386
|
+
arrowClasses: ['dropdown-menu-card-arrow'],
|
|
387
|
+
parentCanvasObject: props.canvasElement.draggableObject,
|
|
388
|
+
placement: 'left'
|
|
389
|
+
},
|
|
390
|
+
memoizedCanvasPopupBody
|
|
391
|
+
).onBeforeShow(() => !suggestion);
|
|
392
|
+
|
|
393
|
+
useEffect(() => {
|
|
394
|
+
const handleOutputMapUpdate = () => {
|
|
395
|
+
forceUpdate();
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const handleConnectionStart = (payload: any) => {
|
|
399
|
+
if (
|
|
400
|
+
!!payload.compatible?.[props.outputMap.id] &&
|
|
401
|
+
[ConnectionNodeType.PropertyIn].includes(payload.nodeType)
|
|
402
|
+
) {
|
|
403
|
+
if (rootElementRef.current) {
|
|
404
|
+
highlightElementIndefinetly(rootElementRef.current);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const handleConnectionEnd = () => {
|
|
410
|
+
if (rootElementRef.current) {
|
|
411
|
+
removeHighlightElementIndefinetly(rootElementRef.current);
|
|
412
|
+
removeHighlightElementSuccess(rootElementRef.current);
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
const handleValueChange = (payload: any) => {
|
|
417
|
+
if (
|
|
418
|
+
payload?.owner?.id === props.outputMap?.id ||
|
|
419
|
+
payload?.owner?.id === props.outputMap?.declaration?.id
|
|
420
|
+
) {
|
|
421
|
+
forceUpdate();
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
props.project.on(props.outputMap.id, handleOutputMapUpdate);
|
|
426
|
+
props.project.on('canvas-connection-start', handleConnectionStart);
|
|
427
|
+
props.project.on('canvas-connection-end', handleConnectionEnd);
|
|
428
|
+
props.project.on('value-written', handleValueChange);
|
|
429
|
+
props.project.on('value-removed', handleValueChange);
|
|
430
|
+
|
|
431
|
+
// Call the recursive subscription function and store its cleanup function
|
|
432
|
+
// We must re-resolve dynamicValue here as it may have changed
|
|
433
|
+
// const currentDynamicValue = resolveDynamicValue();
|
|
434
|
+
let inheritanceCleanup: (() => void) | null = null;
|
|
435
|
+
if (dynamicValue?.inheritanceLink) {
|
|
436
|
+
inheritanceCleanup = subscribeValueInheritanceUpdates(
|
|
437
|
+
dynamicValue.inheritanceLink
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return () => {
|
|
442
|
+
props.project.off(props.outputMap.id, handleOutputMapUpdate);
|
|
443
|
+
props.project.off('canvas-connection-start', handleConnectionStart);
|
|
444
|
+
props.project.off('canvas-connection-end', handleConnectionEnd);
|
|
445
|
+
props.project.off('value-written', handleValueChange);
|
|
446
|
+
props.project.off('value-removed', handleValueChange);
|
|
447
|
+
|
|
448
|
+
// Call the returned cleanup function from our subscription helper
|
|
449
|
+
if (inheritanceCleanup) {
|
|
450
|
+
inheritanceCleanup();
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}, [
|
|
454
|
+
props.project,
|
|
455
|
+
props.outputMap,
|
|
456
|
+
updateKey,
|
|
457
|
+
rootElementRef,
|
|
458
|
+
dynamicValue,
|
|
459
|
+
subscribeValueInheritanceUpdates, // This is now a stable useCallback dep
|
|
460
|
+
highlightElementIndefinetly,
|
|
461
|
+
removeHighlightElementIndefinetly,
|
|
462
|
+
removeHighlightElementSuccess
|
|
463
|
+
]);
|
|
464
|
+
|
|
465
|
+
// useEffect(() => {
|
|
466
|
+
// dynamicValue = resolveDynamicValue();
|
|
467
|
+
// });
|
|
468
|
+
|
|
469
|
+
const name = safeResolveEntityName(outputMap, props.project.logic);
|
|
470
|
+
|
|
471
|
+
const isConnected = !!outputMap?.writesValues.length;
|
|
472
|
+
|
|
473
|
+
// If the parent is a suggestion or itself is a suggestion, add the suggestion class
|
|
474
|
+
const suggestion =
|
|
475
|
+
// @ts-ignore
|
|
476
|
+
outputMap.suggestion ||
|
|
477
|
+
// @ts-ignore
|
|
478
|
+
props.entity.suggestion;
|
|
479
|
+
|
|
480
|
+
// When the entity is part of a variable declaration,
|
|
481
|
+
// which has one of their internal calls being executed,
|
|
482
|
+
// we can't connect values to it
|
|
483
|
+
const parentVarUsesInternalCalls =
|
|
484
|
+
(props.entity.type === EntityType.VariableDeclaration ||
|
|
485
|
+
props.entity.type === EntityType.VariableInstance) &&
|
|
486
|
+
props.entity.internalCalls.some((call) => !!call.calledBy.length);
|
|
487
|
+
|
|
488
|
+
const disabled =
|
|
489
|
+
((!!props.parentDisabledReasons.length || suggestion) &&
|
|
490
|
+
!props.project.onGoingConnectionCompatibleEntities?.[
|
|
491
|
+
props.outputMap.id
|
|
492
|
+
]) ||
|
|
493
|
+
parentVarUsesInternalCalls;
|
|
494
|
+
|
|
495
|
+
const dynamicValuePassDownDisabledReasons = [
|
|
496
|
+
...props.parentDisabledReasons,
|
|
497
|
+
...(parentVarUsesInternalCalls
|
|
498
|
+
? [
|
|
499
|
+
CanvasEntityConnectionDisabledReason.CannotInteractWithOutputInVariableWithInternalCalls
|
|
500
|
+
]
|
|
501
|
+
: [])
|
|
502
|
+
];
|
|
503
|
+
|
|
504
|
+
const size = props.size || 'default';
|
|
505
|
+
|
|
506
|
+
return (
|
|
507
|
+
<li
|
|
508
|
+
ref={rootElementRef}
|
|
509
|
+
className={[
|
|
510
|
+
'canvas-draggable-card__property-row',
|
|
511
|
+
'canvas-draggable-card__standard-property',
|
|
512
|
+
'canvas-draggable-card__output-property',
|
|
513
|
+
size === 'small'
|
|
514
|
+
? 'canvas-draggable-card__property__small'
|
|
515
|
+
: '',
|
|
516
|
+
disabled ? 'disabled' : ''
|
|
517
|
+
].join(' ')}
|
|
518
|
+
id={getCanvasEntityDOMId(outputMap)}
|
|
519
|
+
{...{
|
|
520
|
+
[Canvas.OBJ_ATTR_NAME]: getCanvasEntityDOMId(outputMap)
|
|
521
|
+
}}
|
|
522
|
+
onMouseOver={(e: any) => {
|
|
523
|
+
if (!!props.project.canvas?.activeConnectionDrawing) {
|
|
524
|
+
if (
|
|
525
|
+
props.project.onGoingConnectionCompatibleEntities?.[
|
|
526
|
+
props.outputMap.id
|
|
527
|
+
]
|
|
528
|
+
) {
|
|
529
|
+
if (
|
|
530
|
+
props.project.onGoingConnectionTarget &&
|
|
531
|
+
[ConnectionNodeType.PropertyIn].includes(
|
|
532
|
+
props.project.onGoingConnectionNodeType
|
|
533
|
+
)
|
|
534
|
+
) {
|
|
535
|
+
props.project.onGoingConnectionSource =
|
|
536
|
+
props.outputMap;
|
|
537
|
+
props.project.onGoingConnectionSourceId =
|
|
538
|
+
getCanvasEntityDOMId(outputMap);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
props.project.canvas?.activeConnectionDrawing.snap(
|
|
542
|
+
getCanvasEntityDOMId(outputMap)
|
|
543
|
+
);
|
|
544
|
+
|
|
545
|
+
removeHighlightElementIndefinetly(
|
|
546
|
+
rootElementRef.current
|
|
547
|
+
);
|
|
548
|
+
highlightElementSuccess(rootElementRef.current);
|
|
549
|
+
} else if (
|
|
550
|
+
!!props.project.onGoingConnectionIncompatibleEntities?.[
|
|
551
|
+
props.outputMap.id
|
|
552
|
+
]
|
|
553
|
+
) {
|
|
554
|
+
// Read the disabled reasons and add a tooltip to the mouse
|
|
555
|
+
const reasonsMessage =
|
|
556
|
+
props.project.onGoingConnectionIncompatibleEntities?.[
|
|
557
|
+
props.outputMap.id
|
|
558
|
+
].reasons
|
|
559
|
+
.map((reason) =>
|
|
560
|
+
entityDisabledReasonToShortReadableError(
|
|
561
|
+
reason
|
|
562
|
+
)
|
|
563
|
+
)
|
|
564
|
+
.join('.\n');
|
|
565
|
+
|
|
566
|
+
props.project.canvas?.showTooltip(
|
|
567
|
+
'connection-disabled-reasons-output-map-' +
|
|
568
|
+
props.outputMap.id,
|
|
569
|
+
reasonsMessage
|
|
570
|
+
);
|
|
571
|
+
if (props.project.canvas) {
|
|
572
|
+
props.project.canvas.tooltip.style.fontSize =
|
|
573
|
+
'28px';
|
|
574
|
+
props.project.canvas.canvasElement.style.cursor =
|
|
575
|
+
'not-allowed';
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}}
|
|
580
|
+
onMouseLeave={(e: any) => {
|
|
581
|
+
if (
|
|
582
|
+
props.project.canvas?.activeUserSetTooltipId ===
|
|
583
|
+
'connection-disabled-reasons-output-map-' +
|
|
584
|
+
props.outputMap.id
|
|
585
|
+
) {
|
|
586
|
+
props.project.canvas?.hideTooltip(
|
|
587
|
+
'connection-disabled-reasons-output-map-' +
|
|
588
|
+
props.outputMap.id
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
if (
|
|
593
|
+
!!props.project.canvas?.activeConnectionDrawing &&
|
|
594
|
+
props.project.onGoingConnectionCompatibleEntities?.[
|
|
595
|
+
props.outputMap.id
|
|
596
|
+
]
|
|
597
|
+
) {
|
|
598
|
+
removeHighlightElementIndefinetly(rootElementRef.current);
|
|
599
|
+
highlightElementIndefinetly(rootElementRef.current);
|
|
600
|
+
|
|
601
|
+
if (
|
|
602
|
+
props.project.canvas?.activeConnectionDrawing
|
|
603
|
+
?.snappedTo === getCanvasEntityDOMId(outputMap)
|
|
604
|
+
) {
|
|
605
|
+
props.project.canvas?.activeConnectionDrawing?.unSnap();
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
if (
|
|
609
|
+
props.project.onGoingConnectionSource ===
|
|
610
|
+
props.outputMap &&
|
|
611
|
+
props.project.onGoingConnectionSourceId ===
|
|
612
|
+
getCanvasEntityDOMId(outputMap) &&
|
|
613
|
+
[ConnectionNodeType.PropertyIn].includes(
|
|
614
|
+
props.project.onGoingConnectionNodeType
|
|
615
|
+
)
|
|
616
|
+
) {
|
|
617
|
+
props.project.onGoingConnectionSource = null;
|
|
618
|
+
props.project.onGoingConnectionSourceId = null;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}}
|
|
622
|
+
>
|
|
623
|
+
<span style={{ display: 'flex', alignItems: 'center', gap: '6px' }}>
|
|
624
|
+
<EntityLockedIconMenu
|
|
625
|
+
entity={outputMap}
|
|
626
|
+
project={props.project}
|
|
627
|
+
canvasElement={props.canvasElement}
|
|
628
|
+
style={{ marginRight: '6px' }}
|
|
629
|
+
parentDisabledReasons={dynamicValuePassDownDisabledReasons}
|
|
630
|
+
/>
|
|
631
|
+
<LogicErrorIconMenu
|
|
632
|
+
entity={outputMap}
|
|
633
|
+
project={props.project}
|
|
634
|
+
canvasElement={props.canvasElement}
|
|
635
|
+
style={{ marginRight: '6px' }}
|
|
636
|
+
parentDisabledReasons={dynamicValuePassDownDisabledReasons}
|
|
637
|
+
/>
|
|
638
|
+
{!disabled && !dynamicValuePassDownDisabledReasons.length && (
|
|
639
|
+
<div className="canvas-draggable-card__property-row__menu-button">
|
|
640
|
+
<Button
|
|
641
|
+
variant="text"
|
|
642
|
+
color="grey"
|
|
643
|
+
iconEnd="fa-solid fa-ellipsis-v"
|
|
644
|
+
size="small"
|
|
645
|
+
className="canvas-small-entity-card-menu-button"
|
|
646
|
+
ref={canvasPopup.anchorRef}
|
|
647
|
+
id={`canvas-property-card-menu-button-${outputMap.id}`}
|
|
648
|
+
onClick={(e: any) => {
|
|
649
|
+
e.stopPropagation();
|
|
650
|
+
canvasPopup?.toggle();
|
|
651
|
+
}}
|
|
652
|
+
onDoubleClick={(
|
|
653
|
+
e: React.MouseEvent<HTMLButtonElement>
|
|
654
|
+
) => {
|
|
655
|
+
e.stopPropagation();
|
|
656
|
+
props.project?.canvas?.unselectAll();
|
|
657
|
+
const isInferredProperty =
|
|
658
|
+
props.outputMap.declaration.type ===
|
|
659
|
+
EntityType.Property &&
|
|
660
|
+
props.outputMap.declaration.parent?.type ===
|
|
661
|
+
EntityType.DefinitionEntity &&
|
|
662
|
+
props.outputMap.declaration.parent?.parent
|
|
663
|
+
.type === EntityType.DataType;
|
|
664
|
+
|
|
665
|
+
if (isInferredProperty) {
|
|
666
|
+
EditorService.navigate(
|
|
667
|
+
`${props.project?.editorBasePath}/entity/${props.outputMap.declaration.type}/${props.outputMap.declaration.id}`
|
|
668
|
+
);
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
EditorService.navigate(
|
|
673
|
+
`${props.project?.editorBasePath}/entity/${EntityType.OutputMap}/${props.outputMap.id}`
|
|
674
|
+
);
|
|
675
|
+
}}
|
|
676
|
+
/>
|
|
677
|
+
</div>
|
|
678
|
+
)}
|
|
679
|
+
</span>
|
|
680
|
+
<div
|
|
681
|
+
className={[
|
|
682
|
+
'canvas-draggable-card__property__right-block',
|
|
683
|
+
...(suggestion ? ['suggestion'] : [])
|
|
684
|
+
].join(' ')}
|
|
685
|
+
>
|
|
686
|
+
<div className="canvas-draggable-card__property__labels-group">
|
|
687
|
+
<span className="canvas-draggable-card__output-property__name">
|
|
688
|
+
{name}
|
|
689
|
+
</span>
|
|
690
|
+
<DynamicValue
|
|
691
|
+
parentCanvasObject={props.canvasElement.draggableObject}
|
|
692
|
+
project={props.project}
|
|
693
|
+
valueOwner={outputMap}
|
|
694
|
+
parentDisabledReasons={
|
|
695
|
+
dynamicValuePassDownDisabledReasons
|
|
696
|
+
}
|
|
697
|
+
onDelete={(newDynamicValue) => {
|
|
698
|
+
// Delete the value
|
|
699
|
+
props.project.removeValue(newDynamicValue);
|
|
700
|
+
forceUpdate();
|
|
701
|
+
}}
|
|
702
|
+
/>
|
|
703
|
+
</div>
|
|
704
|
+
<DataTypeIcon
|
|
705
|
+
entity={outputMap}
|
|
706
|
+
size={size === 'small' ? 'small' : 'medium'}
|
|
707
|
+
color="dark-grey"
|
|
708
|
+
parentDisabledReasons={dynamicValuePassDownDisabledReasons}
|
|
709
|
+
project={props.project}
|
|
710
|
+
parentCanvasObject={props.canvasElement?.draggableObject}
|
|
711
|
+
/>
|
|
712
|
+
</div>
|
|
713
|
+
<div
|
|
714
|
+
id={`${getCanvasEntityDOMId(outputMap)}--connected-right-node`}
|
|
715
|
+
{...{
|
|
716
|
+
[Canvas.OBJ_ATTR_NAME]: `${getCanvasEntityDOMId(
|
|
717
|
+
outputMap
|
|
718
|
+
)}--connected-right-node`
|
|
719
|
+
}}
|
|
720
|
+
className={[
|
|
721
|
+
'canvas__small-node',
|
|
722
|
+
'canvas__small-node--position',
|
|
723
|
+
// Removed 'invisible' so the resting state stays visible
|
|
724
|
+
...(isConnected
|
|
725
|
+
? ['canvas-property__node__connected']
|
|
726
|
+
: [
|
|
727
|
+
'canvas__medium-node',
|
|
728
|
+
resolveEntityColorClass(props.entity.type)
|
|
729
|
+
])
|
|
730
|
+
].join(' ')}
|
|
731
|
+
style={{
|
|
732
|
+
position: 'absolute',
|
|
733
|
+
top: '50%',
|
|
734
|
+
right: '-9px',
|
|
735
|
+
transform: 'translateY(-50%)',
|
|
736
|
+
width: '10px',
|
|
737
|
+
height: '18px',
|
|
738
|
+
padding: 0,
|
|
739
|
+
background: 'transparent',
|
|
740
|
+
border: 'none',
|
|
741
|
+
...(props.project.canvas?.disabled
|
|
742
|
+
? { cursor: 'not-allowed', opacity: 0.9 }
|
|
743
|
+
: { cursor: 'pointer' }),
|
|
744
|
+
zIndex: 1
|
|
745
|
+
}}
|
|
746
|
+
>
|
|
747
|
+
<svg
|
|
748
|
+
width="10"
|
|
749
|
+
height="18"
|
|
750
|
+
viewBox="0 0 10 18"
|
|
751
|
+
fill="none"
|
|
752
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
753
|
+
style={{
|
|
754
|
+
display: 'block',
|
|
755
|
+
filter: 'drop-shadow(5px 2px 5px rgba(0, 0, 0, 0.08))'
|
|
756
|
+
}}
|
|
757
|
+
>
|
|
758
|
+
{/* M -2 -2 : Start outside top-left
|
|
759
|
+
L 7 7 : Line to the right point
|
|
760
|
+
Q 8.5 9 7 11 : Curve the tip
|
|
761
|
+
L -2 20 : Line to outside bottom-left
|
|
762
|
+
*/}
|
|
763
|
+
<path
|
|
764
|
+
d="M -2 -2 L 7 7 Q 8.5 9 7 11 L -2 20 Z"
|
|
765
|
+
fill={getCardSupportColorCSSVariable(props.entity)}
|
|
766
|
+
stroke={getCardColorCSSVariable(props.entity)}
|
|
767
|
+
strokeWidth="2"
|
|
768
|
+
/>
|
|
769
|
+
</svg>
|
|
770
|
+
</div>
|
|
771
|
+
{!dynamicValuePassDownDisabledReasons.length && (
|
|
772
|
+
<div
|
|
773
|
+
id={`${getCanvasEntityDOMId(outputMap)}--new-right-node`}
|
|
774
|
+
className={[
|
|
775
|
+
'canvas__small-node',
|
|
776
|
+
'canvas__small-node--position',
|
|
777
|
+
'canvas-property__node',
|
|
778
|
+
'canvas__node__new',
|
|
779
|
+
'canvas__medium-node'
|
|
780
|
+
].join(' ')}
|
|
781
|
+
ref={canvasSocketTooltip.anchorRef}
|
|
782
|
+
style={{
|
|
783
|
+
top: '50%',
|
|
784
|
+
transform: 'translateY(-50%)'
|
|
785
|
+
}}
|
|
786
|
+
onMouseDown={(e) => {
|
|
787
|
+
e.stopPropagation();
|
|
788
|
+
|
|
789
|
+
const permanentNodeElement =
|
|
790
|
+
rootElementRef.current.querySelector(
|
|
791
|
+
`#${getCanvasEntityDOMId(outputMap)}`
|
|
792
|
+
);
|
|
793
|
+
|
|
794
|
+
// Add 'canvas__node__active' class to the element
|
|
795
|
+
permanentNodeElement?.classList.add(
|
|
796
|
+
'canvas__node__active'
|
|
797
|
+
);
|
|
798
|
+
|
|
799
|
+
// Listen to the mouseup event to remove the class
|
|
800
|
+
const mouseUpListener = (e: MouseEvent) => {
|
|
801
|
+
if (permanentNodeElement) {
|
|
802
|
+
const isConnectedToMenu =
|
|
803
|
+
props.project.onGoingConnectionSource ===
|
|
804
|
+
outputMap;
|
|
805
|
+
|
|
806
|
+
if (!isConnectedToMenu) {
|
|
807
|
+
permanentNodeElement.classList.remove(
|
|
808
|
+
'canvas__node__active'
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
if (
|
|
814
|
+
props.project.onGoingConnectionSource !==
|
|
815
|
+
outputMap
|
|
816
|
+
) {
|
|
817
|
+
props.project.off(
|
|
818
|
+
'canvas-connection-end',
|
|
819
|
+
mouseUpListener
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
props.project.on(
|
|
825
|
+
'canvas-connection-end',
|
|
826
|
+
mouseUpListener
|
|
827
|
+
);
|
|
828
|
+
|
|
829
|
+
props.project.startConnection({
|
|
830
|
+
nodeType: ConnectionNodeType.PropertyOut,
|
|
831
|
+
sourceId: `${getCanvasEntityDOMId(outputMap)}`,
|
|
832
|
+
source: outputMap,
|
|
833
|
+
draggableObject: props.canvasElement.draggableObject
|
|
834
|
+
});
|
|
835
|
+
}}
|
|
836
|
+
onMouseUp={(e) => {
|
|
837
|
+
// Remove active class from connected/permanent node
|
|
838
|
+
}}
|
|
839
|
+
/>
|
|
840
|
+
)}
|
|
841
|
+
</li>
|
|
842
|
+
);
|
|
843
|
+
}
|