@orchestrator-ui/orchestrator-ui-components 0.12.0 → 0.13.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@0.12.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@0.13.0 build
3
3
  > tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,6 +9,6 @@
9
9
  ESM Build start
10
10
  DTS Build start
11
11
  ESM dist/index.js 2.15 MB
12
- ESM ⚡️ Build success in 767ms
13
- DTS ⚡️ Build success in 11712ms
14
- DTS dist/index.d.ts 120.96 KB
12
+ ESM ⚡️ Build success in 1132ms
13
+ DTS ⚡️ Build success in 12299ms
14
+ DTS dist/index.d.ts 120.91 KB
@@ -1,4 +1,4 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@0.12.0 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@0.13.0 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
@@ -1,33 +1,34 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@0.12.0 test
2
+ > @orchestrator-ui/orchestrator-ui-components@0.13.0 test
3
3
  > jest
4
4
 
5
5
  PASS Orchestrator UI Components Tests src/pages/processes/timelineUtils.spec.ts
6
- PASS Orchestrator UI Components Tests src/utils/date.spec.ts
7
6
  PASS Orchestrator UI Components Tests src/components/WfoForms/formFields/utils.spec.ts
7
+ PASS Orchestrator UI Components Tests src/utils/date.spec.ts
8
+ PASS Orchestrator UI Components Tests src/utils/getProductNamesFromProcess.spec.ts
8
9
  PASS Orchestrator UI Components Tests src/components/WfoSubscription/utils/utils.spec.ts
9
10
  PASS Orchestrator UI Components Tests src/utils/string.spec.ts
10
- PASS Orchestrator UI Components Tests src/utils/getProductNamesFromProcess.spec.ts
11
11
  PASS Orchestrator UI Components Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
12
- PASS Orchestrator UI Components Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
13
12
  PASS Orchestrator UI Components Tests src/components/WfoTree/treeUtils.spec.ts
13
+ PASS Orchestrator UI Components Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
14
14
  PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableUtils.spec.ts
15
- PASS Orchestrator UI Components Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
16
15
  PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
16
+ PASS Orchestrator UI Components Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
17
17
  PASS Orchestrator UI Components Tests src/messages/getTranslationMessages.spec.ts
18
- PASS Orchestrator UI Components Tests src/components/WfoTable/utils/columns.spec.ts
19
18
  PASS Orchestrator UI Components Tests src/utils/getToastMessage.spec.ts
19
+ PASS Orchestrator UI Components Tests src/components/WfoTable/utils/columns.spec.ts
20
20
  PASS Orchestrator UI Components Tests src/utils/sortObjectKeys.spec.ts
21
- PASS Orchestrator UI Components Tests src/utils/getTokenName.spec.ts
22
21
  PASS Orchestrator UI Components Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
22
+ PASS Orchestrator UI Components Tests src/utils/getTokenName.spec.ts
23
23
  PASS Orchestrator UI Components Tests src/utils/environmentVariables.spec.ts
24
+ PASS Orchestrator UI Components Tests src/utils/onlyUnique.spec.ts
24
25
  PASS Orchestrator UI Components Tests src/utils/uuid.spec.ts
25
26
  PASS Orchestrator UI Components Tests src/utils/getTypedFieldFromObject.spec.ts
26
27
  PASS Orchestrator UI Components Tests src/utils/getQueryVariablesForExport.spec.ts
27
28
  PASS Orchestrator UI Components Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
28
29
 
29
- Test Suites: 23 passed, 23 total
30
- Tests: 141 passed, 141 total
30
+ Test Suites: 24 passed, 24 total
31
+ Tests: 144 passed, 144 total
31
32
  Snapshots: 0 total
32
- Time: 4.392 s
33
+ Time: 4.561 s
33
34
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 89835a4: 702 - Moves processDetail to rtkquery
8
+
9
+ ### Patch Changes
10
+
11
+ - e56c142: 760 remove duplicate product tags on metadata workflow page
12
+
3
13
  ## 0.12.0
4
14
 
5
15
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1938,10 +1938,6 @@ declare const GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY: TypedDocumentNode<Subscript
1938
1938
  subscriptionId: string;
1939
1939
  }>;
1940
1940
 
1941
- declare const GET_PROCESS_DETAIL_GRAPHQL_QUERY: TypedDocumentNode<ProcessesDetailResult, {
1942
- processId: string;
1943
- }>;
1944
-
1945
1941
  declare const GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY: graphql.DocumentNode;
1946
1942
  declare function getSubscriptionDropdownOptionsGraphQlQuery<QueryVariablesType = SubscriptionDropdownOption>(): TypedDocumentNode<SubscriptionDropdownOptionsResult, GraphqlQueryVariables<QueryVariablesType>>;
1947
1943
 
@@ -3084,4 +3080,6 @@ declare const getQueryVariablesForExport: <T extends object>(queryVariables: Gra
3084
3080
  query?: string | undefined;
3085
3081
  };
3086
3082
 
