@box/metadata-template-browser 1.17.8 → 1.17.10
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 +6 -6
|
@@ -1,129 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return /* @__PURE__ */ C(B.Provider, {
|
|
15
|
-
value: e,
|
|
16
|
-
children: n
|
|
17
|
-
});
|
|
1
|
+
import { useTemplateBrowserActions as e } from "./use-template-browser-actions.js";
|
|
2
|
+
import { createContext as t, useMemo as n } from "react";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
var i = /* @__PURE__ */ t(null);
|
|
5
|
+
function a({ children: e, namespaceFQN: t, path: a }) {
|
|
6
|
+
let o = n(() => ({
|
|
7
|
+
namespaceFQN: t,
|
|
8
|
+
path: a
|
|
9
|
+
}), [t, a]);
|
|
10
|
+
return /* @__PURE__ */ r(i.Provider, {
|
|
11
|
+
value: o,
|
|
12
|
+
children: e
|
|
13
|
+
});
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
function
|
|
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
|
-
});
|
|
15
|
+
var o = /* @__PURE__ */ t(null);
|
|
16
|
+
function s({ children: e, namespaces: t, templates: i, isNamespacesExhausted: a, namespaceNextMarker: s, templateNextMarker: c, isFetching: l, isFetchingMore: u, initialLoadError: d, browseError: f, loadMoreError: p }) {
|
|
17
|
+
let m = n(() => ({
|
|
18
|
+
namespaces: t,
|
|
19
|
+
templates: i,
|
|
20
|
+
isNamespacesExhausted: a,
|
|
21
|
+
namespaceNextMarker: s,
|
|
22
|
+
templateNextMarker: c,
|
|
23
|
+
isFetching: l,
|
|
24
|
+
isFetchingMore: u,
|
|
25
|
+
initialLoadError: d,
|
|
26
|
+
browseError: f,
|
|
27
|
+
loadMoreError: p
|
|
28
|
+
}), [
|
|
29
|
+
t,
|
|
30
|
+
i,
|
|
31
|
+
a,
|
|
32
|
+
s,
|
|
33
|
+
c,
|
|
34
|
+
l,
|
|
35
|
+
u,
|
|
36
|
+
d,
|
|
37
|
+
f,
|
|
38
|
+
p
|
|
39
|
+
]);
|
|
40
|
+
return /* @__PURE__ */ r(o.Provider, {
|
|
41
|
+
value: m,
|
|
42
|
+
children: e
|
|
43
|
+
});
|
|
49
44
|
}
|
|
50
|
-
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
45
|
+
var c = /* @__PURE__ */ t(null);
|
|
46
|
+
function l({ children: e, searchValue: t, searchQuery: i, searchResults: a, searchNextMarker: o, isFetchingSearch: s, searchError: l }) {
|
|
47
|
+
let u = n(() => ({
|
|
48
|
+
searchValue: t,
|
|
49
|
+
searchQuery: i,
|
|
50
|
+
searchResults: a,
|
|
51
|
+
searchNextMarker: o,
|
|
52
|
+
isFetchingSearch: s,
|
|
53
|
+
searchError: l
|
|
54
|
+
}), [
|
|
55
|
+
t,
|
|
56
|
+
i,
|
|
57
|
+
a,
|
|
58
|
+
o,
|
|
59
|
+
s,
|
|
60
|
+
l
|
|
61
|
+
]);
|
|
62
|
+
return /* @__PURE__ */ r(c.Provider, {
|
|
63
|
+
value: u,
|
|
64
|
+
children: e
|
|
65
|
+
});
|
|
72
66
|
}
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}), [t]);
|
|
81
|
-
return /* @__PURE__ */ C(m.Provider, {
|
|
82
|
-
value: o,
|
|
83
|
-
children: n
|
|
84
|
-
});
|
|
67
|
+
var u = /* @__PURE__ */ t(null);
|
|
68
|
+
function d({ children: e, selectedTemplateId: t }) {
|
|
69
|
+
let i = n(() => ({ selectedTemplateId: t }), [t]);
|
|
70
|
+
return /* @__PURE__ */ r(u.Provider, {
|
|
71
|
+
value: i,
|
|
72
|
+
children: e
|
|
73
|
+
});
|
|
85
74
|
}
|
|
86
|
-
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return /* @__PURE__ */ C(A.Provider, {
|
|
97
|
-
value: e,
|
|
98
|
-
children: n
|
|
99
|
-
});
|
|
75
|
+
var f = /* @__PURE__ */ t(null);
|
|
76
|
+
function p({ children: e, isLoading: t = !1, isDisabled: i = !1 }) {
|
|
77
|
+
let a = n(() => ({
|
|
78
|
+
isLoading: t,
|
|
79
|
+
isDisabled: i
|
|
80
|
+
}), [t, i]);
|
|
81
|
+
return /* @__PURE__ */ r(f.Provider, {
|
|
82
|
+
value: a,
|
|
83
|
+
children: e
|
|
84
|
+
});
|
|
100
85
|
}
|
|
101
|
-
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
levelCache: u
|
|
109
|
-
}) {
|
|
110
|
-
const v = d(t, o, e, r, u);
|
|
111
|
-
return /* @__PURE__ */ C(j.Provider, {
|
|
112
|
-
value: v,
|
|
113
|
-
children: n
|
|
114
|
-
});
|
|
86
|
+
var m = /* @__PURE__ */ t(null);
|
|
87
|
+
function h({ children: t, itemsServiceRef: n, eventServiceRef: i, stateRef: a, dispatch: o, levelCache: s }) {
|
|
88
|
+
let c = e(n, i, a, o, s);
|
|
89
|
+
return /* @__PURE__ */ r(m.Provider, {
|
|
90
|
+
value: c,
|
|
91
|
+
children: t
|
|
92
|
+
});
|
|
115
93
|
}
|
|
116
|
-
export {
|
|
117
|
-
s as BrowseStateContext,
|
|
118
|
-
J as BrowseStateContextProvider,
|
|
119
|
-
j as BrowserActionsContext,
|
|
120
|
-
U as BrowserActionsContextProvider,
|
|
121
|
-
A as ConsumerStateContext,
|
|
122
|
-
T as ConsumerStateContextProvider,
|
|
123
|
-
B as NavigationStateContext,
|
|
124
|
-
H as NavigationStateContextProvider,
|
|
125
|
-
w as SearchStateContext,
|
|
126
|
-
K as SearchStateContextProvider,
|
|
127
|
-
m as SelectionStateContext,
|
|
128
|
-
O as SelectionStateContextProvider
|
|
129
|
-
};
|
|
94
|
+
export { o as BrowseStateContext, s as BrowseStateContextProvider, m as BrowserActionsContext, h as BrowserActionsContextProvider, f as ConsumerStateContext, p as ConsumerStateContextProvider, i as NavigationStateContext, a as NavigationStateContextProvider, c as SearchStateContext, l as SearchStateContextProvider, u as SelectionStateContext, d as SelectionStateContextProvider };
|
|
@@ -1,46 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return t;
|
|
1
|
+
import { BrowseStateContext as e, BrowserActionsContext as t, ConsumerStateContext as n, NavigationStateContext as r, SearchStateContext as i, SelectionStateContext as a } from "./contexts.js";
|
|
2
|
+
import { useContext as o } from "react";
|
|
3
|
+
function s() {
|
|
4
|
+
let e = o(r);
|
|
5
|
+
if (e === null) throw Error("useNavigationState must be used within a MetadataTemplateBrowserProvider");
|
|
6
|
+
return e;
|
|
8
7
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return t;
|
|
8
|
+
function c() {
|
|
9
|
+
let t = o(e);
|
|
10
|
+
if (t === null) throw Error("useBrowseState must be used within a MetadataTemplateBrowserProvider");
|
|
11
|
+
return t;
|
|
14
12
|
}
|
|
15
13
|
function l() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return t;
|
|
14
|
+
let e = o(i);
|
|
15
|
+
if (e === null) throw Error("useSearchState must be used within a MetadataTemplateBrowserProvider");
|
|
16
|
+
return e;
|
|
20
17
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return t;
|
|
18
|
+
function u() {
|
|
19
|
+
let e = o(a);
|
|
20
|
+
if (e === null) throw Error("useSelectionState must be used within a MetadataTemplateBrowserProvider");
|
|
21
|
+
return e;
|
|
26
22
|
}
|
|
27
23
|
function d() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return t;
|
|
24
|
+
let e = o(n);
|
|
25
|
+
if (e === null) throw Error("useConsumerState must be used within a ConsumerStateContextProvider");
|
|
26
|
+
return e;
|
|
32
27
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return t;
|
|
28
|
+
function f() {
|
|
29
|
+
let e = o(t);
|
|
30
|
+
if (e === null) throw Error("useBrowserActions must be used within a MetadataTemplateBrowserProvider");
|
|
31
|
+
return e;
|
|
38
32
|
}
|
|
39
|
-
export {
|
|
40
|
-
S as useBrowseState,
|
|
41
|
-
h as useBrowserActions,
|
|
42
|
-
d as useConsumerState,
|
|
43
|
-
c as useNavigationState,
|
|
44
|
-
l as useSearchState,
|
|
45
|
-
m as useSelectionState
|
|
46
|
-
};
|
|
33
|
+
export { c as useBrowseState, f as useBrowserActions, d as useConsumerState, s as useNavigationState, l as useSearchState, u as useSelectionState };
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { browserReducer as
|
|
2
|
-
import { ConsumerStateContext as
|
|
1
|
+
import { browserReducer as e, initialState as t } from "./reducer.js";
|
|
2
|
+
import { ConsumerStateContext as n, ConsumerStateContextProvider as r } from "./contexts.js";
|
|
3
3
|
import { MetadataTemplateBrowserProvider as i } from "./provider.js";
|
|
4
|
-
import { useBrowseState as
|
|
5
|
-
export {
|
|
6
|
-
s as ConsumerStateContext,
|
|
7
|
-
u as ConsumerStateContextProvider,
|
|
8
|
-
i as MetadataTemplateBrowserProvider,
|
|
9
|
-
r as browserReducer,
|
|
10
|
-
o as initialState,
|
|
11
|
-
m as useBrowseState,
|
|
12
|
-
x as useBrowserActions,
|
|
13
|
-
p as useConsumerState,
|
|
14
|
-
C as useNavigationState,
|
|
15
|
-
c as useSearchState,
|
|
16
|
-
d as useSelectionState
|
|
17
|
-
};
|
|
4
|
+
import { useBrowseState as a, useBrowserActions as o, useConsumerState as s, useNavigationState as c, useSearchState as l, useSelectionState as u } from "./hooks.js";
|
|
5
|
+
export { n as ConsumerStateContext, r as ConsumerStateContextProvider, i as MetadataTemplateBrowserProvider, e as browserReducer, t as initialState, a as useBrowseState, o as useBrowserActions, s as useConsumerState, c as useNavigationState, l as useSearchState, u as useSelectionState };
|
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
children: n
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
});
|
|
1
|
+
import { browserReducer as e, initialState as t } from "./reducer.js";
|
|
2
|
+
import { BrowseStateContextProvider as n, BrowserActionsContextProvider as r, NavigationStateContextProvider as i, SearchStateContextProvider as a, SelectionStateContextProvider as o } from "./contexts.js";
|
|
3
|
+
import { useReducer as s, useRef as c } from "react";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
function u({ children: u, namespaceFQN: d, itemsService: f, eventService: p, initialSelectedTemplateId: m }) {
|
|
6
|
+
let [h, g] = s(e, {
|
|
7
|
+
...t,
|
|
8
|
+
namespaceFQN: d,
|
|
9
|
+
selectedTemplateId: m ?? null
|
|
10
|
+
}), _ = c(h);
|
|
11
|
+
_.current = h;
|
|
12
|
+
let v = c(/* @__PURE__ */ new Map()), y = c(f);
|
|
13
|
+
y.current = f;
|
|
14
|
+
let b = c(p);
|
|
15
|
+
return b.current = p, /* @__PURE__ */ l(i, {
|
|
16
|
+
namespaceFQN: h.namespaceFQN,
|
|
17
|
+
path: h.path,
|
|
18
|
+
children: /* @__PURE__ */ l(n, {
|
|
19
|
+
namespaces: h.namespaces,
|
|
20
|
+
templates: h.templates,
|
|
21
|
+
isNamespacesExhausted: h.isNamespacesExhausted,
|
|
22
|
+
namespaceNextMarker: h.namespaceNextMarker,
|
|
23
|
+
templateNextMarker: h.templateNextMarker,
|
|
24
|
+
isFetching: h.isFetching,
|
|
25
|
+
isFetchingMore: h.isFetchingMore,
|
|
26
|
+
initialLoadError: h.initialLoadError,
|
|
27
|
+
browseError: h.browseError,
|
|
28
|
+
loadMoreError: h.loadMoreError,
|
|
29
|
+
children: /* @__PURE__ */ l(a, {
|
|
30
|
+
searchValue: h.searchValue,
|
|
31
|
+
searchQuery: h.searchQuery,
|
|
32
|
+
searchResults: h.searchResults,
|
|
33
|
+
searchNextMarker: h.searchNextMarker,
|
|
34
|
+
isFetchingSearch: h.isFetchingSearch,
|
|
35
|
+
searchError: h.searchError,
|
|
36
|
+
children: /* @__PURE__ */ l(o, {
|
|
37
|
+
selectedTemplateId: h.selectedTemplateId,
|
|
38
|
+
children: /* @__PURE__ */ l(r, {
|
|
39
|
+
itemsServiceRef: y,
|
|
40
|
+
eventServiceRef: b,
|
|
41
|
+
stateRef: _,
|
|
42
|
+
dispatch: g,
|
|
43
|
+
levelCache: v,
|
|
44
|
+
children: u
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
56
50
|
}
|
|
57
|
-
export {
|
|
58
|
-
w as MetadataTemplateBrowserProvider
|
|
59
|
-
};
|
|
51
|
+
export { u as MetadataTemplateBrowserProvider };
|