@itwin/presentation-hierarchies-react 2.0.0-alpha.52 → 2.0.0-alpha.54
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/CHANGELOG.md +33 -0
- package/lib/esm/presentation-hierarchies-react/Renderers.d.ts +62 -55
- package/lib/esm/presentation-hierarchies-react/Renderers.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/TreeNode.d.ts +33 -29
- package/lib/esm/presentation-hierarchies-react/TreeNode.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseIModelTree.d.ts +27 -16
- package/lib/esm/presentation-hierarchies-react/UseIModelTree.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseIModelTree.js +181 -54
- package/lib/esm/presentation-hierarchies-react/UseIModelTree.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.d.ts +12 -6
- package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.js +54 -49
- package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.d.ts +7 -30
- package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.js +116 -74
- package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseTree.d.ts +67 -54
- package/lib/esm/presentation-hierarchies-react/UseTree.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/UseTree.js +283 -226
- package/lib/esm/presentation-hierarchies-react/UseTree.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/Utils.js +44 -27
- package/lib/esm/presentation-hierarchies-react/Utils.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.js +6 -7
- package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeActions.js +271 -298
- package/lib/esm/presentation-hierarchies-react/internal/TreeActions.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.js +91 -82
- package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeModel.d.ts +3 -47
- package/lib/esm/presentation-hierarchies-react/internal/TreeModel.js +114 -151
- package/lib/esm/presentation-hierarchies-react/internal/TreeModel.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.d.ts +32 -37
- package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.js +128 -101
- package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/internal/Utils.js +29 -44
- package/lib/esm/presentation-hierarchies-react/internal/Utils.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.d.ts +24 -13
- package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.js +344 -67
- package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.d.ts +16 -15
- package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.js +78 -60
- package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.d.ts +122 -117
- package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.js +59 -38
- package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.d.ts +16 -5
- package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.js +161 -35
- package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.d.ts +21 -17
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.js +84 -31
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.d.ts +22 -14
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.js +61 -26
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.d.ts +15 -6
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.js +75 -25
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.d.ts +16 -40
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.js +140 -61
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts +14 -42
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js +489 -121
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.d.ts +58 -55
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.js +412 -181
- package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.js.map +1 -1
- package/lib/esm/presentation-hierarchies-react.d.ts +17 -17
- package/lib/esm/presentation-hierarchies-react.js +15 -18
- package/package.json +17 -14
- package/lib/esm/presentation-hierarchies-react/Renderers.js +0 -6
- package/lib/esm/presentation-hierarchies-react/Renderers.js.map +0 -1
- package/lib/esm/presentation-hierarchies-react/TreeNode.js +0 -6
- package/lib/esm/presentation-hierarchies-react/TreeNode.js.map +0 -1
- package/lib/esm/presentation-hierarchies-react/Utils.d.ts +0 -8
- package/lib/esm/presentation-hierarchies-react/Utils.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.d.ts +0 -2
- package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeActions.d.ts +0 -53
- package/lib/esm/presentation-hierarchies-react/internal/TreeActions.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.d.ts +0 -62
- package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react/internal/TreeModel.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react/internal/Utils.d.ts +0 -23
- package/lib/esm/presentation-hierarchies-react/internal/Utils.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies-react.js.map +0 -1
|
@@ -1,74 +1,351 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
import { Anchor, Text } from "@stratakit/bricks";
|
|
7
|
-
import { unstable_ErrorRegion as ErrorRegion } from "@stratakit/structures";
|
|
8
1
|
import { MAX_LIMIT_OVERRIDE } from "../internal/Utils.js";
|
|
9
2
|
import { useLocalizationContext } from "./LocalizationContext.js";
|
|
3
|
+
import { c } from "react-compiler-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { unstable_ErrorRegion } from "@stratakit/structures";
|
|
6
|
+
import { Anchor, Text } from "@stratakit/bricks";
|
|
7
|
+
|
|
8
|
+
//#region src/presentation-hierarchies-react/stratakit/ErrorItemRenderer.tsx
|
|
10
9
|
/**
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
10
|
+
* Renders StrataKit `<ErrorRegion.Item />` for all supported error types:
|
|
11
|
+
* - `ResultSetTooLarge` - renders `LocalizedStrings.resultLimitExceeded` message with actions to increase limit or apply filtering
|
|
12
|
+
* - `NoFilterMatches` - renders `LocalizedStrings.noFilteredChildren` message with action to change filter
|
|
13
|
+
* - `ChildrenLoad` - renders `LocalizedStrings.failedToCreateHierarchy` message with action to retry loading
|
|
14
|
+
* - `Unknown` - renders message set on error object.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
function ErrorItemRenderer(t0) {
|
|
19
|
+
const $ = c(73);
|
|
20
|
+
const { errorNode, getHierarchyLevelDetails, filterHierarchyLevel, reloadTree, scrollToNode } = t0;
|
|
21
|
+
const { localizedStrings } = useLocalizationContext();
|
|
22
|
+
if (errorNode.error.type === "ResultSetTooLarge") {
|
|
23
|
+
const limit = errorNode.error.resultSetSizeLimit;
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[0] !== errorNode.id || $[1] !== getHierarchyLevelDetails) {
|
|
26
|
+
t1 = () => getHierarchyLevelDetails(errorNode.id)?.setSizeLimit(MAX_LIMIT_OVERRIDE);
|
|
27
|
+
$[0] = errorNode.id;
|
|
28
|
+
$[1] = getHierarchyLevelDetails;
|
|
29
|
+
$[2] = t1;
|
|
30
|
+
} else t1 = $[2];
|
|
31
|
+
const onOverrideLimit = t1;
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[3] !== onOverrideLimit) {
|
|
34
|
+
t2 = () => {
|
|
35
|
+
onOverrideLimit();
|
|
36
|
+
};
|
|
37
|
+
$[3] = onOverrideLimit;
|
|
38
|
+
$[4] = t2;
|
|
39
|
+
} else t2 = $[4];
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[5] !== localizedStrings.increaseHierarchyLimit) {
|
|
42
|
+
t3 = localizedStrings.increaseHierarchyLimit.replace("{{limit}}", MAX_LIMIT_OVERRIDE.toString());
|
|
43
|
+
$[5] = localizedStrings.increaseHierarchyLimit;
|
|
44
|
+
$[6] = t3;
|
|
45
|
+
} else t3 = $[6];
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[7] !== limit) {
|
|
48
|
+
t4 = () => limit < MAX_LIMIT_OVERRIDE;
|
|
49
|
+
$[7] = limit;
|
|
50
|
+
$[8] = t4;
|
|
51
|
+
} else t4 = $[8];
|
|
52
|
+
let t5;
|
|
53
|
+
if ($[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
|
|
54
|
+
t5 = {
|
|
55
|
+
action: t2,
|
|
56
|
+
label: t3,
|
|
57
|
+
condition: t4
|
|
58
|
+
};
|
|
59
|
+
$[9] = t2;
|
|
60
|
+
$[10] = t3;
|
|
61
|
+
$[11] = t4;
|
|
62
|
+
$[12] = t5;
|
|
63
|
+
} else t5 = $[12];
|
|
64
|
+
let t6;
|
|
65
|
+
if ($[13] !== errorNode.id || $[14] !== filterHierarchyLevel || $[15] !== getHierarchyLevelDetails) {
|
|
66
|
+
t6 = () => {
|
|
67
|
+
const hierarchyLevelDetails = getHierarchyLevelDetails(errorNode.id);
|
|
68
|
+
hierarchyLevelDetails && filterHierarchyLevel?.(hierarchyLevelDetails);
|
|
69
|
+
};
|
|
70
|
+
$[13] = errorNode.id;
|
|
71
|
+
$[14] = filterHierarchyLevel;
|
|
72
|
+
$[15] = getHierarchyLevelDetails;
|
|
73
|
+
$[16] = t6;
|
|
74
|
+
} else t6 = $[16];
|
|
75
|
+
let t7;
|
|
76
|
+
if ($[17] !== errorNode.isFilterable || $[18] !== filterHierarchyLevel) {
|
|
77
|
+
t7 = () => !!filterHierarchyLevel && !!errorNode.isFilterable;
|
|
78
|
+
$[17] = errorNode.isFilterable;
|
|
79
|
+
$[18] = filterHierarchyLevel;
|
|
80
|
+
$[19] = t7;
|
|
81
|
+
} else t7 = $[19];
|
|
82
|
+
let t8;
|
|
83
|
+
if ($[20] !== localizedStrings.increaseHierarchyLimitWithFiltering || $[21] !== t6 || $[22] !== t7) {
|
|
84
|
+
t8 = {
|
|
85
|
+
action: t6,
|
|
86
|
+
label: localizedStrings.increaseHierarchyLimitWithFiltering,
|
|
87
|
+
condition: t7
|
|
88
|
+
};
|
|
89
|
+
$[20] = localizedStrings.increaseHierarchyLimitWithFiltering;
|
|
90
|
+
$[21] = t6;
|
|
91
|
+
$[22] = t7;
|
|
92
|
+
$[23] = t8;
|
|
93
|
+
} else t8 = $[23];
|
|
94
|
+
let t9;
|
|
95
|
+
if ($[24] !== t5 || $[25] !== t8) {
|
|
96
|
+
t9 = [t5, t8];
|
|
97
|
+
$[24] = t5;
|
|
98
|
+
$[25] = t8;
|
|
99
|
+
$[26] = t9;
|
|
100
|
+
} else t9 = $[26];
|
|
101
|
+
let t10;
|
|
102
|
+
if ($[27] !== limit || $[28] !== localizedStrings.resultLimitExceeded) {
|
|
103
|
+
t10 = localizedStrings.resultLimitExceeded.replace("{{limit}}", limit.toString());
|
|
104
|
+
$[27] = limit;
|
|
105
|
+
$[28] = localizedStrings.resultLimitExceeded;
|
|
106
|
+
$[29] = t10;
|
|
107
|
+
} else t10 = $[29];
|
|
108
|
+
let t11;
|
|
109
|
+
if ($[30] !== errorNode || $[31] !== scrollToNode) {
|
|
110
|
+
t11 = () => scrollToNode(errorNode);
|
|
111
|
+
$[30] = errorNode;
|
|
112
|
+
$[31] = scrollToNode;
|
|
113
|
+
$[32] = t11;
|
|
114
|
+
} else t11 = $[32];
|
|
115
|
+
let t12;
|
|
116
|
+
if ($[33] !== errorNode || $[34] !== t10 || $[35] !== t11 || $[36] !== t9) {
|
|
117
|
+
t12 = /* @__PURE__ */ jsx(ErrorItemContainer, {
|
|
118
|
+
errorNode,
|
|
119
|
+
actions: t9,
|
|
120
|
+
message: t10,
|
|
121
|
+
scrollToElement: t11
|
|
122
|
+
});
|
|
123
|
+
$[33] = errorNode;
|
|
124
|
+
$[34] = t10;
|
|
125
|
+
$[35] = t11;
|
|
126
|
+
$[36] = t9;
|
|
127
|
+
$[37] = t12;
|
|
128
|
+
} else t12 = $[37];
|
|
129
|
+
return t12;
|
|
130
|
+
}
|
|
131
|
+
if (errorNode.error.type === "NoFilterMatches") {
|
|
132
|
+
let t1;
|
|
133
|
+
if ($[38] !== errorNode.id || $[39] !== filterHierarchyLevel || $[40] !== getHierarchyLevelDetails) {
|
|
134
|
+
t1 = () => {
|
|
135
|
+
const hierarchyLevelDetails_0 = getHierarchyLevelDetails(errorNode.id);
|
|
136
|
+
hierarchyLevelDetails_0 && filterHierarchyLevel?.(hierarchyLevelDetails_0);
|
|
137
|
+
};
|
|
138
|
+
$[38] = errorNode.id;
|
|
139
|
+
$[39] = filterHierarchyLevel;
|
|
140
|
+
$[40] = getHierarchyLevelDetails;
|
|
141
|
+
$[41] = t1;
|
|
142
|
+
} else t1 = $[41];
|
|
143
|
+
let t2;
|
|
144
|
+
if ($[42] !== localizedStrings.noFilteredChildrenChangeFilter || $[43] !== t1) {
|
|
145
|
+
t2 = [{
|
|
146
|
+
action: t1,
|
|
147
|
+
label: localizedStrings.noFilteredChildrenChangeFilter,
|
|
148
|
+
condition: _temp
|
|
149
|
+
}];
|
|
150
|
+
$[42] = localizedStrings.noFilteredChildrenChangeFilter;
|
|
151
|
+
$[43] = t1;
|
|
152
|
+
$[44] = t2;
|
|
153
|
+
} else t2 = $[44];
|
|
154
|
+
let t3;
|
|
155
|
+
if ($[45] !== errorNode || $[46] !== scrollToNode) {
|
|
156
|
+
t3 = () => scrollToNode(errorNode);
|
|
157
|
+
$[45] = errorNode;
|
|
158
|
+
$[46] = scrollToNode;
|
|
159
|
+
$[47] = t3;
|
|
160
|
+
} else t3 = $[47];
|
|
161
|
+
let t4;
|
|
162
|
+
if ($[48] !== errorNode || $[49] !== localizedStrings.noFilteredChildren || $[50] !== t2 || $[51] !== t3) {
|
|
163
|
+
t4 = /* @__PURE__ */ jsx(ErrorItemContainer, {
|
|
164
|
+
errorNode,
|
|
165
|
+
actions: t2,
|
|
166
|
+
message: localizedStrings.noFilteredChildren,
|
|
167
|
+
scrollToElement: t3
|
|
168
|
+
});
|
|
169
|
+
$[48] = errorNode;
|
|
170
|
+
$[49] = localizedStrings.noFilteredChildren;
|
|
171
|
+
$[50] = t2;
|
|
172
|
+
$[51] = t3;
|
|
173
|
+
$[52] = t4;
|
|
174
|
+
} else t4 = $[52];
|
|
175
|
+
return t4;
|
|
176
|
+
}
|
|
177
|
+
if (errorNode.error.type === "ChildrenLoad") {
|
|
178
|
+
let t1;
|
|
179
|
+
if ($[53] !== errorNode.id || $[54] !== reloadTree) {
|
|
180
|
+
t1 = () => reloadTree({ parentNodeId: errorNode.id });
|
|
181
|
+
$[53] = errorNode.id;
|
|
182
|
+
$[54] = reloadTree;
|
|
183
|
+
$[55] = t1;
|
|
184
|
+
} else t1 = $[55];
|
|
185
|
+
let t2;
|
|
186
|
+
if ($[56] !== localizedStrings.retry || $[57] !== t1) {
|
|
187
|
+
t2 = [{
|
|
188
|
+
action: t1,
|
|
189
|
+
label: localizedStrings.retry,
|
|
190
|
+
condition: _temp2
|
|
191
|
+
}];
|
|
192
|
+
$[56] = localizedStrings.retry;
|
|
193
|
+
$[57] = t1;
|
|
194
|
+
$[58] = t2;
|
|
195
|
+
} else t2 = $[58];
|
|
196
|
+
let t3;
|
|
197
|
+
if ($[59] !== errorNode || $[60] !== scrollToNode) {
|
|
198
|
+
t3 = () => scrollToNode(errorNode);
|
|
199
|
+
$[59] = errorNode;
|
|
200
|
+
$[60] = scrollToNode;
|
|
201
|
+
$[61] = t3;
|
|
202
|
+
} else t3 = $[61];
|
|
203
|
+
let t4;
|
|
204
|
+
if ($[62] !== errorNode || $[63] !== localizedStrings.failedToCreateHierarchy || $[64] !== t2 || $[65] !== t3) {
|
|
205
|
+
t4 = /* @__PURE__ */ jsx(ErrorItemContainer, {
|
|
206
|
+
errorNode,
|
|
207
|
+
actions: t2,
|
|
208
|
+
message: localizedStrings.failedToCreateHierarchy,
|
|
209
|
+
scrollToElement: t3
|
|
210
|
+
});
|
|
211
|
+
$[62] = errorNode;
|
|
212
|
+
$[63] = localizedStrings.failedToCreateHierarchy;
|
|
213
|
+
$[64] = t2;
|
|
214
|
+
$[65] = t3;
|
|
215
|
+
$[66] = t4;
|
|
216
|
+
} else t4 = $[66];
|
|
217
|
+
return t4;
|
|
218
|
+
}
|
|
219
|
+
let t1;
|
|
220
|
+
if ($[67] !== errorNode || $[68] !== scrollToNode) {
|
|
221
|
+
t1 = () => scrollToNode(errorNode);
|
|
222
|
+
$[67] = errorNode;
|
|
223
|
+
$[68] = scrollToNode;
|
|
224
|
+
$[69] = t1;
|
|
225
|
+
} else t1 = $[69];
|
|
226
|
+
let t2;
|
|
227
|
+
if ($[70] !== errorNode || $[71] !== t1) {
|
|
228
|
+
t2 = /* @__PURE__ */ jsx(ErrorItemContainer, {
|
|
229
|
+
errorNode,
|
|
230
|
+
message: errorNode.error.message,
|
|
231
|
+
scrollToElement: t1
|
|
232
|
+
});
|
|
233
|
+
$[70] = errorNode;
|
|
234
|
+
$[71] = t1;
|
|
235
|
+
$[72] = t2;
|
|
236
|
+
} else t2 = $[72];
|
|
237
|
+
return t2;
|
|
238
|
+
}
|
|
239
|
+
function _temp2() {
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
function _temp() {
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
function ErrorItemContainer(t0) {
|
|
246
|
+
const $ = c(10);
|
|
247
|
+
const { errorNode, message, actions, scrollToElement } = t0;
|
|
248
|
+
let t1;
|
|
249
|
+
if ($[0] !== errorNode.label || $[1] !== message || $[2] !== scrollToElement) {
|
|
250
|
+
t1 = /* @__PURE__ */ jsx(MessageWithLink, {
|
|
251
|
+
linkLabel: errorNode.label,
|
|
252
|
+
scrollToElement,
|
|
253
|
+
message
|
|
254
|
+
});
|
|
255
|
+
$[0] = errorNode.label;
|
|
256
|
+
$[1] = message;
|
|
257
|
+
$[2] = scrollToElement;
|
|
258
|
+
$[3] = t1;
|
|
259
|
+
} else t1 = $[3];
|
|
260
|
+
let t2;
|
|
261
|
+
if ($[4] !== actions) {
|
|
262
|
+
t2 = actions?.filter(_temp3).map(_temp4);
|
|
263
|
+
$[4] = actions;
|
|
264
|
+
$[5] = t2;
|
|
265
|
+
} else t2 = $[5];
|
|
266
|
+
let t3;
|
|
267
|
+
if ($[6] !== errorNode.id || $[7] !== t1 || $[8] !== t2) {
|
|
268
|
+
t3 = /* @__PURE__ */ jsx(unstable_ErrorRegion.Item, {
|
|
269
|
+
message: t1,
|
|
270
|
+
messageId: errorNode.id,
|
|
271
|
+
actions: t2
|
|
272
|
+
});
|
|
273
|
+
$[6] = errorNode.id;
|
|
274
|
+
$[7] = t1;
|
|
275
|
+
$[8] = t2;
|
|
276
|
+
$[9] = t3;
|
|
277
|
+
} else t3 = $[9];
|
|
278
|
+
return t3;
|
|
279
|
+
}
|
|
280
|
+
function _temp4(t0) {
|
|
281
|
+
const { label, action } = t0;
|
|
282
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
283
|
+
variant: "body-sm",
|
|
284
|
+
children: /* @__PURE__ */ jsx(Anchor, {
|
|
285
|
+
onClick: action,
|
|
286
|
+
render: /* @__PURE__ */ jsx("button", {}),
|
|
287
|
+
children: label
|
|
288
|
+
})
|
|
289
|
+
}, label);
|
|
64
290
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.map(({ label, action }) => (_jsx(Text, { variant: "body-sm", children: _jsx(Anchor, { onClick: action, render: _jsx("button", {}), children: label }) }, label))) }));
|
|
291
|
+
function _temp3(t0) {
|
|
292
|
+
const { condition } = t0;
|
|
293
|
+
return condition();
|
|
69
294
|
}
|
|
70
|
-
function MessageWithLink(
|
|
71
|
-
|
|
72
|
-
|
|
295
|
+
function MessageWithLink(t0) {
|
|
296
|
+
const $ = c(11);
|
|
297
|
+
const { linkLabel, scrollToElement, message } = t0;
|
|
298
|
+
let t1;
|
|
299
|
+
if ($[0] !== message) {
|
|
300
|
+
t1 = message.split("{{node}}", 2);
|
|
301
|
+
$[0] = message;
|
|
302
|
+
$[1] = t1;
|
|
303
|
+
} else t1 = $[1];
|
|
304
|
+
const splitMessage = t1;
|
|
305
|
+
let t2;
|
|
306
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
307
|
+
t2 = {
|
|
308
|
+
display: "flex",
|
|
309
|
+
whiteSpace: "pre",
|
|
310
|
+
flexWrap: "wrap"
|
|
311
|
+
};
|
|
312
|
+
$[2] = t2;
|
|
313
|
+
} else t2 = $[2];
|
|
314
|
+
let t3;
|
|
315
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
316
|
+
t3 = /* @__PURE__ */ jsx("button", {});
|
|
317
|
+
$[3] = t3;
|
|
318
|
+
} else t3 = $[3];
|
|
319
|
+
let t4;
|
|
320
|
+
if ($[4] !== linkLabel || $[5] !== scrollToElement) {
|
|
321
|
+
t4 = /* @__PURE__ */ jsx(Anchor, {
|
|
322
|
+
onClick: scrollToElement,
|
|
323
|
+
render: t3,
|
|
324
|
+
children: linkLabel
|
|
325
|
+
});
|
|
326
|
+
$[4] = linkLabel;
|
|
327
|
+
$[5] = scrollToElement;
|
|
328
|
+
$[6] = t4;
|
|
329
|
+
} else t4 = $[6];
|
|
330
|
+
const t5 = splitMessage[1] ? splitMessage[1] : null;
|
|
331
|
+
let t6;
|
|
332
|
+
if ($[7] !== splitMessage[0] || $[8] !== t4 || $[9] !== t5) {
|
|
333
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
334
|
+
style: t2,
|
|
335
|
+
children: [
|
|
336
|
+
splitMessage[0],
|
|
337
|
+
t4,
|
|
338
|
+
t5
|
|
339
|
+
]
|
|
340
|
+
});
|
|
341
|
+
$[7] = splitMessage[0];
|
|
342
|
+
$[8] = t4;
|
|
343
|
+
$[9] = t5;
|
|
344
|
+
$[10] = t6;
|
|
345
|
+
} else t6 = $[10];
|
|
346
|
+
return t6;
|
|
73
347
|
}
|
|
348
|
+
|
|
349
|
+
//#endregion
|
|
350
|
+
export { ErrorItemRenderer };
|
|
74
351
|
//# sourceMappingURL=ErrorItemRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorItemRenderer.js","sourceRoot":"","sources":["../../../../src/presentation-hierarchies-react/stratakit/ErrorItemRenderer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAclE;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,UAAU,EAAE,YAAY,EAA0B;IAC/I,MAAM,EAAE,gBAAgB,EAAE,GAAG,sBAAsB,EAAE,CAAC;IAEtD,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACjD,MAAM,eAAe,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9I,OAAO,CACL,KAAC,kBAAkB,IACjB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;gBACP;oBACE,MAAM,EAAE,GAAG,EAAE;wBACX,eAAe,EAAE,EAAE,CAAC;oBACtB,CAAC;oBACD,KAAK,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,WA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K,CAIT,CACR,CAAC,GACJ,CACH,CAAC;AACJ,CAAC;AAQD,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAwB;IACpF,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,aACjE,YAAY,CAAC,CAAC,CAAC,EAChB,KAAC,MAAM,IAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,kBAAU,YACjD,SAAS,GACH,EACR,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IACrC,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Anchor, Text } from \"@stratakit/bricks\";\nimport { unstable_ErrorRegion as ErrorRegion } from \"@stratakit/structures\";\nimport { MAX_LIMIT_OVERRIDE } from \"../internal/Utils.js\";\nimport { HierarchyLevelDetails, TreeRendererProps } from \"../Renderers.js\";\nimport { TreeNode } from \"../TreeNode.js\";\nimport { useErrorNodes } from \"./FlatTreeNode.js\";\nimport { useLocalizationContext } from \"./LocalizationContext.js\";\n\n/** @alpha */\nexport interface ErrorItemRendererProps extends Pick<TreeRendererProps, \"getHierarchyLevelDetails\"> {\n /** A node containing an error. */\n errorNode: ReturnType<typeof useErrorNodes>[number];\n /** A callback to reload a hierarchy level when an error occurs and `retry` button is clicked. */\n reloadTree: (options: { parentNodeId: string | undefined }) => void;\n /** A callback to scroll to the node associated with the error. */\n scrollToNode: (errorNode: TreeNode) => void;\n /** A callback to initiate filtering of the given hierarchy level. */\n filterHierarchyLevel?: (hierarchyLevelDetails: HierarchyLevelDetails) => void;\n}\n\n/**\n * Renders StrataKit `<ErrorRegion.Item />` for all supported error types:\n * - `ResultSetTooLarge` - renders `LocalizedStrings.resultLimitExceeded` message with actions to increase limit or apply filtering\n * - `NoFilterMatches` - renders `LocalizedStrings.noFilteredChildren` message with action to change filter\n * - `ChildrenLoad` - renders `LocalizedStrings.failedToCreateHierarchy` message with action to retry loading\n * - `Unknown` - renders message set on error object.\n *\n * @alpha\n */\nexport function ErrorItemRenderer({ errorNode, getHierarchyLevelDetails, filterHierarchyLevel, reloadTree, scrollToNode }: ErrorItemRendererProps) {\n const { localizedStrings } = useLocalizationContext();\n\n if (errorNode.error.type === \"ResultSetTooLarge\") {\n const limit = errorNode.error.resultSetSizeLimit;\n const onOverrideLimit = getHierarchyLevelDetails ? () => getHierarchyLevelDetails(errorNode.id)?.setSizeLimit(MAX_LIMIT_OVERRIDE) : undefined;\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => {\n onOverrideLimit?.();\n },\n label: localizedStrings.increaseHierarchyLimit.replace(\"{{limit}}\", MAX_LIMIT_OVERRIDE.toString()),\n condition: () => !!onOverrideLimit && limit < MAX_LIMIT_OVERRIDE,\n },\n {\n action: () => {\n const hierarchyLevelDetails = getHierarchyLevelDetails?.(errorNode.id);\n hierarchyLevelDetails && filterHierarchyLevel?.(hierarchyLevelDetails);\n },\n label: localizedStrings.increaseHierarchyLimitWithFiltering,\n condition: () => !!filterHierarchyLevel && !!errorNode?.isFilterable,\n },\n ]}\n message={localizedStrings.resultLimitExceeded.replace(\"{{limit}}\", limit.toString())}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n if (errorNode.error.type === \"NoFilterMatches\") {\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => {\n const hierarchyLevelDetails = getHierarchyLevelDetails?.(errorNode.id);\n hierarchyLevelDetails && filterHierarchyLevel?.(hierarchyLevelDetails);\n },\n label: localizedStrings.noFilteredChildrenChangeFilter,\n condition: () => true,\n },\n ]}\n message={localizedStrings.noFilteredChildren}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n if (errorNode.error.type === \"ChildrenLoad\") {\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => reloadTree({ parentNodeId: errorNode.id }),\n label: localizedStrings.retry,\n condition: () => true,\n },\n ]}\n message={localizedStrings.failedToCreateHierarchy}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n\n return <ErrorItemContainer errorNode={errorNode} message={errorNode.error.message} scrollToElement={() => scrollToNode(errorNode)} />;\n}\n\ntype ErrorItemContainerProps = {\n errorNode: TreeNode;\n message: string;\n actions?: { action: () => void; label: string; condition: () => boolean }[];\n} & Pick<MessageWithLinkProps, \"scrollToElement\">;\n\nfunction ErrorItemContainer({ errorNode, message, actions, scrollToElement }: ErrorItemContainerProps) {\n return (\n <ErrorRegion.Item\n message={<MessageWithLink linkLabel={errorNode.label} scrollToElement={scrollToElement} message={message} />}\n messageId={errorNode.id}\n actions={actions\n ?.filter(({ condition }) => condition())\n .map(({ label, action }) => (\n <Text key={label} variant=\"body-sm\">\n <Anchor onClick={action} render={<button />}>\n {label}\n </Anchor>\n </Text>\n ))}\n />\n );\n}\n\ninterface MessageWithLinkProps {\n scrollToElement: () => void;\n message: string;\n linkLabel?: string;\n}\n\nfunction MessageWithLink({ linkLabel, scrollToElement, message }: MessageWithLinkProps) {\n const splitMessage = message.split(\"{{node}}\", 2);\n return (\n <div style={{ display: \"flex\", whiteSpace: \"pre\", flexWrap: \"wrap\" }}>\n {splitMessage[0]}\n <Anchor onClick={scrollToElement} render={<button />}>\n {linkLabel}\n </Anchor>\n {splitMessage[1] ? splitMessage[1] : null}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ErrorItemRenderer.js","names":["Anchor","Text","unstable_ErrorRegion","ErrorRegion","MAX_LIMIT_OVERRIDE","useLocalizationContext","JSX","HierarchyLevelDetails","TreeRendererProps","TreeNode","useErrorNodes","ErrorItemRendererProps","Pick","errorNode","ReturnType","reloadTree","options","parentNodeId","scrollToNode","filterHierarchyLevel","hierarchyLevelDetails","ErrorItemRenderer","t0","$","_c","getHierarchyLevelDetails","localizedStrings","error","type","limit","resultSetSizeLimit","t1","id","setSizeLimit","onOverrideLimit","t2","t3","increaseHierarchyLimit","replace","toString","t4","t5","action","label","condition","t6","t7","isFilterable","t8","increaseHierarchyLimitWithFiltering","t9","t10","resultLimitExceeded","t11","t12","hierarchyLevelDetails_0","noFilteredChildrenChangeFilter","_temp","noFilteredChildren","retry","_temp2","failedToCreateHierarchy","message","ErrorItemContainerProps","actions","MessageWithLinkProps","ErrorItemContainer","scrollToElement","filter","_temp3","map","_temp4","linkLabel","MessageWithLink","split","splitMessage","Symbol","for","display","whiteSpace","flexWrap"],"sources":["../../../../src/presentation-hierarchies-react/stratakit/ErrorItemRenderer.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Anchor, Text } from \"@stratakit/bricks\";\nimport { unstable_ErrorRegion as ErrorRegion } from \"@stratakit/structures\";\nimport { MAX_LIMIT_OVERRIDE } from \"../internal/Utils.js\";\nimport { useLocalizationContext } from \"./LocalizationContext.js\";\n\nimport type { JSX } from \"react\";\nimport type { HierarchyLevelDetails, TreeRendererProps } from \"../Renderers.js\";\nimport type { TreeNode } from \"../TreeNode.js\";\nimport type { useErrorNodes } from \"./FlatTreeNode.js\";\n\n/** @alpha */\nexport interface ErrorItemRendererProps extends Pick<TreeRendererProps, \"getHierarchyLevelDetails\"> {\n /** A node containing an error. */\n errorNode: ReturnType<typeof useErrorNodes>[number];\n /** A callback to reload a hierarchy level when an error occurs and `retry` button is clicked. */\n reloadTree: (options: { parentNodeId: string | undefined }) => void;\n /** A callback to scroll to the node associated with the error. */\n scrollToNode: (errorNode: TreeNode) => void;\n /** A callback to initiate filtering of the given hierarchy level. */\n filterHierarchyLevel?: (hierarchyLevelDetails: HierarchyLevelDetails) => void;\n}\n\n/**\n * Renders StrataKit `<ErrorRegion.Item />` for all supported error types:\n * - `ResultSetTooLarge` - renders `LocalizedStrings.resultLimitExceeded` message with actions to increase limit or apply filtering\n * - `NoFilterMatches` - renders `LocalizedStrings.noFilteredChildren` message with action to change filter\n * - `ChildrenLoad` - renders `LocalizedStrings.failedToCreateHierarchy` message with action to retry loading\n * - `Unknown` - renders message set on error object.\n *\n * @alpha\n */\nexport function ErrorItemRenderer({\n errorNode,\n getHierarchyLevelDetails,\n filterHierarchyLevel,\n reloadTree,\n scrollToNode,\n}: ErrorItemRendererProps): JSX.Element {\n const { localizedStrings } = useLocalizationContext();\n\n if (errorNode.error.type === \"ResultSetTooLarge\") {\n const limit = errorNode.error.resultSetSizeLimit;\n const onOverrideLimit = () => getHierarchyLevelDetails(errorNode.id)?.setSizeLimit(MAX_LIMIT_OVERRIDE);\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => {\n onOverrideLimit();\n },\n label: localizedStrings.increaseHierarchyLimit.replace(\"{{limit}}\", MAX_LIMIT_OVERRIDE.toString()),\n condition: () => limit < MAX_LIMIT_OVERRIDE,\n },\n {\n action: () => {\n const hierarchyLevelDetails = getHierarchyLevelDetails(errorNode.id);\n hierarchyLevelDetails && filterHierarchyLevel?.(hierarchyLevelDetails);\n },\n label: localizedStrings.increaseHierarchyLimitWithFiltering,\n condition: () => !!filterHierarchyLevel && !!errorNode.isFilterable,\n },\n ]}\n message={localizedStrings.resultLimitExceeded.replace(\"{{limit}}\", limit.toString())}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n if (errorNode.error.type === \"NoFilterMatches\") {\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => {\n const hierarchyLevelDetails = getHierarchyLevelDetails(errorNode.id);\n hierarchyLevelDetails && filterHierarchyLevel?.(hierarchyLevelDetails);\n },\n label: localizedStrings.noFilteredChildrenChangeFilter,\n condition: () => true,\n },\n ]}\n message={localizedStrings.noFilteredChildren}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n if (errorNode.error.type === \"ChildrenLoad\") {\n return (\n <ErrorItemContainer\n errorNode={errorNode}\n actions={[\n {\n action: () => reloadTree({ parentNodeId: errorNode.id }),\n label: localizedStrings.retry,\n condition: () => true,\n },\n ]}\n message={localizedStrings.failedToCreateHierarchy}\n scrollToElement={() => scrollToNode(errorNode)}\n />\n );\n }\n\n return <ErrorItemContainer errorNode={errorNode} message={errorNode.error.message} scrollToElement={() => scrollToNode(errorNode)} />;\n}\n\ntype ErrorItemContainerProps = {\n errorNode: TreeNode;\n message: string;\n actions?: { action: () => void; label: string; condition: () => boolean }[];\n} & Pick<MessageWithLinkProps, \"scrollToElement\">;\n\nfunction ErrorItemContainer({ errorNode, message, actions, scrollToElement }: ErrorItemContainerProps) {\n return (\n <ErrorRegion.Item\n message={<MessageWithLink linkLabel={errorNode.label} scrollToElement={scrollToElement} message={message} />}\n messageId={errorNode.id}\n actions={actions\n ?.filter(({ condition }) => condition())\n .map(({ label, action }) => (\n <Text key={label} variant=\"body-sm\">\n <Anchor onClick={action} render={<button />}>\n {label}\n </Anchor>\n </Text>\n ))}\n />\n );\n}\n\ninterface MessageWithLinkProps {\n scrollToElement: () => void;\n message: string;\n linkLabel?: string;\n}\n\nfunction MessageWithLink({ linkLabel, scrollToElement, message }: MessageWithLinkProps) {\n const splitMessage = message.split(\"{{node}}\", 2);\n return (\n <div style={{ display: \"flex\", whiteSpace: \"pre\", flexWrap: \"wrap\" }}>\n {splitMessage[0]}\n <Anchor onClick={scrollToElement} render={<button />}>\n {linkLabel}\n </Anchor>\n {splitMessage[1] ? splitMessage[1] : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCA,SAAOqB,kBAAAC,IAAA;C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EAAA,OAAAqD,OAAAC,IAAA,4BAAA,EAAA;AAExBzC,OAAA,oBAAA,aAAU;AAAAb,IAAA,KAAAa;OAAAA,MAAAb,EAAA;CAAA,IAAAiB;AAAA,KAAAjB,EAAA,OAAAiD,aAAAjD,EAAA,OAAA4C,iBAAA;AAApD3B,OAAA,oBAAC;GAAgB2B,SAAAA;GAAyB,QAAA/B;aACvCoC;IACM;AAAAjD,IAAA,KAAAiD;AAAAjD,IAAA,KAAA4C;AAAA5C,IAAA,KAAAiB;OAAAA,MAAAjB,EAAA;CACR,MAAAkB,KAAAkC,aAAY,KAAMA,aAAY,KAA9B;CAAwC,IAAA9B;AAAA,KAAAtB,EAAA,OAAAoD,aAAA,MAAApD,EAAA,OAAAiB,MAAAjB,EAAA,OAAAkB,IAAA;AAL3CI,OAAA,qBAAA;GAAY,OAAAV;;IACTwC,aAAY;IACbnC;IAGCC;;IACG;AAAAlB,IAAA,KAAAoD,aAAA;AAAApD,IAAA,KAAAiB;AAAAjB,IAAA,KAAAkB;AAAAlB,IAAA,MAAAsB;OAAAA,MAAAtB,EAAA;AAAA,QANNsB"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { TreeNode } from "../TreeNode.js";
|
|
2
|
+
|
|
3
|
+
//#region src/presentation-hierarchies-react/stratakit/FlatTreeNode.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Placeholder item that is added to hierarchy as a child for a parent item while its child items are loading.
|
|
4
6
|
*
|
|
5
7
|
* @alpha
|
|
6
8
|
*/
|
|
7
9
|
interface FlatPlaceholderItem {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
id: string;
|
|
11
|
+
level: number;
|
|
12
|
+
placeholder: true;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* An item containing `TreeNode` node with properties needed for a flat tree structure.
|
|
14
16
|
*
|
|
15
17
|
* @alpha
|
|
16
18
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
interface FlatTreeNodeItem {
|
|
20
|
+
id: string;
|
|
21
|
+
level: number;
|
|
22
|
+
levelSize: number;
|
|
23
|
+
posInLevel: number;
|
|
24
|
+
node: TreeNode;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* An Item describing single tree item position and its content inside tree.
|
|
@@ -27,9 +29,7 @@ export interface FlatTreeNodeItem {
|
|
|
27
29
|
*
|
|
28
30
|
* @alpha
|
|
29
31
|
*/
|
|
30
|
-
|
|
31
|
-
/** @alpha */
|
|
32
|
-
export declare function isPlaceholderItem(item: FlatTreeItem): item is FlatPlaceholderItem;
|
|
32
|
+
type FlatTreeItem = FlatTreeNodeItem | FlatPlaceholderItem;
|
|
33
33
|
/**
|
|
34
34
|
* Used to get a list of `FlatTreeItem` objects for the given list of `TreeNode` objects that represent
|
|
35
35
|
* a hierarchical structure. The resulting items can be used to render the hierarchy in a flat manner, e.g. using a
|
|
@@ -37,12 +37,13 @@ export declare function isPlaceholderItem(item: FlatTreeItem): item is FlatPlace
|
|
|
37
37
|
*
|
|
38
38
|
* @alpha
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
declare function useFlatTreeItems(rootNodes: TreeNode[]): FlatTreeItem[];
|
|
41
41
|
/**
|
|
42
42
|
* Finds and returns all nodes containing errors in a given hierarchy.
|
|
43
43
|
*
|
|
44
44
|
* @alpha
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
declare function useErrorNodes(rootNodes: TreeNode[]): Array<TreeNode & Pick<Required<TreeNode>, "error">>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { FlatTreeItem, useErrorNodes, useFlatTreeItems };
|
|
48
49
|
//# sourceMappingURL=FlatTreeNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatTreeNode.d.ts","
|
|
1
|
+
{"version":3,"file":"FlatTreeNode.d.ts","names":[],"sources":["../../../../src/presentation-hierarchies-react/stratakit/FlatTreeNode.ts"],"mappings":";;;;;AAO+C;;;UAOrC,mBAAA;EACR,EAAA;EACA,KAAA;EACA,WAAA;AAAA;;AAQF;;;;UAAiB,gBAAA;EACf,EAAA;EACA,KAAA;EACA,SAAA;EACA,UAAA;EACA,IAAA,EAAM,QAAA;AAAA;;AASR;;;;;KAAY,YAAA,GAAe,gBAAA,GAAmB,mBAAA;;;;;;;AAyC9C;iBA3BgB,gBAAA,CAAiB,SAAA,EAAW,QAAA,KAAU,YAAA;;;;;;iBA2BtC,aAAA,CAAc,SAAA,EAAW,QAAA,KAAa,KAAA,CAAM,QAAA,GAAW,IAAA,CAAK,QAAA,CAAS,QAAA"}
|