@uipath/apollo-react 7.30.0 → 7.31.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/styles/tailwind.canvas.css +1 -1
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/decision-table/ColumnPopover.cjs +1 -3
- package/dist/decision-table/ColumnPopover.d.ts +2 -2
- package/dist/decision-table/ColumnPopover.d.ts.map +1 -1
- package/dist/decision-table/ColumnPopover.js +1 -3
- package/dist/decision-table/DecisionGraphCard.cjs +112 -9
- package/dist/decision-table/DecisionGraphCard.d.ts +21 -0
- package/dist/decision-table/DecisionGraphCard.d.ts.map +1 -1
- package/dist/decision-table/DecisionGraphCard.js +115 -12
- package/dist/decision-table/DecisionGraphDialogs.cjs +223 -0
- package/dist/decision-table/DecisionGraphDialogs.d.ts +30 -0
- package/dist/decision-table/DecisionGraphDialogs.d.ts.map +1 -0
- package/dist/decision-table/DecisionGraphDialogs.js +183 -0
- package/dist/decision-table/DecisionGraphText.cjs +6 -338
- package/dist/decision-table/DecisionGraphText.d.ts +4 -15
- package/dist/decision-table/DecisionGraphText.d.ts.map +1 -1
- package/dist/decision-table/DecisionGraphText.js +7 -339
- package/dist/decision-table/DecisionGraphView.cjs +409 -0
- package/dist/decision-table/DecisionGraphView.d.ts +20 -0
- package/dist/decision-table/DecisionGraphView.d.ts.map +1 -0
- package/dist/decision-table/DecisionGraphView.js +375 -0
- package/dist/decision-table/DecisionTable.cjs +3 -1
- package/dist/decision-table/DecisionTable.d.ts.map +1 -1
- package/dist/decision-table/DecisionTable.js +3 -1
- package/dist/decision-table/DecisionText.cjs +2 -4
- package/dist/decision-table/DecisionText.d.ts.map +1 -1
- package/dist/decision-table/DecisionText.js +2 -4
- package/dist/decision-table/EditableDecisionGraphText.cjs +40 -0
- package/dist/decision-table/EditableDecisionGraphText.d.ts +5 -0
- package/dist/decision-table/EditableDecisionGraphText.d.ts.map +1 -0
- package/dist/decision-table/EditableDecisionGraphText.js +6 -0
- package/dist/decision-table/GridMenu.cjs +36 -2
- package/dist/decision-table/GridMenu.d.ts +8 -0
- package/dist/decision-table/GridMenu.d.ts.map +1 -1
- package/dist/decision-table/GridMenu.js +33 -2
- package/dist/decision-table/__fixtures__/graphActionsHost.d.ts +21 -0
- package/dist/decision-table/__fixtures__/graphActionsHost.d.ts.map +1 -0
- package/dist/decision-table/columnTypes.cjs +2 -8
- package/dist/decision-table/columnTypes.d.ts +4 -2
- package/dist/decision-table/columnTypes.d.ts.map +1 -1
- package/dist/decision-table/columnTypes.js +2 -8
- package/dist/decision-table/constants.cjs +7 -0
- package/dist/decision-table/constants.d.ts +1 -0
- package/dist/decision-table/constants.d.ts.map +1 -1
- package/dist/decision-table/constants.js +5 -1
- package/dist/decision-table/decisionGraphActionTypes.d.ts +88 -0
- package/dist/decision-table/decisionGraphActionTypes.d.ts.map +1 -0
- package/dist/decision-table/decisionGraphMenuEntries.cjs +247 -0
- package/dist/decision-table/decisionGraphMenuEntries.d.ts +46 -0
- package/dist/decision-table/decisionGraphMenuEntries.d.ts.map +1 -0
- package/dist/decision-table/decisionGraphMenuEntries.js +186 -0
- package/dist/decision-table/decisionGraphPositions.cjs +136 -0
- package/dist/decision-table/decisionGraphPositions.d.ts +26 -0
- package/dist/decision-table/decisionGraphPositions.d.ts.map +1 -0
- package/dist/decision-table/decisionGraphPositions.js +69 -0
- package/dist/decision-table/decisionGraphStyles.cjs +24 -16
- package/dist/decision-table/decisionGraphStyles.d.ts +3 -1
- package/dist/decision-table/decisionGraphStyles.d.ts.map +1 -1
- package/dist/decision-table/decisionGraphStyles.js +4 -2
- package/dist/decision-table/decisionTextTypes.d.ts +3 -1
- package/dist/decision-table/decisionTextTypes.d.ts.map +1 -1
- package/dist/decision-table/hitPolicyMenu.cjs +4 -10
- package/dist/decision-table/hitPolicyMenu.d.ts +5 -3
- package/dist/decision-table/hitPolicyMenu.d.ts.map +1 -1
- package/dist/decision-table/hitPolicyMenu.js +4 -10
- package/dist/decision-table/index.cjs +62 -54
- package/dist/decision-table/index.d.ts +2 -0
- package/dist/decision-table/index.d.ts.map +1 -1
- package/dist/decision-table/index.js +2 -1
- 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/styles/tailwind.decision-table.css +1 -1
- package/dist/decision-table/useDecisionGraphActions.cjs +385 -0
- package/dist/decision-table/useDecisionGraphActions.d.ts +24 -0
- package/dist/decision-table/useDecisionGraphActions.d.ts.map +1 -0
- package/dist/decision-table/useDecisionGraphActions.js +351 -0
- package/dist/decision-table/useDecisionGraphStrings.cjs +138 -0
- 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 +138 -0
- package/dist/decision-table/useDecisionTextStrings.cjs +22 -0
- package/dist/decision-table/useDecisionTextStrings.d.ts.map +1 -1
- package/dist/decision-table/useDecisionTextStrings.js +22 -0
- package/dist/decision-table/useDragReorder.cjs +3 -2
- package/dist/decision-table/useDragReorder.d.ts.map +1 -1
- package/dist/decision-table/useDragReorder.js +3 -2
- package/dist/decision-table/useRuleWindow.cjs +3 -7
- package/dist/decision-table/useRuleWindow.d.ts.map +1 -1
- package/dist/decision-table/useRuleWindow.js +1 -5
- package/dist/decision-table/useTextAnnouncements.cjs +2 -9
- package/dist/decision-table/useTextAnnouncements.d.ts +4 -2
- package/dist/decision-table/useTextAnnouncements.d.ts.map +1 -1
- package/dist/decision-table/useTextAnnouncements.js +2 -9
- package/package.json +2 -2
- package/dist/decision-table/translate.d.ts +0 -3
- package/dist/decision-table/translate.d.ts.map +0 -1
- /package/dist/decision-table/{translate.cjs → decisionGraphActionTypes.cjs} +0 -0
- /package/dist/decision-table/{translate.js → decisionGraphActionTypes.js} +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { decisionIdOf, moveDownOf, moveOutOf, moveUnderPreviousOf, moveUpOf, placeOf, previousDecisionOf } from "./decisionGraphPositions.js";
|
|
2
|
+
const actionOf = (actions, kind)=>actions.find((action)=>action.kind === kind);
|
|
3
|
+
const focusOf = (node)=>'decision' === node.kind ? {
|
|
4
|
+
kind: 'decision',
|
|
5
|
+
decisionId: node.id
|
|
6
|
+
} : {
|
|
7
|
+
kind: 'reference',
|
|
8
|
+
referenceId: node.id,
|
|
9
|
+
decisionId: node.targetId
|
|
10
|
+
};
|
|
11
|
+
const DIVIDER = {
|
|
12
|
+
divider: true
|
|
13
|
+
};
|
|
14
|
+
const joined = (groups)=>groups.filter((group)=>group.length > 0).flatMap((group, index)=>0 === index ? group : [
|
|
15
|
+
DIVIDER,
|
|
16
|
+
...group
|
|
17
|
+
]);
|
|
18
|
+
const MOVE_KEYS = {
|
|
19
|
+
up: 'Alt+Shift+ArrowUp',
|
|
20
|
+
down: 'Alt+Shift+ArrowDown',
|
|
21
|
+
under: 'Alt+Shift+ArrowRight',
|
|
22
|
+
out: 'Alt+Shift+ArrowLeft'
|
|
23
|
+
};
|
|
24
|
+
const MOVE_SHORTCUTS = {
|
|
25
|
+
up: 'Alt+Shift+↑',
|
|
26
|
+
down: 'Alt+Shift+↓',
|
|
27
|
+
under: 'Alt+Shift+→',
|
|
28
|
+
out: 'Alt+Shift+←'
|
|
29
|
+
};
|
|
30
|
+
const RENAME_KEY = 'F2';
|
|
31
|
+
const DELETE_KEY = 'Delete';
|
|
32
|
+
const movesOf = (node, position)=>({
|
|
33
|
+
up: moveUpOf(node, position),
|
|
34
|
+
down: moveDownOf(node, position),
|
|
35
|
+
under: moveUnderPreviousOf(node, position),
|
|
36
|
+
out: moveOutOf(node, position)
|
|
37
|
+
});
|
|
38
|
+
const moveEntriesOf = (actions, labels, node, position, handlers, nested)=>{
|
|
39
|
+
const action = actionOf(actions, 'move');
|
|
40
|
+
if (!action) return [];
|
|
41
|
+
const moves = movesOf(node, position);
|
|
42
|
+
const entry = (label, move, shortcut)=>({
|
|
43
|
+
label,
|
|
44
|
+
shortcut,
|
|
45
|
+
disabled: null === move,
|
|
46
|
+
focusesOwnSurface: true,
|
|
47
|
+
onClick: ()=>{
|
|
48
|
+
if (move) handlers.run(()=>action.onMove(move), focusOf(node));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const previous = previousDecisionOf(node, position);
|
|
52
|
+
return [
|
|
53
|
+
entry(labels.moveUp, moves.up, MOVE_SHORTCUTS.up),
|
|
54
|
+
entry(labels.moveDown, moves.down, MOVE_SHORTCUTS.down),
|
|
55
|
+
...nested && previous ? [
|
|
56
|
+
entry(labels.moveUnder(previous.label), moves.under, MOVE_SHORTCUTS.under)
|
|
57
|
+
] : [],
|
|
58
|
+
...nested && 'under' === position.kind ? [
|
|
59
|
+
entry(labels.moveOutOf(position.parent.label), moves.out, MOVE_SHORTCUTS.out)
|
|
60
|
+
] : []
|
|
61
|
+
];
|
|
62
|
+
};
|
|
63
|
+
const stopUsingEntriesOf = (actions, labels, node, position, handlers)=>{
|
|
64
|
+
const action = actionOf(actions, 'stopUsing');
|
|
65
|
+
if (!action || 'under' !== position.kind) return [];
|
|
66
|
+
const { parent } = position;
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
label: labels.stopUsingIn(parent.label),
|
|
70
|
+
focusesOwnSurface: true,
|
|
71
|
+
onClick: ()=>handlers.run(()=>action.onStopUsing(decisionIdOf(node), parent.id), {
|
|
72
|
+
kind: 'decision',
|
|
73
|
+
decisionId: parent.id
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
};
|
|
78
|
+
const addEntriesOf = (actions, labels, node, position, handlers)=>{
|
|
79
|
+
const action = actionOf(actions, 'add');
|
|
80
|
+
if (!action || 'decision' !== node.kind) return [];
|
|
81
|
+
const add = (label, place)=>({
|
|
82
|
+
label,
|
|
83
|
+
onClick: ()=>handlers.run(()=>action.onAdd(place), focusOf(node))
|
|
84
|
+
});
|
|
85
|
+
return [
|
|
86
|
+
add(labels.addDecisionBefore, placeOf(position)),
|
|
87
|
+
add(labels.addDecisionAfter, placeOf(position, position.index + 1)),
|
|
88
|
+
add(labels.addRequiredInput, {
|
|
89
|
+
kind: 'under',
|
|
90
|
+
parentId: node.id,
|
|
91
|
+
index: node.children.length
|
|
92
|
+
})
|
|
93
|
+
];
|
|
94
|
+
};
|
|
95
|
+
const CARD_KINDS = [
|
|
96
|
+
'rename',
|
|
97
|
+
'addNote',
|
|
98
|
+
'add',
|
|
99
|
+
'chooseInputs',
|
|
100
|
+
'chooseUsers',
|
|
101
|
+
'delete'
|
|
102
|
+
];
|
|
103
|
+
const canMove = (actions, node, position, nested)=>{
|
|
104
|
+
if (!actionOf(actions, 'move')) return false;
|
|
105
|
+
const { up, down, under, out } = movesOf(node, position);
|
|
106
|
+
return [
|
|
107
|
+
up,
|
|
108
|
+
down,
|
|
109
|
+
...nested ? [
|
|
110
|
+
under,
|
|
111
|
+
out
|
|
112
|
+
] : []
|
|
113
|
+
].some((move)=>null !== move);
|
|
114
|
+
};
|
|
115
|
+
const offersStopUsing = (actions, position)=>'under' === position.kind && void 0 !== actionOf(actions, 'stopUsing');
|
|
116
|
+
const hasDecisionEntries = (actions, node, position, open)=>void 0 !== open || offersStopUsing(actions, position) || actions.some((action)=>CARD_KINDS.includes(action.kind)) || canMove(actions, node, position, true) || (actionOf(actions, 'changeLogic')?.logicOptions(decisionIdOf(node)).length ?? 0) > 0;
|
|
117
|
+
const hasReferenceEntries = (actions, node, position, open)=>void 0 !== open || offersStopUsing(actions, position) || canMove(actions, node, position, false);
|
|
118
|
+
const decisionEntriesOf = (actions, labels, node, position, handlers)=>{
|
|
119
|
+
const decisionId = decisionIdOf(node);
|
|
120
|
+
const { changeLogic } = handlers;
|
|
121
|
+
const has = (kind)=>void 0 !== actionOf(actions, kind);
|
|
122
|
+
return joined([
|
|
123
|
+
[
|
|
124
|
+
...handlers.open ? [
|
|
125
|
+
{
|
|
126
|
+
label: labels.openDecision,
|
|
127
|
+
onClick: handlers.open
|
|
128
|
+
}
|
|
129
|
+
] : [],
|
|
130
|
+
...has('rename') ? [
|
|
131
|
+
{
|
|
132
|
+
label: labels.rename,
|
|
133
|
+
shortcut: RENAME_KEY,
|
|
134
|
+
focusesOwnSurface: true,
|
|
135
|
+
onClick: handlers.startRename
|
|
136
|
+
}
|
|
137
|
+
] : [],
|
|
138
|
+
...has('addNote') ? [
|
|
139
|
+
{
|
|
140
|
+
label: labels.addNote,
|
|
141
|
+
onClick: handlers.writeNote
|
|
142
|
+
}
|
|
143
|
+
] : [],
|
|
144
|
+
...changeLogic ? changeLogic.logicOptions(decisionId).map((option)=>({
|
|
145
|
+
label: labels.changeLogicTo(option.label),
|
|
146
|
+
onClick: ()=>handlers.run(()=>changeLogic.onChangeLogic(decisionId, option.logic), focusOf(node))
|
|
147
|
+
})) : []
|
|
148
|
+
],
|
|
149
|
+
addEntriesOf(actions, labels, node, position, handlers),
|
|
150
|
+
[
|
|
151
|
+
...has('chooseInputs') ? [
|
|
152
|
+
{
|
|
153
|
+
label: labels.chooseInputs,
|
|
154
|
+
onClick: ()=>handlers.chooseLinks('chooseInputs')
|
|
155
|
+
}
|
|
156
|
+
] : [],
|
|
157
|
+
...has('chooseUsers') ? [
|
|
158
|
+
{
|
|
159
|
+
label: labels.chooseUsers,
|
|
160
|
+
onClick: ()=>handlers.chooseLinks('chooseUsers')
|
|
161
|
+
}
|
|
162
|
+
] : [],
|
|
163
|
+
...stopUsingEntriesOf(actions, labels, node, position, handlers)
|
|
164
|
+
],
|
|
165
|
+
moveEntriesOf(actions, labels, node, position, handlers, true),
|
|
166
|
+
has('delete') ? [
|
|
167
|
+
{
|
|
168
|
+
label: labels.delete,
|
|
169
|
+
shortcut: DELETE_KEY,
|
|
170
|
+
destructive: true,
|
|
171
|
+
onClick: handlers.confirmDelete
|
|
172
|
+
}
|
|
173
|
+
] : []
|
|
174
|
+
]);
|
|
175
|
+
};
|
|
176
|
+
const referenceEntriesOf = (actions, labels, node, position, handlers)=>joined([
|
|
177
|
+
handlers.open ? [
|
|
178
|
+
{
|
|
179
|
+
label: labels.openDecision,
|
|
180
|
+
onClick: handlers.open
|
|
181
|
+
}
|
|
182
|
+
] : [],
|
|
183
|
+
moveEntriesOf(actions, labels, node, position, handlers, false),
|
|
184
|
+
stopUsingEntriesOf(actions, labels, node, position, handlers)
|
|
185
|
+
]);
|
|
186
|
+
export { DELETE_KEY, MOVE_KEYS, RENAME_KEY, actionOf, decisionEntriesOf, focusOf, hasDecisionEntries, hasReferenceEntries, movesOf, referenceEntriesOf };
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
childPositionsOf: ()=>childPositionsOf,
|
|
28
|
+
decisionIdOf: ()=>decisionIdOf,
|
|
29
|
+
decisionsOf: ()=>decisionsOf,
|
|
30
|
+
inputIdsOf: ()=>inputIdsOf,
|
|
31
|
+
moveDownOf: ()=>moveDownOf,
|
|
32
|
+
moveOutOf: ()=>moveOutOf,
|
|
33
|
+
moveUnderPreviousOf: ()=>moveUnderPreviousOf,
|
|
34
|
+
moveUpOf: ()=>moveUpOf,
|
|
35
|
+
placeOf: ()=>placeOf,
|
|
36
|
+
previousDecisionOf: ()=>previousDecisionOf,
|
|
37
|
+
topPositionsOf: ()=>topPositionsOf,
|
|
38
|
+
usersOf: ()=>usersOf
|
|
39
|
+
});
|
|
40
|
+
const decisionIdOf = (node)=>'decision' === node.kind ? node.id : node.targetId;
|
|
41
|
+
const topPositionsOf = (nodes)=>nodes.map((_, index)=>({
|
|
42
|
+
kind: 'top',
|
|
43
|
+
index,
|
|
44
|
+
siblings: nodes
|
|
45
|
+
}));
|
|
46
|
+
const childPositionsOf = (parent, parentPosition)=>parent.children.map((_, index)=>({
|
|
47
|
+
kind: 'under',
|
|
48
|
+
index,
|
|
49
|
+
siblings: parent.children,
|
|
50
|
+
parent,
|
|
51
|
+
parentPosition
|
|
52
|
+
}));
|
|
53
|
+
const placeOf = (position, index = position.index)=>'top' === position.kind ? {
|
|
54
|
+
kind: 'top',
|
|
55
|
+
index
|
|
56
|
+
} : {
|
|
57
|
+
kind: 'under',
|
|
58
|
+
parentId: position.parent.id,
|
|
59
|
+
index
|
|
60
|
+
};
|
|
61
|
+
const moveTo = (node, position, to)=>({
|
|
62
|
+
decisionId: decisionIdOf(node),
|
|
63
|
+
from: placeOf(position),
|
|
64
|
+
to
|
|
65
|
+
});
|
|
66
|
+
const moveUpOf = (node, position)=>position.index > 0 ? moveTo(node, position, placeOf(position, position.index - 1)) : null;
|
|
67
|
+
const moveDownOf = (node, position)=>position.index < position.siblings.length - 1 ? moveTo(node, position, placeOf(position, position.index + 1)) : null;
|
|
68
|
+
const previousDecisionOf = (node, position)=>{
|
|
69
|
+
const previous = position.siblings[position.index - 1];
|
|
70
|
+
return previous?.kind === 'decision' && previous.id !== decisionIdOf(node) ? previous : null;
|
|
71
|
+
};
|
|
72
|
+
const moveUnderPreviousOf = (node, position)=>{
|
|
73
|
+
const previous = previousDecisionOf(node, position);
|
|
74
|
+
return previous ? moveTo(node, position, {
|
|
75
|
+
kind: 'under',
|
|
76
|
+
parentId: previous.id,
|
|
77
|
+
index: previous.children.length
|
|
78
|
+
}) : null;
|
|
79
|
+
};
|
|
80
|
+
const moveOutOf = (node, position)=>'under' === position.kind ? moveTo(node, position, placeOf(position.parentPosition, position.parentPosition.index + 1)) : null;
|
|
81
|
+
const usersOf = (nodes)=>{
|
|
82
|
+
const users = new Map();
|
|
83
|
+
const visit = (node, parent)=>{
|
|
84
|
+
const id = decisionIdOf(node);
|
|
85
|
+
const known = users.get(id) ?? [];
|
|
86
|
+
if (parent && !known.includes(parent)) users.set(id, [
|
|
87
|
+
...known,
|
|
88
|
+
parent
|
|
89
|
+
]);
|
|
90
|
+
if ('decision' === node.kind) for (const child of node.children)visit(child, node);
|
|
91
|
+
};
|
|
92
|
+
for (const node of nodes)visit(node, null);
|
|
93
|
+
return users;
|
|
94
|
+
};
|
|
95
|
+
const decisionsOf = (nodes)=>{
|
|
96
|
+
const decisions = [];
|
|
97
|
+
const visit = (node)=>{
|
|
98
|
+
if ('decision' !== node.kind) return;
|
|
99
|
+
decisions.push(node);
|
|
100
|
+
for (const child of node.children)visit(child);
|
|
101
|
+
};
|
|
102
|
+
for (const node of nodes)visit(node);
|
|
103
|
+
return decisions;
|
|
104
|
+
};
|
|
105
|
+
const inputIdsOf = (decision)=>[
|
|
106
|
+
...new Set(decision.children.map(decisionIdOf))
|
|
107
|
+
];
|
|
108
|
+
exports.childPositionsOf = __webpack_exports__.childPositionsOf;
|
|
109
|
+
exports.decisionIdOf = __webpack_exports__.decisionIdOf;
|
|
110
|
+
exports.decisionsOf = __webpack_exports__.decisionsOf;
|
|
111
|
+
exports.inputIdsOf = __webpack_exports__.inputIdsOf;
|
|
112
|
+
exports.moveDownOf = __webpack_exports__.moveDownOf;
|
|
113
|
+
exports.moveOutOf = __webpack_exports__.moveOutOf;
|
|
114
|
+
exports.moveUnderPreviousOf = __webpack_exports__.moveUnderPreviousOf;
|
|
115
|
+
exports.moveUpOf = __webpack_exports__.moveUpOf;
|
|
116
|
+
exports.placeOf = __webpack_exports__.placeOf;
|
|
117
|
+
exports.previousDecisionOf = __webpack_exports__.previousDecisionOf;
|
|
118
|
+
exports.topPositionsOf = __webpack_exports__.topPositionsOf;
|
|
119
|
+
exports.usersOf = __webpack_exports__.usersOf;
|
|
120
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
121
|
+
"childPositionsOf",
|
|
122
|
+
"decisionIdOf",
|
|
123
|
+
"decisionsOf",
|
|
124
|
+
"inputIdsOf",
|
|
125
|
+
"moveDownOf",
|
|
126
|
+
"moveOutOf",
|
|
127
|
+
"moveUnderPreviousOf",
|
|
128
|
+
"moveUpOf",
|
|
129
|
+
"placeOf",
|
|
130
|
+
"previousDecisionOf",
|
|
131
|
+
"topPositionsOf",
|
|
132
|
+
"usersOf"
|
|
133
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
134
|
+
Object.defineProperty(exports, '__esModule', {
|
|
135
|
+
value: true
|
|
136
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DecisionGraphMove, DecisionGraphPlace } from './decisionGraphActionTypes';
|
|
2
|
+
import type { DecisionGraphDecisionNode, DecisionGraphNode } from './decisionGraphTypes';
|
|
3
|
+
export type DecisionGraphPosition = {
|
|
4
|
+
kind: 'top';
|
|
5
|
+
index: number;
|
|
6
|
+
siblings: readonly DecisionGraphNode[];
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'under';
|
|
9
|
+
index: number;
|
|
10
|
+
siblings: readonly DecisionGraphNode[];
|
|
11
|
+
parent: DecisionGraphDecisionNode;
|
|
12
|
+
parentPosition: DecisionGraphPosition;
|
|
13
|
+
};
|
|
14
|
+
export declare const decisionIdOf: (node: DecisionGraphNode) => string;
|
|
15
|
+
export declare const topPositionsOf: (nodes: readonly DecisionGraphNode[]) => DecisionGraphPosition[];
|
|
16
|
+
export declare const childPositionsOf: (parent: DecisionGraphDecisionNode, parentPosition: DecisionGraphPosition) => DecisionGraphPosition[];
|
|
17
|
+
export declare const placeOf: (position: DecisionGraphPosition, index?: number) => DecisionGraphPlace;
|
|
18
|
+
export declare const moveUpOf: (node: DecisionGraphNode, position: DecisionGraphPosition) => DecisionGraphMove | null;
|
|
19
|
+
export declare const moveDownOf: (node: DecisionGraphNode, position: DecisionGraphPosition) => DecisionGraphMove | null;
|
|
20
|
+
export declare const previousDecisionOf: (node: DecisionGraphNode, position: DecisionGraphPosition) => DecisionGraphDecisionNode | null;
|
|
21
|
+
export declare const moveUnderPreviousOf: (node: DecisionGraphNode, position: DecisionGraphPosition) => DecisionGraphMove | null;
|
|
22
|
+
export declare const moveOutOf: (node: DecisionGraphNode, position: DecisionGraphPosition) => DecisionGraphMove | null;
|
|
23
|
+
export declare const usersOf: (nodes: readonly DecisionGraphNode[]) => ReadonlyMap<string, readonly DecisionGraphDecisionNode[]>;
|
|
24
|
+
export declare const decisionsOf: (nodes: readonly DecisionGraphNode[]) => readonly DecisionGraphDecisionNode[];
|
|
25
|
+
export declare const inputIdsOf: (decision: DecisionGraphDecisionNode) => readonly string[];
|
|
26
|
+
//# sourceMappingURL=decisionGraphPositions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decisionGraphPositions.d.ts","sourceRoot":"","sources":["../../src/decision-table/decisionGraphPositions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzF,MAAM,MA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,SAAS,yBAAyB,EAAE,CAU1D,CAAC;AAGF,eAAO,MAAM,WAAW,GACtB,OAAO,SAAS,iBAAiB,EAAE,KAClC,SAAS,yBAAyB,EASpC,CAAC;AAGF,eAAO,MAAM,UAAU,GAAI,UAAU,yBAAyB,KAAG,SAAS,MAAM,EAE/E,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const decisionIdOf = (node)=>'decision' === node.kind ? node.id : node.targetId;
|
|
2
|
+
const topPositionsOf = (nodes)=>nodes.map((_, index)=>({
|
|
3
|
+
kind: 'top',
|
|
4
|
+
index,
|
|
5
|
+
siblings: nodes
|
|
6
|
+
}));
|
|
7
|
+
const childPositionsOf = (parent, parentPosition)=>parent.children.map((_, index)=>({
|
|
8
|
+
kind: 'under',
|
|
9
|
+
index,
|
|
10
|
+
siblings: parent.children,
|
|
11
|
+
parent,
|
|
12
|
+
parentPosition
|
|
13
|
+
}));
|
|
14
|
+
const placeOf = (position, index = position.index)=>'top' === position.kind ? {
|
|
15
|
+
kind: 'top',
|
|
16
|
+
index
|
|
17
|
+
} : {
|
|
18
|
+
kind: 'under',
|
|
19
|
+
parentId: position.parent.id,
|
|
20
|
+
index
|
|
21
|
+
};
|
|
22
|
+
const moveTo = (node, position, to)=>({
|
|
23
|
+
decisionId: decisionIdOf(node),
|
|
24
|
+
from: placeOf(position),
|
|
25
|
+
to
|
|
26
|
+
});
|
|
27
|
+
const moveUpOf = (node, position)=>position.index > 0 ? moveTo(node, position, placeOf(position, position.index - 1)) : null;
|
|
28
|
+
const moveDownOf = (node, position)=>position.index < position.siblings.length - 1 ? moveTo(node, position, placeOf(position, position.index + 1)) : null;
|
|
29
|
+
const previousDecisionOf = (node, position)=>{
|
|
30
|
+
const previous = position.siblings[position.index - 1];
|
|
31
|
+
return previous?.kind === 'decision' && previous.id !== decisionIdOf(node) ? previous : null;
|
|
32
|
+
};
|
|
33
|
+
const moveUnderPreviousOf = (node, position)=>{
|
|
34
|
+
const previous = previousDecisionOf(node, position);
|
|
35
|
+
return previous ? moveTo(node, position, {
|
|
36
|
+
kind: 'under',
|
|
37
|
+
parentId: previous.id,
|
|
38
|
+
index: previous.children.length
|
|
39
|
+
}) : null;
|
|
40
|
+
};
|
|
41
|
+
const moveOutOf = (node, position)=>'under' === position.kind ? moveTo(node, position, placeOf(position.parentPosition, position.parentPosition.index + 1)) : null;
|
|
42
|
+
const usersOf = (nodes)=>{
|
|
43
|
+
const users = new Map();
|
|
44
|
+
const visit = (node, parent)=>{
|
|
45
|
+
const id = decisionIdOf(node);
|
|
46
|
+
const known = users.get(id) ?? [];
|
|
47
|
+
if (parent && !known.includes(parent)) users.set(id, [
|
|
48
|
+
...known,
|
|
49
|
+
parent
|
|
50
|
+
]);
|
|
51
|
+
if ('decision' === node.kind) for (const child of node.children)visit(child, node);
|
|
52
|
+
};
|
|
53
|
+
for (const node of nodes)visit(node, null);
|
|
54
|
+
return users;
|
|
55
|
+
};
|
|
56
|
+
const decisionsOf = (nodes)=>{
|
|
57
|
+
const decisions = [];
|
|
58
|
+
const visit = (node)=>{
|
|
59
|
+
if ('decision' !== node.kind) return;
|
|
60
|
+
decisions.push(node);
|
|
61
|
+
for (const child of node.children)visit(child);
|
|
62
|
+
};
|
|
63
|
+
for (const node of nodes)visit(node);
|
|
64
|
+
return decisions;
|
|
65
|
+
};
|
|
66
|
+
const inputIdsOf = (decision)=>[
|
|
67
|
+
...new Set(decision.children.map(decisionIdOf))
|
|
68
|
+
];
|
|
69
|
+
export { childPositionsOf, decisionIdOf, decisionsOf, inputIdsOf, moveDownOf, moveOutOf, moveUnderPreviousOf, moveUpOf, placeOf, previousDecisionOf, topPositionsOf, usersOf };
|
|
@@ -24,33 +24,35 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
GRAPH_HEADER_CLASS: ()=>GRAPH_HEADER_CLASS,
|
|
30
|
-
GRAPH_REFERENCE_CHIP_CLASS: ()=>GRAPH_REFERENCE_CHIP_CLASS,
|
|
27
|
+
MINIMAP_ROW_CLASS: ()=>MINIMAP_ROW_CLASS,
|
|
28
|
+
GRAPH_ADD_DECISION_CLASS: ()=>GRAPH_ADD_DECISION_CLASS,
|
|
31
29
|
GRAPH_EMPTY_CLASS: ()=>GRAPH_EMPTY_CLASS,
|
|
32
|
-
GRAPH_NAME_CLASS: ()=>GRAPH_NAME_CLASS,
|
|
33
30
|
GRAPH_OUTPUT_HUE_CLASS: ()=>GRAPH_OUTPUT_HUE_CLASS,
|
|
34
|
-
GRAPH_TOGGLE_CLASS: ()=>GRAPH_TOGGLE_CLASS,
|
|
35
31
|
MINIMAP_FLOATING_CLASS: ()=>MINIMAP_FLOATING_CLASS,
|
|
32
|
+
MINIMAP_TRIGGER_CLASS: ()=>MINIMAP_TRIGGER_CLASS,
|
|
36
33
|
GRAPH_REFERENCE_CLASS: ()=>GRAPH_REFERENCE_CLASS,
|
|
37
|
-
MINIMAP_ROW_CLASS: ()=>MINIMAP_ROW_CLASS,
|
|
38
34
|
GRAPH_FRAME_CLASS: ()=>GRAPH_FRAME_CLASS,
|
|
39
|
-
GRAPH_MINIMAP_GAP_PX: ()=>GRAPH_MINIMAP_GAP_PX,
|
|
40
|
-
GRAPH_SCROLLER_CLASS: ()=>GRAPH_SCROLLER_CLASS,
|
|
41
|
-
MINIMAP_TRIGGER_CLASS: ()=>MINIMAP_TRIGGER_CLASS,
|
|
42
35
|
graphColumnInsetOf: ()=>graphColumnInsetOf,
|
|
36
|
+
GRAPH_SCROLLER_CLASS: ()=>GRAPH_SCROLLER_CLASS,
|
|
43
37
|
GRAPH_REVEAL_CLASS: ()=>GRAPH_REVEAL_CLASS,
|
|
44
|
-
GRAPH_CARD_CLASS: ()=>GRAPH_CARD_CLASS,
|
|
45
38
|
GRAPH_RULE_COUNT_CLASS: ()=>GRAPH_RULE_COUNT_CLASS,
|
|
46
39
|
GRAPH_CARD_COLLAPSED_CLASS: ()=>GRAPH_CARD_COLLAPSED_CLASS,
|
|
47
|
-
GRAPH_BRANCH_CLASS: ()=>GRAPH_BRANCH_CLASS,
|
|
48
40
|
GRAPH_MINIMAP_SLOT_CLASS: ()=>GRAPH_MINIMAP_SLOT_CLASS,
|
|
49
|
-
MINIMAP_CONTENT_CLASS: ()=>MINIMAP_CONTENT_CLASS,
|
|
50
41
|
GRAPH_NEST_CLASS: ()=>GRAPH_NEST_CLASS,
|
|
51
|
-
|
|
42
|
+
GRAPH_COLUMN_CLASS: ()=>GRAPH_COLUMN_CLASS,
|
|
43
|
+
GRAPH_HEADER_CLASS: ()=>GRAPH_HEADER_CLASS,
|
|
44
|
+
GRAPH_CARD_TONE_CLASS: ()=>GRAPH_CARD_TONE_CLASS,
|
|
52
45
|
GRAPH_HIT_POLICY_CLASS: ()=>GRAPH_HIT_POLICY_CLASS,
|
|
53
|
-
|
|
46
|
+
GRAPH_NAME_CLASS: ()=>GRAPH_NAME_CLASS,
|
|
47
|
+
GRAPH_MINIMAP_GAP_PX: ()=>GRAPH_MINIMAP_GAP_PX,
|
|
48
|
+
GRAPH_CARD_CLASS: ()=>GRAPH_CARD_CLASS,
|
|
49
|
+
GRAPH_MENU_BUTTON_CLASS: ()=>GRAPH_MENU_BUTTON_CLASS,
|
|
50
|
+
GRAPH_BRANCH_CLASS: ()=>GRAPH_BRANCH_CLASS,
|
|
51
|
+
MINIMAP_CONTENT_CLASS: ()=>MINIMAP_CONTENT_CLASS,
|
|
52
|
+
GRAPH_REFERENCE_CHIP_CLASS: ()=>GRAPH_REFERENCE_CHIP_CLASS,
|
|
53
|
+
GRAPH_MARK_BUTTON_CLASS: ()=>GRAPH_MARK_BUTTON_CLASS,
|
|
54
|
+
GRAPH_BODY_CLASS: ()=>GRAPH_BODY_CLASS,
|
|
55
|
+
GRAPH_TOGGLE_CLASS: ()=>GRAPH_TOGGLE_CLASS
|
|
54
56
|
});
|
|
55
57
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
56
58
|
const GRAPH_FRAME_CLASS = 'relative flex min-h-0 flex-1 flex-col bg-background-secondary future:bg-background';
|
|
@@ -73,16 +75,19 @@ const GRAPH_REVEAL_CLASS = 'opacity-0 transition-opacity group-hover/chapter:opa
|
|
|
73
75
|
const GRAPH_HIT_POLICY_CLASS = (0, apollo_wind_namespaceObject.cn)('shrink-0 text-xs text-foreground-de-emp', GRAPH_REVEAL_CLASS);
|
|
74
76
|
const GRAPH_RULE_COUNT_CLASS = (0, apollo_wind_namespaceObject.cn)('ms-auto shrink-0 text-xs text-foreground-de-emp', GRAPH_REVEAL_CLASS);
|
|
75
77
|
const GRAPH_MARK_BUTTON_CLASS = 'inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded border-0 bg-transparent p-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary';
|
|
78
|
+
const GRAPH_MENU_BUTTON_CLASS = (0, apollo_wind_namespaceObject.cn)('inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded border-0 bg-transparent p-0 text-foreground-de-emp hover:bg-background-hover focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-background-hover data-[state=open]:opacity-100 [@media(hover:none)]:opacity-100', GRAPH_REVEAL_CLASS);
|
|
79
|
+
const GRAPH_ADD_DECISION_CLASS = 'flex h-10 cursor-pointer items-center gap-2 rounded-[10px] border border-dashed border-border-de-emp bg-transparent px-3 text-start text-sm text-foreground-de-emp hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-4';
|
|
76
80
|
const GRAPH_BODY_CLASS = 'flex flex-col overflow-clip rounded-b-[9px] bg-background-secondary future:bg-background';
|
|
77
81
|
const GRAPH_NEST_CLASS = 'ms-[22px] flex flex-col gap-3 pt-3 ps-6';
|
|
78
82
|
const GRAPH_BRANCH_CLASS = 'relative before:absolute before:-top-3 before:-bottom-3 before:-start-6 before:border-s before:border-border last:before:bottom-auto last:before:h-[29px] after:absolute after:top-[9px] after:-start-6 after:h-4 after:w-6 after:rounded-es-lg after:border-b after:border-s after:border-border';
|
|
79
|
-
const GRAPH_REFERENCE_CLASS = 'flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp';
|
|
83
|
+
const GRAPH_REFERENCE_CLASS = 'group/chapter flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp';
|
|
80
84
|
const GRAPH_REFERENCE_CHIP_CLASS = 'inline-flex h-6 cursor-pointer items-center gap-1 rounded-md border border-[color-mix(in_srgb,var(--sentence-output-hue)_35%,transparent)] bg-background px-2 align-middle text-xs font-medium text-[var(--sentence-output-hue)] hover:bg-[color-mix(in_srgb,var(--sentence-output-hue)_8%,var(--color-background))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
81
85
|
const GRAPH_OUTPUT_HUE_CLASS = '[--sentence-output-hue:var(--color-purple-600)] dark:[--sentence-output-hue:var(--color-purple-300)]';
|
|
82
86
|
const MINIMAP_FLOATING_CLASS = 'rounded-xl border border-border-subtle bg-surface-raised p-1 text-foreground shadow-lg backdrop-blur-sm';
|
|
83
87
|
const MINIMAP_TRIGGER_CLASS = 'h-8 gap-2 rounded-md px-3 text-sm font-medium text-foreground future:text-foreground hover:bg-muted data-[state=open]:bg-accent [&_svg]:size-4';
|
|
84
88
|
const MINIMAP_CONTENT_CLASS = 'flex max-h-[min(440px,var(--radix-popover-content-available-height))] w-[296px] flex-col overflow-hidden border-border-subtle bg-background p-0 shadow-lg';
|
|
85
89
|
const MINIMAP_ROW_CLASS = 'flex min-w-0 cursor-pointer items-center gap-1.5 rounded-[4px] pe-1.5 text-xs whitespace-nowrap text-foreground-de-emp select-none data-[selected]:bg-accent data-[selected]:text-foreground data-[current]:font-semibold data-[current]:text-primary';
|
|
90
|
+
exports.GRAPH_ADD_DECISION_CLASS = __webpack_exports__.GRAPH_ADD_DECISION_CLASS;
|
|
86
91
|
exports.GRAPH_BODY_CLASS = __webpack_exports__.GRAPH_BODY_CLASS;
|
|
87
92
|
exports.GRAPH_BRANCH_CLASS = __webpack_exports__.GRAPH_BRANCH_CLASS;
|
|
88
93
|
exports.GRAPH_CARD_CLASS = __webpack_exports__.GRAPH_CARD_CLASS;
|
|
@@ -94,6 +99,7 @@ exports.GRAPH_FRAME_CLASS = __webpack_exports__.GRAPH_FRAME_CLASS;
|
|
|
94
99
|
exports.GRAPH_HEADER_CLASS = __webpack_exports__.GRAPH_HEADER_CLASS;
|
|
95
100
|
exports.GRAPH_HIT_POLICY_CLASS = __webpack_exports__.GRAPH_HIT_POLICY_CLASS;
|
|
96
101
|
exports.GRAPH_MARK_BUTTON_CLASS = __webpack_exports__.GRAPH_MARK_BUTTON_CLASS;
|
|
102
|
+
exports.GRAPH_MENU_BUTTON_CLASS = __webpack_exports__.GRAPH_MENU_BUTTON_CLASS;
|
|
97
103
|
exports.GRAPH_MINIMAP_GAP_PX = __webpack_exports__.GRAPH_MINIMAP_GAP_PX;
|
|
98
104
|
exports.GRAPH_MINIMAP_SLOT_CLASS = __webpack_exports__.GRAPH_MINIMAP_SLOT_CLASS;
|
|
99
105
|
exports.GRAPH_NAME_CLASS = __webpack_exports__.GRAPH_NAME_CLASS;
|
|
@@ -111,6 +117,7 @@ exports.MINIMAP_ROW_CLASS = __webpack_exports__.MINIMAP_ROW_CLASS;
|
|
|
111
117
|
exports.MINIMAP_TRIGGER_CLASS = __webpack_exports__.MINIMAP_TRIGGER_CLASS;
|
|
112
118
|
exports.graphColumnInsetOf = __webpack_exports__.graphColumnInsetOf;
|
|
113
119
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
120
|
+
"GRAPH_ADD_DECISION_CLASS",
|
|
114
121
|
"GRAPH_BODY_CLASS",
|
|
115
122
|
"GRAPH_BRANCH_CLASS",
|
|
116
123
|
"GRAPH_CARD_CLASS",
|
|
@@ -122,6 +129,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
122
129
|
"GRAPH_HEADER_CLASS",
|
|
123
130
|
"GRAPH_HIT_POLICY_CLASS",
|
|
124
131
|
"GRAPH_MARK_BUTTON_CLASS",
|
|
132
|
+
"GRAPH_MENU_BUTTON_CLASS",
|
|
125
133
|
"GRAPH_MINIMAP_GAP_PX",
|
|
126
134
|
"GRAPH_MINIMAP_SLOT_CLASS",
|
|
127
135
|
"GRAPH_NAME_CLASS",
|
|
@@ -18,10 +18,12 @@ export declare const GRAPH_REVEAL_CLASS = "opacity-0 transition-opacity group-ho
|
|
|
18
18
|
export declare const GRAPH_HIT_POLICY_CLASS: string;
|
|
19
19
|
export declare const GRAPH_RULE_COUNT_CLASS: string;
|
|
20
20
|
export declare const GRAPH_MARK_BUTTON_CLASS = "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded border-0 bg-transparent p-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary";
|
|
21
|
+
export declare const GRAPH_MENU_BUTTON_CLASS: string;
|
|
22
|
+
export declare const GRAPH_ADD_DECISION_CLASS = "flex h-10 cursor-pointer items-center gap-2 rounded-[10px] border border-dashed border-border-de-emp bg-transparent px-3 text-start text-sm text-foreground-de-emp hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-4";
|
|
21
23
|
export declare const GRAPH_BODY_CLASS = "flex flex-col overflow-clip rounded-b-[9px] bg-background-secondary future:bg-background";
|
|
22
24
|
export declare const GRAPH_NEST_CLASS = "ms-[22px] flex flex-col gap-3 pt-3 ps-6";
|
|
23
25
|
export declare const GRAPH_BRANCH_CLASS = "relative before:absolute before:-top-3 before:-bottom-3 before:-start-6 before:border-s before:border-border last:before:bottom-auto last:before:h-[29px] after:absolute after:top-[9px] after:-start-6 after:h-4 after:w-6 after:rounded-es-lg after:border-b after:border-s after:border-border";
|
|
24
|
-
export declare const GRAPH_REFERENCE_CLASS = "flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp";
|
|
26
|
+
export declare const GRAPH_REFERENCE_CLASS = "group/chapter flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp";
|
|
25
27
|
export declare const GRAPH_REFERENCE_CHIP_CLASS = "inline-flex h-6 cursor-pointer items-center gap-1 rounded-md border border-[color-mix(in_srgb,var(--sentence-output-hue)_35%,transparent)] bg-background px-2 align-middle text-xs font-medium text-[var(--sentence-output-hue)] hover:bg-[color-mix(in_srgb,var(--sentence-output-hue)_8%,var(--color-background))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
26
28
|
export declare const GRAPH_OUTPUT_HUE_CLASS = "[--sentence-output-hue:var(--color-purple-600)] dark:[--sentence-output-hue:var(--color-purple-300)]";
|
|
27
29
|
export declare const MINIMAP_FLOATING_CLASS = "rounded-xl border border-border-subtle bg-surface-raised p-1 text-foreground shadow-lg backdrop-blur-sm";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionGraphStyles.d.ts","sourceRoot":"","sources":["../../src/decision-table/decisionGraphStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,uFACwD,CAAC;AAEvF,eAAO,MAAM,oBAAoB,8CAA8C,CAAC;AAEhF,eAAO,MAAM,kBAAkB,2DAA2D,CAAC;AAE3F,eAAO,MAAM,iBAAiB,iDAAiD,CAAC;AAEhF,eAAO,MAAM,wBAAwB,yCAAyC,CAAC;AAE/E,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MACkC,CAAC;AAE5F,eAAO,MAAM,gBAAgB,8HACgG,CAAC;AAE9H,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;A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AO,MAAM,uBAAuB,0LACqJ,CAAC;AAE1L,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,wRACkP,CAAC;AAExR,eAAO,MAAM,gBAAgB,6FAC+D,CAAC;AAE7F,eAAO,MAAM,gBAAgB,4CAA4C,CAAC;AAE1E,eAAO,MAAM,kBAAkB,sSACsQ,CAAC;AAEtS,eAAO,MAAM,qBAAqB,uJACoH,CAAC;AAEvJ,eAAO,MAAM,0BAA0B,iYACyV,CAAC;AAEjY,eAAO,MAAM,sBAAsB,yGACqE,CAAC;AAEzG,eAAO,MAAM,sBAAsB,4GACwE,CAAC;AAE5G,eAAO,MAAM,qBAAqB,mJACgH,CAAC;AAEnJ,eAAO,MAAM,qBAAqB,8JAC2H,CAAC;AAE9J,eAAO,MAAM,iBAAiB,0PAC2N,CAAC"}
|
|
@@ -19,14 +19,16 @@ const GRAPH_REVEAL_CLASS = 'opacity-0 transition-opacity group-hover/chapter:opa
|
|
|
19
19
|
const GRAPH_HIT_POLICY_CLASS = cn('shrink-0 text-xs text-foreground-de-emp', GRAPH_REVEAL_CLASS);
|
|
20
20
|
const GRAPH_RULE_COUNT_CLASS = cn('ms-auto shrink-0 text-xs text-foreground-de-emp', GRAPH_REVEAL_CLASS);
|
|
21
21
|
const GRAPH_MARK_BUTTON_CLASS = 'inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded border-0 bg-transparent p-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary';
|
|
22
|
+
const GRAPH_MENU_BUTTON_CLASS = cn('inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded border-0 bg-transparent p-0 text-foreground-de-emp hover:bg-background-hover focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-background-hover data-[state=open]:opacity-100 [@media(hover:none)]:opacity-100', GRAPH_REVEAL_CLASS);
|
|
23
|
+
const GRAPH_ADD_DECISION_CLASS = 'flex h-10 cursor-pointer items-center gap-2 rounded-[10px] border border-dashed border-border-de-emp bg-transparent px-3 text-start text-sm text-foreground-de-emp hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-4';
|
|
22
24
|
const GRAPH_BODY_CLASS = 'flex flex-col overflow-clip rounded-b-[9px] bg-background-secondary future:bg-background';
|
|
23
25
|
const GRAPH_NEST_CLASS = 'ms-[22px] flex flex-col gap-3 pt-3 ps-6';
|
|
24
26
|
const GRAPH_BRANCH_CLASS = 'relative before:absolute before:-top-3 before:-bottom-3 before:-start-6 before:border-s before:border-border last:before:bottom-auto last:before:h-[29px] after:absolute after:top-[9px] after:-start-6 after:h-4 after:w-6 after:rounded-es-lg after:border-b after:border-s after:border-border';
|
|
25
|
-
const GRAPH_REFERENCE_CLASS = 'flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp';
|
|
27
|
+
const GRAPH_REFERENCE_CLASS = 'group/chapter flex h-12 items-center gap-1.5 rounded-[10px] border border-dashed border-border bg-background px-3.5 text-xs text-foreground-de-emp';
|
|
26
28
|
const GRAPH_REFERENCE_CHIP_CLASS = 'inline-flex h-6 cursor-pointer items-center gap-1 rounded-md border border-[color-mix(in_srgb,var(--sentence-output-hue)_35%,transparent)] bg-background px-2 align-middle text-xs font-medium text-[var(--sentence-output-hue)] hover:bg-[color-mix(in_srgb,var(--sentence-output-hue)_8%,var(--color-background))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
27
29
|
const GRAPH_OUTPUT_HUE_CLASS = '[--sentence-output-hue:var(--color-purple-600)] dark:[--sentence-output-hue:var(--color-purple-300)]';
|
|
28
30
|
const MINIMAP_FLOATING_CLASS = 'rounded-xl border border-border-subtle bg-surface-raised p-1 text-foreground shadow-lg backdrop-blur-sm';
|
|
29
31
|
const MINIMAP_TRIGGER_CLASS = 'h-8 gap-2 rounded-md px-3 text-sm font-medium text-foreground future:text-foreground hover:bg-muted data-[state=open]:bg-accent [&_svg]:size-4';
|
|
30
32
|
const MINIMAP_CONTENT_CLASS = 'flex max-h-[min(440px,var(--radix-popover-content-available-height))] w-[296px] flex-col overflow-hidden border-border-subtle bg-background p-0 shadow-lg';
|
|
31
33
|
const MINIMAP_ROW_CLASS = 'flex min-w-0 cursor-pointer items-center gap-1.5 rounded-[4px] pe-1.5 text-xs whitespace-nowrap text-foreground-de-emp select-none data-[selected]:bg-accent data-[selected]:text-foreground data-[current]:font-semibold data-[current]:text-primary';
|
|
32
|
-
export { GRAPH_BODY_CLASS, GRAPH_BRANCH_CLASS, GRAPH_CARD_CLASS, GRAPH_CARD_COLLAPSED_CLASS, GRAPH_CARD_TONE_CLASS, GRAPH_COLUMN_CLASS, GRAPH_EMPTY_CLASS, GRAPH_FRAME_CLASS, GRAPH_HEADER_CLASS, GRAPH_HIT_POLICY_CLASS, GRAPH_MARK_BUTTON_CLASS, GRAPH_MINIMAP_GAP_PX, GRAPH_MINIMAP_SLOT_CLASS, GRAPH_NAME_CLASS, GRAPH_NEST_CLASS, GRAPH_OUTPUT_HUE_CLASS, GRAPH_REFERENCE_CHIP_CLASS, GRAPH_REFERENCE_CLASS, GRAPH_REVEAL_CLASS, GRAPH_RULE_COUNT_CLASS, GRAPH_SCROLLER_CLASS, GRAPH_TOGGLE_CLASS, MINIMAP_CONTENT_CLASS, MINIMAP_FLOATING_CLASS, MINIMAP_ROW_CLASS, MINIMAP_TRIGGER_CLASS, graphColumnInsetOf };
|
|
34
|
+
export { GRAPH_ADD_DECISION_CLASS, GRAPH_BODY_CLASS, GRAPH_BRANCH_CLASS, GRAPH_CARD_CLASS, GRAPH_CARD_COLLAPSED_CLASS, GRAPH_CARD_TONE_CLASS, GRAPH_COLUMN_CLASS, GRAPH_EMPTY_CLASS, GRAPH_FRAME_CLASS, GRAPH_HEADER_CLASS, GRAPH_HIT_POLICY_CLASS, GRAPH_MARK_BUTTON_CLASS, GRAPH_MENU_BUTTON_CLASS, GRAPH_MINIMAP_GAP_PX, GRAPH_MINIMAP_SLOT_CLASS, GRAPH_NAME_CLASS, GRAPH_NEST_CLASS, GRAPH_OUTPUT_HUE_CLASS, GRAPH_REFERENCE_CHIP_CLASS, GRAPH_REFERENCE_CLASS, GRAPH_REVEAL_CLASS, GRAPH_RULE_COUNT_CLASS, GRAPH_SCROLLER_CLASS, GRAPH_TOGGLE_CLASS, MINIMAP_CONTENT_CLASS, MINIMAP_FLOATING_CLASS, MINIMAP_ROW_CLASS, MINIMAP_TRIGGER_CLASS, graphColumnInsetOf };
|
|
@@ -2,14 +2,16 @@ import type { BandLabels } from './bandColumns';
|
|
|
2
2
|
import type { ColumnEdit, ColumnPopoverLabels } from './ColumnPopover';
|
|
3
3
|
import type { DiffLabels } from './decisionTextDiff';
|
|
4
4
|
import type { CellCommitMove } from './gridTypes';
|
|
5
|
+
import type { HitPolicyLabels } from './hitPolicyMenu';
|
|
5
6
|
import type { RefusalContext } from './hostValues';
|
|
6
7
|
import type { RuleCardEditLabels } from './RuleCard';
|
|
7
8
|
import type { RuleCardLabels } from './ruleCardModel';
|
|
8
9
|
import type { RuleMenuActions, RuleMenuLabels } from './ruleMenuEntries';
|
|
9
10
|
import type { SentenceCellId, SentenceValueId } from './sentenceTypes';
|
|
11
|
+
import type { TextAnnouncementLabels } from './useTextAnnouncements';
|
|
10
12
|
import type { ValuePopoverLabels, ValuePopoverProps } from './ValuePopover';
|
|
11
13
|
import type { ValueCommit, ValueFieldData } from './valueTypes';
|
|
12
|
-
export interface DecisionTextLabels extends RuleCardLabels, BandLabels, DiffLabels {
|
|
14
|
+
export interface DecisionTextLabels extends RuleCardLabels, BandLabels, DiffLabels, HitPolicyLabels, TextAnnouncementLabels {
|
|
13
15
|
emptyRules: string;
|
|
14
16
|
addRule: string;
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionTextTypes.d.ts","sourceRoot":"","sources":["../../src/decision-table/decisionTextTypes.ts"],"names":[],"mapp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AC,CAAC;IAEjD,MAAM,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAE1B,WAAW,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,GAAG,IAAI,CAAC;IAEtD,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,KAAK,MAAM,CAAC;CACpE;AAGD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC;AAGjG,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC7C,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC,CAAC,GAAG;IACjE,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC"}
|
|
@@ -92,18 +92,12 @@ const policyLabelOf = (catalog, policy)=>{
|
|
|
92
92
|
const own = entries.find((entry)=>'policy' === entry.kind && entry.policy === policy);
|
|
93
93
|
return own?.label ?? entries.find((entry)=>entry.policy === policy)?.label ?? '';
|
|
94
94
|
};
|
|
95
|
-
const policyNameOf = (catalog, pick,
|
|
95
|
+
const policyNameOf = (catalog, pick, labels)=>{
|
|
96
96
|
const placed = placedOf(catalog, pick);
|
|
97
97
|
const policy = void 0 === placed ? '' : 'total' === pick.kind ? `${policyLabelOf(catalog, pick.policy)} · ${placed.label}` : placed.label;
|
|
98
|
-
return
|
|
99
|
-
id: 'decision-text.hit_policy_name',
|
|
100
|
-
message: 'Hit policy: {policy}',
|
|
101
|
-
values: {
|
|
102
|
-
policy
|
|
103
|
-
}
|
|
104
|
-
});
|
|
98
|
+
return labels.policyName(policy);
|
|
105
99
|
};
|
|
106
|
-
const policyMenuOf = (catalog, pick, onChange,
|
|
100
|
+
const policyMenuOf = (catalog, pick, onChange, labels)=>{
|
|
107
101
|
const placed = placedPicksOf(catalog);
|
|
108
102
|
const byKey = new Map(placed.map((candidate)=>[
|
|
109
103
|
candidate.key,
|
|
@@ -131,7 +125,7 @@ const policyMenuOf = (catalog, pick, onChange, _)=>{
|
|
|
131
125
|
};
|
|
132
126
|
return {
|
|
133
127
|
value: placedOf(catalog, pick)?.key ?? '',
|
|
134
|
-
label: policyNameOf(catalog, pick,
|
|
128
|
+
label: policyNameOf(catalog, pick, labels),
|
|
135
129
|
onChange: (value)=>{
|
|
136
130
|
const picked = byKey.get(value);
|
|
137
131
|
if (picked) onChange(picked.pick);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { PolicyPickerProps } from './PolicyPicker';
|
|
2
|
-
|
|
2
|
+
export interface HitPolicyLabels {
|
|
3
|
+
policyName: (policy: string) => string;
|
|
4
|
+
}
|
|
3
5
|
export type HitPolicyPick<Policy, Total> = {
|
|
4
6
|
kind: 'policy';
|
|
5
7
|
policy: Policy;
|
|
@@ -43,6 +45,6 @@ export declare const policyHeaderOf: <Policy, Total>(catalog: HitPolicyCatalog<P
|
|
|
43
45
|
label: string;
|
|
44
46
|
hint: string;
|
|
45
47
|
};
|
|
46
|
-
export declare const policyNameOf: <Policy, Total>(catalog: HitPolicyCatalog<Policy, Total>, pick: HitPolicyPick<Policy, Total>,
|
|
47
|
-
export declare const policyMenuOf: <Policy, Total>(catalog: HitPolicyCatalog<Policy, Total>, pick: HitPolicyPick<Policy, Total>, onChange: (picked: HitPolicyPick<Policy, Total>) => void,
|
|
48
|
+
export declare const policyNameOf: <Policy, Total>(catalog: HitPolicyCatalog<Policy, Total>, pick: HitPolicyPick<Policy, Total>, labels: HitPolicyLabels) => string;
|
|
49
|
+
export declare const policyMenuOf: <Policy, Total>(catalog: HitPolicyCatalog<Policy, Total>, pick: HitPolicyPick<Policy, Total>, onChange: (picked: HitPolicyPick<Policy, Total>) => void, labels: HitPolicyLabels) => Omit<PolicyPickerProps, "dataTestId" | "describedBy">;
|
|
48
50
|
//# sourceMappingURL=hitPolicyMenu.d.ts.map
|