@apicurio/common-ui-components 1.0.1 → 1.0.2
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/dist/common/index.d.ts +1 -0
- package/dist/main.js +4 -3
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import g, { useState as I, useEffect as C } from "react";
|
|
3
3
|
import { EmptyState as N, EmptyStateVariant as p, EmptyStateHeader as L, EmptyStateBody as A, Spinner as O, Alert as F, Dropdown as P, MenuToggle as w, DropdownList as j, Divider as y, DropdownItem as M, Select as V, SelectOption as k, AboutModal as B, TextContent as E, Text as b, TextVariants as v, TextList as S, TextListItem as d, Modal as x, Progress as W } from "@patternfly/react-core";
|
|
4
4
|
import { EllipsisVIcon as _ } from "@patternfly/react-icons";
|
|
5
|
-
const $ = ({ collection: e, emptyState: n, emptyStateTitle: a, emptyStateMessage: i, children: r }) => {
|
|
5
|
+
const f = ({ condition: e, children: n }) => (() => typeof e == "boolean" ? e : e())() ? /* @__PURE__ */ t(g.Fragment, { children: n }) : /* @__PURE__ */ t(g.Fragment, {}), $ = ({ collection: e, emptyState: n, emptyStateTitle: a, emptyStateMessage: i, children: r }) => {
|
|
6
6
|
const c = () => !e || e.length === 0, s = n || /* @__PURE__ */ u(N, { variant: p.xs, children: [
|
|
7
7
|
/* @__PURE__ */ t(L, { titleText: a || "None found", headingLevel: "h4" }),
|
|
8
8
|
/* @__PURE__ */ t(A, { children: i || "No items found." })
|
|
@@ -11,7 +11,7 @@ const $ = ({ collection: e, emptyState: n, emptyStateTitle: a, emptyStateMessage
|
|
|
11
11
|
}, T = ({ isLoading: e, loadingComponent: n, children: a }) => {
|
|
12
12
|
const i = () => typeof e == "boolean" ? e : e(), r = n || /* @__PURE__ */ t(O, {});
|
|
13
13
|
return i() ? /* @__PURE__ */ t(g.Fragment, { children: r }) : /* @__PURE__ */ t(g.Fragment, { children: a });
|
|
14
|
-
},
|
|
14
|
+
}, q = ({ toolbar: e, alwaysShowToolbar: n, emptyState: a, filteredEmptyState: i, isLoading: r, isError: c, loadingComponent: s, errorComponent: m, isEmpty: o, isFiltered: l, children: h }) => {
|
|
15
15
|
const D = n || !o || l || c;
|
|
16
16
|
return m || (m = /* @__PURE__ */ t("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ t(F, { 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(g.Fragment, { children: [
|
|
17
17
|
/* @__PURE__ */ t(f, { condition: D, children: e }),
|
|
@@ -178,6 +178,7 @@ const $ = ({ collection: e, emptyState: n, emptyStateTitle: a, emptyStateMessage
|
|
|
178
178
|
);
|
|
179
179
|
export {
|
|
180
180
|
Q as AppAboutModal,
|
|
181
|
+
f as If,
|
|
181
182
|
$ as IfNotEmpty,
|
|
182
183
|
T as IfNotLoading,
|
|
183
184
|
q as ListWithToolbar,
|