@itwin/presentation-hierarchies-react 2.0.0-alpha.65 → 2.0.0-alpha.67
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 +54 -0
- package/README.md +2 -8
- package/lib/presentation-hierarchies-react/UseIModelTree.js.map +1 -1
- package/lib/presentation-hierarchies-react/UseTree.js.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/{TreeNodeRenderer.css → LabelEditor.css} +3 -3
- package/lib/presentation-hierarchies-react/stratakit/LabelEditor.js +300 -0
- package/lib/presentation-hierarchies-react/stratakit/LabelEditor.js.map +1 -0
- package/lib/presentation-hierarchies-react/stratakit/TreeAction.d.ts.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeAction.js +0 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeAction.js.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeContextMenu.js +97 -0
- package/lib/presentation-hierarchies-react/stratakit/TreeContextMenu.js.map +1 -0
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.js.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.d.ts.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.js.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts +0 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js +43 -351
- package/lib/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeRenderer.d.ts.map +1 -1
- package/lib/presentation-hierarchies-react/stratakit/TreeRenderer.js +34 -5
- package/lib/presentation-hierarchies-react/stratakit/TreeRenderer.js.map +1 -1
- package/package.json +31 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeAction.js","names":["memo","ListItemIcon","MenuItem","Typography","Icon","Tree","ComponentPropsWithoutRef","NamedExoticComponent","TreeActionBaseAttributes","variant","hide","TreeActionBaseProps","Omit","ItemAction","onClick","TreeActionBase","t0","$","_c","actionProps","dot","t1","visible","undefined","t2","label","icon","t3","t4"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeAction.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 { memo } from \"react\";\nimport { ListItemIcon, MenuItem, Typography } from \"@mui/material\";\nimport { Icon } from \"@stratakit/mui\";\nimport { Tree } from \"@stratakit/structures\";\n\nimport type { ComponentPropsWithoutRef, NamedExoticComponent } from \"react\";\n\n/**\n * Attributes used to decide how to render tree actions. They allow to differentiate action style based on the context\n * where that action is used.\n * @alpha\n */\nexport interface TreeActionBaseAttributes {\n /**\n * Specifies action variant supported by tree nodes:\n *\n * - \"default\" - standard action displayed in the dropdown menu accessible through the ellipsis button on the node.\n * - \"inline\" - actions displayed directly on the tree node.\n * - \"context-menu\" - actions displayed in the context menu opened by right-clicking the tree node.\n */\n variant?: \"default\" | \"inline\" | \"context-menu\";\n /**\n * Indicates that the actions is not applicable for current tree node and should be hidden.\n * When set to true, the action will not be rendered at all.\n */\n hide?: boolean;\n}\n\n/** @alpha */\nexport type TreeActionBaseProps = Omit<ComponentPropsWithoutRef<typeof Tree.ItemAction>, \"onClick\"> &\n TreeActionBaseAttributes & {\n /** Callback invoked when the action is clicked. */\n onClick?: () => void;\n };\n\n/**\n * Base component used to render tree actions. It is designed to allow rendering same action in different contexts: inline, dropdown, context menu.\n * Should be used together with `StrataKitTreeNodeRenderer` and returned from `getInlineActions`, `getMenuActions` and `getContextMenuActions` callbacks.\n *\n * When implementing custom action that returns this component, make sure to forward `TreeActionBaseAttributes` props to it. Example:\n *\n * ```tsx\n * interface MyCustomTreeActionProps extends TreeActionBaseAttributes {\n * myProp: string\n * }\n *\n * function MyCustomTreeAction({ myProp, ...attributes }: MyCustomTreeActionProps) {\n * // custom button logic goes here\n * return <TreeActionBase {...attributes} icon={...} onClick={...} />\n * }\n * ```\n *\n * @alpha\n */\nexport const TreeActionBase: NamedExoticComponent<TreeActionBaseProps> = memo(function TreeActionBase({\n hide,\n variant = \"default\",\n dot,\n visible,\n ...actionProps\n}: TreeActionBaseProps) {\n if (hide) {\n return variant === \"inline\" ? <Tree.ItemAction {...actionProps} visible={false} /> : undefined;\n }\n\n if (variant === \"context-menu\") {\n const { label, icon, onClick } = actionProps;\n return (\n <MenuItem
|
|
1
|
+
{"version":3,"file":"TreeAction.js","names":["memo","ListItemIcon","MenuItem","Typography","Icon","Tree","ComponentPropsWithoutRef","NamedExoticComponent","TreeActionBaseAttributes","variant","hide","TreeActionBaseProps","Omit","ItemAction","onClick","TreeActionBase","t0","$","_c","actionProps","dot","t1","visible","undefined","t2","label","icon","t3","t4"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeAction.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 { memo } from \"react\";\nimport { ListItemIcon, MenuItem, Typography } from \"@mui/material\";\nimport { Icon } from \"@stratakit/mui\";\nimport { Tree } from \"@stratakit/structures\";\n\nimport type { ComponentPropsWithoutRef, NamedExoticComponent } from \"react\";\n\n/**\n * Attributes used to decide how to render tree actions. They allow to differentiate action style based on the context\n * where that action is used.\n * @alpha\n */\nexport interface TreeActionBaseAttributes {\n /**\n * Specifies action variant supported by tree nodes:\n *\n * - \"default\" - standard action displayed in the dropdown menu accessible through the ellipsis button on the node.\n * - \"inline\" - actions displayed directly on the tree node.\n * - \"context-menu\" - actions displayed in the context menu opened by right-clicking the tree node.\n */\n variant?: \"default\" | \"inline\" | \"context-menu\";\n /**\n * Indicates that the actions is not applicable for current tree node and should be hidden.\n * When set to true, the action will not be rendered at all.\n */\n hide?: boolean;\n}\n\n/** @alpha */\nexport type TreeActionBaseProps = Omit<ComponentPropsWithoutRef<typeof Tree.ItemAction>, \"onClick\"> &\n TreeActionBaseAttributes & {\n /** Callback invoked when the action is clicked. */\n onClick?: () => void;\n };\n\n/**\n * Base component used to render tree actions. It is designed to allow rendering same action in different contexts: inline, dropdown, context menu.\n * Should be used together with `StrataKitTreeNodeRenderer` and returned from `getInlineActions`, `getMenuActions` and `getContextMenuActions` callbacks.\n *\n * When implementing custom action that returns this component, make sure to forward `TreeActionBaseAttributes` props to it. Example:\n *\n * ```tsx\n * interface MyCustomTreeActionProps extends TreeActionBaseAttributes {\n * myProp: string\n * }\n *\n * function MyCustomTreeAction({ myProp, ...attributes }: MyCustomTreeActionProps) {\n * // custom button logic goes here\n * return <TreeActionBase {...attributes} icon={...} onClick={...} />\n * }\n * ```\n *\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/no-shadow\nexport const TreeActionBase: NamedExoticComponent<TreeActionBaseProps> = memo(function TreeActionBase({\n hide,\n variant = \"default\",\n dot,\n visible,\n ...actionProps\n}: TreeActionBaseProps) {\n if (hide) {\n return variant === \"inline\" ? <Tree.ItemAction {...actionProps} visible={false} /> : undefined;\n }\n\n if (variant === \"context-menu\") {\n const { label, icon, onClick } = actionProps;\n return (\n <MenuItem onClick={onClick}>\n {icon ? <ListItemIcon>{typeof icon === \"string\" ? <Icon href={icon} /> : icon}</ListItemIcon> : null}\n <Typography variant=\"caption\">{label}</Typography>\n </MenuItem>\n );\n }\n\n return <Tree.ItemAction {...actionProps} dot={dot} visible={variant === \"inline\" ? visible : undefined} />;\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAae,iBAA4Df,KAAK,SAAAe,eAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAV;CAAA,I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AAA,IAAAX,EAAA,QAAAH,WAAAG,EAAA,QAAAO,MAAAP,EAAA,QAAAU,IAAA;GAFpDC,KAAA,qBAAC,UAAD;IAAmBd;IAAnB,UAAA,CACGU,IACDG,EAFO;;GAGEV,EAAA,MAAAH;GAAAG,EAAA,MAAAO;GAAAP,EAAA,MAAAU;GAAAV,EAAA,MAAAW;EAAA,OAAAA,KAAAX,EAAA;EAAA,OAHXW;CAGW;CAI6C,MAAAJ,KAAAf,YAAY,WAAZa,UAAAC,KAAAA;CAA0C,IAAAI;CAAA,IAAAV,EAAA,QAAAE,eAAAF,EAAA,QAAAG,OAAAH,EAAA,QAAAO,IAAA;EAA/FG,KAAA,oBAAA,KAAA,YAAA;GAAA,GAAqBR;GAAkBC;GAAc,SAAAI;EAA0C,CAAA;EAAIP,EAAA,MAAAE;EAAAF,EAAA,MAAAG;EAAAH,EAAA,MAAAO;EAAAP,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAAnGU;AAAmG,CAC3G"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { useTranslation } from "../LocalizationContext.js";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { createContext, useContext, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Menu } from "@mui/material";
|
|
6
|
+
//#region src/presentation-hierarchies-react/stratakit/TreeContextMenu.tsx
|
|
7
|
+
const TreeContextMenuContext = createContext({ openContextMenu: () => {} });
|
|
8
|
+
/** @internal */
|
|
9
|
+
function useTreeContextMenu() {
|
|
10
|
+
return useContext(TreeContextMenuContext);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders a single context menu shared by all tree items, avoiding the cost of mounting a `Menu` per row.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
function TreeContextMenuProvider(t0) {
|
|
18
|
+
const $ = c(16);
|
|
19
|
+
const { children } = t0;
|
|
20
|
+
const translate = useTranslation();
|
|
21
|
+
const [menuProps, setMenuProps] = useState(void 0);
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24
|
+
t1 = { openContextMenu: setMenuProps };
|
|
25
|
+
$[0] = t1;
|
|
26
|
+
} else t1 = $[0];
|
|
27
|
+
const contextValue = t1;
|
|
28
|
+
const t2 = !!menuProps;
|
|
29
|
+
let t3;
|
|
30
|
+
let t4;
|
|
31
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
32
|
+
t3 = () => setMenuProps(void 0);
|
|
33
|
+
t4 = (e) => {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
setMenuProps(void 0);
|
|
36
|
+
};
|
|
37
|
+
$[1] = t3;
|
|
38
|
+
$[2] = t4;
|
|
39
|
+
} else {
|
|
40
|
+
t3 = $[1];
|
|
41
|
+
t4 = $[2];
|
|
42
|
+
}
|
|
43
|
+
let t5;
|
|
44
|
+
if ($[3] !== menuProps) {
|
|
45
|
+
t5 = menuProps ? {
|
|
46
|
+
top: menuProps.position.y,
|
|
47
|
+
left: menuProps.position.x
|
|
48
|
+
} : void 0;
|
|
49
|
+
$[3] = menuProps;
|
|
50
|
+
$[4] = t5;
|
|
51
|
+
} else t5 = $[4];
|
|
52
|
+
let t6;
|
|
53
|
+
if ($[5] !== translate) {
|
|
54
|
+
t6 = translate("more");
|
|
55
|
+
$[5] = translate;
|
|
56
|
+
$[6] = t6;
|
|
57
|
+
} else t6 = $[6];
|
|
58
|
+
let t7;
|
|
59
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
+
t7 = () => setMenuProps(void 0);
|
|
61
|
+
$[7] = t7;
|
|
62
|
+
} else t7 = $[7];
|
|
63
|
+
const t8 = menuProps?.actions;
|
|
64
|
+
let t9;
|
|
65
|
+
if ($[8] !== t2 || $[9] !== t5 || $[10] !== t6 || $[11] !== t8) {
|
|
66
|
+
t9 = /* @__PURE__ */ jsx(Menu, {
|
|
67
|
+
open: t2,
|
|
68
|
+
onClose: t3,
|
|
69
|
+
onContextMenu: t4,
|
|
70
|
+
anchorReference: "anchorPosition",
|
|
71
|
+
anchorPosition: t5,
|
|
72
|
+
"aria-label": t6,
|
|
73
|
+
onClick: t7,
|
|
74
|
+
children: t8
|
|
75
|
+
});
|
|
76
|
+
$[8] = t2;
|
|
77
|
+
$[9] = t5;
|
|
78
|
+
$[10] = t6;
|
|
79
|
+
$[11] = t8;
|
|
80
|
+
$[12] = t9;
|
|
81
|
+
} else t9 = $[12];
|
|
82
|
+
let t10;
|
|
83
|
+
if ($[13] !== children || $[14] !== t9) {
|
|
84
|
+
t10 = /* @__PURE__ */ jsxs(TreeContextMenuContext.Provider, {
|
|
85
|
+
value: contextValue,
|
|
86
|
+
children: [children, t9]
|
|
87
|
+
});
|
|
88
|
+
$[13] = children;
|
|
89
|
+
$[14] = t9;
|
|
90
|
+
$[15] = t10;
|
|
91
|
+
} else t10 = $[15];
|
|
92
|
+
return t10;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { TreeContextMenuProvider, useTreeContextMenu };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=TreeContextMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeContextMenu.js","names":["createContext","useContext","useMemo","useState","Menu","useTranslation","PropsWithChildren","ReactNode","TreeContextMenuContextValue","openContextMenu","props","position","x","y","actions","TreeContextMenuContext","useTreeContextMenu","TreeContextMenuProvider","t0","$","_c","children","translate","menuProps","setMenuProps","undefined","t1","Symbol","for","contextValue","t2","t3","t4","e","preventDefault","t5","top","left","t6","t7","t8","t9","t10"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeContextMenu.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, useState } from \"react\";\nimport { Menu } from \"@mui/material\";\nimport { useTranslation } from \"../LocalizationContext.js\";\n\nimport type { PropsWithChildren, ReactNode } from \"react\";\n\ninterface TreeContextMenuContextValue {\n openContextMenu: (props: { position: { x: number; y: number }; actions: ReactNode[] }) => void;\n}\n\nconst TreeContextMenuContext = createContext<TreeContextMenuContextValue>({ openContextMenu: () => {} });\n\n/** @internal */\nexport function useTreeContextMenu() {\n return useContext(TreeContextMenuContext);\n}\n\n/**\n * Renders a single context menu shared by all tree items, avoiding the cost of mounting a `Menu` per row.\n *\n * @internal\n */\nexport function TreeContextMenuProvider({ children }: PropsWithChildren) {\n const translate = useTranslation();\n const [menuProps, setMenuProps] = useState<{ position: { x: number; y: number }; actions: ReactNode[] } | undefined>(\n undefined,\n );\n const contextValue = useMemo<TreeContextMenuContextValue>(() => ({ openContextMenu: setMenuProps }), []);\n return (\n <TreeContextMenuContext.Provider value={contextValue}>\n {children}\n <Menu\n open={!!menuProps}\n onClose={() => setMenuProps(undefined)}\n onContextMenu={(e) => {\n e.preventDefault();\n setMenuProps(undefined);\n }}\n anchorReference=\"anchorPosition\"\n anchorPosition={menuProps ? { top: menuProps.position.y, left: menuProps.position.x } : undefined}\n aria-label={translate(\"more\")}\n onClick={() => setMenuProps(undefined)}\n >\n {menuProps?.actions}\n </Menu>\n </TreeContextMenuContext.Provider>\n );\n}\n"],"mappings":";;;;;;AAeA,MAAMe,yBAAyBf,cAA2C,EAAES,uBAAuB,CAAC,EAAE,CAAC;;AAGvG,SAAOO,qBAAA;CAAA,OACEf,WAAWc,sBAAsB;AAAC;;;;;;AAQ3C,SAAOE,wBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAiC,MAAA,EAAAC,aAAAH;CACtC,MAAAI,YAAkBjB,eAAe;CACjC,MAAA,CAAAkB,WAAAC,gBAAkCrB,SAChCsB,KAAAA,CACF;CAAE,IAAAC;CAAA,IAAAP,E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AAG;GACH,SAAAC;GAERC,UAAAA;EAZE,CAAA;EAaErB,EAAA,KAAAW;EAAAX,EAAA,KAAAgB;EAAAhB,EAAA,MAAAmB;EAAAnB,EAAA,MAAAqB;EAAArB,EAAA,MAAAsB;CAAA,OAAAA,KAAAtB,EAAA;CAAA,IAAAuB;CAAA,IAAAvB,EAAA,QAAAE,YAAAF,EAAA,QAAAsB,IAAA;EAfTC,MAAA,qBAAA,uBAAA,UAAA;GAAwCb,OAAAA;GAAxC,UAAA,CACGR,UACDoB,EAcF;;EAAkCtB,EAAA,MAAAE;EAAAF,EAAA,MAAAsB;EAAAtB,EAAA,MAAAuB;CAAA,OAAAA,MAAAvB,EAAA;CAAA,OAhBlCuB;AAgBkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeFilterAction.js","names":["memo","useCallback","useTranslation","TreeActionBase","filterSvg","NamedExoticComponent","HierarchyLevelDetails","TreeRendererProps","TreeNode","TreeActionBaseAttributes","TreeNodeFilterActionProps","onFilter","hierarchyLevelDetails","Pick","TreeNodeFilterAction","node","t0","$","_c","actionAttributes","getHierarchyLevelDetails","translate","t1","filterHierarchyLevel","t2","filterHierarchyLevelActiveDescription","t3","id","handleClick","t4","isFiltered","undefined","t5","t6","isFilterable","t7"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.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 { memo, useCallback } from \"react\";\nimport { useTranslation } from \"../LocalizationContext.js\";\nimport { TreeActionBase } from \"./TreeAction.js\";\n\nimport filterSvg from \"@stratakit/icons/filter.svg\";\n\nimport type { NamedExoticComponent } from \"react\";\nimport type { HierarchyLevelDetails, TreeRendererProps } from \"../Renderers.js\";\nimport type { TreeNode } from \"../TreeNode.js\";\nimport type { TreeActionBaseAttributes } from \"./TreeAction.js\";\n\n/** @alpha */\ntype TreeNodeFilterActionProps = {\n /**\n * Action to perform when the filter button is clicked for this node.\n */\n onFilter?: (hierarchyLevelDetails: HierarchyLevelDetails) => void;\n} & TreeActionBaseAttributes &\n Pick<TreeRendererProps, \"getHierarchyLevelDetails\">;\n\n/**\n * React component that renders a filter action for a tree item.\n *\n * The action calls the `onFilter` callback prop when clicked.\n *\n * @see `getMenuActions`, `getInlineActions`, `getContextMenuActions` props of `TreeRenderer` to add this action\n * to tree items.\n *\n * @alpha\n */\nexport const TreeNodeFilterAction: NamedExoticComponent<TreeNodeFilterActionProps & { node: TreeNode }> = memo(\n function TreeNodeFilterAction({\n node,\n onFilter,\n getHierarchyLevelDetails,\n ...actionAttributes\n }: TreeNodeFilterActionProps & { node: TreeNode }) {\n const translate = useTranslation();\n const filterHierarchyLevel = translate(\"filterHierarchyLevel\");\n const filterHierarchyLevelActiveDescription = translate(\"filterHierarchyLevelActiveDescription\");\n\n const handleClick = useCallback(() => {\n const hierarchyLevelDetails = getHierarchyLevelDetails(node.id);\n hierarchyLevelDetails && onFilter?.(hierarchyLevelDetails);\n }, [node, getHierarchyLevelDetails, onFilter]);\n\n return (\n <TreeActionBase\n {...actionAttributes}\n label={filterHierarchyLevel}\n onClick={handleClick}\n icon={filterSvg}\n visible={node.isFiltered ? true : undefined}\n dot={node.isFiltered ? filterHierarchyLevelActiveDescription : undefined}\n hide={!onFilter || !node.isFilterable}\n />\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,MAAac,uBAA6Fd,
|
|
1
|
+
{"version":3,"file":"TreeNodeFilterAction.js","names":["memo","useCallback","useTranslation","TreeActionBase","filterSvg","NamedExoticComponent","HierarchyLevelDetails","TreeRendererProps","TreeNode","TreeActionBaseAttributes","TreeNodeFilterActionProps","onFilter","hierarchyLevelDetails","Pick","TreeNodeFilterAction","node","t0","$","_c","actionAttributes","getHierarchyLevelDetails","translate","t1","filterHierarchyLevel","t2","filterHierarchyLevelActiveDescription","t3","id","handleClick","t4","isFiltered","undefined","t5","t6","isFilterable","t7"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.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 { memo, useCallback } from \"react\";\nimport { useTranslation } from \"../LocalizationContext.js\";\nimport { TreeActionBase } from \"./TreeAction.js\";\n\nimport filterSvg from \"@stratakit/icons/filter.svg\";\n\nimport type { NamedExoticComponent } from \"react\";\nimport type { HierarchyLevelDetails, TreeRendererProps } from \"../Renderers.js\";\nimport type { TreeNode } from \"../TreeNode.js\";\nimport type { TreeActionBaseAttributes } from \"./TreeAction.js\";\n\n/** @alpha */\ntype TreeNodeFilterActionProps = {\n /**\n * Action to perform when the filter button is clicked for this node.\n */\n onFilter?: (hierarchyLevelDetails: HierarchyLevelDetails) => void;\n} & TreeActionBaseAttributes &\n Pick<TreeRendererProps, \"getHierarchyLevelDetails\">;\n\n/**\n * React component that renders a filter action for a tree item.\n *\n * The action calls the `onFilter` callback prop when clicked.\n *\n * @see `getMenuActions`, `getInlineActions`, `getContextMenuActions` props of `TreeRenderer` to add this action\n * to tree items.\n *\n * @alpha\n */\nexport const TreeNodeFilterAction: NamedExoticComponent<TreeNodeFilterActionProps & { node: TreeNode }> = memo(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function TreeNodeFilterAction({\n node,\n onFilter,\n getHierarchyLevelDetails,\n ...actionAttributes\n }: TreeNodeFilterActionProps & { node: TreeNode }) {\n const translate = useTranslation();\n const filterHierarchyLevel = translate(\"filterHierarchyLevel\");\n const filterHierarchyLevelActiveDescription = translate(\"filterHierarchyLevelActiveDescription\");\n\n const handleClick = useCallback(() => {\n const hierarchyLevelDetails = getHierarchyLevelDetails(node.id);\n hierarchyLevelDetails && onFilter?.(hierarchyLevelDetails);\n }, [node, getHierarchyLevelDetails, onFilter]);\n\n return (\n <TreeActionBase\n {...actionAttributes}\n label={filterHierarchyLevel}\n onClick={handleClick}\n icon={filterSvg}\n visible={node.isFiltered ? true : undefined}\n dot={node.isFiltered ? filterHierarchyLevelActiveDescription : undefined}\n hide={!onFilter || !node.isFilterable}\n />\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,MAAac,uBAA6Fd,KAExG,SAAAc,qBAAAE,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL;CAAA,IAAAJ;CAAA,IAAAM,EAAA,OAAAD,IAAA;EAA8B,CAAA,CAAAD,MAAAJ,UAAAS,0BAAA,GAAAD,oBAAAH;EAKmBC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAN;CAAA,OAAA;EAAAQ,mBAAAF,EAAA;EAAAG,2BAAAH,EAAA;EAAAF,OAAAE,EAAA;EAAAN,WAAAM,EAAA;CAAA;CAC/C,MAAAI,YAAkBnB,eAAe;CAAE,IAAAoB;CAAA,IAAAL,EAAA,OAAAI,WAAA;EACNC,KAAAD,UAAU,sBAAsB;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAA9D,MAAAM,uBAA6BD;CAAkC,IAAAE;CAAA,IAAAP,EAAA,OAAAI,WAAA;EACjBG,KAAAH,UAAU,uCAAuC;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAhG,MAAAQ,wCAA8CD;CAAmD,IAAAE;CAAA,IAAAT,EAAA,OAAAG,4BAAAH,EAAA,QAAAF,KAAAY,MAAAV,EAAA,QAAAN,UAAA;EAEjEe,WAAA;GAC9B,MAAAd,wBAA8BQ,yBAAyBL,KAAIY,EAAG;GAC9Df,yBAAyBD,WAAWC,qBAAqB;EAAC;EAC3DK,EAAA,KAAAG;EAAAH,EAAA,MAAAF,KAAAY;EAAAV,EAAA,MAAAN;EAAAM,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAHD,MAAAW,cAAoBF;CAWP,MAAAG,KAAAd,KAAIe,aAAJ,OAAAC,KAAAA;CACJ,MAAAC,KAAAjB,KAAIe,aAAJL,wCAAAM,KAAAA;CACC,MAAAE,KAAA,CAACtB,YAAD,CAAcI,KAAImB;CAAa,IAAAC;CAAA,IAAAlB,EAAA,QAAAE,oBAAAF,EAAA,QAAAM,wBAAAN,EAAA,QAAAW,eAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAe,MAAAf,EAAA,QAAAgB,IAAA;EAPvCE,KAAA,oBAAC,gBAAD;GAAe,GACThB;GACGI,OAAAA;GACEK,SAAAA;GACHxB,MAAAA;GACG,SAAAyB;GACJ,KAAAG;GACC,MAAAC;EAA+B,CAAA;EACrChB,EAAA,MAAAE;EAAAF,EAAA,MAAAM;EAAAN,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAe;EAAAf,EAAA,MAAAgB;EAAAhB,EAAA,MAAAkB;CAAA,OAAAA,KAAAlB,EAAA;CAAA,OARFkB;AAQE,CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeRenameAction.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.tsx"],"mappings":";;;;;;;;;;;;;;;cA0Ba,sBAAsB,qBAAqB;EAA6B,MAAM;;;
|
|
1
|
+
{"version":3,"file":"TreeNodeRenameAction.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.tsx"],"mappings":";;;;;;;;;;;;;;;cA0Ba,sBAAsB,qBAAqB;EAA6B,MAAM;;;UAoB1E;;;;;EAKf,iBAAiB;EACjB;EACA,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeRenameAction.js","names":["createContext","memo","useCallback","useContext","useMemo","useState","useTranslation","TreeActionBase","renameSvg","NamedExoticComponent","PropsWithChildren","TreeNode","TreeActionBaseAttributes","TreeNodeRenameAction","node","t0","$","_c","actionAttributes","translate","context","useTreeNodeRenameContext","t1","rename","t2","canRename","startRename","t3","handleClick","t4","t5","TreeNodeEditingProps","onLabelChanged","newLabel","labelValidationHint","validate","RenameParameters","nodeId","commit","TreeNodeRenameContext","renameParameters","cancelRename","treeNodeRenameContext","undefined","TreeNodeRenameContextProvider","value","children","useTreeNodeRenameContextValue","getEditingProps","setRenameParameters","id","Symbol","for","node_0"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.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, memo, useCallback, useContext, useMemo, useState } from \"react\";\nimport { useTranslation } from \"../LocalizationContext.js\";\nimport { TreeActionBase } from \"./TreeAction.js\";\n\nimport renameSvg from \"@stratakit/icons/rename.svg\";\n\nimport type { NamedExoticComponent, PropsWithChildren } from \"react\";\nimport type { TreeNode } from \"../TreeNode.js\";\nimport type { TreeActionBaseAttributes } from \"./TreeAction.js\";\n\n/**\n * React component that renders a rename action for a tree item.\n *\n * The tree component must have `getEditingProps.onLabelChanged` prop set to enable renaming functionality. When\n * rename is completed, the `onLabelChanged` function is called to make the actual data update.\n *\n * @see `getMenuActions`, `getInlineActions`, `getContextMenuActions` props of `TreeRenderer` to add this action\n * to tree items.\n *\n * @alpha\n */\nexport const TreeNodeRenameAction: NamedExoticComponent<TreeActionBaseAttributes & { node: TreeNode }> = memo(\n function TreeNodeRenameAction({ node, ...actionAttributes }: TreeActionBaseAttributes & { node: TreeNode }) {\n const translate = useTranslation();\n const context = useTreeNodeRenameContext();\n const rename = translate(\"rename\");\n\n const canRename = context?.canRename(node) ?? false;\n const startRename = context?.startRename;\n const handleClick = useCallback(() => {\n startRename?.(node);\n }, [startRename, node]);\n\n return (\n <TreeActionBase {...actionAttributes} label={rename} onClick={handleClick} icon={renameSvg} hide={!canRename} />\n );\n },\n);\n\n/** @alpha */\nexport interface TreeNodeEditingProps {\n /**\n * A callback that is invoked when node label is changed. Should be used together\n * with `<TreeNodeRenameAction />` to enter label editing mode.\n */\n onLabelChanged: (newLabel: string) => void;\n labelValidationHint?: string;\n validate?: (newLabel: string) => boolean;\n}\n\n/** @internal */\nexport interface RenameParameters {\n nodeId: string;\n commit: (newLabel: string) => void;\n labelValidationHint?: string;\n validate?: (newLabel: string) => boolean;\n}\n\ninterface TreeNodeRenameContext {\n renameParameters?: RenameParameters;\n startRename: (node: TreeNode) => void;\n canRename: (node: TreeNode) => boolean;\n cancelRename: () => void;\n}\n\nconst treeNodeRenameContext = createContext<TreeNodeRenameContext | undefined>(undefined);\n\n/** @internal */\nexport const useTreeNodeRenameContext = () => {\n return useContext(treeNodeRenameContext);\n};\n\n/** @internal */\nexport function TreeNodeRenameContextProvider({\n value,\n children,\n}: PropsWithChildren<{ value: TreeNodeRenameContext }>) {\n return <treeNodeRenameContext.Provider value={value}>{children}</treeNodeRenameContext.Provider>;\n}\n\n/** @internal */\nexport function useTreeNodeRenameContextValue({\n getEditingProps,\n}: {\n getEditingProps?: (node: TreeNode) => TreeNodeEditingProps | undefined;\n}) {\n const [renameParameters, setRenameParameters] = useState<RenameParameters | undefined>(undefined);\n\n const startRename = useCallback(\n (node: TreeNode) => {\n const { onLabelChanged, labelValidationHint, validate } = getEditingProps?.(node) ?? {};\n if (onLabelChanged) {\n setRenameParameters({\n nodeId: node.id,\n commit: (newLabel) => {\n onLabelChanged(newLabel);\n setRenameParameters(undefined);\n },\n labelValidationHint,\n validate,\n });\n }\n },\n [getEditingProps],\n );\n\n const cancelRename = useCallback(() => {\n setRenameParameters(undefined);\n }, []);\n\n const canRename = useCallback(\n (node: TreeNode) => {\n return getEditingProps?.(node)?.onLabelChanged !== undefined;\n },\n [getEditingProps],\n );\n\n return useMemo(\n () => ({ renameParameters, cancelRename, startRename, canRename }),\n [renameParameters, canRename, startRename, cancelRename],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,MAAaa,uBAA4FZ,
|
|
1
|
+
{"version":3,"file":"TreeNodeRenameAction.js","names":["createContext","memo","useCallback","useContext","useMemo","useState","useTranslation","TreeActionBase","renameSvg","NamedExoticComponent","PropsWithChildren","TreeNode","TreeActionBaseAttributes","TreeNodeRenameAction","node","t0","$","_c","actionAttributes","translate","context","useTreeNodeRenameContext","t1","rename","t2","canRename","startRename","t3","handleClick","t4","t5","TreeNodeEditingProps","onLabelChanged","newLabel","labelValidationHint","validate","RenameParameters","nodeId","commit","TreeNodeRenameContext","renameParameters","cancelRename","treeNodeRenameContext","undefined","TreeNodeRenameContextProvider","value","children","useTreeNodeRenameContextValue","getEditingProps","setRenameParameters","id","Symbol","for","node_0"],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.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, memo, useCallback, useContext, useMemo, useState } from \"react\";\nimport { useTranslation } from \"../LocalizationContext.js\";\nimport { TreeActionBase } from \"./TreeAction.js\";\n\nimport renameSvg from \"@stratakit/icons/rename.svg\";\n\nimport type { NamedExoticComponent, PropsWithChildren } from \"react\";\nimport type { TreeNode } from \"../TreeNode.js\";\nimport type { TreeActionBaseAttributes } from \"./TreeAction.js\";\n\n/**\n * React component that renders a rename action for a tree item.\n *\n * The tree component must have `getEditingProps.onLabelChanged` prop set to enable renaming functionality. When\n * rename is completed, the `onLabelChanged` function is called to make the actual data update.\n *\n * @see `getMenuActions`, `getInlineActions`, `getContextMenuActions` props of `TreeRenderer` to add this action\n * to tree items.\n *\n * @alpha\n */\nexport const TreeNodeRenameAction: NamedExoticComponent<TreeActionBaseAttributes & { node: TreeNode }> = memo(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function TreeNodeRenameAction({ node, ...actionAttributes }: TreeActionBaseAttributes & { node: TreeNode }) {\n const translate = useTranslation();\n const context = useTreeNodeRenameContext();\n const rename = translate(\"rename\");\n\n const canRename = context?.canRename(node) ?? false;\n const startRename = context?.startRename;\n const handleClick = useCallback(() => {\n startRename?.(node);\n }, [startRename, node]);\n\n return (\n <TreeActionBase {...actionAttributes} label={rename} onClick={handleClick} icon={renameSvg} hide={!canRename} />\n );\n },\n);\n\n/** @alpha */\nexport interface TreeNodeEditingProps {\n /**\n * A callback that is invoked when node label is changed. Should be used together\n * with `<TreeNodeRenameAction />` to enter label editing mode.\n */\n onLabelChanged: (newLabel: string) => void;\n labelValidationHint?: string;\n validate?: (newLabel: string) => boolean;\n}\n\n/** @internal */\nexport interface RenameParameters {\n nodeId: string;\n commit: (newLabel: string) => void;\n labelValidationHint?: string;\n validate?: (newLabel: string) => boolean;\n}\n\ninterface TreeNodeRenameContext {\n renameParameters?: RenameParameters;\n startRename: (node: TreeNode) => void;\n canRename: (node: TreeNode) => boolean;\n cancelRename: () => void;\n}\n\nconst treeNodeRenameContext = createContext<TreeNodeRenameContext | undefined>(undefined);\n\n/** @internal */\nexport const useTreeNodeRenameContext = () => {\n return useContext(treeNodeRenameContext);\n};\n\n/** @internal */\nexport function TreeNodeRenameContextProvider({\n value,\n children,\n}: PropsWithChildren<{ value: TreeNodeRenameContext }>) {\n return <treeNodeRenameContext.Provider value={value}>{children}</treeNodeRenameContext.Provider>;\n}\n\n/** @internal */\nexport function useTreeNodeRenameContextValue({\n getEditingProps,\n}: {\n getEditingProps?: (node: TreeNode) => TreeNodeEditingProps | undefined;\n}) {\n const [renameParameters, setRenameParameters] = useState<RenameParameters | undefined>(undefined);\n\n const startRename = useCallback(\n (node: TreeNode) => {\n const { onLabelChanged, labelValidationHint, validate } = getEditingProps?.(node) ?? {};\n if (onLabelChanged) {\n setRenameParameters({\n nodeId: node.id,\n commit: (newLabel) => {\n onLabelChanged(newLabel);\n setRenameParameters(undefined);\n },\n labelValidationHint,\n validate,\n });\n }\n },\n [getEditingProps],\n );\n\n const cancelRename = useCallback(() => {\n setRenameParameters(undefined);\n }, []);\n\n const canRename = useCallback(\n (node: TreeNode) => {\n return getEditingProps?.(node)?.onLabelChanged !== undefined;\n },\n [getEditingProps],\n );\n\n return useMemo(\n () => ({ renameParameters, cancelRename, startRename, canRename }),\n [renameParameters, canRename, startRename, cancelRename],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,MAAaa,uBAA4FZ,KAEvG,SAAAY,qBAAAE,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAJ;CAAA,IAAAE,EAAA,OAAAD,IAAA;EAA8B,CAAA,CAAAD,MAAA,GAAAI,oBAAAH;EAA4EC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAF;CAAA,OAAA;EAAAI,mBAAAF,EAAA;EAAAF,OAAAE,EAAA;CAAA;CACxG,MAAAG,YAAkBb,eAAe;CACjC,MAAAc,UAAgBC,yBAAyB;CAAE,IAAAC;CAAA,IAAAN,EAAA,OAAAG,WAAA;EAC5BG,KAAAH,UAAU,QAAQ;EAACH,EAAA,KAAAG;EAAAH,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAlC,MAAAO,SAAeD;CAAoB,IAAAE;CAAA,IAAAR,EAAA,OAAAI,WAAAJ,EAAA,OAAAF,MAAA;EAEjBU,KAAAJ,SAAOK,UAAYX,IAAa,KAAhC;EAAiCE,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAnD,MAAAS,YAAkBD;CAClB,MAAAE,cAAoBN,SAAOM;CAAc,IAAAC;CAAA,IAAAX,EAAA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/structures";
|
|
5
|
-
import "./TreeNodeRenderer.css";
|
|
6
5
|
//#region src/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts
|
|
7
6
|
/** @alpha */
|
|
8
7
|
type StrataKitTreeItemProps = Omit<ComponentPropsWithoutRef<typeof Tree.Item>, "actions" | "inlineActions" | "expanded" | "onExpandedChange" | "icon" | "unstable_decorations" | "error"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeRenderer.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenderer.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeNodeRenderer.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/stratakit/TreeNodeRenderer.tsx"],"mappings":";;;;;;KA0CY,yBAAyB,KACnC,gCAAgC,KAAK;;;;;EAOrC,cAAc"}
|