@uipath/apollo-react 3.55.0-pr356.b109b65 → 3.55.1-pr354.8826816

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.
Files changed (34) hide show
  1. package/dist/canvas/components/AddNodePanel/AddNodePanel.cjs +1 -1
  2. package/dist/canvas/components/AddNodePanel/AddNodePanel.js +1 -1
  3. package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
  4. package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +1 -1
  5. package/dist/canvas/components/GroupNode/GroupNode.stories.d.ts.map +1 -1
  6. package/dist/canvas/components/GroupNode/GroupNode.styles.d.ts.map +1 -1
  7. package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
  8. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
  9. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.cjs +3 -5
  10. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.d.ts.map +1 -1
  11. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.js +3 -5
  12. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.cjs +0 -18
  13. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.d.ts.map +1 -1
  14. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.js +0 -18
  15. package/dist/canvas/components/Toolbox/ListView.cjs +54 -34
  16. package/dist/canvas/components/Toolbox/ListView.d.ts +12 -2
  17. package/dist/canvas/components/Toolbox/ListView.d.ts.map +1 -1
  18. package/dist/canvas/components/Toolbox/ListView.js +51 -34
  19. package/dist/canvas/components/Toolbox/ListView.styles.cjs +7 -1
  20. package/dist/canvas/components/Toolbox/ListView.styles.d.ts.map +1 -1
  21. package/dist/canvas/components/Toolbox/ListView.styles.js +7 -1
  22. package/dist/canvas/components/Toolbox/SearchBox.cjs +12 -4
  23. package/dist/canvas/components/Toolbox/SearchBox.d.ts +3 -0
  24. package/dist/canvas/components/Toolbox/SearchBox.d.ts.map +1 -1
  25. package/dist/canvas/components/Toolbox/SearchBox.js +12 -4
  26. package/dist/canvas/components/Toolbox/Toolbox.cjs +143 -4
  27. package/dist/canvas/components/Toolbox/Toolbox.d.ts.map +1 -1
  28. package/dist/canvas/components/Toolbox/Toolbox.js +143 -4
  29. package/dist/canvas/core/CategoryTree.d.ts.map +1 -1
  30. package/package.json +3 -3
  31. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.utils.cjs +0 -48
  32. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.utils.d.ts +0 -2
  33. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.utils.d.ts.map +0 -1
  34. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.utils.js +0 -14
@@ -69,7 +69,7 @@ const AddNodePanel_AddNodePanel = /*#__PURE__*/ (0, external_react_namespaceObje
69
69
  onNodeSelect
70
70
  ]);
