@uipath/apollo-react 7.35.0 → 8.0.0

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 (115) hide show
  1. package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +4 -4
  2. package/dist/canvas/components/BaseNode/BaseNodeContainer.js +4 -4
  3. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  4. package/dist/chat/styles/tailwind.chat.css +1 -1
  5. package/dist/decision-table/CitationButton.cjs +66 -0
  6. package/dist/decision-table/CitationButton.d.ts +22 -0
  7. package/dist/decision-table/CitationButton.d.ts.map +1 -0
  8. package/dist/decision-table/CitationButton.js +29 -0
  9. package/dist/decision-table/DecisionGraphCard.cjs +11 -1
  10. package/dist/decision-table/DecisionGraphCard.d.ts +5 -0
  11. package/dist/decision-table/DecisionGraphCard.d.ts.map +1 -1
  12. package/dist/decision-table/DecisionGraphCard.js +12 -2
  13. package/dist/decision-table/DecisionGraphText.cjs +406 -6
  14. package/dist/decision-table/DecisionGraphText.d.ts +16 -5
  15. package/dist/decision-table/DecisionGraphText.d.ts.map +1 -1
  16. package/dist/decision-table/DecisionGraphText.js +407 -7
  17. package/dist/decision-table/DecisionText.cjs +11 -2
  18. package/dist/decision-table/DecisionText.d.ts +6 -5
  19. package/dist/decision-table/DecisionText.d.ts.map +1 -1
  20. package/dist/decision-table/DecisionText.js +11 -2
  21. package/dist/decision-table/DecisionTextHeader.cjs +14 -1
  22. package/dist/decision-table/DecisionTextHeader.d.ts +7 -1
  23. package/dist/decision-table/DecisionTextHeader.d.ts.map +1 -1
  24. package/dist/decision-table/DecisionTextHeader.js +15 -2
  25. package/dist/decision-table/RuleCard.cjs +56 -26
  26. package/dist/decision-table/RuleCard.d.ts +2 -0
  27. package/dist/decision-table/RuleCard.d.ts.map +1 -1
  28. package/dist/decision-table/RuleCard.js +57 -27
  29. package/dist/decision-table/RuleList.cjs +2 -1
  30. package/dist/decision-table/RuleList.d.ts +1 -0
  31. package/dist/decision-table/RuleList.d.ts.map +1 -1
  32. package/dist/decision-table/RuleList.js +2 -1
  33. package/dist/decision-table/__fixtures__/textMode.d.ts +5 -4
  34. package/dist/decision-table/__fixtures__/textMode.d.ts.map +1 -1
  35. package/dist/decision-table/__fixtures__/useStoryHistory.d.ts +7 -0
  36. package/dist/decision-table/__fixtures__/useStoryHistory.d.ts.map +1 -0
  37. package/dist/decision-table/decisionGraphActionTypes.d.ts +8 -0
  38. package/dist/decision-table/decisionGraphActionTypes.d.ts.map +1 -1
  39. package/dist/decision-table/decisionGraphTypes.d.ts +8 -0
  40. package/dist/decision-table/decisionGraphTypes.d.ts.map +1 -1
  41. package/dist/decision-table/index.cjs +54 -62
  42. package/dist/decision-table/index.d.ts +2 -3
  43. package/dist/decision-table/index.d.ts.map +1 -1
  44. package/dist/decision-table/index.js +1 -2
  45. package/dist/decision-table/locales/de.cjs +1 -1
  46. package/dist/decision-table/locales/de.d.ts.map +1 -1
  47. package/dist/decision-table/locales/de.js +1 -1
  48. package/dist/decision-table/locales/en.cjs +1 -1
  49. package/dist/decision-table/locales/en.d.ts.map +1 -1
  50. package/dist/decision-table/locales/en.js +1 -1
  51. package/dist/decision-table/locales/es-MX.cjs +1 -1
  52. package/dist/decision-table/locales/es-MX.d.ts.map +1 -1
  53. package/dist/decision-table/locales/es-MX.js +1 -1
  54. package/dist/decision-table/locales/es.cjs +1 -1
  55. package/dist/decision-table/locales/es.d.ts.map +1 -1
  56. package/dist/decision-table/locales/es.js +1 -1
  57. package/dist/decision-table/locales/fr.cjs +1 -1
  58. package/dist/decision-table/locales/fr.d.ts.map +1 -1
  59. package/dist/decision-table/locales/fr.js +1 -1
  60. package/dist/decision-table/locales/ja.cjs +1 -1
  61. package/dist/decision-table/locales/ja.d.ts.map +1 -1
  62. package/dist/decision-table/locales/ja.js +1 -1
  63. package/dist/decision-table/locales/ko.cjs +1 -1
  64. package/dist/decision-table/locales/ko.d.ts.map +1 -1
  65. package/dist/decision-table/locales/ko.js +1 -1
  66. package/dist/decision-table/locales/pt-BR.cjs +1 -1
  67. package/dist/decision-table/locales/pt-BR.d.ts.map +1 -1
  68. package/dist/decision-table/locales/pt-BR.js +1 -1
  69. package/dist/decision-table/locales/pt.cjs +1 -1
  70. package/dist/decision-table/locales/pt.d.ts.map +1 -1
  71. package/dist/decision-table/locales/pt.js +1 -1
  72. package/dist/decision-table/locales/ro.cjs +1 -1
  73. package/dist/decision-table/locales/ro.d.ts.map +1 -1
  74. package/dist/decision-table/locales/ro.js +1 -1
  75. package/dist/decision-table/locales/ru.cjs +1 -1
  76. package/dist/decision-table/locales/ru.d.ts.map +1 -1
  77. package/dist/decision-table/locales/ru.js +1 -1
  78. package/dist/decision-table/locales/tr.cjs +1 -1
  79. package/dist/decision-table/locales/tr.d.ts.map +1 -1
  80. package/dist/decision-table/locales/tr.js +1 -1
  81. package/dist/decision-table/locales/zh-CN.cjs +1 -1
  82. package/dist/decision-table/locales/zh-CN.d.ts.map +1 -1
  83. package/dist/decision-table/locales/zh-CN.js +1 -1
  84. package/dist/decision-table/locales/zh-TW.cjs +1 -1
  85. package/dist/decision-table/locales/zh-TW.d.ts.map +1 -1
  86. package/dist/decision-table/locales/zh-TW.js +1 -1
  87. package/dist/decision-table/ruleCardModel.d.ts +2 -1
  88. package/dist/decision-table/ruleCardModel.d.ts.map +1 -1
  89. package/dist/decision-table/sentenceStyles.cjs +32 -5
  90. package/dist/decision-table/sentenceStyles.d.ts +8 -1
  91. package/dist/decision-table/sentenceStyles.d.ts.map +1 -1
  92. package/dist/decision-table/sentenceStyles.js +8 -2
  93. package/dist/decision-table/sentenceTypes.d.ts +28 -0
  94. package/dist/decision-table/sentenceTypes.d.ts.map +1 -1
  95. package/dist/decision-table/styles/tailwind.decision-table.css +1 -1
  96. package/dist/decision-table/useContainerHandlers.cjs +24 -3
  97. package/dist/decision-table/useContainerHandlers.d.ts +6 -1
  98. package/dist/decision-table/useContainerHandlers.d.ts.map +1 -1
  99. package/dist/decision-table/useContainerHandlers.js +25 -4
  100. package/dist/decision-table/useDecisionGraphStrings.cjs +6 -2
  101. package/dist/decision-table/useDecisionGraphStrings.d.ts +2 -1
  102. package/dist/decision-table/useDecisionGraphStrings.d.ts.map +1 -1
  103. package/dist/decision-table/useDecisionGraphStrings.js +6 -2
  104. package/dist/decision-table/useDecisionTextStrings.cjs +14 -0
  105. package/dist/decision-table/useDecisionTextStrings.d.ts.map +1 -1
  106. package/dist/decision-table/useDecisionTextStrings.js +14 -0
  107. package/package.json +2 -2
  108. package/dist/decision-table/DecisionGraphView.cjs +0 -435
  109. package/dist/decision-table/DecisionGraphView.d.ts +0 -19
  110. package/dist/decision-table/DecisionGraphView.d.ts.map +0 -1
  111. package/dist/decision-table/DecisionGraphView.js +0 -401
  112. package/dist/decision-table/EditableDecisionGraphText.cjs +0 -40
  113. package/dist/decision-table/EditableDecisionGraphText.d.ts +0 -5
  114. package/dist/decision-table/EditableDecisionGraphText.d.ts.map +0 -1
  115. package/dist/decision-table/EditableDecisionGraphText.js +0 -6
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ CitationButtons: ()=>CitationButtons,
28
+ CitationButton: ()=>CitationButton
29
+ });
30
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
32
+ const external_lucide_react_namespaceObject = require("lucide-react");
33
+ const external_sentenceStyles_cjs_namespaceObject = require("./sentenceStyles.cjs");
34
+ const CitationButton = ({ citation, onOpen, selected, tabIndex, className, labels, dataTestId })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Button, {
35
+ variant: "ghost",
36
+ size: "3xs",
37
+ tabIndex: tabIndex,
38
+ "aria-label": labels.openCitation(citation.page),
39
+ className: (0, apollo_wind_namespaceObject.cn)(external_sentenceStyles_cjs_namespaceObject.CITATION_BUTTON_CLASS, className),
40
+ "data-rule-action": "citation",
41
+ "data-testid": dataTestId,
42
+ onClick: ()=>onOpen(citation),
43
+ children: [
44
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.FileText, {
45
+ "aria-hidden": true
46
+ }),
47
+ selected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
48
+ "aria-hidden": true,
49
+ children: labels.citationPage(citation.page)
50
+ })
51
+ ]
52
+ });
53
+ const CitationButtons = ({ citations, dataTestId, ...props })=>citations.map((citation, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CitationButton, {
54
+ citation: citation,
55
+ dataTestId: 0 === index ? dataTestId : `${dataTestId}-${index}`,
56
+ ...props
57
+ }, `${citation.kind}-${citation.page}-${index}`));
58
+ exports.CitationButton = __webpack_exports__.CitationButton;
59
+ exports.CitationButtons = __webpack_exports__.CitationButtons;
60
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
61
+ "CitationButton",
62
+ "CitationButtons"
63
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
64
+ Object.defineProperty(exports, '__esModule', {
65
+ value: true
66
+ });
@@ -0,0 +1,22 @@
1
+ import type React from 'react';
2
+ import type { OpenCitation, SentenceCitation } from './sentenceTypes';
3
+ export interface CitationLabels {
4
+ openCitation: (page: number) => string;
5
+ citationPage: (page: number) => string;
6
+ }
7
+ export interface CitationButtonProps {
8
+ citation: SentenceCitation;
9
+ onOpen: OpenCitation;
10
+ selected: boolean;
11
+ tabIndex: 0 | -1;
12
+ className: string;
13
+ labels: CitationLabels;
14
+ dataTestId: string;
15
+ }
16
+ export declare const CitationButton: React.FC<CitationButtonProps>;
17
+ export interface CitationButtonsProps extends Omit<CitationButtonProps, 'citation' | 'dataTestId'> {
18
+ citations: readonly SentenceCitation[];
19
+ dataTestId: string;
20
+ }
21
+ export declare const CitationButtons: React.FC<CitationButtonsProps>;
22
+ //# sourceMappingURL=CitationButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CitationButton.d.ts","sourceRoot":"","sources":["../../src/decision-table/CitationButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGtE,MAAM,WAAW,cAAc;IAE7B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC;IAErB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsBxD,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,YAAY,CAAC;IAChG,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAYvD,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button, cn } from "@uipath/apollo-wind";
3
+ import { FileText } from "lucide-react";
4
+ import { CITATION_BUTTON_CLASS } from "./sentenceStyles.js";
5
+ const CitationButton = ({ citation, onOpen, selected, tabIndex, className, labels, dataTestId })=>/*#__PURE__*/ jsxs(Button, {
6
+ variant: "ghost",
7
+ size: "3xs",
8
+ tabIndex: tabIndex,
9
+ "aria-label": labels.openCitation(citation.page),
10
+ className: cn(CITATION_BUTTON_CLASS, className),
11
+ "data-rule-action": "citation",
12
+ "data-testid": dataTestId,
13
+ onClick: ()=>onOpen(citation),
14
+ children: [
15
+ /*#__PURE__*/ jsx(FileText, {
16
+ "aria-hidden": true
17
+ }),
18
+ selected && /*#__PURE__*/ jsx("span", {
19
+ "aria-hidden": true,
20
+ children: labels.citationPage(citation.page)
21
+ })
22
+ ]
23
+ });
24
+ const CitationButtons = ({ citations, dataTestId, ...props })=>citations.map((citation, index)=>/*#__PURE__*/ jsx(CitationButton, {
25
+ citation: citation,
26
+ dataTestId: 0 === index ? dataTestId : `${dataTestId}-${index}`,
27
+ ...props
28
+ }, `${citation.kind}-${citation.page}-${index}`));
29
+ export { CitationButton, CitationButtons };
@@ -31,6 +31,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
32
32
  const external_lucide_react_namespaceObject = require("lucide-react");
