@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,73 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { useMemo } from "react";
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/presentation-hierarchies-react/stratakit/FlatTreeNode.ts
|
|
6
4
|
/** @alpha */
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function isPlaceholderItem(item) {
|
|
6
|
+
return "placeholder" in item;
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
* Used to get a list of `FlatTreeItem` objects for the given list of `TreeNode` objects that represent
|
|
10
|
+
* a hierarchical structure. The resulting items can be used to render the hierarchy in a flat manner, e.g. using a
|
|
11
|
+
* virtualized list.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
function useFlatTreeItems(rootNodes) {
|
|
16
|
+
const $ = c(2);
|
|
17
|
+
let t0;
|
|
18
|
+
if ($[0] !== rootNodes) {
|
|
19
|
+
t0 = getFlatItems(rootNodes, 1);
|
|
20
|
+
$[0] = rootNodes;
|
|
21
|
+
$[1] = t0;
|
|
22
|
+
} else t0 = $[1];
|
|
23
|
+
return t0;
|
|
19
24
|
}
|
|
20
25
|
function getFlatItems(nodes, level) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const flatItems = [];
|
|
27
|
+
nodes.forEach((node, index) => {
|
|
28
|
+
flatItems.push({
|
|
29
|
+
node,
|
|
30
|
+
id: node.id,
|
|
31
|
+
level,
|
|
32
|
+
levelSize: nodes.length,
|
|
33
|
+
posInLevel: index + 1
|
|
34
|
+
});
|
|
35
|
+
if (!node.isExpanded || node.error) return;
|
|
36
|
+
if (node.children !== true) {
|
|
37
|
+
const childNodes = getFlatItems(node.children, level + 1);
|
|
38
|
+
flatItems.push(...childNodes);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
flatItems.push({
|
|
42
|
+
id: `${node.id}-children-placeholder`,
|
|
43
|
+
level: level + 1,
|
|
44
|
+
placeholder: true
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
return flatItems;
|
|
35
48
|
}
|
|
36
49
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
* Finds and returns all nodes containing errors in a given hierarchy.
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
*/
|
|
54
|
+
function useErrorNodes(rootNodes) {
|
|
55
|
+
const $ = c(2);
|
|
56
|
+
let t0;
|
|
57
|
+
if ($[0] !== rootNodes) {
|
|
58
|
+
t0 = rootNodes.flatMap(_temp);
|
|
59
|
+
$[0] = rootNodes;
|
|
60
|
+
$[1] = t0;
|
|
61
|
+
} else t0 = $[1];
|
|
62
|
+
return t0;
|
|
63
|
+
}
|
|
64
|
+
function _temp(rootNode) {
|
|
65
|
+
if (isErrorNode(rootNode)) return [rootNode];
|
|
66
|
+
if (rootNode.children === true) return [];
|
|
67
|
+
return getErrorNodes(rootNode);
|
|
51
68
|
}
|
|
52
69
|
function getErrorNodes(parent) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
return errorList;
|
|
70
|
+
const errorList = [];
|
|
71
|
+
if (parent.children === true) return [];
|
|
72
|
+
parent.children.forEach((node) => {
|
|
73
|
+
if (isErrorNode(node)) {
|
|
74
|
+
errorList.push(node);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (node.children !== true) {
|
|
78
|
+
const childErrorList = getErrorNodes(node);
|
|
79
|
+
errorList.push(...childErrorList);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return errorList;
|
|
69
84
|
}
|
|
70
85
|
function isErrorNode(node) {
|
|
71
|
-
|
|
86
|
+
return node.error !== void 0;
|
|
72
87
|
}
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
export { isPlaceholderItem, useErrorNodes, useFlatTreeItems };
|
|
73
91
|
//# sourceMappingURL=FlatTreeNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatTreeNode.js","
|
|
1
|
+
{"version":3,"file":"FlatTreeNode.js","names":["useMemo","TreeNode","FlatPlaceholderItem","id","level","placeholder","FlatTreeNodeItem","levelSize","posInLevel","node","FlatTreeItem","isPlaceholderItem","item","useFlatTreeItems","rootNodes","$","_c","t0","getFlatItems","nodes","flatItems","forEach","index","push","length","isExpanded","error","children","childNodes","useErrorNodes","flatMap","_temp","rootNode","isErrorNode","getErrorNodes","parent","errorList","ReturnType","childErrorList","Pick","Required","undefined"],"sources":["../../../../src/presentation-hierarchies-react/stratakit/FlatTreeNode.ts"],"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 { useMemo } from \"react\";\n\nimport type { TreeNode } from \"../TreeNode.js\";\n\n/**\n * Placeholder item that is added to hierarchy as a child for a parent item while its child items are loading.\n *\n * @alpha\n */\ninterface FlatPlaceholderItem {\n id: string;\n level: number;\n placeholder: true;\n}\n\n/**\n * An item containing `TreeNode` node with properties needed for a flat tree structure.\n *\n * @alpha\n */\nexport interface FlatTreeNodeItem {\n id: string;\n level: number;\n levelSize: number;\n posInLevel: number;\n node: TreeNode;\n}\n\n/**\n * An Item describing single tree item position and its content inside tree.\n * Returned by `useFlatTreeNodeList` hook.\n *\n * @alpha\n */\nexport type FlatTreeItem = FlatTreeNodeItem | FlatPlaceholderItem;\n\n/** @alpha */\nexport function isPlaceholderItem(item: FlatTreeItem): item is FlatPlaceholderItem {\n return \"placeholder\" in item;\n}\n\n/**\n * Used to get a list of `FlatTreeItem` objects for the given list of `TreeNode` objects that represent\n * a hierarchical structure. The resulting items can be used to render the hierarchy in a flat manner, e.g. using a\n * virtualized list.\n *\n * @alpha\n */\nexport function useFlatTreeItems(rootNodes: TreeNode[]) {\n return useMemo(() => getFlatItems(rootNodes, 1), [rootNodes]);\n}\n\nfunction getFlatItems(nodes: TreeNode[], level: number) {\n const flatItems: FlatTreeItem[] = [];\n nodes.forEach((node, index) => {\n flatItems.push({ node, id: node.id, level, levelSize: nodes.length, posInLevel: index + 1 });\n if (!node.isExpanded || node.error) {\n return;\n }\n if (node.children !== true) {\n const childNodes = getFlatItems(node.children, level + 1);\n flatItems.push(...childNodes);\n return;\n }\n\n flatItems.push({ id: `${node.id}-children-placeholder`, level: level + 1, placeholder: true } satisfies FlatPlaceholderItem);\n });\n return flatItems;\n}\n\n/**\n * Finds and returns all nodes containing errors in a given hierarchy.\n *\n * @alpha\n */\nexport function useErrorNodes(rootNodes: TreeNode[]): Array<TreeNode & Pick<Required<TreeNode>, \"error\">> {\n return useMemo(\n () =>\n rootNodes.flatMap((rootNode) => {\n if (isErrorNode(rootNode)) {\n return [rootNode];\n }\n if (rootNode.children === true) {\n return [];\n }\n return getErrorNodes(rootNode);\n }),\n [rootNodes],\n );\n}\n\nfunction getErrorNodes(parent: TreeNode) {\n const errorList: ReturnType<typeof useErrorNodes> = [];\n\n if (parent.children === true) {\n return [];\n }\n\n parent.children.forEach((node) => {\n if (isErrorNode(node)) {\n errorList.push(node);\n return;\n }\n\n if (node.children !== true) {\n const childErrorList = getErrorNodes(node);\n errorList.push(...childErrorList);\n return;\n }\n });\n return errorList;\n}\n\nfunction isErrorNode(node: TreeNode): node is TreeNode & Pick<Required<TreeNode>, \"error\"> {\n return node.error !== undefined;\n}\n"],"mappings":";;;;AA0CA,SAAgBW,kBAAkBC,MAAiD;AACjF,QAAO,iBAAiBA;;;;;;;;;AAU1B,SAAOC,iBAAAC,WAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;AAAA,KAAAF,EAAA,OAAAD,WAAA;AACgBG,OAAAC,aAAaJ,WAAW,EAAE;AAAAC,IAAA,KAAAD;AAAAC,IAAA,KAAAE;OAAAA,MAAAF,EAAA;AAAA,QAA1BE;;AAGvB,SAASC,aAAaC,OAAmBf,OAAe;CACtD,MAAMgB,YAA4B,EAAE;AACpCD,OAAME,SAASZ,MAAMa,UAAU;AAC7BF,YAAUG,KAAK;GAAEd;GAAMN,IAAIM,KAAKN;GAAIC;GAAOG,WAAWY,MAAMK;GAAQhB,YAAYc,QAAQ;GAAG,CAAC;AAC5F,MAAI,CAACb,KAAKgB,cAAchB,KAAKiB,MAC3B;AAEF,MAAIjB,KAAKkB,aAAa,MAAM;GAC1B,MAAMC,aAAaV,aAAaT,KAAKkB,UAAUvB,QAAQ,EAAE;AACzDgB,aAAUG,KAAK,GAAGK,WAAW;AAC7B;;AAGFR,YAAUG,KAAK;GAAEpB,IAAI,GAAGM,KAAKN,GAAE;GAAyBC,OAAOA,QAAQ;GAAGC,aAAa;GAAM,CAA+B;GAC5H;AACF,QAAOe;;;;;;;AAQT,SAAOS,cAAAf,WAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;AAAA,KAAAF,EAAA,OAAAD,WAAA;AAGDG,OAAAH,UAASgB,QAASC,MAQhB;AAAAhB,IAAA,KAAAD;AAAAC,IAAA,KAAAE;OAAAA,MAAAF,EAAA;AAAA,QARFE;;AAHC,SAAAc,MAAAC,UAAA;AAIC,KAAIC,YAAYD,SAAS,CAAA,QAChB,CAACA,SAAS;AAEnB,KAAIA,SAAQL,aAAc,KAAI,QACrB,EAAE;AACV,QACMO,cAAcF,SAAS;;AAMtC,SAASE,cAAcC,QAAkB;CACvC,MAAMC,YAA8C,EAAE;AAEtD,KAAID,OAAOR,aAAa,KACtB,QAAO,EAAE;AAGXQ,QAAOR,SAASN,SAASZ,SAAS;AAChC,MAAIwB,YAAYxB,KAAK,EAAE;AACrB2B,aAAUb,KAAKd,KAAK;AACpB;;AAGF,MAAIA,KAAKkB,aAAa,MAAM;GAC1B,MAAMW,iBAAiBJ,cAAczB,KAAK;AAC1C2B,aAAUb,KAAK,GAAGe,eAAe;AACjC;;GAEF;AACF,QAAOF;;AAGT,SAASH,YAAYxB,MAAsE;AACzF,QAAOA,KAAKiB,UAAUe"}
|
|
@@ -1,133 +1,138 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
1
|
+
import { JSX, PropsWithChildren } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/presentation-hierarchies-react/stratakit/LocalizationContext.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Localized strings used in the components.
|
|
4
6
|
* @public
|
|
5
7
|
*/
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
8
|
+
interface LocalizedStrings {
|
|
9
|
+
/**
|
|
10
|
+
* Message displayed when nodes are loading.
|
|
11
|
+
* Default value: `Loading...`.
|
|
12
|
+
*/
|
|
13
|
+
loading: string;
|
|
14
|
+
/**
|
|
15
|
+
* Title for apply hierarchy filter button.
|
|
16
|
+
* Default value: `Apply filter`.
|
|
17
|
+
*/
|
|
18
|
+
filterHierarchyLevel: string;
|
|
19
|
+
/**
|
|
20
|
+
* Accessible description for applied hierarchy filter button.
|
|
21
|
+
* Default value: `Filter is applied`.
|
|
22
|
+
*/
|
|
23
|
+
filterHierarchyLevelActiveDescription: string;
|
|
24
|
+
/**
|
|
25
|
+
* Title for clear hierarchy filter button.
|
|
26
|
+
* Default value: `Clear active filter`.
|
|
27
|
+
*/
|
|
28
|
+
clearHierarchyLevelFilter: string;
|
|
29
|
+
/**
|
|
30
|
+
* Message displayed when no nodes matching filter are found.
|
|
31
|
+
* Default value: `No matches for current filter for {{node}}.`.
|
|
32
|
+
*/
|
|
33
|
+
noFilteredChildren: string;
|
|
34
|
+
/**
|
|
35
|
+
* Label for change filter action.
|
|
36
|
+
* Default value: `Change filter`.
|
|
37
|
+
*/
|
|
38
|
+
noFilteredChildrenChangeFilter: string;
|
|
39
|
+
/**
|
|
40
|
+
* Message displayed when hierarchy creation for a node failed.
|
|
41
|
+
* Default value: `Failed to create hierarchy for {{node}}.`.
|
|
42
|
+
*/
|
|
43
|
+
failedToCreateHierarchy: string;
|
|
44
|
+
/**
|
|
45
|
+
* Message displayed when hierarchy creation for a node failed.
|
|
46
|
+
* Default value: `Failed to load tree.`.
|
|
47
|
+
*/
|
|
48
|
+
failedToCreateRootHierarchy: string;
|
|
49
|
+
/**
|
|
50
|
+
* Message displayed when result limit exceeds hierarchy size limit.
|
|
51
|
+
* Default value: `The hierarchy for {{node}} contains {{limit}}+ items. Try using filters or increase the limit.`.
|
|
52
|
+
*/
|
|
53
|
+
resultLimitExceeded: string;
|
|
54
|
+
/**
|
|
55
|
+
* Message displayed when result limit exceeds hierarchy size limit.
|
|
56
|
+
* Default value: `The root item hierarchy contains {{limit}}+ items. Try increasing the limit.`.
|
|
57
|
+
*/
|
|
58
|
+
rootResultLimitExceeded: string;
|
|
59
|
+
/**
|
|
60
|
+
* Name for the error region landmark.
|
|
61
|
+
* Default value: `Issues for {{tree_label}}.`.
|
|
62
|
+
*/
|
|
63
|
+
issuesForTree: string;
|
|
64
|
+
/**
|
|
65
|
+
* Label displayed on the error region, when errors are detected.
|
|
66
|
+
* Default value: `{{number_of_issues}} issue(s) found.`.
|
|
67
|
+
*/
|
|
68
|
+
issuesFound: string;
|
|
69
|
+
/**
|
|
70
|
+
* Label displayed on the error region, when no issues are found.
|
|
71
|
+
* Default value: `No issues found.`.
|
|
72
|
+
*/
|
|
73
|
+
noIssuesFound: string;
|
|
74
|
+
/**
|
|
75
|
+
* Message displayed when hierarchy size limit can be overridden.
|
|
76
|
+
* Default value: `Increase limit to {{limit}}`.
|
|
77
|
+
*/
|
|
78
|
+
increaseHierarchyLimit: string;
|
|
79
|
+
/**
|
|
80
|
+
* Message displayed when hierarchy size limit can be overridden.
|
|
81
|
+
* Default value: `Remove limit`.
|
|
82
|
+
*/
|
|
83
|
+
increaseHierarchyLimitToUnlimited: string;
|
|
84
|
+
/**
|
|
85
|
+
* Message displayed when hierarchy size limit can be overridden and hierarchy filtering is enabled.
|
|
86
|
+
* Default value: `Add Filter`.
|
|
87
|
+
*/
|
|
88
|
+
increaseHierarchyLimitWithFiltering: string;
|
|
89
|
+
/**
|
|
90
|
+
* Label for retry action.
|
|
91
|
+
* Default value: `Retry`.
|
|
92
|
+
*/
|
|
93
|
+
retry: string;
|
|
94
|
+
/**
|
|
95
|
+
* Label for rename action.
|
|
96
|
+
* Default value: `Rename`.
|
|
97
|
+
*/
|
|
98
|
+
rename: string;
|
|
99
|
+
/**
|
|
100
|
+
* Label for more actions button.
|
|
101
|
+
* Default value: `More`.
|
|
102
|
+
*/
|
|
103
|
+
more: string;
|
|
104
|
+
/**
|
|
105
|
+
* Label for confirm button.
|
|
106
|
+
* Default value: `Confirm`.
|
|
107
|
+
*/
|
|
108
|
+
confirm: string;
|
|
109
|
+
/**
|
|
110
|
+
* Label for cancel button.
|
|
111
|
+
* Default value: `Cancel`.
|
|
112
|
+
*/
|
|
113
|
+
cancel: string;
|
|
114
|
+
/**
|
|
115
|
+
* Label for tree node rename input.
|
|
116
|
+
* Default value: `New label`.
|
|
117
|
+
*/
|
|
118
|
+
newLabel: string;
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
118
121
|
* Properties for `LocalizationContextProvider`.
|
|
119
122
|
* @public
|
|
120
123
|
*/
|
|
121
124
|
interface LocalizationContextProviderProps {
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
/** Localized strings used in the components. */
|
|
126
|
+
localizedStrings?: Partial<LocalizedStrings>;
|
|
124
127
|
}
|
|
125
128
|
/**
|
|
126
129
|
* Context provider for localized strings used in the components.
|
|
127
130
|
* @public
|
|
128
131
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
declare function LocalizationContextProvider({
|
|
133
|
+
localizedStrings,
|
|
134
|
+
children
|
|
135
|
+
}: PropsWithChildren<LocalizationContextProviderProps>): JSX.Element;
|
|
136
|
+
//#endregion
|
|
137
|
+
export { LocalizationContextProvider };
|
|
133
138
|
//# sourceMappingURL=LocalizationContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationContext.d.ts","
|
|
1
|
+
{"version":3,"file":"LocalizationContext.d.ts","names":[],"sources":["../../../../src/presentation-hierarchies-react/stratakit/LocalizationContext.tsx"],"mappings":";;;;;AAaA;;UAAiB,gBAAA;EAAgB;;;;EAK/B,OAAA;EAoBA;;;;EAfA,oBAAA;EAwCA;;;;EAnCA,qCAAA;EA4DA;;;;EAvDA,yBAAA;EAgFA;;;;EA3EA,kBAAA;EA4HQ;;;;EAvHR,8BAAA;EAyHmB;;;;EApHnB,uBAAA;EA2HyC;;;;EAtHzC,2BAAA;EAsH0E;;;;EAjH1E,mBAAA;EAiH4C;;;;EA5G5C,uBAAA;EA4GgI;;;;EAvGhI,aAAA;;;;;EAKA,WAAA;;;;;EAKA,aAAA;;;;;EAKA,sBAAA;;;;;EAKA,iCAAA;;;;;EAKA,mCAAA;;;;;EAKA,KAAA;;;;;EAKA,MAAA;;;;;EAKA,IAAA;;;;;EAKA,OAAA;;;;;EAKA,MAAA;;;;;EAKA,QAAA;AAAA;;;;;UAuCQ,gCAAA;;EAER,gBAAA,GAAmB,OAAA,CAAQ,gBAAA;AAAA;;;;;iBAOb,2BAAA,CAAA;EAA8B,gBAAA;EAAkB;AAAA,GAAY,iBAAA,CAAkB,gCAAA,IAAoC,GAAA,CAAI,OAAA"}
|
|
@@ -1,46 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { createContext, useContext, useEffect, useState } from "react";
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/presentation-hierarchies-react/stratakit/LocalizationContext.tsx
|
|
7
6
|
const defaultLocalizedStrings = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
loading: "Loading...",
|
|
8
|
+
filterHierarchyLevel: "Apply filter",
|
|
9
|
+
filterHierarchyLevelActiveDescription: "Filter is applied",
|
|
10
|
+
clearHierarchyLevelFilter: "Clear active filter",
|
|
11
|
+
noFilteredChildren: "No matches for current filter for {{node}}.",
|
|
12
|
+
noFilteredChildrenChangeFilter: "Change filter",
|
|
13
|
+
failedToCreateHierarchy: "Failed to create hierarchy for {{node}}.",
|
|
14
|
+
failedToCreateRootHierarchy: "Failed to load tree.",
|
|
15
|
+
resultLimitExceeded: "The hierarchy for {{node}} contains {{limit}}+ items. Try using filters or increase the limit.",
|
|
16
|
+
rootResultLimitExceeded: "The root item hierarchy contains {{limit}}+ items. Try increasing the limit.",
|
|
17
|
+
issuesForTree: "Issues for {{tree_label}}.",
|
|
18
|
+
issuesFound: "{{number_of_issues}} issue(s) found.",
|
|
19
|
+
noIssuesFound: "No issues found.",
|
|
20
|
+
increaseHierarchyLimit: "Increase limit to {{limit}}",
|
|
21
|
+
increaseHierarchyLimitToUnlimited: "Remove limit",
|
|
22
|
+
increaseHierarchyLimitWithFiltering: "Add Filter",
|
|
23
|
+
retry: "Retry",
|
|
24
|
+
rename: "Rename",
|
|
25
|
+
more: "More",
|
|
26
|
+
confirm: "Confirm",
|
|
27
|
+
cancel: "Cancel",
|
|
28
|
+
newLabel: "New label"
|
|
29
29
|
};
|
|
30
30
|
const localizationContext = createContext({ localizedStrings: defaultLocalizedStrings });
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
* Context provider for localized strings used in the components.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
function LocalizationContextProvider(t0) {
|
|
36
|
+
const $ = c(5);
|
|
37
|
+
const { localizedStrings, children } = t0;
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[0] !== localizedStrings) {
|
|
40
|
+
t1 = { localizedStrings: {
|
|
41
|
+
...defaultLocalizedStrings,
|
|
42
|
+
...localizedStrings
|
|
43
|
+
} };
|
|
44
|
+
$[0] = localizedStrings;
|
|
45
|
+
$[1] = t1;
|
|
46
|
+
} else t1 = $[1];
|
|
47
|
+
const state = t1;
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[2] !== children || $[3] !== state) {
|
|
50
|
+
t2 = /* @__PURE__ */ jsx(localizationContext.Provider, {
|
|
51
|
+
value: state,
|
|
52
|
+
children
|
|
53
|
+
});
|
|
54
|
+
$[2] = children;
|
|
55
|
+
$[3] = state;
|
|
56
|
+
$[4] = t2;
|
|
57
|
+
} else t2 = $[4];
|
|
58
|
+
return t2;
|
|
41
59
|
}
|
|
42
60
|
/** @internal */
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
function useLocalizationContext() {
|
|
62
|
+
return useContext(localizationContext);
|
|
45
63
|
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
export { LocalizationContextProvider, useLocalizationContext };
|
|
46
67
|
//# sourceMappingURL=LocalizationContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationContext.js","
|
|
1
|
+
{"version":3,"file":"LocalizationContext.js","names":["createContext","useContext","useMemo","JSX","PropsWithChildren","LocalizedStrings","loading","filterHierarchyLevel","filterHierarchyLevelActiveDescription","clearHierarchyLevelFilter","noFilteredChildren","noFilteredChildrenChangeFilter","failedToCreateHierarchy","failedToCreateRootHierarchy","resultLimitExceeded","rootResultLimitExceeded","issuesForTree","issuesFound","noIssuesFound","increaseHierarchyLimit","increaseHierarchyLimitToUnlimited","increaseHierarchyLimitWithFiltering","retry","rename","more","confirm","cancel","newLabel","LocalizationContext","localizedStrings","defaultLocalizedStrings","localizationContext","LocalizationContextProviderProps","Partial","LocalizationContextProvider","t0","$","_c","children","t1","state","t2","useLocalizationContext"],"sources":["../../../../src/presentation-hierarchies-react/stratakit/LocalizationContext.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 { createContext, useContext, useMemo } from \"react\";\n\nimport type { JSX, PropsWithChildren } from \"react\";\n\n/**\n * Localized strings used in the components.\n * @public\n */\nexport interface LocalizedStrings {\n /**\n * Message displayed when nodes are loading.\n * Default value: `Loading...`.\n */\n loading: string;\n /**\n * Title for apply hierarchy filter button.\n * Default value: `Apply filter`.\n */\n filterHierarchyLevel: string;\n /**\n * Accessible description for applied hierarchy filter button.\n * Default value: `Filter is applied`.\n */\n filterHierarchyLevelActiveDescription: string;\n /**\n * Title for clear hierarchy filter button.\n * Default value: `Clear active filter`.\n */\n clearHierarchyLevelFilter: string;\n /**\n * Message displayed when no nodes matching filter are found.\n * Default value: `No matches for current filter for {{node}}.`.\n */\n noFilteredChildren: string;\n /**\n * Label for change filter action.\n * Default value: `Change filter`.\n */\n noFilteredChildrenChangeFilter: string;\n /**\n * Message displayed when hierarchy creation for a node failed.\n * Default value: `Failed to create hierarchy for {{node}}.`.\n */\n failedToCreateHierarchy: string;\n /**\n * Message displayed when hierarchy creation for a node failed.\n * Default value: `Failed to load tree.`.\n */\n failedToCreateRootHierarchy: string;\n /**\n * Message displayed when result limit exceeds hierarchy size limit.\n * Default value: `The hierarchy for {{node}} contains {{limit}}+ items. Try using filters or increase the limit.`.\n */\n resultLimitExceeded: string;\n /**\n * Message displayed when result limit exceeds hierarchy size limit.\n * Default value: `The root item hierarchy contains {{limit}}+ items. Try increasing the limit.`.\n */\n rootResultLimitExceeded: string;\n /**\n * Name for the error region landmark.\n * Default value: `Issues for {{tree_label}}.`.\n */\n issuesForTree: string;\n /**\n * Label displayed on the error region, when errors are detected.\n * Default value: `{{number_of_issues}} issue(s) found.`.\n */\n issuesFound: string;\n /**\n * Label displayed on the error region, when no issues are found.\n * Default value: `No issues found.`.\n */\n noIssuesFound: string;\n /**\n * Message displayed when hierarchy size limit can be overridden.\n * Default value: `Increase limit to {{limit}}`.\n */\n increaseHierarchyLimit: string;\n /**\n * Message displayed when hierarchy size limit can be overridden.\n * Default value: `Remove limit`.\n */\n increaseHierarchyLimitToUnlimited: string;\n /**\n * Message displayed when hierarchy size limit can be overridden and hierarchy filtering is enabled.\n * Default value: `Add Filter`.\n */\n increaseHierarchyLimitWithFiltering: string;\n /**\n * Label for retry action.\n * Default value: `Retry`.\n */\n retry: string;\n /**\n * Label for rename action.\n * Default value: `Rename`.\n */\n rename: string;\n /**\n * Label for more actions button.\n * Default value: `More`.\n */\n more: string;\n /**\n * Label for confirm button.\n * Default value: `Confirm`.\n */\n confirm: string;\n /**\n * Label for cancel button.\n * Default value: `Cancel`.\n */\n cancel: string;\n /**\n * Label for tree node rename input.\n * Default value: `New label`.\n */\n newLabel: string;\n}\n\n/** @internal */\nexport interface LocalizationContext {\n localizedStrings: LocalizedStrings;\n}\n\nconst defaultLocalizedStrings: LocalizedStrings = {\n loading: \"Loading...\",\n filterHierarchyLevel: \"Apply filter\",\n filterHierarchyLevelActiveDescription: \"Filter is applied\",\n clearHierarchyLevelFilter: \"Clear active filter\",\n noFilteredChildren: \"No matches for current filter for {{node}}.\",\n noFilteredChildrenChangeFilter: \"Change filter\",\n failedToCreateHierarchy: \"Failed to create hierarchy for {{node}}.\",\n failedToCreateRootHierarchy: \"Failed to load tree.\",\n resultLimitExceeded: \"The hierarchy for {{node}} contains {{limit}}+ items. Try using filters or increase the limit.\",\n rootResultLimitExceeded: \"The root item hierarchy contains {{limit}}+ items. Try increasing the limit.\",\n issuesForTree: \"Issues for {{tree_label}}.\",\n issuesFound: \"{{number_of_issues}} issue(s) found.\",\n noIssuesFound: \"No issues found.\",\n increaseHierarchyLimit: \"Increase limit to {{limit}}\",\n increaseHierarchyLimitToUnlimited: \"Remove limit\",\n increaseHierarchyLimitWithFiltering: \"Add Filter\",\n retry: \"Retry\",\n rename: \"Rename\",\n more: \"More\",\n confirm: \"Confirm\",\n cancel: \"Cancel\",\n newLabel: \"New label\",\n};\n\nconst localizationContext = createContext<LocalizationContext>({ localizedStrings: defaultLocalizedStrings });\n\n/**\n * Properties for `LocalizationContextProvider`.\n * @public\n */\ninterface LocalizationContextProviderProps {\n /** Localized strings used in the components. */\n localizedStrings?: Partial<LocalizedStrings>;\n}\n\n/**\n * Context provider for localized strings used in the components.\n * @public\n */\nexport function LocalizationContextProvider({ localizedStrings, children }: PropsWithChildren<LocalizationContextProviderProps>): JSX.Element {\n const state = useMemo(() => ({ localizedStrings: { ...defaultLocalizedStrings, ...localizedStrings } }), [localizedStrings]);\n return <localizationContext.Provider value={state}>{children}</localizationContext.Provider>;\n}\n\n/** @internal */\nexport function useLocalizationContext() {\n return useContext(localizationContext);\n}\n"],"mappings":";;;;;AAmIA,MAAM8B,0BAA4C;CAChDxB,SAAS;CACTC,sBAAsB;CACtBC,uCAAuC;CACvCC,2BAA2B;CAC3BC,oBAAoB;CACpBC,gCAAgC;CAChCC,yBAAyB;CACzBC,6BAA6B;CAC7BC,qBAAqB;CACrBC,yBAAyB;CACzBC,eAAe;CACfC,aAAa;CACbC,eAAe;CACfC,wBAAwB;CACxBC,mCAAmC;CACnCC,qCAAqC;CACrCC,OAAO;CACPC,QAAQ;CACRC,MAAM;CACNC,SAAS;CACTC,QAAQ;CACRC,UAAU;CACX;AAED,MAAMI,sBAAsB/B,cAAmC,EAAE6B,kBAAkBC,yBAAyB,CAAC;;;;;AAe7G,SAAOI,4BAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqC,MAAA,EAAAR,kBAAAS,aAAAH;CAAmF,IAAAI;AAAA,KAAAH,EAAA,OAAAP,kBAAA;AAChGU,OAAA,EAAAV,kBAAoB;GAAA,GAAKC;GAAuB,GAAKD;GAAiB,EAAG;AAAAO,IAAA,KAAAP;AAAAO,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAAtG,MAAAI,QAA6BD;CAAgG,IAAAE;AAAA,KAAAL,EAAA,OAAAE,YAAAF,EAAA,OAAAI,OAAA;AACtHC,OAAA,oBAAA,oBAAA;GAAqCD,OAAAA;GAAQF;IAAwC;AAAAF,IAAA,KAAAE;AAAAF,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;OAAAA,MAAAL,EAAA;AAAA,QAArFK;;;AAIT,SAAOC,yBAAA;AAAA,QACEzC,WAAW8B,oBAAoB"}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
import { RootErrorRendererProps } from "../Renderers.js";
|
|
2
1
|
import { ErrorInfo } from "../TreeNode.js";
|
|
2
|
+
import { RootErrorRendererProps } from "../Renderers.js";
|
|
3
|
+
import { JSX } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/presentation-hierarchies-react/stratakit/RootErrorRenderer.d.ts
|
|
3
6
|
/**
|
|
4
7
|
* @alpha
|
|
5
8
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
type StrataKitRootErrorRendererProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Root error to be displayed
|
|
12
|
+
*/
|
|
13
|
+
error: ErrorInfo;
|
|
9
14
|
} & RootErrorRendererProps;
|
|
10
15
|
/**
|
|
11
16
|
* A component that renders root node error state.
|
|
12
17
|
*
|
|
13
18
|
* @alpha
|
|
14
19
|
*/
|
|
15
|
-
|
|
20
|
+
declare function StrataKitRootErrorRenderer({
|
|
21
|
+
error,
|
|
22
|
+
getHierarchyLevelDetails,
|
|
23
|
+
reloadTree
|
|
24
|
+
}: StrataKitRootErrorRendererProps): JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { StrataKitRootErrorRenderer };
|
|
16
27
|
//# sourceMappingURL=RootErrorRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootErrorRenderer.d.ts","
|
|
1
|
+
{"version":3,"file":"RootErrorRenderer.d.ts","names":[],"sources":["../../../../src/presentation-hierarchies-react/stratakit/RootErrorRenderer.tsx"],"mappings":";;;;;;;AAiBA;KAAY,+BAAA;;;;EAIV,KAAA,EAAO,SAAA;AAAA,IACL,sBAAA;;;AAOJ;;;iBAAgB,0BAAA,CAAA;EAA6B,KAAA;EAAO,wBAAA;EAA0B;AAAA,GAAc,+BAAA,GAAkC,GAAA,CAAI,OAAA"}
|