@umodeapporg/ui 0.23.1 → 0.24.1

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 (57) hide show
  1. package/dist/assets/umode-ui.css +100 -0
  2. package/dist/components/UI/Flow/FlowBlockNode.d.ts +35 -0
  3. package/dist/components/UI/Flow/FlowBlockNode.js +84 -0
  4. package/dist/components/UI/Flow/FlowBlockNode.js.map +1 -0
  5. package/dist/components/UI/Flow/FlowCanvas.d.ts +21 -0
  6. package/dist/components/UI/Flow/FlowCanvas.js +252 -0
  7. package/dist/components/UI/Flow/FlowCanvas.js.map +1 -0
  8. package/dist/components/UI/Flow/FlowConnectionEdge.d.ts +18 -0
  9. package/dist/components/UI/Flow/FlowConnectionEdge.js +115 -0
  10. package/dist/components/UI/Flow/FlowConnectionEdge.js.map +1 -0
  11. package/dist/components/UI/Flow/FlowEditorProvider.d.ts +17 -0
  12. package/dist/components/UI/Flow/FlowEditorProvider.js +27 -0
  13. package/dist/components/UI/Flow/FlowEditorProvider.js.map +1 -0
  14. package/dist/components/UI/Flow/FlowInspector.d.ts +11 -0
  15. package/dist/components/UI/Flow/FlowInspector.js +127 -0
  16. package/dist/components/UI/Flow/FlowInspector.js.map +1 -0
  17. package/dist/components/UI/Flow/FlowIssueList.d.ts +8 -0
  18. package/dist/components/UI/Flow/FlowIssueList.js +55 -0
  19. package/dist/components/UI/Flow/FlowIssueList.js.map +1 -0
  20. package/dist/components/UI/Flow/FlowLaneMap.d.ts +30 -0
  21. package/dist/components/UI/Flow/FlowLaneMap.js +206 -0
  22. package/dist/components/UI/Flow/FlowLaneMap.js.map +1 -0
  23. package/dist/components/UI/Flow/FlowNodeShell.d.ts +20 -0
  24. package/dist/components/UI/Flow/FlowNodeShell.js +81 -0
  25. package/dist/components/UI/Flow/FlowNodeShell.js.map +1 -0
  26. package/dist/components/UI/Flow/FlowResizablePanel.d.ts +20 -0
  27. package/dist/components/UI/Flow/FlowResizablePanel.js +117 -0
  28. package/dist/components/UI/Flow/FlowResizablePanel.js.map +1 -0
  29. package/dist/components/UI/Flow/FlowZoomControls.d.ts +12 -0
  30. package/dist/components/UI/Flow/FlowZoomControls.js +53 -0
  31. package/dist/components/UI/Flow/FlowZoomControls.js.map +1 -0
  32. package/dist/components/UI/Flow/flowBlockRegistry.d.ts +12 -0
  33. package/dist/components/UI/Flow/flowBlockRegistry.js +20 -0
  34. package/dist/components/UI/Flow/flowBlockRegistry.js.map +1 -0
  35. package/dist/components/UI/Flow/flowEditorStore.d.ts +49 -0
  36. package/dist/components/UI/Flow/flowEditorStore.js +302 -0
  37. package/dist/components/UI/Flow/flowEditorStore.js.map +1 -0
  38. package/dist/components/UI/Flow/flowGraph.d.ts +32 -0
  39. package/dist/components/UI/Flow/flowGraph.js +157 -0
  40. package/dist/components/UI/Flow/flowGraph.js.map +1 -0
  41. package/dist/components/UI/Flow/flowTypes.d.ts +74 -0
  42. package/dist/components/UI/Flow/flowTypes.js +2 -0
  43. package/dist/components/UI/Flow/flowTypes.js.map +1 -0
  44. package/dist/components/UI/Flow/index.d.ts +12 -0
  45. package/dist/components/UI/Flow/index.js +40 -0
  46. package/dist/components/UI/Flow/index.js.map +1 -0
  47. package/dist/components/UI/Flow/useFlowLabels.d.ts +10 -0
  48. package/dist/components/UI/Flow/useFlowLabels.js +51 -0
  49. package/dist/components/UI/Flow/useFlowLabels.js.map +1 -0
  50. package/dist/locales/en/ui.json.d.ts +64 -0
  51. package/dist/locales/en/ui.json.js +3 -0
  52. package/dist/locales/en/ui.json.js.map +1 -1
  53. package/dist/locales/index.d.ts +128 -0
  54. package/dist/locales/pt/ui.json.d.ts +64 -0
  55. package/dist/locales/pt/ui.json.js +3 -0
  56. package/dist/locales/pt/ui.json.js.map +1 -1
  57. package/package.json +10 -1
