@box/metadata-template-browser 1.17.7 → 1.17.9
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/chunks/breadcrumb-navigation.js +35 -0
- package/dist/chunks/browser-row.js +52 -0
- package/dist/chunks/grid-list-load-more-sentinel.js +31 -0
- package/dist/chunks/load-more-error-row.js +36 -0
- package/dist/chunks/load-more-loading-row.js +26 -0
- package/dist/chunks/loader-skeleton.js +16 -0
- package/dist/chunks/metadata-template-browser-container.js +31 -0
- package/dist/chunks/metadata-template-browser-controller.js +36 -0
- package/dist/chunks/metadata-template-browser-list-box.js +57 -0
- package/dist/chunks/types.js +4 -6
- package/dist/chunks/virtualized-grid-list.js +54 -0
- package/dist/esm/index.js +2 -4
- package/dist/esm/lib/components/breadcrumb-navigation/breadcrumb-navigation.js +2 -51
- package/dist/esm/lib/components/breadcrumb-navigation/index.js +2 -4
- package/dist/esm/lib/components/breadcrumb-navigation/messages.js +14 -16
- package/dist/esm/lib/components/browse-list/browse-list.js +57 -82
- package/dist/esm/lib/components/browse-list/index.js +1 -3
- package/dist/esm/lib/components/browse-list/messages.js +14 -16
- package/dist/esm/lib/components/browser-row/browser-row.js +2 -63
- package/dist/esm/lib/components/browser-row/index.js +2 -4
- package/dist/esm/lib/components/error-state/error-state.js +22 -31
- package/dist/esm/lib/components/error-state/index.js +2 -4
- package/dist/esm/lib/components/error-state/messages.js +5 -9
- package/dist/esm/lib/components/index.js +12 -24
- package/dist/esm/lib/components/load-more-feedback/index.js +3 -6
- package/dist/esm/lib/components/load-more-feedback/load-more-error-row.js +2 -44
- package/dist/esm/lib/components/load-more-feedback/load-more-loading-row.js +2 -34
- package/dist/esm/lib/components/load-more-feedback/messages.js +18 -20
- package/dist/esm/lib/components/loader-skeleton/index.js +2 -4
- package/dist/esm/lib/components/loader-skeleton/loader-skeleton.js +2 -26
- package/dist/esm/lib/components/messages.js +26 -28
- package/dist/esm/lib/components/metadata-template-browser-container.js +2 -35
- package/dist/esm/lib/components/metadata-template-browser-controller.js +2 -58
- package/dist/esm/lib/components/metadata-template-browser-list-box/index.js +2 -4
- package/dist/esm/lib/components/metadata-template-browser-list-box/metadata-template-browser-list-box.js +2 -65
- package/dist/esm/lib/components/namespace-row/index.js +2 -4
- package/dist/esm/lib/components/namespace-row/messages.js +5 -9
- package/dist/esm/lib/components/namespace-row/namespace-row.js +21 -31
- package/dist/esm/lib/components/search-list/index.js +2 -4
- package/dist/esm/lib/components/search-list/messages.js +18 -20
- package/dist/esm/lib/components/search-list/search-list.js +53 -75
- package/dist/esm/lib/components/template-row/index.js +2 -4
- package/dist/esm/lib/components/template-row/messages.js +5 -9
- package/dist/esm/lib/components/template-row/template-row.js +47 -68
- package/dist/esm/lib/components/virtualized-grid-list/grid-list-load-more-sentinel.js +2 -49
- package/dist/esm/lib/components/virtualized-grid-list/index.js +2 -4
- package/dist/esm/lib/components/virtualized-grid-list/messages.js +5 -9
- package/dist/esm/lib/components/virtualized-grid-list/virtualized-grid-list.js +2 -66
- package/dist/esm/lib/constants.js +2 -14
- package/dist/esm/lib/contexts/contexts.js +88 -123
- package/dist/esm/lib/contexts/hooks.js +25 -38
- package/dist/esm/lib/contexts/index.js +4 -16
- package/dist/esm/lib/contexts/provider.js +50 -58
- package/dist/esm/lib/contexts/reducer.js +151 -178
- package/dist/esm/lib/contexts/use-template-browser-actions.js +224 -263
- package/dist/esm/lib/hooks/use-is-initial-browse-loading.js +5 -15
- package/dist/esm/lib/metadata-template-browser.js +16 -25
- package/dist/styles/breadcrumb-navigation.css +1 -1
- package/dist/styles/browser-row.css +1 -1
- package/dist/styles/grid-list-load-more-sentinel.css +1 -1
- package/dist/styles/load-more-error-row.css +1 -1
- package/dist/styles/load-more-loading-row.css +1 -1
- package/dist/styles/loader-skeleton.css +1 -1
- package/dist/styles/metadata-template-browser-container.css +1 -1
- package/dist/styles/metadata-template-browser-controller.css +1 -1
- package/dist/styles/metadata-template-browser-list-box.css +1 -1
- package/dist/styles/virtualized-grid-list.css +1 -1
- package/package.json +7 -7
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
s as messages
|
|
10
|
-
};
|
|
2
|
+
var t = e({ navigateAriaLabel: {
|
|
3
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.namespaceRow.navigateAriaLabel",
|
|
4
|
+
defaultMessage: "Navigate into {displayName}"
|
|
5
|
+
} });
|
|
6
|
+
export { t as messages };
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"aria-label": r(l.navigateAriaLabel, {
|
|
22
|
-
displayName: o.displayName
|
|
23
|
-
}),
|
|
24
|
-
disabled: t,
|
|
25
|
-
icon: a,
|
|
26
|
-
size: "x-small"
|
|
27
|
-
})
|
|
28
|
-
});
|
|
1
|
+
import { useConsumerState as e } from "../../contexts/hooks.js";
|
|
2
|
+
import { t } from "../../../../chunks/browser-row.js";
|
|
3
|
+
import { messages as n } from "./messages.js";
|
|
4
|
+
import { IconButton as r } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as i } from "react-intl";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
import { ChevronRight as o, Folder as s } from "@box/blueprint-web-assets/icons/Medium";
|
|
8
|
+
function c({ namespace: c }) {
|
|
9
|
+
let { formatMessage: l } = i(), { isDisabled: u } = e();
|
|
10
|
+
return /* @__PURE__ */ a(t, {
|
|
11
|
+
id: c.id,
|
|
12
|
+
leadingIcon: /* @__PURE__ */ a(s, {}),
|
|
13
|
+
title: c.displayName,
|
|
14
|
+
trailingSlot: /* @__PURE__ */ a(r, {
|
|
15
|
+
"aria-label": l(n.navigateAriaLabel, { displayName: c.displayName }),
|
|
16
|
+
disabled: u,
|
|
17
|
+
icon: o,
|
|
18
|
+
size: "x-small"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
29
21
|
}
|
|
30
|
-
export {
|
|
31
|
-
w as NamespaceRow
|
|
32
|
-
};
|
|
22
|
+
export { c as NamespaceRow };
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
listAriaLabel: {
|
|
4
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.searchList.listAriaLabel",
|
|
5
|
+
defaultMessage: "Search results"
|
|
6
|
+
},
|
|
7
|
+
emptyStateHeading: {
|
|
8
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.searchList.emptyStateHeading",
|
|
9
|
+
defaultMessage: "We couldn't find what you're looking for"
|
|
10
|
+
},
|
|
11
|
+
emptyStateBody: {
|
|
12
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.searchList.emptyStateBody",
|
|
13
|
+
defaultMessage: "Try using simpler search terms and then filtering the results."
|
|
14
|
+
},
|
|
15
|
+
searchErrorBody: {
|
|
16
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.searchList.searchErrorBody",
|
|
17
|
+
defaultMessage: "Something went wrong while searching."
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
|
-
export {
|
|
21
|
-
t as messages
|
|
22
|
-
};
|
|
20
|
+
export { t as messages };
|
|
@@ -1,76 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
illustration: E,
|
|
54
|
-
size: "small"
|
|
55
|
-
});
|
|
56
|
-
const g = a.map((t) => ({
|
|
57
|
-
id: t.id,
|
|
58
|
-
template: t
|
|
59
|
-
}));
|
|
60
|
-
return /* @__PURE__ */ r(v, {
|
|
61
|
-
ariaLabel: e(o.listAriaLabel),
|
|
62
|
-
isFetchingMore: f,
|
|
63
|
-
items: g,
|
|
64
|
-
listType: n.Search,
|
|
65
|
-
loadMoreError: u,
|
|
66
|
-
onAction: l,
|
|
67
|
-
hasMoreItems: y,
|
|
68
|
-
onLoadMore: i,
|
|
69
|
-
onRetry: i,
|
|
70
|
-
selectedKeys: c,
|
|
71
|
-
children: M
|
|
72
|
-
});
|
|
1
|
+
import { useBrowseState as e, useBrowserActions as t, useSearchState as n } from "../../contexts/hooks.js";
|
|
2
|
+
import { t as r } from "../../../../chunks/types.js";
|
|
3
|
+
import { ErrorState as i } from "../error-state/error-state.js";
|
|
4
|
+
import { t as a } from "../../../../chunks/loader-skeleton.js";
|
|
5
|
+
import { TemplateRow as o } from "../template-row/template-row.js";
|
|
6
|
+
import { t as s } from "../../../../chunks/virtualized-grid-list.js";
|
|
7
|
+
import { messages as c } from "./messages.js";
|
|
8
|
+
import { EmptyState as l, Text as u } from "@box/blueprint-web";
|
|
9
|
+
import { useIntl as d } from "react-intl";
|
|
10
|
+
import { useCallback as f } from "react";
|
|
11
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
12
|
+
import { CustomTemplate as m } from "@box/blueprint-web-assets/illustrations/Small";
|
|
13
|
+
function h({ onAction: h, selectedKeys: g }) {
|
|
14
|
+
let { formatMessage: _ } = d(), { searchResults: v, searchNextMarker: y, isFetchingSearch: b, searchError: x } = n(), { isFetchingMore: S, loadMoreError: C } = e(), { loadMore: w, retry: T, editTemplate: E } = t(), D = y !== void 0, O = f((e) => /* @__PURE__ */ p(o, {
|
|
15
|
+
onEdit: E,
|
|
16
|
+
template: e.template,
|
|
17
|
+
variant: r.Search
|
|
18
|
+
}), [E]);
|
|
19
|
+
if (b) return /* @__PURE__ */ p(a, {});
|
|
20
|
+
if (x !== null) return /* @__PURE__ */ p(i, {
|
|
21
|
+
body: _(c.searchErrorBody),
|
|
22
|
+
onRetry: T
|
|
23
|
+
});
|
|
24
|
+
if (v.length === 0) return /* @__PURE__ */ p(l, {
|
|
25
|
+
body: /* @__PURE__ */ p(u, {
|
|
26
|
+
as: "p",
|
|
27
|
+
children: _(c.emptyStateBody)
|
|
28
|
+
}),
|
|
29
|
+
heading: /* @__PURE__ */ p(u, {
|
|
30
|
+
as: "p",
|
|
31
|
+
children: _(c.emptyStateHeading)
|
|
32
|
+
}),
|
|
33
|
+
illustration: m,
|
|
34
|
+
size: "small"
|
|
35
|
+
});
|
|
36
|
+
let k = v.map((e) => ({
|
|
37
|
+
id: e.id,
|
|
38
|
+
template: e
|
|
39
|
+
}));
|
|
40
|
+
return /* @__PURE__ */ p(s, {
|
|
41
|
+
ariaLabel: _(c.listAriaLabel),
|
|
42
|
+
isFetchingMore: S,
|
|
43
|
+
items: k,
|
|
44
|
+
listType: r.Search,
|
|
45
|
+
loadMoreError: C,
|
|
46
|
+
onAction: h,
|
|
47
|
+
hasMoreItems: D,
|
|
48
|
+
onLoadMore: w,
|
|
49
|
+
onRetry: w,
|
|
50
|
+
selectedKeys: g,
|
|
51
|
+
children: O
|
|
52
|
+
});
|
|
73
53
|
}
|
|
74
|
-
export {
|
|
75
|
-
K as SearchList
|
|
76
|
-
};
|
|
54
|
+
export { h as SearchList };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
t as messages
|
|
10
|
-
};
|
|
2
|
+
var t = e({ editAriaLabel: {
|
|
3
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.templateRow.editAriaLabel",
|
|
4
|
+
defaultMessage: "Edit {displayName}"
|
|
5
|
+
} });
|
|
6
|
+
export { t as messages };
|
|
@@ -1,70 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children: r.displayName
|
|
27
|
-
})]
|
|
28
|
-
}, r.fqn));
|
|
1
|
+
import { useConsumerState as e } from "../../contexts/hooks.js";
|
|
2
|
+
import { t } from "../../../../chunks/types.js";
|
|
3
|
+
import { t as n } from "../../../../chunks/browser-row.js";
|
|
4
|
+
import { messages as r } from "./messages.js";
|
|
5
|
+
import { IconButton as i, Text as a } from "@box/blueprint-web";
|
|
6
|
+
import { useIntl as o } from "react-intl";
|
|
7
|
+
import { Fragment as s, useCallback as c } from "react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { Metadata as d } from "@box/blueprint-web-assets/icons/Medium";
|
|
10
|
+
import { Pencil as f } from "@box/blueprint-web-assets/icons/Fill";
|
|
11
|
+
var p = (e) => {
|
|
12
|
+
if (!e.ancestors || e.ancestors.length === 0) return;
|
|
13
|
+
let t = e.ancestors.length - 1;
|
|
14
|
+
return e.ancestors.map((e, n) => /* @__PURE__ */ u(s, { children: [n > 0 && /* @__PURE__ */ l(a, {
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
as: "span",
|
|
17
|
+
color: "textOnLightSecondary",
|
|
18
|
+
variant: "caption",
|
|
19
|
+
children: " / "
|
|
20
|
+
}), /* @__PURE__ */ l(a, {
|
|
21
|
+
as: "span",
|
|
22
|
+
color: "textOnLightSecondary",
|
|
23
|
+
variant: n === t ? "captionBold" : "caption",
|
|
24
|
+
children: e.displayName
|
|
25
|
+
})] }, e.fqn));
|
|
29
26
|
};
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// VirtualizedGridList routes the click through onAction even though
|
|
52
|
-
// onClick.stopPropagation() is called (pointer events fire first).
|
|
53
|
-
/* @__PURE__ */ i("div", {
|
|
54
|
-
onPointerDown: (t) => t.stopPropagation(),
|
|
55
|
-
children: /* @__PURE__ */ i(m, {
|
|
56
|
-
"aria-label": a(b.editAriaLabel, {
|
|
57
|
-
displayName: o.displayName
|
|
58
|
-
}),
|
|
59
|
-
disabled: d,
|
|
60
|
-
icon: p,
|
|
61
|
-
onClick: l,
|
|
62
|
-
size: "x-small"
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
) : void 0
|
|
66
|
-
});
|
|
27
|
+
function m({ template: a, variant: s, onEdit: u }) {
|
|
28
|
+
let { formatMessage: m } = o(), { isDisabled: h } = e(), g = c((e) => {
|
|
29
|
+
e.stopPropagation(), u(a.id);
|
|
30
|
+
}, [u, a.id]), _ = s === t.Search, v = !!a.canEdit;
|
|
31
|
+
return /* @__PURE__ */ l(n, {
|
|
32
|
+
id: a.id,
|
|
33
|
+
isTrailingSlotHoverOnly: v,
|
|
34
|
+
leadingIcon: _ ? void 0 : /* @__PURE__ */ l(d, {}),
|
|
35
|
+
subtitle: _ ? p(a) : void 0,
|
|
36
|
+
title: a.displayName,
|
|
37
|
+
trailingSlot: v ? /* @__PURE__ */ l("div", {
|
|
38
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
39
|
+
children: /* @__PURE__ */ l(i, {
|
|
40
|
+
"aria-label": m(r.editAriaLabel, { displayName: a.displayName }),
|
|
41
|
+
disabled: h,
|
|
42
|
+
icon: f,
|
|
43
|
+
onClick: g,
|
|
44
|
+
size: "x-small"
|
|
45
|
+
})
|
|
46
|
+
}) : void 0
|
|
47
|
+
});
|
|
67
48
|
}
|
|
68
|
-
export {
|
|
69
|
-
j as TemplateRow
|
|
70
|
-
};
|
|
49
|
+
export { m as TemplateRow };
|
|
@@ -1,49 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useIntl as A } from "react-intl";
|
|
4
|
-
import { LOAD_MORE_SENTINEL_ID as h } from "../../constants.js";
|
|
5
|
-
import { messages as E } from "./messages.js";
|
|
6
|
-
import { jsx as _ } from "react/jsx-runtime";
|
|
7
|
-
import '../../../../styles/grid-list-load-more-sentinel.css';const I = "_sentinel_im31a_1", b = {
|
|
8
|
-
sentinel: I
|
|
9
|
-
};
|
|
10
|
-
function D({
|
|
11
|
-
onLoadMore: r,
|
|
12
|
-
scrollContainerRef: n
|
|
13
|
-
}) {
|
|
14
|
-
const s = f(r);
|
|
15
|
-
s.current = r;
|
|
16
|
-
const {
|
|
17
|
-
formatMessage: c
|
|
18
|
-
} = A(), m = c(E.loadMoreSentinelAriaLabel);
|
|
19
|
-
return p(() => {
|
|
20
|
-
const e = n.current;
|
|
21
|
-
let t, i = !1;
|
|
22
|
-
const o = () => {
|
|
23
|
-
if (!e || i)
|
|
24
|
-
return;
|
|
25
|
-
const {
|
|
26
|
-
scrollTop: u,
|
|
27
|
-
scrollHeight: d,
|
|
28
|
-
clientHeight: a
|
|
29
|
-
} = e;
|
|
30
|
-
d - u - a <= a && (i = !0, s.current());
|
|
31
|
-
}, l = () => {
|
|
32
|
-
cancelAnimationFrame(t), t = requestAnimationFrame(o);
|
|
33
|
-
};
|
|
34
|
-
return e?.addEventListener("scroll", l, {
|
|
35
|
-
passive: !0
|
|
36
|
-
}), t = requestAnimationFrame(o), () => {
|
|
37
|
-
e?.removeEventListener("scroll", l), cancelAnimationFrame(t);
|
|
38
|
-
};
|
|
39
|
-
}, [n]), /* @__PURE__ */ _(L, {
|
|
40
|
-
"aria-hidden": "true",
|
|
41
|
-
className: b.sentinel,
|
|
42
|
-
id: h,
|
|
43
|
-
isDisabled: !0,
|
|
44
|
-
textValue: m
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
D as GridListLoadMoreSentinel
|
|
49
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/grid-list-load-more-sentinel.js";
|
|
2
|
+
export { e as GridListLoadMoreSentinel };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
r as messages
|
|
10
|
-
};
|
|
2
|
+
var t = e({ loadMoreSentinelAriaLabel: {
|
|
3
|
+
id: "groupSharedFeatures.metadataTemplateBrowser.virtualizedGridList.loadMoreSentinelAriaLabel",
|
|
4
|
+
defaultMessage: "Load more items"
|
|
5
|
+
} });
|
|
6
|
+
export { t as messages };
|
|
@@ -1,66 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { LOAD_MORE_ERROR_ROW_ID as G } from "../../constants.js";
|
|
4
|
-
import { T as H } from "../../../../chunks/types.js";
|
|
5
|
-
import { GridListLoadMoreSentinel as A } from "./grid-list-load-more-sentinel.js";
|
|
6
|
-
import { jsx as t, jsxs as D } from "react/jsx-runtime";
|
|
7
|
-
import { useConsumerState as I } from "../../contexts/hooks.js";
|
|
8
|
-
import { LoadMoreLoadingRow as W } from "../load-more-feedback/load-more-loading-row.js";
|
|
9
|
-
import { LoadMoreErrorRow as b } from "../load-more-feedback/load-more-error-row.js";
|
|
10
|
-
import '../../../../styles/virtualized-grid-list.css';const x = "_list_dukvn_1", V = {
|
|
11
|
-
list: x
|
|
12
|
-
}, j = 40, k = 58, v = 2;
|
|
13
|
-
function Y({
|
|
14
|
-
ariaLabel: d,
|
|
15
|
-
items: R,
|
|
16
|
-
onAction: e,
|
|
17
|
-
children: _,
|
|
18
|
-
onLoadMore: L,
|
|
19
|
-
hasMoreItems: p,
|
|
20
|
-
isFetchingMore: l,
|
|
21
|
-
loadMoreError: a,
|
|
22
|
-
onRetry: i,
|
|
23
|
-
selectedKeys: r,
|
|
24
|
-
listType: m
|
|
25
|
-
}) {
|
|
26
|
-
const {
|
|
27
|
-
isDisabled: n
|
|
28
|
-
} = I(), E = h(() => new T({
|
|
29
|
-
estimatedRowHeight: m === H.Browse ? j : k,
|
|
30
|
-
gap: v
|
|
31
|
-
}), [m]), c = O(null), u = f((o) => {
|
|
32
|
-
if (o === G) {
|
|
33
|
-
n || i();
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
e(o);
|
|
37
|
-
}, [n, e, i]), S = f((o) => {
|
|
38
|
-
if (o === "all")
|
|
39
|
-
return;
|
|
40
|
-
const [s] = o;
|
|
41
|
-
s !== void 0 && !r.has(String(s)) && u(s);
|
|
42
|
-
}, [u, r]), g = p && !l && a === null && !n;
|
|
43
|
-
return /* @__PURE__ */ t(w, {
|
|
44
|
-
layout: E,
|
|
45
|
-
children: /* @__PURE__ */ D(C, {
|
|
46
|
-
ref: c,
|
|
47
|
-
"aria-label": d,
|
|
48
|
-
className: V.list,
|
|
49
|
-
onSelectionChange: S,
|
|
50
|
-
selectedKeys: r,
|
|
51
|
-
selectionMode: "single",
|
|
52
|
-
children: [/* @__PURE__ */ t(M, {
|
|
53
|
-
items: R,
|
|
54
|
-
children: _
|
|
55
|
-
}), l && /* @__PURE__ */ t(W, {}), a !== null && /* @__PURE__ */ t(b, {
|
|
56
|
-
onRetry: i
|
|
57
|
-
}), g && /* @__PURE__ */ t(A, {
|
|
58
|
-
onLoadMore: L,
|
|
59
|
-
scrollContainerRef: c
|
|
60
|
-
})]
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
Y as VirtualizedGridList
|
|
66
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/virtualized-grid-list.js";
|
|
2
|
+
export { e as VirtualizedGridList };
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}, D = {
|
|
4
|
-
entries: []
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
_ as LOAD_MORE_ERROR_ROW_ID,
|
|
8
|
-
O as LOAD_MORE_LOADING_ROW_ID,
|
|
9
|
-
R as LOAD_MORE_SENTINEL_ID,
|
|
10
|
-
E as PAGE_SIZE,
|
|
11
|
-
s as SEARCH_DEBOUNCE_MS,
|
|
12
|
-
e as emptyNamespacesResponse,
|
|
13
|
-
D as emptyTemplatesResponse
|
|
14
|
-
};
|
|
1
|
+
var e = "LOAD_MORE_ERROR_ROW_ID", t = "LOAD_MORE_LOADING_ROW_ID", n = "LOAD_MORE_SENTINEL_ID", r = 200, i = 500, a = { entries: [] }, o = { entries: [] };
|
|
2
|
+
export { e as LOAD_MORE_ERROR_ROW_ID, t as LOAD_MORE_LOADING_ROW_ID, n as LOAD_MORE_SENTINEL_ID, r as PAGE_SIZE, i as SEARCH_DEBOUNCE_MS, a as emptyNamespacesResponse, o as emptyTemplatesResponse };
|