@orchestrator-ui/orchestrator-ui-components 1.30.3 → 1.32.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@1.30.3 build
2
+ > @orchestrator-ui/orchestrator-ui-components@1.32.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
@@ -8,7 +8,7 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  DTS Build start
11
- ESM dist/index.js 1.86 MB
12
- ESM ⚡️ Build success in 743ms
13
- DTS ⚡️ Build success in 13941ms
14
- DTS dist/index.d.ts 174.58 KB
11
+ ESM dist/index.js 1.87 MB
12
+ ESM ⚡️ Build success in 614ms
13
+ DTS ⚡️ Build success in 13879ms
14
+ DTS dist/index.d.ts 174.61 KB
@@ -1,4 +1,4 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.3 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@1.32.0 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
@@ -1,26 +1,26 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.3 test
2
+ > @orchestrator-ui/orchestrator-ui-components@1.32.0 test
3
3
  > jest
4
4
 
5
5
  PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
+ PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
6
7
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
7
- PASS Wfo-UI Tests src/utils/date.spec.ts
8
8
  PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
9
- PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
10
- PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
11
- PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
9
+ PASS Wfo-UI Tests src/utils/date.spec.ts
12
10
  PASS Wfo-UI Tests src/utils/string.spec.ts
13
- PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
11
+ PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
12
+ PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
14
13
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
15
- PASS Wfo-UI Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
14
+ PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
16
15
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
17
- PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
16
+ PASS Wfo-UI Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
18
17
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
18
+ PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
19
19
  PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
20
- PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
21
20
  PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
22
- PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
21
+ PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
23
22
  PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
23
+ PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
24
24
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
25
25
  PASS Wfo-UI Tests src/utils/sortObjectKeys.spec.ts
26
26
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
@@ -30,11 +30,11 @@ PASS Wfo-UI Tests src/utils/uuid.spec.ts
30
30
  PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
31
31
  PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
32
32
  PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
33
- PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
34
33
  PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
34
+ PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
35
35
 
36
36
  Test Suites: 30 passed, 30 total
37
- Tests: 169 passed, 169 total
37
+ Tests: 186 passed, 186 total
38
38
  Snapshots: 0 total
39
- Time: 3.844 s
39
+ Time: 4.018 s
40
40
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 1.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 06f97cc: Updates graphql seperator character
8
+ - cf75ff3: Keep uppercase letters if original text in breadcrumb is only uppercase
9
+
10
+ ### Patch Changes
11
+
12
+ - 845dce4: Fix form label not visible in SummaryField and TimestampField
13
+ - 95862a2: Orders productsblocks in service configuration page better
14
+
15
+ ## 1.31.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 8e2c77c: Updates graphql error code to match backend
20
+
3
21
  ## 1.30.3
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -286,7 +286,7 @@ declare const useLazyGetResourceTypesQuery: _reduxjs_toolkit_dist_query_react_bu
286
286
  stack: string | undefined;
287
287
  }, {}>>, CacheTagType, ResourceTypesResponse, "orchestratorApi">>;
288
288
 
289
- declare const workflowsQuery = "\nquery MetadataWorkflows(\n $first: Int!\n $after: Int!\n $sortBy: [GraphqlSort!]\n $query: String\n) {\n workflows(\n first: $first\n after: $after\n sortBy: $sortBy\n query: $query\n filterBy: { field: \"target\", value: \"CREATE-MODIFY-TERMINATE\" }\n ) {\n page {\n name\n description\n target\n products {\n tag\n }\n createdAt\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n totalItems\n sortFields\n filterFields\n }\n }\n}\n";
289
+ declare const workflowsQuery = "\nquery MetadataWorkflows(\n $first: Int!\n $after: Int!\n $sortBy: [GraphqlSort!]\n $query: String\n) {\n workflows(\n first: $first\n after: $after\n sortBy: $sortBy\n query: $query\n filterBy: { field: \"target\", value: \"CREATE|MODIFY|TERMINATE\" }\n ) {\n page {\n name\n description\n target\n products {\n tag\n }\n createdAt\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n totalItems\n sortFields\n filterFields\n }\n }\n}\n";
290
290
  declare type WorkflowsResponse = {
291
291
  workflows: WorkflowDefinition[];
292
292
  } & BaseGraphQlResult;