@@ -0,0 +1,74 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { SymbolCodepoints } from '../MaterialSymbol';
3
+ export type TFlowPortId = 'next' | 'true' | 'false' | 'error';
4
+ export type TFlowBlockCategory = 'trigger' | 'condition' | 'action';
5
+ export interface IFlowPosition {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ export interface IFlowNode<TConfig = unknown> {
10
+ nodeId: string;
11
+ type: string;
12
+ typeVersion: number;
13
+ config: TConfig;
14
+ position: IFlowPosition;
15
+ label?: string;
16
+ disabled?: boolean;
17
+ }
18
+ export interface IFlowEdge {
19
+ edgeId: string;
20
+ source: string;
21
+ sourcePort: TFlowPortId;
22
+ target: string;
23
+ }
24
+ export interface IFlowGraph {
25
+ nodes: Array<IFlowNode>;
26
+ edges: Array<IFlowEdge>;
27
+ }
28
+ export type TFlowIssueSeverity = 'error' | 'warning';
29
+ export type TFlowGraphIssueCode = 'missingTrigger' | 'multipleTriggers' | 'unknownBlock' | 'unreachableNode' | 'multipleInputs' | 'portFanOut' | 'cycle' | 'missingTrueBranch';
30
+ export interface IFlowIssue {
31
+ /** A graph rule from `TFlowGraphIssueCode`, or a block-specific code from its `validate`. */
32
+ code: string;
33
+ severity: TFlowIssueSeverity;
34
+ /** Already translated by the block. Graph issues leave it empty and the UI names them. */
35
+ message?: string;
36
+ nodeId?: string;
37
+ edgeId?: string;
38
+ }
39
+ export type TFlowRunStepStatus = 'passed' | 'failed' | 'skipped' | 'wouldRun' | 'error' | 'blocked';
40
+ /** The result of one run (real or simulated) painted over the canvas. */
41
+ export interface IFlowRunOverlay {
42
+ steps: Record<string, TFlowRunStepStatus>;
43
+ traversedEdgeIds: Array<string>;
44
+ }
45
+ export interface IFlowBlockConfigPanelProps<TConfig> {
46
+ config: TConfig;
47
+ onChange: (next: TConfig) => void;
48
+ readOnly?: boolean;
49
+ }
50
+ export type TFlowBlockIssue = Omit<IFlowIssue, 'nodeId' | 'edgeId'>;
51
+ export interface IFlowBlockDefinition<TConfig = unknown> {
52
+ /** Namespaced and stable: `trigger.recordEvent`, `action.moveWorkflowCard`. */
53
+ type: string;
54
+ typeVersion: number;
55
+ category: TFlowBlockCategory;
56
+ icon: SymbolCodepoints;
57
+ /** Translated by the host. */
58
+ label: string;
59
+ outputs: Array<TFlowPortId>;
60
+ /** Ports that depend on the config, e.g. an error path the user turns on inside the block. Defaults to `outputs`. */
61
+ resolveOutputs?: (config: TConfig) => Array<TFlowPortId>;
62
+ /** How many of this block a flow may hold; omit for no limit. */
63
+ maxInstances?: number;
64
+ /** `false` keeps the block on the canvas: Delete and the inspector skip it. Defaults to `true`. */
65
+ removable?: boolean;
66
+ createDefaultConfig: () => TConfig;
67
+ ConfigPanel: ComponentType<IFlowBlockConfigPanelProps<TConfig>>;
68
+ /** When one block stands for several kinds (chosen inside it), the icon and name of the chosen kind. */
69
+ resolveIcon?: (config: TConfig) => SymbolCodepoints | undefined;
70
+ resolveLabel?: (config: TConfig) => string | undefined;
71
+ /** One line inside the block on the canvas. */
72
+ renderSummary: (config: TConfig) => ReactNode;
73
+ validate: (config: TConfig) => Array<TFlowBlockIssue>;
74
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=flowTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowTypes.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export { createFlowBlockRegistry, defineFlowBlock, flowOutputsOf, type IFlowBlockRegistry } from './flowBlockRegistry';
2
+ export { default as FlowCanvas, type IFlowCanvasProps } from './FlowCanvas';
3
+ export { default as FlowEditorProvider, useFlowBlockRegistry, useFlowEditor, useFlowEditorStore, } from './FlowEditorProvider';
4
+ export { createFlowEditorStore, type IFlowEditorState, type TFlowEditorStore } from './flowEditorStore';
5
+ export { canConnect, findCycle, FLOW_LEVEL_GAP, FLOW_SIBLING_GAP, hasBlockingIssues, isFlowNodeRemovable, layoutFlowByLevels, reachableFrom, triggerNodesOf, validateFlowGraph, } from './flowGraph';
6
+ export { default as FlowInspector } from './FlowInspector';
7
+ export { default as FlowIssueList } from './FlowIssueList';
8
+ export { default as FlowLaneMap, type IFlowArc, type IFlowLane, type TFlowArcTone } from './FlowLaneMap';
9
+ export { default as FlowNodeShell, type IFlowNodeShellProps } from './FlowNodeShell';
10
+ export { default as FlowResizablePanel, type IFlowResizablePanelProps } from './FlowResizablePanel';
11
+ export type * from './flowTypes';
12
+ export { FLOW_RUN_STATUS_TONE, useFlowLabels } from './useFlowLabels';
@@ -0,0 +1,40 @@
1
+ import { createFlowBlockRegistry, defineFlowBlock, flowOutputsOf } from "./flowBlockRegistry.js";
2
+ import { default as default2 } from "./FlowCanvas.js";
3
+ import { default as default3, useFlowBlockRegistry, useFlowEditor, useFlowEditorStore } from "./FlowEditorProvider.js";
4
+ import { createFlowEditorStore } from "./flowEditorStore.js";
5
+ import { FLOW_LEVEL_GAP, FLOW_SIBLING_GAP, canConnect, findCycle, hasBlockingIssues, isFlowNodeRemovable, layoutFlowByLevels, reachableFrom, triggerNodesOf, validateFlowGraph } from "./flowGraph.js";
6
+ import { default as default4 } from "./FlowInspector.js";
7
+ import { default as default5 } from "./FlowIssueList.js";
8
+ import { default as default6 } from "./FlowLaneMap.js";
9
+ import { default as default7 } from "./FlowNodeShell.js";
10
+ import { default as default8 } from "./FlowResizablePanel.js";
11
+ import { FLOW_RUN_STATUS_TONE, useFlowLabels } from "./useFlowLabels.js";
12
+ export {
13
+ FLOW_LEVEL_GAP,
14
+ FLOW_RUN_STATUS_TONE,
15
+ FLOW_SIBLING_GAP,
16
+ default2 as FlowCanvas,
17
+ default3 as FlowEditorProvider,
18
+ default4 as FlowInspector,
19
+ default5 as FlowIssueList,
20
+ default6 as FlowLaneMap,
21
+ default7 as FlowNodeShell,
22
+ default8 as FlowResizablePanel,
23
+ canConnect,
24
+ createFlowBlockRegistry,
25
+ createFlowEditorStore,
26
+ defineFlowBlock,
27
+ findCycle,
28
+ flowOutputsOf,
29
+ hasBlockingIssues,
30
+ isFlowNodeRemovable,
31
+ layoutFlowByLevels,
32
+ reachableFrom,
33
+ triggerNodesOf,
34
+ useFlowBlockRegistry,
35
+ useFlowEditor,
36
+ useFlowEditorStore,
37
+ useFlowLabels,
38
+ validateFlowGraph
39
+ };
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ import { TChipTone } from '../Chips/chipTones';
2
+ import { IFlowIssue, TFlowBlockCategory, TFlowPortId, TFlowRunStepStatus } from './flowTypes';
3
+ export declare const FLOW_RUN_STATUS_TONE: Record<TFlowRunStepStatus, TChipTone>;
4
+ /** Every label the flow UI shows, spelled as literal keys so the translation tooling can read them. */
5
+ export declare const useFlowLabels: () => {
6
+ ports: Record<TFlowPortId, string>;
7
+ categories: Record<TFlowBlockCategory, string>;
8
+ runStatus: Record<TFlowRunStepStatus, string>;
9
+ issueMessage: (issue: IFlowIssue) => string;
10
+ };
@@ -0,0 +1,51 @@
1
+ import { useMemo } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ const FLOW_RUN_STATUS_TONE = {
4
+ passed: "success",
5
+ wouldRun: "info",
6
+ skipped: "neutral",
7
+ blocked: "warning",
8
+ failed: "danger",
9
+ error: "danger"
10
+ };
11
+ const useFlowLabels = () => {
12
+ const { t } = useTranslation("ui");
13
+ return useMemo(() => {
14
+ const ports = {
15
+ next: t("flow.ports.next"),
16
+ true: t("flow.ports.true"),
17
+ false: t("flow.ports.false"),
18
+ error: t("flow.ports.error")
19
+ };
20
+ const categories = {
21
+ trigger: t("flow.categories.trigger"),
22
+ condition: t("flow.categories.condition"),
23
+ action: t("flow.categories.action")
24
+ };
25
+ const runStatus = {
26
+ passed: t("flow.run.passed"),
27
+ failed: t("flow.run.failed"),
28
+ skipped: t("flow.run.skipped"),
29
+ wouldRun: t("flow.run.wouldRun"),
30
+ error: t("flow.run.error"),
31
+ blocked: t("flow.run.blocked")
32
+ };
33
+ const graphIssues = {
34
+ missingTrigger: t("flow.issues.missingTrigger"),
35
+ multipleTriggers: t("flow.issues.multipleTriggers"),
36
+ unknownBlock: t("flow.issues.unknownBlock"),
37
+ unreachableNode: t("flow.issues.unreachableNode"),
38
+ multipleInputs: t("flow.issues.multipleInputs"),
39
+ portFanOut: t("flow.issues.portFanOut"),
40
+ cycle: t("flow.issues.cycle"),
41
+ missingTrueBranch: t("flow.issues.missingTrueBranch")
42
+ };
43
+ const issueMessage = (issue) => issue.message ?? graphIssues[issue.code] ?? issue.code;
44
+ return { ports, categories, runStatus, issueMessage };
45
+ }, [t]);
46
+ };
47
+ export {
48
+ FLOW_RUN_STATUS_TONE,
49
+ useFlowLabels
50
+ };
51
+ //# sourceMappingURL=useFlowLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFlowLabels.js","sources":["../../../../src/components/UI/Flow/useFlowLabels.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { TChipTone } from '@/components/UI/Chips/chipTones';\n\nimport type { IFlowIssue, TFlowBlockCategory, TFlowGraphIssueCode, TFlowPortId, TFlowRunStepStatus } from './flowTypes';\n\nexport const FLOW_RUN_STATUS_TONE: Record<TFlowRunStepStatus, TChipTone> = {\n passed: 'success',\n wouldRun: 'info',\n skipped: 'neutral',\n blocked: 'warning',\n failed: 'danger',\n error: 'danger',\n};\n\n/** Every label the flow UI shows, spelled as literal keys so the translation tooling can read them. */\nexport const useFlowLabels = () => {\n const { t } = useTranslation('ui');\n\n return useMemo(() => {\n const ports: Record<TFlowPortId, string> = {\n next: t('flow.ports.next'),\n true: t('flow.ports.true'),\n false: t('flow.ports.false'),\n error: t('flow.ports.error'),\n };\n const categories: Record<TFlowBlockCategory, string> = {\n trigger: t('flow.categories.trigger'),\n condition: t('flow.categories.condition'),\n action: t('flow.categories.action'),\n };\n const runStatus: Record<TFlowRunStepStatus, string> = {\n passed: t('flow.run.passed'),\n failed: t('flow.run.failed'),\n skipped: t('flow.run.skipped'),\n wouldRun: t('flow.run.wouldRun'),\n error: t('flow.run.error'),\n blocked: t('flow.run.blocked'),\n };\n const graphIssues: Record<TFlowGraphIssueCode, string> = {\n missingTrigger: t('flow.issues.missingTrigger'),\n multipleTriggers: t('flow.issues.multipleTriggers'),\n unknownBlock: t('flow.issues.unknownBlock'),\n unreachableNode: t('flow.issues.unreachableNode'),\n multipleInputs: t('flow.issues.multipleInputs'),\n portFanOut: t('flow.issues.portFanOut'),\n cycle: t('flow.issues.cycle'),\n missingTrueBranch: t('flow.issues.missingTrueBranch'),\n };\n const issueMessage = (issue: IFlowIssue): string =>\n issue.message ?? graphIssues[issue.code as TFlowGraphIssueCode] ?? issue.code;\n\n return { ports, categories, runStatus, issueMessage };\n }, [t]);\n};\n"],"names":[],"mappings":";;AAOO,MAAM,uBAA8D;AAAA,EACzE,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AACT;AAGO,MAAM,gBAAgB,MAAM;AACjC,QAAM,EAAE,EAAA,IAAM,eAAe,IAAI;AAEjC,SAAO,QAAQ,MAAM;AACnB,UAAM,QAAqC;AAAA,MACzC,MAAM,EAAE,iBAAiB;AAAA,MACzB,MAAM,EAAE,iBAAiB;AAAA,MACzB,OAAO,EAAE,kBAAkB;AAAA,MAC3B,OAAO,EAAE,kBAAkB;AAAA,IAAA;AAE7B,UAAM,aAAiD;AAAA,MACrD,SAAS,EAAE,yBAAyB;AAAA,MACpC,WAAW,EAAE,2BAA2B;AAAA,MACxC,QAAQ,EAAE,wBAAwB;AAAA,IAAA;AAEpC,UAAM,YAAgD;AAAA,MACpD,QAAQ,EAAE,iBAAiB;AAAA,MAC3B,QAAQ,EAAE,iBAAiB;AAAA,MAC3B,SAAS,EAAE,kBAAkB;AAAA,MAC7B,UAAU,EAAE,mBAAmB;AAAA,MAC/B,OAAO,EAAE,gBAAgB;AAAA,MACzB,SAAS,EAAE,kBAAkB;AAAA,IAAA;AAE/B,UAAM,cAAmD;AAAA,MACvD,gBAAgB,EAAE,4BAA4B;AAAA,MAC9C,kBAAkB,EAAE,8BAA8B;AAAA,MAClD,cAAc,EAAE,0BAA0B;AAAA,MAC1C,iBAAiB,EAAE,6BAA6B;AAAA,MAChD,gBAAgB,EAAE,4BAA4B;AAAA,MAC9C,YAAY,EAAE,wBAAwB;AAAA,MACtC,OAAO,EAAE,mBAAmB;AAAA,MAC5B,mBAAmB,EAAE,+BAA+B;AAAA,IAAA;AAEtD,UAAM,eAAe,CAAC,UACpB,MAAM,WAAW,YAAY,MAAM,IAA2B,KAAK,MAAM;AAE3E,WAAO,EAAE,OAAO,YAAY,WAAW,aAAA;AAAA,EACzC,GAAG,CAAC,CAAC,CAAC;AACR;"}
@@ -216,6 +216,70 @@ declare const _default: {
216
216
  "keepEditing": "Keep editing",
217
217
  "discard": "Discard"
218
218
  },
219
+ "flow": {
220
+ "canvas": "Flow editor",
221
+ "resizePanel": "Drag to adjust the width. Double click resets",
222
+ "ports": {
223
+ "next": "Next",
224
+ "true": "Yes",
225
+ "false": "No",
226
+ "error": "Error"
227
+ },
228
+ "categories": {
229
+ "trigger": "Triggers",
230
+ "condition": "Conditions",
231
+ "action": "Actions"
232
+ },
233
+ "inspector": {
234
+ "title": "Block settings",
235
+ "empty": "Select a block to configure it",
236
+ "label": "Block name",
237
+ "delete": "Delete block",
238
+ "duplicate": "Duplicate block",
239
+ "unknownBlock": "This block type no longer exists",
240
+ "close": "Close"
241
+ },
242
+ "issues": {
243
+ "title": "Issues",
244
+ "none": "No issues",
245
+ "missingTrigger": "The flow needs a trigger",
246
+ "multipleTriggers": "A flow can have only one trigger",
247
+ "unknownBlock": "Block of a type that no longer exists",
248
+ "unreachableNode": "Loose block: no path from the trigger reaches it",
249
+ "multipleInputs": "Block with more than one input",
250
+ "portFanOut": "An output can connect to one block only",
251
+ "cycle": "The blocks form a cycle",
252
+ "missingTrueBranch": "The condition has no yes path"
253
+ },
254
+ "run": {
255
+ "passed": "Passed",
256
+ "failed": "Did not pass",
257
+ "skipped": "Skipped",
258
+ "wouldRun": "Would run",
259
+ "error": "Error",
260
+ "blocked": "Blocked"
261
+ },
262
+ "controls": {
263
+ "zoomIn": "Zoom in",
264
+ "zoomOut": "Zoom out",
265
+ "fitView": "Fit view",
266
+ "undo": "Undo",
267
+ "redo": "Redo",
268
+ "layout": "Arrange blocks"
269
+ },
270
+ "edge": {
271
+ "insertBlock": "Insert a block here"
272
+ },
273
+ "node": {
274
+ "disabled": "Disabled",
275
+ "addBlock": "Add the next block",
276
+ "issueCount_one": "{{count}} issue",
277
+ "issueCount_other": "{{count}} issues"
278
+ },
279
+ "laneMap": {
280
+ "label": "Flow map"
281
+ }
282
+ },
219
283
  "followUp": {
220
284
  "messages": "Messages",
221
285
  "chat": {
@@ -12,6 +12,7 @@ const detailsTable = { "size": "Size", "quantity": "Qty" };
12
12
  const errorPage = { "message": "This screen could not load", "headline": "Something unexpected happened while building the page. Refreshing usually fixes it. If it happens again, contact support and tell them what you were doing.", "backToStart": "Back to start" };
13
13
  const filters = { "activeFilters": "Applied filters", "appliedCount_one": "{{count}} filter applied", "appliedCount_other": "{{count}} filters applied", "clearAll": "Clear all", "noFields": "No filters available for this list.", "noOptions": "No options found.", "optionsError": "Could not load the options for {{field}}.", "rangeMax": "Maximum", "rangeMin": "Minimum", "rangeSeparator": "to", "searchOptions": "Search options" };
14
14
  const filtersDrawer = { "selectedFilters": "Selected filters:", "pendingChanges": "Pending changes", "discardChangesTitle": "Discard changes?", "discardChangesMessage": "You have unapplied filter changes. Discard them?", "keepEditing": "Keep editing", "discard": "Discard" };
15
+ const flow = { "canvas": "Flow editor", "resizePanel": "Drag to adjust the width. Double click resets", "ports": { "next": "Next", "true": "Yes", "false": "No", "error": "Error" }, "categories": { "trigger": "Triggers", "condition": "Conditions", "action": "Actions" }, "inspector": { "title": "Block settings", "empty": "Select a block to configure it", "label": "Block name", "delete": "Delete block", "duplicate": "Duplicate block", "unknownBlock": "This block type no longer exists", "close": "Close" }, "issues": { "title": "Issues", "none": "No issues", "missingTrigger": "The flow needs a trigger", "multipleTriggers": "A flow can have only one trigger", "unknownBlock": "Block of a type that no longer exists", "unreachableNode": "Loose block: no path from the trigger reaches it", "multipleInputs": "Block with more than one input", "portFanOut": "An output can connect to one block only", "cycle": "The blocks form a cycle", "missingTrueBranch": "The condition has no yes path" }, "run": { "passed": "Passed", "failed": "Did not pass", "skipped": "Skipped", "wouldRun": "Would run", "error": "Error", "blocked": "Blocked" }, "controls": { "zoomIn": "Zoom in", "zoomOut": "Zoom out", "fitView": "Fit view", "undo": "Undo", "redo": "Redo", "layout": "Arrange blocks" }, "edge": { "insertBlock": "Insert a block here" }, "node": { "disabled": "Disabled", "addBlock": "Add the next block", "issueCount_one": "{{count}} issue", "issueCount_other": "{{count}} issues" }, "laneMap": { "label": "Flow map" } };
15
16
  const followUp = { "messages": "Messages", "chat": { "loadingMessages": "Loading messages", "placeholder": "Write a message...", "invalidMessage": "Please enter a valid message", "noMessagesYet": "No messages yet", "startConversation": "Start a conversation by adding the first message", "loadError": "Messages could not be loaded", "sendFailed": "The message could not be sent. Try again.", "sendFailedInline": "Failed to send", "resend": "Resend", "discard": "Discard", "today": "Today", "yesterday": "Yesterday", "typingOne": "{{name}} is typing...", "typingMany": "{{count}} people are typing...", "someone": "Someone", "you": "You", "newMessages": "New messages", "backToLatest": "Back to latest", "deletedMessage": "Message deleted", "edited": "edited", "readBy": "Read by {{names}}", "copied": "Message copied", "replyingTo": "Replying to {{name}}", "attachmentFallback": "Attachment", "editTitle": "Edit message", "deleteTitle": "Delete message?", "deleteSubtitle": "The message will be shown as deleted for every participant", "sendHint": "Enter sends, Shift+Enter adds a line break", "formatting": "Formatting" }, "actions": { "reply": "Reply", "copy": "Copy text", "edit": "Edit", "delete": "Delete" }, "attachments": { "attach": "Attach", "pickFile": "File", "pickImage": "Image", "takePhoto": "Take photo", "dropHere": "Drop files to attach", "tooMany": "Limit of {{max}} attachments per message", "tooLarge": "The file {{name}} exceeds the 50 MB limit", "uploadFailed": "Upload failed", "uploading": "Uploading attachments...", "imagePreview": "Preview image", "showTranscript": "Show transcript", "hideTranscript": "Hide transcript" }, "voice": { "record": "Record audio", "recording": "Recording", "stop": "Finish recording", "cancel": "Cancel recording", "rerecord": "Record again", "attach": "Add to message", "discard": "Discard", "transcriptLabel": "Transcript", "transcriptPlaceholder": "The speech transcript appears here and can be edited" }, "camera": { "title": "Take photo", "unavailable": "Camera unavailable", "unavailableHint": "Check the browser camera permission", "switch": "Switch camera", "capture": "Capture photo" }, "search": { "open": "Search in conversation", "placeholder": "Search messages", "noResults": "No messages found", "error": "Messages could not be searched" } };
16
17
  const generatedByAI = { "tooltip": "Generated by AI" };
17
18
  const imageAiAdjust = { "action": "Adjust with AI", "title": "Adjust image with AI", "subtitle": "Describe the adjustment. The AI changes only what you ask and preserves the rest of the image.", "original": "Original", "result": "Result", "resultHint": "Describe the adjustment and click Generate to see the result here.", "promptLabel": "Desired adjustment", "promptPlaceholder": "E.g. remove the background and make it white, smooth the sleeve creases, brighten the lighting", "generate": "Generate", "generating": "Generating the image...", "tryAgain": "Generate another", "useResult": "Use this image", "errorGenerate": "Could not adjust the image with AI", "errorSave": "Could not save the adjusted image", "errorRefused": "The AI could not make this adjustment: {{reason}}", "mask": { "start": "Mark the area", "stop": "Use the whole image", "hint": "Paint the area the AI may change. The rest of the image is kept." }, "verification": { "changedMoreThanRequested": "The AI changed more than requested. Check the areas outside the adjustment before using it.", "colorMismatch": "The garment color ({{dominant}}) differs from the requested color ({{target}})." } };
@@ -50,6 +51,7 @@ const en = {
50
51
  errorPage,
51
52
  filters,
52
53
  filtersDrawer,
54
+ flow,
53
55
  followUp,
54
56
  generatedByAI,
55
57
  imageAiAdjust,
@@ -90,6 +92,7 @@ export {
90
92
  errorPage,
91
93
  filters,
92
94
  filtersDrawer,
95
+ flow,
93
96
  followUp,
94
97
  generatedByAI,
95
98
  imageAiAdjust,
@@ -1 +1 @@
1
- {"version":3,"file":"ui.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ui.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -218,6 +218,70 @@ export declare const uiLocales: {
218
218
  keepEditing: string;
219
219
  discard: string;
220
220
  };
221
+ flow: {
222
+ canvas: string;
223
+ resizePanel: string;
224
+ ports: {
225
+ next: string;
226
+ true: string;
227
+ false: string;
228
+ error: string;
229
+ };
230
+ categories: {
231
+ trigger: string;
232
+ condition: string;
233
+ action: string;
234
+ };
235
+ inspector: {
236
+ title: string;
237
+ empty: string;
238
+ label: string;
239
+ delete: string;
240
+ duplicate: string;
241
+ unknownBlock: string;
242
+ close: string;
243
+ };
244
+ issues: {
245
+ title: string;
246
+ none: string;
247
+ missingTrigger: string;
248
+ multipleTriggers: string;
249
+ unknownBlock: string;
250
+ unreachableNode: string;
251
+ multipleInputs: string;
252
+ portFanOut: string;
253
+ cycle: string;
254
+ missingTrueBranch: string;
255
+ };
256
+ run: {
257
+ passed: string;
258
+ failed: string;
259
+ skipped: string;
260
+ wouldRun: string;
261
+ error: string;
262
+ blocked: string;
263
+ };
264
+ controls: {
265
+ zoomIn: string;
266
+ zoomOut: string;
267
+ fitView: string;
268
+ undo: string;
269
+ redo: string;
270
+ layout: string;
271
+ };
272
+ edge: {
273
+ insertBlock: string;
274
+ };
275
+ node: {
276
+ disabled: string;
277
+ addBlock: string;
278
+ issueCount_one: string;
279
+ issueCount_other: string;
280
+ };
281
+ laneMap: {
282
+ label: string;
283
+ };
284
+ };
221
285
  followUp: {
222
286
  messages: string;
223
287
  chat: {
@@ -772,6 +836,70 @@ export declare const uiLocales: {
772
836
  keepEditing: string;
773
837
  discard: string;
774
838
  };
839
+ flow: {
840
+ canvas: string;
841
+ resizePanel: string;
842
+ ports: {
843
+ next: string;
844
+ true: string;
845
+ false: string;
846
+ error: string;
847
+ };
848
+ categories: {
849
+ trigger: string;
850
+ condition: string;
851
+ action: string;
852
+ };
853
+ inspector: {
854
+ title: string;
855
+ empty: string;
856
+ label: string;
857
+ delete: string;
858
+ duplicate: string;
859
+ unknownBlock: string;
860
+ close: string;
861
+ };
862
+ issues: {
863
+ title: string;
864
+ none: string;
865
+ missingTrigger: string;
866
+ multipleTriggers: string;
867
+ unknownBlock: string;
868
+ unreachableNode: string;
869
+ multipleInputs: string;
870
+ portFanOut: string;
871
+ cycle: string;
872
+ missingTrueBranch: string;
873
+ };
874
+ run: {
875
+ passed: string;
876
+ failed: string;
877
+ skipped: string;
878
+ wouldRun: string;
879
+ error: string;
880
+ blocked: string;
881
+ };
882
+ controls: {
883
+ zoomIn: string;
884
+ zoomOut: string;
885
+ fitView: string;
886
+ undo: string;
887
+ redo: string;
888
+ layout: string;
889
+ };
890
+ edge: {
891
+ insertBlock: string;
892
+ };
893
+ node: {
894
+ disabled: string;
895
+ addBlock: string;
896
+ issueCount_one: string;
897
+ issueCount_other: string;
898
+ };
899
+ laneMap: {
900
+ label: string;
901
+ };
902
+ };
775
903
  followUp: {
776
904
  messages: string;
777
905
  chat: {
@@ -216,6 +216,70 @@ declare const _default: {
216
216
  "keepEditing": "Continuar editando",
217
217
  "discard": "Descartar"
218
218
  },
219
+ "flow": {
220
+ "canvas": "Editor de fluxo",
221
+ "resizePanel": "Arraste para ajustar a largura. Clique duplo restaura",
222
+ "ports": {
223
+ "next": "Próximo",
224
+ "true": "Sim",
225
+ "false": "Não",
226
+ "error": "Erro"
227
+ },
228
+ "categories": {
229
+ "trigger": "Gatilhos",
230
+ "condition": "Condições",
231
+ "action": "Ações"
232
+ },
233
+ "inspector": {
234
+ "title": "Configuração do bloco",
235
+ "empty": "Selecione um bloco para configurar",
236
+ "label": "Nome do bloco",
237
+ "delete": "Excluir bloco",
238
+ "duplicate": "Duplicar bloco",
239
+ "unknownBlock": "Este tipo de bloco não existe mais",
240
+ "close": "Fechar"
241
+ },
242
+ "issues": {
243
+ "title": "Pendências",
244
+ "none": "Nenhuma pendência",
245
+ "missingTrigger": "O fluxo precisa de um gatilho",
246
+ "multipleTriggers": "O fluxo só pode ter um gatilho",
247
+ "unknownBlock": "Bloco de um tipo que não existe mais",
248
+ "unreachableNode": "Bloco solto: nenhum caminho do gatilho chega até ele",
249
+ "multipleInputs": "Bloco com mais de uma entrada",
250
+ "portFanOut": "Uma saída só pode ligar a um bloco",
251
+ "cycle": "Os blocos formam um ciclo",
252
+ "missingTrueBranch": "A condição não tem o caminho do sim"
253
+ },
254
+ "run": {
255
+ "passed": "Passou",
256
+ "failed": "Não passou",
257
+ "skipped": "Pulado",
258
+ "wouldRun": "Executaria",
259
+ "error": "Erro",
260
+ "blocked": "Bloqueado"
261
+ },
262
+ "controls": {
263
+ "zoomIn": "Aproximar",
264
+ "zoomOut": "Afastar",
265
+ "fitView": "Enquadrar",
266
+ "undo": "Desfazer",
267
+ "redo": "Refazer",
268
+ "layout": "Organizar blocos"
269
+ },
270
+ "edge": {
271
+ "insertBlock": "Inserir um bloco aqui"
272
+ },
273
+ "node": {
274
+ "disabled": "Desativado",
275
+ "addBlock": "Adicionar o próximo bloco",
276
+ "issueCount_one": "{{count}} pendência",
277
+ "issueCount_other": "{{count}} pendências"
278
+ },
279
+ "laneMap": {
280
+ "label": "Mapa do fluxo"
281
+ }
282
+ },
219
283
  "followUp": {
220
284
  "messages": "Mensagens",
221
285
  "chat": {
@@ -12,6 +12,7 @@ const detailsTable = { "size": "Tam", "quantity": "Qtd" };
12
12
  const errorPage = { "message": "Esta tela não conseguiu carregar", "headline": "Algo inesperado aconteceu ao montar a página. Atualizar costuma resolver. Se acontecer de novo, fale com o suporte contando o que você estava fazendo.", "backToStart": "Voltar para o início" };
13
13
  const filters = { "activeFilters": "Filtros aplicados", "appliedCount_one": "{{count}} filtro aplicado", "appliedCount_other": "{{count}} filtros aplicados", "clearAll": "Limpar tudo", "noFields": "Nenhum filtro disponível para esta listagem.", "noOptions": "Nenhuma opção encontrada.", "optionsError": "Não foi possível carregar as opções de {{field}}.", "rangeMax": "Máximo", "rangeMin": "Mínimo", "rangeSeparator": "até", "searchOptions": "Buscar opções" };
14
14
  const filtersDrawer = { "selectedFilters": "Filtros Selecionados:", "pendingChanges": "Alterações pendentes", "discardChangesTitle": "Descartar alterações?", "discardChangesMessage": "Você tem alterações de filtro não aplicadas. Deseja descartá-las?", "keepEditing": "Continuar editando", "discard": "Descartar" };
15
+ const flow = { "canvas": "Editor de fluxo", "resizePanel": "Arraste para ajustar a largura. Clique duplo restaura", "ports": { "next": "Próximo", "true": "Sim", "false": "Não", "error": "Erro" }, "categories": { "trigger": "Gatilhos", "condition": "Condições", "action": "Ações" }, "inspector": { "title": "Configuração do bloco", "empty": "Selecione um bloco para configurar", "label": "Nome do bloco", "delete": "Excluir bloco", "duplicate": "Duplicar bloco", "unknownBlock": "Este tipo de bloco não existe mais", "close": "Fechar" }, "issues": { "title": "Pendências", "none": "Nenhuma pendência", "missingTrigger": "O fluxo precisa de um gatilho", "multipleTriggers": "O fluxo só pode ter um gatilho", "unknownBlock": "Bloco de um tipo que não existe mais", "unreachableNode": "Bloco solto: nenhum caminho do gatilho chega até ele", "multipleInputs": "Bloco com mais de uma entrada", "portFanOut": "Uma saída só pode ligar a um bloco", "cycle": "Os blocos formam um ciclo", "missingTrueBranch": "A condição não tem o caminho do sim" }, "run": { "passed": "Passou", "failed": "Não passou", "skipped": "Pulado", "wouldRun": "Executaria", "error": "Erro", "blocked": "Bloqueado" }, "controls": { "zoomIn": "Aproximar", "zoomOut": "Afastar", "fitView": "Enquadrar", "undo": "Desfazer", "redo": "Refazer", "layout": "Organizar blocos" }, "edge": { "insertBlock": "Inserir um bloco aqui" }, "node": { "disabled": "Desativado", "addBlock": "Adicionar o próximo bloco", "issueCount_one": "{{count}} pendência", "issueCount_other": "{{count}} pendências" }, "laneMap": { "label": "Mapa do fluxo" } };
15
16
  const followUp = { "messages": "Mensagens", "chat": { "loadingMessages": "Carregando mensagens", "placeholder": "Escrever mensagem...", "invalidMessage": "Por favor, insira uma mensagem válida", "noMessagesYet": "Nenhuma mensagem por enquanto", "startConversation": "Inicie uma conversa adicionando a primeira mensagem", "loadError": "Não foi possível carregar as mensagens", "sendFailed": "Não foi possível enviar a mensagem. Tente novamente.", "sendFailedInline": "Falha no envio", "resend": "Reenviar", "discard": "Descartar", "today": "Hoje", "yesterday": "Ontem", "typingOne": "{{name}} está digitando...", "typingMany": "{{count}} pessoas estão digitando...", "someone": "Alguém", "you": "Você", "newMessages": "Novas mensagens", "backToLatest": "Voltar para as recentes", "deletedMessage": "Mensagem apagada", "edited": "editada", "readBy": "Lida por {{names}}", "copied": "Mensagem copiada", "replyingTo": "Respondendo a {{name}}", "attachmentFallback": "Anexo", "editTitle": "Editar mensagem", "deleteTitle": "Apagar mensagem?", "deleteSubtitle": "A mensagem será marcada como apagada para todos os participantes", "sendHint": "Enter envia, Shift+Enter quebra a linha", "formatting": "Formatação" }, "actions": { "reply": "Responder", "copy": "Copiar texto", "edit": "Editar", "delete": "Apagar" }, "attachments": { "attach": "Anexar", "pickFile": "Arquivo", "pickImage": "Imagem", "takePhoto": "Tirar foto", "dropHere": "Solte os arquivos para anexar", "tooMany": "Limite de {{max}} anexos por mensagem", "tooLarge": "O arquivo {{name}} passa do limite de 50 MB", "uploadFailed": "Falha no upload", "uploading": "Enviando anexos...", "imagePreview": "Visualizar imagem", "showTranscript": "Ver transcrição", "hideTranscript": "Ocultar transcrição" }, "voice": { "record": "Gravar áudio", "recording": "Gravando", "stop": "Concluir gravação", "cancel": "Cancelar gravação", "rerecord": "Regravar", "attach": "Adicionar ao envio", "discard": "Descartar", "transcriptLabel": "Transcrição", "transcriptPlaceholder": "A transcrição da fala aparece aqui e pode ser editada" }, "camera": { "title": "Tirar foto", "unavailable": "Câmera indisponível", "unavailableHint": "Verifique a permissão de câmera do navegador", "switch": "Alternar câmera", "capture": "Capturar foto" }, "search": { "open": "Buscar na conversa", "placeholder": "Buscar mensagens", "noResults": "Nenhuma mensagem encontrada", "error": "Não foi possível buscar as mensagens" } };
16
17
  const generatedByAI = { "tooltip": "Gerado por IA" };
17
18
  const imageAiAdjust = { "action": "Ajustar com IA", "title": "Ajustar imagem com IA", "subtitle": "Descreva o ajuste. A IA altera só o que você pedir e preserva o resto da imagem.", "original": "Original", "result": "Resultado", "resultHint": "Descreva o ajuste e clique em Gerar para ver o resultado aqui.", "promptLabel": "Ajuste desejado", "promptPlaceholder": "Ex.: remover o fundo e deixar branco, tirar os vincos da manga, clarear a iluminação", "generate": "Gerar", "generating": "Gerando a imagem...", "tryAgain": "Gerar outra", "useResult": "Usar esta imagem", "errorGenerate": "Não foi possível ajustar a imagem com IA", "errorSave": "Não foi possível salvar a imagem ajustada", "errorRefused": "A IA não conseguiu fazer este ajuste: {{reason}}", "mask": { "start": "Marcar a área", "stop": "Usar a imagem toda", "hint": "Pinte a área que a IA pode alterar. O resto da imagem é mantido." }, "verification": { "changedMoreThanRequested": "A IA mudou mais do que o pedido. Confira as áreas fora do ajuste antes de usar.", "colorMismatch": "A cor da peça ({{dominant}}) ficou diferente da cor pedida ({{target}})." } };
@@ -50,6 +51,7 @@ const pt = {
50
51
  errorPage,
51
52
  filters,
52
53
  filtersDrawer,
54
+ flow,
53
55
  followUp,
54
56
  generatedByAI,
55
57
  imageAiAdjust,
@@ -90,6 +92,7 @@ export {
90
92
  errorPage,
91
93
  filters,
92
94
  filtersDrawer,
95
+ flow,
93
96
  followUp,
94
97
  generatedByAI,
95
98
  imageAiAdjust,
@@ -1 +1 @@
1
- {"version":3,"file":"ui.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ui.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umodeapporg/ui",
3
- "version": "0.23.1",
3
+ "version": "0.24.1",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/components/UI/DataTable/index.d.ts",
51
51
  "import": "./dist/components/UI/DataTable/index.js"
52
52
  },
53
+ "./components/UI/Flow": {
54
+ "types": "./dist/components/UI/Flow/index.d.ts",
55
+ "import": "./dist/components/UI/Flow/index.js"
56
+ },
53
57
  "./components/UI/ImageMaskPainter": {
54
58
  "types": "./dist/components/UI/ImageMaskPainter/index.d.ts",
55
59
  "import": "./dist/components/UI/ImageMaskPainter/index.js"
@@ -105,6 +109,7 @@
105
109
  "@dnd-kit/sortable": "^10.0.0",
106
110
  "@dnd-kit/utilities": "^3.2.2",
107
111
  "@tanstack/react-table": "^8.21.3",
112
+ "@xyflow/react": "^12.11.2",
108
113
  "apexcharts": ">=3.52.0 <4",
109
114
  "date-fns": "^4.0.0",
110
115
  "i18next": ">=23",
@@ -137,6 +142,9 @@
137
142
  "@tanstack/react-table": {
138
143
  "optional": true
139
144
  },
145
+ "@xyflow/react": {
146
+ "optional": true
147
+ },
140
148
  "apexcharts": {
141
149
  "optional": true
142
150
  },
@@ -193,6 +201,7 @@
193
201
  "@typescript-eslint/eslint-plugin": "^8.42.0",
194
202
  "@typescript-eslint/parser": "^8.42.0",
195
203
  "@vitejs/plugin-react-swc": "^3.5.0",
204
+ "@xyflow/react": "^12.12.0",
196
205
  "apexcharts": "3.52.0",
197
206
  "autoprefixer": "^10.4.19",
198
207
  "conventional-changelog-conventionalcommits": "^8.0.0",