71
71
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Toolbox_index_cjs_namespaceObject.Toolbox, {
72
- title: title ?? 'Add Node',
72
+ title: title ?? 'Add node',
73
73
  initialItems: nodeListOptions,
74
74
  loading: loading,
75
75
  onItemSelect: handleNodeListItemSelect,
@@ -41,7 +41,7 @@ const AddNodePanel_AddNodePanel = /*#__PURE__*/ memo(function({ onNodeSelect, on
41
41
  onNodeSelect
42
42
  ]);
43
43
  return /*#__PURE__*/ jsx(Toolbox, {
44
- title: title ?? 'Add Node',
44
+ title: title ?? 'Add node',
45
45
  initialItems: nodeListOptions,
46
46
  loading: loading,
47
47
  onItemSelect: handleNodeListItemSelect,
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAmChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAuhB1B,eAAO,MAAM,QAAQ,8CAjhBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAihBhB,CAAC"}
1
+ {"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAmChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAgiB1B,eAAO,MAAM,QAAQ,8CA1hBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CA0hBhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6GtD,eAAO,MAAM,aAAa;;;;eACb,OAAO;sBACA,MAAM;YAChB,SAAS;sBACC,MAAM;uBACL,MAAM;uBACN,MAAM;qBACR,MAAM;YACf,MAAM;aACL,MAAM;gBACH,OAAO;oBACH,aAAa;yGAuE9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;YAClB,MAAM;sBACI,MAAM;YAChB,SAAS;aACR,MAAM;YACP,MAAM;yGA0Cf,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;uBAAmC,OAAO;YAAU,SAAS;yGAiC1F,CAAC;AAEF,eAAO,MAAM,UAAU;;;;YAAwB,SAAS;sBAAoB,MAAM;yGAwBjF,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAAwB,SAAS;yGAe1D,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAChB,SAAS;sBACC,MAAM;aACf,QAAQ,GAAG,SAAS;2HA+B9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;yGAkBjC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;cACd,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc;YAC3D,SAAS;yGAsBlB,CAAC;AAKF,eAAO,MAAM,gBAAgB;;;YAGnB,SAAS;iBACJ,MAAM;gBACP,MAAM;UAcnB,CAAC"}
1
+ {"version":3,"file":"BaseNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA4GtD,eAAO,MAAM,aAAa;;;;eACb,OAAO;sBACA,MAAM;YAChB,SAAS;sBACC,MAAM;uBACL,MAAM;uBACN,MAAM;qBACR,MAAM;YACf,MAAM;aACL,MAAM;gBACH,OAAO;oBACH,aAAa;yGAuE9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;YAClB,MAAM;sBACI,MAAM;YAChB,SAAS;aACR,MAAM;YACP,MAAM;yGA0Cf,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;uBAAmC,OAAO;YAAU,SAAS;yGAiC1F,CAAC;AAEF,eAAO,MAAM,UAAU;;;;YAAwB,SAAS;sBAAoB,MAAM;yGAwBjF,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAAwB,SAAS;yGAe1D,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAChB,SAAS;sBACC,MAAM;aACf,QAAQ,GAAG,SAAS;2HA+B9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;yGAkBjC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;cACd,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc;YAC3D,SAAS;yGAsBlB,CAAC;AAKF,eAAO,MAAM,gBAAgB;;;YAGnB,SAAS;iBACJ,MAAM;gBACP,MAAM;UAcnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GroupNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAoB5D,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoHnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAgCF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAiEF,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAyHF,eAAO,MAAM,mBAAmB,EAAE,KAEjC,CAAC;AAyDF,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAkGF,eAAO,MAAM,0BAA0B,EAAE,KAExC,CAAC;AA8DF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"GroupNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAoB5D,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoHnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAgCF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAuEF,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAwJF,eAAO,MAAM,mBAAmB,EAAE,KAEjC,CAAC;AA+DF,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAgHF,eAAO,MAAM,0BAA0B,EAAE,KAExC,CAAC;AA0EF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GroupNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;sBACP,MAAM;kBACV,MAAM;eACT,OAAO;gBACN,OAAO;sBACD,MAAM;yGA0BzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAgBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAe5B,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAUtB,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;gBAA+B,OAAO;qHA0BnE,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;yGAMhC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;gBAA4B,OAAO;yGAK3D,CAAC;AAEF,eAAO,MAAM,YAAY;;;;eAA2B,OAAO;aAAW,MAAM;yGAW3E,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;eAA2B,OAAO;yGAgCjE,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;eAA2B,OAAO;yGAgCpE,CAAC"}
1
+ {"version":3,"file":"GroupNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;sBACP,MAAM;kBACV,MAAM;eACT,OAAO;gBACN,OAAO;sBACD,MAAM;yGAwBzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAgBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAe5B,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAUtB,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;gBAA+B,OAAO;qHA0BnE,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;yGAMhC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;gBAA4B,OAAO;yGAK3D,CAAC;AAEF,eAAO,MAAM,YAAY;;;;eAA2B,OAAO;aAAW,MAAM;yGAW3E,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;eAA2B,OAAO;yGAgCjE,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;eAA2B,OAAO;yGAgCpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAkpBxD,eAAO,MAAM,SAAS,8CAxoBa,cAAc,6CAwoBA,CAAC"}
1
+ {"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA8oBxD,eAAO,MAAM,SAAS,8CApoBa,cAAc,6CAooBA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StageNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyBvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA0FD,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KA2DrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAsE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA8M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA+HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoKpC,CAAC;AA8GF,eAAO,MAAM,uBAAuB,EAAE,KAOrC,CAAC;AAkVF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAmJF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC"}
1
+ {"version":3,"file":"StageNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyBvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA0FD,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KA2DrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAsE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA8M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA+HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoKpC,CAAC;AA8GF,eAAO,MAAM,uBAAuB,EAAE,KAOrC,CAAC;AAkVF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAiJF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC"}
@@ -37,8 +37,8 @@ __webpack_require__.d(__webpack_exports__, {
37
37
  });
38
38
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
39
39
  const react_namespaceObject = require("@emotion/react");
40
- const external_index_cjs_namespaceObject = require("../../index.cjs");
41
40
  const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
41
+ const external_index_cjs_namespaceObject = require("../../index.cjs");
42
42
  const external_motion_react_namespaceObject = require("motion/react");
43
43
  const external_react_namespaceObject = require("react");
44
44
  const external_react_markdown_namespaceObject = require("react-markdown");
@@ -49,7 +49,6 @@ const external_constants_cjs_namespaceObject = require("../../constants.cjs");
49
49
  const index_cjs_namespaceObject = require("../Toolbar/index.cjs");
50
50
  const external_StickyNoteNode_styles_cjs_namespaceObject = require("./StickyNoteNode.styles.cjs");
51
51
  const external_StickyNoteNode_types_cjs_namespaceObject = require("./StickyNoteNode.types.cjs");
52
- const external_StickyNoteNode_utils_cjs_namespaceObject = require("./StickyNoteNode.utils.cjs");
53
52
  const minWidth = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
54
53
  const minHeight = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
55
54
  const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
@@ -223,8 +222,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
223
222
  }, [
224
223
  handleEditClick,
225
224
  handleToggleColorPicker,
226
- color,
227
- handleDelete
225
+ color
228
226
  ]);
229
227
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
230
228
  children: [
@@ -326,7 +324,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
326
324
  external_remark_gfm_default()
327
325
  ],
328
326
  components: markdownComponents,
329
- children: (0, external_StickyNoteNode_utils_cjs_namespaceObject.preserveNewlines)(localContent)
327
+ children: localContent
330
328
  }) : renderPlaceholderOnSelect && selected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_markdown_default(), {
331
329
  remarkPlugins: [
332
330
  external_remark_gfm_default()
@@ -1 +1 @@
1
- {"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAsB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AA8TD,eAAO,MAAM,cAAc,kHAlTxB,mBAAmB,6CAkTqC,CAAC"}
1
+ {"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAuB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AA8TD,eAAO,MAAM,cAAc,kHAlTxB,mBAAmB,6CAkTqC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Global } from "@emotion/react";
3
- import { NodeIcon } from "../../index.js";
4
3
  import { NodeResizeControl, useReactFlow } from "../../xyflow/react.js";
4
+ import { NodeIcon } from "../../index.js";
5
5
  import { AnimatePresence } from "motion/react";
6
6
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
7
  import react_markdown from "react-markdown";
@@ -10,7 +10,6 @@ import { GRID_SPACING } from "../../constants.js";
10
10
  import { NodeToolbar } from "../Toolbar/index.js";
11
11
  import { BottomCornerIndicators, ColorOption, ColorPickerPanel, RESIZE_CONTROL_Z_INDEX, ResizeHandle, StickyNoteContainer, StickyNoteMarkdown, StickyNoteTextArea, StickyNoteWrapper, TopCornerIndicators, stickyNoteGlobalStyles } from "./StickyNoteNode.styles.js";
12
12
  import { STICKY_NOTE_COLORS, withAlpha } from "./StickyNoteNode.types.js";
13
- import { preserveNewlines } from "./StickyNoteNode.utils.js";
14
13
  const minWidth = 8 * GRID_SPACING;
15
14
  const minHeight = 8 * GRID_SPACING;
16
15
  const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
@@ -184,8 +183,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
184
183
  }, [
185
184
  handleEditClick,
186
185
  handleToggleColorPicker,
187
- color,
188
- handleDelete
186
+ color
189
187
  ]);
190
188
  return /*#__PURE__*/ jsxs(Fragment, {
191
189
  children: [
@@ -287,7 +285,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
287
285
  remark_gfm
288
286
  ],
289
287
  components: markdownComponents,
290
- children: preserveNewlines(localContent)
288
+ children: localContent
291
289
  }) : renderPlaceholderOnSelect && selected && /*#__PURE__*/ jsx(react_markdown, {
292
290
  remarkPlugins: [
293
291
  remark_gfm
@@ -51,20 +51,6 @@ const styled_namespaceObject = require("@emotion/styled");
51
51
  var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
52
52
  const external_motion_react_namespaceObject = require("motion/react");
53
53
  const STICKY_NOTE_BELOW_EDGE_Z_INDEX = -10;
54
- const scrollbarStyles = `
55
- &::-webkit-scrollbar {
56
- width: 6px;
57
- }
58
-
59
- &::-webkit-scrollbar-track {
60
- background: transparent;
61
- }
62
-
63
- &::-webkit-scrollbar-thumb {
64
- background: var(--uix-canvas-border);
65
- border-radius: 4px;
66
- }
67
- `;
68
54
  const RESIZE_CONTROL_Z_INDEX = 100;
69
55
  const stickyNoteGlobalStyles = (0, react_namespaceObject.css)`
70
56
  /* Override React Flow's elevateNodesOnSelect behavior for sticky notes */
@@ -126,8 +112,6 @@ const StickyNoteTextArea = styled_default().textarea`
126
112
  user-select: text;
127
113
  cursor: text;
128
114
  }
129
-
130
- ${scrollbarStyles}
131
115
  `;
132
116
  const StickyNoteMarkdown = styled_default().div`
133
117
  width: 100%;
@@ -166,8 +150,6 @@ const StickyNoteMarkdown = styled_default().div`
166
150
  font-size: 0.9em;
167
151
  }
168
152
 
169
- ${scrollbarStyles}
170
-
171
153
  pre {
172
154
  background: rgba(0, 0, 0, 0.1);
173
155
  padding: 8px;
@@ -1 +1 @@
1
- {"version":3,"file":"StickyNoteNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAkBlD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,sBAAsB,2CAUlC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;yGAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;iBACjB,MAAM;qBACF,MAAM;eACZ,OAAO;eACP,OAAO;yGAqBnB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;eAAgC,OAAO;2HA4BrE,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGAqG9B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;eAA2B,OAAO;aAAW,MAAM;yGAW3E,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;eAA2B,OAAO;yGA+BjE,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;eAA2B,OAAO;yGA+BpE,CAAC;AAEF,eAAO,MAAM,gBAAgB;;UAa5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;WAA0B,MAAM;gBAAc,OAAO;qHAkB5E,CAAC"}
1
+ {"version":3,"file":"StickyNoteNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAGlD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,sBAAsB,2CAUlC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;yGAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;iBACjB,MAAM;qBACF,MAAM;eACZ,OAAO;eACP,OAAO;yGAqBnB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;eAAgC,OAAO;2HA0BrE,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGAmG9B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;eAA2B,OAAO;aAAW,MAAM;yGAW3E,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;eAA2B,OAAO;yGA+BjE,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;eAA2B,OAAO;yGA+BpE,CAAC;AAEF,eAAO,MAAM,gBAAgB;;UAa5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;WAA0B,MAAM;gBAAc,OAAO;qHAkB5E,CAAC"}
@@ -2,20 +2,6 @@ import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
3
  import { motion } from "motion/react";
4
4
  const STICKY_NOTE_BELOW_EDGE_Z_INDEX = -10;
5
- const scrollbarStyles = `
6
- &::-webkit-scrollbar {
7
- width: 6px;
8
- }
9
-
10
- &::-webkit-scrollbar-track {
11
- background: transparent;
12
- }
13
-
14
- &::-webkit-scrollbar-thumb {
15
- background: var(--uix-canvas-border);
16
- border-radius: 4px;
17
- }
18
- `;
19
5
  const RESIZE_CONTROL_Z_INDEX = 100;
20
6
  const stickyNoteGlobalStyles = css`
21
7
  /* Override React Flow's elevateNodesOnSelect behavior for sticky notes */
@@ -77,8 +63,6 @@ const StickyNoteTextArea = styled.textarea`
77
63
  user-select: text;
78
64
  cursor: text;
79
65
  }
80
-
81
- ${scrollbarStyles}
82
66
  `;
83
67
  const StickyNoteMarkdown = styled.div`
84
68
  width: 100%;
@@ -117,8 +101,6 @@ const StickyNoteMarkdown = styled.div`
117
101
  font-size: 0.9em;
118
102
  }
119
103
 
120
- ${scrollbarStyles}
121
-
122
104
  pre {
123
105
  background: rgba(0, 0, 0, 0.1);
124
106
  padding: 8px;
@@ -24,7 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- ListView: ()=>ListView_ListView
27
+ ListView: ()=>ListView_ListView,
28
+ buildRenderedItems: ()=>buildRenderedItems
28
29
  });
29
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
31
  const apollo_core_namespaceObject = require("@uipath/apollo-core");
@@ -35,8 +36,37 @@ const components_index_cjs_namespaceObject = require("../../../material/componen
35
36
  const external_react_namespaceObject = require("react");
36
37
  const CanvasThemeContext_cjs_namespaceObject = require("../BaseCanvas/CanvasThemeContext.cjs");
37
38
  const external_ListView_styles_cjs_namespaceObject = require("./ListView.styles.cjs");
39
+ function buildRenderedItems(items, enableSections) {
40
+ const result = [];
41
+ if (0 === items.length) return result;
42
+ if (!enableSections) {
43
+ for (const item of items)result.push({
44
+ type: 'item',
45
+ item
46
+ });
47
+ return result;
48
+ }
49
+ const [itemsWithSection, itemsWithoutSection] = (0, external_utils_index_cjs_namespaceObject.partition)(items, (item)=>!!item.section);
50
+ for (const item of itemsWithoutSection)result.push({
51
+ type: 'item',
52
+ item
53
+ });
54
+ if (0 === itemsWithSection.length) return result;
55
+ const sections = Array.from(new Set(itemsWithSection.map((item)=>item.section)));
56
+ for (const section of sections){
57
+ result.push({
58
+ type: 'section',
59
+ sectionName: section
60
+ });
61
+ for (const item of itemsWithSection.filter((item)=>item.section === section))result.push({
62
+ type: 'item',
63
+ item
64
+ });
65
+ }
66
+ return result;
67
+ }
38
68
  const IconContainerMemoized = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(external_ListView_styles_cjs_namespaceObject.IconContainer);
39
- const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ index, style, ariaAttributes, renderedItems, isLoading, isDarkMode, onItemClick, onItemHover })=>{
69
+ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ index, style, ariaAttributes, renderedItems, activeIndex, isLoading, isDarkMode, onItemClick, onItemHover })=>{
40
70
  const renderItem = renderedItems[index];
41
71
  const buttonStyle = (0, external_react_namespaceObject.useMemo)(()=>({
42
72
  ...style,
@@ -74,12 +104,17 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
74
104
  });
75
105
  const item = renderItem.item;
76
106
  const bgColor = isDarkMode ? item.colorDark ?? item.color : item.color;
107
+ const isActive = index === activeIndex;
77
108
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_ListView_styles_cjs_namespaceObject.ListItemButton, {
78
109
  ...ariaAttributes,
110
+ tabIndex: -1,
111
+ id: `toolbox-item-${item.id}`,
112
+ role: "option",
113
+ "aria-selected": isActive,
79
114
  style: buttonStyle,
80
115
  onClick: handleButtonClick,
81
116
  onHoverStart: handleButtonHover,
82
- className: isLoading ? 'loading' : '',
117
+ className: `${isLoading ? 'loading' : ''} ${isActive ? 'active' : ''}`,
83
118
  disabled: isLoading,
84
119
  children: [
85
120
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(IconContainerMemoized, {
@@ -134,48 +169,27 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
134
169
  ]
135
170
  });
136
171
  });
137
- const ListView_ListView = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(function({ items, onItemClick, onItemHover, emptyStateMessage = 'No items found', emptyStateIcon = 'search_off', isLoading = false, enableSections = true }) {
172
+ const ListViewInner = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(function({ items, activeIndex = -1, listRef, onItemClick, onItemHover, emptyStateMessage = 'No items found', emptyStateIcon = 'search_off', isLoading = false, enableSections = true }, ref) {
138
173
  const { isDarkMode } = (0, CanvasThemeContext_cjs_namespaceObject.useCanvasTheme)();
139
- const renderedItems = (0, external_react_namespaceObject.useMemo)(()=>{
140
- const result = [];
141
- if (0 === items.length) return result;
142
- if (!enableSections) {
143
- for (const item of items)result.push({
144
- type: 'item',
145
- item
146
- });
147
- return result;
148
- }
149
- const [itemsWithSection, itemsWithoutSection] = (0, external_utils_index_cjs_namespaceObject.partition)(items, (item)=>!!item.section);
150
- for (const item of itemsWithoutSection)result.push({
151
- type: 'item',
152
- item
153
- });
154
- if (0 === itemsWithSection.length) return result;
155
- const sections = Array.from(new Set(itemsWithSection.map((item)=>item.section)));
156
- for (const section of sections){
157
- result.push({
158
- type: 'section',
159
- sectionName: section
160
- });
161
- for (const item of itemsWithSection.filter((item)=>item.section === section))result.push({
162
- type: 'item',
163
- item
164
- });
165
- }
166
- return result;
167
- }, [
174
+ const renderedItems = (0, external_react_namespaceObject.useMemo)(()=>buildRenderedItems(items, enableSections), [
168
175
  items,
169
176
  enableSections
170
177
  ]);
178
+ (0, external_react_namespaceObject.useImperativeHandle)(ref, ()=>({
179
+ renderedItems
180
+ }), [
181
+ renderedItems
182
+ ]);
171
183
  const rowProps = (0, external_react_namespaceObject.useMemo)(()=>({
172
184
  renderedItems,
185
+ activeIndex,
173
186
  isLoading,
174
187
  isDarkMode,
175
188
  onItemClick,
176
189
  onItemHover
177
190
  }), [
178
191
  renderedItems,
192
+ activeIndex,
179
193
  isLoading,
180
194
  isDarkMode,
181
195
  onItemClick,
@@ -215,6 +229,9 @@ const ListView_ListView = /*#__PURE__*/ (0, external_react_namespaceObject.memo)
215
229
  ]
216
230
  });
217
231
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ListView_styles_cjs_namespaceObject.StyledList, {
232
+ id: "toolbox-listbox",
233
+ role: "listbox",
234
+ listRef: listRef,
218
235
  rowProps: rowProps,
219
236
  rowComponent: ListViewRow,
220
237
  rowCount: renderedItems.length,
@@ -222,9 +239,12 @@ const ListView_ListView = /*#__PURE__*/ (0, external_react_namespaceObject.memo)
222
239
  overscanCount: 20
223
240
  });
224
241
  });
242
+ const ListView_ListView = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ListViewInner);
225
243
  exports.ListView = __webpack_exports__.ListView;
244
+ exports.buildRenderedItems = __webpack_exports__.buildRenderedItems;
226
245
  for(var __rspack_i in __webpack_exports__)if (-1 === [
227
- "ListView"
246
+ "ListView",
247
+ "buildRenderedItems"
228
248
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
229
249
  Object.defineProperty(exports, '__esModule', {
230
250
  value: true
@@ -1,3 +1,4 @@
1
+ import type { ListImperativeAPI } from 'react-window';
1
2
  export interface ListItemIcon {
2
3
  name?: string;
3
4
  url?: string;
@@ -14,22 +15,29 @@ export type ListItem<T = any> = {
14
15
  colorDark?: string;
15
16
  children?: ListItem<T>[] | ((id: string, name: string) => Promise<ListItem<T>[]>);
16
17
  };
17
- type RenderItem<T extends ListItem> = {
18
+ export type RenderItem<T extends ListItem> = {
18
19
  type: 'section';
19
20
  sectionName: string;
20
21
  } | {
21
22
  type: 'item';
22
23
  item: T;
23
24
  };
25
+ export declare function buildRenderedItems<T extends ListItem>(items: T[], enableSections: boolean): RenderItem<T>[];
24
26
  export interface ListViewRowProps<T extends ListItem> {
25
27
  renderedItems: RenderItem<T>[];
28
+ activeIndex: number;
26
29
  isLoading?: boolean;
27
30
  isDarkMode?: boolean;
28
31
  onItemClick: (item: T) => void;
29
32
  onItemHover?: (item: T) => void;
30
33
  }
34
+ export interface ListViewHandle<T extends ListItem = ListItem> {
35
+ renderedItems: RenderItem<T>[];
36
+ }
31
37
  interface ListViewProps<T extends ListItem> {
32
38
  items: T[];
39
+ activeIndex?: number;
40
+ listRef?: React.RefObject<ListImperativeAPI | null>;
33
41
  onItemClick: (item: T) => void;
34
42
  onItemHover?: (item: T) => void;
35
43
  emptyStateMessage?: string;
@@ -37,6 +45,8 @@ interface ListViewProps<T extends ListItem> {
37
45
  isLoading?: boolean;
38
46
  enableSections?: boolean;
39
47
  }
40
- export declare const ListView: import("react").MemoExoticComponent<(<T extends ListItem>({ items, onItemClick, onItemHover, emptyStateMessage, emptyStateIcon, isLoading, enableSections, }: ListViewProps<T>) => import("react/jsx-runtime").JSX.Element)>;
48
+ export declare const ListView: <T extends ListItem>(props: ListViewProps<T> & {
49
+ ref?: React.Ref<ListViewHandle<T>>;
50
+ }) => React.ReactElement | null;
41
51
  export {};
42
52
  //# sourceMappingURL=ListView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACjC;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnF,CAAC;AAEF,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ,IAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAE9B,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,QAAQ;IAClD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CACjC;AAyGD,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ;IACxC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,QAAQ,wCAA0B,CAAC,SAAS,QAAQ,sGAQ9D,aAAa,CAAC,CAAC,CAAC,8CAkFjB,CAAC"}
1
+ {"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAIzE,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACjC;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnF,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,IACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAE9B,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EACnD,KAAK,EAAE,CAAC,EAAE,EACV,cAAc,EAAE,OAAO,GACtB,UAAU,CAAC,CAAC,CAAC,EAAE,CAqCjB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,QAAQ;IAClD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CACjC;AAgHD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAC3D,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAChC;AAED,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ;IACxC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAsED,eAAO,MAAM,QAAQ,EAA0B,CAAC,CAAC,SAAS,QAAQ,EAChE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC7D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
@@ -4,11 +4,40 @@ import { Column } from "../../layouts/index.js";
4
4
  import { NodeIcon, partition } from "../../utils/index.js";
5
5
  import { ApSkeleton, ApTypography } from "../../../material/index.js";
6
6
  import { ApIcon, ApTooltip } from "../../../material/components/index.js";
7
- import { memo, useCallback, useMemo } from "react";
7
+ import { forwardRef, memo, useCallback, useImperativeHandle, useMemo } from "react";
8
8
  import { useCanvasTheme } from "../BaseCanvas/CanvasThemeContext.js";
9
9
  import { IconContainer, ListItemButton, SectionHeader, StyledList } from "./ListView.styles.js";
10
+ function buildRenderedItems(items, enableSections) {
11
+ const result = [];
12
+ if (0 === items.length) return result;
13
+ if (!enableSections) {
14
+ for (const item of items)result.push({
15
+ type: 'item',
16
+ item
17
+ });
18
+ return result;
19
+ }
20
+ const [itemsWithSection, itemsWithoutSection] = partition(items, (item)=>!!item.section);
21
+ for (const item of itemsWithoutSection)result.push({
22
+ type: 'item',
23
+ item
24
+ });
25
+ if (0 === itemsWithSection.length) return result;
26
+ const sections = Array.from(new Set(itemsWithSection.map((item)=>item.section)));
27
+ for (const section of sections){
28
+ result.push({
29
+ type: 'section',
30
+ sectionName: section
31
+ });
32
+ for (const item of itemsWithSection.filter((item)=>item.section === section))result.push({
33
+ type: 'item',
34
+ item
35
+ });
36
+ }
37
+ return result;
38
+ }
10
39
  const IconContainerMemoized = /*#__PURE__*/ memo(IconContainer);
11
- const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, renderedItems, isLoading, isDarkMode, onItemClick, onItemHover })=>{
40
+ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, renderedItems, activeIndex, isLoading, isDarkMode, onItemClick, onItemHover })=>{
12
41
  const renderItem = renderedItems[index];
13
42
  const buttonStyle = useMemo(()=>({
14
43
  ...style,
@@ -46,12 +75,17 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
46
75
  });
47
76
  const item = renderItem.item;
48
77
  const bgColor = isDarkMode ? item.colorDark ?? item.color : item.color;
78
+ const isActive = index === activeIndex;
49
79
  return /*#__PURE__*/ jsxs(ListItemButton, {
50
80
  ...ariaAttributes,
81
+ tabIndex: -1,
82
+ id: `toolbox-item-${item.id}`,
83
+ role: "option",
84
+ "aria-selected": isActive,
51
85
  style: buttonStyle,
52
86
  onClick: handleButtonClick,
53
87
  onHoverStart: handleButtonHover,
54
- className: isLoading ? 'loading' : '',
88
+ className: `${isLoading ? 'loading' : ''} ${isActive ? 'active' : ''}`,
55
89
  disabled: isLoading,
56
90
  children: [
57
91
  /*#__PURE__*/ jsxs(IconContainerMemoized, {
@@ -106,48 +140,27 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
106
140
  ]
107
141
  });
108
142
  });
109
- const ListView_ListView = /*#__PURE__*/ memo(function({ items, onItemClick, onItemHover, emptyStateMessage = 'No items found', emptyStateIcon = 'search_off', isLoading = false, enableSections = true }) {
143
+ const ListViewInner = /*#__PURE__*/ forwardRef(function({ items, activeIndex = -1, listRef, onItemClick, onItemHover, emptyStateMessage = 'No items found', emptyStateIcon = 'search_off', isLoading = false, enableSections = true }, ref) {
110
144
  const { isDarkMode } = useCanvasTheme();
111
- const renderedItems = useMemo(()=>{
112
- const result = [];
113
- if (0 === items.length) return result;
114
- if (!enableSections) {
115
- for (const item of items)result.push({
116
- type: 'item',
117
- item
118
- });
119
- return result;
120
- }
121
- const [itemsWithSection, itemsWithoutSection] = partition(items, (item)=>!!item.section);
122
- for (const item of itemsWithoutSection)result.push({
123
- type: 'item',
124
- item
125
- });
126
- if (0 === itemsWithSection.length) return result;
127
- const sections = Array.from(new Set(itemsWithSection.map((item)=>item.section)));
128
- for (const section of sections){
129
- result.push({
130
- type: 'section',
131
- sectionName: section
132
- });
133
- for (const item of itemsWithSection.filter((item)=>item.section === section))result.push({
134
- type: 'item',
135
- item
136
- });
137
- }
138
- return result;
139
- }, [
145
+ const renderedItems = useMemo(()=>buildRenderedItems(items, enableSections), [
140
146
  items,
141
147
  enableSections
142
148
  ]);
149
+ useImperativeHandle(ref, ()=>({
150
+ renderedItems
151
+ }), [
152
+ renderedItems
153
+ ]);
143
154
  const rowProps = useMemo(()=>({
144
155
  renderedItems,
156
+ activeIndex,
145
157
  isLoading,
146
158
  isDarkMode,
147
159
  onItemClick,
148
160
  onItemHover
149
161
  }), [
150
162
  renderedItems,
163
+ activeIndex,
151
164
  isLoading,
152
165
  isDarkMode,
153
166
  onItemClick,
@@ -187,6 +200,9 @@ const ListView_ListView = /*#__PURE__*/ memo(function({ items, onItemClick, onIt
187
200
  ]
188
201
  });
189
202
  return /*#__PURE__*/ jsx(StyledList, {
203
+ id: "toolbox-listbox",
204
+ role: "listbox",
205
+ listRef: listRef,
190
206
  rowProps: rowProps,
191
207
  rowComponent: ListViewRow,
192
208
  rowCount: renderedItems.length,
@@ -194,4 +210,5 @@ const ListView_ListView = /*#__PURE__*/ memo(function({ items, onItemClick, onIt
194
210
  overscanCount: 20
195
211
  });
196
212
  });
197
- export { ListView_ListView as ListView };
213
+ const ListView_ListView = /*#__PURE__*/ memo(ListViewInner);
214
+ export { ListView_ListView as ListView, buildRenderedItems };
@@ -68,9 +68,15 @@ const ListItemButton = styled_default()(react_namespaceObject.motion.button)`
68
68
  width: 100%;
69
69
  transition: all 0.15s ease;
70
70
 
71
- &:hover {
71
+ &:hover,
72
+ &.active {
72
73
  background: var(--uix-canvas-background-hover);
73
74
  }
75
+
76
+ &.active {
77
+ outline: 1px solid var(--uix-canvas-primary);
78
+ outline-offset: -1px;
79
+ }
74
80
  `;
75
81
  const IconContainer = styled_default().div`
76
82
  width: 32px;
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,eAAO,MAAM,aAAa;;;yGAazB,CAAC;AAEF,eAAO,MAAM,cAAc;;UAe1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;cAA0B,MAAM;yGAazD,CAAC;AAEF,eAAO,MAAM,UAAU,EAkClB,OAAO,IAAI,CAAC"}
1
+ {"version":3,"file":"ListView.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,eAAO,MAAM,aAAa;;;yGAazB,CAAC;AAEF,eAAO,MAAM,cAAc;;UAqB1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;cAA0B,MAAM;yGAazD,CAAC;AAEF,eAAO,MAAM,UAAU,EAkClB,OAAO,IAAI,CAAC"}
@@ -27,9 +27,15 @@ const ListItemButton = styled(motion.button)`
27
27
  width: 100%;
28
28
  transition: all 0.15s ease;
29
29
 
30
- &:hover {
30
+ &:hover,
31
+ &.active {
31
32
  background: var(--uix-canvas-background-hover);
32
33
  }
34
+
35
+ &.active {
36
+ outline: 1px solid var(--uix-canvas-primary);
37
+ outline-offset: -1px;
38
+ }
33
39
  `;
34
40
  const IconContainer = styled.div`
35
41
  width: 32px;
@@ -31,11 +31,14 @@ const index_cjs_namespaceObject = require("../../utils/index.cjs");
31
31
  const components_index_cjs_namespaceObject = require("../../../material/components/index.cjs");
32
32
  const external_react_namespaceObject = require("react");
33
33
  const external_SearchBox_styles_cjs_namespaceObject = require("./SearchBox.styles.cjs");
34
- const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(function({ value, onChange, clear, placeholder = 'Search...' }) {
35
- const inputRef = (0, external_react_namespaceObject.useRef)(null);
34
+ const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(function({ value, onChange, clear, placeholder = 'Search...', inputRef: externalInputRef, onNavigationKeyDown, activeDescendantId }) {
35
+ const internalRef = (0, external_react_namespaceObject.useRef)(null);
36
+ const inputRef = externalInputRef ?? internalRef;
36
37
  (0, external_react_namespaceObject.useEffect)(()=>{
37
38
  inputRef.current?.focus();
38
- }, []);
39
+ }, [
40
+ inputRef
41
+ ]);
39
42
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_SearchBox_styles_cjs_namespaceObject.StyledSearchForm, {
40
43
  autoComplete: "off",
41
44
  className: "searchbox-form",
@@ -56,10 +59,15 @@ const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.mem
56
59
  ref: inputRef,
57
60
  autoComplete: "off",
58
61
  type: "text",
62
+ role: "combobox",
63
+ "aria-controls": "toolbox-listbox",
64
+ "aria-expanded": true,
59
65
  className: "searchbox-input",
60
66
  placeholder: placeholder,
61
67
  value: value,
62
- onChange: (e)=>onChange(e.target.value)
68
+ onChange: (e)=>onChange(e.target.value),
69
+ onKeyDown: onNavigationKeyDown,
70
+ "aria-activedescendant": activeDescendantId
63
71
  }),
64
72
  value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
65
73
  type: "button",