@solidxai/core-ui 0.1.14-beta.0 → 0.1.14-beta.10
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/dist/components/auth/AuthLayout.js +1 -1
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +2 -2
- package/dist/components/common/SettingsComponent.module.css +4 -1
- package/dist/components/common/SolidFieldTooltip.d.ts.map +1 -1
- package/dist/components/common/SolidFieldTooltip.js +1 -1
- package/dist/components/common/SolidFieldTooltip.js.map +1 -1
- package/dist/components/common/SolidFieldTooltip.tsx +1 -0
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +7 -6
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidFormStepper.tsx +7 -1
- package/dist/components/common/SolidThemeProvider.d.ts.map +1 -1
- package/dist/components/common/SolidThemeProvider.js +127 -11
- package/dist/components/common/SolidThemeProvider.js.map +1 -1
- package/dist/components/common/SolidThemeProvider.tsx +104 -22
- package/dist/components/core/card/CardGrid.d.ts +1 -1
- package/dist/components/core/card/CardGrid.d.ts.map +1 -1
- package/dist/components/core/card/CardGrid.js +2 -2
- package/dist/components/core/card/CardGrid.js.map +1 -1
- package/dist/components/core/card/CardGrid.tsx +6 -0
- package/dist/components/core/card/CardItem.d.ts +3 -0
- package/dist/components/core/card/CardItem.d.ts.map +1 -1
- package/dist/components/core/card/CardItem.js +5 -4
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +18 -1
- package/dist/components/core/card/SolidCardView.d.ts +28 -1
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +117 -46
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +141 -27
- package/dist/components/core/card/SolidCardViewConfigure.d.ts +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js +15 -6
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +34 -0
- package/dist/components/core/card/cardViewRegistry.d.ts +7 -0
- package/dist/components/core/card/cardViewRegistry.d.ts.map +1 -0
- package/dist/components/core/card/cardViewRegistry.js +17 -0
- package/dist/components/core/card/cardViewRegistry.js.map +1 -0
- package/dist/components/core/card/cardViewRegistry.ts +23 -0
- package/dist/components/core/chatter/useChatterMentions.js +11 -12
- package/dist/components/core/chatter/useChatterMentions.js.map +1 -1
- package/dist/components/core/chatter/useChatterMentions.ts +6 -6
- package/dist/components/core/common/PDFViewer.d.ts +19 -3
- package/dist/components/core/common/PDFViewer.d.ts.map +1 -1
- package/dist/components/core/common/PDFViewer.js +16 -92
- package/dist/components/core/common/PDFViewer.js.map +1 -1
- package/dist/components/core/common/PDFViewer.tsx +43 -106
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js +27 -7
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +19 -4
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js +14 -11
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.tsx +5 -1
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.d.ts +12 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.d.ts.map +1 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.js +50 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.js.map +1 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.tsx +91 -0
- package/dist/components/core/common/SolidCreateButton.d.ts.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js +2 -2
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.tsx +22 -2
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +247 -170
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +255 -117
- package/dist/components/core/common/globalSearchPersistence.d.ts +0 -1
- package/dist/components/core/common/globalSearchPersistence.d.ts.map +1 -1
- package/dist/components/core/common/globalSearchPersistence.js +4 -6
- package/dist/components/core/common/globalSearchPersistence.js.map +1 -1
- package/dist/components/core/common/globalSearchPersistence.ts +4 -4
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.js +2 -13
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.tsx +2 -10
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.d.ts +5 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.js +34 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.tsx +47 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.d.ts +4 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.js +109 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.js.map +1 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.tsx +228 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.d.ts +32 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.d.ts.map +1 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.js +228 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.js.map +1 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.tsx +234 -0
- package/dist/components/core/form/SolidFormActionHeader.d.ts +1 -1
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +68 -41
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +170 -79
- package/dist/components/core/form/SolidFormView.d.ts +2 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +129 -125
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +111 -95
- package/dist/components/core/form/SolidVersionHistory.d.ts +12 -0
- package/dist/components/core/form/SolidVersionHistory.d.ts.map +1 -0
- package/dist/components/core/form/SolidVersionHistory.js +125 -0
- package/dist/components/core/form/SolidVersionHistory.js.map +1 -0
- package/dist/components/core/form/SolidVersionHistory.tsx +159 -0
- package/dist/components/core/form/fields/ISolidField.d.ts +2 -0
- package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -1
- package/dist/components/core/form/fields/ISolidField.js.map +1 -1
- package/dist/components/core/form/fields/ISolidField.tsx +2 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts +1 -2
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +0 -7
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.tsx +1 -13
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +17 -7
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +10 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +28 -11
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +17 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +13 -9
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +17 -6
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +2 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +13 -13
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +16 -11
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js +2 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +2 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +2 -2
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.tsx +4 -1
- package/dist/components/core/kanban/KanbanCard.d.ts +3 -0
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +5 -3
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +16 -2
- package/dist/components/core/kanban/KanbanColumn.d.ts +4 -1
- package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.js +2 -2
- package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.tsx +5 -2
- package/dist/components/core/kanban/SolidKanbanView.d.ts +25 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +114 -55
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +112 -24
- package/dist/components/core/kanban/kanbanViewRegistry.d.ts +7 -0
- package/dist/components/core/kanban/kanbanViewRegistry.d.ts.map +1 -0
- package/dist/components/core/kanban/kanbanViewRegistry.js +17 -0
- package/dist/components/core/kanban/kanbanViewRegistry.js.map +1 -0
- package/dist/components/core/kanban/kanbanViewRegistry.ts +23 -0
- package/dist/components/core/list/PLAN.md +1 -1
- package/dist/components/core/list/SolidListView.d.ts +11 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +160 -104
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +156 -84
- package/dist/components/core/list/SolidListViewConfigure.js +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +1 -1
- package/dist/components/core/list/SolidTableRowCell.js +1 -1
- package/dist/components/core/list/SolidTableRowCell.js.map +1 -1
- package/dist/components/core/list/SolidTableRowCell.tsx +1 -1
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.d.ts +3 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.d.ts.map +1 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.js +23 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.js.map +1 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.ts +26 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.tsx +2 -1
- package/dist/components/core/list/columns/SolidDateColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js +7 -6
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.tsx +8 -4
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js +6 -4
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +3 -3
- package/dist/components/core/list/columns/SolidIntColumn.js +3 -3
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.tsx +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -5
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.tsx +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +2 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +2 -1
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.js +12 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.js.map +1 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.module.css +37 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.tsx +22 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts +1 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.js +2 -2
- package/dist/components/core/locales/SolidChatterLocaleTabView.js.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.tsx +3 -0
- package/dist/components/core/locales/SolidLocale.d.ts +2 -1
- package/dist/components/core/locales/SolidLocale.d.ts.map +1 -1
- package/dist/components/core/locales/SolidLocale.js +83 -11
- package/dist/components/core/locales/SolidLocale.js.map +1 -1
- package/dist/components/core/locales/SolidLocale.tsx +141 -52
- package/dist/components/core/locales/solid-locale.css +153 -44
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +2 -1
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/CreateModel.tsx +2 -0
- package/dist/components/core/model/FieldMetaData.d.ts +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +8 -8
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.tsx +2 -2
- package/dist/components/core/model/FieldMetaDataForm.css +119 -0
- package/dist/components/core/model/FieldMetaDataForm.js +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +1 -1
- package/dist/components/core/module/ModuleMetadataExplorer.css +64 -0
- package/dist/components/core/module/ModulePackageDialog.css +117 -12
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +94 -72
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +82 -57
- package/dist/components/layout/AdminHeaderActions.d.ts.map +1 -1
- package/dist/components/layout/AdminHeaderActions.js +15 -10
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +15 -8
- package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
- package/dist/components/layout/AdminTopHeader.js +1 -18
- package/dist/components/layout/AdminTopHeader.js.map +1 -1
- package/dist/components/layout/AdminTopHeader.tsx +3 -21
- package/dist/components/layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.js +9 -0
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/AppSidebar.tsx +14 -0
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.js +2 -2
- package/dist/components/shad-cn-ui/SolidCodeEditor.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.tsx +3 -0
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.tsx +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.css +16 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts +3 -1
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts.map +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.js +68 -6
- package/dist/components/workflow/WorkflowFlowCanvas.js.map +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.tsx +126 -8
- package/dist/components/workflow/WorkflowNodeSchemaEditor.css +204 -7
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts +3 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts.map +1 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js +685 -47
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js.map +1 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.tsx +1108 -92
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -5
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +8 -5
- package/dist/helpers/resolveActiveUserId.d.ts +13 -0
- package/dist/helpers/resolveActiveUserId.d.ts.map +1 -0
- package/dist/helpers/resolveActiveUserId.js +86 -0
- package/dist/helpers/resolveActiveUserId.js.map +1 -0
- package/dist/helpers/resolveActiveUserId.ts +90 -0
- package/dist/helpers/settingsPayload.d.ts +3 -0
- package/dist/helpers/settingsPayload.d.ts.map +1 -1
- package/dist/helpers/settingsPayload.js +9 -0
- package/dist/helpers/settingsPayload.js.map +1 -1
- package/dist/helpers/settingsPayload.ts +13 -0
- package/dist/hooks/useSession.d.ts.map +1 -1
- package/dist/hooks/useSession.js +12 -6
- package/dist/hooks/useSession.js.map +1 -1
- package/dist/hooks/useSession.ts +8 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +8 -1
- package/dist/redux/api/mediaApi.d.ts +2 -1
- package/dist/redux/api/mediaApi.d.ts.map +1 -1
- package/dist/redux/api/mediaApi.js +8 -1
- package/dist/redux/api/mediaApi.js.map +1 -1
- package/dist/redux/api/mediaApi.ts +8 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts +2 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.js +6 -1
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.ts +6 -1
- package/dist/redux/store/defaultStoreConfig.d.ts +2 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/solidEntityApiPool.js +1 -1
- package/dist/redux/store/solidEntityApiPool.js.map +1 -1
- package/dist/redux/store/solidEntityApiPool.ts +1 -1
- package/dist/resources/globals.css +257 -1
- package/dist/resources/solid-custom.css +185 -18
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/resources/themes/solid-dark-enterprise/theme-variables.css +28 -0
- package/dist/resources/themes/solid-dark-enterprise/theme.css +926 -0
- package/dist/resources/themes/solid-dark-modern/theme-variables.css +27 -0
- package/dist/resources/themes/solid-dark-modern/theme.css +600 -0
- package/dist/resources/themes/solid-light-enterprise/theme-variables.css +28 -0
- package/dist/resources/themes/solid-light-enterprise/theme.css +930 -0
- package/dist/resources/themes/solid-light-modern/theme-variables.css +31 -0
- package/dist/resources/themes/solid-light-modern/theme.css +1041 -0
- package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.js +15 -2
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +17 -2
- package/dist/routes/pages/admin/core/DashboardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.js +31 -3
- package/dist/routes/pages/admin/core/DashboardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.tsx +39 -11
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +4 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +4 -0
- package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +15 -2
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +17 -2
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +5 -13
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +5 -15
- package/dist/routes/pages/admin/core/MediaUploadPage.d.ts +2 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.js +267 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.js.map +1 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.tsx +363 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js +88 -31
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.tsx +126 -19
- package/dist/routes/solidRoutes.js +2 -2
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +2 -2
- package/dist/theme/theme-registry.d.ts +6 -0
- package/dist/theme/theme-registry.d.ts.map +1 -0
- package/dist/theme/theme-registry.js +65 -0
- package/dist/theme/theme-registry.js.map +1 -0
- package/dist/theme/theme-registry.ts +78 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/solid-core.d.ts +25 -0
- package/dist/types/workflow-node.d.ts +1 -0
- package/dist/types/workflow-node.d.ts.map +1 -1
- package/dist/types/workflow-node.js.map +1 -1
- package/dist/types/workflow-node.ts +1 -0
- package/package.json +1 -2
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
WorkflowNodeConfigurationFieldDefinition,
|
|
20
20
|
WorkflowNodeMetadataResponse,
|
|
21
21
|
} from "../../types/workflow-node";
|
|
22
|
+
import { WorkflowNodeDocsPanel } from "./WorkflowNodeDocsPanel";
|
|
22
23
|
import {
|
|
23
24
|
SolidButton,
|
|
24
25
|
SolidCodeEditor,
|
|
@@ -66,6 +67,7 @@ type WorkflowNodeEditorValue = {
|
|
|
66
67
|
then?: WorkflowNodeEditorValue[];
|
|
67
68
|
else?: WorkflowNodeEditorValue[];
|
|
68
69
|
defaults?: WorkflowNodeEditorValue[];
|
|
70
|
+
errors?: WorkflowNodeEditorValue[];
|
|
69
71
|
cases?: Record<string, WorkflowNodeEditorValue[]>;
|
|
70
72
|
};
|
|
71
73
|
|
|
@@ -88,6 +90,7 @@ type WorkflowNodePaletteProps = {
|
|
|
88
90
|
type WorkflowAddNodeDialogProps = {
|
|
89
91
|
open: boolean;
|
|
90
92
|
nodeTypes: WorkflowNodeMetadataResponse[];
|
|
93
|
+
expressionSuggestions?: WorkflowExpressionSuggestion[];
|
|
91
94
|
onOpenChange: (open: boolean) => void;
|
|
92
95
|
createNodeValue: (nodeType: WorkflowNodeMetadataResponse) => WorkflowNodeEditorValue;
|
|
93
96
|
onSubmit: (nodeValue: WorkflowNodeEditorValue) => void;
|
|
@@ -593,6 +596,7 @@ function WorkflowYamlFieldEditor({
|
|
|
593
596
|
emptyValue = {},
|
|
594
597
|
format = "yaml",
|
|
595
598
|
height = "220px",
|
|
599
|
+
expressionSuggestions,
|
|
596
600
|
}: {
|
|
597
601
|
value: any;
|
|
598
602
|
readOnly?: boolean;
|
|
@@ -600,6 +604,7 @@ function WorkflowYamlFieldEditor({
|
|
|
600
604
|
emptyValue?: any;
|
|
601
605
|
format?: "json" | "yaml";
|
|
602
606
|
height?: string;
|
|
607
|
+
expressionSuggestions?: WorkflowExpressionSuggestion[];
|
|
603
608
|
}) {
|
|
604
609
|
const stringifyValue = React.useCallback(
|
|
605
610
|
(nextValue: any, nextEmptyValue: any) =>
|
|
@@ -645,14 +650,26 @@ function WorkflowYamlFieldEditor({
|
|
|
645
650
|
|
|
646
651
|
return (
|
|
647
652
|
<div className="workflow-node-yaml-field-editor">
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
653
|
+
{expressionSuggestions ? (
|
|
654
|
+
<WorkflowExpressionCodeEditor
|
|
655
|
+
language={format}
|
|
656
|
+
height={height}
|
|
657
|
+
fontSize={12}
|
|
658
|
+
readOnly={readOnly}
|
|
659
|
+
value={textValue}
|
|
660
|
+
suggestions={expressionSuggestions}
|
|
661
|
+
onChange={handleEditorChange}
|
|
662
|
+
/>
|
|
663
|
+
) : (
|
|
664
|
+
<SolidCodeEditor
|
|
665
|
+
language={format}
|
|
666
|
+
height={height}
|
|
667
|
+
fontSize={12}
|
|
668
|
+
readOnly={readOnly}
|
|
669
|
+
value={textValue}
|
|
670
|
+
onChange={handleEditorChange}
|
|
671
|
+
/>
|
|
672
|
+
)}
|
|
656
673
|
{parseError ? (
|
|
657
674
|
<div className="workflow-node-yaml-field-error">{parseError}</div>
|
|
658
675
|
) : null}
|
|
@@ -743,14 +760,55 @@ function getExpressionSearchTerm(value: string, caretIndex: number) {
|
|
|
743
760
|
return prefix.slice(expressionStart + 2).trim();
|
|
744
761
|
}
|
|
745
762
|
|
|
746
|
-
|
|
747
|
-
|
|
763
|
+
return "";
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
type WorkflowExpressionAutocompleteSession = {
|
|
767
|
+
mode: "expression" | "insert";
|
|
768
|
+
queryStart: number;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
function getAutocompleteSession(
|
|
772
|
+
value: string,
|
|
773
|
+
caretIndex: number,
|
|
774
|
+
): WorkflowExpressionAutocompleteSession {
|
|
775
|
+
const prefix = value.slice(0, caretIndex);
|
|
776
|
+
const expressionStart = prefix.lastIndexOf("{{");
|
|
777
|
+
|
|
778
|
+
if (expressionStart >= 0 && prefix.lastIndexOf("}}") < expressionStart) {
|
|
779
|
+
return {
|
|
780
|
+
mode: "expression",
|
|
781
|
+
queryStart: expressionStart + 2,
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
return {
|
|
786
|
+
mode: "insert",
|
|
787
|
+
queryStart: caretIndex,
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
function getAutocompleteSessionQuery(
|
|
792
|
+
value: string,
|
|
793
|
+
caretIndex: number,
|
|
794
|
+
session: WorkflowExpressionAutocompleteSession | null,
|
|
795
|
+
) {
|
|
796
|
+
if (!session) {
|
|
797
|
+
return getExpressionSearchTerm(value, caretIndex);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
if (session.queryStart > caretIndex) {
|
|
801
|
+
return "";
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
return value.slice(session.queryStart, caretIndex).trim();
|
|
748
805
|
}
|
|
749
806
|
|
|
750
807
|
function insertExpressionAtCaret(
|
|
751
808
|
value: string,
|
|
752
809
|
caretIndex: number,
|
|
753
810
|
insertText: string,
|
|
811
|
+
session?: WorkflowExpressionAutocompleteSession | null,
|
|
754
812
|
) {
|
|
755
813
|
const prefix = value.slice(0, caretIndex);
|
|
756
814
|
const suffix = value.slice(caretIndex);
|
|
@@ -768,8 +826,10 @@ function insertExpressionAtCaret(
|
|
|
768
826
|
};
|
|
769
827
|
}
|
|
770
828
|
|
|
771
|
-
const
|
|
772
|
-
|
|
829
|
+
const replaceStart =
|
|
830
|
+
session?.mode === "insert" && session.queryStart <= caretIndex
|
|
831
|
+
? session.queryStart
|
|
832
|
+
: caretIndex;
|
|
773
833
|
const spacerBefore =
|
|
774
834
|
replaceStart > 0 && !/\s/.test(value.charAt(replaceStart - 1)) ? " " : "";
|
|
775
835
|
const spacerAfter =
|
|
@@ -818,6 +878,661 @@ function getWorkflowAutocompletePortalPosition(
|
|
|
818
878
|
};
|
|
819
879
|
}
|
|
820
880
|
|
|
881
|
+
function getWorkflowCodeAutocompletePortalPosition(
|
|
882
|
+
editor: any,
|
|
883
|
+
): WorkflowExpressionAutocompletePosition | null {
|
|
884
|
+
if (!editor || typeof window === "undefined") {
|
|
885
|
+
return null;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
const domNode = editor.getDomNode?.();
|
|
889
|
+
const position = editor.getPosition?.();
|
|
890
|
+
const visiblePosition = position
|
|
891
|
+
? editor.getScrolledVisiblePosition?.(position)
|
|
892
|
+
: null;
|
|
893
|
+
|
|
894
|
+
if (!domNode || !position || !visiblePosition) {
|
|
895
|
+
return getWorkflowAutocompletePortalPosition(domNode ?? null);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
const rect = domNode.getBoundingClientRect();
|
|
899
|
+
const viewportWidth = window.innerWidth;
|
|
900
|
+
const viewportHeight = window.innerHeight;
|
|
901
|
+
const gutter = 12;
|
|
902
|
+
const offset = 6;
|
|
903
|
+
const preferredWidth = Math.max(Math.min(rect.width, 520), 420);
|
|
904
|
+
const width = Math.min(preferredWidth, viewportWidth - gutter * 2);
|
|
905
|
+
const caretLeft = rect.left + visiblePosition.left;
|
|
906
|
+
const caretBottom = rect.top + visiblePosition.top + visiblePosition.height;
|
|
907
|
+
const left = Math.min(
|
|
908
|
+
Math.max(caretLeft, gutter),
|
|
909
|
+
Math.max(viewportWidth - width - gutter, gutter),
|
|
910
|
+
);
|
|
911
|
+
const spaceBelow = viewportHeight - caretBottom - gutter;
|
|
912
|
+
const spaceAbove = rect.top + visiblePosition.top - gutter;
|
|
913
|
+
const renderAbove = spaceBelow < 220 && spaceAbove > spaceBelow;
|
|
914
|
+
const availableHeight = Math.max(
|
|
915
|
+
160,
|
|
916
|
+
Math.min(320, renderAbove ? spaceAbove - offset : spaceBelow - offset),
|
|
917
|
+
);
|
|
918
|
+
|
|
919
|
+
return {
|
|
920
|
+
left,
|
|
921
|
+
top: renderAbove
|
|
922
|
+
? Math.max(gutter, rect.top + visiblePosition.top - offset - availableHeight)
|
|
923
|
+
: Math.min(viewportHeight - gutter - availableHeight, caretBottom + offset),
|
|
924
|
+
width,
|
|
925
|
+
maxHeight: availableHeight,
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
function WorkflowExpressionCodeEditor({
|
|
930
|
+
value,
|
|
931
|
+
readOnly,
|
|
932
|
+
language,
|
|
933
|
+
height,
|
|
934
|
+
fontSize = 12,
|
|
935
|
+
suggestions = [],
|
|
936
|
+
onChange,
|
|
937
|
+
}: {
|
|
938
|
+
value: string;
|
|
939
|
+
readOnly?: boolean;
|
|
940
|
+
language: string;
|
|
941
|
+
height?: string;
|
|
942
|
+
fontSize?: string | number;
|
|
943
|
+
suggestions?: WorkflowExpressionSuggestion[];
|
|
944
|
+
onChange: (value: string | undefined) => void;
|
|
945
|
+
}) {
|
|
946
|
+
const editorRef = React.useRef<any>(null);
|
|
947
|
+
const disposablesRef = React.useRef<Array<{ dispose: () => void }>>([]);
|
|
948
|
+
const menuRef = React.useRef<HTMLDivElement | null>(null);
|
|
949
|
+
const scrollBodyRef = React.useRef<HTMLDivElement | null>(null);
|
|
950
|
+
const optionRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
|
|
951
|
+
const autocompleteSessionRef =
|
|
952
|
+
React.useRef<WorkflowExpressionAutocompleteSession | null>(null);
|
|
953
|
+
const isMenuInteractionRef = React.useRef(false);
|
|
954
|
+
const [open, setOpen] = React.useState(false);
|
|
955
|
+
const [query, setQuery] = React.useState("");
|
|
956
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
957
|
+
const [portalPosition, setPortalPosition] =
|
|
958
|
+
React.useState<WorkflowExpressionAutocompletePosition | null>(null);
|
|
959
|
+
|
|
960
|
+
const filteredSuggestions = React.useMemo(() => {
|
|
961
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
962
|
+
if (!normalizedQuery) {
|
|
963
|
+
return suggestions;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
return suggestions.filter((suggestion) =>
|
|
967
|
+
[
|
|
968
|
+
suggestion.group,
|
|
969
|
+
suggestion.label,
|
|
970
|
+
suggestion.insertText,
|
|
971
|
+
suggestion.detail,
|
|
972
|
+
suggestion.description,
|
|
973
|
+
]
|
|
974
|
+
.filter(Boolean)
|
|
975
|
+
.some((entry) => String(entry).toLowerCase().includes(normalizedQuery)),
|
|
976
|
+
);
|
|
977
|
+
}, [query, suggestions]);
|
|
978
|
+
|
|
979
|
+
const filteredSuggestionsRef = React.useRef(filteredSuggestions);
|
|
980
|
+
const activeIndexRef = React.useRef(activeIndex);
|
|
981
|
+
const openRef = React.useRef(open);
|
|
982
|
+
|
|
983
|
+
React.useEffect(() => {
|
|
984
|
+
filteredSuggestionsRef.current = filteredSuggestions;
|
|
985
|
+
}, [filteredSuggestions]);
|
|
986
|
+
|
|
987
|
+
React.useEffect(() => {
|
|
988
|
+
activeIndexRef.current = activeIndex;
|
|
989
|
+
}, [activeIndex]);
|
|
990
|
+
|
|
991
|
+
React.useEffect(() => {
|
|
992
|
+
openRef.current = open;
|
|
993
|
+
}, [open]);
|
|
994
|
+
|
|
995
|
+
React.useEffect(() => {
|
|
996
|
+
setActiveIndex(0);
|
|
997
|
+
}, [query]);
|
|
998
|
+
|
|
999
|
+
const getEditorState = React.useCallback(() => {
|
|
1000
|
+
const editor = editorRef.current;
|
|
1001
|
+
const model = editor?.getModel?.();
|
|
1002
|
+
const position = editor?.getPosition?.();
|
|
1003
|
+
if (!editor || !model || !position) {
|
|
1004
|
+
return null;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return {
|
|
1008
|
+
editor,
|
|
1009
|
+
model,
|
|
1010
|
+
position,
|
|
1011
|
+
value: model.getValue(),
|
|
1012
|
+
caretIndex: model.getOffsetAt(position),
|
|
1013
|
+
};
|
|
1014
|
+
}, []);
|
|
1015
|
+
|
|
1016
|
+
const closePicker = React.useCallback(() => {
|
|
1017
|
+
setOpen(false);
|
|
1018
|
+
setQuery("");
|
|
1019
|
+
setActiveIndex(0);
|
|
1020
|
+
setPortalPosition(null);
|
|
1021
|
+
autocompleteSessionRef.current = null;
|
|
1022
|
+
isMenuInteractionRef.current = false;
|
|
1023
|
+
}, []);
|
|
1024
|
+
|
|
1025
|
+
const updatePortalPosition = React.useCallback(() => {
|
|
1026
|
+
setPortalPosition(getWorkflowCodeAutocompletePortalPosition(editorRef.current));
|
|
1027
|
+
}, []);
|
|
1028
|
+
|
|
1029
|
+
const openPicker = React.useCallback(() => {
|
|
1030
|
+
const editorState = getEditorState();
|
|
1031
|
+
if (!editorState || readOnly) {
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
const session = getAutocompleteSession(
|
|
1036
|
+
editorState.value,
|
|
1037
|
+
editorState.caretIndex,
|
|
1038
|
+
);
|
|
1039
|
+
autocompleteSessionRef.current = session;
|
|
1040
|
+
setQuery(
|
|
1041
|
+
getAutocompleteSessionQuery(
|
|
1042
|
+
editorState.value,
|
|
1043
|
+
editorState.caretIndex,
|
|
1044
|
+
session,
|
|
1045
|
+
),
|
|
1046
|
+
);
|
|
1047
|
+
setPortalPosition(getWorkflowCodeAutocompletePortalPosition(editorState.editor));
|
|
1048
|
+
setOpen(true);
|
|
1049
|
+
}, [getEditorState, readOnly]);
|
|
1050
|
+
|
|
1051
|
+
const scrollAutocompleteBy = React.useCallback((deltaY: number) => {
|
|
1052
|
+
const scrollBody = scrollBodyRef.current;
|
|
1053
|
+
if (!scrollBody) {
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const previousScrollTop = scrollBody.scrollTop;
|
|
1058
|
+
scrollBody.scrollTop += deltaY;
|
|
1059
|
+
|
|
1060
|
+
return scrollBody.scrollTop !== previousScrollTop;
|
|
1061
|
+
}, []);
|
|
1062
|
+
|
|
1063
|
+
const selectSuggestion = React.useCallback(
|
|
1064
|
+
(suggestion: WorkflowExpressionSuggestion) => {
|
|
1065
|
+
const editorState = getEditorState();
|
|
1066
|
+
if (!editorState) {
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
const next = insertExpressionAtCaret(
|
|
1071
|
+
editorState.value,
|
|
1072
|
+
editorState.caretIndex,
|
|
1073
|
+
suggestion.insertText,
|
|
1074
|
+
autocompleteSessionRef.current,
|
|
1075
|
+
);
|
|
1076
|
+
const range = editorState.model.getFullModelRange();
|
|
1077
|
+
editorState.editor.executeEdits("workflow-expression-autocomplete", [
|
|
1078
|
+
{
|
|
1079
|
+
range,
|
|
1080
|
+
text: next.value,
|
|
1081
|
+
forceMoveMarkers: true,
|
|
1082
|
+
},
|
|
1083
|
+
]);
|
|
1084
|
+
const nextPosition = editorState.model.getPositionAt(next.caretIndex);
|
|
1085
|
+
editorState.editor.setPosition(nextPosition);
|
|
1086
|
+
editorState.editor.focus();
|
|
1087
|
+
onChange(next.value);
|
|
1088
|
+
closePicker();
|
|
1089
|
+
},
|
|
1090
|
+
[closePicker, getEditorState, onChange],
|
|
1091
|
+
);
|
|
1092
|
+
|
|
1093
|
+
React.useLayoutEffect(() => {
|
|
1094
|
+
if (!open) {
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
const scrollBody = scrollBodyRef.current;
|
|
1099
|
+
const option = optionRefs.current[activeIndex];
|
|
1100
|
+
if (!scrollBody || !option) {
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
const optionTop = option.offsetTop;
|
|
1105
|
+
const optionBottom = optionTop + option.offsetHeight;
|
|
1106
|
+
const visibleTop = scrollBody.scrollTop;
|
|
1107
|
+
const visibleBottom = visibleTop + scrollBody.clientHeight;
|
|
1108
|
+
|
|
1109
|
+
if (optionTop < visibleTop) {
|
|
1110
|
+
scrollBody.scrollTop = optionTop;
|
|
1111
|
+
} else if (optionBottom > visibleBottom) {
|
|
1112
|
+
scrollBody.scrollTop = optionBottom - scrollBody.clientHeight;
|
|
1113
|
+
}
|
|
1114
|
+
}, [activeIndex, open]);
|
|
1115
|
+
|
|
1116
|
+
React.useLayoutEffect(() => {
|
|
1117
|
+
if (!open) {
|
|
1118
|
+
setPortalPosition(null);
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
updatePortalPosition();
|
|
1123
|
+
}, [filteredSuggestions.length, open, updatePortalPosition, value]);
|
|
1124
|
+
|
|
1125
|
+
React.useEffect(() => {
|
|
1126
|
+
if (!open || typeof window === "undefined") {
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
window.addEventListener("resize", updatePortalPosition);
|
|
1131
|
+
window.addEventListener("scroll", updatePortalPosition, true);
|
|
1132
|
+
|
|
1133
|
+
return () => {
|
|
1134
|
+
window.removeEventListener("resize", updatePortalPosition);
|
|
1135
|
+
window.removeEventListener("scroll", updatePortalPosition, true);
|
|
1136
|
+
};
|
|
1137
|
+
}, [open, updatePortalPosition]);
|
|
1138
|
+
|
|
1139
|
+
React.useEffect(() => {
|
|
1140
|
+
if (!open || typeof document === "undefined") {
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
const handleNativeWheel = (event: WheelEvent) => {
|
|
1145
|
+
const menu = menuRef.current;
|
|
1146
|
+
const scrollBody = scrollBodyRef.current;
|
|
1147
|
+
if (!menu || !scrollBody) {
|
|
1148
|
+
return;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
const target = event.target;
|
|
1152
|
+
const targetInsideMenu =
|
|
1153
|
+
target instanceof Node ? menu.contains(target) : false;
|
|
1154
|
+
const rect = menu.getBoundingClientRect();
|
|
1155
|
+
const pointerInsideMenu =
|
|
1156
|
+
event.clientX >= rect.left &&
|
|
1157
|
+
event.clientX <= rect.right &&
|
|
1158
|
+
event.clientY >= rect.top &&
|
|
1159
|
+
event.clientY <= rect.bottom;
|
|
1160
|
+
|
|
1161
|
+
if (!targetInsideMenu && !pointerInsideMenu) {
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
const normalizedDeltaY =
|
|
1166
|
+
event.deltaMode === WheelEvent.DOM_DELTA_LINE
|
|
1167
|
+
? event.deltaY * 32
|
|
1168
|
+
: event.deltaMode === WheelEvent.DOM_DELTA_PAGE
|
|
1169
|
+
? event.deltaY * scrollBody.clientHeight
|
|
1170
|
+
: event.deltaY || event.deltaX;
|
|
1171
|
+
|
|
1172
|
+
event.preventDefault();
|
|
1173
|
+
event.stopPropagation();
|
|
1174
|
+
event.stopImmediatePropagation();
|
|
1175
|
+
scrollAutocompleteBy(normalizedDeltaY);
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
document.addEventListener("wheel", handleNativeWheel, {
|
|
1179
|
+
capture: true,
|
|
1180
|
+
passive: false,
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
return () => {
|
|
1184
|
+
document.removeEventListener("wheel", handleNativeWheel, {
|
|
1185
|
+
capture: true,
|
|
1186
|
+
});
|
|
1187
|
+
};
|
|
1188
|
+
}, [open, scrollAutocompleteBy]);
|
|
1189
|
+
|
|
1190
|
+
React.useEffect(() => {
|
|
1191
|
+
if (!open || typeof document === "undefined") {
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
const getOptionIndexAtPoint = (clientX: number, clientY: number) => {
|
|
1196
|
+
const menu = menuRef.current;
|
|
1197
|
+
if (!menu) {
|
|
1198
|
+
return -1;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
const menuRect = menu.getBoundingClientRect();
|
|
1202
|
+
const pointerInsideMenu =
|
|
1203
|
+
clientX >= menuRect.left &&
|
|
1204
|
+
clientX <= menuRect.right &&
|
|
1205
|
+
clientY >= menuRect.top &&
|
|
1206
|
+
clientY <= menuRect.bottom;
|
|
1207
|
+
|
|
1208
|
+
if (!pointerInsideMenu) {
|
|
1209
|
+
return -1;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
return optionRefs.current.findIndex((option) => {
|
|
1213
|
+
if (!option) {
|
|
1214
|
+
return false;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
const rect = option.getBoundingClientRect();
|
|
1218
|
+
return (
|
|
1219
|
+
clientX >= rect.left &&
|
|
1220
|
+
clientX <= rect.right &&
|
|
1221
|
+
clientY >= rect.top &&
|
|
1222
|
+
clientY <= rect.bottom
|
|
1223
|
+
);
|
|
1224
|
+
});
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
const handleNativePointerMove = (event: PointerEvent) => {
|
|
1228
|
+
const optionIndex = getOptionIndexAtPoint(event.clientX, event.clientY);
|
|
1229
|
+
if (optionIndex >= 0) {
|
|
1230
|
+
setActiveIndex(optionIndex);
|
|
1231
|
+
}
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
const handleNativePointerDown = (event: PointerEvent) => {
|
|
1235
|
+
const optionIndex = getOptionIndexAtPoint(event.clientX, event.clientY);
|
|
1236
|
+
const suggestion = filteredSuggestions[optionIndex];
|
|
1237
|
+
if (!suggestion) {
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
event.preventDefault();
|
|
1242
|
+
event.stopPropagation();
|
|
1243
|
+
event.stopImmediatePropagation();
|
|
1244
|
+
isMenuInteractionRef.current = true;
|
|
1245
|
+
setActiveIndex(optionIndex);
|
|
1246
|
+
selectSuggestion(suggestion);
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
document.addEventListener("pointermove", handleNativePointerMove, {
|
|
1250
|
+
capture: true,
|
|
1251
|
+
});
|
|
1252
|
+
document.addEventListener("pointerdown", handleNativePointerDown, {
|
|
1253
|
+
capture: true,
|
|
1254
|
+
});
|
|
1255
|
+
|
|
1256
|
+
return () => {
|
|
1257
|
+
document.removeEventListener("pointermove", handleNativePointerMove, {
|
|
1258
|
+
capture: true,
|
|
1259
|
+
});
|
|
1260
|
+
document.removeEventListener("pointerdown", handleNativePointerDown, {
|
|
1261
|
+
capture: true,
|
|
1262
|
+
});
|
|
1263
|
+
};
|
|
1264
|
+
}, [filteredSuggestions, open, selectSuggestion]);
|
|
1265
|
+
|
|
1266
|
+
React.useEffect(
|
|
1267
|
+
() => () => {
|
|
1268
|
+
disposablesRef.current.forEach((disposable) => disposable.dispose());
|
|
1269
|
+
disposablesRef.current = [];
|
|
1270
|
+
},
|
|
1271
|
+
[],
|
|
1272
|
+
);
|
|
1273
|
+
|
|
1274
|
+
const handleEditorMount = React.useCallback(
|
|
1275
|
+
(editor: any) => {
|
|
1276
|
+
disposablesRef.current.forEach((disposable) => disposable.dispose());
|
|
1277
|
+
disposablesRef.current = [];
|
|
1278
|
+
editorRef.current = editor;
|
|
1279
|
+
|
|
1280
|
+
const consumeKeyboardEvent = (browserEvent: KeyboardEvent) => {
|
|
1281
|
+
const preventEditorHandling = () => {
|
|
1282
|
+
browserEvent.preventDefault();
|
|
1283
|
+
browserEvent.stopPropagation();
|
|
1284
|
+
browserEvent.stopImmediatePropagation();
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
if (browserEvent.ctrlKey && browserEvent.code === "Space") {
|
|
1288
|
+
preventEditorHandling();
|
|
1289
|
+
openPicker();
|
|
1290
|
+
return true;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
if (!openRef.current) {
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
if (browserEvent.key === "Escape") {
|
|
1298
|
+
preventEditorHandling();
|
|
1299
|
+
closePicker();
|
|
1300
|
+
return true;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
if (browserEvent.key === "ArrowDown") {
|
|
1304
|
+
preventEditorHandling();
|
|
1305
|
+
setActiveIndex((current) =>
|
|
1306
|
+
Math.min(
|
|
1307
|
+
current + 1,
|
|
1308
|
+
Math.max(filteredSuggestionsRef.current.length - 1, 0),
|
|
1309
|
+
),
|
|
1310
|
+
);
|
|
1311
|
+
return true;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
if (browserEvent.key === "ArrowUp") {
|
|
1315
|
+
preventEditorHandling();
|
|
1316
|
+
setActiveIndex((current) => Math.max(current - 1, 0));
|
|
1317
|
+
return true;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
if (browserEvent.key === "Enter") {
|
|
1321
|
+
const suggestion =
|
|
1322
|
+
filteredSuggestionsRef.current[activeIndexRef.current];
|
|
1323
|
+
if (suggestion) {
|
|
1324
|
+
preventEditorHandling();
|
|
1325
|
+
selectSuggestion(suggestion);
|
|
1326
|
+
return true;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
return false;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
const domNode = editor.getDomNode?.();
|
|
1334
|
+
if (domNode) {
|
|
1335
|
+
const handleNativeKeyDown = (event: KeyboardEvent) => {
|
|
1336
|
+
consumeKeyboardEvent(event);
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
domNode.addEventListener("keydown", handleNativeKeyDown, {
|
|
1340
|
+
capture: true,
|
|
1341
|
+
});
|
|
1342
|
+
disposablesRef.current.push({
|
|
1343
|
+
dispose: () => {
|
|
1344
|
+
domNode.removeEventListener("keydown", handleNativeKeyDown, {
|
|
1345
|
+
capture: true,
|
|
1346
|
+
});
|
|
1347
|
+
},
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
disposablesRef.current.push(
|
|
1352
|
+
editor.onKeyDown((event: any) => {
|
|
1353
|
+
const browserEvent = event.browserEvent;
|
|
1354
|
+
if (!browserEvent) {
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
if (consumeKeyboardEvent(browserEvent)) {
|
|
1359
|
+
event.preventDefault();
|
|
1360
|
+
event.stopPropagation();
|
|
1361
|
+
}
|
|
1362
|
+
}),
|
|
1363
|
+
);
|
|
1364
|
+
|
|
1365
|
+
disposablesRef.current.push(
|
|
1366
|
+
editor.onDidChangeModelContent(() => {
|
|
1367
|
+
if (!openRef.current) {
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
const editorState = getEditorState();
|
|
1372
|
+
if (!editorState) {
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
setQuery(
|
|
1377
|
+
getAutocompleteSessionQuery(
|
|
1378
|
+
editorState.value,
|
|
1379
|
+
editorState.caretIndex,
|
|
1380
|
+
autocompleteSessionRef.current,
|
|
1381
|
+
),
|
|
1382
|
+
);
|
|
1383
|
+
updatePortalPosition();
|
|
1384
|
+
}),
|
|
1385
|
+
);
|
|
1386
|
+
|
|
1387
|
+
disposablesRef.current.push(
|
|
1388
|
+
editor.onDidBlurEditorWidget(() => {
|
|
1389
|
+
window.setTimeout(() => {
|
|
1390
|
+
if (!isMenuInteractionRef.current) {
|
|
1391
|
+
closePicker();
|
|
1392
|
+
}
|
|
1393
|
+
}, 120);
|
|
1394
|
+
}),
|
|
1395
|
+
);
|
|
1396
|
+
},
|
|
1397
|
+
[
|
|
1398
|
+
closePicker,
|
|
1399
|
+
getEditorState,
|
|
1400
|
+
openPicker,
|
|
1401
|
+
selectSuggestion,
|
|
1402
|
+
updatePortalPosition,
|
|
1403
|
+
],
|
|
1404
|
+
);
|
|
1405
|
+
|
|
1406
|
+
const groupedSuggestions = filteredSuggestions.reduce<Record<string, WorkflowExpressionSuggestion[]>>(
|
|
1407
|
+
(acc, suggestion) => {
|
|
1408
|
+
acc[suggestion.group] = acc[suggestion.group] ?? [];
|
|
1409
|
+
acc[suggestion.group].push(suggestion);
|
|
1410
|
+
return acc;
|
|
1411
|
+
},
|
|
1412
|
+
{},
|
|
1413
|
+
);
|
|
1414
|
+
|
|
1415
|
+
const handleMenuWheel = (event: React.WheelEvent<HTMLDivElement>) => {
|
|
1416
|
+
event.preventDefault();
|
|
1417
|
+
event.stopPropagation();
|
|
1418
|
+
scrollAutocompleteBy(event.deltaY || event.deltaX);
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1421
|
+
const handleMenuPointerDown = () => {
|
|
1422
|
+
isMenuInteractionRef.current = true;
|
|
1423
|
+
|
|
1424
|
+
window.setTimeout(() => {
|
|
1425
|
+
const handlePointerUp = () => {
|
|
1426
|
+
window.setTimeout(() => {
|
|
1427
|
+
isMenuInteractionRef.current = false;
|
|
1428
|
+
}, 0);
|
|
1429
|
+
window.removeEventListener("pointerup", handlePointerUp);
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1432
|
+
window.addEventListener("pointerup", handlePointerUp);
|
|
1433
|
+
}, 0);
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
const menu = open && portalPosition && typeof document !== "undefined" ? (
|
|
1437
|
+
<div
|
|
1438
|
+
ref={menuRef}
|
|
1439
|
+
className="workflow-expression-autocomplete-menu"
|
|
1440
|
+
data-solid-dialog-outside-safe="true"
|
|
1441
|
+
style={{
|
|
1442
|
+
left: portalPosition.left,
|
|
1443
|
+
top: portalPosition.top,
|
|
1444
|
+
width: portalPosition.width,
|
|
1445
|
+
maxHeight: portalPosition.maxHeight,
|
|
1446
|
+
}}
|
|
1447
|
+
onPointerDownCapture={handleMenuPointerDown}
|
|
1448
|
+
onWheelCapture={handleMenuWheel}
|
|
1449
|
+
>
|
|
1450
|
+
<div
|
|
1451
|
+
ref={scrollBodyRef}
|
|
1452
|
+
className="workflow-expression-autocomplete-scroll-body"
|
|
1453
|
+
style={{ maxHeight: Math.max(portalPosition.maxHeight - 16, 120) }}
|
|
1454
|
+
>
|
|
1455
|
+
<div className="workflow-expression-autocomplete-help">
|
|
1456
|
+
Start typing to choose from available variables, inputs, secrets, or outputs.
|
|
1457
|
+
</div>
|
|
1458
|
+
{filteredSuggestions.length ? (
|
|
1459
|
+
Object.entries(groupedSuggestions).map(([group, groupSuggestions]) => (
|
|
1460
|
+
<div key={group} className="workflow-expression-autocomplete-group">
|
|
1461
|
+
<div className="workflow-expression-autocomplete-group-title">{group}</div>
|
|
1462
|
+
{groupSuggestions.map((suggestion) => {
|
|
1463
|
+
const absoluteIndex = filteredSuggestions.indexOf(suggestion);
|
|
1464
|
+
const isActive = absoluteIndex === activeIndex;
|
|
1465
|
+
|
|
1466
|
+
return (
|
|
1467
|
+
<button
|
|
1468
|
+
ref={(element) => {
|
|
1469
|
+
optionRefs.current[absoluteIndex] = element;
|
|
1470
|
+
}}
|
|
1471
|
+
key={`${suggestion.group}-${suggestion.insertText}`}
|
|
1472
|
+
type="button"
|
|
1473
|
+
className={`workflow-expression-autocomplete-option ${isActive ? "is-active" : ""}`}
|
|
1474
|
+
onPointerEnter={() => {
|
|
1475
|
+
setActiveIndex(absoluteIndex);
|
|
1476
|
+
}}
|
|
1477
|
+
onMouseEnter={() => {
|
|
1478
|
+
setActiveIndex(absoluteIndex);
|
|
1479
|
+
}}
|
|
1480
|
+
onPointerDown={(event) => {
|
|
1481
|
+
event.preventDefault();
|
|
1482
|
+
event.stopPropagation();
|
|
1483
|
+
selectSuggestion(suggestion);
|
|
1484
|
+
}}
|
|
1485
|
+
onClick={(event) => {
|
|
1486
|
+
event.preventDefault();
|
|
1487
|
+
event.stopPropagation();
|
|
1488
|
+
selectSuggestion(suggestion);
|
|
1489
|
+
}}
|
|
1490
|
+
>
|
|
1491
|
+
<span className="workflow-expression-autocomplete-option-main">
|
|
1492
|
+
<span className="workflow-expression-autocomplete-option-label">
|
|
1493
|
+
{suggestion.label}
|
|
1494
|
+
</span>
|
|
1495
|
+
{suggestion.detail ? (
|
|
1496
|
+
<span className="workflow-expression-autocomplete-option-detail">
|
|
1497
|
+
{suggestion.detail}
|
|
1498
|
+
</span>
|
|
1499
|
+
) : null}
|
|
1500
|
+
</span>
|
|
1501
|
+
{suggestion.description ? (
|
|
1502
|
+
<span className="workflow-expression-autocomplete-option-description">
|
|
1503
|
+
{suggestion.description}
|
|
1504
|
+
</span>
|
|
1505
|
+
) : null}
|
|
1506
|
+
</button>
|
|
1507
|
+
);
|
|
1508
|
+
})}
|
|
1509
|
+
</div>
|
|
1510
|
+
))
|
|
1511
|
+
) : (
|
|
1512
|
+
<div className="workflow-expression-autocomplete-empty">
|
|
1513
|
+
No matching expression references.
|
|
1514
|
+
</div>
|
|
1515
|
+
)}
|
|
1516
|
+
</div>
|
|
1517
|
+
</div>
|
|
1518
|
+
) : null;
|
|
1519
|
+
|
|
1520
|
+
return (
|
|
1521
|
+
<>
|
|
1522
|
+
<SolidCodeEditor
|
|
1523
|
+
language={language}
|
|
1524
|
+
height={height}
|
|
1525
|
+
fontSize={fontSize}
|
|
1526
|
+
readOnly={readOnly}
|
|
1527
|
+
value={value}
|
|
1528
|
+
onChange={onChange}
|
|
1529
|
+
onMount={handleEditorMount}
|
|
1530
|
+
/>
|
|
1531
|
+
{menu ? createPortal(menu, document.body) : null}
|
|
1532
|
+
</>
|
|
1533
|
+
);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
821
1536
|
export function WorkflowExpressionAutocompleteField({
|
|
822
1537
|
value,
|
|
823
1538
|
readOnly,
|
|
@@ -834,11 +1549,17 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
834
1549
|
onChange: (value: string) => void;
|
|
835
1550
|
}) {
|
|
836
1551
|
const inputRef = React.useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);
|
|
1552
|
+
const menuRef = React.useRef<HTMLDivElement | null>(null);
|
|
1553
|
+
const scrollBodyRef = React.useRef<HTMLDivElement | null>(null);
|
|
1554
|
+
const optionRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
|
|
837
1555
|
const [open, setOpen] = React.useState(false);
|
|
838
1556
|
const [query, setQuery] = React.useState("");
|
|
839
1557
|
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
840
1558
|
const [portalPosition, setPortalPosition] =
|
|
841
1559
|
React.useState<WorkflowExpressionAutocompletePosition | null>(null);
|
|
1560
|
+
const autocompleteSessionRef =
|
|
1561
|
+
React.useRef<WorkflowExpressionAutocompleteSession | null>(null);
|
|
1562
|
+
const isMenuInteractionRef = React.useRef(false);
|
|
842
1563
|
|
|
843
1564
|
const filteredSuggestions = React.useMemo(() => {
|
|
844
1565
|
const normalizedQuery = query.trim().toLowerCase();
|
|
@@ -863,6 +1584,42 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
863
1584
|
setActiveIndex(0);
|
|
864
1585
|
}, [query]);
|
|
865
1586
|
|
|
1587
|
+
const scrollAutocompleteBy = React.useCallback((deltaY: number) => {
|
|
1588
|
+
const scrollBody = scrollBodyRef.current;
|
|
1589
|
+
if (!scrollBody) {
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
const previousScrollTop = scrollBody.scrollTop;
|
|
1594
|
+
scrollBody.scrollTop += deltaY;
|
|
1595
|
+
|
|
1596
|
+
return scrollBody.scrollTop !== previousScrollTop;
|
|
1597
|
+
}, []);
|
|
1598
|
+
|
|
1599
|
+
React.useLayoutEffect(() => {
|
|
1600
|
+
if (!open) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
const scrollBody = scrollBodyRef.current;
|
|
1605
|
+
const option = optionRefs.current[activeIndex];
|
|
1606
|
+
if (!scrollBody || !option) {
|
|
1607
|
+
return;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
const optionTop = option.offsetTop;
|
|
1611
|
+
const optionBottom = optionTop + option.offsetHeight;
|
|
1612
|
+
const visibleTop = scrollBody.scrollTop;
|
|
1613
|
+
const visibleBottom = visibleTop + scrollBody.clientHeight;
|
|
1614
|
+
|
|
1615
|
+
if (optionTop < visibleTop) {
|
|
1616
|
+
scrollBody.scrollTop = optionTop;
|
|
1617
|
+
} else if (optionBottom > visibleBottom) {
|
|
1618
|
+
scrollBody.scrollTop = optionBottom - scrollBody.clientHeight;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
}, [activeIndex, open]);
|
|
1622
|
+
|
|
866
1623
|
const updatePortalPosition = React.useCallback(() => {
|
|
867
1624
|
setPortalPosition(getWorkflowAutocompletePortalPosition(inputRef.current));
|
|
868
1625
|
}, []);
|
|
@@ -890,10 +1647,63 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
890
1647
|
};
|
|
891
1648
|
}, [open, updatePortalPosition]);
|
|
892
1649
|
|
|
1650
|
+
React.useEffect(() => {
|
|
1651
|
+
if (!open || typeof document === "undefined") {
|
|
1652
|
+
return;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
const handleNativeWheel = (event: WheelEvent) => {
|
|
1656
|
+
const menu = menuRef.current;
|
|
1657
|
+
const scrollBody = scrollBodyRef.current;
|
|
1658
|
+
if (!menu || !scrollBody) {
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
const target = event.target;
|
|
1663
|
+
const targetInsideMenu =
|
|
1664
|
+
target instanceof Node ? menu.contains(target) : false;
|
|
1665
|
+
const rect = menu.getBoundingClientRect();
|
|
1666
|
+
const pointerInsideMenu =
|
|
1667
|
+
event.clientX >= rect.left &&
|
|
1668
|
+
event.clientX <= rect.right &&
|
|
1669
|
+
event.clientY >= rect.top &&
|
|
1670
|
+
event.clientY <= rect.bottom;
|
|
1671
|
+
|
|
1672
|
+
if (!targetInsideMenu && !pointerInsideMenu) {
|
|
1673
|
+
return;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
const normalizedDeltaY =
|
|
1677
|
+
event.deltaMode === WheelEvent.DOM_DELTA_LINE
|
|
1678
|
+
? event.deltaY * 32
|
|
1679
|
+
: event.deltaMode === WheelEvent.DOM_DELTA_PAGE
|
|
1680
|
+
? event.deltaY * scrollBody.clientHeight
|
|
1681
|
+
: event.deltaY || event.deltaX;
|
|
1682
|
+
|
|
1683
|
+
event.preventDefault();
|
|
1684
|
+
event.stopPropagation();
|
|
1685
|
+
event.stopImmediatePropagation();
|
|
1686
|
+
scrollAutocompleteBy(normalizedDeltaY);
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
document.addEventListener("wheel", handleNativeWheel, {
|
|
1690
|
+
capture: true,
|
|
1691
|
+
passive: false,
|
|
1692
|
+
});
|
|
1693
|
+
|
|
1694
|
+
return () => {
|
|
1695
|
+
document.removeEventListener("wheel", handleNativeWheel, {
|
|
1696
|
+
capture: true,
|
|
1697
|
+
});
|
|
1698
|
+
};
|
|
1699
|
+
}, [open, scrollAutocompleteBy]);
|
|
1700
|
+
|
|
893
1701
|
const openPicker = () => {
|
|
894
1702
|
const input = inputRef.current;
|
|
895
1703
|
const caretIndex = input?.selectionStart ?? value.length;
|
|
896
|
-
|
|
1704
|
+
const session = getAutocompleteSession(value, caretIndex);
|
|
1705
|
+
autocompleteSessionRef.current = session;
|
|
1706
|
+
setQuery(getAutocompleteSessionQuery(value, caretIndex, session));
|
|
897
1707
|
setPortalPosition(getWorkflowAutocompletePortalPosition(input));
|
|
898
1708
|
setOpen(true);
|
|
899
1709
|
};
|
|
@@ -903,12 +1713,19 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
903
1713
|
setQuery("");
|
|
904
1714
|
setActiveIndex(0);
|
|
905
1715
|
setPortalPosition(null);
|
|
1716
|
+
autocompleteSessionRef.current = null;
|
|
1717
|
+
isMenuInteractionRef.current = false;
|
|
906
1718
|
};
|
|
907
1719
|
|
|
908
1720
|
const selectSuggestion = (suggestion: WorkflowExpressionSuggestion) => {
|
|
909
1721
|
const input = inputRef.current;
|
|
910
1722
|
const caretIndex = input?.selectionStart ?? value.length;
|
|
911
|
-
const next = insertExpressionAtCaret(
|
|
1723
|
+
const next = insertExpressionAtCaret(
|
|
1724
|
+
value,
|
|
1725
|
+
caretIndex,
|
|
1726
|
+
suggestion.insertText,
|
|
1727
|
+
autocompleteSessionRef.current,
|
|
1728
|
+
);
|
|
912
1729
|
onChange(next.value);
|
|
913
1730
|
closePicker();
|
|
914
1731
|
|
|
@@ -918,6 +1735,82 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
918
1735
|
});
|
|
919
1736
|
};
|
|
920
1737
|
|
|
1738
|
+
React.useEffect(() => {
|
|
1739
|
+
if (!open || typeof document === "undefined") {
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
const getOptionIndexAtPoint = (clientX: number, clientY: number) => {
|
|
1744
|
+
const menu = menuRef.current;
|
|
1745
|
+
if (!menu) {
|
|
1746
|
+
return -1;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
const menuRect = menu.getBoundingClientRect();
|
|
1750
|
+
const pointerInsideMenu =
|
|
1751
|
+
clientX >= menuRect.left &&
|
|
1752
|
+
clientX <= menuRect.right &&
|
|
1753
|
+
clientY >= menuRect.top &&
|
|
1754
|
+
clientY <= menuRect.bottom;
|
|
1755
|
+
|
|
1756
|
+
if (!pointerInsideMenu) {
|
|
1757
|
+
return -1;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
return optionRefs.current.findIndex((option) => {
|
|
1761
|
+
if (!option) {
|
|
1762
|
+
return false;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
const rect = option.getBoundingClientRect();
|
|
1766
|
+
return (
|
|
1767
|
+
clientX >= rect.left &&
|
|
1768
|
+
clientX <= rect.right &&
|
|
1769
|
+
clientY >= rect.top &&
|
|
1770
|
+
clientY <= rect.bottom
|
|
1771
|
+
);
|
|
1772
|
+
});
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
const handleNativePointerMove = (event: PointerEvent) => {
|
|
1776
|
+
const optionIndex = getOptionIndexAtPoint(event.clientX, event.clientY);
|
|
1777
|
+
if (optionIndex >= 0) {
|
|
1778
|
+
setActiveIndex(optionIndex);
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
const handleNativePointerDown = (event: PointerEvent) => {
|
|
1783
|
+
const optionIndex = getOptionIndexAtPoint(event.clientX, event.clientY);
|
|
1784
|
+
const suggestion = filteredSuggestions[optionIndex];
|
|
1785
|
+
if (!suggestion) {
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
event.preventDefault();
|
|
1790
|
+
event.stopPropagation();
|
|
1791
|
+
event.stopImmediatePropagation();
|
|
1792
|
+
isMenuInteractionRef.current = true;
|
|
1793
|
+
setActiveIndex(optionIndex);
|
|
1794
|
+
selectSuggestion(suggestion);
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
document.addEventListener("pointermove", handleNativePointerMove, {
|
|
1798
|
+
capture: true,
|
|
1799
|
+
});
|
|
1800
|
+
document.addEventListener("pointerdown", handleNativePointerDown, {
|
|
1801
|
+
capture: true,
|
|
1802
|
+
});
|
|
1803
|
+
|
|
1804
|
+
return () => {
|
|
1805
|
+
document.removeEventListener("pointermove", handleNativePointerMove, {
|
|
1806
|
+
capture: true,
|
|
1807
|
+
});
|
|
1808
|
+
document.removeEventListener("pointerdown", handleNativePointerDown, {
|
|
1809
|
+
capture: true,
|
|
1810
|
+
});
|
|
1811
|
+
};
|
|
1812
|
+
}, [filteredSuggestions, open]);
|
|
1813
|
+
|
|
921
1814
|
const handleKeyDown = (
|
|
922
1815
|
event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>,
|
|
923
1816
|
) => {
|
|
@@ -966,7 +1859,13 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
966
1859
|
onChange(nextValue);
|
|
967
1860
|
|
|
968
1861
|
if (open) {
|
|
969
|
-
setQuery(
|
|
1862
|
+
setQuery(
|
|
1863
|
+
getAutocompleteSessionQuery(
|
|
1864
|
+
nextValue,
|
|
1865
|
+
event.target.selectionStart ?? nextValue.length,
|
|
1866
|
+
autocompleteSessionRef.current,
|
|
1867
|
+
),
|
|
1868
|
+
);
|
|
970
1869
|
}
|
|
971
1870
|
};
|
|
972
1871
|
|
|
@@ -986,36 +1885,38 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
986
1885
|
placeholder,
|
|
987
1886
|
onChange: handleChange,
|
|
988
1887
|
onKeyDown: handleKeyDown,
|
|
989
|
-
onBlur: () =>
|
|
1888
|
+
onBlur: () =>
|
|
1889
|
+
window.setTimeout(() => {
|
|
1890
|
+
if (!isMenuInteractionRef.current) {
|
|
1891
|
+
closePicker();
|
|
1892
|
+
}
|
|
1893
|
+
}, 120),
|
|
990
1894
|
};
|
|
991
1895
|
|
|
992
1896
|
const handleMenuWheel = (event: React.WheelEvent<HTMLDivElement>) => {
|
|
993
|
-
const menuElement = event.currentTarget;
|
|
994
|
-
const canScrollVertically =
|
|
995
|
-
menuElement.scrollHeight > menuElement.clientHeight;
|
|
996
|
-
const canScrollHorizontally =
|
|
997
|
-
menuElement.scrollWidth > menuElement.clientWidth;
|
|
998
|
-
|
|
999
|
-
if (!canScrollVertically && !canScrollHorizontally) {
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
1897
|
event.preventDefault();
|
|
1004
1898
|
event.stopPropagation();
|
|
1899
|
+
scrollAutocompleteBy(event.deltaY || event.deltaX);
|
|
1900
|
+
};
|
|
1005
1901
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}
|
|
1902
|
+
const handleMenuPointerDown = () => {
|
|
1903
|
+
isMenuInteractionRef.current = true;
|
|
1009
1904
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1905
|
+
window.setTimeout(() => {
|
|
1906
|
+
const handlePointerUp = () => {
|
|
1907
|
+
window.setTimeout(() => {
|
|
1908
|
+
isMenuInteractionRef.current = false;
|
|
1909
|
+
}, 0);
|
|
1910
|
+
window.removeEventListener("pointerup", handlePointerUp);
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
window.addEventListener("pointerup", handlePointerUp);
|
|
1914
|
+
}, 0);
|
|
1015
1915
|
};
|
|
1016
1916
|
|
|
1017
1917
|
const menu = open && portalPosition && typeof document !== "undefined" ? (
|
|
1018
1918
|
<div
|
|
1919
|
+
ref={menuRef}
|
|
1019
1920
|
className="workflow-expression-autocomplete-menu"
|
|
1020
1921
|
data-solid-dialog-outside-safe="true"
|
|
1021
1922
|
style={{
|
|
@@ -1024,55 +1925,76 @@ export function WorkflowExpressionAutocompleteField({
|
|
|
1024
1925
|
width: portalPosition.width,
|
|
1025
1926
|
maxHeight: portalPosition.maxHeight,
|
|
1026
1927
|
}}
|
|
1027
|
-
|
|
1928
|
+
onPointerDownCapture={handleMenuPointerDown}
|
|
1028
1929
|
onWheelCapture={handleMenuWheel}
|
|
1029
1930
|
>
|
|
1030
|
-
<div
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1931
|
+
<div
|
|
1932
|
+
ref={scrollBodyRef}
|
|
1933
|
+
className="workflow-expression-autocomplete-scroll-body"
|
|
1934
|
+
style={{ maxHeight: Math.max(portalPosition.maxHeight - 16, 120) }}
|
|
1935
|
+
>
|
|
1936
|
+
<div className="workflow-expression-autocomplete-help">
|
|
1937
|
+
Start typing to choose from available variables, inputs, secrets, or outputs.
|
|
1938
|
+
</div>
|
|
1939
|
+
{filteredSuggestions.length ? (
|
|
1940
|
+
Object.entries(groupedSuggestions).map(([group, groupSuggestions]) => (
|
|
1941
|
+
<div key={group} className="workflow-expression-autocomplete-group">
|
|
1942
|
+
<div className="workflow-expression-autocomplete-group-title">{group}</div>
|
|
1943
|
+
{groupSuggestions.map((suggestion) => {
|
|
1944
|
+
const absoluteIndex = filteredSuggestions.indexOf(suggestion);
|
|
1945
|
+
const isActive = absoluteIndex === activeIndex;
|
|
1946
|
+
|
|
1947
|
+
return (
|
|
1948
|
+
<button
|
|
1949
|
+
ref={(element) => {
|
|
1950
|
+
optionRefs.current[absoluteIndex] = element;
|
|
1951
|
+
}}
|
|
1952
|
+
key={`${suggestion.group}-${suggestion.insertText}`}
|
|
1953
|
+
type="button"
|
|
1954
|
+
className={`workflow-expression-autocomplete-option ${isActive ? "is-active" : ""}`}
|
|
1955
|
+
onPointerEnter={() => {
|
|
1956
|
+
setActiveIndex(absoluteIndex);
|
|
1957
|
+
}}
|
|
1958
|
+
onMouseEnter={() => {
|
|
1959
|
+
setActiveIndex(absoluteIndex);
|
|
1960
|
+
}}
|
|
1961
|
+
onPointerDown={(event) => {
|
|
1962
|
+
event.preventDefault();
|
|
1963
|
+
event.stopPropagation();
|
|
1964
|
+
selectSuggestion(suggestion);
|
|
1965
|
+
}}
|
|
1966
|
+
onClick={(event) => {
|
|
1967
|
+
event.preventDefault();
|
|
1968
|
+
event.stopPropagation();
|
|
1969
|
+
selectSuggestion(suggestion);
|
|
1970
|
+
}}
|
|
1971
|
+
>
|
|
1972
|
+
<span className="workflow-expression-autocomplete-option-main">
|
|
1973
|
+
<span className="workflow-expression-autocomplete-option-label">
|
|
1974
|
+
{suggestion.label}
|
|
1975
|
+
</span>
|
|
1976
|
+
{suggestion.detail ? (
|
|
1977
|
+
<span className="workflow-expression-autocomplete-option-detail">
|
|
1978
|
+
{suggestion.detail}
|
|
1979
|
+
</span>
|
|
1980
|
+
) : null}
|
|
1054
1981
|
</span>
|
|
1055
|
-
{suggestion.
|
|
1056
|
-
<span className="workflow-expression-autocomplete-option-
|
|
1057
|
-
{suggestion.
|
|
1982
|
+
{suggestion.description ? (
|
|
1983
|
+
<span className="workflow-expression-autocomplete-option-description">
|
|
1984
|
+
{suggestion.description}
|
|
1058
1985
|
</span>
|
|
1059
1986
|
) : null}
|
|
1060
|
-
</
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
})}
|
|
1987
|
+
</button>
|
|
1988
|
+
);
|
|
1989
|
+
})}
|
|
1990
|
+
</div>
|
|
1991
|
+
))
|
|
1992
|
+
) : (
|
|
1993
|
+
<div className="workflow-expression-autocomplete-empty">
|
|
1994
|
+
No matching expression references.
|
|
1069
1995
|
</div>
|
|
1070
|
-
)
|
|
1071
|
-
|
|
1072
|
-
<div className="workflow-expression-autocomplete-empty">
|
|
1073
|
-
No matching expression references.
|
|
1074
|
-
</div>
|
|
1075
|
-
)}
|
|
1996
|
+
)}
|
|
1997
|
+
</div>
|
|
1076
1998
|
</div>
|
|
1077
1999
|
) : null;
|
|
1078
2000
|
|
|
@@ -1167,6 +2089,20 @@ function WorkflowNodeFieldEditor({
|
|
|
1167
2089
|
: JSON.stringify(normalizedValue, null, 2);
|
|
1168
2090
|
const editorLanguage = field.uiSchema?.editor?.language ?? "json";
|
|
1169
2091
|
|
|
2092
|
+
if (field.expressionAllowed) {
|
|
2093
|
+
return (
|
|
2094
|
+
<WorkflowExpressionCodeEditor
|
|
2095
|
+
language={editorLanguage}
|
|
2096
|
+
height={getConfigurationFieldEditorHeight(field)}
|
|
2097
|
+
fontSize={12}
|
|
2098
|
+
readOnly={readOnly}
|
|
2099
|
+
value={stringValue}
|
|
2100
|
+
suggestions={expressionSuggestions}
|
|
2101
|
+
onChange={(next) => onChange(next ?? "")}
|
|
2102
|
+
/>
|
|
2103
|
+
);
|
|
2104
|
+
}
|
|
2105
|
+
|
|
1170
2106
|
return (
|
|
1171
2107
|
<SolidCodeEditor
|
|
1172
2108
|
language={editorLanguage}
|
|
@@ -1206,6 +2142,7 @@ function WorkflowNodeFieldEditor({
|
|
|
1206
2142
|
emptyValue={field.valueType === "array" ? EMPTY_YAML_ARRAY : EMPTY_YAML_OBJECT}
|
|
1207
2143
|
format={field.widgetHint === "yaml-editor" ? "yaml" : "json"}
|
|
1208
2144
|
height={getConfigurationFieldEditorHeight(field)}
|
|
2145
|
+
expressionSuggestions={field.expressionAllowed ? expressionSuggestions : undefined}
|
|
1209
2146
|
/>
|
|
1210
2147
|
);
|
|
1211
2148
|
}
|
|
@@ -1219,6 +2156,7 @@ function WorkflowNodeFieldEditor({
|
|
|
1219
2156
|
emptyValue={null}
|
|
1220
2157
|
format="yaml"
|
|
1221
2158
|
height={getConfigurationFieldEditorHeight(field)}
|
|
2159
|
+
expressionSuggestions={field.expressionAllowed ? expressionSuggestions : undefined}
|
|
1222
2160
|
/>
|
|
1223
2161
|
);
|
|
1224
2162
|
}
|
|
@@ -1731,24 +2669,90 @@ function WorkflowNodeChildSlotsSummary({
|
|
|
1731
2669
|
}
|
|
1732
2670
|
|
|
1733
2671
|
return (
|
|
1734
|
-
<section className="workflow-node-editor-section">
|
|
2672
|
+
<section className="workflow-node-editor-section workflow-node-editor-topology-summary">
|
|
2673
|
+
<div className="workflow-node-editor-topology-guide">
|
|
2674
|
+
<div className="workflow-node-editor-topology-guide-icon">
|
|
2675
|
+
<Workflow size={18} />
|
|
2676
|
+
</div>
|
|
2677
|
+
<div className="workflow-node-editor-topology-guide-copy">
|
|
2678
|
+
<div className="workflow-node-editor-topology-guide-title">
|
|
2679
|
+
Add child nodes on the topology canvas
|
|
2680
|
+
</div>
|
|
2681
|
+
<div className="workflow-node-editor-topology-guide-text">
|
|
2682
|
+
Close this dialog, then use the{" "}
|
|
2683
|
+
<span className="workflow-node-editor-canvas-plus">
|
|
2684
|
+
<Plus size={12} />
|
|
2685
|
+
insert points
|
|
2686
|
+
</span>{" "}
|
|
2687
|
+
inside this control node's child lanes.
|
|
2688
|
+
</div>
|
|
2689
|
+
</div>
|
|
2690
|
+
</div>
|
|
2691
|
+
|
|
2692
|
+
<div className="workflow-node-editor-topology-steps" aria-label="How to add child nodes">
|
|
2693
|
+
<div className="workflow-node-editor-topology-step">
|
|
2694
|
+
<span className="workflow-node-editor-topology-step-number">1</span>
|
|
2695
|
+
<span>Select the compound node on the canvas.</span>
|
|
2696
|
+
</div>
|
|
2697
|
+
<div className="workflow-node-editor-topology-step">
|
|
2698
|
+
<span className="workflow-node-editor-topology-step-number">2</span>
|
|
2699
|
+
<span>Close this editor when the node settings look right.</span>
|
|
2700
|
+
</div>
|
|
2701
|
+
<div className="workflow-node-editor-topology-step">
|
|
2702
|
+
<span className="workflow-node-editor-topology-step-number">3</span>
|
|
2703
|
+
<span>Use the lane insert points to add or reorder children.</span>
|
|
2704
|
+
</div>
|
|
2705
|
+
</div>
|
|
2706
|
+
|
|
1735
2707
|
<div className="workflow-node-editor-slot-list">
|
|
1736
|
-
{childSlots.map((slot) =>
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
2708
|
+
{childSlots.map((slot) => {
|
|
2709
|
+
const count = getSlotCount(draft, slot);
|
|
2710
|
+
const slotKindLabel =
|
|
2711
|
+
slot.kind === "case-collection"
|
|
2712
|
+
? "Branch cases"
|
|
2713
|
+
: slot.layout === "parallel"
|
|
2714
|
+
? "Parallel lane"
|
|
2715
|
+
: "Sequential lane";
|
|
2716
|
+
const limitLabel = slot.maxItems
|
|
2717
|
+
? `Up to ${slot.maxItems}`
|
|
2718
|
+
: slot.minItems
|
|
2719
|
+
? `At least ${slot.minItems}`
|
|
2720
|
+
: undefined;
|
|
2721
|
+
|
|
2722
|
+
return (
|
|
2723
|
+
<div key={slot.key} className="workflow-node-editor-slot-card">
|
|
2724
|
+
<div className="workflow-node-editor-slot-header">
|
|
2725
|
+
<div className="workflow-node-editor-slot-main">
|
|
2726
|
+
<span className="workflow-node-editor-slot-icon">
|
|
2727
|
+
<GitBranch size={15} />
|
|
2728
|
+
</span>
|
|
2729
|
+
<div className="workflow-node-editor-slot-copy">
|
|
2730
|
+
<div className="workflow-node-editor-slot-title-row">
|
|
2731
|
+
<div className="workflow-node-editor-slot-title">
|
|
2732
|
+
{slot.label ?? slot.key}
|
|
2733
|
+
</div>
|
|
2734
|
+
<SolidTag>{slotKindLabel}</SolidTag>
|
|
2735
|
+
{slot.required ? <SolidTag>Required</SolidTag> : null}
|
|
2736
|
+
{limitLabel ? <SolidTag>{limitLabel}</SolidTag> : null}
|
|
2737
|
+
</div>
|
|
2738
|
+
<div className="workflow-node-editor-description">
|
|
2739
|
+
{slot.description ??
|
|
2740
|
+
"Use the topology canvas to add, reorder, or remove child nodes."}
|
|
2741
|
+
</div>
|
|
2742
|
+
</div>
|
|
2743
|
+
</div>
|
|
2744
|
+
<div className="workflow-node-editor-slot-count">
|
|
2745
|
+
<strong>{count}</strong>
|
|
2746
|
+
<span>{count === 1 ? "child" : "children"}</span>
|
|
2747
|
+
</div>
|
|
2748
|
+
</div>
|
|
2749
|
+
<div className="workflow-node-editor-slot-canvas-hint">
|
|
2750
|
+
<Plus size={13} />
|
|
2751
|
+
Canvas insert points add nodes to this {slot.label ?? slot.key} lane.
|
|
1743
2752
|
</div>
|
|
1744
2753
|
</div>
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
))}
|
|
1748
|
-
</div>
|
|
1749
|
-
<div className="workflow-node-editor-note">
|
|
1750
|
-
Child node membership is edited from the topology canvas. This dialog edits the
|
|
1751
|
-
control node itself.
|
|
2754
|
+
);
|
|
2755
|
+
})}
|
|
1752
2756
|
</div>
|
|
1753
2757
|
</section>
|
|
1754
2758
|
);
|
|
@@ -1826,6 +2830,16 @@ function WorkflowNodeFullEditor({
|
|
|
1826
2830
|
content: <WorkflowNodeChildSlotsSummary nodeType={nodeType} draft={value} />,
|
|
1827
2831
|
}
|
|
1828
2832
|
: null,
|
|
2833
|
+
{
|
|
2834
|
+
value: "docs",
|
|
2835
|
+
label: "Docs",
|
|
2836
|
+
content: (
|
|
2837
|
+
<WorkflowNodeDocsPanel
|
|
2838
|
+
nodeType={nodeType}
|
|
2839
|
+
className="workflow-node-editor-docs-panel"
|
|
2840
|
+
/>
|
|
2841
|
+
),
|
|
2842
|
+
},
|
|
1829
2843
|
].filter(Boolean) as Array<{ value: string; label: string; content: React.ReactNode }>;
|
|
1830
2844
|
|
|
1831
2845
|
React.useEffect(() => {
|
|
@@ -1973,6 +2987,7 @@ export function WorkflowNodeEditorDialog({
|
|
|
1973
2987
|
export function WorkflowAddNodeDialog({
|
|
1974
2988
|
open,
|
|
1975
2989
|
nodeTypes,
|
|
2990
|
+
expressionSuggestions,
|
|
1976
2991
|
onOpenChange,
|
|
1977
2992
|
createNodeValue,
|
|
1978
2993
|
onSubmit,
|
|
@@ -2255,6 +3270,7 @@ export function WorkflowAddNodeDialog({
|
|
|
2255
3270
|
nodeType={selectedNodeType}
|
|
2256
3271
|
value={nodeDraft}
|
|
2257
3272
|
onChange={setNodeDraft}
|
|
3273
|
+
expressionSuggestions={expressionSuggestions}
|
|
2258
3274
|
/>
|
|
2259
3275
|
) : null}
|
|
2260
3276
|
</SolidDialogBody>
|