33
33
  const external_react_namespaceObject = require("react");
34
+ const external_CitationButton_cjs_namespaceObject = require("./CitationButton.cjs");
34
35
  const external_gridEvents_cjs_namespaceObject = require("./gridEvents.cjs");
35
36
  const external_decisionGraphStyles_cjs_namespaceObject = require("./decisionGraphStyles.cjs");
36
37
  const external_GridMenu_cjs_namespaceObject = require("./GridMenu.cjs");
@@ -126,7 +127,7 @@ const NameField = ({ field, label, dataTestId })=>{
126
127
  ]
127
128
  });
128
129
  };
129
- const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, labels, onToggle, onShowProblem, onOpen, actions, cardRef, dataTestId })=>{
130
+ const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, labels, onToggle, onShowProblem, onOpen, actions, citations, cardRef, dataTestId })=>{
130
131
  const { logic } = node;
131
132
  const rename = actions?.rename ?? null;
132
133
  const headingMark = node.mark?.mark;
@@ -203,6 +204,15 @@ const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, la
203
204
  className: "size-3.5"
204
205
  })
205
206
  }),
207
+ citations && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CitationButton_cjs_namespaceObject.CitationButtons, {
208
+ citations: citations.citations,
209
+ onOpen: citations.onOpen,
210
+ selected: active,
211
+ tabIndex: 0,
212
+ className: (0, apollo_wind_namespaceObject.cn)('shrink-0', !active && external_decisionGraphStyles_cjs_namespaceObject.GRAPH_REVEAL_CLASS),
213
+ labels: labels,
214
+ dataTestId: `${dataTestId}-citation-${node.id}`
215
+ }),
206
216
  actions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeMenu, {
207
217
  actions: actions,
208
218
  dataTestId: `${dataTestId}-menu-${node.id}`
@@ -1,6 +1,7 @@
1
1
  import type React from 'react';
2
2
  import type { DecisionGraphDecisionNode, DecisionGraphReferenceNode } from './decisionGraphTypes';
3
3
  import { type GridMenuEntry } from './GridMenu';
4
+ import type { OpenCitation, SentenceCitation } from './sentenceTypes';
4
5
  import type { DecisionGraphLabels } from './useDecisionGraphStrings';
5
6
  export interface DecisionGraphRenameField {
6
7
  from: string;
@@ -33,6 +34,10 @@ export interface DecisionGraphCardProps {
33
34
  onShowProblem: (byKey: boolean) => void;
34
35
  onOpen: (() => void) | undefined;
35
36
  actions: DecisionGraphCardActions | null;
37
+ citations: {
38
+ citations: readonly SentenceCitation[];
39
+ onOpen: OpenCitation;
40
+ } | null;
36
41
  cardRef: (element: HTMLElement | null) => void;
37
42
  dataTestId: string;
38
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DecisionGraphCard.d.ts","sourceRoot":"","sources":["../../src/decision-table/DecisionGraphCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAiBlG,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,MAAM,WAAW,wBAAwB;IAEvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAEjD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAGD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,aAAa,EAAE,CAAC;IAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAGD,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,yBAAyB,CAAC;IAEhC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IAEd,MAAM,EAAE,OAAO,CAAC;IAEhB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;CACpB;AA+GD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6G9D,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA6CxE,CAAC"}
1
+ {"version":3,"file":"DecisionGraphCard.d.ts","sourceRoot":"","sources":["../../src/decision-table/DecisionGraphCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAkBlG,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,MAAM,WAAW,wBAAwB;IAEvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAEjD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAGD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,aAAa,EAAE,CAAC;IAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAGD,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,yBAAyB,CAAC;IAEhC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IAEd,MAAM,EAAE,OAAO,CAAC;IAEhB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAEzC,SAAS,EAAE;QAAE,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI,CAAC;IACnF,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;CACpB;AA+GD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAyH9D,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA6CxE,CAAC"}
@@ -2,8 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Input, cn } from "@uipath/apollo-wind";
3
3
  import { ChevronDown, ChevronRight, CornerDownRight, Ellipsis, Network } from "lucide-react";
4
4
  import { useId, useLayoutEffect, useRef } from "react";
5
+ import { CitationButtons } from "./CitationButton.js";
5
6
  import { isComposing } from "./gridEvents.js";
6
- import { GRAPH_BODY_CLASS, GRAPH_CARD_CLASS, GRAPH_CARD_COLLAPSED_CLASS, GRAPH_CARD_TONE_CLASS, GRAPH_HEADER_CLASS, GRAPH_HIT_POLICY_CLASS, GRAPH_MARK_BUTTON_CLASS, GRAPH_MENU_BUTTON_CLASS, GRAPH_NAME_CLASS, GRAPH_REFERENCE_CHIP_CLASS, GRAPH_REFERENCE_CLASS, GRAPH_RULE_COUNT_CLASS, GRAPH_TOGGLE_CLASS } from "./decisionGraphStyles.js";
7
+ import { GRAPH_BODY_CLASS, GRAPH_CARD_CLASS, GRAPH_CARD_COLLAPSED_CLASS, GRAPH_CARD_TONE_CLASS, GRAPH_HEADER_CLASS, GRAPH_HIT_POLICY_CLASS, GRAPH_MARK_BUTTON_CLASS, GRAPH_MENU_BUTTON_CLASS, GRAPH_NAME_CLASS, GRAPH_REFERENCE_CHIP_CLASS, GRAPH_REFERENCE_CLASS, GRAPH_REVEAL_CLASS, GRAPH_RULE_COUNT_CLASS, GRAPH_TOGGLE_CLASS } from "./decisionGraphStyles.js";
7
8
  import { GridMenuButton } from "./GridMenu.js";
8
9
  import { MarkGlyph } from "./MarkGlyph.js";
9
10
  import { isLineMark } from "./sentenceMarks.js";
@@ -97,7 +98,7 @@ const NameField = ({ field, label, dataTestId })=>{
97
98
  ]
98
99
  });
99
100
  };
