@orchestrator-ui/orchestrator-ui-components 1.1.0 → 1.2.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.
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +22 -3
- package/dist/index.js +27 -8
- package/package.json +1 -1
- package/src/hooks/DataFetchHooks.ts +1 -1
- package/src/icons/WfoWarningTriangle.tsx +2 -2
- package/src/rtk/api.ts +11 -4
- package/src/rtk/slices/customApis.ts +18 -0
- package/src/rtk/slices/index.ts +1 -0
- package/src/rtk/store.ts +5 -0
- package/src/rtk/storeProvider.tsx +4 -1
- package/src/types/types.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @orchestrator-ui/orchestrator-ui-components@1.
|
|
2
|
+
> @orchestrator-ui/orchestrator-ui-components@1.2.0 build
|
|
3
3
|
> tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[32mESM[39m [1mdist/index.js [22m[32m2.15 MB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 796ms
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 12368ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m121.81 KB[39m
|
package/.turbo/turbo-lint.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
|
|
2
|
-
> @orchestrator-ui/orchestrator-ui-components@1.
|
|
2
|
+
> @orchestrator-ui/orchestrator-ui-components@1.2.0 test
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS Orchestrator UI Components Tests src/components/WfoForms/formFields/utils.spec.ts
|
|
6
5
|
PASS Orchestrator UI Components Tests src/pages/processes/timelineUtils.spec.ts
|
|
6
|
+
PASS Orchestrator UI Components Tests src/components/WfoForms/formFields/utils.spec.ts
|
|
7
7
|
PASS Orchestrator UI Components Tests src/utils/date.spec.ts
|
|
8
|
-
PASS Orchestrator UI Components Tests src/utils/getProductNamesFromProcess.spec.ts
|
|
9
|
-
PASS Orchestrator UI Components Tests src/components/WfoSubscription/utils/utils.spec.ts
|
|
10
8
|
PASS Orchestrator UI Components Tests src/utils/string.spec.ts
|
|
9
|
+
PASS Orchestrator UI Components Tests src/components/WfoSubscription/utils/utils.spec.ts
|
|
10
|
+
PASS Orchestrator UI Components Tests src/utils/getProductNamesFromProcess.spec.ts
|
|
11
11
|
PASS Orchestrator UI Components Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
|
|
12
|
-
PASS Orchestrator UI Components Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
|
|
13
12
|
PASS Orchestrator UI Components Tests src/components/WfoTree/treeUtils.spec.ts
|
|
13
|
+
PASS Orchestrator UI Components Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
|
|
14
|
+
PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
|
|
14
15
|
PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableUtils.spec.ts
|
|
15
16
|
PASS Orchestrator UI Components Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
|
|
16
|
-
PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
|
|
17
17
|
PASS Orchestrator UI Components Tests src/messages/getTranslationMessages.spec.ts
|
|
18
18
|
PASS Orchestrator UI Components Tests src/utils/getToastMessage.spec.ts
|
|
19
19
|
PASS Orchestrator UI Components Tests src/components/WfoTable/utils/columns.spec.ts
|
|
20
20
|
PASS Orchestrator UI Components Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
|
|
21
|
-
PASS Orchestrator UI Components Tests src/utils/getTokenName.spec.ts
|
|
22
21
|
PASS Orchestrator UI Components Tests src/utils/sortObjectKeys.spec.ts
|
|
23
|
-
PASS Orchestrator UI Components Tests src/utils/
|
|
22
|
+
PASS Orchestrator UI Components Tests src/utils/getTokenName.spec.ts
|
|
24
23
|
PASS Orchestrator UI Components Tests src/utils/onlyUnique.spec.ts
|
|
24
|
+
PASS Orchestrator UI Components Tests src/utils/environmentVariables.spec.ts
|
|
25
25
|
PASS Orchestrator UI Components Tests src/utils/uuid.spec.ts
|
|
26
|
+
PASS Orchestrator UI Components Tests src/utils/getQueryVariablesForExport.spec.ts
|
|
26
27
|
PASS Orchestrator UI Components Tests src/utils/getTypedFieldFromObject.spec.ts
|
|
27
28
|
PASS Orchestrator UI Components Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
|
|
28
|
-
PASS Orchestrator UI Components Tests src/utils/getQueryVariablesForExport.spec.ts
|
|
29
29
|
|
|
30
30
|
Test Suites: 24 passed, 24 total
|
|
31
31
|
Tests: 144 passed, 144 total
|
|
32
32
|
Snapshots: 0 total
|
|
33
|
-
Time: 4.
|
|
33
|
+
Time: 4.654 s
|
|
34
34
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -272,6 +272,7 @@ declare type GraphqlFilter<Type> = {
|
|
|
272
272
|
field: keyof Type;
|
|
273
273
|
value: string;
|
|
274
274
|
};
|
|
275
|
+
declare type FetchFilter<Type> = GraphqlFilter<Type>;
|
|
275
276
|
declare type GraphqlQueryVariables<Type> = {
|
|
276
277
|
first?: number;
|
|
277
278
|
after?: number;
|
|
@@ -959,6 +960,7 @@ declare type CacheNames = {
|
|
|
959
960
|
};
|
|
960
961
|
declare const useRawProcessDetails: (processId: string) => react_query.UseQueryResult<ProcessDetailResultRaw, unknown>;
|
|
961
962
|
declare const useCacheNames: () => react_query.UseQueryResult<CacheNames, unknown>;
|
|
963
|
+
declare const filterDataByCriteria: <Type>(data: Type[], filterCriteria: GraphqlFilter<Type>[]) => Type[];
|
|
962
964
|
declare const useFilterQueryWithRest: <Type>(url: string, queryKey: string[], filters?: GraphqlFilter<Type>[] | undefined, refetchInterval?: number | undefined) => react_query.UseQueryResult<any, unknown>;
|
|
963
965
|
|
|
964
966
|
interface SubscriptionAction {
|
|
@@ -2894,7 +2896,9 @@ declare enum CacheTags {
|
|
|
2894
2896
|
}
|
|
2895
2897
|
declare type ExtraOptions = {
|
|
2896
2898
|
baseQueryType?: BaseQueryTypes;
|
|
2899
|
+
apiName?: string;
|
|
2897
2900
|
};
|
|
2901
|
+
declare const prepareHeaders: (headers: Headers) => Promise<Headers>;
|
|
2898
2902
|
declare const orchestratorApi: _reduxjs_toolkit_query_react.Api<(args: any, api: _reduxjs_toolkit_query_react.BaseQueryApi, extraOptions: ExtraOptions) => {
|
|
2899
2903
|
error: _reduxjs_toolkit_query_react.FetchBaseQueryError;
|
|
2900
2904
|
data?: undefined;
|
|
@@ -2911,6 +2915,7 @@ declare const orchestratorApi: _reduxjs_toolkit_query_react.Api<(args: any, api:
|
|
|
2911
2915
|
|
|
2912
2916
|
declare const useGetCustomersQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2913
2917
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
2918
|
+
apiName?: string | undefined;
|
|
2914
2919
|
}) => {
|
|
2915
2920
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
2916
2921
|
data?: undefined;
|
|
@@ -2931,6 +2936,7 @@ declare type ProcessListResponse = {
|
|
|
2931
2936
|
} & BaseGraphQlResult;
|
|
2932
2937
|
declare const useGetProcessListQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<GraphqlQueryVariables<Process>, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2933
2938
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
2939
|
+
apiName?: string | undefined;
|
|
2934
2940
|
}) => {
|
|
2935
2941
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
2936
2942
|
data?: undefined;
|
|
@@ -2951,6 +2957,7 @@ interface EngineStatusReturnValue {
|
|
|
2951
2957
|
}
|
|
2952
2958
|
declare const useGetEngineStatusQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2953
2959
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
2960
|
+
apiName?: string | undefined;
|
|
2954
2961
|
}) => {
|
|
2955
2962
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
2956
2963
|
data?: undefined;
|
|
@@ -2966,6 +2973,7 @@ declare const useGetEngineStatusQuery: _reduxjs_toolkit_dist_query_react_buildHo
|
|
|
2966
2973
|
} | PromiseLike<_reduxjs_toolkit_dist_query_baseQueryTypes.QueryReturnValue<unknown, _rtk_query_graphql_request_base_query_dist_GraphqlBaseQueryTypes.ErrorResponse, {}>>, CacheTags, EngineStatusReturnValue, "orchestratorApi">>;
|
|
2967
2974
|
declare const useClearCacheMutation: _reduxjs_toolkit_dist_query_react_buildHooks.UseMutation<_reduxjs_toolkit_query.MutationDefinition<string, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2968
2975
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
2976
|
+
apiName?: string | undefined;
|
|
2969
2977
|
}) => {
|
|
2970
2978
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
2971
2979
|
data?: undefined;
|
|
@@ -2981,6 +2989,7 @@ declare const useClearCacheMutation: _reduxjs_toolkit_dist_query_react_buildHook
|
|
|
2981
2989
|
} | PromiseLike<_reduxjs_toolkit_dist_query_baseQueryTypes.QueryReturnValue<unknown, _rtk_query_graphql_request_base_query_dist_GraphqlBaseQueryTypes.ErrorResponse, {}>>, CacheTags, void, "orchestratorApi">>;
|
|
2982
2990
|
declare const useSetEngineStatusMutation: _reduxjs_toolkit_dist_query_react_buildHooks.UseMutation<_reduxjs_toolkit_query.MutationDefinition<boolean, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2983
2991
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
2992
|
+
apiName?: string | undefined;
|
|
2984
2993
|
}) => {
|
|
2985
2994
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
2986
2995
|
data?: undefined;
|
|
@@ -2997,6 +3006,7 @@ declare const useSetEngineStatusMutation: _reduxjs_toolkit_dist_query_react_buil
|
|
|
2997
3006
|
|
|
2998
3007
|
declare const useStreamMessagesQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
|
|
2999
3008
|
baseQueryType?: BaseQueryTypes | undefined;
|
|
3009
|
+
apiName?: string | undefined;
|
|
3000
3010
|
}) => {
|
|
3001
3011
|
error: _reduxjs_toolkit_query.FetchBaseQueryError;
|
|
3002
3012
|
data?: undefined;
|
|
@@ -3026,19 +3036,28 @@ declare const toastMessagesReducer: Reducer<ToastState>;
|
|
|
3026
3036
|
declare type OrchestratorConfigSlice = Slice<OrchestratorConfig>;
|
|
3027
3037
|
declare const getOrchestratorConfigSlice: (config: OrchestratorConfig) => OrchestratorConfigSlice;
|
|
3028
3038
|
|
|
3039
|
+
declare type CustomApiConfig = {
|
|
3040
|
+
apiName: string;
|
|
3041
|
+
apiBaseUrl: string;
|
|
3042
|
+
};
|
|
3043
|
+
declare type CustomApiSlice = Slice<CustomApiConfig[]>;
|
|
3044
|
+
declare const getCustomApiSlice: (customApis: CustomApiConfig[]) => CustomApiSlice;
|
|
3045
|
+
|
|
3029
3046
|
declare type RootState = {
|
|
3030
3047
|
orchestratorApi: CombinedState<Record<string, never>, 'engineStatus', 'orchestratorApi'>;
|
|
3031
3048
|
toastMessages: ReturnType<typeof toastMessagesReducer>;
|
|
3032
3049
|
orchestratorConfig: OrchestratorConfig;
|
|
3050
|
+
customApis: CustomApiConfig[];
|
|
3033
3051
|
};
|
|
3034
|
-
declare const getOrchestratorStore: (orchestratorConfig: OrchestratorConfig) => EnhancedStore<RootState>;
|
|
3052
|
+
declare const getOrchestratorStore: (orchestratorConfig: OrchestratorConfig, customApis: CustomApiConfig[]) => EnhancedStore<RootState>;
|
|
3035
3053
|
declare type AppDispatch = Dispatch<UnknownAction>;
|
|
3036
3054
|
|
|
3037
3055
|
declare type StoreProviderProps = {
|
|
3038
3056
|
initialOrchestratorConfig: OrchestratorConfig;
|
|
3057
|
+
customApis?: CustomApiConfig[];
|
|
3039
3058
|
children: ReactNode;
|
|
3040
3059
|
};
|
|
3041
|
-
declare const StoreProvider: ({ initialOrchestratorConfig, children, }: StoreProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3060
|
+
declare const StoreProvider: ({ initialOrchestratorConfig, customApis, children, }: StoreProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3042
3061
|
|
|
3043
3062
|
declare const defaultOrchestratorTheme: EuiThemeModifications;
|
|
3044
3063
|
|
|
@@ -3083,4 +3102,4 @@ declare const getQueryVariablesForExport: <T extends object>(queryVariables: Gra
|
|
|
3083
3102
|
|
|
3084
3103
|
declare const onlyUnique: (value: string, index: number, array: string[]) => boolean;
|
|
3085
3104
|
|
|
3086
|
-
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 };
|
|
3105
|
+
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 CustomApiConfig, 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 FetchFilter, 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, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getApiClient, getCurrentBrowserLocale, getCustomApiSlice, 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, prepareHeaders, 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
|
@@ -40407,19 +40407,23 @@ var prepareHeaders = (headers) => __async(void 0, null, function* () {
|
|
|
40407
40407
|
var orchestratorApi = createApi2({
|
|
40408
40408
|
reducerPath: "orchestratorApi",
|
|
40409
40409
|
baseQuery: (args, api, extraOptions) => {
|
|
40410
|
-
|
|
40410
|
+
var _a;
|
|
40411
|
+
const { baseQueryType, apiName } = extraOptions || {};
|
|
40411
40412
|
const state = api.getState();
|
|
40412
40413
|
const { orchestratorApiBaseUrl, graphqlEndpointCore } = state.orchestratorConfig;
|
|
40414
|
+
const customApi = (_a = state.customApis) == null ? void 0 : _a.find(
|
|
40415
|
+
(query) => query.apiName === apiName
|
|
40416
|
+
);
|
|
40413
40417
|
switch (baseQueryType) {
|
|
40414
40418
|
case "fetch" /* fetch */:
|
|
40415
40419
|
const fetchFn = fetchBaseQuery({
|
|
40416
|
-
baseUrl: orchestratorApiBaseUrl,
|
|
40420
|
+
baseUrl: customApi ? customApi.apiBaseUrl : orchestratorApiBaseUrl,
|
|
40417
40421
|
prepareHeaders
|
|
40418
40422
|
});
|
|
40419
40423
|
return fetchFn(args, api, {});
|
|
40420
40424
|
default:
|
|
40421
40425
|
const graphqlFn = graphqlRequestBaseQuery({
|
|
40422
|
-
url: graphqlEndpointCore,
|
|
40426
|
+
url: customApi ? customApi.apiBaseUrl : graphqlEndpointCore,
|
|
40423
40427
|
prepareHeaders
|
|
40424
40428
|
});
|
|
40425
40429
|
return graphqlFn(args, api, {});
|
|
@@ -42883,8 +42887,8 @@ var WfoWarningTriangle = ({
|
|
|
42883
42887
|
/* @__PURE__ */ jsx41("g", { id: "Symbols", stroke: color, strokeWidth: "1.5", fill: "none", children: /* @__PURE__ */ jsx41("g", { id: "icon/exclamation-triangle", fill: "none", children: /* @__PURE__ */ jsx41(
|
|
42884
42888
|
"path",
|
|
42885
42889
|
{
|
|
42886
|
-
|
|
42887
|
-
|
|
42890
|
+
strokeLinecap: "round",
|
|
42891
|
+
strokeLinejoin: "round",
|
|
42888
42892
|
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"
|
|
42889
42893
|
}
|
|
42890
42894
|
) }) })
|
|
@@ -43007,14 +43011,25 @@ var getOrchestratorConfigSlice = (config) => {
|
|
|
43007
43011
|
});
|
|
43008
43012
|
};
|
|
43009
43013
|
|
|
43014
|
+
// src/rtk/slices/customApis.ts
|
|
43015
|
+
var getCustomApiSlice = (customApis) => {
|
|
43016
|
+
return createSlice({
|
|
43017
|
+
name: "customApis",
|
|
43018
|
+
initialState: customApis,
|
|
43019
|
+
reducers: {}
|
|
43020
|
+
});
|
|
43021
|
+
};
|
|
43022
|
+
|
|
43010
43023
|
// src/rtk/store.ts
|
|
43011
|
-
var getOrchestratorStore = (orchestratorConfig) => {
|
|
43024
|
+
var getOrchestratorStore = (orchestratorConfig, customApis) => {
|
|
43012
43025
|
const configSlice = getOrchestratorConfigSlice(orchestratorConfig);
|
|
43026
|
+
const customApisSlice = getCustomApiSlice(customApis);
|
|
43013
43027
|
const orchestratorStore = configureStore({
|
|
43014
43028
|
reducer: {
|
|
43015
43029
|
[orchestratorApi.reducerPath]: orchestratorApi.reducer,
|
|
43016
43030
|
toastMessages: toastMessagesReducer,
|
|
43017
|
-
orchestratorConfig: configSlice.reducer
|
|
43031
|
+
orchestratorConfig: configSlice.reducer,
|
|
43032
|
+
customApis: customApisSlice == null ? void 0 : customApisSlice.reducer
|
|
43018
43033
|
},
|
|
43019
43034
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(orchestratorApi.middleware)
|
|
43020
43035
|
});
|
|
@@ -43027,9 +43042,10 @@ import { Provider as Provider2 } from "react-redux";
|
|
|
43027
43042
|
import { jsx as jsx45 } from "@emotion/react/jsx-runtime";
|
|
43028
43043
|
var StoreProvider = ({
|
|
43029
43044
|
initialOrchestratorConfig,
|
|
43045
|
+
customApis = [],
|
|
43030
43046
|
children
|
|
43031
43047
|
}) => {
|
|
43032
|
-
const store = getOrchestratorStore(initialOrchestratorConfig);
|
|
43048
|
+
const store = getOrchestratorStore(initialOrchestratorConfig, customApis);
|
|
43033
43049
|
const [orchestratorStore] = useState5(store);
|
|
43034
43050
|
return /* @__PURE__ */ jsx45(Provider2, { store: orchestratorStore, children });
|
|
43035
43051
|
};
|
|
@@ -59498,11 +59514,13 @@ export {
|
|
|
59498
59514
|
defaultTasksListTabs,
|
|
59499
59515
|
determineNewSortOrder,
|
|
59500
59516
|
determinePageIndex,
|
|
59517
|
+
filterDataByCriteria,
|
|
59501
59518
|
flattenArrayProps,
|
|
59502
59519
|
formatDate,
|
|
59503
59520
|
formatDateCetWithUtc,
|
|
59504
59521
|
getApiClient,
|
|
59505
59522
|
getCurrentBrowserLocale,
|
|
59523
|
+
getCustomApiSlice,
|
|
59506
59524
|
getDataSortHandler,
|
|
59507
59525
|
getDate,
|
|
59508
59526
|
getFieldFromProductBlockInstanceValues,
|
|
@@ -59547,6 +59565,7 @@ export {
|
|
|
59547
59565
|
parseDateToLocaleDateTimeString,
|
|
59548
59566
|
parseDateToLocaleTimeString,
|
|
59549
59567
|
parseIsoString,
|
|
59568
|
+
prepareHeaders,
|
|
59550
59569
|
processListQuery,
|
|
59551
59570
|
removeSuffix,
|
|
59552
59571
|
removeToastMessage,
|
package/package.json
CHANGED
|
@@ -18,8 +18,8 @@ export const WfoWarningTriangle: FC<WfoIconProps> = ({
|
|
|
18
18
|
<g id="Symbols" stroke={color} strokeWidth="1.5" fill="none">
|
|
19
19
|
<g id="icon/exclamation-triangle" fill="none">
|
|
20
20
|
<path
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
strokeLinejoin="round"
|
|
23
23
|
d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"
|
|
24
24
|
/>
|
|
25
25
|
</g>
|
package/src/rtk/api.ts
CHANGED
|
@@ -21,9 +21,10 @@ export enum CacheTags {
|
|
|
21
21
|
|
|
22
22
|
type ExtraOptions = {
|
|
23
23
|
baseQueryType?: BaseQueryTypes;
|
|
24
|
+
apiName?: string;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
const prepareHeaders = async (headers: Headers) => {
|
|
27
|
+
export const prepareHeaders = async (headers: Headers) => {
|
|
27
28
|
const session = (await getSession()) as WfoSession;
|
|
28
29
|
if (session?.accessToken) {
|
|
29
30
|
headers.set('Authorization', `Bearer ${session.accessToken}`);
|
|
@@ -34,22 +35,28 @@ const prepareHeaders = async (headers: Headers) => {
|
|
|
34
35
|
export const orchestratorApi = createApi({
|
|
35
36
|
reducerPath: 'orchestratorApi',
|
|
36
37
|
baseQuery: (args, api, extraOptions: ExtraOptions) => {
|
|
37
|
-
const { baseQueryType } = extraOptions || {};
|
|
38
|
+
const { baseQueryType, apiName } = extraOptions || {};
|
|
38
39
|
|
|
39
40
|
const state = api.getState() as RootState;
|
|
40
41
|
const { orchestratorApiBaseUrl, graphqlEndpointCore } =
|
|
41
42
|
state.orchestratorConfig;
|
|
42
43
|
|
|
44
|
+
const customApi = state.customApis?.find(
|
|
45
|
+
(query) => query.apiName === apiName,
|
|
46
|
+
);
|
|
47
|
+
|
|
43
48
|
switch (baseQueryType) {
|
|
44
49
|
case BaseQueryTypes.fetch:
|
|
45
50
|
const fetchFn = fetchBaseQuery({
|
|
46
|
-
baseUrl:
|
|
51
|
+
baseUrl: customApi
|
|
52
|
+
? customApi.apiBaseUrl
|
|
53
|
+
: orchestratorApiBaseUrl,
|
|
47
54
|
prepareHeaders,
|
|
48
55
|
});
|
|
49
56
|
return fetchFn(args, api, {});
|
|
50
57
|
default:
|
|
51
58
|
const graphqlFn = graphqlRequestBaseQuery({
|
|
52
|
-
url: graphqlEndpointCore,
|
|
59
|
+
url: customApi ? customApi.apiBaseUrl : graphqlEndpointCore,
|
|
53
60
|
prepareHeaders,
|
|
54
61
|
});
|
|
55
62
|
return graphqlFn(args, api, {});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import type { Slice } from '@reduxjs/toolkit';
|
|
3
|
+
|
|
4
|
+
export type CustomApiConfig = {
|
|
5
|
+
apiName: string;
|
|
6
|
+
apiBaseUrl: string;
|
|
7
|
+
};
|
|
8
|
+
type CustomApiSlice = Slice<CustomApiConfig[]>;
|
|
9
|
+
|
|
10
|
+
export const getCustomApiSlice = (
|
|
11
|
+
customApis: CustomApiConfig[],
|
|
12
|
+
): CustomApiSlice => {
|
|
13
|
+
return createSlice({
|
|
14
|
+
name: 'customApis',
|
|
15
|
+
initialState: customApis,
|
|
16
|
+
reducers: {},
|
|
17
|
+
});
|
|
18
|
+
};
|
package/src/rtk/slices/index.ts
CHANGED
package/src/rtk/store.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { EnhancedStore } from '@reduxjs/toolkit';
|
|
|
3
3
|
import type { Dispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
4
4
|
import { CombinedState } from '@reduxjs/toolkit/query';
|
|
5
5
|
|
|
6
|
+
import { CustomApiConfig, getCustomApiSlice } from '@/rtk/slices';
|
|
6
7
|
import type { OrchestratorConfig } from '@/types';
|
|
7
8
|
|
|
8
9
|
import { orchestratorApi } from './api';
|
|
@@ -16,18 +17,22 @@ export type RootState = {
|
|
|
16
17
|
>;
|
|
17
18
|
toastMessages: ReturnType<typeof toastMessagesReducer>;
|
|
18
19
|
orchestratorConfig: OrchestratorConfig;
|
|
20
|
+
customApis: CustomApiConfig[];
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const getOrchestratorStore = (
|
|
22
24
|
orchestratorConfig: OrchestratorConfig,
|
|
25
|
+
customApis: CustomApiConfig[],
|
|
23
26
|
): EnhancedStore<RootState> => {
|
|
24
27
|
const configSlice = getOrchestratorConfigSlice(orchestratorConfig);
|
|
28
|
+
const customApisSlice = getCustomApiSlice(customApis);
|
|
25
29
|
|
|
26
30
|
const orchestratorStore = configureStore({
|
|
27
31
|
reducer: {
|
|
28
32
|
[orchestratorApi.reducerPath]: orchestratorApi.reducer,
|
|
29
33
|
toastMessages: toastMessagesReducer,
|
|
30
34
|
orchestratorConfig: configSlice.reducer,
|
|
35
|
+
customApis: customApisSlice?.reducer,
|
|
31
36
|
},
|
|
32
37
|
middleware: (getDefaultMiddleware) =>
|
|
33
38
|
getDefaultMiddleware().concat(orchestratorApi.middleware),
|
|
@@ -2,20 +2,23 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { Provider } from 'react-redux';
|
|
4
4
|
|
|
5
|
+
import { CustomApiConfig } from '@/rtk/slices/customApis';
|
|
5
6
|
import type { OrchestratorConfig } from '@/types';
|
|
6
7
|
|
|
7
8
|
import { getOrchestratorStore } from './store';
|
|
8
9
|
|
|
9
10
|
export type StoreProviderProps = {
|
|
10
11
|
initialOrchestratorConfig: OrchestratorConfig;
|
|
12
|
+
customApis?: CustomApiConfig[];
|
|
11
13
|
children: ReactNode;
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
export const StoreProvider = ({
|
|
15
17
|
initialOrchestratorConfig,
|
|
18
|
+
customApis = [],
|
|
16
19
|
children,
|
|
17
20
|
}: StoreProviderProps) => {
|
|
18
|
-
const store = getOrchestratorStore(initialOrchestratorConfig);
|
|
21
|
+
const store = getOrchestratorStore(initialOrchestratorConfig, customApis);
|
|
19
22
|
const [orchestratorStore] = useState(store);
|
|
20
23
|
|
|
21
24
|
return <Provider store={orchestratorStore}>{children}</Provider>;
|