@apicurio/common-ui-components 1.0.6 → 1.0.8
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/README.md +18 -21
- package/dist/common/DateTime.d.ts +10 -0
- package/dist/common/FromNow.d.ts +5 -0
- package/dist/common/ObjectDropdown.d.ts +2 -0
- package/dist/common/ToggleIcon.d.ts +9 -0
- package/dist/common/index.d.ts +3 -0
- package/dist/main.js +366 -425
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Apicurio Common UI Components
|
|
2
|
+
This library contains some React + Patternfly UI components that are used across multiple Apicurio
|
|
3
|
+
UI projects.
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
## Building
|
|
6
|
+
Use standard Node/NPM tooling to build the code in this library.
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
8
|
+
```
|
|
9
|
+
npm install
|
|
10
|
+
npm run lint
|
|
11
|
+
npm run build
|
|
12
|
+
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Developing
|
|
15
|
+
This library includes a demo application that showcases the components it provides, and allows easy
|
|
16
|
+
iterative development.
|
|
15
17
|
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
18
|
+
```
|
|
19
|
+
npm install
|
|
20
|
+
npm run dev
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
23
|
+
Once running, open your browser to the URL indicated by the output of `npm run dev`. You will
|
|
24
|
+
see the showcase application.
|
|
@@ -9,6 +9,8 @@ export type ObjectDropdownProps = {
|
|
|
9
9
|
onSelect: (value: any | undefined) => void;
|
|
10
10
|
itemToString: (value: any) => string;
|
|
11
11
|
itemIsDivider?: (value: any) => boolean;
|
|
12
|
+
itemIsVisible?: (value: any) => boolean;
|
|
13
|
+
itemIsDisabled?: (value: any) => boolean;
|
|
12
14
|
itemToTestId?: (value: any) => string;
|
|
13
15
|
noSelectionLabel?: string;
|
|
14
16
|
menuAppendTo?: HTMLElement | (() => HTMLElement) | "inline";
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export * from "./DateTime";
|
|
2
|
+
export * from "./FromNow";
|
|
1
3
|
export * from "./If";
|
|
2
4
|
export * from "./IfNotEmpty";
|
|
3
5
|
export * from "./IfNotLoading";
|
|
4
6
|
export * from "./ListWithToolbar";
|
|
5
7
|
export * from "./ObjectDropdown";
|
|
6
8
|
export * from "./ObjectSelect";
|
|
9
|
+
export * from "./ToggleIcon";
|
|
7
10
|
export * from "./UrlUpload";
|
package/dist/main.js
CHANGED
|
@@ -1,179 +1,194 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import p, { useState as v, useEffect as te, memo as V, forwardRef as F, useCallback as q, useMemo as J } from "react";
|
|
3
|
+
import { DateTime as j } from "luxon";
|
|
4
|
+
import { EmptyState as ne, EmptyStateVariant as ve, EmptyStateHeader as ie, EmptyStateBody as be, Spinner as x, Alert as pe, Dropdown as Te, MenuToggle as $, DropdownList as Ie, Divider as oe, DropdownItem as ye, Select as B, SelectOption as U, TextInput as Se, Button as Q, TextArea as Ce, AboutModal as Ne, TextContent as we, Text as X, TextVariants as Y, TextList as Z, TextListItem as f, Modal as le, Progress as De, EmptyStateIcon as Oe, Pagination as Fe, PaginationVariant as Le, Skeleton as _e, SearchInput as xe, SelectList as $e, ToolbarItem as ke, InputGroup as Re, ToolbarToggleGroup as Pe, ToolbarGroup as Ae, ToolbarFilter as Ee } from "@patternfly/react-core";
|
|
5
|
+
import { EllipsisVIcon as Me, ChevronDownIcon as je, ChevronRightIcon as He, FilterIcon as ae } from "@patternfly/react-icons";
|
|
6
|
+
import { Tr as L, Td as G, Th as We, Table as Ve, Thead as Be, Tbody as Ue, ActionsColumn as Ge } from "@patternfly/react-table";
|
|
7
|
+
import ze from "use-resize-observer";
|
|
8
|
+
const Ke = (e) => {
|
|
9
|
+
const [n, i] = v(null), o = e.format || "locale";
|
|
10
|
+
return te(() => {
|
|
11
|
+
let a;
|
|
12
|
+
if (e.date && typeof e.date == "string" ? a = j.fromISO(e.date) : e.date && typeof e.date == "object" && (a = j.fromJSDate(e.date)), a) {
|
|
13
|
+
const r = {
|
|
14
|
+
locale: e.locale
|
|
15
|
+
};
|
|
16
|
+
i(o === "fromNow" ? a.toRelative() : o === "locale" ? a.toLocaleString(j.DATETIME_FULL, r) : a.toFormat(o, r));
|
|
17
|
+
} else
|
|
18
|
+
i(null);
|
|
19
|
+
}, [e.date]), /* @__PURE__ */ t("span", { children: n || "" });
|
|
20
|
+
}, lt = (e) => /* @__PURE__ */ t(Ke, { date: e.date, format: "fromNow" }), y = ({ condition: e, children: n }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ t(p.Fragment, { children: n }) : /* @__PURE__ */ t(p.Fragment, {}), at = ({ collection: e, emptyState: n, emptyStateTitle: i, emptyStateMessage: o, children: a }) => {
|
|
21
|
+
const r = () => !e || e.length === 0, c = n || /* @__PURE__ */ u(ne, { variant: ve.xs, children: [
|
|
22
|
+
/* @__PURE__ */ t(ie, { titleText: i || "None found", headingLevel: "h4" }),
|
|
23
|
+
/* @__PURE__ */ t(be, { children: o || "No items found." })
|
|
10
24
|
] });
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ t(
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
-
/* @__PURE__ */ t(
|
|
23
|
-
/* @__PURE__ */ t(
|
|
25
|
+
return r() ? /* @__PURE__ */ t(p.Fragment, { children: c }) : /* @__PURE__ */ t(p.Fragment, { children: a });
|
|
26
|
+
}, _ = ({ isLoading: e, loadingComponent: n, children: i }) => {
|
|
27
|
+
const o = () => typeof e == "boolean" ? e : e(), a = n || /* @__PURE__ */ t(x, {});
|
|
28
|
+
return o() ? /* @__PURE__ */ t(p.Fragment, { children: a }) : /* @__PURE__ */ t(p.Fragment, { children: i });
|
|
29
|
+
}, rt = ({ toolbar: e, alwaysShowToolbar: n, emptyState: i, filteredEmptyState: o, isLoading: a, isError: r, loadingComponent: c, errorComponent: l, isEmpty: s, isFiltered: d, children: g }) => {
|
|
30
|
+
const T = n || !s || d || r;
|
|
31
|
+
return l || (l = /* @__PURE__ */ t("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ t(pe, { isInline: !0, variant: "danger", title: "Error: Something went wrong!", children: /* @__PURE__ */ t("p", { children: "Something went wrong with the action you attempted, but we're not sure what it was. Try reloading the page and hopef for a better result, or contact your admin to report the error." }) }) })), /* @__PURE__ */ u(p.Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ t(y, { condition: T, children: e }),
|
|
33
|
+
/* @__PURE__ */ u(_, { isLoading: a, loadingComponent: c, children: [
|
|
34
|
+
/* @__PURE__ */ t(y, { condition: !s && !r, children: g }),
|
|
35
|
+
/* @__PURE__ */ t(y, { condition: s && d && !r, children: o }),
|
|
36
|
+
/* @__PURE__ */ t(y, { condition: s && !d && !r, children: i }),
|
|
37
|
+
/* @__PURE__ */ t(y, { condition: r, children: l })
|
|
24
38
|
] })
|
|
25
39
|
] });
|
|
26
|
-
},
|
|
27
|
-
const [n, i] = v(!1),
|
|
40
|
+
}, ct = (e) => {
|
|
41
|
+
const [n, i] = v(!1), o = (s, d) => {
|
|
28
42
|
i(!1);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
},
|
|
43
|
+
const g = d;
|
|
44
|
+
g !== void 0 && g >= 0 ? e.onSelect(e.items[g]) : e.onSelect(void 0);
|
|
45
|
+
}, a = () => {
|
|
32
46
|
i(!n);
|
|
33
|
-
},
|
|
34
|
-
let
|
|
35
|
-
return e.itemToTestId !== void 0 && (
|
|
36
|
-
},
|
|
47
|
+
}, r = (s) => {
|
|
48
|
+
let d;
|
|
49
|
+
return e.itemToTestId !== void 0 && (d = e.itemToTestId(s)), d;
|
|
50
|
+
}, c = e.popperProps || {
|
|
37
51
|
appendTo: e.menuAppendTo
|
|
38
52
|
};
|
|
39
|
-
let
|
|
40
|
-
return e.isKebab || (
|
|
41
|
-
|
|
53
|
+
let l = /* @__PURE__ */ t(Me, { title: e.label });
|
|
54
|
+
return e.isKebab || (l = /* @__PURE__ */ t(p.Fragment, { children: e.label })), /* @__PURE__ */ t(
|
|
55
|
+
Te,
|
|
42
56
|
{
|
|
43
57
|
isOpen: n,
|
|
44
|
-
onSelect:
|
|
45
|
-
onOpenChange: (
|
|
46
|
-
toggle: (
|
|
47
|
-
|
|
58
|
+
onSelect: o,
|
|
59
|
+
onOpenChange: (s) => i(s),
|
|
60
|
+
toggle: (s) => /* @__PURE__ */ t(
|
|
61
|
+
$,
|
|
48
62
|
{
|
|
49
63
|
"data-testid": e.testId,
|
|
50
|
-
ref:
|
|
51
|
-
onClick:
|
|
64
|
+
ref: s,
|
|
65
|
+
onClick: a,
|
|
52
66
|
isExpanded: n,
|
|
53
67
|
variant: e.isKebab ? "plain" : "default",
|
|
54
|
-
children:
|
|
68
|
+
children: l
|
|
55
69
|
}
|
|
56
70
|
),
|
|
57
71
|
ouiaId: "ObjectDropdown",
|
|
58
|
-
popperProps:
|
|
72
|
+
popperProps: c,
|
|
59
73
|
shouldFocusToggleOnSelect: !0,
|
|
60
|
-
children: /* @__PURE__ */ t(Ie, { children: e.items.map((
|
|
74
|
+
children: /* @__PURE__ */ t(Ie, { children: e.items.map((s, d) => e.itemIsVisible !== void 0 && !e.itemIsVisible(s) ? /* @__PURE__ */ t(W, {}) : e.itemIsDivider && e.itemIsDivider(s) ? /* @__PURE__ */ t(oe, { component: "li" }, `divider-${d}`) : /* @__PURE__ */ t(
|
|
61
75
|
ye,
|
|
62
76
|
{
|
|
63
|
-
value:
|
|
64
|
-
|
|
65
|
-
|
|
77
|
+
value: d,
|
|
78
|
+
isDisabled: e.itemIsDisabled === void 0 ? !1 : e.itemIsDisabled(s),
|
|
79
|
+
component: (g) => /* @__PURE__ */ t("button", { ...g, "data-testid": r(s) }),
|
|
80
|
+
children: e.itemToString(s)
|
|
66
81
|
},
|
|
67
|
-
`action-${
|
|
82
|
+
`action-${d}`
|
|
68
83
|
)) })
|
|
69
84
|
}
|
|
70
85
|
);
|
|
71
|
-
},
|
|
72
|
-
var
|
|
73
|
-
const [n, i] = v(!1),
|
|
74
|
-
i(!1), e.onSelect(e.items[
|
|
75
|
-
},
|
|
86
|
+
}, st = (e) => {
|
|
87
|
+
var l;
|
|
88
|
+
const [n, i] = v(!1), o = (s, d) => {
|
|
89
|
+
i(!1), e.onSelect(e.items[d]);
|
|
90
|
+
}, a = () => {
|
|
76
91
|
i(!n);
|
|
77
|
-
},
|
|
78
|
-
let
|
|
79
|
-
return e.itemToTestId !== void 0 && (
|
|
92
|
+
}, r = (s) => {
|
|
93
|
+
let d;
|
|
94
|
+
return e.itemToTestId !== void 0 && (d = e.itemToTestId(s)), d;
|
|
80
95
|
};
|
|
81
96
|
return /* @__PURE__ */ t(
|
|
82
|
-
|
|
97
|
+
B,
|
|
83
98
|
{
|
|
84
|
-
toggle: (
|
|
85
|
-
|
|
99
|
+
toggle: (s) => /* @__PURE__ */ t(
|
|
100
|
+
$,
|
|
86
101
|
{
|
|
87
|
-
ref:
|
|
102
|
+
ref: s,
|
|
88
103
|
className: e.toggleClassname || "menu-toggle",
|
|
89
|
-
onClick:
|
|
104
|
+
onClick: a,
|
|
90
105
|
"data-testid": e.testId,
|
|
91
106
|
isExpanded: n,
|
|
92
107
|
children: e.value ? e.itemToString(e.value) : e.noSelectionLabel
|
|
93
108
|
}
|
|
94
109
|
),
|
|
95
110
|
id: e.toggleId,
|
|
96
|
-
onSelect:
|
|
111
|
+
onSelect: o,
|
|
97
112
|
onOpenChange: i,
|
|
98
113
|
isOpen: n,
|
|
99
|
-
children: (
|
|
100
|
-
|
|
114
|
+
children: (l = e.items) == null ? void 0 : l.map((s, d) => e.itemIsDivider && e.itemIsDivider(s) ? /* @__PURE__ */ t(oe, {}, d) : /* @__PURE__ */ t(
|
|
115
|
+
U,
|
|
101
116
|
{
|
|
102
|
-
isSelected:
|
|
103
|
-
component: (
|
|
104
|
-
value:
|
|
105
|
-
children: e.itemToString(
|
|
117
|
+
isSelected: s === e.value,
|
|
118
|
+
component: (g) => /* @__PURE__ */ t("button", { ...g, "data-testid": r(s) }),
|
|
119
|
+
value: d,
|
|
120
|
+
children: e.itemToString(s)
|
|
106
121
|
},
|
|
107
|
-
|
|
122
|
+
d
|
|
108
123
|
))
|
|
109
124
|
}
|
|
110
125
|
);
|
|
111
|
-
},
|
|
126
|
+
}, dt = ({ expanded: e, onClick: n }) => e ? /* @__PURE__ */ t(je, { onClick: n, style: { cursor: "pointer" } }) : /* @__PURE__ */ t(He, { onClick: n, style: { cursor: "pointer" } }), re = {
|
|
112
127
|
padding: "5px",
|
|
113
128
|
minHeight: "128px",
|
|
114
129
|
borderRight: 0,
|
|
115
130
|
borderLeft: 0,
|
|
116
131
|
borderBottom: "1px solid #666",
|
|
117
132
|
backgroundColor: "rgb(240, 240, 240)"
|
|
118
|
-
},
|
|
119
|
-
...
|
|
133
|
+
}, qe = {
|
|
134
|
+
...re,
|
|
120
135
|
color: "red",
|
|
121
136
|
overflow: "auto"
|
|
122
|
-
},
|
|
123
|
-
const [n, i] = v(""), [
|
|
124
|
-
i(
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}).catch((
|
|
129
|
-
|
|
137
|
+
}, ht = (e) => {
|
|
138
|
+
const [n, i] = v(""), [o, a] = v(""), [r, c] = v(!1), [l, s] = v(), d = (I, R) => {
|
|
139
|
+
i(R);
|
|
140
|
+
}, g = () => n != null && n.trim().length > 0, T = () => l != null && l.trim().length > 0, D = () => {
|
|
141
|
+
c(!0), e.onUrlFetch(n).then((I) => {
|
|
142
|
+
s(void 0), a(I), c(!1), e.onChange(I, n);
|
|
143
|
+
}).catch((I) => {
|
|
144
|
+
s(I.message), c(!1);
|
|
130
145
|
});
|
|
131
|
-
},
|
|
132
|
-
i(""),
|
|
133
|
-
},
|
|
134
|
-
/* @__PURE__ */ t(
|
|
146
|
+
}, C = () => {
|
|
147
|
+
i(""), a(""), e.onChange(void 0, void 0);
|
|
148
|
+
}, k = /* @__PURE__ */ u("div", { className: "url-upload-loading", style: re, children: [
|
|
149
|
+
/* @__PURE__ */ t(x, { size: "md", className: "spinner", style: { marginRight: "5px" } }),
|
|
135
150
|
/* @__PURE__ */ t("span", { className: "spinner-message", children: "Loading URL content" })
|
|
136
151
|
] });
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ u("div", { className: "url-upload", "data-testid": e.testId, children: [
|
|
153
|
+
/* @__PURE__ */ u("div", { className: "url-upload-flex", style: { display: "flex" }, children: [
|
|
139
154
|
/* @__PURE__ */ t("div", { className: "url-upload-url", style: { flexGrow: 1 }, children: /* @__PURE__ */ t(
|
|
140
|
-
|
|
155
|
+
Se,
|
|
141
156
|
{
|
|
142
157
|
"data-testid": `${e.testId}-input`,
|
|
143
158
|
value: n,
|
|
144
159
|
type: "text",
|
|
145
160
|
placeholder: e.urlPlaceholder,
|
|
146
161
|
id: e.id,
|
|
147
|
-
onChange:
|
|
162
|
+
onChange: d,
|
|
148
163
|
"aria-label": "url input"
|
|
149
164
|
}
|
|
150
165
|
) }),
|
|
151
|
-
/* @__PURE__ */ t("div", { className: "url-fetch-button", children: /* @__PURE__ */ t(
|
|
152
|
-
/* @__PURE__ */ t("div", { className: "url-clear-button", children: /* @__PURE__ */ t(
|
|
166
|
+
/* @__PURE__ */ t("div", { className: "url-fetch-button", children: /* @__PURE__ */ t(Q, { "data-testid": `${e.testId}-fetch`, variant: "control", isDisabled: !g(), onClick: D, children: "Fetch" }) }),
|
|
167
|
+
/* @__PURE__ */ t("div", { className: "url-clear-button", children: /* @__PURE__ */ t(Q, { "data-testid": `${e.testId}-clear`, variant: "control", isDisabled: !g(), onClick: C, children: "Clear" }) })
|
|
153
168
|
] }),
|
|
154
|
-
/* @__PURE__ */ t("div", { className: "url-upload-preview", children: /* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */ t(
|
|
169
|
+
/* @__PURE__ */ t("div", { className: "url-upload-preview", children: /* @__PURE__ */ u(_, { isLoading: r, loadingComponent: k, children: [
|
|
170
|
+
/* @__PURE__ */ t(y, { condition: T, children: /* @__PURE__ */ u("div", { className: "url-upload-error", style: qe, children: [
|
|
156
171
|
/* @__PURE__ */ t("div", { children: "Error getting content from URL." }),
|
|
157
|
-
/* @__PURE__ */ t("div", { children:
|
|
172
|
+
/* @__PURE__ */ t("div", { children: l })
|
|
158
173
|
] }) }),
|
|
159
|
-
/* @__PURE__ */ t(
|
|
160
|
-
|
|
174
|
+
/* @__PURE__ */ t(y, { condition: !T(), children: /* @__PURE__ */ t(
|
|
175
|
+
Ce,
|
|
161
176
|
{
|
|
162
177
|
"data-testid": `${e.testId}-preview`,
|
|
163
178
|
"aria-label": "url-content",
|
|
164
|
-
value:
|
|
179
|
+
value: o,
|
|
165
180
|
readOnly: !0,
|
|
166
181
|
style: { minHeight: "128px" }
|
|
167
182
|
}
|
|
168
183
|
) })
|
|
169
184
|
] }) })
|
|
170
185
|
] });
|
|
171
|
-
},
|
|
172
|
-
const [n, i] = v(), [
|
|
173
|
-
return
|
|
174
|
-
e.isOpen && (typeof e.frontendInfo == "function" ? e.frontendInfo().then(i) : i(e.frontendInfo), typeof e.backendInfo == "function" ? e.backendInfo().then(
|
|
186
|
+
}, mt = (e) => {
|
|
187
|
+
const [n, i] = v(), [o, a] = v(), r = (c) => typeof c == "string" ? c : c === void 0 ? "" : c.toDateString();
|
|
188
|
+
return te(() => {
|
|
189
|
+
e.isOpen && (typeof e.frontendInfo == "function" ? e.frontendInfo().then(i) : i(e.frontendInfo), typeof e.backendInfo == "function" ? e.backendInfo().then(a) : a(e.backendInfo));
|
|
175
190
|
}, [e.isOpen]), /* @__PURE__ */ t(
|
|
176
|
-
|
|
191
|
+
Ne,
|
|
177
192
|
{
|
|
178
193
|
className: "app-about-modal",
|
|
179
194
|
isOpen: e.isOpen,
|
|
@@ -182,34 +197,34 @@ const C = ({ condition: e, children: n }) => (typeof e == "boolean" ? e : e()) ?
|
|
|
182
197
|
brandImageSrc: e.brandImageSrc,
|
|
183
198
|
brandImageAlt: e.brandImageAlt,
|
|
184
199
|
"aria-label": e.brandImageAlt,
|
|
185
|
-
children: /* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */ t(
|
|
187
|
-
/* @__PURE__ */ t(
|
|
200
|
+
children: /* @__PURE__ */ u(we, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
|
|
201
|
+
/* @__PURE__ */ t(X, { component: Y.h2, children: "Web console info" }),
|
|
202
|
+
/* @__PURE__ */ t(_, { isLoading: n === void 0, children: /* @__PURE__ */ u(Z, { component: "dl", children: [
|
|
188
203
|
/* @__PURE__ */ t(f, { component: "dt", children: "Project" }),
|
|
189
204
|
/* @__PURE__ */ t(f, { component: "dd", children: /* @__PURE__ */ t("a", { href: n == null ? void 0 : n.url, target: "_blank", children: n == null ? void 0 : n.name }) }),
|
|
190
205
|
/* @__PURE__ */ t(f, { component: "dt", children: "Version" }),
|
|
191
206
|
/* @__PURE__ */ t(f, { component: "dd", children: n == null ? void 0 : n.version }),
|
|
192
207
|
/* @__PURE__ */ t(f, { component: "dt", children: "Built on" }),
|
|
193
|
-
/* @__PURE__ */ t(f, { component: "dd", children:
|
|
208
|
+
/* @__PURE__ */ t(f, { component: "dd", children: r(n == null ? void 0 : n.builtOn) }),
|
|
194
209
|
/* @__PURE__ */ t(f, { component: "dt", children: "Digest" }),
|
|
195
210
|
/* @__PURE__ */ t(f, { component: "dd", children: n == null ? void 0 : n.digest })
|
|
196
211
|
] }) }),
|
|
197
|
-
/* @__PURE__ */ t(
|
|
198
|
-
/* @__PURE__ */ t(
|
|
212
|
+
/* @__PURE__ */ t(X, { style: { marginTop: "40px" }, component: Y.h2, children: e.backendLabel }),
|
|
213
|
+
/* @__PURE__ */ t(_, { isLoading: o === void 0, children: /* @__PURE__ */ u(Z, { component: "dl", children: [
|
|
199
214
|
/* @__PURE__ */ t(f, { component: "dt", children: "Name" }),
|
|
200
|
-
/* @__PURE__ */ t(f, { component: "dd", children: (
|
|
215
|
+
/* @__PURE__ */ t(f, { component: "dd", children: (o == null ? void 0 : o.name) || "" }),
|
|
201
216
|
/* @__PURE__ */ t(f, { component: "dt", children: "Description" }),
|
|
202
|
-
/* @__PURE__ */ t(f, { component: "dd", children: (
|
|
217
|
+
/* @__PURE__ */ t(f, { component: "dd", children: (o == null ? void 0 : o.description) || "" }),
|
|
203
218
|
/* @__PURE__ */ t(f, { component: "dt", children: "Version" }),
|
|
204
|
-
/* @__PURE__ */ t(f, { component: "dd", children: (
|
|
219
|
+
/* @__PURE__ */ t(f, { component: "dd", children: (o == null ? void 0 : o.version) || "" }),
|
|
205
220
|
/* @__PURE__ */ t(f, { component: "dt", children: "Built on" }),
|
|
206
|
-
/* @__PURE__ */ t(f, { component: "dd", children:
|
|
221
|
+
/* @__PURE__ */ t(f, { component: "dd", children: r(o == null ? void 0 : o.builtOn) })
|
|
207
222
|
] }) })
|
|
208
223
|
] })
|
|
209
224
|
}
|
|
210
225
|
);
|
|
211
|
-
},
|
|
212
|
-
|
|
226
|
+
}, gt = (e) => /* @__PURE__ */ u(
|
|
227
|
+
le,
|
|
213
228
|
{
|
|
214
229
|
title: "Please Wait",
|
|
215
230
|
variant: "small",
|
|
@@ -220,12 +235,12 @@ const C = ({ condition: e, children: n }) => (typeof e == "boolean" ? e : e()) ?
|
|
|
220
235
|
"aria-label": "please-wait-modal",
|
|
221
236
|
style: { marginTop: "-15px" },
|
|
222
237
|
children: [
|
|
223
|
-
/* @__PURE__ */ t(
|
|
238
|
+
/* @__PURE__ */ t(x, { size: "md", className: "spinner" }),
|
|
224
239
|
/* @__PURE__ */ t("span", { className: "message", style: { fontSize: "15px", color: "#333", marginLeft: "10px" }, children: e.message })
|
|
225
240
|
]
|
|
226
241
|
}
|
|
227
|
-
),
|
|
228
|
-
|
|
242
|
+
), ut = (e) => /* @__PURE__ */ t(
|
|
243
|
+
le,
|
|
229
244
|
{
|
|
230
245
|
title: e.title,
|
|
231
246
|
variant: "small",
|
|
@@ -234,480 +249,403 @@ const C = ({ condition: e, children: n }) => (typeof e == "boolean" ? e : e()) ?
|
|
|
234
249
|
onClose: e.onClose,
|
|
235
250
|
className: "progress pf-m-redhat-font",
|
|
236
251
|
"aria-label": "progress-modal",
|
|
237
|
-
children: /* @__PURE__ */ t(
|
|
252
|
+
children: /* @__PURE__ */ t(De, { title: e.message, value: e.progress })
|
|
238
253
|
}
|
|
239
254
|
);
|
|
240
|
-
function
|
|
241
|
-
return /* @__PURE__ */ t(
|
|
242
|
-
|
|
255
|
+
function ft() {
|
|
256
|
+
return /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(
|
|
257
|
+
ie,
|
|
243
258
|
{
|
|
244
259
|
titleText: "Loading",
|
|
245
260
|
headingLevel: "h4",
|
|
246
|
-
icon: /* @__PURE__ */ t(
|
|
261
|
+
icon: /* @__PURE__ */ t(Oe, { icon: x })
|
|
247
262
|
}
|
|
248
263
|
) });
|
|
249
264
|
}
|
|
250
|
-
function
|
|
265
|
+
function vt({
|
|
251
266
|
itemCount: e,
|
|
252
267
|
page: n,
|
|
253
268
|
perPage: i,
|
|
254
|
-
isCompact:
|
|
255
|
-
onChange:
|
|
256
|
-
variant:
|
|
269
|
+
isCompact: o = !1,
|
|
270
|
+
onChange: a,
|
|
271
|
+
variant: r = Le.top
|
|
257
272
|
}) {
|
|
258
273
|
return /* @__PURE__ */ t(
|
|
259
|
-
|
|
274
|
+
Fe,
|
|
260
275
|
{
|
|
261
276
|
itemCount: e,
|
|
262
277
|
page: n,
|
|
263
278
|
perPage: i,
|
|
264
|
-
onSetPage: (
|
|
265
|
-
onPerPageSelect: (
|
|
266
|
-
variant:
|
|
267
|
-
isCompact:
|
|
279
|
+
onSetPage: (c, l) => a(l, i),
|
|
280
|
+
onPerPageSelect: (c, l) => a(1, l),
|
|
281
|
+
variant: r,
|
|
282
|
+
isCompact: o
|
|
268
283
|
}
|
|
269
284
|
);
|
|
270
285
|
}
|
|
271
|
-
function
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
d();
|
|
277
|
-
});
|
|
278
|
-
var d = L(function() {
|
|
279
|
-
var l = c.current, o = r.current, a = l || (o ? o instanceof Element ? o : o.current : null);
|
|
280
|
-
i.current && i.current.element === a && i.current.subscriber === e || (i.current && i.current.cleanup && i.current.cleanup(), i.current = {
|
|
281
|
-
element: a,
|
|
282
|
-
subscriber: e,
|
|
283
|
-
// Only calling the subscriber, if there's an actual element to report.
|
|
284
|
-
// Setting cleanup to undefined unless a subscriber returns one, as an existing cleanup function would've been just called.
|
|
285
|
-
cleanup: a ? e(a) : void 0
|
|
286
|
-
});
|
|
287
|
-
}, [e]);
|
|
288
|
-
return D(function() {
|
|
289
|
-
return function() {
|
|
290
|
-
i.current && i.current.cleanup && (i.current.cleanup(), i.current = null);
|
|
291
|
-
};
|
|
292
|
-
}, []), L(function(l) {
|
|
293
|
-
c.current = l, d();
|
|
294
|
-
}, [d]);
|
|
295
|
-
}
|
|
296
|
-
function te(e, n, i) {
|
|
297
|
-
return e[n] ? e[n][0] ? e[n][0][i] : (
|
|
298
|
-
// TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's current
|
|
299
|
-
// behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.
|
|
300
|
-
// @ts-ignore
|
|
301
|
-
e[n][i]
|
|
302
|
-
) : n === "contentBoxSize" ? e.contentRect[i === "inlineSize" ? "width" : "height"] : void 0;
|
|
303
|
-
}
|
|
304
|
-
function Ke(e) {
|
|
305
|
-
e === void 0 && (e = {});
|
|
306
|
-
var n = e.onResize, i = w(void 0);
|
|
307
|
-
i.current = n;
|
|
308
|
-
var r = e.round || Math.round, c = w(), d = v({
|
|
309
|
-
width: void 0,
|
|
310
|
-
height: void 0
|
|
311
|
-
}), l = d[0], o = d[1], a = w(!1);
|
|
312
|
-
D(function() {
|
|
313
|
-
return a.current = !1, function() {
|
|
314
|
-
a.current = !0;
|
|
315
|
-
};
|
|
316
|
-
}, []);
|
|
317
|
-
var s = w({
|
|
318
|
-
width: void 0,
|
|
319
|
-
height: void 0
|
|
320
|
-
}), h = Ge(L(function(b) {
|
|
321
|
-
return (!c.current || c.current.box !== e.box || c.current.round !== r) && (c.current = {
|
|
322
|
-
box: e.box,
|
|
323
|
-
round: r,
|
|
324
|
-
instance: new ResizeObserver(function(x) {
|
|
325
|
-
var S = x[0], N = e.box === "border-box" ? "borderBoxSize" : e.box === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", p = te(S, N, "inlineSize"), O = te(S, N, "blockSize"), T = p ? r(p) : void 0, _ = O ? r(O) : void 0;
|
|
326
|
-
if (s.current.width !== T || s.current.height !== _) {
|
|
327
|
-
var R = {
|
|
328
|
-
width: T,
|
|
329
|
-
height: _
|
|
330
|
-
};
|
|
331
|
-
s.current.width = T, s.current.height = _, i.current ? i.current(R) : a.current || o(R);
|
|
332
|
-
}
|
|
333
|
-
})
|
|
334
|
-
}), c.current.instance.observe(b, {
|
|
335
|
-
box: e.box
|
|
336
|
-
}), function() {
|
|
337
|
-
c.current && c.current.instance.unobserve(b);
|
|
338
|
-
};
|
|
339
|
-
}, [e.box, r]), e.ref);
|
|
340
|
-
return j(function() {
|
|
341
|
-
return {
|
|
342
|
-
ref: h,
|
|
343
|
-
width: l.width,
|
|
344
|
-
height: l.height
|
|
345
|
-
};
|
|
346
|
-
}, [h, l.width, l.height]);
|
|
347
|
-
}
|
|
348
|
-
function qe({ columns: e, rows: n, getTd: i = () => q }) {
|
|
349
|
-
const r = new Array(e).fill(0).map((d, l) => {
|
|
350
|
-
const o = i(l);
|
|
351
|
-
return /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(
|
|
352
|
-
Fe,
|
|
286
|
+
function Je({ columns: e, rows: n, getTd: i = () => G }) {
|
|
287
|
+
const o = new Array(e).fill(0).map((r, c) => {
|
|
288
|
+
const l = i(c);
|
|
289
|
+
return /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
|
|
290
|
+
_e,
|
|
353
291
|
{
|
|
354
|
-
screenreaderText:
|
|
292
|
+
screenreaderText: c === 0 ? "Loading data" : void 0
|
|
355
293
|
}
|
|
356
|
-
) }, `cell_${
|
|
357
|
-
}),
|
|
358
|
-
return /* @__PURE__ */ t(
|
|
294
|
+
) }, `cell_${c}`);
|
|
295
|
+
}), a = new Array(n).fill(0).map((r, c) => /* @__PURE__ */ t(L, { children: o }, `row_${c}`));
|
|
296
|
+
return /* @__PURE__ */ t(W, { children: a });
|
|
359
297
|
}
|
|
360
|
-
const
|
|
298
|
+
const bt = ({
|
|
361
299
|
ariaLabel: e,
|
|
362
300
|
minimumColumnWidth: n = 250,
|
|
363
301
|
columns: i,
|
|
364
|
-
data:
|
|
365
|
-
renderHeader:
|
|
366
|
-
renderCell:
|
|
367
|
-
renderActions:
|
|
368
|
-
isColumnSortable:
|
|
369
|
-
isRowDeleted:
|
|
370
|
-
isRowSelected:
|
|
371
|
-
expectedLength:
|
|
372
|
-
onRowClick:
|
|
373
|
-
setActionCellOuiaId:
|
|
374
|
-
setRowOuiaId:
|
|
375
|
-
tableOuiaId:
|
|
376
|
-
children:
|
|
377
|
-
variant:
|
|
302
|
+
data: o,
|
|
303
|
+
renderHeader: a,
|
|
304
|
+
renderCell: r,
|
|
305
|
+
renderActions: c,
|
|
306
|
+
isColumnSortable: l,
|
|
307
|
+
isRowDeleted: s,
|
|
308
|
+
isRowSelected: d,
|
|
309
|
+
expectedLength: g = 3,
|
|
310
|
+
onRowClick: T,
|
|
311
|
+
setActionCellOuiaId: D,
|
|
312
|
+
setRowOuiaId: C,
|
|
313
|
+
tableOuiaId: k,
|
|
314
|
+
children: I,
|
|
315
|
+
variant: R
|
|
378
316
|
}) => {
|
|
379
|
-
const [
|
|
380
|
-
let
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
317
|
+
const [S, de] = v(1e3);
|
|
318
|
+
let P;
|
|
319
|
+
const he = ({ width: h }) => {
|
|
320
|
+
P && cancelAnimationFrame(P), h && (P = requestAnimationFrame(() => {
|
|
321
|
+
de(h);
|
|
384
322
|
}));
|
|
385
|
-
}, { ref: me } =
|
|
386
|
-
(
|
|
387
|
-
[i,
|
|
388
|
-
), ge =
|
|
389
|
-
const
|
|
390
|
-
({ children:
|
|
391
|
-
|
|
323
|
+
}, { ref: me } = ze({ onResize: he }), A = S >= 576, O = q(
|
|
324
|
+
(h) => A && h !== 0 && h !== i.length - 1,
|
|
325
|
+
[i, A]
|
|
326
|
+
), ge = J(() => i.map((h, m) => {
|
|
327
|
+
const b = F(
|
|
328
|
+
({ children: N, ...w }, M) => /* @__PURE__ */ t(
|
|
329
|
+
ce,
|
|
392
330
|
{
|
|
393
331
|
position: m,
|
|
394
|
-
tableWidth:
|
|
332
|
+
tableWidth: S,
|
|
395
333
|
columnWidth: n,
|
|
396
|
-
canHide:
|
|
397
|
-
sort:
|
|
398
|
-
...
|
|
334
|
+
canHide: O(m),
|
|
335
|
+
sort: l ? l(h) : void 0,
|
|
336
|
+
...w,
|
|
399
337
|
ref: M,
|
|
400
|
-
children:
|
|
338
|
+
children: N
|
|
401
339
|
}
|
|
402
340
|
)
|
|
403
341
|
);
|
|
404
|
-
return
|
|
405
|
-
Th:
|
|
406
|
-
key: `header_${
|
|
407
|
-
column:
|
|
342
|
+
return b.displayName = "ResponsiveThCurried", a({
|
|
343
|
+
Th: b,
|
|
344
|
+
key: `header_${h}`,
|
|
345
|
+
column: h,
|
|
408
346
|
colIndex: m
|
|
409
347
|
});
|
|
410
348
|
}), [
|
|
411
|
-
|
|
349
|
+
O,
|
|
412
350
|
i,
|
|
413
|
-
|
|
351
|
+
l,
|
|
414
352
|
n,
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
]),
|
|
418
|
-
(
|
|
419
|
-
const m =
|
|
420
|
-
({ children:
|
|
421
|
-
|
|
353
|
+
a,
|
|
354
|
+
S
|
|
355
|
+
]), E = q(
|
|
356
|
+
(h) => {
|
|
357
|
+
const m = F(
|
|
358
|
+
({ children: b, ...N }, w) => /* @__PURE__ */ t(
|
|
359
|
+
H,
|
|
422
360
|
{
|
|
423
|
-
position:
|
|
424
|
-
tableWidth:
|
|
361
|
+
position: h,
|
|
362
|
+
tableWidth: S,
|
|
425
363
|
columnWidth: n,
|
|
426
|
-
canHide:
|
|
427
|
-
...
|
|
428
|
-
ref:
|
|
429
|
-
children:
|
|
364
|
+
canHide: O(h),
|
|
365
|
+
...N,
|
|
366
|
+
ref: w,
|
|
367
|
+
children: b
|
|
430
368
|
}
|
|
431
369
|
)
|
|
432
370
|
);
|
|
433
371
|
return m.displayName = "ResponsiveTdCurried", m;
|
|
434
372
|
},
|
|
435
|
-
[
|
|
436
|
-
),
|
|
437
|
-
() => i.map((
|
|
438
|
-
[i,
|
|
373
|
+
[O, n, S]
|
|
374
|
+
), ue = J(
|
|
375
|
+
() => i.map((h, m) => E(m)),
|
|
376
|
+
[i, E]
|
|
439
377
|
);
|
|
440
|
-
return /* @__PURE__ */
|
|
441
|
-
|
|
378
|
+
return /* @__PURE__ */ u(
|
|
379
|
+
Ve,
|
|
442
380
|
{
|
|
443
381
|
"aria-label": e,
|
|
444
382
|
gridBreakPoint: "",
|
|
445
383
|
ref: me,
|
|
446
|
-
className:
|
|
447
|
-
ouiaId:
|
|
448
|
-
variant:
|
|
384
|
+
className: A ? "" : "pf-m-grid",
|
|
385
|
+
ouiaId: k,
|
|
386
|
+
variant: R,
|
|
449
387
|
children: [
|
|
450
|
-
/* @__PURE__ */ t(
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
|
|
453
|
-
|
|
388
|
+
/* @__PURE__ */ t(Be, { children: /* @__PURE__ */ t(L, { children: ge }) }),
|
|
389
|
+
/* @__PURE__ */ u(Ue, { children: [
|
|
390
|
+
o === void 0 && /* @__PURE__ */ t(
|
|
391
|
+
Je,
|
|
454
392
|
{
|
|
455
393
|
columns: i.length,
|
|
456
|
-
rows:
|
|
457
|
-
getTd:
|
|
394
|
+
rows: g,
|
|
395
|
+
getTd: E
|
|
458
396
|
}
|
|
459
397
|
),
|
|
460
|
-
|
|
461
|
-
const
|
|
462
|
-
Td:
|
|
463
|
-
key: `row_${m}_cell_${
|
|
464
|
-
column:
|
|
465
|
-
colIndex:
|
|
398
|
+
o == null ? void 0 : o.map((h, m) => {
|
|
399
|
+
const b = s !== void 0 && s({ row: h, rowIndex: m }), N = d !== void 0 && d({ row: h, rowIndex: m }), w = !b && T ? () => T({ row: h, rowIndex: m }) : void 0, M = i.map((z, K) => r({
|
|
400
|
+
Td: ue[K],
|
|
401
|
+
key: `row_${m}_cell_${z}`,
|
|
402
|
+
column: z,
|
|
403
|
+
colIndex: K,
|
|
466
404
|
rowIndex: m,
|
|
467
|
-
row:
|
|
468
|
-
})),
|
|
469
|
-
|
|
405
|
+
row: h
|
|
406
|
+
})), fe = !b && c && /* @__PURE__ */ t(
|
|
407
|
+
H,
|
|
470
408
|
{
|
|
471
409
|
position: i.length,
|
|
472
|
-
tableWidth:
|
|
410
|
+
tableWidth: S,
|
|
473
411
|
columnWidth: n,
|
|
474
412
|
canHide: !1,
|
|
475
413
|
isActionCell: !0,
|
|
476
|
-
"data-testid":
|
|
477
|
-
children:
|
|
414
|
+
"data-testid": D ? D({ row: h, rowIndex: m }) : `actions-for-row-${m}`,
|
|
415
|
+
children: c({ rowIndex: m, row: h, ActionsColumn: Ge })
|
|
478
416
|
}
|
|
479
417
|
);
|
|
480
|
-
return /* @__PURE__ */
|
|
481
|
-
|
|
418
|
+
return /* @__PURE__ */ u(
|
|
419
|
+
se,
|
|
482
420
|
{
|
|
483
|
-
isDeleted:
|
|
484
|
-
isSelected:
|
|
485
|
-
onClick:
|
|
486
|
-
rowOuiaId:
|
|
421
|
+
isDeleted: b,
|
|
422
|
+
isSelected: N,
|
|
423
|
+
onClick: w,
|
|
424
|
+
rowOuiaId: C == null ? void 0 : C({ row: h, rowIndex: m }),
|
|
487
425
|
children: [
|
|
488
426
|
M,
|
|
489
|
-
|
|
427
|
+
fe
|
|
490
428
|
]
|
|
491
429
|
},
|
|
492
430
|
`row_${m}`
|
|
493
431
|
);
|
|
494
432
|
}),
|
|
495
|
-
(
|
|
433
|
+
(o == null ? void 0 : o.length) === 0 && /* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(G, { colSpan: i.length, children: I }) })
|
|
496
434
|
] })
|
|
497
435
|
]
|
|
498
436
|
}
|
|
499
437
|
);
|
|
500
|
-
},
|
|
501
|
-
|
|
438
|
+
}, ce = V(
|
|
439
|
+
F((e, n) => {
|
|
502
440
|
const {
|
|
503
441
|
tableWidth: i,
|
|
504
|
-
columnWidth:
|
|
505
|
-
position:
|
|
506
|
-
canHide:
|
|
507
|
-
className:
|
|
508
|
-
children:
|
|
509
|
-
...
|
|
510
|
-
} = e,
|
|
442
|
+
columnWidth: o,
|
|
443
|
+
position: a,
|
|
444
|
+
canHide: r,
|
|
445
|
+
className: c = "",
|
|
446
|
+
children: l,
|
|
447
|
+
...s
|
|
448
|
+
} = e, d = r && i < o * (a + 1) ? "pf-m-hidden" : "pf-m-visible";
|
|
511
449
|
return /* @__PURE__ */ t(
|
|
512
450
|
We,
|
|
513
451
|
{
|
|
514
452
|
ref: n,
|
|
515
|
-
className: `${
|
|
516
|
-
...
|
|
517
|
-
children:
|
|
453
|
+
className: `${d} ${c}`,
|
|
454
|
+
...s,
|
|
455
|
+
children: l
|
|
518
456
|
}
|
|
519
457
|
);
|
|
520
458
|
})
|
|
521
459
|
);
|
|
522
|
-
|
|
523
|
-
const
|
|
524
|
-
|
|
460
|
+
ce.displayName = "ResponsiveTh";
|
|
461
|
+
const H = V(
|
|
462
|
+
F((e, n) => {
|
|
525
463
|
const {
|
|
526
464
|
tableWidth: i,
|
|
527
|
-
columnWidth:
|
|
528
|
-
position:
|
|
529
|
-
canHide:
|
|
530
|
-
className:
|
|
531
|
-
children:
|
|
532
|
-
...
|
|
533
|
-
} = e,
|
|
465
|
+
columnWidth: o,
|
|
466
|
+
position: a,
|
|
467
|
+
canHide: r,
|
|
468
|
+
className: c = "",
|
|
469
|
+
children: l,
|
|
470
|
+
...s
|
|
471
|
+
} = e, d = r && i < o * (a + 1) ? "pf-m-hidden" : "pf-m-visible";
|
|
534
472
|
return /* @__PURE__ */ t(
|
|
535
|
-
|
|
473
|
+
G,
|
|
536
474
|
{
|
|
537
475
|
ref: n,
|
|
538
|
-
className: `${
|
|
539
|
-
...
|
|
540
|
-
children:
|
|
476
|
+
className: `${d} ${c}`,
|
|
477
|
+
...s,
|
|
478
|
+
children: l
|
|
541
479
|
}
|
|
542
480
|
);
|
|
543
481
|
})
|
|
544
482
|
);
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
({ isDeleted: e, isSelected: n, onClick: i, children:
|
|
548
|
-
|
|
483
|
+
H.displayName = "ResponsiveTd";
|
|
484
|
+
const se = V(
|
|
485
|
+
({ isDeleted: e, isSelected: n, onClick: i, children: o, rowOuiaId: a }) => /* @__PURE__ */ t(
|
|
486
|
+
L,
|
|
549
487
|
{
|
|
550
|
-
onRowClick: (
|
|
551
|
-
(
|
|
488
|
+
onRowClick: (r) => {
|
|
489
|
+
(r == null ? void 0 : r.target) instanceof HTMLElement && (["a", "button"].includes(r.target.tagName.toLowerCase()) || i && i());
|
|
552
490
|
},
|
|
553
|
-
ouiaId:
|
|
491
|
+
ouiaId: a,
|
|
554
492
|
isRowSelected: n,
|
|
555
493
|
className: e ? "mas--ResponsiveTable__Tr--deleted" : void 0,
|
|
556
|
-
"data-testid": [n && "row-selected", e && "row-deleted"].filter((
|
|
494
|
+
"data-testid": [n && "row-selected", e && "row-deleted"].filter((r) => !!r).join(" "),
|
|
557
495
|
role: "row",
|
|
558
|
-
children:
|
|
496
|
+
children: o
|
|
559
497
|
}
|
|
560
498
|
)
|
|
561
499
|
);
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
const i = (
|
|
565
|
-
n(
|
|
500
|
+
se.displayName = "DeletableRow";
|
|
501
|
+
const Qe = ({ label: e, onSearch: n }) => {
|
|
502
|
+
const i = (o, a, r) => {
|
|
503
|
+
n(a);
|
|
566
504
|
};
|
|
567
505
|
return /* @__PURE__ */ t(
|
|
568
|
-
|
|
506
|
+
xe,
|
|
569
507
|
{
|
|
570
508
|
placeholder: `Filter by ${e}`,
|
|
571
509
|
onSearch: i
|
|
572
510
|
}
|
|
573
511
|
);
|
|
574
512
|
};
|
|
575
|
-
function
|
|
513
|
+
function ee({
|
|
576
514
|
options: e,
|
|
577
515
|
value: n,
|
|
578
516
|
onChange: i,
|
|
579
|
-
ouiaId:
|
|
517
|
+
ouiaId: o
|
|
580
518
|
}) {
|
|
581
|
-
const [
|
|
519
|
+
const [a, r] = v(!1);
|
|
582
520
|
return /* @__PURE__ */ t(
|
|
583
|
-
|
|
521
|
+
B,
|
|
584
522
|
{
|
|
585
|
-
toggle: (
|
|
586
|
-
|
|
523
|
+
toggle: (l) => /* @__PURE__ */ t(
|
|
524
|
+
$,
|
|
587
525
|
{
|
|
588
|
-
ref:
|
|
589
|
-
onClick: () =>
|
|
590
|
-
isExpanded:
|
|
526
|
+
ref: l,
|
|
527
|
+
onClick: () => r((s) => !s),
|
|
528
|
+
isExpanded: a,
|
|
591
529
|
variant: "plain",
|
|
592
|
-
children: /* @__PURE__ */ t(
|
|
530
|
+
children: /* @__PURE__ */ t(ae, {})
|
|
593
531
|
}
|
|
594
532
|
),
|
|
595
533
|
"aria-label": "table:select_filter",
|
|
596
534
|
selected: n,
|
|
597
|
-
isOpen:
|
|
598
|
-
onSelect: (
|
|
599
|
-
i(
|
|
535
|
+
isOpen: a,
|
|
536
|
+
onSelect: (l, s) => {
|
|
537
|
+
i(s), r(!1);
|
|
600
538
|
},
|
|
601
|
-
ouiaId:
|
|
602
|
-
children: /* @__PURE__ */ t($e, { children: e.map((
|
|
539
|
+
ouiaId: o,
|
|
540
|
+
children: /* @__PURE__ */ t($e, { children: e.map((l, s) => /* @__PURE__ */ t(U, { value: l, children: l }, s)) })
|
|
603
541
|
}
|
|
604
542
|
);
|
|
605
543
|
}
|
|
606
|
-
function
|
|
544
|
+
function Xe({
|
|
607
545
|
label: e,
|
|
608
546
|
chips: n,
|
|
609
547
|
options: i,
|
|
610
|
-
onToggle:
|
|
548
|
+
onToggle: o
|
|
611
549
|
}) {
|
|
612
|
-
const [
|
|
550
|
+
const [a, r] = v(!1);
|
|
613
551
|
return /* @__PURE__ */ t(
|
|
614
|
-
|
|
552
|
+
B,
|
|
615
553
|
{
|
|
616
554
|
"aria-label": e,
|
|
617
|
-
onSelect: (
|
|
618
|
-
|
|
555
|
+
onSelect: (c, l) => {
|
|
556
|
+
o(l);
|
|
619
557
|
},
|
|
620
558
|
selected: n,
|
|
621
|
-
isOpen:
|
|
622
|
-
toggle: (
|
|
623
|
-
|
|
559
|
+
isOpen: a,
|
|
560
|
+
toggle: (c) => /* @__PURE__ */ t(
|
|
561
|
+
$,
|
|
624
562
|
{
|
|
625
|
-
ref:
|
|
626
|
-
onClick: () =>
|
|
627
|
-
isExpanded:
|
|
563
|
+
ref: c,
|
|
564
|
+
onClick: () => r((l) => !l),
|
|
565
|
+
isExpanded: a,
|
|
628
566
|
style: {
|
|
629
567
|
width: "200px"
|
|
630
568
|
},
|
|
631
569
|
children: `Filter by ${e}`
|
|
632
570
|
}
|
|
633
571
|
),
|
|
634
|
-
children: Object.entries(i).map(([
|
|
572
|
+
children: Object.entries(i).map(([c, l]) => /* @__PURE__ */ t(U, { value: c, hasCheckbox: !0, children: l }, c))
|
|
635
573
|
}
|
|
636
574
|
);
|
|
637
575
|
}
|
|
638
|
-
function
|
|
639
|
-
const i = Object.keys(e), [
|
|
640
|
-
switch (
|
|
576
|
+
function pt({ filters: e, breakpoint: n = "md" }) {
|
|
577
|
+
const i = Object.keys(e), [o, a] = v(i[0]), r = (c, l) => {
|
|
578
|
+
switch (l.type) {
|
|
641
579
|
case "search":
|
|
642
580
|
return /* @__PURE__ */ t(
|
|
643
|
-
|
|
581
|
+
Qe,
|
|
644
582
|
{
|
|
645
|
-
onSearch:
|
|
646
|
-
label:
|
|
647
|
-
validate:
|
|
648
|
-
errorMessage:
|
|
583
|
+
onSearch: l.onSearch,
|
|
584
|
+
label: c,
|
|
585
|
+
validate: l.validate,
|
|
586
|
+
errorMessage: l.errorMessage
|
|
649
587
|
}
|
|
650
588
|
);
|
|
651
589
|
case "checkbox":
|
|
652
590
|
return /* @__PURE__ */ t(
|
|
653
|
-
|
|
591
|
+
Xe,
|
|
654
592
|
{
|
|
655
|
-
chips:
|
|
656
|
-
options:
|
|
657
|
-
onToggle:
|
|
658
|
-
label:
|
|
593
|
+
chips: l.chips,
|
|
594
|
+
options: l.options,
|
|
595
|
+
onToggle: l.onToggle,
|
|
596
|
+
label: c
|
|
659
597
|
}
|
|
660
598
|
);
|
|
661
599
|
}
|
|
662
600
|
};
|
|
663
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ u(W, { children: [
|
|
664
602
|
/* @__PURE__ */ t(
|
|
665
|
-
|
|
603
|
+
ke,
|
|
666
604
|
{
|
|
667
605
|
variant: "search-filter",
|
|
668
606
|
visibility: { default: "hidden", [n]: "visible" },
|
|
669
607
|
"data-testid": "large-viewport-toolbar",
|
|
670
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ u(Re, { children: [
|
|
671
609
|
i.length > 1 && /* @__PURE__ */ t(
|
|
672
|
-
|
|
610
|
+
ee,
|
|
673
611
|
{
|
|
674
612
|
options: i,
|
|
675
|
-
value:
|
|
676
|
-
onChange:
|
|
613
|
+
value: o,
|
|
614
|
+
onChange: a,
|
|
677
615
|
ouiaId: "chip-filter-selector-large-viewport"
|
|
678
616
|
}
|
|
679
617
|
),
|
|
680
|
-
|
|
618
|
+
r(o, e[o])
|
|
681
619
|
] })
|
|
682
620
|
}
|
|
683
621
|
),
|
|
684
622
|
/* @__PURE__ */ t(
|
|
685
|
-
|
|
623
|
+
Pe,
|
|
686
624
|
{
|
|
687
|
-
toggleIcon: /* @__PURE__ */ t(
|
|
625
|
+
toggleIcon: /* @__PURE__ */ t(ae, {}),
|
|
688
626
|
breakpoint: n,
|
|
689
627
|
visibility: { default: "visible", [n]: "hidden" },
|
|
690
|
-
children: /* @__PURE__ */
|
|
628
|
+
children: /* @__PURE__ */ u(Ae, { variant: "filter-group", children: [
|
|
691
629
|
i.length > 1 && /* @__PURE__ */ t(
|
|
692
|
-
|
|
630
|
+
ee,
|
|
693
631
|
{
|
|
694
632
|
options: i,
|
|
695
|
-
value:
|
|
696
|
-
onChange:
|
|
633
|
+
value: o,
|
|
634
|
+
onChange: a,
|
|
697
635
|
ouiaId: "chip-filter-selector-small-viewport"
|
|
698
636
|
}
|
|
699
637
|
),
|
|
700
|
-
Object.entries(e).map(([
|
|
701
|
-
|
|
638
|
+
Object.entries(e).map(([c, l], s) => /* @__PURE__ */ t(
|
|
639
|
+
Ee,
|
|
702
640
|
{
|
|
703
|
-
chips:
|
|
704
|
-
deleteChip: (
|
|
705
|
-
deleteChipGroup:
|
|
706
|
-
categoryName:
|
|
707
|
-
showToolbarItem:
|
|
708
|
-
children:
|
|
641
|
+
chips: l.type === "checkbox" ? l.chips.map((d) => ({ key: d, node: l.options[d] })) : l.chips,
|
|
642
|
+
deleteChip: (d, g) => l.onRemoveChip(typeof g == "string" ? g : g.key),
|
|
643
|
+
deleteChipGroup: l.onRemoveGroup,
|
|
644
|
+
categoryName: c,
|
|
645
|
+
showToolbarItem: c === o,
|
|
646
|
+
children: c === o && r(c, l)
|
|
709
647
|
},
|
|
710
|
-
|
|
648
|
+
s
|
|
711
649
|
))
|
|
712
650
|
] })
|
|
713
651
|
}
|
|
@@ -715,25 +653,28 @@ function mt({ filters: e, breakpoint: n = "md" }) {
|
|
|
715
653
|
] });
|
|
716
654
|
}
|
|
717
655
|
export {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
rt as
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
656
|
+
mt as AppAboutModal,
|
|
657
|
+
pt as ChipFilter,
|
|
658
|
+
Ke as DateTime,
|
|
659
|
+
se as DeletableRow,
|
|
660
|
+
Xe as FilterCheckbox,
|
|
661
|
+
Qe as FilterSearch,
|
|
662
|
+
ee as FilterSelector,
|
|
663
|
+
lt as FromNow,
|
|
664
|
+
y as If,
|
|
665
|
+
at as IfNotEmpty,
|
|
666
|
+
_ as IfNotLoading,
|
|
667
|
+
rt as ListWithToolbar,
|
|
668
|
+
ft as Loading,
|
|
669
|
+
ct as ObjectDropdown,
|
|
670
|
+
st as ObjectSelect,
|
|
671
|
+
vt as Pagination,
|
|
672
|
+
gt as PleaseWaitModal,
|
|
673
|
+
ut as ProgressModal,
|
|
674
|
+
bt as ResponsiveTable,
|
|
675
|
+
H as ResponsiveTd,
|
|
676
|
+
ce as ResponsiveTh,
|
|
677
|
+
Je as TableSkeleton,
|
|
678
|
+
dt as ToggleIcon,
|
|
679
|
+
ht as UrlUpload
|
|
739
680
|
};
|