100
- const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, labels, onToggle, onShowProblem, onOpen, actions, cardRef, dataTestId })=>{
101
+ const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, labels, onToggle, onShowProblem, onOpen, actions, citations, cardRef, dataTestId })=>{
101
102
  const { logic } = node;
102
103
  const rename = actions?.rename ?? null;
103
104
  const headingMark = node.mark?.mark;
@@ -174,6 +175,15 @@ const DecisionGraphCard = ({ node, depth, open, active, usedBy, bodyId, body, la
174
175
  className: "size-3.5"
175
176
  })
176
177
  }),
178
+ citations && /*#__PURE__*/ jsx(CitationButtons, {
179
+ citations: citations.citations,
180
+ onOpen: citations.onOpen,
181
+ selected: active,
182
+ tabIndex: 0,
183
+ className: cn('shrink-0', !active && GRAPH_REVEAL_CLASS),
184
+ labels: labels,
185
+ dataTestId: `${dataTestId}-citation-${node.id}`
186
+ }),
177
187
  actions && /*#__PURE__*/ jsx(NodeMenu, {
178
188
  actions: actions,
179
189
  dataTestId: `${dataTestId}-menu-${node.id}`
@@ -27,14 +27,414 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  DecisionGraphText: ()=>DecisionGraphText
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const external_DecisionGraphView_cjs_namespaceObject = require("./DecisionGraphView.cjs");
31
- const READ = {
32
- kind: 'read'
30
+ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
31
+ const external_lucide_react_namespaceObject = require("lucide-react");
32
+ const external_react_namespaceObject = require("react");
33
+ const external_DecisionGraphCard_cjs_namespaceObject = require("./DecisionGraphCard.cjs");
34
+ const external_DecisionGraphMinimapSlot_cjs_namespaceObject = require("./DecisionGraphMinimapSlot.cjs");
35
+ const external_decisionGraphPositions_cjs_namespaceObject = require("./decisionGraphPositions.cjs");
36
+ const external_decisionGraphStyles_cjs_namespaceObject = require("./decisionGraphStyles.cjs");
37
+ const external_revealIn_cjs_namespaceObject = require("./revealIn.cjs");
38
+ const external_sentenceRuleHeights_cjs_namespaceObject = require("./sentenceRuleHeights.cjs");
39
+ const external_useDecisionGraphActions_cjs_namespaceObject = require("./useDecisionGraphActions.cjs");
40
+ const external_useDecisionGraphStrings_cjs_namespaceObject = require("./useDecisionGraphStrings.cjs");
41
+ const external_useDecisionTextStrings_cjs_namespaceObject = require("./useDecisionTextStrings.cjs");
42
+ const external_useTextAnnouncements_cjs_namespaceObject = require("./useTextAnnouncements.cjs");
43
+ const NO_EXPANDED = new Set();
44
+ const markTargetOf = ({ id, mark })=>mark?.kind === 'rule' ? {
45
+ kind: 'rule',
46
+ decisionId: id,
47
+ rowId: mark.rowId
48
+ } : {
49
+ kind: 'decision',
50
+ decisionId: id
51
+ };
52
+ const citationOf = (citations, decisionId)=>{
53
+ const cited = 'cited' === citations.kind ? citations.decisions.get(decisionId) ?? [] : [];
54
+ return 'cited' === citations.kind && cited.length > 0 ? {
55
+ citations: cited,
56
+ onOpen: citations.onOpenCitation
57
+ } : null;
58
+ };
59
+ const focuses = (mode)=>'navigate' === mode.kind && mode.focus;
60
+ const flashes = (mode)=>'inPlace' === mode.kind || mode.flash;
61
+ const prefersReducedMotion = ()=>'function' == typeof matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches;
62
+ const flash = (element)=>{
63
+ if (prefersReducedMotion()) return;
64
+ element.animate?.([
65
+ {
66
+ boxShadow: '0 0 0 4px color-mix(in srgb, var(--color-primary) 40%, transparent)'
67
+ },
68
+ {
69
+ boxShadow: '0 0 0 0 transparent'
70
+ }
71
+ ], {
72
+ duration: 1400,
73
+ easing: 'ease-out'
74
+ });
75
+ };
76
+ const NEAR_MARGIN = '100% 0px';
77
+ const nearAfter = (current, entries)=>{
78
+ let next;
79
+ for (const { target, isIntersecting } of entries){
80
+ const decisionId = target instanceof HTMLElement ? target.dataset.decisionId : void 0;
81
+ if (void 0 !== decisionId && (next ?? current).has(decisionId) !== isIntersecting) {
82
+ next ??= new Set(current);
83
+ if (isIntersecting) next.add(decisionId);
84
+ else next.delete(decisionId);
85
+ }
86
+ }
87
+ return next ?? current;
88
+ };
89
+ const bodyHeightOf = (card)=>{
90
+ const body = card.querySelector(':scope > [data-graph-body]');
91
+ if (!body || body.querySelector(':scope > [data-graph-placeholder]')) return null;
92
+ return body.offsetHeight || null;
93
+ };
94
+ const ruleCountsOf = (nodes)=>{
95
+ const counts = new Map();
96
+ const visit = (node)=>{
97
+ if ('decision' !== node.kind) return;
98
+ if ('table' === node.logic.kind) counts.set(node.id, node.logic.ruleCount);
99
+ for (const child of node.children)visit(child);
100
+ };
101
+ for (const node of nodes)visit(node);
102
+ return counts;
33
103
  };
34
- const DecisionGraphText = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecisionGraphView_cjs_namespaceObject.DecisionGraphView, {
35
- ...props,
36
- mode: READ
104
+ const perRuleHeightOf = (heights, ruleCounts)=>{
105
+ let height = 0;
106
+ let rules = 0;
107
+ for (const [decisionId, measured] of heights){
108
+ const count = ruleCounts.get(decisionId) ?? 0;
109
+ if (0 !== count) {
110
+ height += measured;
111
+ rules += count;
112
+ }
113
+ }
114
+ return 0 === rules ? external_sentenceRuleHeights_cjs_namespaceObject.SENTENCE_MIN_RULE_HEIGHT_PX : height / rules;
115
+ };
116
+ const DecisionGraphText = ({ nodes, mode, renderBody, citations, expansion, onFold, onOpenDecision, rules, dataTestId })=>{
117
+ const labels = (0, external_useDecisionGraphStrings_cjs_namespaceObject.useDecisionGraphLabels)();
118
+ const { selected } = mode;
119
+ const { announce, region } = (0, external_useTextAnnouncements_cjs_namespaceObject.useTextAnnouncements)((0, external_useDecisionTextStrings_cjs_namespaceObject.useDecisionTextLabels)(), dataTestId);
120
+ const idPrefix = (0, external_react_namespaceObject.useId)();
121
+ const [ownExpanded, setOwnExpanded] = (0, external_react_namespaceObject.useState)(NO_EXPANDED);
122
+ const expanded = expansion?.expanded ?? ownExpanded;
123
+ const users = (0, external_react_namespaceObject.useMemo)(()=>(0, external_decisionGraphPositions_cjs_namespaceObject.usersOf)(nodes), [
124
+ nodes
125
+ ]);
126
+ const drawn = (0, external_react_namespaceObject.useMemo)(()=>new Set((0, external_decisionGraphPositions_cjs_namespaceObject.decisionsOf)(nodes).map(({ id })=>id)), [
127
+ nodes
128
+ ]);
129
+ const [scroller, setScroller] = (0, external_react_namespaceObject.useState)(null);
130
+ const [launcherEnd, setLauncherEnd] = (0, external_react_namespaceObject.useState)(0);
131
+ const cardsRef = (0, external_react_namespaceObject.useRef)(new Map());
132
+ const [pending, setPending] = (0, external_react_namespaceObject.useState)(null);
133
+ const [near, setNear] = (0, external_react_namespaceObject.useState)(()=>"u" < typeof IntersectionObserver ? null : NO_EXPANDED);
134
+ const [revealed, setRevealed] = (0, external_react_namespaceObject.useState)(null);
135
+ const [focused, setFocused] = (0, external_react_namespaceObject.useState)(null);
136
+ const heightsRef = (0, external_react_namespaceObject.useRef)(new Map());
137
+ const observersRef = (0, external_react_namespaceObject.useRef)(null);
138
+ const ruleCounts = (0, external_react_namespaceObject.useMemo)(()=>ruleCountsOf(nodes), [
139
+ nodes
140
+ ]);
141
+ const setExpanded = (next)=>{
142
+ if (expansion) expansion.onChange(next);
143
+ else setOwnExpanded(next);
144
+ };
145
+ const toggle = (decisionId)=>{
146
+ const next = new Set(expanded);
147
+ const folds = next.delete(decisionId);
148
+ if (!folds) next.add(decisionId);
149
+ setExpanded(next);
150
+ if (folds) onFold?.(decisionId);
151
+ };
152
+ const reveal = (target)=>{
153
+ if (!expanded.has(target.decisionId)) setExpanded(new Set([
154
+ ...expanded,
155
+ target.decisionId
156
+ ]));
157
+ setPending(target);
158
+ setRevealed(target.decisionId);
159
+ if ('navigate' === target.mode.kind && 'read' !== mode.kind) mode.onReveal('rule' === target.kind ? {
160
+ kind: 'rule',
161
+ decisionId: target.decisionId,
162
+ rowId: target.rowId
163
+ } : {
164
+ kind: 'decision',
165
+ decisionId: target.decisionId
166
+ });
167
+ };
168
+ const bodyContext = {
169
+ revealDecision: (decisionId, byKey)=>{
170
+ if (!drawn.has(decisionId)) return void onOpenDecision?.(decisionId);
171
+ reveal({
172
+ kind: 'decision',
173
+ decisionId,
174
+ mode: {
175
+ kind: 'navigate',
176
+ focus: byKey,
177
+ flash: true
178
+ }
179
+ });
180
+ }
181
+ };
182
+ const openOf = (decisionId)=>onOpenDecision && (()=>onOpenDecision(decisionId));
183
+ const actions = (0, external_useDecisionGraphActions_cjs_namespaceObject.useDecisionGraphActions)({
184
+ mode,
185
+ nodes,
186
+ labels,
187
+ openOf,
188
+ cardOf: (decisionId)=>cardsRef.current.get(decisionId),
189
+ scroller,
190
+ announce,
191
+ dataTestId
37
192
  });
193
+ const cardRefsRef = (0, external_react_namespaceObject.useRef)(new Map());
194
+ const cardRef = (0, external_react_namespaceObject.useCallback)((decisionId)=>{
195
+ const cached = cardRefsRef.current.get(decisionId);
196
+ if (cached) return cached;
197
+ const attach = (element)=>{
198
+ const observers = observersRef.current;
199
+ const previous = cardsRef.current.get(decisionId);
200
+ if (previous && previous !== element) {
201
+ observers?.near.unobserve(previous);
202
+ observers?.size?.unobserve(previous);
203
+ }
204
+ if (!element) return void cardsRef.current.delete(decisionId);
205
+ cardsRef.current.set(decisionId, element);
206
+ observers?.near.observe(element);
207
+ observers?.size?.observe(element);
208
+ };
209
+ cardRefsRef.current.set(decisionId, attach);
210
+ return attach;
211
+ }, []);
212
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
213
+ if (!scroller || "u" < typeof IntersectionObserver) return;
214
+ const remember = (card)=>{
215
+ if (!(card instanceof HTMLElement)) return;
216
+ const decisionId = card.dataset.decisionId;
217
+ const height = bodyHeightOf(card);
218
+ if (void 0 !== decisionId && null !== height) heightsRef.current.set(decisionId, height);
219
+ };
220
+ const nearObserver = new IntersectionObserver((entries)=>{
221
+ for (const { target } of entries)remember(target);
222
+ setNear((current)=>nearAfter(current ?? NO_EXPANDED, entries));
223
+ }, {
224
+ root: scroller,
225
+ rootMargin: NEAR_MARGIN
226
+ });
227
+ const sizeObserver = "u" < typeof ResizeObserver ? null : new ResizeObserver((entries)=>{
228
+ for (const { target } of entries)remember(target);
229
+ });
230
+ observersRef.current = {
231
+ near: nearObserver,
232
+ size: sizeObserver
233
+ };
234
+ for (const card of cardsRef.current.values()){
235
+ nearObserver.observe(card);
236
+ sizeObserver?.observe(card);
237
+ }
238
+ return ()=>{
239
+ nearObserver.disconnect();
240
+ sizeObserver?.disconnect();
241
+ observersRef.current = null;
242
+ };
243
+ }, [
244
+ scroller
245
+ ]);
246
+ const perRuleHeight = perRuleHeightOf(heightsRef.current, ruleCounts);
247
+ const bodyOf = (decisionId, scrollContainer)=>{
248
+ const mounted = null === near || near.has(decisionId) || decisionId === selected || decisionId === revealed || decisionId === focused;
249
+ if (mounted) return renderBody(decisionId, {
250
+ container: scrollContainer
251
+ }, bodyContext);
252
+ const height = heightsRef.current.get(decisionId) ?? Math.max(1, ruleCounts.get(decisionId) ?? 1) * perRuleHeight;
253
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
254
+ "aria-hidden": true,
255
+ "data-graph-placeholder": true,
256
+ style: {
257
+ height
258
+ }
259
+ });
260
+ };
261
+ const onFocus = (event)=>{
262
+ const card = event.target instanceof Element ? event.target.closest('[data-graph-card]') : null;
263
+ const decisionId = card instanceof HTMLElement ? card.dataset.decisionId : void 0;
264
+ if (void 0 !== decisionId) setFocused(decisionId);
265
+ };
266
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
267
+ if (!pending) return;
268
+ const apply = ()=>{
269
+ const card = cardsRef.current.get(pending.decisionId);
270
+ if (!scroller || !card) return false;
271
+ if ('decision' === pending.kind) {
272
+ const heading = card.querySelector('[data-graph-toggle]');
273
+ if ('navigate' === pending.mode.kind) (0, external_revealIn_cjs_namespaceObject.revealIn)(scroller, {
274
+ vertical: card,
275
+ horizontal: heading ?? card,
276
+ block: 'start'
277
+ });
278
+ if (focuses(pending.mode)) heading?.focus({
279
+ preventScroll: true
280
+ });
281
+ if (flashes(pending.mode)) flash(card);
282
+ return true;
283
+ }
284
+ const rule = card.querySelector(`li[data-row-id="${CSS.escape(pending.rowId)}"]`);
285
+ if (!rule) return false;
286
+ if ('navigate' === pending.mode.kind) (0, external_revealIn_cjs_namespaceObject.revealIn)(scroller, {
287
+ vertical: rule,
288
+ horizontal: rule,
289
+ block: 'center'
290
+ });
291
+ if (focuses(pending.mode)) {
292
+ if (!rule.hasAttribute('tabindex')) rule.tabIndex = -1;
293
+ rule.focus({
294
+ preventScroll: true
295
+ });
296
+ }
297
+ if (flashes(pending.mode)) flash(rule);
298
+ return true;
299
+ };
300
+ if (apply()) return void setPending(null);
301
+ const frame = requestAnimationFrame(()=>{
302
+ const card = cardsRef.current.get(pending.decisionId);
303
+ if (!apply() && flashes(pending.mode) && card) flash(card);
304
+ setPending(null);
305
+ });
306
+ return ()=>cancelAnimationFrame(frame);
307
+ });
308
+ const branch = (node, depth, position)=>{
309
+ if ('reference' === node.kind) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecisionGraphCard_cjs_namespaceObject.DecisionGraphReference, {
310
+ node: node,
311
+ labels: labels,
312
+ actions: actions.referenceOf(node, position),
313
+ onReveal: ()=>reveal({
314
+ kind: 'decision',
315
+ decisionId: node.targetId,
316
+ mode: {
317
+ kind: 'navigate',
318
+ focus: false,
319
+ flash: false
320
+ }
321
+ }),
322
+ onOpen: openOf(node.targetId),
323
+ dataTestId: dataTestId
324
+ });
325
+ const open = expanded.has(node.id);
326
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
327
+ children: [
328
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecisionGraphCard_cjs_namespaceObject.DecisionGraphCard, {
329
+ node: node,
330
+ depth: depth,
331
+ open: open,
332
+ active: selected === node.id,
333
+ usedBy: (users.get(node.id) ?? []).map((user)=>user.label),
334
+ bodyId: `${idPrefix}-${encodeURIComponent(node.id)}`,
335
+ body: open && scroller ? bodyOf(node.id, scroller) : null,
336
+ labels: labels,
337
+ onToggle: ()=>toggle(node.id),
338
+ onShowProblem: (byKey)=>reveal({
339
+ ...markTargetOf(node),
340
+ mode: byKey ? {
341
+ kind: 'navigate',
342
+ focus: true,
343
+ flash: true
344
+ } : {
345
+ kind: 'inPlace'
346
+ }
347
+ }),
348
+ onOpen: openOf(node.id),
349
+ actions: actions.cardOf(node, position),
350
+ citations: citationOf(citations, node.id),
351
+ cardRef: cardRef(node.id),
352
+ dataTestId: dataTestId
353
+ }),
354
+ node.children.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
355
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_NEST_CLASS,
356
+ "data-graph-nest-of": node.id,
357
+ children: (0, external_decisionGraphPositions_cjs_namespaceObject.childPositionsOf)(node, position).map((childPosition)=>{
358
+ const child = node.children[childPosition.index];
359
+ return child && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
360
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_BRANCH_CLASS,
361
+ children: branch(child, depth + 1, childPosition)
362
+ }, child.id);
363
+ })
364
+ })
365
+ ]
366
+ });
367
+ };
368
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
369
+ className: (0, apollo_wind_namespaceObject.cn)(external_decisionGraphStyles_cjs_namespaceObject.GRAPH_FRAME_CLASS, external_decisionGraphStyles_cjs_namespaceObject.GRAPH_OUTPUT_HUE_CLASS),
370
+ "data-testid": dataTestId,
371
+ ...actions.focusWithin,
372
+ children: [
373
+ nodes.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecisionGraphMinimapSlot_cjs_namespaceObject.DecisionGraphMinimapSlot, {
374
+ nodes: nodes,
375
+ rules: rules,
376
+ selected: selected,
377
+ onPick: (target)=>reveal({
378
+ ...target,
379
+ mode: {
380
+ kind: 'navigate',
381
+ focus: true,
382
+ flash: true
383
+ }
384
+ }),
385
+ onLauncherEnd: setLauncherEnd,
386
+ labels: labels,
387
+ dataTestId: `${dataTestId}-minimap`
388
+ }),
389
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("section", {
390
+ ref: setScroller,
391
+ "aria-label": labels.graph,
392
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_SCROLLER_CLASS,
393
+ style: {
394
+ scrollPaddingInlineStart: launcherEnd + external_decisionGraphStyles_cjs_namespaceObject.GRAPH_MINIMAP_GAP_PX
395
+ },
396
+ "data-testid": `${dataTestId}-scroller`,
397
+ children: [
398
+ 0 === nodes.length && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
399
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_EMPTY_CLASS,
400
+ "data-testid": `${dataTestId}-empty`,
401
+ children: labels.empty
402
+ }),
403
+ (nodes.length > 0 || actions.addTop) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
404
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_COLUMN_CLASS,
405
+ style: {
406
+ paddingLeft: (0, external_decisionGraphStyles_cjs_namespaceObject.graphColumnInsetOf)(launcherEnd)
407
+ },
408
+ onFocus: onFocus,
409
+ children: [
410
+ (0, external_decisionGraphPositions_cjs_namespaceObject.topPositionsOf)(nodes).map((position)=>{
411
+ const node = nodes[position.index];
412
+ return node && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
413
+ children: branch(node, 0, position)
414
+ }, node.id);
415
+ }),
416
+ actions.addTop && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
417
+ type: "button",
418
+ className: external_decisionGraphStyles_cjs_namespaceObject.GRAPH_ADD_DECISION_CLASS,
419
+ onClick: actions.addTop,
420
+ "data-graph-add": true,
421
+ "data-testid": `${dataTestId}-add-decision`,
422
+ children: [
423
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
424
+ "aria-hidden": true
425
+ }),
426
+ labels.addDecision
427
+ ]
428
+ })
429
+ ]
430
+ })
431
+ ]
432
+ }),
433
+ actions.dialogs,
434
+ region
435
+ ]
436
+ });
437
+ };
38
438
  exports.DecisionGraphText = __webpack_exports__.DecisionGraphText;
39
439
  for(var __rspack_i in __webpack_exports__)if (-1 === [
40
440
  "DecisionGraphText"