@orchestrator-ui/orchestrator-ui-components 2.5.0 → 2.6.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 +6 -6
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +9 -9
- package/CHANGELOG.md +10 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoProductBlockKeyValueRow.tsx +5 -5
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx +3 -2
- package/src/components/WfoSubscription/overrides/useSubscriptionDetailValueOverride.ts +2 -2
- package/src/configuration/version.ts +1 -1
- package/src/rtk/slices/orchestratorComponentOverride.ts +4 -2
- package/src/types/types.ts +7 -0
package/package.json
CHANGED
package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoProductBlockKeyValueRow.tsx
CHANGED
|
@@ -4,13 +4,13 @@ import { EuiBadge } from '@elastic/eui';
|
|
|
4
4
|
|
|
5
5
|
import { useSubscriptionDetailValueOverride } from '@/components';
|
|
6
6
|
import { useWithOrchestratorTheme } from '@/hooks';
|
|
7
|
-
import { FieldValue } from '@/types';
|
|
7
|
+
import { FieldValue, RenderableFieldValue } from '@/types';
|
|
8
8
|
import { camelToHuman } from '@/utils';
|
|
9
9
|
|
|
10
10
|
import { getStyles } from './styles';
|
|
11
11
|
|
|
12
12
|
export type WfoProductBlockKeyValueRowProps = {
|
|
13
|
-
fieldValue: FieldValue;
|
|
13
|
+
fieldValue: FieldValue | RenderableFieldValue;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const WfoProductBlockKeyValueRow: FC<
|
|
@@ -21,9 +21,9 @@ export const WfoProductBlockKeyValueRow: FC<
|
|
|
21
21
|
|
|
22
22
|
const { field, value } = fieldValue;
|
|
23
23
|
|
|
24
|
-
const WfoProductBlockValue: FC<{
|
|
25
|
-
value
|
|
26
|
-
}) => {
|
|
24
|
+
const WfoProductBlockValue: FC<{
|
|
25
|
+
value: RenderableFieldValue['value'];
|
|
26
|
+
}> = ({ value }) => {
|
|
27
27
|
if (typeof value === 'boolean') {
|
|
28
28
|
return <EuiBadge>{value.toString()}</EuiBadge>;
|
|
29
29
|
} else if (Array.isArray(value)) {
|
package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx
CHANGED
|
@@ -229,9 +229,10 @@ export const WfoSubscriptionProductBlock = ({
|
|
|
229
229
|
.map((productBlockInstanceValue, index) => {
|
|
230
230
|
if (
|
|
231
231
|
productBlockInstanceValue &&
|
|
232
|
-
!isEmpty(
|
|
232
|
+
(!isEmpty(
|
|
233
233
|
productBlockInstanceValue.value,
|
|
234
|
-
)
|
|
234
|
+
) ||
|
|
235
|
+
showDetails)
|
|
235
236
|
) {
|
|
236
237
|
return (
|
|
237
238
|
<WfoProductBlockKeyValueRow
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { ValueOverrideFunction } from '@/rtk';
|
|
4
4
|
import { useAppSelector } from '@/rtk/hooks';
|
|
5
|
-
import { FieldValue } from '@/types';
|
|
5
|
+
import { FieldValue, RenderableFieldValue } from '@/types';
|
|
6
6
|
|
|
7
7
|
export const useSubscriptionDetailValueOverride = () => {
|
|
8
8
|
const valueOverrideConfiguration = useAppSelector(
|
|
@@ -12,7 +12,7 @@ export const useSubscriptionDetailValueOverride = () => {
|
|
|
12
12
|
);
|
|
13
13
|
|
|
14
14
|
const getOverriddenValue = (
|
|
15
|
-
fieldValue: FieldValue,
|
|
15
|
+
fieldValue: FieldValue | RenderableFieldValue,
|
|
16
16
|
): React.ReactNode | null => {
|
|
17
17
|
if (!valueOverrideConfiguration) {
|
|
18
18
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.6.0';
|
|
@@ -2,9 +2,11 @@ import { ReactElement, ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { Slice, createSlice } from '@reduxjs/toolkit';
|
|
4
4
|
|
|
5
|
-
import { FieldValue, SubscriptionDetail } from '@/types';
|
|
5
|
+
import { FieldValue, RenderableFieldValue, SubscriptionDetail } from '@/types';
|
|
6
6
|
|
|
7
|
-
export type ValueOverrideFunction = (
|
|
7
|
+
export type ValueOverrideFunction = (
|
|
8
|
+
fieldValue: FieldValue | RenderableFieldValue,
|
|
9
|
+
) => ReactNode;
|
|
8
10
|
export type ValueOverrideConfiguration = Record<string, ValueOverrideFunction>;
|
|
9
11
|
|
|
10
12
|
export type WfoSubscriptionDetailGeneralConfiguration = {
|
package/src/types/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
1
3
|
import { Toast } from '@elastic/eui/src/components/toast/global_toast_list';
|
|
2
4
|
|
|
3
5
|
import { InputForm } from './forms';
|
|
@@ -11,6 +13,11 @@ export type FieldValue = {
|
|
|
11
13
|
value: string | number | boolean | null;
|
|
12
14
|
};
|
|
13
15
|
|
|
16
|
+
export type RenderableFieldValue = {
|
|
17
|
+
field: string;
|
|
18
|
+
value: FieldValue['value'] | ReactNode;
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
export enum EngineStatus {
|
|
15
22
|
RUNNING = 'RUNNING',
|
|
16
23
|
PAUSING = 'PAUSING',
|