3087
- export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, ApiClient, ApiClientContext, ApiClientContextProvider, type ApiClientContextProviderProps, type ApiContext, type AppDispatch, type AutoFieldsProps, BadgeType, BaseApiClient, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, CacheTags, ColorModes, type ColumnConfig, type ConfirmDialogActions, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type Customer, CustomerField, type CustomerFieldProps, type CustomersResult, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZES, type DataDisplayParams, type DataDisplayReturnValues, DateField, type DateFieldProps, DividerField, type DividerFieldProps, type EmailAddress, type EmailState, EngineStatus, Environment, ErrorField, type ErrorFieldProps, ErrorsField, type ErrorsFieldProps, type ExternalService, type Field, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, GET_PROCESS_DETAIL_GRAPHQL_QUERY, GET_PROCESS_LIST_GRAPHQL_QUERY, GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY, GET_PROCESS_STEPS_GRAPHQL_QUERY, GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY, GET_PRODUCTS_GRAPHQL_QUERY, GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY, GET_RESOURCE_TYPES_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY, GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY, GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY, type GraphQLPageInfo, type GraphQLSort, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, type IPvAnyNetworkFieldProps, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InputForm, IpNetworkField, type KeyValue, LabelField, type LabelFieldProps, ListAddField, type ListAddFieldProps, ListDelField, type ListDelFieldProps, ListField, type ListFieldProps, ListSelectField, type ListSelectFieldProps, Locale, LocationCodeField, type LocationCodeFieldProps, LongTextField, type LongTextFieldProps, MAXIMUM_ITEMS_FOR_BULK_FETCHING, METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY, METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY, METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, NestField, type NestFieldProps, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListItem, type ProcessListResponse, type ProcessListResult, ProcessStatus, type ProcessStatusCounts, type ProcessStepsResult, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductDefinition, type ProductDefinitionsResult, ProductField, type ProductFieldProps, ProductLifecycleStatus, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type RootState, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, type SelectFieldProps, type ShowConfirmDialog, type ShowConfirmDialogType, SortOrder, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, SubscriptionStatus, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TranslationMessagesMap, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, VlanField, type VlanFieldProps, WFO_STATUS_COLOR_FIELD, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBreadcrumbs, WfoCheckmarkCircleFill, WfoChevronDown, WfoChevronUp, WfoCode, WfoCogFill, WfoContactEnvelopeFill, type WfoControlColumn, WfoCubeSolid, WfoDataGridTable, type WfoDataGridTableColumns, type WfoDataGridTableProps, type WfoDataSearch, type WfoDataSorting, WfoDateTime, type WfoDateTimeProps, WfoDropdownButton, WfoEngineStatusBadge, WfoEngineStatusButton, WfoEnvironmentBadge, WfoError, WfoErrorBoundary, type WfoEuiBasicTableColumn, WfoEyeFill, WfoFailedTasksBadge, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInformationModal, type WfoInformationModalProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLoading, WfoLogoutIcon, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoPageHeader, type WfoPageHeaderProps, WfoPageTemplate, type WfoPageTemplateProps, WfoPageUnauthorized, WfoPencil, WfoPencilAlt, WfoPlayCircle, WfoPlayFill, WfoPlusCircleFill, type WfoPolicyRenderFallbackProps, WfoPolicyRenderPageFallback, WfoProcessDetailPage, WfoProcessListSubscriptionsCell, WfoProcessRawData, WfoProcessStatusBadge, type WfoProcessStatusBadgeProps, WfoProcessSubscriptionDelta, WfoProcessesList, type WfoProcessesListProps, type WfoProcessesListSubscriptionsCellProps, WfoProcessesTimeline, WfoProductBlockBadge, type WfoProductBlockBadgeProps, WfoProductBlocksPage, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoRefresh, WfoResourceTypesPage, WfoSearchField, type WfoSearchFieldProps, WfoSearchStrikethrough, type WfoSession, WfoSettingsModal, type WfoSettingsModalProps, WfoSettingsPage, WfoShare, WfoSideMenu, WfoSidebar, type WfoSidebarProps, WfoSortAsc, WfoSortButton, type WfoSortButtonProps, WfoSortButtons, type WfoSortButtonsProps, WfoSortDesc, WfoSortDirectionIcon, type WfoSortDirectionIconProps, WfoStartPage, WfoStartProcessPage, WfoStartTaskButtonComboBox, WfoStatistic, WfoStatus, WfoStatusColorField, type WfoStatusColorFieldProps, WfoStatusDotIcon, WfoStep, WfoStepList, WfoStepListHeader, type WfoStepListHeaderProps, type WfoStepListProps, type WfoStepListRef, type WfoStepProps, WfoStepStatusIcon, type WfoStepStatusIconProps, WfoSubmitModal, type WfoSubmitModalProps, WfoSubscription, WfoSubscriptionActions, type WfoSubscriptionActionsProps, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionsListPage, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTextAnchor, WfoTimeline, type WfoTimelineProps, WfoToastsList, type WfoTreeNodeMap, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoViewList, WfoWarningTriangle, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, addToastMessage, calculateTimeDifference, camelToHuman, clearTableConfigFromLocalStorage, defaultOrchestratorTheme, defaultTasksListTabs, determineNewSortOrder, determinePageIndex, flattenArrayProps, formatDate, formatDateCetWithUtc, getApiClient, getCurrentBrowserLocale, getDataSortHandler, getDate, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getInitialColumnOrder, getNumberValueFromEnvironmentVariable, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProcessListGraphQlQuery, getProcessListSummaryGraphQlQuery, getProductBlockTitle, getProductNamesFromProcess, getProductsQuery, getProductsSummaryQuery, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getSubscriptionDropdownOptionsGraphQlQuery, getSubscriptionsListGraphQlQuery, getSubscriptionsListSummaryGraphQlQuery, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapSortableAndFilterableValuesToTableColumnConfig, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, processListQuery, removeSuffix, removeToastMessage, renderEmptyElementWhenNotAllowedByPolicy, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, stop, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCacheNames, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useFilterQueryWithRest, useGetCustomersQuery, useGetEngineStatusQuery, useGetProcessListQuery, useGetTranslationMessages, useMutateProcess, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useProcessStatusCountsQuery, useQueryWithFetch, useQueryWithGraphql, useQueryWithGraphqlLazy, useRawProcessDetails, useSetEngineStatusMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionActions, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment };
3083
+ declare const onlyUnique: (value: string, index: number, array: string[]) => boolean;
3084
+
3085
+ export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, ApiClient, ApiClientContext, ApiClientContextProvider, type ApiClientContextProviderProps, type ApiContext, type AppDispatch, type AutoFieldsProps, BadgeType, BaseApiClient, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, CacheTags, ColorModes, type ColumnConfig, type ConfirmDialogActions, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type Customer, CustomerField, type CustomerFieldProps, type CustomersResult, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZES, type DataDisplayParams, type DataDisplayReturnValues, DateField, type DateFieldProps, DividerField, type DividerFieldProps, type EmailAddress, type EmailState, EngineStatus, Environment, ErrorField, type ErrorFieldProps, ErrorsField, type ErrorsFieldProps, type ExternalService, type Field, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, GET_PROCESS_LIST_GRAPHQL_QUERY, GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY, GET_PROCESS_STEPS_GRAPHQL_QUERY, GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY, GET_PRODUCTS_GRAPHQL_QUERY, GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY, GET_RESOURCE_TYPES_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY, GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY, GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY, type GraphQLPageInfo, type GraphQLSort, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, type IPvAnyNetworkFieldProps, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InputForm, IpNetworkField, type KeyValue, LabelField, type LabelFieldProps, ListAddField, type ListAddFieldProps, ListDelField, type ListDelFieldProps, ListField, type ListFieldProps, ListSelectField, type ListSelectFieldProps, Locale, LocationCodeField, type LocationCodeFieldProps, LongTextField, type LongTextFieldProps, MAXIMUM_ITEMS_FOR_BULK_FETCHING, METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY, METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY, METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, NestField, type NestFieldProps, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListItem, type ProcessListResponse, type ProcessListResult, ProcessStatus, type ProcessStatusCounts, type ProcessStepsResult, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductDefinition, type ProductDefinitionsResult, ProductField, type ProductFieldProps, ProductLifecycleStatus, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type RootState, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, type SelectFieldProps, type ShowConfirmDialog, type ShowConfirmDialogType, SortOrder, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, SubscriptionStatus, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TranslationMessagesMap, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, VlanField, type VlanFieldProps, WFO_STATUS_COLOR_FIELD, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBreadcrumbs, WfoCheckmarkCircleFill, WfoChevronDown, WfoChevronUp, WfoCode, WfoCogFill, WfoContactEnvelopeFill, type WfoControlColumn, WfoCubeSolid, WfoDataGridTable, type WfoDataGridTableColumns, type WfoDataGridTableProps, type WfoDataSearch, type WfoDataSorting, WfoDateTime, type WfoDateTimeProps, WfoDropdownButton, WfoEngineStatusBadge, WfoEngineStatusButton, WfoEnvironmentBadge, WfoError, WfoErrorBoundary, type WfoEuiBasicTableColumn, WfoEyeFill, WfoFailedTasksBadge, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInformationModal, type WfoInformationModalProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLoading, WfoLogoutIcon, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoPageHeader, type WfoPageHeaderProps, WfoPageTemplate, type WfoPageTemplateProps, WfoPageUnauthorized, WfoPencil, WfoPencilAlt, WfoPlayCircle, WfoPlayFill, WfoPlusCircleFill, type WfoPolicyRenderFallbackProps, WfoPolicyRenderPageFallback, WfoProcessDetailPage, WfoProcessListSubscriptionsCell, WfoProcessRawData, WfoProcessStatusBadge, type WfoProcessStatusBadgeProps, WfoProcessSubscriptionDelta, WfoProcessesList, type WfoProcessesListProps, type WfoProcessesListSubscriptionsCellProps, WfoProcessesTimeline, WfoProductBlockBadge, type WfoProductBlockBadgeProps, WfoProductBlocksPage, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoRefresh, WfoResourceTypesPage, WfoSearchField, type WfoSearchFieldProps, WfoSearchStrikethrough, type WfoSession, WfoSettingsModal, type WfoSettingsModalProps, WfoSettingsPage, WfoShare, WfoSideMenu, WfoSidebar, type WfoSidebarProps, WfoSortAsc, WfoSortButton, type WfoSortButtonProps, WfoSortButtons, type WfoSortButtonsProps, WfoSortDesc, WfoSortDirectionIcon, type WfoSortDirectionIconProps, WfoStartPage, WfoStartProcessPage, WfoStartTaskButtonComboBox, WfoStatistic, WfoStatus, WfoStatusColorField, type WfoStatusColorFieldProps, WfoStatusDotIcon, WfoStep, WfoStepList, WfoStepListHeader, type WfoStepListHeaderProps, type WfoStepListProps, type WfoStepListRef, type WfoStepProps, WfoStepStatusIcon, type WfoStepStatusIconProps, WfoSubmitModal, type WfoSubmitModalProps, WfoSubscription, WfoSubscriptionActions, type WfoSubscriptionActionsProps, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionsListPage, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTextAnchor, WfoTimeline, type WfoTimelineProps, WfoToastsList, type WfoTreeNodeMap, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoViewList, WfoWarningTriangle, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, addToastMessage, calculateTimeDifference, camelToHuman, clearTableConfigFromLocalStorage, defaultOrchestratorTheme, defaultTasksListTabs, determineNewSortOrder, determinePageIndex, flattenArrayProps, formatDate, formatDateCetWithUtc, getApiClient, getCurrentBrowserLocale, getDataSortHandler, getDate, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getInitialColumnOrder, getNumberValueFromEnvironmentVariable, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProcessListGraphQlQuery, getProcessListSummaryGraphQlQuery, getProductBlockTitle, getProductNamesFromProcess, getProductsQuery, getProductsSummaryQuery, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getSubscriptionDropdownOptionsGraphQlQuery, getSubscriptionsListGraphQlQuery, getSubscriptionsListSummaryGraphQlQuery, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapSortableAndFilterableValuesToTableColumnConfig, onlyUnique, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, processListQuery, removeSuffix, removeToastMessage, renderEmptyElementWhenNotAllowedByPolicy, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, stop, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCacheNames, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useFilterQueryWithRest, useGetCustomersQuery, useGetEngineStatusQuery, useGetProcessListQuery, useGetTranslationMessages, useMutateProcess, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useProcessStatusCountsQuery, useQueryWithFetch, useQueryWithGraphql, useQueryWithGraphqlLazy, useRawProcessDetails, useSetEngineStatusMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionActions, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment };
package/dist/index.js CHANGED
@@ -40512,11 +40512,11 @@ var processApi = orchestratorApi.injectEndpoints({
40512
40512
  getProcessList: build.query({
40513
40513
  query: (variables) => ({ document: processListQuery, variables }),
40514
40514
  transformResponse: (response) => {
40515
- var _a, _b;
40516
- const processes = ((_a = response == null ? void 0 : response.processes) == null ? void 0 : _a.page) || [];
40515
+ var _a;
40516
+ const processes = response.processes.page || [];
40517
40517
  return {
40518
40518
  processes,
40519
- pageInfo: ((_b = response.processes) == null ? void 0 : _b.pageInfo) || {}
40519
+ pageInfo: ((_a = response.processes) == null ? void 0 : _a.pageInfo) || {}
40520
40520
  };
40521
40521
  }
40522
40522
  })
@@ -43317,6 +43317,11 @@ var getQueryVariablesForExport = (queryVariables) => __spreadProps(__spreadValue
43317
43317
  after: 0
43318
43318
  });
43319
43319
 
43320
+ // src/utils/onlyUnique.ts
43321
+ var onlyUnique = (value, index, array) => {
43322
+ return array.indexOf(value) === index;
43323
+ };
43324
+
43320
43325
  // src/components/WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx
43321
43326
  import { Fragment as Fragment2, jsx as jsx49, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
43322
43327
  var WfoBreadcrumbs = () => {
@@ -48114,48 +48119,9 @@ var GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY = parse(gql6`
48114
48119
  }
48115
48120
  `);
48116
48121
 
48117
- // src/graphqlQueries/processDetailQuery.ts
48118
- import { gql as gql7 } from "graphql-request";
48119
- var GET_PROCESS_DETAIL_GRAPHQL_QUERY = parse(gql7`
48120
- query ProcessDetail($processId: String!) {
48121
- processes(filterBy: { value: $processId, field: "processId" }) {
48122
- page {
48123
- processId
48124
- lastStatus
48125
- createdBy
48126
- startedAt
48127
- lastModifiedAt
48128
- lastStep
48129
- workflowName
48130
- isTask
48131
- form
48132
- steps {
48133
- name
48134
- status
48135
- stepId
48136
- executed
48137
- stateDelta
48138
- }
48139
- customer {
48140
- fullname
48141
- }
48142
- subscriptions {
48143
- page {
48144
- product {
48145
- name
48146
- }
48147
- description
48148
- subscriptionId
48149
- }
48150
- }
48151
- }
48152
- }
48153
- }
48154
- `);
48155
-
48156
48122
  // src/graphqlQueries/subscriptionsDropdownOptionsQuery.ts
48157
- import { gql as gql8 } from "graphql-request";
48158
- var GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY = parse(gql8`
48123
+ import { gql as gql7 } from "graphql-request";
48124
+ var GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY = parse(gql7`
48159
48125
  query SubscriptionDropdownOptions($filterBy: [GraphqlFilter!]) {
48160
48126
  subscriptions(filterBy: $filterBy, first: 1000000, after: 0) {
48161
48127
  page {
@@ -48187,8 +48153,8 @@ function getSubscriptionDropdownOptionsGraphQlQuery() {
48187
48153
  }
48188
48154
 
48189
48155
  // src/graphqlQueries/processStepsQuery.ts
48190
- import { gql as gql9 } from "graphql-request";
48191
- var GET_PROCESS_STEPS_GRAPHQL_QUERY = parse(gql9`
48156
+ import { gql as gql8 } from "graphql-request";
48157
+ var GET_PROCESS_STEPS_GRAPHQL_QUERY = parse(gql8`
48192
48158
  query ProcessSteps($processName: String!) {
48193
48159
  workflows(filterBy: { field: "name", value: $processName }) {
48194
48160
  page {
@@ -48202,8 +48168,8 @@ var GET_PROCESS_STEPS_GRAPHQL_QUERY = parse(gql9`
48202
48168
  `);
48203
48169
 
48204
48170
  // src/graphqlQueries/processListQuery.ts
48205
- import { gql as gql10 } from "graphql-request";
48206
- var GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY = parse(gql10`
48171
+ import { gql as gql9 } from "graphql-request";
48172
+ var GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY = parse(gql9`
48207
48173
  query ProcessListSummary(
48208
48174
  $first: Int!
48209
48175
  $after: Int!
@@ -48231,7 +48197,7 @@ var GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY = parse(gql10`
48231
48197
  }
48232
48198
  }
48233
48199
  `);
48234
- var GET_PROCESS_LIST_GRAPHQL_QUERY = parse(gql10`
48200
+ var GET_PROCESS_LIST_GRAPHQL_QUERY = parse(gql9`
48235
48201
  query ProcessList(
48236
48202
  $first: Int!
48237
48203
  $after: Int!
@@ -48333,8 +48299,8 @@ import Link2 from "next/link";
48333
48299
  import { EuiFlexGroup as EuiFlexGroup10, EuiFlexItem as EuiFlexItem9, EuiSpacer as EuiSpacer13, EuiSwitch as EuiSwitch2 } from "@elastic/eui";
48334
48300
 
48335
48301
  // src/graphqlQueries/relatedSubscriptionsQuery.ts
48336
- import { gql as gql11 } from "graphql-request";
48337
- var GET_RELATED_SUBSCRIPTIONS_GRAPHQL_QUERY = parse(gql11`
48302
+ import { gql as gql10 } from "graphql-request";
48303
+ var GET_RELATED_SUBSCRIPTIONS_GRAPHQL_QUERY = parse(gql10`
48338
48304
  query RelatedSubscriptions(
48339
48305
  $subscriptionId: String!
48340
48306
  $first: Int!
@@ -54980,8 +54946,8 @@ import { useTranslations as useTranslations44 } from "next-intl";
54980
54946
  import { EuiBadgeGroup as EuiBadgeGroup5 } from "@elastic/eui";
54981
54947
 
54982
54948
  // src/graphqlQueries/workflows/workflowsQuery.ts
54983
- import { gql as gql12 } from "graphql-request";
54984
- var GET_WORKFLOWS_GRAPHQL_QUERY = parse(gql12`
54949
+ import { gql as gql11 } from "graphql-request";
54950
+ var GET_WORKFLOWS_GRAPHQL_QUERY = parse(gql11`
54985
54951
  query MetadataWorkflows(
54986
54952
  $first: Int!
54987
54953
  $after: Int!
@@ -55093,7 +55059,7 @@ var WfoWorkflowsPage = () => {
55093
55059
  productTags: {
55094
55060
  field: "productTags",
55095
55061
  name: t("productTags"),
55096
- render: (productTags) => /* @__PURE__ */ jsx148(Fragment32, { children: productTags == null ? void 0 : productTags.map((productTag, index) => /* @__PURE__ */ jsx148(
55062
+ render: (productTags) => /* @__PURE__ */ jsx148(Fragment32, { children: productTags == null ? void 0 : productTags.filter(onlyUnique).map((productTag, index) => /* @__PURE__ */ jsx148(
55097
55063
  WfoProductBlockBadge,
55098
55064
  {
55099
55065
  badgeType: "product_tag" /* PRODUCT_TAG */,
@@ -55101,7 +55067,7 @@ var WfoWorkflowsPage = () => {
55101
55067
  },
55102
55068
  index
55103
55069
  )) }),
55104
- renderDetails: (productTags) => /* @__PURE__ */ jsx148(EuiBadgeGroup5, { gutterSize: "s", children: productTags == null ? void 0 : productTags.map((productTag, index) => /* @__PURE__ */ jsx148(
55070
+ renderDetails: (productTags) => /* @__PURE__ */ jsx148(EuiBadgeGroup5, { gutterSize: "s", children: productTags == null ? void 0 : productTags.filter(onlyUnique).map((productTag, index) => /* @__PURE__ */ jsx148(
55105
55071
  WfoProductBlockBadge,
55106
55072
  {
55107
55073
  badgeType: "product_tag" /* PRODUCT_TAG */,
@@ -55234,6 +55200,59 @@ var WfoProcessListSubscriptionsCell = ({
55234
55200
  // src/pages/processes/WfoProcessDetailPage.tsx
55235
55201
  import { useEffect as useEffect22, useRef as useRef7, useState as useState36 } from "react";
55236
55202
 
55203
+ // src/rtk/endpoints/processDetail.ts
55204
+ var processDetailQuery = `query ProcessDetail($processId: String!) {
55205
+ processes(filterBy: { value: $processId, field: "processId" }) {
55206
+ page {
55207
+ processId
55208
+ lastStatus
55209
+ createdBy
55210
+ startedAt
55211
+ lastModifiedAt
55212
+ lastStep
55213
+ workflowName
55214
+ isTask
55215
+ form
55216
+ steps {
55217
+ name
55218
+ status
55219
+ stepId
55220
+ executed
55221
+ stateDelta
55222
+ }
55223
+ customer {
55224
+ fullname
55225
+ }
55226
+ subscriptions {
55227
+ page {
55228
+ product {
55229
+ name
55230
+ }
55231
+ description
55232
+ subscriptionId
55233
+ }
55234
+ }
55235
+ }
55236
+ }
55237
+ }`;
55238
+ var processDetailApi = orchestratorApi.injectEndpoints({
55239
+ endpoints: (builder) => ({
55240
+ getProcessDetail: builder.query({
55241
+ query: (variables) => ({
55242
+ document: processDetailQuery,
55243
+ variables
55244
+ }),
55245
+ transformResponse: (response) => {
55246
+ const processes = response.processes.page || [];
55247
+ return {
55248
+ processes
55249
+ };
55250
+ }
55251
+ })
55252
+ })
55253
+ });
55254
+ var { useGetProcessDetailQuery } = processDetailApi;
55255
+
55237
55256
  // src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx
55238
55257
  import React43 from "react";
55239
55258
  import { useTranslations as useTranslations45 } from "next-intl";
@@ -56431,13 +56450,9 @@ var WfoProcessDetailPage = ({
56431
56450
  const stepListRef = useRef7(null);
56432
56451
  const [fetchInterval, setFetchInterval] = useState36();
56433
56452
  const [process2, setProcess] = useState36();
56434
- const { data, isLoading, isError: isError3 } = useQueryWithGraphql(
56435
- GET_PROCESS_DETAIL_GRAPHQL_QUERY,
56436
- {
56437
- processId
56438
- },
56439
- "processDetail",
56440
- { refetchInterval: fetchInterval, refetchOnWindowFocus: false }
56453
+ const { data, isLoading, isError: isError3 } = useGetProcessDetailQuery(
56454
+ { processId },
56455
+ { pollingInterval: fetchInterval }
56441
56456
  );
56442
56457
  if (isError3) {
56443
56458
  if (fetchInterval) {
@@ -56445,7 +56460,7 @@ var WfoProcessDetailPage = ({
56445
56460
  }
56446
56461
  }
56447
56462
  useEffect22(() => {
56448
- const process3 = data == null ? void 0 : data.processes.page[0];
56463
+ const process3 = data == null ? void 0 : data.processes[0];
56449
56464
  const lastStatus = process3 == null ? void 0 : process3.lastStatus.toLocaleLowerCase();
56450
56465
  const isInProgress = !(lastStatus && ProcessDoneStatuses.includes(lastStatus));
56451
56466
  setFetchInterval(
@@ -56453,7 +56468,7 @@ var WfoProcessDetailPage = ({
56453
56468
  );
56454
56469
  }, [data, processDetailRefetchInterval]);
56455
56470
  useEffect22(() => {
56456
- const fetchedProcessDetails = data == null ? void 0 : data.processes.page[0];
56471
+ const fetchedProcessDetails = data == null ? void 0 : data.processes[0];
56457
56472
  if (!process2) {
56458
56473
  setProcess(fetchedProcessDetails);
56459
56474
  return;
@@ -59281,7 +59296,6 @@ export {
59281
59296
  Environment,
59282
59297
  ErrorField,
59283
59298
  ErrorsField,
59284
- GET_PROCESS_DETAIL_GRAPHQL_QUERY,
59285
59299
  GET_PROCESS_LIST_GRAPHQL_QUERY,
59286
59300
  GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY,
59287
59301
  GET_PROCESS_STEPS_GRAPHQL_QUERY,
@@ -59522,6 +59536,7 @@ export {
59522
59536
  localMomentToUtcTimestamp,
59523
59537
  mapColumnSortToEuiDataGridSorting,
59524
59538
  mapSortableAndFilterableValuesToTableColumnConfig,
59539
+ onlyUnique,
59525
59540
  orchestratorApi,
59526
59541
  parseDate,
59527
59542
  parseDateOrTimeRelativeToToday,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -3,7 +3,6 @@ export * from './productBlocksQuery';
3
3
  export * from './productsQuery';
4
4
  export * from './resourceTypesQuery';
5
5
  export * from './subscriptionDetailQuery';
6
- export * from './processDetailQuery';
7
6
  export * from './subscriptionsDropdownOptionsQuery';
8
7
  export * from './processStepsQuery';
9
8
  export * from './processListQuery';
@@ -5,6 +5,21 @@ import { useTranslations } from 'next-intl';
5
5
  import { EuiBadgeGroup } from '@elastic/eui';
6
6
  import type { Pagination } from '@elastic/eui/src/components';
7
7
 
8
+ import {
9
+ useDataDisplayParams,
10
+ useQueryWithGraphql,
11
+ useQueryWithGraphqlLazy,
12
+ useShowToastMessage,
13
+ useStoredTableConfig,
14
+ } from '@/hooks';
15
+ import type { GraphqlQueryVariables, WorkflowDefinition } from '@/types';
16
+ import { BadgeType, SortOrder } from '@/types';
17
+ import {
18
+ getQueryVariablesForExport,
19
+ onlyUnique,
20
+ parseDateToLocaleDateTimeString,
21
+ parseIsoString,
22
+ } from '@/utils';
8
23
  import {
9
24
  csvDownloadHandler,
10
25
  getCsvFileNameWithDate,
@@ -28,20 +43,6 @@ import { WfoWorkflowTargetBadge } from '../../components/WfoBadges/WfoWorkflowTa
28
43
  import { WfoDateTime } from '../../components/WfoDateTime/WfoDateTime';
29
44
  import { mapSortableAndFilterableValuesToTableColumnConfig } from '../../components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig';
30
45
  import { GET_WORKFLOWS_GRAPHQL_QUERY } from '../../graphqlQueries/workflows/workflowsQuery';
31
- import {
32
- useDataDisplayParams,
33
- useQueryWithGraphql,
34
- useQueryWithGraphqlLazy,
35
- useShowToastMessage,
36
- useStoredTableConfig,
37
- } from '../../hooks';
38
- import type { GraphqlQueryVariables, WorkflowDefinition } from '../../types';
39
- import { BadgeType, SortOrder } from '../../types';
40
- import {
41
- getQueryVariablesForExport,
42
- parseDateToLocaleDateTimeString,
43
- parseIsoString,
44
- } from '../../utils';
45
46
  import { WfoMetadataPageLayout } from './WfoMetadataPageLayout';
46
47
  import {
47
48
  graphQlWorkflowListMapper,
@@ -115,26 +116,30 @@ export const WfoWorkflowsPage = () => {
115
116
  name: t('productTags'),
116
117
  render: (productTags) => (
117
118
  <>
118
- {productTags?.map((productTag, index) => (
119
- <WfoProductBlockBadge
120
- key={index}
121
- badgeType={BadgeType.PRODUCT_TAG}
122
- >
123
- {productTag}
124
- </WfoProductBlockBadge>
125
- ))}
119
+ {productTags
120
+ ?.filter(onlyUnique)
121
+ .map((productTag, index) => (
122
+ <WfoProductBlockBadge
123
+ key={index}
124
+ badgeType={BadgeType.PRODUCT_TAG}
125
+ >
126
+ {productTag}
127
+ </WfoProductBlockBadge>
128
+ ))}
126
129
  </>
127
130
  ),
128
131
  renderDetails: (productTags) => (
129
132
  <EuiBadgeGroup gutterSize="s">
130
- {productTags?.map((productTag, index) => (
131
- <WfoProductBlockBadge
132
- key={index}
133
- badgeType={BadgeType.PRODUCT_TAG}
134
- >
135
- {productTag}
136
- </WfoProductBlockBadge>
137
- ))}
133
+ {productTags
134
+ ?.filter(onlyUnique)
135
+ .map((productTag, index) => (
136
+ <WfoProductBlockBadge
137
+ key={index}
138
+ badgeType={BadgeType.PRODUCT_TAG}
139
+ >
140
+ {productTag}
141
+ </WfoProductBlockBadge>
142
+ ))}
138
143
  </EuiBadgeGroup>
139
144
  ),
140
145
  },
@@ -1,13 +1,12 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
2
 
3
3
  import { TimelineItem, WfoError, WfoLoading } from '@/components';
4
+ import { useGetProcessDetailQuery } from '@/rtk/endpoints/processDetail';
4
5
 
5
6
  import {
6
7
  WfoStepListRef,
7
8
  WfoWorkflowStepList,
8
9
  } from '../../components/WfoWorkflowSteps';
9
- import { GET_PROCESS_DETAIL_GRAPHQL_QUERY } from '../../graphqlQueries';
10
- import { useQueryWithGraphql } from '../../hooks';
11
10
  import {
12
11
  ProcessDetail,
13
12
  ProcessDoneStatuses,
@@ -39,13 +38,10 @@ export const WfoProcessDetailPage = ({
39
38
  const stepListRef = useRef<WfoStepListRef>(null);
40
39
  const [fetchInterval, setFetchInterval] = useState<number | undefined>();
41
40
  const [process, setProcess] = useState<ProcessDetail | undefined>();
42
- const { data, isLoading, isError } = useQueryWithGraphql(
43
- GET_PROCESS_DETAIL_GRAPHQL_QUERY,
44
- {
45
- processId,
46
- },
47
- 'processDetail',
48
- { refetchInterval: fetchInterval, refetchOnWindowFocus: false },
41
+
42
+ const { data, isLoading, isError } = useGetProcessDetailQuery(
43
+ { processId },
44
+ { pollingInterval: fetchInterval },
49
45
  );
50
46
 
51
47
  if (isError) {
@@ -55,7 +51,7 @@ export const WfoProcessDetailPage = ({
55
51
  }
56
52
 
57
53
  useEffect(() => {
58
- const process = data?.processes.page[0];
54
+ const process = data?.processes[0];
59
55
  // We need to cast here because the backend might return the string in upperCase and
60
56
  // toLowerCase() will converts the value type to string
61
57
  const lastStatus =
@@ -71,7 +67,7 @@ export const WfoProcessDetailPage = ({
71
67
  }, [data, processDetailRefetchInterval]);
72
68
 
73
69
  useEffect(() => {
74
- const fetchedProcessDetails = data?.processes.page[0];
70
+ const fetchedProcessDetails = data?.processes[0];
75
71
 
76
72
  if (!process) {
77
73
  setProcess(fetchedProcessDetails);
@@ -0,0 +1,66 @@
1
+ import { orchestratorApi } from '@/rtk';
2
+ import { ProcessDetail, ProcessesDetailResult } from '@/types';
3
+
4
+ export const processDetailQuery = `query ProcessDetail($processId: String!) {
5
+ processes(filterBy: { value: $processId, field: "processId" }) {
6
+ page {
7
+ processId
8
+ lastStatus
9
+ createdBy
10
+ startedAt
11
+ lastModifiedAt
12
+ lastStep
13
+ workflowName
14
+ isTask
15
+ form
16
+ steps {
17
+ name
18
+ status
19
+ stepId
20
+ executed
21
+ stateDelta
22
+ }
23
+ customer {
24
+ fullname
25
+ }
26
+ subscriptions {
27
+ page {
28
+ product {
29
+ name
30
+ }
31
+ description
32
+ subscriptionId
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }`;
38
+
39
+ export type ProcessDetailResponse = {
40
+ processes: ProcessDetail[];
41
+ };
42
+
43
+ const processDetailApi = orchestratorApi.injectEndpoints({
44
+ endpoints: (builder) => ({
45
+ getProcessDetail: builder.query<
46
+ ProcessDetailResponse,
47
+ { processId: string }
48
+ >({
49
+ query: (variables) => ({
50
+ document: processDetailQuery,
51
+ variables,
52
+ }),
53
+ transformResponse: (
54
+ response: ProcessesDetailResult,
55
+ ): ProcessDetailResponse => {
56
+ const processes = response.processes.page || [];
57
+
58
+ return {
59
+ processes,
60
+ };
61
+ },
62
+ }),
63
+ }),
64
+ });
65
+
66
+ export const { useGetProcessDetailQuery } = processDetailApi;
@@ -75,7 +75,7 @@ const processApi = orchestratorApi.injectEndpoints({
75
75
  transformResponse: (
76
76
  response: ProcessListResult,
77
77
  ): ProcessListResponse => {
78
- const processes = response?.processes?.page || [];
78
+ const processes = response.processes.page || [];
79
79
 
80
80
  return {
81
81
  processes,
@@ -6,3 +6,4 @@ export * from './uuid';
6
6
  export * from './strings';
7
7
  export * from './getProductNamesFromProcess';
8
8
  export * from './getQueryVariablesForExport';
9
+ export * from './onlyUnique';
@@ -0,0 +1,19 @@
1
+ import { onlyUnique } from './onlyUnique';
2
+
3
+ describe('onlyUnique()', () => {
4
+ it('returns array as array with only unique values', () => {
5
+ const test1 = ['SP', 'SP', 'FW', 'SP', 'FW', 'LP'];
6
+ const result = test1?.filter(onlyUnique);
7
+ expect(result).toEqual(['SP', 'FW', 'LP']);
8
+ });
9
+ it('returns array as array with only single value', () => {
10
+ const test2 = ['SP', 'SP', 'SP'];
11
+ const result = test2?.filter(onlyUnique);
12
+ expect(result).toEqual(['SP']);
13
+ });
14
+ it('returns array as empty array', () => {
15
+ const test3 = [''];
16
+ const result = test3?.filter(onlyUnique);
17
+ expect(result).toEqual(['']);
18
+ });
19
+ });
@@ -0,0 +1,3 @@
1
+ export const onlyUnique = (value: string, index: number, array: string[]) => {
2
+ return array.indexOf(value) === index;
3
+ };
@@ -1,46 +0,0 @@
1
- import { parse } from 'graphql';
2
- import { gql } from 'graphql-request';
3
-
4
- import { TypedDocumentNode } from '@graphql-typed-document-node/core';
5
-
6
- import { ProcessesDetailResult } from '../types';
7
-
8
- export const GET_PROCESS_DETAIL_GRAPHQL_QUERY: TypedDocumentNode<
9
- ProcessesDetailResult,
10
- { processId: string }
11
- > = parse(gql`
12
- query ProcessDetail($processId: String!) {
13
- processes(filterBy: { value: $processId, field: "processId" }) {
14
- page {
15
- processId
16
- lastStatus
17
- createdBy
18
- startedAt
19
- lastModifiedAt
20
- lastStep
21
- workflowName
22
- isTask
23
- form
24
- steps {
25
- name
26
- status
27
- stepId
28
- executed
29
- stateDelta
30
- }
31
- customer {
32
- fullname
33
- }
34
- subscriptions {
35
- page {
36
- product {
37
- name
38
- }
39
- description
40
- subscriptionId
41
- }
42
- }
43
- }
44
- }
45
- }
46
- `);