@uipath/apollo-react 7.35.0 → 7.37.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.
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +4 -4
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +4 -4
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/decision-table/CitationButton.cjs +72 -0
- package/dist/decision-table/CitationButton.d.ts +33 -0
- package/dist/decision-table/CitationButton.d.ts.map +1 -0
- package/dist/decision-table/CitationButton.js +35 -0
- package/dist/decision-table/DecisionGraphCard.cjs +16 -2
- package/dist/decision-table/DecisionGraphCard.d.ts +5 -0
- package/dist/decision-table/DecisionGraphCard.d.ts.map +1 -1
- package/dist/decision-table/DecisionGraphCard.js +17 -3
- package/dist/decision-table/DecisionGraphText.cjs +417 -6
- package/dist/decision-table/DecisionGraphText.d.ts +22 -4
- package/dist/decision-table/DecisionGraphText.d.ts.map +1 -1
- package/dist/decision-table/DecisionGraphText.js +418 -7
- package/dist/decision-table/DecisionText.cjs +31 -2
- package/dist/decision-table/DecisionText.d.ts +6 -5
- package/dist/decision-table/DecisionText.d.ts.map +1 -1
- package/dist/decision-table/DecisionText.js +31 -2
- package/dist/decision-table/DecisionTextHeader.cjs +17 -1
- package/dist/decision-table/DecisionTextHeader.d.ts +7 -1
- package/dist/decision-table/DecisionTextHeader.d.ts.map +1 -1
- package/dist/decision-table/DecisionTextHeader.js +18 -2
- package/dist/decision-table/RuleCard.cjs +60 -26
- package/dist/decision-table/RuleCard.d.ts +2 -0
- package/dist/decision-table/RuleCard.d.ts.map +1 -1
- package/dist/decision-table/RuleCard.js +61 -27
- package/dist/decision-table/RuleList.cjs +2 -1
- package/dist/decision-table/RuleList.d.ts +1 -0
- package/dist/decision-table/RuleList.d.ts.map +1 -1
- package/dist/decision-table/RuleList.js +2 -1
- package/dist/decision-table/__fixtures__/storyTableHost.d.ts +4 -2
- package/dist/decision-table/__fixtures__/storyTableHost.d.ts.map +1 -1
- package/dist/decision-table/__fixtures__/textMode.d.ts +6 -3
- package/dist/decision-table/__fixtures__/textMode.d.ts.map +1 -1
- package/dist/decision-table/__fixtures__/useStoryHistory.d.ts +7 -0
- package/dist/decision-table/__fixtures__/useStoryHistory.d.ts.map +1 -0
- package/dist/decision-table/decisionGraphActionTypes.d.ts +8 -0
- package/dist/decision-table/decisionGraphActionTypes.d.ts.map +1 -1
- package/dist/decision-table/decisionGraphTypes.d.ts +8 -0
- package/dist/decision-table/decisionGraphTypes.d.ts.map +1 -1
- package/dist/decision-table/index.cjs +56 -56
- package/dist/decision-table/index.d.ts +4 -4
- package/dist/decision-table/index.d.ts.map +1 -1
- package/dist/decision-table/index.js +2 -2
- package/dist/decision-table/locales/de.cjs +1 -1
- package/dist/decision-table/locales/de.d.ts.map +1 -1
- package/dist/decision-table/locales/de.js +1 -1
- package/dist/decision-table/locales/en.cjs +1 -1
- package/dist/decision-table/locales/en.d.ts.map +1 -1
- package/dist/decision-table/locales/en.js +1 -1
- package/dist/decision-table/locales/es-MX.cjs +1 -1
- package/dist/decision-table/locales/es-MX.d.ts.map +1 -1
- package/dist/decision-table/locales/es-MX.js +1 -1
- package/dist/decision-table/locales/es.cjs +1 -1
- package/dist/decision-table/locales/es.d.ts.map +1 -1
- package/dist/decision-table/locales/es.js +1 -1
- package/dist/decision-table/locales/fr.cjs +1 -1
- package/dist/decision-table/locales/fr.d.ts.map +1 -1
- package/dist/decision-table/locales/fr.js +1 -1
- package/dist/decision-table/locales/ja.cjs +1 -1
- package/dist/decision-table/locales/ja.d.ts.map +1 -1
- package/dist/decision-table/locales/ja.js +1 -1
- package/dist/decision-table/locales/ko.cjs +1 -1
- package/dist/decision-table/locales/ko.d.ts.map +1 -1
- package/dist/decision-table/locales/ko.js +1 -1
- package/dist/decision-table/locales/pt-BR.cjs +1 -1
- package/dist/decision-table/locales/pt-BR.d.ts.map +1 -1
- package/dist/decision-table/locales/pt-BR.js +1 -1
- package/dist/decision-table/locales/pt.cjs +1 -1
- package/dist/decision-table/locales/pt.d.ts.map +1 -1
- package/dist/decision-table/locales/pt.js +1 -1
- package/dist/decision-table/locales/ro.cjs +1 -1
- package/dist/decision-table/locales/ro.d.ts.map +1 -1
- package/dist/decision-table/locales/ro.js +1 -1
- package/dist/decision-table/locales/ru.cjs +1 -1
- package/dist/decision-table/locales/ru.d.ts.map +1 -1
- package/dist/decision-table/locales/ru.js +1 -1
- package/dist/decision-table/locales/tr.cjs +1 -1
- package/dist/decision-table/locales/tr.d.ts.map +1 -1
- package/dist/decision-table/locales/tr.js +1 -1
- package/dist/decision-table/locales/zh-CN.cjs +1 -1
- package/dist/decision-table/locales/zh-CN.d.ts.map +1 -1
- package/dist/decision-table/locales/zh-CN.js +1 -1
- package/dist/decision-table/locales/zh-TW.cjs +1 -1
- package/dist/decision-table/locales/zh-TW.d.ts.map +1 -1
- package/dist/decision-table/locales/zh-TW.js +1 -1
- package/dist/decision-table/ruleCardModel.d.ts +2 -1
- package/dist/decision-table/ruleCardModel.d.ts.map +1 -1
- package/dist/decision-table/sentenceSelection.cjs +15 -1
- package/dist/decision-table/sentenceSelection.d.ts +3 -1
- package/dist/decision-table/sentenceSelection.d.ts.map +1 -1
- package/dist/decision-table/sentenceSelection.js +9 -1
- package/dist/decision-table/sentenceStyles.cjs +33 -6
- package/dist/decision-table/sentenceStyles.d.ts +8 -1
- package/dist/decision-table/sentenceStyles.d.ts.map +1 -1
- package/dist/decision-table/sentenceStyles.js +9 -3
- package/dist/decision-table/sentenceTypes.d.ts +28 -0
- package/dist/decision-table/sentenceTypes.d.ts.map +1 -1
- package/dist/decision-table/styles/tailwind.decision-table.css +1 -1
- package/dist/decision-table/useContainerHandlers.cjs +99 -3
- package/dist/decision-table/useContainerHandlers.d.ts +15 -1
- package/dist/decision-table/useContainerHandlers.d.ts.map +1 -1
- package/dist/decision-table/useContainerHandlers.js +100 -4
- package/dist/decision-table/useDecisionGraphStrings.cjs +6 -2
- package/dist/decision-table/useDecisionGraphStrings.d.ts +2 -1
- package/dist/decision-table/useDecisionGraphStrings.d.ts.map +1 -1
- package/dist/decision-table/useDecisionGraphStrings.js +6 -2
- package/dist/decision-table/useDecisionTextStrings.cjs +36 -0
- package/dist/decision-table/useDecisionTextStrings.d.ts.map +1 -1
- package/dist/decision-table/useDecisionTextStrings.js +36 -0
- package/dist/decision-table/useSentenceNavigation.cjs +5 -6
- package/dist/decision-table/useSentenceNavigation.d.ts.map +1 -1
- package/dist/decision-table/useSentenceNavigation.js +1 -2
- package/package.json +2 -2
- package/dist/decision-table/DecisionGraphView.cjs +0 -435
- package/dist/decision-table/DecisionGraphView.d.ts +0 -19
- package/dist/decision-table/DecisionGraphView.d.ts.map +0 -1
- package/dist/decision-table/DecisionGraphView.js +0 -401
- package/dist/decision-table/EditableDecisionGraphText.cjs +0 -40
- package/dist/decision-table/EditableDecisionGraphText.d.ts +0 -5
- package/dist/decision-table/EditableDecisionGraphText.d.ts.map +0 -1
- package/dist/decision-table/EditableDecisionGraphText.js +0 -6
|
@@ -0,0 +1,72 @@
|
|
|
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, owner, index, 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(owner, citation.page, index),
|
|
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 indexOf = (citations, at)=>{
|
|
54
|
+
const page = citations[at]?.page;
|
|
55
|
+
const shared = citations.filter((citation)=>citation.page === page).length;
|
|
56
|
+
return shared > 1 ? citations.slice(0, at + 1).filter((citation)=>citation.page === page).length : null;
|
|
57
|
+
};
|
|
58
|
+
const CitationButtons = ({ citations, dataTestId, ...props })=>citations.map((citation, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CitationButton, {
|
|
59
|
+
citation: citation,
|
|
60
|
+
index: indexOf(citations, index),
|
|
61
|
+
dataTestId: 0 === index ? dataTestId : `${dataTestId}-${index}`,
|
|
62
|
+
...props
|
|
63
|
+
}, `${citation.kind}-${citation.page}-${index}`));
|
|
64
|
+
exports.CitationButton = __webpack_exports__.CitationButton;
|
|
65
|
+
exports.CitationButtons = __webpack_exports__.CitationButtons;
|
|
66
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
67
|
+
"CitationButton",
|
|
68
|
+
"CitationButtons"
|
|
69
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
70
|
+
Object.defineProperty(exports, '__esModule', {
|
|
71
|
+
value: true
|
|
72
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { OpenCitation, SentenceCitation } from './sentenceTypes';
|
|
3
|
+
export type CitationOwner = {
|
|
4
|
+
kind: 'rule';
|
|
5
|
+
position: number;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'decision';
|
|
8
|
+
name: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'table';
|
|
11
|
+
};
|
|
12
|
+
export interface CitationLabels {
|
|
13
|
+
openCitation: (owner: CitationOwner, page: number, index: number | null) => string;
|
|
14
|
+
citationPage: (page: number) => string;
|
|
15
|
+
}
|
|
16
|
+
export interface CitationButtonProps {
|
|
17
|
+
citation: SentenceCitation;
|
|
18
|
+
owner: CitationOwner;
|
|
19
|
+
index: number | null;
|
|
20
|
+
onOpen: OpenCitation;
|
|
21
|
+
selected: boolean;
|
|
22
|
+
tabIndex: 0 | -1;
|
|
23
|
+
className: string;
|
|
24
|
+
labels: CitationLabels;
|
|
25
|
+
dataTestId: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const CitationButton: React.FC<CitationButtonProps>;
|
|
28
|
+
export interface CitationButtonsProps extends Omit<CitationButtonProps, 'citation' | 'index' | 'dataTestId'> {
|
|
29
|
+
citations: readonly SentenceCitation[];
|
|
30
|
+
dataTestId: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const CitationButtons: React.FC<CitationButtonsProps>;
|
|
33
|
+
//# 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,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAGtB,MAAM,WAAW,cAAc;IAE7B,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IAEnF,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC;IAErB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,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,CAwBxD,CAAC;AAEF,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IACtE,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAWD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAavD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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, owner, index, onOpen, selected, tabIndex, className, labels, dataTestId })=>/*#__PURE__*/ jsxs(Button, {
|
|
6
|
+
variant: "ghost",
|
|
7
|
+
size: "3xs",
|
|
8
|
+
tabIndex: tabIndex,
|
|
9
|
+
"aria-label": labels.openCitation(owner, citation.page, index),
|
|
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 indexOf = (citations, at)=>{
|
|
25
|
+
const page = citations[at]?.page;
|
|
26
|
+
const shared = citations.filter((citation)=>citation.page === page).length;
|
|
27
|
+
return shared > 1 ? citations.slice(0, at + 1).filter((citation)=>citation.page === page).length : null;
|
|
28
|
+
};
|
|
29
|
+
const CitationButtons = ({ citations, dataTestId, ...props })=>citations.map((citation, index)=>/*#__PURE__*/ jsx(CitationButton, {
|
|
30
|
+
citation: citation,
|
|
31
|
+
index: indexOf(citations, index),
|
|
32
|
+
dataTestId: 0 === index ? dataTestId : `${dataTestId}-${index}`,
|
|
33
|
+
...props
|
|
34
|
+
}, `${citation.kind}-${citation.page}-${index}`));
|
|
35
|
+
export { CitationButton, CitationButtons };
|
|
@@ -31,9 +31,10 @@ 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
|
|
34
|
+
const external_CitationButton_cjs_namespaceObject = require("./CitationButton.cjs");
|
|
35
35
|
const external_decisionGraphStyles_cjs_namespaceObject = require("./decisionGraphStyles.cjs");
|
|
36
36
|
const external_GridMenu_cjs_namespaceObject = require("./GridMenu.cjs");
|
|
37
|
+
const external_gridEvents_cjs_namespaceObject = require("./gridEvents.cjs");
|
|
37
38
|
const external_MarkGlyph_cjs_namespaceObject = require("./MarkGlyph.cjs");
|
|
38
39
|
const external_sentenceMarks_cjs_namespaceObject = require("./sentenceMarks.cjs");
|
|
39
40
|
const HEADINGS = [
|
|
@@ -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,19 @@ 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
|
+
owner: {
|
|
210
|
+
kind: 'decision',
|
|
211
|
+
name: node.label
|
|
212
|
+
},
|
|
213
|
+
onOpen: citations.onOpen,
|
|
214
|
+
selected: active,
|
|
215
|
+
tabIndex: 0,
|
|
216
|
+
className: (0, apollo_wind_namespaceObject.cn)('shrink-0', !active && external_decisionGraphStyles_cjs_namespaceObject.GRAPH_REVEAL_CLASS, '[@media(hover:none)]:opacity-100'),
|
|
217
|
+
labels: labels,
|
|
218
|
+
dataTestId: `${dataTestId}-citation-${node.id}`
|
|
219
|
+
}),
|
|
206
220
|
actions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeMenu, {
|
|
207
221
|
actions: actions,
|
|
208
222
|
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;
|
|
1
|
+
{"version":3,"file":"DecisionGraphCard.d.ts","sourceRoot":"","sources":["../../src/decision-table/DecisionGraphCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhE,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,CA8H9D,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,9 +2,10 @@ 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 {
|
|
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";
|
|
5
|
+
import { CitationButtons } from "./CitationButton.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_REVEAL_CLASS, GRAPH_RULE_COUNT_CLASS, GRAPH_TOGGLE_CLASS } from "./decisionGraphStyles.js";
|
|
7
7
|
import { GridMenuButton } from "./GridMenu.js";
|
|
8
|
+
import { isComposing } from "./gridEvents.js";
|
|
8
9
|
import { MarkGlyph } from "./MarkGlyph.js";
|
|
9
10
|
import { isLineMark } from "./sentenceMarks.js";
|
|
10
11
|
const HEADINGS = [
|
|
@@ -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,19 @@ 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
|
+
owner: {
|
|
181
|
+
kind: 'decision',
|
|
182
|
+
name: node.label
|
|
183
|
+
},
|
|
184
|
+
onOpen: citations.onOpen,
|
|
185
|
+
selected: active,
|
|
186
|
+
tabIndex: 0,
|
|
187
|
+
className: cn('shrink-0', !active && GRAPH_REVEAL_CLASS, '[@media(hover:none)]:opacity-100'),
|
|
188
|
+
labels: labels,
|
|
189
|
+
dataTestId: `${dataTestId}-citation-${node.id}`
|
|
190
|
+
}),
|
|
177
191
|
actions && /*#__PURE__*/ jsx(NodeMenu, {
|
|
178
192
|
actions: actions,
|
|
179
193
|
dataTestId: `${dataTestId}-menu-${node.id}`
|