@orchestrator-ui/orchestrator-ui-components 2.14.1 → 2.15.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 +8 -8
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +14 -5
- package/dist/index.js +850 -827
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoForms/AutoFieldLoader.tsx +2 -0
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +3 -1
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +4 -1
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx +4 -6
- package/src/components/WfoTable/WfoTable/WfoExpandedRow.tsx +10 -2
- package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +7 -1
- package/src/components/WfoTable/WfoTable/index.ts +1 -0
- package/src/configuration/version.ts +1 -1
package/package.json
CHANGED
|
@@ -52,10 +52,12 @@ export type RelatedSubscriptionListItem = Pick<
|
|
|
52
52
|
|
|
53
53
|
interface WfoRelatedSubscriptionsProps {
|
|
54
54
|
subscriptionId: string;
|
|
55
|
+
subscriptionPath?: string;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
export const WfoRelatedSubscriptions = ({
|
|
58
59
|
subscriptionId,
|
|
60
|
+
subscriptionPath = PATH_SUBSCRIPTIONS,
|
|
59
61
|
}: WfoRelatedSubscriptionsProps) => {
|
|
60
62
|
const [hideTerminatedSubscriptions, setHideTerminatedSubscriptions] =
|
|
61
63
|
useState<boolean>(true);
|
|
@@ -109,7 +111,7 @@ export const WfoRelatedSubscriptions = ({
|
|
|
109
111
|
renderData: (value, record) => (
|
|
110
112
|
<Link
|
|
111
113
|
target="_blank"
|
|
112
|
-
href={`${
|
|
114
|
+
href={`${subscriptionPath}/${record.subscriptionId}`}
|
|
113
115
|
>
|
|
114
116
|
{value}
|
|
115
117
|
</Link>
|
|
@@ -4,7 +4,7 @@ import { useTranslations } from 'next-intl';
|
|
|
4
4
|
|
|
5
5
|
import { EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
|
|
6
6
|
|
|
7
|
-
import { WfoLoading, WfoTextAnchor } from '@/components';
|
|
7
|
+
import { PATH_SUBSCRIPTIONS, WfoLoading, WfoTextAnchor } from '@/components';
|
|
8
8
|
import { TreeContext, TreeContextType } from '@/contexts';
|
|
9
9
|
import { useOrchestratorTheme, useWithOrchestratorTheme } from '@/hooks';
|
|
10
10
|
import {
|
|
@@ -24,11 +24,13 @@ import { getProductBlockTitle } from './utils';
|
|
|
24
24
|
interface WfoSubscriptionDetailTreeProps {
|
|
25
25
|
productBlockInstances: ProductBlockInstance[];
|
|
26
26
|
subscriptionId: Subscription['subscriptionId'];
|
|
27
|
+
subscriptionPath?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export const WfoSubscriptionDetailTree = ({
|
|
30
31
|
productBlockInstances,
|
|
31
32
|
subscriptionId,
|
|
33
|
+
subscriptionPath = PATH_SUBSCRIPTIONS,
|
|
32
34
|
}: WfoSubscriptionDetailTreeProps) => {
|
|
33
35
|
const t = useTranslations('subscriptions.detail');
|
|
34
36
|
const { theme } = useOrchestratorTheme();
|
|
@@ -210,6 +212,7 @@ export const WfoSubscriptionDetailTree = ({
|
|
|
210
212
|
key={id}
|
|
211
213
|
subscriptionId={subscriptionId}
|
|
212
214
|
productBlock={block}
|
|
215
|
+
subscriptionPath={subscriptionPath}
|
|
213
216
|
/>
|
|
214
217
|
);
|
|
215
218
|
})}
|
package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx
CHANGED
|
@@ -13,11 +13,7 @@ import {
|
|
|
13
13
|
EuiText,
|
|
14
14
|
} from '@elastic/eui';
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
PATH_SUBSCRIPTIONS,
|
|
18
|
-
WfoProductBlockKeyValueRow,
|
|
19
|
-
WfoValueCell,
|
|
20
|
-
} from '@/components';
|
|
16
|
+
import { WfoProductBlockKeyValueRow, WfoValueCell } from '@/components';
|
|
21
17
|
import { useWithOrchestratorTheme } from '@/hooks';
|
|
22
18
|
import { ProductBlockInstance, Subscription } from '@/types';
|
|
23
19
|
import { getFirstUuidPart } from '@/utils';
|
|
@@ -32,6 +28,7 @@ import { getStyles } from './styles';
|
|
|
32
28
|
interface WfoSubscriptionProductBlockProps {
|
|
33
29
|
productBlock: ProductBlockInstance;
|
|
34
30
|
subscriptionId: Subscription['subscriptionId'];
|
|
31
|
+
subscriptionPath: string;
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
export const HIDDEN_KEYS = ['title', 'name', 'label', 'inUseByIds'];
|
|
@@ -39,6 +36,7 @@ export const HIDDEN_KEYS = ['title', 'name', 'label', 'inUseByIds'];
|
|
|
39
36
|
export const WfoSubscriptionProductBlock = ({
|
|
40
37
|
productBlock,
|
|
41
38
|
subscriptionId,
|
|
39
|
+
subscriptionPath,
|
|
42
40
|
}: WfoSubscriptionProductBlockProps) => {
|
|
43
41
|
const t = useTranslations('subscriptions.detail');
|
|
44
42
|
const {
|
|
@@ -139,7 +137,7 @@ export const WfoSubscriptionProductBlock = ({
|
|
|
139
137
|
value={
|
|
140
138
|
<>
|
|
141
139
|
<a
|
|
142
|
-
href={`${
|
|
140
|
+
href={`${subscriptionPath}/${ownerSubscriptionId}`}
|
|
143
141
|
target="_blank"
|
|
144
142
|
>
|
|
145
143
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { Fragment, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
import { WfoTableProps } from './WfoTable';
|
|
4
4
|
|
|
@@ -29,5 +29,13 @@ export const WfoExpandedRow = <T extends object>({
|
|
|
29
29
|
rowData[rowExpandingConfiguration.uniqueRowId] as string
|
|
30
30
|
).toLowerCase(),
|
|
31
31
|
)
|
|
32
|
-
.map(([, expandedRowComponent]) =>
|
|
32
|
+
.map(([, expandedRowComponent], index) => (
|
|
33
|
+
<Fragment
|
|
34
|
+
key={`${index}-${
|
|
35
|
+
rowData[rowExpandingConfiguration.uniqueRowId]
|
|
36
|
+
}`}
|
|
37
|
+
>
|
|
38
|
+
{expandedRowComponent}
|
|
39
|
+
</Fragment>
|
|
40
|
+
));
|
|
33
41
|
};
|
|
@@ -20,6 +20,10 @@ export type WfoTableDataRowsProps<T extends object> = Pick<
|
|
|
20
20
|
| 'className'
|
|
21
21
|
>;
|
|
22
22
|
|
|
23
|
+
export const DATA_ROW_CLASS = 'data-row';
|
|
24
|
+
export const CONTROL_CELL_CLASS = 'control-cell';
|
|
25
|
+
export const DATA_CELL_CLASS = 'data-cell';
|
|
26
|
+
|
|
23
27
|
export const WfoTableDataRows = <T extends object>({
|
|
24
28
|
data,
|
|
25
29
|
columnConfig,
|
|
@@ -49,7 +53,7 @@ export const WfoTableDataRows = <T extends object>({
|
|
|
49
53
|
{data.map((row, index) => (
|
|
50
54
|
<Fragment key={`table-data-row-${index}`}>
|
|
51
55
|
<tr
|
|
52
|
-
className={className}
|
|
56
|
+
className={`${className} ${DATA_ROW_CLASS}`}
|
|
53
57
|
css={[
|
|
54
58
|
rowStyle,
|
|
55
59
|
dataRowStyle,
|
|
@@ -63,6 +67,7 @@ export const WfoTableDataRows = <T extends object>({
|
|
|
63
67
|
) {
|
|
64
68
|
return (
|
|
65
69
|
<td
|
|
70
|
+
className={CONTROL_CELL_CLASS}
|
|
66
71
|
colSpan={
|
|
67
72
|
columnConfig.numberOfColumnsToSpan ??
|
|
68
73
|
1
|
|
@@ -88,6 +93,7 @@ export const WfoTableDataRows = <T extends object>({
|
|
|
88
93
|
const result = row[key as keyof T];
|
|
89
94
|
return (
|
|
90
95
|
<td
|
|
96
|
+
className={DATA_CELL_CLASS}
|
|
91
97
|
key={key}
|
|
92
98
|
css={[
|
|
93
99
|
...toOptionalArrayEntry(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.15.0';
|