@orchestrator-ui/orchestrator-ui-components 0.2.4 → 0.2.5
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/.storybook/main.js +1 -1
- package/.turbo/turbo-build.log +9 -7
- package/.turbo/turbo-lint.log +3 -6
- package/.turbo/turbo-test.log +17 -9
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +1092 -358
- package/dist/index.js +22934 -6399
- package/jest.config.cjs +0 -1
- package/package.json +24 -8
- package/src/api/axios.ts +34 -0
- package/src/api/index.ts +170 -0
- package/src/components/WfoAuth/WfoAuth.tsx +22 -0
- package/src/components/WfoAuth/index.ts +1 -0
- package/src/components/{WFOBadges/WFOBadge/WFOBadge.stories.tsx → WfoBadges/WfoBadge/WfoBadge.stories.tsx} +5 -4
- package/src/components/{WFOBadges/WFOBadge/WFOBadge.tsx → WfoBadges/WfoBadge/WfoBadge.tsx} +4 -3
- package/src/components/WfoBadges/WfoBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.stories.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx} +13 -7
- package/src/components/WfoBadges/WfoEngineStatusBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.stories.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.tsx} +8 -7
- package/src/components/WfoBadges/WfoEnvironmentBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.stories.tsx +13 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +95 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.stories.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.tsx} +6 -4
- package/src/components/WfoBadges/WfoHeaderBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOProcessStatusBadge/WFOProcessStatusBadge.tsx → WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx} +8 -6
- package/src/components/WfoBadges/WfoProcessStatusBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.stories.tsx +16 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +70 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.stories.tsx +22 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +53 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOSubscriptionStatusBadge/WFOSubscriptionStatusBadge.stories.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.stories.tsx} +5 -4
- package/src/components/{WFOBadges/WFOSubscriptionStatusBadge/WFOSubscriptionStatusBadge.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx} +12 -10
- package/src/components/WfoBadges/WfoSubscriptionStatusBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +65 -0
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/index.ts +1 -0
- package/src/components/WfoBadges/index.ts +9 -0
- package/src/components/WfoButtonComboBox/WfoButtonComboBox.tsx +76 -0
- package/src/components/WfoButtonComboBox/styles.ts +13 -0
- package/src/components/WfoDateTime/WfoDateTime.tsx +28 -0
- package/src/components/WfoDateTime/index.ts +1 -0
- package/src/components/WfoDropdownButton/WfoDropdownButton.tsx +67 -0
- package/src/components/WfoDropdownButton/index.ts +1 -0
- package/src/components/{WFOFilterTabs/WFOFilterTabs.tsx → WfoFilterTabs/WfoFilterTabs.tsx} +8 -6
- package/src/components/WfoFilterTabs/index.ts +1 -0
- package/src/components/WfoForms/AutoFieldLoader.tsx +110 -0
- package/src/components/WfoForms/AutoFields.tsx +49 -0
- package/src/components/WfoForms/CreateForm.tsx +71 -0
- package/src/components/WfoForms/UserInputForm.tsx +607 -0
- package/src/components/WfoForms/UserInputFormStyling.ts +80 -0
- package/src/components/WfoForms/UserInputFormWizard.tsx +120 -0
- package/src/components/WfoForms/formFields/AcceptField.tsx +239 -0
- package/src/components/WfoForms/formFields/AcceptFieldStyling.ts +29 -0
- package/src/components/WfoForms/formFields/BoolField.tsx +71 -0
- package/src/components/WfoForms/formFields/BoolFieldStyling.ts +68 -0
- package/src/components/WfoForms/formFields/ContactPersonAutocomplete.tsx +97 -0
- package/src/components/WfoForms/formFields/ContactPersonAutocompleteStyles.ts +40 -0
- package/src/components/WfoForms/formFields/ContactPersonNameField.tsx +253 -0
- package/src/components/WfoForms/formFields/DateField.tsx +72 -0
- package/src/components/WfoForms/formFields/DividerField.tsx +29 -0
- package/src/components/WfoForms/formFields/ErrorField.tsx +40 -0
- package/src/components/WfoForms/formFields/ErrorsField.tsx +34 -0
- package/src/components/WfoForms/formFields/ImsNodeIdField.tsx +110 -0
- package/src/components/WfoForms/formFields/IpNetworkField.tsx +128 -0
- package/src/components/WfoForms/formFields/IpPrefixTableField.tsx +454 -0
- package/src/components/WfoForms/formFields/IpPrefixTableFieldStyling.ts +117 -0
- package/src/components/WfoForms/formFields/LabelField.tsx +39 -0
- package/src/components/WfoForms/formFields/ListAddField.tsx +98 -0
- package/src/components/WfoForms/formFields/ListDelField.tsx +95 -0
- package/src/components/WfoForms/formFields/ListField.tsx +113 -0
- package/src/components/WfoForms/formFields/ListItemField.tsx +40 -0
- package/src/components/WfoForms/formFields/ListSelectField.tsx +92 -0
- package/src/components/WfoForms/formFields/LocationCodeField.tsx +66 -0
- package/src/components/WfoForms/formFields/LongTextField.tsx +68 -0
- package/src/components/WfoForms/formFields/NestField.tsx +107 -0
- package/src/components/WfoForms/formFields/NumField.tsx +75 -0
- package/src/components/WfoForms/formFields/OptGroupField.tsx +74 -0
- package/src/components/WfoForms/formFields/OrganisationField.tsx +57 -0
- package/src/components/WfoForms/formFields/ProductField.tsx +78 -0
- package/src/components/WfoForms/formFields/RadioField.tsx +87 -0
- package/src/components/WfoForms/formFields/SelectField.tsx +152 -0
- package/src/components/WfoForms/formFields/SplitPrefix.tsx +163 -0
- package/src/components/WfoForms/formFields/SplitPrefixStyling.ts +11 -0
- package/src/components/WfoForms/formFields/SubmitField.tsx +50 -0
- package/src/components/WfoForms/formFields/SubscriptionField.tsx +351 -0
- package/src/components/WfoForms/formFields/SubscriptionFieldStyling.ts +33 -0
- package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +75 -0
- package/src/components/WfoForms/formFields/TextField.tsx +71 -0
- package/src/components/WfoForms/formFields/TimestampField.tsx +103 -0
- package/src/components/WfoForms/formFields/VlanField.tsx +297 -0
- package/src/components/WfoForms/formFields/index.ts +29 -0
- package/src/components/WfoForms/formFields/listFieldStyling.ts +86 -0
- package/src/components/WfoForms/formFields/reactSelectStyles.ts +45 -0
- package/src/components/WfoForms/formFields/surf/types.ts +53 -0
- package/src/components/WfoForms/formFields/surf/utils.ts +1 -0
- package/src/components/WfoForms/formFields/types.ts +50 -0
- package/src/components/WfoForms/formFields/utils.spec.ts +196 -0
- package/src/components/WfoForms/formFields/utils.ts +65 -0
- package/src/components/WfoForms/index.ts +5 -0
- package/src/components/WfoForms/useAxiosApiClient.ts +8 -0
- package/src/components/WfoInsyncIcon/WfoInsyncIcon.stories.tsx +21 -0
- package/src/components/WfoInsyncIcon/WfoInsyncIcon.tsx +26 -0
- package/src/components/WfoInsyncIcon/index.ts +1 -0
- package/src/components/WfoJsonCodeBlock/WfoJsonCodeBlock.tsx +27 -0
- package/src/components/WfoJsonCodeBlock/styles.ts +13 -0
- package/src/components/WfoKeyValueTable/WfoKeyCell.tsx +25 -0
- package/src/components/WfoKeyValueTable/WfoKeyValueTable.tsx +41 -0
- package/src/components/WfoKeyValueTable/WfoValueCell.tsx +53 -0
- package/src/components/WfoKeyValueTable/index.ts +3 -0
- package/src/components/WfoKeyValueTable/styles.ts +77 -0
- package/src/components/WfoLoading/WfoLoading.tsx +3 -0
- package/src/components/WfoLoading/index.ts +1 -0
- package/src/components/WfoNoResults/WfoNoResults.stories.tsx +19 -0
- package/src/components/WfoNoResults/WfoNoResults.tsx +22 -0
- package/src/components/WfoNoResults/index.ts +1 -0
- package/src/components/WfoNoResults/styles.ts +22 -0
- package/src/components/WfoPageHeader/WfoPageHeader.tsx +25 -0
- package/src/components/{WFOPageTemplate/WFOBreadcrumbs/WFOBreadcrumbs.tsx → WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx} +5 -2
- package/src/components/WfoPageTemplate/WfoBreadcrumbs/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.stories.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.stories.tsx} +7 -5
- package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx} +26 -11
- package/src/components/WfoPageTemplate/WfoPageHeader/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.stories.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.stories.tsx} +8 -6
- package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx} +20 -10
- package/src/components/WfoPageTemplate/WfoPageTemplate/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOSidebar/WFOSidebar.stories.tsx → WfoPageTemplate/WfoSidebar/WfoSidebar.stories.tsx} +6 -4
- package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +161 -0
- package/src/components/WfoPageTemplate/WfoSidebar/WfoStartCreateWorkflowButtonComboBox.tsx +58 -0
- package/src/components/WfoPageTemplate/WfoSidebar/index.ts +1 -0
- package/src/components/WfoPageTemplate/index.ts +4 -0
- package/src/components/{WFOPageTemplate → WfoPageTemplate}/paths.ts +1 -1
- package/src/components/WfoProcessesList/WfoProcessList.tsx +227 -0
- package/src/components/WfoProcessesList/processListObjectMappers.ts +79 -0
- package/src/components/{WFOSearchBar/WFOSearchField.tsx → WfoSearchBar/WfoSearchField.tsx} +4 -3
- package/src/components/WfoSearchBar/index.ts +1 -0
- package/src/components/WfoSettingsModal/WfoInformationModal.tsx +41 -0
- package/src/components/{WFOSettingsModal/WFOSettingsModal.tsx → WfoSettingsModal/WfoSettingsModal.tsx} +3 -2
- package/src/components/WfoSettingsModal/index.tsx +2 -0
- package/src/components/{WFOSettingsPage/WFOEngineStatusButton.tsx → WfoSettingsPage/WfoEngineStatusButton.tsx} +5 -3
- package/src/components/{WFOSettingsPage/WFOFlushSettings.tsx → WfoSettingsPage/WfoFlushSettings.tsx} +19 -30
- package/src/components/{WFOSettingsPage/WFOModifySettings.tsx → WfoSettingsPage/WfoModifySettings.tsx} +7 -5
- package/src/components/{WFOSettingsPage/WFOSettings.tsx → WfoSettingsPage/WfoSettings.tsx} +12 -8
- package/src/components/{WFOSettingsPage/WFOStatus.tsx → WfoSettingsPage/WfoStatus.tsx} +8 -6
- package/src/components/WfoSettingsPage/index.ts +1 -0
- package/src/components/{WFOStartPage/WFOFrequentlyUsed.stories.tsx → WfoStartPage/WfoFrequentlyUsed.stories.tsx} +5 -4
- package/src/components/{WFOStartPage/WFOFrequentlyUsed.tsx → WfoStartPage/WfoFrequentlyUsed.tsx} +4 -3
- package/src/components/{WFOStartPage/WFOListItemStartPage.stories.tsx → WfoStartPage/WfoListItemStartPage.stories.tsx} +6 -4
- package/src/components/{WFOStartPage/WFOListItemStartPage.tsx → WfoStartPage/WfoListItemStartPage.tsx} +9 -6
- package/src/components/{WFOStartPage/WFOListStartPage.stories.tsx → WfoStartPage/WfoListStartPage.stories.tsx} +6 -4
- package/src/components/{WFOStartPage/WFOListStartPage.tsx → WfoStartPage/WfoListStartPage.tsx} +7 -5
- package/src/components/{WFOStartPage/WFOMultiListSection.stories.tsx → WfoStartPage/WfoMultiListSection.stories.tsx} +5 -4
- package/src/components/{WFOStartPage/WFOMultiListSection.tsx → WfoStartPage/WfoMultiListSection.tsx} +7 -5
- package/src/components/WfoStartPage/WfoNewProcessPanel.stories.tsx +13 -0
- package/src/components/{WFOStartPage/WFONewProcessPanel.tsx → WfoStartPage/WfoNewProcessPanel.tsx} +5 -3
- package/src/components/WfoStartPage/WfoStatCards.stories.tsx +13 -0
- package/src/components/{WFOStartPage/WFOStatCards.tsx → WfoStartPage/WfoStatCards.tsx} +4 -2
- package/src/components/WfoStartPage/index.ts +6 -0
- package/src/components/WfoStartTaskButtonComboBox/WfoStartTaskButtonComboBox.tsx +51 -0
- package/src/components/WfoStartTaskButtonComboBox/index.ts +1 -0
- package/src/components/WfoSubscription/SubscriptionKeyValueBlock.tsx +46 -0
- package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +158 -0
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +192 -0
- package/src/components/WfoSubscription/WfoSubscription.tsx +145 -0
- package/src/components/WfoSubscription/WfoSubscriptionActions.tsx +236 -0
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +161 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +147 -0
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +207 -0
- package/src/components/WfoSubscription/index.ts +8 -0
- package/src/components/WfoSubscription/styles.ts +104 -0
- package/src/components/WfoSubscription/utils/index.ts +1 -0
- package/src/components/WfoSubscription/utils/utils.spec.ts +168 -0
- package/src/components/WfoSubscription/utils/utils.ts +76 -0
- package/src/components/{WFOSubscriptionsList/WFOSubscriptionsList.tsx → WfoSubscriptionsList/WfoSubscriptionsList.tsx} +63 -57
- package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/index.ts +1 -2
- package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/mapGrapghQlSubscriptionsResultToSubscriptionListItems.ts +16 -7
- package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/subscriptionListTabs.ts +18 -18
- package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +178 -0
- package/src/components/{WFOTable/WFOSortDirectionIcon.tsx → WfoTable/WfoBasicTable/WfoSortDirectionIcon.tsx} +8 -8
- package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +21 -0
- package/src/components/WfoTable/WfoBasicTable/WfoTableHeaderCell.tsx +120 -0
- package/src/components/WfoTable/WfoBasicTable/index.ts +4 -0
- package/src/components/WfoTable/WfoBasicTable/styles.ts +73 -0
- package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.stories.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx} +9 -7
- package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.tsx} +23 -21
- package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.spec.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts} +7 -7
- package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.ts} +8 -7
- package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +11 -0
- package/src/components/WfoTable/WfoFirstPartUUID/index.ts +1 -0
- package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +31 -0
- package/src/components/WfoTable/WfoSortButtons/WfoSortButtons.tsx +33 -0
- package/src/components/WfoTable/WfoSortButtons/index.ts +2 -0
- package/src/components/WfoTable/WfoSortButtons/styles.ts +20 -0
- package/src/components/{WFOTable/WFOTableSettingsModal/WFOTableSettingsModal.tsx → WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx} +5 -3
- package/src/components/WfoTable/WfoTableSettingsModal/index.ts +1 -0
- package/src/components/WfoTable/WfoTableWithFilter/WfoTableWithFilter.tsx +253 -0
- package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -0
- package/src/components/WfoTable/index.ts +15 -0
- package/src/components/{WFOTable → WfoTable}/utils/columns.ts +27 -16
- package/src/components/{WFOTable → WfoTable}/utils/constants.ts +3 -1
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +52 -0
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +21 -0
- package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.spec.ts +4 -4
- package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.ts +12 -16
- package/src/components/{WFOTable → WfoTable}/utils/tableUtils.spec.ts +1 -1
- package/src/components/{WFOTable → WfoTable}/utils/tableUtils.ts +6 -25
- package/src/components/WfoTimeline/WfoTimeline.tsx +69 -0
- package/src/components/WfoTimeline/WfoTimelineStep.tsx +57 -0
- package/src/components/WfoTimeline/index.ts +1 -0
- package/src/components/WfoTimeline/mapProcessStepStatusToEuiStepStatus.ts +23 -0
- package/src/components/WfoTimeline/styles.ts +165 -0
- package/src/components/WfoTimeline/timelineUtils.ts +14 -0
- package/src/components/WfoToastsList/WfoToastsList.tsx +22 -0
- package/src/components/WfoToastsList/index.ts +1 -0
- package/src/components/WfoTree/WfoTree.tsx +27 -0
- package/src/components/{WFOTree/WFOTreeBranch.tsx → WfoTree/WfoTreeBranch.tsx} +7 -6
- package/src/components/{WFOTree/WFOTreeNode.tsx → WfoTree/WfoTreeNode.tsx} +28 -13
- package/src/components/WfoTree/index.ts +4 -0
- package/src/components/WfoTree/styles.ts +18 -0
- package/src/components/WfoTree/treeUtils.spec.ts +100 -0
- package/src/components/WfoTree/treeUtils.ts +21 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.stories.tsx +13 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +167 -0
- package/src/components/WfoWorkflowSteps/WfoStep/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx +107 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.stories.tsx +16 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +114 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +139 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.stories.tsx +56 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +121 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/index.ts +2 -0
- package/src/components/WfoWorkflowSteps/index.ts +4 -0
- package/src/components/WfoWorkflowSteps/stepListUtils.spec.ts +26 -0
- package/src/components/WfoWorkflowSteps/stepListUtils.ts +56 -0
- package/src/components/WfoWorkflowSteps/styles.ts +121 -0
- package/src/components/confirmationDialog/ConfirmationDialogStyling.ts +12 -0
- package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +112 -0
- package/src/components/confirmationDialog/index.ts +1 -0
- package/src/components/index.ts +19 -11
- package/src/contexts/ApiClientContext.tsx +30 -0
- package/src/contexts/ConfirmationDialogProvider.tsx +99 -0
- package/src/contexts/OrchestratorConfigContext.tsx +8 -3
- package/src/contexts/ToastContext.tsx +136 -0
- package/src/contexts/TreeContext.tsx +53 -32
- package/src/contexts/index.ts +3 -1
- package/src/graphqlQueries/customersQuery.ts +19 -0
- package/src/graphqlQueries/index.ts +4 -0
- package/src/graphqlQueries/processDetailQuery.ts +45 -0
- package/src/graphqlQueries/processListQuery.ts +17 -7
- package/src/graphqlQueries/productBlocksQuery.ts +13 -1
- package/src/graphqlQueries/productsQuery.ts +5 -1
- package/src/graphqlQueries/relatedSubscriptionsQuery.ts +65 -0
- package/src/graphqlQueries/resourceTypesQuery.ts +13 -2
- package/src/graphqlQueries/subscriptionDetailQuery.ts +62 -0
- package/src/graphqlQueries/subscriptionsDropdownOptionsQuery.ts +47 -0
- package/src/graphqlQueries/subscriptionsListQuery.ts +4 -0
- package/src/graphqlQueries/{workflowsQuery.ts → workflows/workflowsQuery.ts} +9 -3
- package/src/graphqlQueries/workflows/workflowsQueryForDropdownList.ts +41 -0
- package/src/hooks/DataFetchHooks.ts +72 -49
- package/src/hooks/ProcessesHooks/useDeleteProcess.ts +37 -0
- package/src/hooks/index.ts +4 -1
- package/src/hooks/surf/useGetSubscriptionDropdownOptions.ts +47 -0
- package/src/hooks/surf/useIsTaggedPort.ts +29 -0
- package/src/hooks/useDataDisplayParams.ts +1 -1
- package/src/hooks/useEngineStatusQuery.ts +20 -10
- package/src/hooks/useOrchestratorConfig.ts +6 -2
- package/src/hooks/useProcessStatusCountsQuery.ts +8 -23
- package/src/hooks/useQueryWithFetch.ts +33 -0
- package/src/hooks/useQueryWithGraphql.ts +18 -13
- package/src/hooks/useSessionWithToken.ts +14 -0
- package/src/hooks/useStoredTableConfig.ts +43 -0
- package/src/hooks/useSubscriptionActions.ts +3 -3
- package/src/hooks/useToastMessage.ts +5 -0
- package/src/hooks/useWithOrchestratorTheme.ts +10 -0
- package/src/icons/WfoArrowNarrowDown.stories.tsx +13 -0
- package/src/icons/{WFOArrowNarrowDown.tsx → WfoArrowNarrowDown.tsx} +4 -2
- package/src/icons/WfoArrowNarrowUp.stories.tsx +13 -0
- package/src/icons/{WFOArrowNarrowUp.tsx → WfoArrowNarrowUp.tsx} +4 -2
- package/src/icons/WfoArrowsExpand.stories.tsx +13 -0
- package/src/icons/WfoArrowsExpand.tsx +33 -0
- package/src/icons/WfoCheckmarkCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOCheckmarkCircleFill.tsx → WfoCheckmarkCircleFill.tsx} +3 -2
- package/src/icons/WfoChevronDown.stories.tsx +13 -0
- package/src/icons/{WFOChevronDown.tsx → WfoChevronDown.tsx} +3 -2
- package/src/icons/WfoChevronUp.stories.tsx +13 -0
- package/src/icons/WfoChevronUp.tsx +33 -0
- package/src/icons/WfoClipboardCopy.stories.tsx +13 -0
- package/src/icons/WfoClipboardCopy.tsx +33 -0
- package/src/icons/WfoCode.stories.tsx +13 -0
- package/src/icons/WfoCode.tsx +35 -0
- package/src/icons/WfoCogFill.stories.tsx +13 -0
- package/src/icons/WfoCogFill.tsx +35 -0
- package/src/icons/WfoEyeFill.stories.tsx +13 -0
- package/src/icons/WfoEyeFill.tsx +35 -0
- package/src/icons/{WFOIconProps.ts → WfoIconProps.ts} +1 -1
- package/src/icons/WfoLogoutIcon.stories.tsx +13 -0
- package/src/icons/{WFOLogoutIcon.tsx → WfoLogoutIcon.tsx} +3 -2
- package/src/icons/WfoMinusCircleFill.stories.tsx +13 -0
- package/src/icons/WfoMinusCircleFill.tsx +33 -0
- package/src/icons/WfoMinusCircleOutline.stories.tsx +13 -0
- package/src/icons/{WFOMinusCircleOutline.tsx → WfoMinusCircleOutline.tsx} +3 -2
- package/src/icons/WfoPencilAlt.stories.tsx +13 -0
- package/src/icons/WfoPencilAlt.tsx +33 -0
- package/src/icons/WfoPlayFill.stories.tsx +13 -0
- package/src/icons/WfoPlayFill.tsx +35 -0
- package/src/icons/WfoPlusCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOPlusCircleFill.tsx → WfoPlusCircleFill.tsx} +3 -2
- package/src/icons/WfoRefresh.stories.tsx +13 -0
- package/src/icons/WfoRefresh.tsx +35 -0
- package/src/icons/WfoSearchStrikethrough.stories.tsx +13 -0
- package/src/icons/WfoSearchStrikethrough.tsx +33 -0
- package/src/icons/WfoSortAsc.stories.tsx +13 -0
- package/src/icons/WfoSortAsc.tsx +33 -0
- package/src/icons/WfoSortDesc.stories.tsx +13 -0
- package/src/icons/WfoSortDesc.tsx +33 -0
- package/src/icons/WfoStatistic.tsx +41 -0
- package/src/icons/WfoStatusDotIcon.stories.tsx +13 -0
- package/src/icons/{WFOStatusDotIcon.tsx → WfoStatusDotIcon.tsx} +3 -2
- package/src/icons/WfoXCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOXCircleFill.tsx → WfoXCircleFill.tsx} +3 -2
- package/src/icons/index.ts +22 -10
- package/src/index.ts +1 -0
- package/src/messages/en-US.json +173 -20
- package/src/messages/getTranslationMessages.spec.ts +1 -1
- package/src/messages/getTranslationMessages.ts +1 -1
- package/src/messages/nl-NL.json +177 -22
- package/src/pages/index.ts +2 -0
- package/src/pages/metadata/{WFOMetadataPageLayout.tsx → WfoMetadataPageLayout.tsx} +5 -3
- package/src/pages/metadata/WfoProductBlocksPage.tsx +239 -0
- package/src/pages/metadata/{WFOProductsPage.tsx → WfoProductsPage.tsx} +96 -54
- package/src/pages/metadata/WfoResourceTypesPage.tsx +185 -0
- package/src/pages/metadata/WfoWorkflowsPage.tsx +194 -0
- package/src/pages/metadata/index.ts +4 -4
- package/src/pages/metadata/workflowListObjectMapper.ts +43 -0
- package/src/pages/processes/WfoProcessDetail.tsx +327 -0
- package/src/pages/processes/WfoProcessDetailPage.tsx +88 -0
- package/src/pages/processes/WfoProcessListPage.tsx +106 -0
- package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +72 -0
- package/src/pages/processes/getProcessListTabTypeFromString.ts +6 -6
- package/src/pages/processes/index.ts +3 -2
- package/src/pages/processes/tabConfig.ts +28 -10
- package/src/pages/processes/timelineUtils.spec.ts +202 -0
- package/src/pages/processes/timelineUtils.ts +113 -0
- package/src/pages/subscriptions/WfoSubscriptionDetailPage.tsx +19 -0
- package/src/pages/subscriptions/{WFOSubscriptionsListPage.tsx → WfoSubscriptionsListPage.tsx} +40 -20
- package/src/pages/subscriptions/index.ts +2 -1
- package/src/pages/tasks/WfoTaskListPage.tsx +120 -0
- package/src/pages/tasks/index.ts +1 -0
- package/src/pages/workflow/WfoStartWorkflowPage.tsx +176 -0
- package/src/pages/workflow/index.ts +1 -0
- package/src/stories/Button.jsx +45 -39
- package/src/stories/Configure.mdx +48 -43
- package/src/stories/Header.jsx +59 -45
- package/src/stories/Page.jsx +81 -60
- package/src/stories/Page.stories.js +2 -1
- package/src/stories/button.css +18 -18
- package/src/stories/colors.mdx +12 -0
- package/src/stories/colors.tsx +27 -0
- package/src/stories/header.css +18 -18
- package/src/stories/page.css +40 -40
- package/src/theme/defaultOrchestratorTheme.ts +16 -0
- package/src/types/forms.ts +40 -0
- package/src/types/index.ts +0 -1
- package/src/types/types.ts +283 -73
- package/src/utils/date.spec.ts +157 -5
- package/src/utils/date.ts +66 -5
- package/src/utils/environmentVariables.spec.ts +17 -0
- package/src/utils/environmentVariables.ts +12 -0
- package/src/utils/getDefaultTableConfig.ts +101 -0
- package/src/utils/getProductNamesFromProcess.spec.ts +133 -0
- package/src/utils/getProductNamesFromProcess.ts +16 -0
- package/src/utils/getTokenName.ts +2 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/string.spec.ts +24 -1
- package/src/utils/strings.ts +5 -0
- package/tsconfig.build.json +14 -0
- package/tsconfig.json +4 -2
- package/src/components/WFOBadges/WFOBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOEngineStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOEnvironmentBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.stories.tsx +0 -12
- package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.tsx +0 -63
- package/src/components/WFOBadges/WFOFailedTasksBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOHeaderBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOProcessStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.stories.tsx +0 -15
- package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.tsx +0 -22
- package/src/components/WFOBadges/WFOProductBlockBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOSubscriptionStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/index.ts +0 -8
- package/src/components/WFOFilterTabs/index.ts +0 -1
- package/src/components/WFOLoading/WFOLoading.tsx +0 -2
- package/src/components/WFOLoading/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOBreadcrumbs/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOPageHeader/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOPageTemplate/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOSidebar/WFOSidebar.tsx +0 -161
- package/src/components/WFOPageTemplate/WFOSidebar/index.ts +0 -1
- package/src/components/WFOPageTemplate/index.ts +0 -4
- package/src/components/WFOSearchBar/index.ts +0 -1
- package/src/components/WFOSettingsModal/index.tsx +0 -1
- package/src/components/WFOSettingsPage/index.ts +0 -1
- package/src/components/WFOStartPage/WFONewProcessPanel.stories.tsx +0 -12
- package/src/components/WFOStartPage/WFOStatCards.stories.tsx +0 -12
- package/src/components/WFOStartPage/index.ts +0 -6
- package/src/components/WFOSubscription/WFOFixedInputBlock.tsx +0 -58
- package/src/components/WFOSubscription/WFOProcessesTimeline.tsx +0 -105
- package/src/components/WFOSubscription/WFOProductBlock.tsx +0 -186
- package/src/components/WFOSubscription/WFOSubscriptionActions.tsx +0 -138
- package/src/components/WFOSubscription/WFOSubscriptionBlock.tsx +0 -109
- package/src/components/WFOSubscription/WFOSubscriptionDetailTree.tsx +0 -184
- package/src/components/WFOSubscription/WFOSubscriptionGeneral.tsx +0 -53
- package/src/components/WFOSubscription/index.ts +0 -7
- package/src/components/WFOSubscription/styles.ts +0 -18
- package/src/components/WFOSubscriptionsList/types.ts +0 -11
- package/src/components/WFOTable/WFOTable.tsx +0 -85
- package/src/components/WFOTable/WFOTableHeaderCell.tsx +0 -30
- package/src/components/WFOTable/WFOTableSettingsModal/index.ts +0 -1
- package/src/components/WFOTable/WFOTableWithFilter/WFOTableWithFilter.tsx +0 -174
- package/src/components/WFOTable/WFOTableWithFilter/index.ts +0 -1
- package/src/components/WFOTable/index.ts +0 -14
- package/src/components/WFOTree/WFOTree.tsx +0 -16
- package/src/contexts/SubscriptionContext.tsx +0 -72
- package/src/hooks/useSubscriptionProcesses.ts +0 -45
- package/src/icons/WFOCheckmarkCircleFill.stories.tsx +0 -12
- package/src/icons/WFOLogoutIcon.stories.tsx +0 -12
- package/src/icons/WFOMinusCircleOutline.stories.tsx +0 -12
- package/src/icons/WFOPlusCircleFill.stories.tsx +0 -12
- package/src/icons/WFOStatusDotIcon.stories.tsx +0 -12
- package/src/icons/WFOXCircleFill.stories.tsx +0 -12
- package/src/pages/metadata/WFOProductBlocksPage.tsx +0 -166
- package/src/pages/metadata/WFOResourceTypesPage.tsx +0 -120
- package/src/pages/metadata/WFOWorkflowsPage.tsx +0 -251
- package/src/pages/processes/WFOProcessListPage.tsx +0 -213
- package/src/pages/processes/WFOProcessesListSubscriptionsCell.tsx +0 -28
- package/src/pages/processes/tableConfig.ts +0 -22
- package/src/types/subscription.ts +0 -21
- package/src/components/{WFOTable → WfoTable}/utils/columns.spec.ts +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React, { Ref, useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
|
|
5
|
+
import { useRawProcessDetails } from '../../../hooks';
|
|
6
|
+
import { Step } from '../../../types';
|
|
7
|
+
import { WfoJsonCodeBlock } from '../../WfoJsonCodeBlock/WfoJsonCodeBlock';
|
|
8
|
+
import { WfoLoading } from '../../WfoLoading';
|
|
9
|
+
import { StepListItem, WfoStepList, WfoStepListRef } from '../WfoStepList';
|
|
10
|
+
import { updateStepListItems } from '../stepListUtils';
|
|
11
|
+
import { WfoStepListHeader } from './WfoStepListHeader';
|
|
12
|
+
|
|
13
|
+
export interface WfoWorkflowStepListProps {
|
|
14
|
+
steps: Step[];
|
|
15
|
+
startedAt: string;
|
|
16
|
+
processId: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const WfoProcessRawData = ({ processId }: { processId: string }) => {
|
|
20
|
+
const { data, isFetching } = useRawProcessDetails(processId);
|
|
21
|
+
return isFetching ? <WfoLoading /> : <WfoJsonCodeBlock data={data || {}} />;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const WfoWorkflowStepList = React.forwardRef(
|
|
25
|
+
(
|
|
26
|
+
{ steps = [], startedAt, processId }: WfoWorkflowStepListProps,
|
|
27
|
+
reference: Ref<WfoStepListRef>,
|
|
28
|
+
) => {
|
|
29
|
+
const [showHiddenKeys, setShowHiddenKeys] = useState(false);
|
|
30
|
+
const [showRaw, setShowRaw] = useState(false);
|
|
31
|
+
|
|
32
|
+
const t = useTranslations('processes.steps');
|
|
33
|
+
|
|
34
|
+
const initialStepListItems: StepListItem[] = steps.map((step) => ({
|
|
35
|
+
step,
|
|
36
|
+
isExpanded: false,
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
const [stepListItems, setStepListItems] =
|
|
40
|
+
useState(initialStepListItems);
|
|
41
|
+
|
|
42
|
+
useEffect(
|
|
43
|
+
() =>
|
|
44
|
+
setStepListItems((previousStepListItems) =>
|
|
45
|
+
updateStepListItems(previousStepListItems, steps),
|
|
46
|
+
),
|
|
47
|
+
[steps],
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const updateStepListItem = (
|
|
51
|
+
stepListItemToUpdate: StepListItem,
|
|
52
|
+
updateFunction: (stepListItem: StepListItem) => StepListItem,
|
|
53
|
+
) =>
|
|
54
|
+
setStepListItems(
|
|
55
|
+
stepListItems.map((stepListItem) =>
|
|
56
|
+
stepListItem === stepListItemToUpdate
|
|
57
|
+
? updateFunction(stepListItem)
|
|
58
|
+
: stepListItem,
|
|
59
|
+
),
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const allStepsAreExpanded = stepListItems.every(
|
|
63
|
+
(item) => item.isExpanded,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const setExpandedStateStepListItems = (isExpanded: boolean) => {
|
|
67
|
+
setStepListItems(
|
|
68
|
+
stepListItems.map((item) => ({
|
|
69
|
+
...item,
|
|
70
|
+
isExpanded,
|
|
71
|
+
})),
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const toggleExpandedStateStepListItem = (stepListItem: StepListItem) =>
|
|
76
|
+
updateStepListItem(stepListItem, (item) => ({
|
|
77
|
+
...item,
|
|
78
|
+
isExpanded: !item.isExpanded,
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const handleExpandStepListItem = (stepListItem: StepListItem) =>
|
|
82
|
+
updateStepListItem(stepListItem, (item) => ({
|
|
83
|
+
...item,
|
|
84
|
+
isExpanded: true,
|
|
85
|
+
}));
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<>
|
|
89
|
+
<WfoStepListHeader
|
|
90
|
+
showHiddenKeys={showHiddenKeys}
|
|
91
|
+
showRaw={showRaw}
|
|
92
|
+
allDetailToggleText={
|
|
93
|
+
allStepsAreExpanded ? t('collapseAll') : t('expandAll')
|
|
94
|
+
}
|
|
95
|
+
onChangeShowHiddenKeys={setShowHiddenKeys}
|
|
96
|
+
onChangeShowRaw={setShowRaw}
|
|
97
|
+
onToggleAllDetailsIsOpen={() =>
|
|
98
|
+
setExpandedStateStepListItems(!allStepsAreExpanded)
|
|
99
|
+
}
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
{showRaw ? (
|
|
103
|
+
<WfoProcessRawData processId={processId} />
|
|
104
|
+
) : (
|
|
105
|
+
<WfoStepList
|
|
106
|
+
ref={reference}
|
|
107
|
+
stepListItems={stepListItems}
|
|
108
|
+
startedAt={startedAt}
|
|
109
|
+
showHiddenKeys={showHiddenKeys}
|
|
110
|
+
onToggleExpandStepListItem={
|
|
111
|
+
toggleExpandedStateStepListItem
|
|
112
|
+
}
|
|
113
|
+
onTriggerExpandStepListItem={handleExpandStepListItem}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
</>
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
WfoWorkflowStepList.displayName = 'WfoWorkflowStepList';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StepState } from '../../types';
|
|
2
|
+
import { getStepContent } from './stepListUtils';
|
|
3
|
+
|
|
4
|
+
describe('getStepContent()', () => {
|
|
5
|
+
const testStepState: StepState = {
|
|
6
|
+
testProp1: 'testValue1',
|
|
7
|
+
testProp2: 'testValue2',
|
|
8
|
+
label_1: 'testLabel1',
|
|
9
|
+
confirmation_mail: 'testConfirmationMail',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
it('returns the same object as the input if showHiddenKeys is true', () => {
|
|
13
|
+
const result = getStepContent(testStepState, true);
|
|
14
|
+
|
|
15
|
+
expect(result).toEqual(testStepState);
|
|
16
|
+
});
|
|
17
|
+
it('returns an object without hidden keys if showHiddenKeys is false', () => {
|
|
18
|
+
const result = getStepContent(testStepState, false);
|
|
19
|
+
|
|
20
|
+
expect(Object.keys(result).length).toEqual(2);
|
|
21
|
+
expect(result.testProp1).toEqual('testValue1');
|
|
22
|
+
expect(result.testProp2).toEqual('testValue2');
|
|
23
|
+
expect(result.label_1).toBeUndefined();
|
|
24
|
+
expect(result.confirmation_mail).toBeUndefined();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Step, StepState } from '../../types';
|
|
2
|
+
import { StepListItem } from './WfoStepList';
|
|
3
|
+
|
|
4
|
+
export const STEP_STATE_HIDDEN_KEYS = [
|
|
5
|
+
'label_',
|
|
6
|
+
'divider_',
|
|
7
|
+
'__',
|
|
8
|
+
'confirmation_mail',
|
|
9
|
+
];
|
|
10
|
+
export const getStepContent = (
|
|
11
|
+
stepDelta: StepState,
|
|
12
|
+
showHiddenKeys: boolean,
|
|
13
|
+
): StepState => {
|
|
14
|
+
if (showHiddenKeys) {
|
|
15
|
+
return stepDelta;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return Object.entries(stepDelta)
|
|
19
|
+
.filter(
|
|
20
|
+
([key]) =>
|
|
21
|
+
!STEP_STATE_HIDDEN_KEYS.some((word) => key.startsWith(word)),
|
|
22
|
+
)
|
|
23
|
+
.reduce<StepState>(
|
|
24
|
+
(previousValue, currentValue) => ({
|
|
25
|
+
...previousValue,
|
|
26
|
+
[currentValue[0]]: currentValue[1],
|
|
27
|
+
}),
|
|
28
|
+
{},
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const updateStepListItems = (
|
|
33
|
+
previousStepListItems: StepListItem[],
|
|
34
|
+
updatedSteps: Step[],
|
|
35
|
+
) => {
|
|
36
|
+
const currentExpandedStateByStepId = previousStepListItems.reduce<
|
|
37
|
+
Map<string, boolean>
|
|
38
|
+
>(
|
|
39
|
+
(previousValue, currentValue) =>
|
|
40
|
+
previousValue.set(
|
|
41
|
+
currentValue.step.stepId,
|
|
42
|
+
currentValue.isExpanded,
|
|
43
|
+
),
|
|
44
|
+
new Map(),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
return updatedSteps.map((step) => {
|
|
48
|
+
const isCurrentlyExpanded = currentExpandedStateByStepId.get(
|
|
49
|
+
step.stepId,
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
step,
|
|
53
|
+
isExpanded: isCurrentlyExpanded ?? false,
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
export const getStyles = (theme: EuiThemeComputed) => {
|
|
5
|
+
const stepSpacerStyle = css({
|
|
6
|
+
borderLeft: `1px solid ${theme.colors.darkShade}`,
|
|
7
|
+
height: '24px',
|
|
8
|
+
marginLeft: '36px',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const stepRowStyle = css({
|
|
12
|
+
flexGrow: 1,
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
justifyContent: 'flex-end',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const stepListHeaderStyle = css({
|
|
18
|
+
marginBottom: '24px',
|
|
19
|
+
marginTop: '60px',
|
|
20
|
+
alignItems: 'flex-end',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const stepListContentStyle = css({
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const stepListContentBoldTextStyle = css({
|
|
29
|
+
fontSize: theme.size.base,
|
|
30
|
+
fontWeight: theme.font.weight.bold,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const stepListContentAnchorStyle = css({
|
|
34
|
+
marginTop: 2,
|
|
35
|
+
marginLeft: 0,
|
|
36
|
+
fontSize: theme.size.m,
|
|
37
|
+
fontWeight: theme.font.weight.bold,
|
|
38
|
+
color: theme.colors.link,
|
|
39
|
+
cursor: 'pointer',
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const stepListOptionsContainerStyle = css({
|
|
43
|
+
flexGrow: 0,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const stepStateIcon = {
|
|
47
|
+
height: '40px',
|
|
48
|
+
width: '40px',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
display: 'flex',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
borderRadius: '24px',
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const stepDurationStyle = {
|
|
56
|
+
fontSize: theme.size.m,
|
|
57
|
+
color: theme.colors.disabled,
|
|
58
|
+
fontWeight: theme.font.weight.semiBold,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const stepStateSuccessIconStyle = css({
|
|
62
|
+
...stepStateIcon,
|
|
63
|
+
backgroundColor: '#CCE3F4',
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const stepStateSuspendIconStyle = css({
|
|
67
|
+
...stepStateIcon,
|
|
68
|
+
backgroundColor: '#FFF3D0',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const stepStatePendingIconStyle = css({
|
|
72
|
+
...stepStateIcon,
|
|
73
|
+
backgroundColor: '#DCE4EF',
|
|
74
|
+
});
|
|
75
|
+
const stepStateFailedIconStyle = css({
|
|
76
|
+
...stepStateIcon,
|
|
77
|
+
backgroundColor: '#F2D4D2',
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const stepHeaderRightStyle = css({
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const stepEmailContainerStyle = css({
|
|
85
|
+
paddingLeft: 24,
|
|
86
|
+
width: 600,
|
|
87
|
+
marginTop: 0,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const getStepHeaderStyle = (isClickable: boolean) =>
|
|
91
|
+
css({
|
|
92
|
+
gap: 0,
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
cursor: isClickable ? 'pointer' : 'default',
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const getStepToggleExpandStyle = (isVisible: boolean) =>
|
|
98
|
+
css({
|
|
99
|
+
marginRight: theme.base / 2,
|
|
100
|
+
visibility: isVisible ? 'visible' : 'hidden',
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
stepDurationStyle,
|
|
105
|
+
stepEmailContainerStyle,
|
|
106
|
+
stepHeaderRightStyle,
|
|
107
|
+
stepListContentAnchorStyle,
|
|
108
|
+
stepListContentBoldTextStyle,
|
|
109
|
+
stepListContentStyle,
|
|
110
|
+
stepListHeaderStyle,
|
|
111
|
+
stepListOptionsContainerStyle,
|
|
112
|
+
stepRowStyle,
|
|
113
|
+
stepSpacerStyle,
|
|
114
|
+
stepStateFailedIconStyle,
|
|
115
|
+
stepStatePendingIconStyle,
|
|
116
|
+
stepStateSuccessIconStyle,
|
|
117
|
+
stepStateSuspendIconStyle,
|
|
118
|
+
getStepHeaderStyle,
|
|
119
|
+
getStepToggleExpandStyle,
|
|
120
|
+
};
|
|
121
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2019-2023 SURF.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
|
|
17
|
+
import { useTranslations } from 'next-intl';
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
EuiButton,
|
|
21
|
+
EuiModal,
|
|
22
|
+
EuiModalBody,
|
|
23
|
+
EuiModalFooter,
|
|
24
|
+
EuiModalHeader,
|
|
25
|
+
EuiModalHeaderTitle,
|
|
26
|
+
EuiOverlayMask,
|
|
27
|
+
} from '@elastic/eui';
|
|
28
|
+
|
|
29
|
+
import { confirmationDialogStyling } from './ConfirmationDialogStyling';
|
|
30
|
+
|
|
31
|
+
interface IProps {
|
|
32
|
+
isOpen?: boolean;
|
|
33
|
+
cancel: (
|
|
34
|
+
e:
|
|
35
|
+
| React.KeyboardEvent<HTMLDivElement>
|
|
36
|
+
| React.MouseEvent<HTMLButtonElement, MouseEvent>
|
|
37
|
+
| undefined,
|
|
38
|
+
) => void;
|
|
39
|
+
confirm: (
|
|
40
|
+
e:
|
|
41
|
+
| React.KeyboardEvent<HTMLDivElement>
|
|
42
|
+
| React.MouseEvent<HTMLButtonElement, MouseEvent>
|
|
43
|
+
| undefined,
|
|
44
|
+
) => void;
|
|
45
|
+
question?: string;
|
|
46
|
+
leavePage?: boolean;
|
|
47
|
+
isError?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default function WfoConfirmationDialog({
|
|
51
|
+
isOpen = false,
|
|
52
|
+
cancel,
|
|
53
|
+
confirm,
|
|
54
|
+
question = '',
|
|
55
|
+
leavePage = false,
|
|
56
|
+
isError = false,
|
|
57
|
+
}: IProps) {
|
|
58
|
+
const t = useTranslations('confirmationDialog');
|
|
59
|
+
const modalContent = (
|
|
60
|
+
<div>
|
|
61
|
+
{leavePage ? (
|
|
62
|
+
<section
|
|
63
|
+
className={`dialog-content ${isError ? ' error' : ''}`}
|
|
64
|
+
>
|
|
65
|
+
<h2>{t('leavePage')}</h2>
|
|
66
|
+
<p>{t('leavePageSub')}</p>
|
|
67
|
+
</section>
|
|
68
|
+
) : (
|
|
69
|
+
<section className="dialog-content">
|
|
70
|
+
<h2>{question}</h2>
|
|
71
|
+
</section>
|
|
72
|
+
)}
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
let modal;
|
|
77
|
+
|
|
78
|
+
if (isOpen) {
|
|
79
|
+
modal = (
|
|
80
|
+
<EuiOverlayMask>
|
|
81
|
+
<EuiModal
|
|
82
|
+
css={confirmationDialogStyling}
|
|
83
|
+
className="confirm-modal"
|
|
84
|
+
onClose={cancel}
|
|
85
|
+
initialFocus="[name=popfirst]"
|
|
86
|
+
>
|
|
87
|
+
<EuiModalHeader>
|
|
88
|
+
<EuiModalHeaderTitle>{t('title')}</EuiModalHeaderTitle>
|
|
89
|
+
</EuiModalHeader>
|
|
90
|
+
|
|
91
|
+
<EuiModalBody>{modalContent}</EuiModalBody>
|
|
92
|
+
|
|
93
|
+
<EuiModalFooter>
|
|
94
|
+
<EuiButton
|
|
95
|
+
onClick={cancel}
|
|
96
|
+
id="dialog-cancel"
|
|
97
|
+
fill={false}
|
|
98
|
+
>
|
|
99
|
+
{leavePage ? t('leave') : t('cancel')}
|
|
100
|
+
</EuiButton>
|
|
101
|
+
|
|
102
|
+
<EuiButton onClick={confirm} fill id="dialog-confirm">
|
|
103
|
+
{leavePage ? t('stay') : t('confirm')}
|
|
104
|
+
</EuiButton>
|
|
105
|
+
</EuiModalFooter>
|
|
106
|
+
</EuiModal>
|
|
107
|
+
</EuiOverlayMask>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return <div className="confirmation-dialog-overlay">{modal}</div>;
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WfoConfirmationDialog';
|
package/src/components/index.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
1
|
+
export * from './WfoBadges';
|
|
2
|
+
export * from './WfoPageTemplate/WfoBreadcrumbs';
|
|
3
|
+
export * from './WfoFilterTabs';
|
|
4
|
+
export * from './WfoKeyValueTable';
|
|
5
|
+
export * from './WfoPageTemplate';
|
|
6
|
+
export * from './WfoSearchBar';
|
|
7
|
+
export * from './WfoSettingsModal';
|
|
8
|
+
export * from './WfoSettingsPage';
|
|
9
|
+
export * from './WfoStartPage';
|
|
10
|
+
export * from './WfoSubscription';
|
|
11
|
+
export * from './WfoTable';
|
|
12
|
+
export * from './WfoTimeline';
|
|
13
|
+
export * from './WfoLoading';
|
|
14
|
+
export * from './WfoToastsList';
|
|
15
|
+
export * from './WfoForms';
|
|
16
|
+
export * from './WfoStartTaskButtonComboBox';
|
|
17
|
+
export * from './WfoDateTime';
|
|
18
|
+
export * from './WfoAuth';
|
|
19
|
+
export * from './WfoDropdownButton';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { ApiClient, getApiClient } from '../api';
|
|
5
|
+
import { OrchestratorConfigContext } from './OrchestratorConfigContext';
|
|
6
|
+
|
|
7
|
+
export interface ApiContext {
|
|
8
|
+
apiClient: ApiClient;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ApiClientContext = createContext<ApiContext>({
|
|
12
|
+
apiClient: getApiClient(''),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type ApiClientContextProviderProps = {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const ApiClientContextProvider = ({
|
|
20
|
+
children,
|
|
21
|
+
}: ApiClientContextProviderProps) => {
|
|
22
|
+
const { orchestratorApiBaseUrl } = useContext(OrchestratorConfigContext);
|
|
23
|
+
const apiClient = getApiClient(orchestratorApiBaseUrl);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<ApiClientContext.Provider value={{ apiClient: apiClient }}>
|
|
27
|
+
{children}
|
|
28
|
+
</ApiClientContext.Provider>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createContext, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import WfoConfirmationDialog from '../components/confirmationDialog/WfoConfirmationDialog';
|
|
5
|
+
|
|
6
|
+
export interface ConfirmDialogActions {
|
|
7
|
+
showConfirmDialog: ShowConfirmDialogType;
|
|
8
|
+
closeConfirmDialog: (
|
|
9
|
+
e:
|
|
10
|
+
| React.KeyboardEvent<HTMLDivElement>
|
|
11
|
+
| React.MouseEvent<HTMLButtonElement, MouseEvent>
|
|
12
|
+
| undefined,
|
|
13
|
+
confirm?: boolean,
|
|
14
|
+
) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ShowConfirmDialog {
|
|
18
|
+
question: string;
|
|
19
|
+
confirmAction: ConfirmDialogActions['closeConfirmDialog'];
|
|
20
|
+
cancelAction?: ConfirmDialogActions['closeConfirmDialog'];
|
|
21
|
+
leavePage?: boolean;
|
|
22
|
+
isError?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type ShowConfirmDialogType = ({
|
|
26
|
+
question,
|
|
27
|
+
confirmAction,
|
|
28
|
+
cancelAction,
|
|
29
|
+
leavePage,
|
|
30
|
+
isError,
|
|
31
|
+
}: ShowConfirmDialog) => void;
|
|
32
|
+
|
|
33
|
+
const ConfirmationDialogContext = createContext<ConfirmDialogActions>({
|
|
34
|
+
showConfirmDialog: () => {},
|
|
35
|
+
closeConfirmDialog: () => {},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const ConfirmationDialogProvider = ConfirmationDialogContext.Provider;
|
|
39
|
+
export default ConfirmationDialogContext;
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
+
export function ConfirmationDialogContextWrapper({ children }: any) {
|
|
43
|
+
const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);
|
|
44
|
+
const [state, setState] = useState<{
|
|
45
|
+
confirmationDialogQuestion: string;
|
|
46
|
+
confirmDialogAction: ConfirmDialogActions['closeConfirmDialog'];
|
|
47
|
+
leavePage: boolean;
|
|
48
|
+
isError: boolean;
|
|
49
|
+
}>({
|
|
50
|
+
confirmationDialogQuestion: '',
|
|
51
|
+
confirmDialogAction: () => {},
|
|
52
|
+
leavePage: false,
|
|
53
|
+
isError: false,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const closeConfirmDialog = () => setConfirmationDialogOpen(false);
|
|
57
|
+
|
|
58
|
+
const showConfirmDialog = ({
|
|
59
|
+
question,
|
|
60
|
+
confirmAction,
|
|
61
|
+
cancelAction,
|
|
62
|
+
leavePage,
|
|
63
|
+
isError,
|
|
64
|
+
}: ShowConfirmDialog) => {
|
|
65
|
+
setConfirmationDialogOpen(true);
|
|
66
|
+
setState({
|
|
67
|
+
confirmationDialogQuestion: question,
|
|
68
|
+
leavePage: !!leavePage,
|
|
69
|
+
isError: !!isError,
|
|
70
|
+
confirmDialogAction: (e, cancelConfirm = false) => {
|
|
71
|
+
closeConfirmDialog();
|
|
72
|
+
|
|
73
|
+
if (!cancelConfirm) {
|
|
74
|
+
return confirmAction(e);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (cancelAction) {
|
|
78
|
+
return cancelAction(e);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<ConfirmationDialogProvider
|
|
86
|
+
value={{ showConfirmDialog, closeConfirmDialog }}
|
|
87
|
+
>
|
|
88
|
+
<WfoConfirmationDialog
|
|
89
|
+
isOpen={confirmationDialogOpen}
|
|
90
|
+
cancel={(e) => state.confirmDialogAction(e, true)}
|
|
91
|
+
confirm={state.confirmDialogAction}
|
|
92
|
+
question={state.confirmationDialogQuestion}
|
|
93
|
+
leavePage={state.leavePage}
|
|
94
|
+
isError={state.isError}
|
|
95
|
+
/>
|
|
96
|
+
{children}
|
|
97
|
+
</ConfirmationDialogProvider>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FC, ReactNode, createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
import {
|
|
4
5
|
OrchestratorConfig,
|
|
5
6
|
useOrchestratorConfig,
|
|
6
7
|
} from '../hooks/useOrchestratorConfig';
|
|
7
8
|
|
|
8
9
|
export const OrchestratorConfigContext = createContext<OrchestratorConfig>({
|
|
9
|
-
engineStatusEndpoint: '',
|
|
10
10
|
environmentName: '',
|
|
11
|
-
|
|
11
|
+
engineStatusEndpoint: '',
|
|
12
12
|
graphqlEndpointCore: '',
|
|
13
13
|
orchestratorApiBaseUrl: '',
|
|
14
14
|
processStatusCountsEndpoint: '',
|
|
15
|
+
processesEndpoint: '',
|
|
15
16
|
subscriptionActionsEndpoint: '',
|
|
16
17
|
subscriptionProcessesEndpoint: '',
|
|
18
|
+
dataRefetchInterval: {
|
|
19
|
+
processDetail: 0,
|
|
20
|
+
},
|
|
21
|
+
authActive: true,
|
|
17
22
|
});
|
|
18
23
|
|
|
19
24
|
export type OrchestratorConfigProviderProps = {
|