@@ -2296,7 +2296,6 @@ declare type TreeContextType = {
2296
2296
  selectedIds: number[];
2297
2297
  expandedIds: number[];
2298
2298
  toggleSelectedId: (id: number) => void;
2299
- toggleExpandedId: (id: number) => void;
2300
2299
  expandNode: (id: number) => void;
2301
2300
  collapseNode: (id: number) => void;
2302
2301
  expandAll: () => void;
@@ -4120,10 +4119,11 @@ declare const removeSuffix: (value: string, splitChar?: string) => string;
4120
4119
  declare const camelToHuman: (value: string) => string;
4121
4120
  declare const snakeToHuman: (value: string) => string;
4122
4121
  declare const snakeToKebab: (value: string) => string;
4122
+ declare const isAllUpperCase: (str: string) => boolean;
4123
4123
 
4124
4124
  declare const toOptionalArrayEntry: <T>(data: T, condition: boolean) => [] | [T];
4125
4125
  declare const optionalArrayMapper: <T, U>(data: T[] | undefined, mapper: (input: T) => U) => U[];
4126
4126
 
4127
4127
  declare const filterDataByCriteria: <Type>(data: Type[], filterCriteria: GraphqlFilter<Type>[]) => Type[];
4128
4128
 
4129
- export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, type AppDispatch, type AutoFieldsProps, BadgeType, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, CACHETAG_TYPE_LIST, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, type CacheTag, CacheTagType, ColorModes, type ColumnConfig, type ConfirmDialogHandler, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonAutocomplete, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type CustomApiConfig, type Customer, type CustomerDescriptions, CustomerField, type CustomerFieldProps, type CustomerWithSubscriptionCount, type CustomersResult, type CustomersWithSubscriptionCountResult, 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 FetchFilter, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, type FormValidationError, type GraphQLPageInfo, type GraphQLSort, type GraphQlResultPage, type GraphQlSinglePage, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, HttpStatus, IPAM_ENDPOINT, IPAM_FREE_SUBNETS_ENDPOINT, IPAM_IP_BLOCKS_ENDPOINT, IPAM_PREFIX_FILTERS_ENDPOINT, type IPvAnyNetworkFieldProps, type ImsNode, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPort, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InUseByRelationDetail, type InUseByRelationsDetailResponse, type InUseByRelationsDetailResult, type InitialOrchestratorStoreConfig, type InputForm, type IpBlock, IpNetworkField, type IpPrefix, 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_TASKS_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, type MetaDataTab, NUMBER_OF_ITEMS_REPRESENTING_ALL_ITEMS, NestField, type NestFieldProps, type NodeSubscriptionOption, type NodeSubscriptionOptionsResult, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorComponentOverride, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_TASKS, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, PROCESSES_ENDPOINT, PROCESSES_RESUME_ALL_ENDPOINT, PROCESS_ABORT_ENDPOINT, PROCESS_RESUME_ENDPOINT, PROCESS_STATUS_COUNTS_ENDPOINT, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, PortMode, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListExportItem, type ProcessListItem, type ProcessListResponse, type ProcessListResult, type ProcessListSummaryResponse, ProcessStatus, type ProcessStepsResult, type ProcessSummary, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductBlocksResponse, type ProductDefinition, type ProductDefinitionsResult, ProductLifecycleStatus, ProductTag, type ProductsResponse, type ProductsSummary, type ProductsSummaryResponse, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, RelatedSubscriptionsQuery, type RelatedSubscriptionsResponse, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type ResourceTypesResponse, type RootState, SETTINGS_CACHE_ENDPOINT, SETTINGS_CACHE_NAMES_ENDPOINT, SETTINGS_ENDPOINT, SETTINGS_SEARCH_INDEX_RESET_ENDPOINT, SETTINGS_STATUS_ENDPOINT, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, SUBSCRIPTION_ACTIONS_ENDPOINT, type SelectFieldProps, type ServicePort, type SortOption, SortOrder, type StartComboBoxOption, type StartOptionsResponse, type StartOptionsResult, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionActions, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResponse, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResponse, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, type SubscriptionListItem, type SubscriptionListResponse, type SubscriptionListSummaryResponse, SubscriptionStatus, type SubscriptionSummary, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, type SummaryCardButtonConfig, type SummaryCardListItem, SummaryCardStatus, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, type TaskDefinition, type TaskDefinitionsResult, type TaskListItem, type TasksResponse, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, type ValueOverrideConfiguration, type ValueOverrideFunction, VlanField, type VlanFieldProps, type VlanRange, WFO_STATUS_COLOR_FIELD, type WfValueOnlyTableProps, WfoActiveWorkflowsSummaryCard, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBoltFill, WfoBoltSlashFill, 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, WfoExpandableField, type WfoExpandableFieldProps, WfoExternalLink, WfoEyeFill, WfoFailedTasksBadge, WfoFailedTasksSummaryCard, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInSyncField, WfoInformationModal, type WfoInformationModalProps, WfoInlineJson, type WfoInlineJsonProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLatestActiveSubscriptionsSummaryCard, WfoLatestOutOfSyncSubscriptionSummaryCard, WfoLoading, WfoLogoutIcon, WfoMenuItemLink, WfoMetadataPageLayout, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoMyWorkflowsSummaryCard, type WfoMyWorkflowsSummaryCardProps, WfoNoResults, 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, WfoProductBlockKeyValueRow, type WfoProductBlockKeyValueRowProps, WfoProductBlocksPage, WfoProductInformationWithLink, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoProductsSummaryCard, WfoRefresh, WfoRelatedSubscriptions, WfoResetTextSearchIndexButton, 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, WfoStartWorkflowButtonComboBox, 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, type WfoSubscriptionDetailGeneralConfiguration, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionListTab, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionSyncStatusBadge, type WfoSubscriptionSyncStatusBadgeProps, WfoSubscriptionsList, WfoSubscriptionsListPage, type WfoSubscriptionsListProps, WfoSummaryCard, WfoSummaryCardHeader, type WfoSummaryCardHeaderProps, WfoSummaryCardList, WfoSummaryCardListItem, type WfoSummaryCardListItemProps, type WfoSummaryCardListProps, type WfoSummaryCardProps, WfoSummaryCards, type WfoSummaryCardsProps, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTasksPage, WfoTextAnchor, type WfoTheme, WfoTimeline, type WfoTimelineProps, WfoTitleWithWebsocketBadge, WfoToastsList, WfoTrash, type WfoTreeNodeMap, WfoUserInputForm, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoValueOnlyTable, type WfoValueOnlyTableDataType, WfoViewList, WfoWarningTriangle, WfoWebsocketStatusBadge, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsListTabType, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, type WorkflowsResponse, addToastMessage, calculateTimeDifference, camelToHuman, catchErrorResponse, clearTableConfigFromLocalStorage, csvDownloadHandler, defaultOrchestratorTheme, defaultTasksListTabs, defaultWorkflowsListTabs, determineNewSortOrder, determinePageIndex, emptyOrchestratorConfig, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getConcatenatedPagedResult, getConcatenatedResult, getCsvFileNameWithDate, getCurrentBrowserLocale, getCustomApiSlice, getDataSortHandler, getDate, getEnvironmentVariables, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getFormFieldsBaseStyle, getInitialColumnOrder, getLastUncompletedProcess, getLatestTaskDate, getNumberOfColumns, getNumberValueFromEnvironmentVariable, getOrchestratorComponentOverrideSlice, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProductBlockTitle, getProductNamesFromProcess, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getStyles, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, getWorkflowsListTabTypeFromString, graphQlWorkflowListMapper, handlePromiseErrorWithCallback, imsPortIdFieldStyling, initiateCsvFileDownload, ipPrefixTableFieldStyling, ipamStates, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapGraphQlSubscriptionsResultToPageInfo, mapGraphQlSubscriptionsResultToSubscriptionListItems, mapProcessSummaryToSummaryCardListItem, mapSortableAndFilterableValuesToTableColumnConfig, mapSubscriptionSummaryToSummaryCardListItem, mapWorkflowDefinitionToWorkflowListItem, menuItemIsAllowed, metaDataTabs, onlyUnique, optionalArrayMapper, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, prepareHeaders, processListQuery, processListSummaryQuery, processStepsQuery, productBlocksQuery, products, productsSummary, removeSuffix, removeToastMessage, resourceTypesQuery, selectOrchestratorConfig, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, splitPrefixStyling, stop, subscriptionDetailQuery, subscriptionInUseByRelationQuery, subscriptionListQuery, subscriptionListSummaryQuery, subscriptionListTabs, subscriptionsDropdownOptionsQuery, tasksQuery, toOptionalArrayEntry, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useGetCacheNamesQuery, useGetCustomerQuery, useGetCustomersQuery, useGetCustomersWithSubscriptionCountQuery, useGetEngineStatusQuery, useGetInUseByRelationDetailsQuery, useGetOrchestratorConfig, useGetProcessListQuery, useGetProcessListSummaryQuery, useGetProductBlocksQuery, useGetProductsQuery, useGetProductsSummaryQuery, useGetRelatedSubscriptionsQuery, useGetResourceTypesQuery, useGetSubscriptionDetailQuery, useGetSubscriptionListQuery, useGetSubscriptionSummaryListQuery, useGetSubscriptionsDropdownOptionsQuery, useGetTaskOptionsQuery, useGetTasksQuery, useGetTimeLineItemsQuery, useGetTranslationMessages, useGetWorkflowOptionsQuery, useGetWorkflowsQuery, useLazyGetProcessListQuery, useLazyGetProductBlocksQuery, useLazyGetProductsQuery, useLazyGetResourceTypesQuery, useLazyGetSubscriptionListQuery, useLazyGetTasksQuery, useLazyGetWorkflowsQuery, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useResetTextSearchIndexMutation, useSetEngineStatusMutation, useSetSubscriptionInSyncMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionDetailValueOverride, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment, workflowFieldMapper, workflowsQuery };
4129
+ export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, type AppDispatch, type AutoFieldsProps, BadgeType, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, CACHETAG_TYPE_LIST, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, type CacheTag, CacheTagType, ColorModes, type ColumnConfig, type ConfirmDialogHandler, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonAutocomplete, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type CustomApiConfig, type Customer, type CustomerDescriptions, CustomerField, type CustomerFieldProps, type CustomerWithSubscriptionCount, type CustomersResult, type CustomersWithSubscriptionCountResult, 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 FetchFilter, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, type FormValidationError, type GraphQLPageInfo, type GraphQLSort, type GraphQlResultPage, type GraphQlSinglePage, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, HttpStatus, IPAM_ENDPOINT, IPAM_FREE_SUBNETS_ENDPOINT, IPAM_IP_BLOCKS_ENDPOINT, IPAM_PREFIX_FILTERS_ENDPOINT, type IPvAnyNetworkFieldProps, type ImsNode, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPort, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InUseByRelationDetail, type InUseByRelationsDetailResponse, type InUseByRelationsDetailResult, type InitialOrchestratorStoreConfig, type InputForm, type IpBlock, IpNetworkField, type IpPrefix, 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_TASKS_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, type MetaDataTab, NUMBER_OF_ITEMS_REPRESENTING_ALL_ITEMS, NestField, type NestFieldProps, type NodeSubscriptionOption, type NodeSubscriptionOptionsResult, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorComponentOverride, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_TASKS, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, PROCESSES_ENDPOINT, PROCESSES_RESUME_ALL_ENDPOINT, PROCESS_ABORT_ENDPOINT, PROCESS_RESUME_ENDPOINT, PROCESS_STATUS_COUNTS_ENDPOINT, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, PortMode, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListExportItem, type ProcessListItem, type ProcessListResponse, type ProcessListResult, type ProcessListSummaryResponse, ProcessStatus, type ProcessStepsResult, type ProcessSummary, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductBlocksResponse, type ProductDefinition, type ProductDefinitionsResult, ProductLifecycleStatus, ProductTag, type ProductsResponse, type ProductsSummary, type ProductsSummaryResponse, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, RelatedSubscriptionsQuery, type RelatedSubscriptionsResponse, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type ResourceTypesResponse, type RootState, SETTINGS_CACHE_ENDPOINT, SETTINGS_CACHE_NAMES_ENDPOINT, SETTINGS_ENDPOINT, SETTINGS_SEARCH_INDEX_RESET_ENDPOINT, SETTINGS_STATUS_ENDPOINT, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, SUBSCRIPTION_ACTIONS_ENDPOINT, type SelectFieldProps, type ServicePort, type SortOption, SortOrder, type StartComboBoxOption, type StartOptionsResponse, type StartOptionsResult, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionActions, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResponse, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResponse, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, type SubscriptionListItem, type SubscriptionListResponse, type SubscriptionListSummaryResponse, SubscriptionStatus, type SubscriptionSummary, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, type SummaryCardButtonConfig, type SummaryCardListItem, SummaryCardStatus, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, type TaskDefinition, type TaskDefinitionsResult, type TaskListItem, type TasksResponse, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, type ValueOverrideConfiguration, type ValueOverrideFunction, VlanField, type VlanFieldProps, type VlanRange, WFO_STATUS_COLOR_FIELD, type WfValueOnlyTableProps, WfoActiveWorkflowsSummaryCard, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBoltFill, WfoBoltSlashFill, 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, WfoExpandableField, type WfoExpandableFieldProps, WfoExternalLink, WfoEyeFill, WfoFailedTasksBadge, WfoFailedTasksSummaryCard, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInSyncField, WfoInformationModal, type WfoInformationModalProps, WfoInlineJson, type WfoInlineJsonProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLatestActiveSubscriptionsSummaryCard, WfoLatestOutOfSyncSubscriptionSummaryCard, WfoLoading, WfoLogoutIcon, WfoMenuItemLink, WfoMetadataPageLayout, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoMyWorkflowsSummaryCard, type WfoMyWorkflowsSummaryCardProps, WfoNoResults, 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, WfoProductBlockKeyValueRow, type WfoProductBlockKeyValueRowProps, WfoProductBlocksPage, WfoProductInformationWithLink, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoProductsSummaryCard, WfoRefresh, WfoRelatedSubscriptions, WfoResetTextSearchIndexButton, 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, WfoStartWorkflowButtonComboBox, 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, type WfoSubscriptionDetailGeneralConfiguration, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionListTab, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionSyncStatusBadge, type WfoSubscriptionSyncStatusBadgeProps, WfoSubscriptionsList, WfoSubscriptionsListPage, type WfoSubscriptionsListProps, WfoSummaryCard, WfoSummaryCardHeader, type WfoSummaryCardHeaderProps, WfoSummaryCardList, WfoSummaryCardListItem, type WfoSummaryCardListItemProps, type WfoSummaryCardListProps, type WfoSummaryCardProps, WfoSummaryCards, type WfoSummaryCardsProps, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTasksPage, WfoTextAnchor, type WfoTheme, WfoTimeline, type WfoTimelineProps, WfoTitleWithWebsocketBadge, WfoToastsList, WfoTrash, type WfoTreeNodeMap, WfoUserInputForm, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoValueOnlyTable, type WfoValueOnlyTableDataType, WfoViewList, WfoWarningTriangle, WfoWebsocketStatusBadge, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsListTabType, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, type WorkflowsResponse, addToastMessage, calculateTimeDifference, camelToHuman, catchErrorResponse, clearTableConfigFromLocalStorage, csvDownloadHandler, defaultOrchestratorTheme, defaultTasksListTabs, defaultWorkflowsListTabs, determineNewSortOrder, determinePageIndex, emptyOrchestratorConfig, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getConcatenatedPagedResult, getConcatenatedResult, getCsvFileNameWithDate, getCurrentBrowserLocale, getCustomApiSlice, getDataSortHandler, getDate, getEnvironmentVariables, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getFormFieldsBaseStyle, getInitialColumnOrder, getLastUncompletedProcess, getLatestTaskDate, getNumberOfColumns, getNumberValueFromEnvironmentVariable, getOrchestratorComponentOverrideSlice, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProductBlockTitle, getProductNamesFromProcess, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getStyles, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, getWorkflowsListTabTypeFromString, graphQlWorkflowListMapper, handlePromiseErrorWithCallback, imsPortIdFieldStyling, initiateCsvFileDownload, ipPrefixTableFieldStyling, ipamStates, isAllUpperCase, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapGraphQlSubscriptionsResultToPageInfo, mapGraphQlSubscriptionsResultToSubscriptionListItems, mapProcessSummaryToSummaryCardListItem, mapSortableAndFilterableValuesToTableColumnConfig, mapSubscriptionSummaryToSummaryCardListItem, mapWorkflowDefinitionToWorkflowListItem, menuItemIsAllowed, metaDataTabs, onlyUnique, optionalArrayMapper, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, prepareHeaders, processListQuery, processListSummaryQuery, processStepsQuery, productBlocksQuery, products, productsSummary, removeSuffix, removeToastMessage, resourceTypesQuery, selectOrchestratorConfig, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, splitPrefixStyling, stop, subscriptionDetailQuery, subscriptionInUseByRelationQuery, subscriptionListQuery, subscriptionListSummaryQuery, subscriptionListTabs, subscriptionsDropdownOptionsQuery, tasksQuery, toOptionalArrayEntry, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useGetCacheNamesQuery, useGetCustomerQuery, useGetCustomersQuery, useGetCustomersWithSubscriptionCountQuery, useGetEngineStatusQuery, useGetInUseByRelationDetailsQuery, useGetOrchestratorConfig, useGetProcessListQuery, useGetProcessListSummaryQuery, useGetProductBlocksQuery, useGetProductsQuery, useGetProductsSummaryQuery, useGetRelatedSubscriptionsQuery, useGetResourceTypesQuery, useGetSubscriptionDetailQuery, useGetSubscriptionListQuery, useGetSubscriptionSummaryListQuery, useGetSubscriptionsDropdownOptionsQuery, useGetTaskOptionsQuery, useGetTasksQuery, useGetTimeLineItemsQuery, useGetTranslationMessages, useGetWorkflowOptionsQuery, useGetWorkflowsQuery, useLazyGetProcessListQuery, useLazyGetProductBlocksQuery, useLazyGetProductsQuery, useLazyGetResourceTypesQuery, useLazyGetSubscriptionListQuery, useLazyGetTasksQuery, useLazyGetWorkflowsQuery, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useResetTextSearchIndexMutation, useSetEngineStatusMutation, useSetSubscriptionInSyncMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionDetailValueOverride, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment, workflowFieldMapper, workflowsQuery };
package/dist/index.js CHANGED
@@ -32690,7 +32690,7 @@ var orchestratorApi = createApi2({
32690
32690
  if (((_a2 = response == null ? void 0 : response.errors) == null ? void 0 : _a2.length) && authActive) {
32691
32691
  response.errors.map((error2) => {
32692
32692
  var _a3;
32693
- if (((_a3 = error2.extensions) == null ? void 0 : _a3.error_type) === "not_authorized") {
32693
+ if (((_a3 = error2.extensions) == null ? void 0 : _a3.error_type) === "not_authenticated") {
32694
32694
  signOut();
32695
32695
  }
32696
32696
  });
@@ -33096,26 +33096,15 @@ var TreeProvider = ({ children }) => {
33096
33096
  const toggleSelectedId = (id) => {
33097
33097
  if (selectedIds.includes(id)) {
33098
33098
  setSelectedIds(
33099
- (prevSelectedIds) => prevSelectedIds.filter((selectedId) => selectedId !== id).sort((a, b) => a - b)
33099
+ (prevSelectedIds) => prevSelectedIds.filter((selectedId) => selectedId !== id)
33100
33100
  );
33101
33101
  } else {
33102
- setSelectedIds(
33103
- (prevSelectedIds) => [...prevSelectedIds, id].sort((a, b) => a - b)
33104
- );
33102
+ setSelectedIds((prevSelectedIds) => [...prevSelectedIds, id]);
33105
33103
  }
33106
33104
  };
33107
33105
  const selectAll = () => {
33108
33106
  setSelectedIds(Array.from(Array(depths.length).keys()));
33109
33107
  };
33110
- const toggleExpandedId = (id) => {
33111
- if (expandedIds.includes(id)) {
33112
- setExpandedIds(
33113
- (prevExpandedIds) => prevExpandedIds.filter((expandedId) => expandedId !== id)
33114
- );
33115
- } else {
33116
- setExpandedIds((prevExpandedIds) => [...prevExpandedIds, id]);
33117
- }
33118
- };
33119
33108
  const expandAll = () => {
33120
33109
  setExpandedIds(Array.from(Array(depths.length).keys()));
33121
33110
  };
@@ -33158,7 +33147,6 @@ var TreeProvider = ({ children }) => {
33158
33147
  selectedIds,
33159
33148
  expandedIds,
33160
33149
  toggleSelectedId,
33161
- toggleExpandedId,
33162
33150
  expandNode,
33163
33151
  collapseNode,
33164
33152
  expandAll,
@@ -33329,7 +33317,7 @@ query MetadataWorkflows(
33329
33317
  after: $after
33330
33318
  sortBy: $sortBy
33331
33319
  query: $query
33332
- filterBy: { field: "target", value: "CREATE-MODIFY-TERMINATE" }
33320
+ filterBy: { field: "target", value: "CREATE|MODIFY|TERMINATE" }
33333
33321
  ) {
33334
33322
  page {
33335
33323
  name
@@ -36691,6 +36679,7 @@ var snakeToHuman = (value) => {
36691
36679
  var snakeToKebab = (value) => {
36692
36680
  return value.replace(/_/g, "-");
36693
36681
  };
36682
+ var isAllUpperCase = (str) => str === str.toUpperCase();
36694
36683
 
36695
36684
  // src/utils/optionalArray.ts
36696
36685
  var toOptionalArrayEntry = (data, condition) => condition ? [data] : [];
@@ -36730,7 +36719,7 @@ var WfoBreadcrumbs = ({
36730
36719
  if (index > 0) {
36731
36720
  const link = removeSuffix(parts.slice(0, index + 1).join("/"));
36732
36721
  const _p = removeSuffix(p);
36733
- const text = isUuid4(_p) ? _p : upperCaseFirstChar(_p);
36722
+ const text = isUuid4(_p) || isAllUpperCase(_p) ? _p : upperCaseFirstChar(_p);
36734
36723
  breadcrumbs.push({
36735
36724
  text,
36736
36725
  href: link,
@@ -39242,29 +39231,6 @@ var WfoTreeNode = ({
39242
39231
  ] }) });
39243
39232
  };
39244
39233
 
39245
- // src/components/WfoTree/treeUtils.ts
39246
- function getWfoTreeNodeDepth(node, idToNodeMap) {
39247
- if (node.parent === null) {
39248
- return 0;
39249
- } else {
39250
- const parent = idToNodeMap[node.parent];
39251
- if (parent) {
39252
- return getWfoTreeNodeDepth(parent, idToNodeMap) + 1;
39253
- } else {
39254
- throw new Error(`Parent node for ${node.id} not found.`);
39255
- }
39256
- }
39257
- }
39258
- var sortTreeBlockByLabel = ({ label: labelA }, { label: labelB }) => {
39259
- if (labelA < labelB) {
39260
- return -1;
39261
- }
39262
- if (labelA > labelB) {
39263
- return 1;
39264
- }
39265
- return 0;
39266
- };
39267
-
39268
39234
  // src/components/WfoTree/WfoTreeBranch.tsx
39269
39235
  import { Fragment as Fragment17, jsx as jsx89, jsxs as jsxs62 } from "@emotion/react/jsx-runtime";
39270
39236
  var WfoTreeBranch = ({ item, level }) => {
@@ -39274,14 +39240,7 @@ var WfoTreeBranch = ({ item, level }) => {
39274
39240
  const renderBranches = () => {
39275
39241
  if (hasChildren) {
39276
39242
  const newLevel = level + 1;
39277
- return [...item.children].sort(sortTreeBlockByLabel).map((child) => /* @__PURE__ */ jsx89(
39278
- WfoTreeBranch,
39279
- {
39280
- item: child,
39281
- level: newLevel
39282
- },
39283
- child.id
39284
- ));
39243
+ return item.children.map((child) => /* @__PURE__ */ jsx89(WfoTreeBranch, { item: child, level: newLevel }, child.id));
39285
39244
  }
39286
39245
  return null;
39287
39246
  };
@@ -39305,7 +39264,67 @@ var WfoTree = ({ treeBlocks, depthList }) => {
39305
39264
  useEffect6(() => {
39306
39265
  setDepths(depthList);
39307
39266
  }, [setDepths, TreeContext]);
39308
- return /* @__PURE__ */ jsx90("div", { style: { width: "500px" }, children: [...treeBlocks].sort(sortTreeBlockByLabel).map((item) => /* @__PURE__ */ jsx90(WfoTreeBranch, { item, level: 0 }, item.id)) });
39267
+ return /* @__PURE__ */ jsx90("div", { style: { width: "500px" }, children: treeBlocks.map((item) => /* @__PURE__ */ jsx90(WfoTreeBranch, { item, level: 0 }, item.id)) });
39268
+ };
39269
+
39270
+ // src/components/WfoTree/treeUtils.ts
39271
+ function getWfoTreeNodeDepth(node, idToNodeMap) {
39272
+ if (node.parent === null) {
39273
+ return 0;
39274
+ } else {
39275
+ const parent = idToNodeMap[node.parent];
39276
+ if (parent) {
39277
+ return getWfoTreeNodeDepth(parent, idToNodeMap) + 1;
39278
+ } else {
39279
+ throw new Error(`Parent node for ${node.id} not found.`);
39280
+ }
39281
+ }
39282
+ }
39283
+ var sortTreeBlockByLabel = ({ label: labelA, id: idA }, { label: labelB, id: idB }) => {
39284
+ if (labelA === labelB) {
39285
+ if (idA < idB) {
39286
+ return -1;
39287
+ }
39288
+ if (idA > idB) {
39289
+ return 1;
39290
+ }
39291
+ return 0;
39292
+ }
39293
+ if (labelA < labelB) {
39294
+ return -1;
39295
+ }
39296
+ if (labelA > labelB) {
39297
+ return 1;
39298
+ }
39299
+ return 0;
39300
+ };
39301
+ var countDescendantNodes = (node) => {
39302
+ let count = 0;
39303
+ for (const child of node.children) {
39304
+ count += 1 + countDescendantNodes(child);
39305
+ }
39306
+ return count;
39307
+ };
39308
+ var getPositionInTree = (tree, id) => {
39309
+ let startPosition = 1;
39310
+ if (tree.id === id) {
39311
+ return startPosition;
39312
+ }
39313
+ for (const child of tree.children) {
39314
+ startPosition += 1;
39315
+ if (child.id === id) {
39316
+ return startPosition;
39317
+ }
39318
+ if (child.children.length > 0) {
39319
+ const childPosition = getPositionInTree(child, id);
39320
+ if (childPosition) {
39321
+ return startPosition + childPosition - 1;
39322
+ } else {
39323
+ startPosition += countDescendantNodes(child);
39324
+ }
39325
+ }
39326
+ }
39327
+ return void 0;
39309
39328
  };
39310
39329
 
39311
39330
  // src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx
@@ -39347,7 +39366,10 @@ var WfoSubscriptionDetailTree = ({
39347
39366
  shallowCopy2.icon = getTokenName(shallowCopy2.label);
39348
39367
  }
39349
39368
  if (parentNode.children && Array.isArray(parentNode.children)) {
39350
- parentNode.children.push(shallowCopy2);
39369
+ parentNode.children = [
39370
+ ...parentNode.children,
39371
+ shallowCopy2
39372
+ ].sort(sortTreeBlockByLabel);
39351
39373
  }
39352
39374
  }
39353
39375
  idToNodeMap[shallowCopy2.id] = shallowCopy2;
@@ -39362,6 +39384,19 @@ var WfoSubscriptionDetailTree = ({
39362
39384
  }
39363
39385
  };
39364
39386
  if (!tree) return null;
39387
+ const sortByTree = (idA, idB) => {
39388
+ if (!tree) return 0;
39389
+ const positionA = getPositionInTree(tree, idA);
39390
+ const positionB = getPositionInTree(tree, idB);
39391
+ if (!positionA || !positionB) return 0;
39392
+ if (positionA < positionB) {
39393
+ return -1;
39394
+ }
39395
+ if (positionA > positionB) {
39396
+ return 1;
39397
+ }
39398
+ return 0;
39399
+ };
39365
39400
  return /* @__PURE__ */ jsxs63(EuiFlexGroup11, { style: { marginTop: 15 }, children: [
39366
39401
  /* @__PURE__ */ jsx91(EuiFlexItem9, { style: { maxWidth: 450, width: 450 }, children: /* @__PURE__ */ jsxs63(EuiFlexGroup11, { direction: "column", children: [
39367
39402
  /* @__PURE__ */ jsx91(EuiFlexItem9, { grow: false, children: /* @__PURE__ */ jsxs63(
@@ -39414,8 +39449,8 @@ var WfoSubscriptionDetailTree = ({
39414
39449
  ] })
39415
39450
  }
39416
39451
  ),
39417
- selectedIds.length !== 0 && selectedIds.map((id, index) => {
39418
- const block = idToNodeMap[selectedIds[index]];
39452
+ selectedIds.length !== 0 && selectedIds.sort(sortByTree).map((id, index) => {
39453
+ const block = idToNodeMap[id];
39419
39454
  return /* @__PURE__ */ jsx91(
39420
39455
  WfoSubscriptionProductBlock,
39421
39456
  {
@@ -42951,7 +42986,7 @@ function ImsPortId(_a) {
42951
42986
  }
42952
42987
  );
42953
42988
  const { data: nodeSubscriptionOptions } = useGetNodeSubscriptionOptionsQuery({
42954
- statuses: (_a2 = nodeStatuses == null ? void 0 : nodeStatuses.join("-")) != null ? _a2 : "active"
42989
+ statuses: (_a2 = nodeStatuses == null ? void 0 : nodeStatuses.join("|")) != null ? _a2 : "active"
42955
42990
  });
42956
42991
  useEffect12(() => {
42957
42992
  setPorts(freePorts != null ? freePorts : []);
@@ -43793,9 +43828,11 @@ function Timestamp(_a) {
43793
43828
  "showInlineError",
43794
43829
  "errorMessage"
43795
43830
  ]);
43831
+ const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
43796
43832
  return /* @__PURE__ */ jsx135("div", __spreadProps(__spreadValues({}, filterDOMProps21(props)), { children: /* @__PURE__ */ jsx135(
43797
43833
  EuiFormRow15,
43798
43834
  {
43835
+ css: formRowStyle,
43799
43836
  label,
43800
43837
  labelAppend: /* @__PURE__ */ jsx135(EuiText24, { size: "m", children: description }),
43801
43838
  error: showInlineError ? errorMessage : false,
@@ -44185,8 +44222,8 @@ import {
44185
44222
 
44186
44223
  // src/hooks/deprecated/useGetSubscriptionDropdownOptions.ts
44187
44224
  var useGetSubscriptionDropdownOptions = (tags = [], statuses = ["active"]) => {
44188
- const tagValue = tags.join("-");
44189
- const statusValue = statuses.join("-");
44225
+ const tagValue = tags.join("|");
44226
+ const statusValue = statuses.join("|");
44190
44227
  const filters = [];
44191
44228
  if (tagValue) {
44192
44229
  filters.push({
@@ -44538,6 +44575,7 @@ function Summary(_a) {
44538
44575
  "data"
44539
44576
  ]);
44540
44577
  const { summaryFieldStyle } = useWithOrchestratorTheme(getStyles13);
44578
+ const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
44541
44579
  if (!data) {
44542
44580
  return null;
44543
44581
  }
@@ -44558,7 +44596,7 @@ function Summary(_a) {
44558
44596
  labels && /* @__PURE__ */ jsx140("th", {}),
44559
44597
  headers.map((header, idx) => /* @__PURE__ */ jsx140("th", { children: header }, idx))
44560
44598
  ] });
44561
- return /* @__PURE__ */ jsx140(EuiFlexItem23, { css: summaryFieldStyle, children: /* @__PURE__ */ jsx140("section", __spreadProps(__spreadValues({}, filterDOMProps26(props)), { children: /* @__PURE__ */ jsx140(
44599
+ return /* @__PURE__ */ jsx140(EuiFlexItem23, { css: [summaryFieldStyle, formRowStyle], children: /* @__PURE__ */ jsx140("section", __spreadProps(__spreadValues({}, filterDOMProps26(props)), { children: /* @__PURE__ */ jsx140(
44562
44600
  EuiFormRow19,
44563
44601
  {
44564
44602
  label,
@@ -51387,6 +51425,7 @@ export {
51387
51425
  initiateCsvFileDownload,
51388
51426
  ipPrefixTableFieldStyling,
51389
51427
  ipamStates,
51428
+ isAllUpperCase,
51390
51429
  isToday,
51391
51430
  isUuid4,
51392
51431
  isValidLocalStorageTableConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "1.30.3",
3
+ "version": "1.32.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -19,6 +19,7 @@ import { FieldProps, connectField, filterDOMProps } from 'uniforms';
19
19
  import { EuiFlexItem, EuiFormRow, EuiText } from '@elastic/eui';
20
20
 
21
21
  import { getStyles } from '@/components/WfoForms/formFields/SummaryFieldStyling';
22
+ import { getCommonFormFieldStyles } from '@/components/WfoForms/formFields/commonStyles';
22
23
  import { useWithOrchestratorTheme } from '@/hooks';
23
24
 
24
25
  export type SummaryFieldProps = FieldProps<
@@ -38,6 +39,7 @@ function Summary({
38
39
  ...props
39
40
  }: SummaryFieldProps) {
40
41
  const { summaryFieldStyle } = useWithOrchestratorTheme(getStyles);
42
+ const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
41
43
 
42
44
  if (!data) {
43
45
  return null;
@@ -79,7 +81,7 @@ function Summary({
79
81
  );
80
82
 
81
83
  return (
82
- <EuiFlexItem css={summaryFieldStyle}>
84
+ <EuiFlexItem css={[summaryFieldStyle, formRowStyle]}>
83
85
  <section {...filterDOMProps(props)}>
84
86
  <EuiFormRow
85
87
  label={label}
@@ -110,7 +110,7 @@ function ImsPortId({
110
110
 
111
111
  const { data: nodeSubscriptionOptions } =
112
112
  useGetNodeSubscriptionOptionsQuery({
113
- statuses: nodeStatuses?.join('-') ?? 'active',
113
+ statuses: nodeStatuses?.join('|') ?? 'active',
114
114
  });
115
115
 
116
116
  useEffect(() => {
@@ -19,6 +19,9 @@ import { connectField, filterDOMProps } from 'uniforms';
19
19
 
20
20
  import { EuiDatePicker, EuiFormRow, EuiText } from '@elastic/eui';
21
21
 
22
+ import { getCommonFormFieldStyles } from '@/components/WfoForms/formFields/commonStyles';
23
+ import { useWithOrchestratorTheme } from '@/hooks';
24
+
22
25
  import { FieldProps } from '../types';
23
26
 
24
27
  export function utcTimestampToLocalMoment(utc_timestamp: number) {
@@ -63,9 +66,12 @@ function Timestamp({
63
66
  errorMessage,
64
67
  ...props
65
68
  }: TimestampFieldProps) {
69
+ const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
70
+
66
71
  return (
67
72
  <div {...filterDOMProps(props)}>
68
73
  <EuiFormRow
74
+ css={formRowStyle}
69
75
  label={label}
70
76
  labelAppend={<EuiText size="m">{description}</EuiText>}
71
77
  error={showInlineError ? errorMessage : false}
@@ -14,7 +14,12 @@ import {
14
14
 
15
15
  import { useOrchestratorTheme } from '@/hooks';
16
16
  import { WfoSideMenu } from '@/icons';
17
- import { isUuid4, removeSuffix, upperCaseFirstChar } from '@/utils';
17
+ import {
18
+ isAllUpperCase,
19
+ isUuid4,
20
+ removeSuffix,
21
+ upperCaseFirstChar,
22
+ } from '@/utils';
18
23
 
19
24
  interface WfoBreadcrumbsProps {
20
25
  handleSideMenuClick: () => void;
@@ -46,7 +51,8 @@ export const WfoBreadcrumbs = ({
46
51
  // Handle UUID's: so you can have breadcrumb like: `Start / Subscriptions / b2312aa-cbc ...`
47
52
  // first remove the suffix, like ?activeTab=....
48
53
  const _p = removeSuffix(p);
49
- const text = isUuid4(_p) ? _p : upperCaseFirstChar(_p);
54
+ const text =
55
+ isUuid4(_p) || isAllUpperCase(_p) ? _p : upperCaseFirstChar(_p);
50
56
 
51
57
  breadcrumbs.push({
52
58
  text: text,
@@ -14,7 +14,7 @@ import {
14
14
  } from '@/types';
15
15
 
16
16
  import { getTokenName } from '../../utils/getTokenName';
17
- import { WfoTree } from '../WfoTree';
17
+ import { WfoTree, getPositionInTree, sortTreeBlockByLabel } from '../WfoTree';
18
18
  import { getWfoTreeNodeDepth } from '../WfoTree';
19
19
  import { WfoSubscriptionProductBlock } from './WfoSubscriptionProductBlock';
20
20
  import { getProductBlockTitle } from './utils';
@@ -76,8 +76,12 @@ export const WfoSubscriptionDetailTree = ({
76
76
  }
77
77
 
78
78
  // Let's add the current node as a child of the parent node.
79
+ // We want them to be in order, so we'll sort them by label.
79
80
  if (parentNode.children && Array.isArray(parentNode.children)) {
80
- parentNode.children.push(shallowCopy);
81
+ parentNode.children = [
82
+ ...parentNode.children,
83
+ shallowCopy,
84
+ ].sort(sortTreeBlockByLabel);
81
85
  }
82
86
  }
83
87
 
@@ -97,6 +101,26 @@ export const WfoSubscriptionDetailTree = ({
97
101
 
98
102
  if (!tree) return null;
99
103
 
104
+ /*
105
+ * The order of displayed product blocks should be the same as the order in the tree. Because we sort the tree
106
+ * alphabetically per level we can not depend on the order of product block ids anymore so we sort by the position in the tree.
107
+ */
108
+ const sortByTree = (idA: number, idB: number) => {
109
+ if (!tree) return 0;
110
+
111
+ const positionA = getPositionInTree(tree, idA);
112
+ const positionB = getPositionInTree(tree, idB);
113
+ if (!positionA || !positionB) return 0;
114
+
115
+ if (positionA < positionB) {
116
+ return -1;
117
+ }
118
+ if (positionA > positionB) {
119
+ return 1;
120
+ }
121
+ return 0;
122
+ };
123
+
100
124
  return (
101
125
  <EuiFlexGroup style={{ marginTop: 15 }}>
102
126
  <EuiFlexItem style={{ maxWidth: 450, width: 450 }}>
@@ -154,9 +178,8 @@ export const WfoSubscriptionDetailTree = ({
154
178
  </EuiCallOut>
155
179
  )}
156
180
  {selectedIds.length !== 0 &&
157
- selectedIds.map((id, index) => {
158
- const block = idToNodeMap[selectedIds[index]];
159
-
181
+ selectedIds.sort(sortByTree).map((id, index) => {
182
+ const block = idToNodeMap[id];
160
183
  return (
161
184
  <WfoSubscriptionProductBlock
162
185
  key={index}
@@ -8,7 +8,7 @@ import {
8
8
  SubscriptionAction,
9
9
  SubscriptionDetailProcess,
10
10
  WorkflowTarget,
11
- } from '../../../types';
11
+ } from '@/types';
12
12
 
13
13
  const MAX_LABEL_LENGTH = 45;
14
14
 
@@ -1,9 +1,9 @@
1
1
  import React, { FC, useEffect } from 'react';
2
2
 
3
- import { TreeContext, TreeContextType } from '../../contexts';
4
- import { TreeBlock } from '../../types';
3
+ import { TreeContext, TreeContextType } from '@/contexts';
4
+ import { TreeBlock } from '@/types';
5
+
5
6
  import { WfoTreeBranch } from './WfoTreeBranch';
6
- import { sortTreeBlockByLabel } from './treeUtils';
7
7
 
8
8
  type WfoTreeProps = {
9
9
  treeBlocks: TreeBlock[];
@@ -20,7 +20,7 @@ export const WfoTree: FC<WfoTreeProps> = ({ treeBlocks, depthList }) => {
20
20
 
21
21
  return (
22
22
  <div style={{ width: '500px' }}>
23
- {[...treeBlocks].sort(sortTreeBlockByLabel).map((item) => (
23
+ {treeBlocks.map((item) => (
24
24
  <WfoTreeBranch key={item.id} item={item} level={0} />
25
25
  ))}
26
26
  </div>
@@ -2,10 +2,10 @@ import React, { FC } from 'react';
2
2
 
3
3
  import { EuiListGroup } from '@elastic/eui';
4
4
 
5
- import { TreeContext, TreeContextType } from '../../contexts';
6
- import { TreeBlock } from '../../types';
5
+ import { TreeContext, TreeContextType } from '@/contexts';
6
+ import { TreeBlock } from '@/types';
7
+
7
8
  import { WfoTreeNode } from './WfoTreeNode';
8
- import { sortTreeBlockByLabel } from './treeUtils';
9
9
 
10
10
  type WfoTreeBranchProps = {
11
11
  item: TreeBlock;
@@ -22,15 +22,9 @@ export const WfoTreeBranch: FC<WfoTreeBranchProps> = ({ item, level }) => {
22
22
  if (hasChildren) {
23
23
  const newLevel = level + 1;
24
24
 
25
- return [...item.children]
26
- .sort(sortTreeBlockByLabel)
27
- .map((child) => (
28
- <WfoTreeBranch
29
- key={child.id}
30
- item={child}
31
- level={newLevel}
32
- />
33
- ));
25
+ return item.children.map((child) => (
26
+ <WfoTreeBranch key={child.id} item={child} level={newLevel} />
27
+ ));
34
28
  }
35
29
 
36
30
  return null;
@@ -1,5 +1,6 @@
1
- import { FieldValue, TreeBlock } from '../../types';
2
- import { getWfoTreeNodeDepth } from './treeUtils';
1
+ import { FieldValue, TreeBlock, WfoTreeNodeMap } from '@/types';
2
+
3
+ import { getPositionInTree, getWfoTreeNodeDepth } from './treeUtils';
3
4
 
4
5
  describe('getWfoTreeNodeDepth', () => {
5
6
  const field: FieldValue = { field: 'test', value: 'test' };
@@ -70,7 +71,7 @@ describe('getWfoTreeNodeDepth', () => {
70
71
  ],
71
72
  };
72
73
 
73
- const idToNodeMap = {
74
+ const idToNodeMap: WfoTreeNodeMap = {
74
75
  1: sampleTree,
75
76
  2: sampleTree.children[0],
76
77
  3: sampleTree.children[1],
@@ -119,3 +120,239 @@ describe('getWfoTreeNodeDepth', () => {
119
120
  ).toThrowError('Parent node for 1 not found.');
120
121
  });
121
122
  });
123
+
124
+ describe('getPositionInTree', () => {
125
+ const json = `{
126
+ "id": 0,
127
+ "subscription": {
128
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
129
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
130
+ },
131
+ "parent": null,
132
+ "productBlockInstanceValues": [
133
+ ],
134
+ "subscriptionInstanceId": "7dc29b2c-6af8-4e82-960d-1fca551e5941",
135
+ "inUseByRelations": [],
136
+ "icon": "",
137
+ "label": "L3VPN multipoint service 215 Mbit/s",
138
+ "children": [
139
+ {
140
+ "id": 2,
141
+ "subscription": {
142
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
143
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
144
+ },
145
+ "parent": 0,
146
+ "productBlockInstanceValues": [
147
+ ],
148
+ "subscriptionInstanceId": "bcccaec3-ece2-4115-9457-d46d1c4be1c3",
149
+ "inUseByRelations": [
150
+ ],
151
+ "icon": "",
152
+ "label": "L3VPNSAPSS ah001a-jnx-test-floris-1-vtb vlan ...",
153
+ "children": [
154
+ {
155
+ "id": 3,
156
+ "subscription": {
157
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
158
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
159
+ },
160
+ "parent": 2,
161
+ "productBlockInstanceValues": [
162
+ ],
163
+ "subscriptionInstanceId": "fc213a85-99ac-4efd-8b5d-a57517fba549",
164
+ "inUseByRelations": [
165
+ ],
166
+ "icon": "",
167
+ "label": "SAP ah001a-jnx-test-floris-1-vtb vlan 13",
168
+ "children": [
169
+ {
170
+ "id": 4,
171
+ "subscription": {
172
+ "subscriptionId": "0a1eab0c-e952-401d-b1ed-20c286a268be",
173
+ "description": "AARNETNOC SPNL AH001A 1 Gbit/s"
174
+ },
175
+ "parent": 3,
176
+ "productBlockInstanceValues": [
177
+ ],
178
+ "subscriptionInstanceId": "17e52886-dc18-41e3-9ce2-af426914a831",
179
+ "inUseByRelations": [
180
+ ],
181
+ "icon": "",
182
+ "label": "SP 1G tagged (ah001a-jnx-test-floris-1-vtb)",
183
+ "children": [
184
+ {
185
+ "id": 5,
186
+ "subscription": {
187
+ "subscriptionId": "00e4fbbb-9192-4fac-9066-5d1381c5f0a4",
188
+ "description": "Node ah001a-jnx-test-floris-1-vtb Ah001A"
189
+ },
190
+ "parent": 4,
191
+ "productBlockInstanceValues": [
192
+ ],
193
+ "subscriptionInstanceId": "6ff2d010-9e16-44ed-ac62-b36b9438c7ff",
194
+ "inUseByRelations": [
195
+ ],
196
+ "icon": "tokenConstant",
197
+ "label": "Node ah001a-jnx-test-floris-1-vtb",
198
+ "children": [],
199
+ "isOutsideCurrentSubscription": true
200
+ }
201
+ ],
202
+ "isOutsideCurrentSubscription": true
203
+ }
204
+ ],
205
+ "isOutsideCurrentSubscription": false
206
+ }
207
+ ],
208
+ "isOutsideCurrentSubscription": false
209
+ },
210
+ {
211
+ "id": 6,
212
+ "subscription": {
213
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
214
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
215
+ },
216
+ "parent": 0,
217
+ "productBlockInstanceValues": [
218
+ ],
219
+ "subscriptionInstanceId": "b7eee7a5-6878-42bf-bbd5-ef442d33334f",
220
+ "inUseByRelations": [
221
+ ],
222
+ "icon": "",
223
+ "label": "L3VPNSAPSS ah001a-jnx-test-floris-1-vtb vlan ...",
224
+ "children": [
225
+ {
226
+ "id": 7,
227
+ "subscription": {
228
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
229
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
230
+ },
231
+ "parent": 6,
232
+ "productBlockInstanceValues": [
233
+ ],
234
+ "subscriptionInstanceId": "7d67ba27-cc2f-42c6-90a6-d10932531c7a",
235
+ "inUseByRelations": [
236
+ ],
237
+ "icon": "",
238
+ "label": "SAP ah001a-jnx-test-floris-1-vtb vlan 140",
239
+ "children": [
240
+ {
241
+ "id": 8,
242
+ "subscription": {
243
+ "subscriptionId": "7a8caac1-0203-41f2-9623-b7068c585423",
244
+ "description": "KLM SP AH001A 10 Gbit/s"
245
+ },
246
+ "parent": 7,
247
+ "productBlockInstanceValues": [
248
+ ],
249
+ "subscriptionInstanceId": "a05d89ad-9300-4a05-b7f7-0a8d78dd2a07",
250
+ "inUseByRelations": [
251
+ ],
252
+ "icon": "",
253
+ "label": "SP 10G tagged (ah001a-jnx-test-floris-1-vtb)",
254
+ "children": [
255
+ {
256
+ "id": 9,
257
+ "subscription": {
258
+ "subscriptionId": "00e4fbbb-9192-4fac-9066-5d1381c5f0a4",
259
+ "description": "Node ah001a-jnx-test-floris-1-vtb Ah001A"
260
+ },
261
+ "parent": 8,
262
+ "productBlockInstanceValues": [
263
+ ],
264
+ "subscriptionInstanceId": "6ff2d010-9e16-44ed-ac62-b36b9438c7ff",
265
+ "inUseByRelations": [
266
+ ],
267
+ "icon": "tokenConstant",
268
+ "label": "Node ah001a-jnx-test-floris-1-vtb",
269
+ "children": [],
270
+ "isOutsideCurrentSubscription": true
271
+ }
272
+ ],
273
+ "isOutsideCurrentSubscription": true
274
+ }
275
+ ],
276
+ "isOutsideCurrentSubscription": false
277
+ }
278
+ ],
279
+ "isOutsideCurrentSubscription": false
280
+ },
281
+ {
282
+ "id": 1,
283
+ "subscription": {
284
+ "subscriptionId": "556facd3-6399-4c76-aeb1-114849da2f96",
285
+ "description": "AMPATH L3VPN AH001A 215 Mbit/s"
286
+ },
287
+ "parent": 0,
288
+ "productBlockInstanceValues": [
289
+ ],
290
+ "subscriptionInstanceId": "43fc68ff-8644-46b1-9e8f-bb4bb46608b9",
291
+ "inUseByRelations": [
292
+ ],
293
+ "icon": "tokenConstant",
294
+ "label": "L3VPNSS AS1105",
295
+ "children": [],
296
+ "isOutsideCurrentSubscription": false
297
+ }
298
+ ],
299
+ "isOutsideCurrentSubscription": false
300
+ }`;
301
+
302
+ const tree = JSON.parse(json) as TreeBlock;
303
+
304
+ it('should return 1 for the root node', () => {
305
+ const rootDepth = getPositionInTree(tree, 0);
306
+ expect(rootDepth).toBe(1);
307
+ });
308
+
309
+ it('should return 2 for the first node', () => {
310
+ const positionOfFirstLevelChild = getPositionInTree(tree, 2);
311
+ expect(positionOfFirstLevelChild).toBe(2);
312
+ });
313
+
314
+ it('should return correct node at position 3', () => {
315
+ const positionOfFirstLevelChild = getPositionInTree(tree, 3);
316
+ expect(positionOfFirstLevelChild).toBe(3);
317
+ });
318
+
319
+ it('should return correct node at position 4', () => {
320
+ const positionOfFirstLevelChild = getPositionInTree(tree, 4);
321
+ expect(positionOfFirstLevelChild).toBe(4);
322
+ });
323
+
324
+ it('should return correct node at position 5', () => {
325
+ const positionOfFirstLevelChild = getPositionInTree(tree, 5);
326
+ expect(positionOfFirstLevelChild).toBe(5);
327
+ });
328
+
329
+ it('should return correct node at position 6', () => {
330
+ const positionOfFirstLevelChild = getPositionInTree(tree, 6);
331
+ expect(positionOfFirstLevelChild).toBe(6);
332
+ });
333
+
334
+ it('should return correct node at position 7', () => {
335
+ const positionOfFirstLevelChild = getPositionInTree(tree, 7);
336
+ expect(positionOfFirstLevelChild).toBe(7);
337
+ });
338
+
339
+ it('should return correct node at position 8', () => {
340
+ const positionOfFirstLevelChild = getPositionInTree(tree, 8);
341
+ expect(positionOfFirstLevelChild).toBe(8);
342
+ });
343
+
344
+ it('should return correct node at position 9', () => {
345
+ const positionOfFirstLevelChild = getPositionInTree(tree, 9);
346
+ expect(positionOfFirstLevelChild).toBe(9);
347
+ });
348
+
349
+ it('should return correct node at position 10', () => {
350
+ const positionOfFirstLevelChild = getPositionInTree(tree, 1);
351
+ expect(positionOfFirstLevelChild).toBe(10);
352
+ });
353
+
354
+ it('should return undefined if the id is not found', () => {
355
+ const positionOfUndefined = getPositionInTree(tree, 9999);
356
+ expect(positionOfUndefined).toBeUndefined();
357
+ });
358
+ });
@@ -1,4 +1,4 @@
1
- import { TreeBlock, WfoTreeNodeMap } from '../../types';
1
+ import { TreeBlock, WfoTreeNodeMap } from '@/types';
2
2
 
3
3
  export function getWfoTreeNodeDepth(
4
4
  node: TreeBlock,
@@ -21,9 +21,18 @@ export function getWfoTreeNodeDepth(
21
21
  }
22
22
 
23
23
  export const sortTreeBlockByLabel = (
24
- { label: labelA }: TreeBlock,
25
- { label: labelB }: TreeBlock,
24
+ { label: labelA, id: idA }: TreeBlock,
25
+ { label: labelB, id: idB }: TreeBlock,
26
26
  ): number => {
27
+ if (labelA === labelB) {
28
+ if (idA < idB) {
29
+ return -1;
30
+ }
31
+ if (idA > idB) {
32
+ return 1;
33
+ }
34
+ return 0;
35
+ }
27
36
  if (labelA < labelB) {
28
37
  return -1;
29
38
  }
@@ -32,3 +41,48 @@ export const sortTreeBlockByLabel = (
32
41
  }
33
42
  return 0;
34
43
  };
44
+
45
+ const countDescendantNodes = (node: TreeBlock): number => {
46
+ let count = 0;
47
+ for (const child of node.children) {
48
+ count += 1 + countDescendantNodes(child);
49
+ }
50
+ return count;
51
+ };
52
+
53
+ /**
54
+ * This function returns the position of a node in an ordered tree. To get
55
+ * the position we start counting from 1 and keep incrementing for each
56
+ * node and descendant node we encounter such that the difference in position
57
+ * between two sibling nodes on the first level is the number the total number of descendants.
58
+ * This cab then be used to determine how to order the display of a list of nodes based on their id.
59
+ * @param tree
60
+ * @param id
61
+ * @returns number
62
+ */
63
+ export const getPositionInTree = (
64
+ tree: TreeBlock,
65
+ id: number,
66
+ ): number | undefined => {
67
+ let startPosition = 1;
68
+ if (tree.id === id) {
69
+ return startPosition;
70
+ }
71
+
72
+ for (const child of tree.children) {
73
+ startPosition += 1;
74
+ if (child.id === id) {
75
+ return startPosition;
76
+ }
77
+ if (child.children.length > 0) {
78
+ const childPosition = getPositionInTree(child, id);
79
+ if (childPosition) {
80
+ return startPosition + childPosition - 1;
81
+ } else {
82
+ startPosition += countDescendantNodes(child);
83
+ }
84
+ }
85
+ }
86
+
87
+ return undefined;
88
+ };
@@ -6,7 +6,6 @@ export type TreeContextType = {
6
6
  selectedIds: number[];
7
7
  expandedIds: number[];
8
8
  toggleSelectedId: (id: number) => void;
9
- toggleExpandedId: (id: number) => void;
10
9
  expandNode: (id: number) => void;
11
10
  collapseNode: (id: number) => void;
12
11
  expandAll: () => void;
@@ -29,30 +28,17 @@ export const TreeProvider: React.FC<TreeProviderProps> = ({ children }) => {
29
28
  const toggleSelectedId = (id: number) => {
30
29
  if (selectedIds.includes(id)) {
31
30
  setSelectedIds((prevSelectedIds) =>
32
- prevSelectedIds
33
- .filter((selectedId) => selectedId !== id)
34
- .sort((a, b) => a - b),
31
+ prevSelectedIds.filter((selectedId) => selectedId !== id),
35
32
  );
36
33
  } else {
37
- setSelectedIds((prevSelectedIds) =>
38
- [...prevSelectedIds, id].sort((a, b) => a - b),
39
- );
34
+ setSelectedIds((prevSelectedIds) => [...prevSelectedIds, id]);
40
35
  }
41
36
  };
37
+
42
38
  const selectAll = () => {
43
39
  setSelectedIds(Array.from(Array(depths.length).keys()));
44
40
  };
45
41
 
46
- const toggleExpandedId = (id: number) => {
47
- if (expandedIds.includes(id)) {
48
- setExpandedIds((prevExpandedIds) =>
49
- prevExpandedIds.filter((expandedId) => expandedId !== id),
50
- );
51
- } else {
52
- setExpandedIds((prevExpandedIds) => [...prevExpandedIds, id]);
53
- }
54
- };
55
-
56
42
  const expandAll = () => {
57
43
  setExpandedIds(Array.from(Array(depths.length).keys()));
58
44
  };
@@ -104,7 +90,6 @@ export const TreeProvider: React.FC<TreeProviderProps> = ({ children }) => {
104
90
  selectedIds,
105
91
  expandedIds,
106
92
  toggleSelectedId,
107
- toggleExpandedId,
108
93
  expandNode,
109
94
  collapseNode,
110
95
  expandAll,
@@ -5,9 +5,9 @@ export const useGetSubscriptionDropdownOptions = (
5
5
  tags: string[] = [],
6
6
  statuses: string[] = ['active'],
7
7
  ) => {
8
- // The way the graphql filterBy clause on the backend handled multiple AND values is by joining them with -
9
- const tagValue = tags.join('-');
10
- const statusValue = statuses.join('-');
8
+ // The way the graphql filterBy clause on the backend handled multiple AND values is by joining them with |
9
+ const tagValue = tags.join('|');
10
+ const statusValue = statuses.join('|');
11
11
 
12
12
  const filters: GraphqlFilter<SubscriptionDropdownOption>[] = [];
13
13
 
package/src/rtk/api.ts CHANGED
@@ -108,7 +108,7 @@ export const orchestratorApi = createApi({
108
108
  // TODO: https://github.com/workfloworchestrator/orchestrator-ui-library/issues/1105
109
109
  if (
110
110
  error.extensions?.error_type ===
111
- 'not_authorized'
111
+ 'not_authenticated'
112
112
  ) {
113
113
  signOut();
114
114
  }
@@ -18,7 +18,7 @@ query MetadataWorkflows(
18
18
  after: $after
19
19
  sortBy: $sortBy
20
20
  query: $query
21
- filterBy: { field: "target", value: "CREATE-MODIFY-TERMINATE" }
21
+ filterBy: { field: "target", value: "CREATE|MODIFY|TERMINATE" }
22
22
  ) {
23
23
  page {
24
24
  name
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  camelToHuman,
3
+ isAllUpperCase,
3
4
  removeSuffix,
4
5
  snakeToHuman,
5
6
  snakeToKebab,
@@ -104,3 +105,30 @@ describe('snakeToKebab()', () => {
104
105
  expect(result).toEqual('quick-brown-fox');
105
106
  });
106
107
  });
108
+
109
+ describe('isAllUpperCase()', () => {
110
+ it('Returns true for an empty string', () => {
111
+ const result = isAllUpperCase('');
112
+ expect(result).toBe(true);
113
+ });
114
+ it('Returns true for a string with all uppercase letters', () => {
115
+ const result = isAllUpperCase('HELLO');
116
+ expect(result).toBe(true);
117
+ });
118
+ it('Returns false for a string with all lowercase letters', () => {
119
+ const result = isAllUpperCase('hello');
120
+ expect(result).toBe(false);
121
+ });
122
+ it('Returns false for a string with mixed case letters', () => {
123
+ const result = isAllUpperCase('Hello');
124
+ expect(result).toBe(false);
125
+ });
126
+ it('Returns true for a string with uppercase letters and non-letter characters', () => {
127
+ const result = isAllUpperCase('HELLO123!');
128
+ expect(result).toBe(true);
129
+ });
130
+ it('Returns false for a string with mixed case letters and non-letter characters', () => {
131
+ const result = isAllUpperCase('Hello123!');
132
+ expect(result).toBe(false);
133
+ });
134
+ });
@@ -22,3 +22,5 @@ export const snakeToHuman = (value: string): string => {
22
22
  export const snakeToKebab = (value: string): string => {
23
23
  return value.replace(/_/g, '-');
24
24
  };
25
+
26
+ export const isAllUpperCase = (str: string) => str === str.toUpperCase();