diff --git a/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx b/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx index d1c5bc75c47..6388a6b4a11 100644 --- a/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx +++ b/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx @@ -21,16 +21,10 @@ import * as __path from "path"; import * as React from "react"; import { useCallback, useEffect, useMemo, useState } from "react"; import * as DmnEditor from "@kie-tools/dmn-editor/dist/DmnEditor"; -import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize, Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DMN_LATEST_VERSION, DmnLatestModel, DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; -import { - ContentType, - ResourceContent, - SearchType, - WorkspaceChannelApi, - WorkspaceEdit, -} from "@kie-tools-core/workspace/dist/api"; +import { ResourceContent, SearchType, WorkspaceChannelApi, WorkspaceEdit } from "@kie-tools-core/workspace/dist/api"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { domParser } from "@kie-tools/xml-parser-ts"; import { ns as dmn15ns } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/meta"; diff --git a/packages/dmn-editor/src/DmnEditor.tsx b/packages/dmn-editor/src/DmnEditor.tsx index 766c08146cb..3a1b18aa288 100644 --- a/packages/dmn-editor/src/DmnEditor.tsx +++ b/packages/dmn-editor/src/DmnEditor.tsx @@ -28,6 +28,7 @@ import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState import { original } from "immer"; import { PMML } from "@kie-tools/pmml-editor-marshaller"; import { DmnLatestModel, AllDmnMarshallers } from "@kie-tools/dmn-marshaller"; +import { Normalized, normalize } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { FileIcon } from "@patternfly/react-icons/dist/js/icons/file-icon"; import { InfrastructureIcon } from "@patternfly/react-icons/dist/js/icons/infrastructure-icon"; import { PficonTemplateIcon } from "@patternfly/react-icons/dist/js/icons/pficon-template-icon"; @@ -38,7 +39,6 @@ import { BoxedExpressionScreen } from "./boxedExpressions/BoxedExpressionScreen" import { DataTypes } from "./dataTypes/DataTypes"; import { Diagram, DiagramRef } from "./diagram/Diagram"; import { DmnVersionLabel } from "./diagram/DmnVersionLabel"; -import { Normalized, normalize } from "./normalization/normalize"; import { BoxedExpressionPropertiesPanel } from "./propertiesPanel/BoxedExpressionPropertiesPanel"; import { DmnEditorContextProvider, useDmnEditor } from "./DmnEditorContext"; import { DmnEditorErrorFallback } from "./DmnEditorErrorFallback"; diff --git a/packages/dmn-editor/src/DmnEditorContext.tsx b/packages/dmn-editor/src/DmnEditorContext.tsx index e90381f8bd9..21c8e4bf4bc 100644 --- a/packages/dmn-editor/src/DmnEditorContext.tsx +++ b/packages/dmn-editor/src/DmnEditorContext.tsx @@ -21,7 +21,6 @@ import * as React from "react"; import { useContext, useMemo, useRef } from "react"; import { DmnEditorProps } from "./DmnEditor"; import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; -import { Normalized } from "./normalization/normalize"; export type DmnEditorContextProviderProps = Pick< DmnEditorProps, diff --git a/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts b/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts index 74cd1b79ba2..4a3ca0a88f3 100644 --- a/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts +++ b/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts @@ -19,6 +19,7 @@ import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DC__Bounds } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { addNamespaceToHref, parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import ELK, * as Elk from "elkjs/lib/elk.bundled.js"; import { Edge, Node } from "reactflow"; import { NodeType } from "../diagram/connections/graphStructure"; @@ -29,7 +30,6 @@ import { DEFAULT_NODE_SIZES, MIN_NODE_SIZES } from "../diagram/nodes/DefaultSize import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { SnapGrid } from "../store/Store"; -import { addNamespaceToHref, parseXmlHref } from "../xml/xmlHrefs"; const elk = new ELK(); diff --git a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx index 5e4fb2ab5e9..72a355eb9a2 100644 --- a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx +++ b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx @@ -32,6 +32,7 @@ import { DMN15__tDecision, DMN15__tItemDefinition, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { PMMLDocumentData } from "@kie-tools/pmml-editor-marshaller/dist/api"; import { PMMLFieldData } from "@kie-tools/pmml-editor-marshaller/dist/api/PMMLFieldData"; import { PMMLModelData } from "@kie-tools/pmml-editor-marshaller/dist/api/PMMLModelData"; @@ -79,7 +80,6 @@ import { DmnEditorTab } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { getDefaultColumnWidth } from "./getDefaultColumnWidth"; import { getDefaultBoxedExpression } from "./getDefaultBoxedExpression"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; export function BoxedExpressionScreen({ container }: { container: React.RefObject }) { diff --git a/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts b/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts index 6e8618d40e8..11b4bd3f6fb 100644 --- a/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts +++ b/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts @@ -30,8 +30,8 @@ import { DMN15__tQuantified, DMN15__tRelation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { AllExpressionTypes, AllExpressions, AllExpressionsWithoutTypes } from "../dataTypes/DataTypeSpec"; -import { Normalized } from "../normalization/normalize"; interface PathType { type: AllExpressionTypes; diff --git a/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx b/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx index e47a3e687d8..0d2cb791a05 100644 --- a/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx +++ b/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx @@ -55,7 +55,7 @@ import { DMN15__tContextEntry, DMN15__tOutputClause, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; export function getDefaultBoxedExpression({ logicType, diff --git a/packages/dmn-editor/src/clipboard/Clipboard.ts b/packages/dmn-editor/src/clipboard/Clipboard.ts index 8704f2c5999..08306871139 100644 --- a/packages/dmn-editor/src/clipboard/Clipboard.ts +++ b/packages/dmn-editor/src/clipboard/Clipboard.ts @@ -25,6 +25,9 @@ import { DMNDI15__DMNEdge, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; +import { getNewDmnIdRandomizer } from "@kie-tools/dmn-marshaller/dist/idRandomizer/dmnIdRandomizer"; import { Unpacked } from "../tsExt/tsExt"; import * as RF from "reactflow"; import { State } from "../store/Store"; @@ -35,9 +38,6 @@ import { DmnDiagramEdgeData } from "../diagram/edges/Edges"; import { KIE, Namespaced } from "@kie-tools/dmn-marshaller/dist/kie-extensions"; import { KIE__tComponentWidths } from "@kie-tools/dmn-marshaller/dist/schemas/kie-1_0/ts-gen/types"; import { DataType } from "../dataTypes/DataTypes"; -import { parseXmlHref } from "../xml/xmlHrefs"; -import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; -import { Normalized } from "../normalization/normalize"; export const DMN_EDITOR_DIAGRAM_CLIPBOARD_MIME_TYPE = "application/json+kie-dmn-editor--diagram" as const; export const DMN_EDITOR_BOXED_EXPRESSION_CLIPBOARD_MIME_TYPE = diff --git a/packages/dmn-editor/src/dataTypes/Constraints.tsx b/packages/dmn-editor/src/dataTypes/Constraints.tsx index 9c2bd764d1b..5146bedf3ac 100644 --- a/packages/dmn-editor/src/dataTypes/Constraints.tsx +++ b/packages/dmn-editor/src/dataTypes/Constraints.tsx @@ -24,6 +24,7 @@ import { DMN15__tItemDefinition, DMN15__tUnaryTests, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { ConstraintsEnum, isEnum } from "./ConstraintsEnum"; import { ConstraintsRange, isRange } from "./ConstraintsRange"; @@ -50,7 +51,6 @@ import { useDmnEditorStore } from "../store/StoreContext"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { UniqueNameIndex } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { builtInFeelTypeNames } from "./BuiltInFeelTypes"; -import { Normalized } from "../normalization/normalize"; export type TypeHelper = { check: (value: string) => boolean; diff --git a/packages/dmn-editor/src/dataTypes/DataTypeName.tsx b/packages/dmn-editor/src/dataTypes/DataTypeName.tsx index f10279dd739..b816e114925 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypeName.tsx +++ b/packages/dmn-editor/src/dataTypes/DataTypeName.tsx @@ -20,6 +20,7 @@ import * as React from "react"; import { useCallback } from "react"; import { DMN15__tItemDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex"; import { EditableNodeLabel, useEditableNodeLabel } from "../diagram/nodes/EditableNodeLabel"; import { TypeRefLabel } from "./TypeRefLabel"; @@ -31,7 +32,6 @@ import { InlineFeelNameInput, OnInlineFeelNameRenamed } from "../feel/InlineFeel import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { State } from "../store/Store"; import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; -import { Normalized } from "../normalization/normalize"; export function DataTypeName({ isReadOnly, diff --git a/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts b/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts index d53e5039992..c139483fff4 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts +++ b/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts @@ -35,9 +35,9 @@ import { DMN15__tRelation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DataTypeIndex } from "./DataTypes"; import { KIE__tConstraintType } from "@kie-tools/dmn-marshaller/dist/schemas/kie-1_0/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; export function findDataTypeById({ definitions, diff --git a/packages/dmn-editor/src/dataTypes/DataTypes.tsx b/packages/dmn-editor/src/dataTypes/DataTypes.tsx index 02dbd0e0b9c..fa4ea17a36b 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypes.tsx +++ b/packages/dmn-editor/src/dataTypes/DataTypes.tsx @@ -20,6 +20,8 @@ import * as React from "react"; import { useCallback, useMemo, useState } from "react"; import { DMN15__tItemDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { getNewDmnIdRandomizer } from "@kie-tools/dmn-marshaller/dist/idRandomizer/dmnIdRandomizer"; import { Drawer, DrawerContent, @@ -53,11 +55,8 @@ import { DmnEditorDataTypesClipboard, getClipboard, } from "../clipboard/Clipboard"; -import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; import { addTopLevelItemDefinition as _addTopLevelItemDefinition } from "../mutations/addTopLevelItemDefinition"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; export type DataType = { diff --git a/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx b/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx index 0183f458297..8a4ec8c3fad 100644 --- a/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx +++ b/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx @@ -51,17 +51,16 @@ import { DmnEditorDataTypesClipboard, getClipboard, } from "../clipboard/Clipboard"; -import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; +import { getNewDmnIdRandomizer } from "@kie-tools/dmn-marshaller/dist/idRandomizer/dmnIdRandomizer"; import { isEnum } from "./ConstraintsEnum"; import { isRange } from "./ConstraintsRange"; import { constraintTypeHelper, recursivelyGetRootItemDefinition } from "./Constraints"; import { builtInFeelTypeNames } from "./BuiltInFeelTypes"; import { useDmnEditor } from "../DmnEditorContext"; import { DMN15__tItemDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { resolveTypeRef } from "./resolveTypeRef"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../normalization/normalize"; -import { useSettings } from "../settings/DmnEditorSettingsContext"; export const BRIGHTNESS_DECREASE_STEP_IN_PERCENTAGE_PER_NESTING_LEVEL = 5; export const STARTING_BRIGHTNESS_LEVEL_IN_PERCENTAGE = 95; diff --git a/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx b/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx index 03da2f7e40a..301a4d5386c 100644 --- a/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx +++ b/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx @@ -22,8 +22,8 @@ import { useMemo } from "react"; import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { buildFeelQNameFromXmlQName } from "../feel/buildFeelQName"; import { buildXmlQName, parseXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; +import { getXmlNamespaceDeclarationName } from "@kie-tools/dmn-marshaller/dist/xml/xmlNamespaceDeclarations"; import { useDmnEditorStore } from "../store/StoreContext"; -import { getXmlNamespaceDeclarationName } from "../xml/xmlNamespaceDeclarations"; import { parseFeelQName } from "../feel/parseFeelQName"; import { builtInFeelTypeNames } from "./BuiltInFeelTypes"; diff --git a/packages/dmn-editor/src/diagram/Diagram.tsx b/packages/dmn-editor/src/diagram/Diagram.tsx index 9dbd0fe75a2..c42760aa796 100644 --- a/packages/dmn-editor/src/diagram/Diagram.tsx +++ b/packages/dmn-editor/src/diagram/Diagram.tsx @@ -28,6 +28,8 @@ import { DMN15__tDecisionService, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized, normalize } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, parseXmlHref, xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml"; import { buildXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button"; import { @@ -71,7 +73,6 @@ import { OverlaysPanel } from "../overlaysPanel/OverlaysPanel"; import { DiagramLhsPanel, SnapGrid, State } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { Unpacked } from "../tsExt/tsExt"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; import { DiagramContainerContextProvider } from "./DiagramContainerContext"; import { MIME_TYPE_FOR_DMN_EDITOR_DRG_NODE } from "./DrgNodesPanel"; import { MIME_TYPE_FOR_DMN_EDITOR_NEW_NODE_FROM_PALETTE, Palette } from "./Palette"; @@ -110,7 +111,6 @@ import { UnknownNode, } from "./nodes/Nodes"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; -import { xmlHrefToQName } from "../xml/xmlHrefToQName"; import { addAutoGeneratedDecisionServiceToDrd, addConflictingDecisionServiceToDrd, @@ -123,7 +123,6 @@ import { updateExpressionWidths } from "../mutations/updateExpressionWidths"; import { DiagramCommands } from "./DiagramCommands"; import { getAutoLayoutedInfo } from "../autolayout/autoLayoutInfo"; import { autoGenerateDrd } from "../normalization/autoGenerateDrd"; -import { normalize, Normalized } from "../normalization/normalize"; import OptimizeIcon from "@patternfly/react-icons/dist/js/icons/optimize-icon"; import { applyAutoLayoutToDrd } from "../mutations/applyAutoLayoutToDrd"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/diagram/DiagramCommands.tsx b/packages/dmn-editor/src/diagram/DiagramCommands.tsx index e7354f80d9f..d99d4adf271 100644 --- a/packages/dmn-editor/src/diagram/DiagramCommands.tsx +++ b/packages/dmn-editor/src/diagram/DiagramCommands.tsx @@ -26,7 +26,8 @@ import { buildClipboardFromDiagram, getClipboard, } from "../clipboard/Clipboard"; -import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; +import { buildXmlHref, parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; +import { getNewDmnIdRandomizer } from "@kie-tools/dmn-marshaller/dist/idRandomizer/dmnIdRandomizer"; import { NodeNature, nodeNatures } from "../mutations/NodeNature"; import { addOrGetDrd } from "../mutations/addOrGetDrd"; import { addStandaloneNode } from "../mutations/addStandaloneNode"; @@ -40,7 +41,6 @@ import { NODE_TYPES } from "./nodes/NodeTypes"; import { DmnDiagramNodeData } from "./nodes/Nodes"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { NodeType } from "./connections/graphStructure"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; import { DEFAULT_VIEWPORT } from "./Diagram"; import { useCommands } from "../commands/CommandsContextProvider"; diff --git a/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx b/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx index 2391eda1e09..9fa53445919 100644 --- a/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx +++ b/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx @@ -18,6 +18,8 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button/Button"; import { SearchInput } from "@patternfly/react-core/dist/js/components/SearchInput"; import { Text, TextContent } from "@patternfly/react-core/dist/js/components/Text"; @@ -29,13 +31,11 @@ import { DmnObjectListItem } from "../externalNodes/DmnObjectListItem"; import { DiagramLhsPanel } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { Unpacked } from "../tsExt/tsExt"; -import { buildXmlHref } from "../xml/xmlHrefs"; import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts"; import { EmptyState, EmptyStateBody, EmptyStateIcon } from "@patternfly/react-core/dist/js/components/EmptyState"; import { Title } from "@patternfly/react-core/dist/js/components/Title"; import CubesIcon from "@patternfly/react-icons/dist/js/icons/cubes-icon"; -import { Normalized } from "../normalization/normalize"; export const MIME_TYPE_FOR_DMN_EDITOR_DRG_NODE = "kie-dmn-editor--drg-node"; diff --git a/packages/dmn-editor/src/diagram/SnapGrid.ts b/packages/dmn-editor/src/diagram/SnapGrid.ts index 8696e856672..6508ab4429f 100644 --- a/packages/dmn-editor/src/diagram/SnapGrid.ts +++ b/packages/dmn-editor/src/diagram/SnapGrid.ts @@ -23,8 +23,8 @@ import { DC__Point, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { SnapGrid } from "../store/Store"; -import { Normalized } from "../normalization/normalize"; export function snapShapePosition(snapGrid: SnapGrid, shape: Normalized) { return snapBoundsPosition(snapGrid, shape["dc:Bounds"]); diff --git a/packages/dmn-editor/src/diagram/edges/Edges.tsx b/packages/dmn-editor/src/diagram/edges/Edges.tsx index 4a16054bdbf..3cf2fcf0733 100644 --- a/packages/dmn-editor/src/diagram/edges/Edges.tsx +++ b/packages/dmn-editor/src/diagram/edges/Edges.tsx @@ -17,10 +17,11 @@ * under the License. */ -import { DMNDI15__DMNEdge, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import * as React from "react"; import { useRef } from "react"; import * as RF from "reactflow"; +import { DMNDI15__DMNEdge, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DrgEdge } from "../graph/graph"; import { DEFAULT_INTRACTION_WIDTH } from "../maths/DmnMaths"; import { propsHaveSameValuesDeep } from "../memoization/memoization"; @@ -29,7 +30,6 @@ import { PotentialWaypoint, Waypoints } from "./Waypoints"; import { useAlwaysVisibleEdgeUpdatersAtNodeBorders } from "./useAlwaysVisibleEdgeUpdatersAtNodeBorders"; import { useKieEdgePath } from "./useKieEdgePath"; import { usePotentialWaypointControls } from "./usePotentialWaypointControls"; -import { Normalized } from "../../normalization/normalize"; import { useSettings } from "../../settings/DmnEditorSettingsContext"; export type DmnDiagramEdgeData = { diff --git a/packages/dmn-editor/src/diagram/edges/getSnappedMultiPointAnchoredEdgePath.tsx b/packages/dmn-editor/src/diagram/edges/getSnappedMultiPointAnchoredEdgePath.tsx index 44c9386a5c4..10b020ab0d9 100644 --- a/packages/dmn-editor/src/diagram/edges/getSnappedMultiPointAnchoredEdgePath.tsx +++ b/packages/dmn-editor/src/diagram/edges/getSnappedMultiPointAnchoredEdgePath.tsx @@ -17,12 +17,13 @@ * under the License. */ +import * as RF from "reactflow"; import { DC__Point, DMNDI15__DMNEdge, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import * as RF from "reactflow"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { switchExpression } from "@kie-tools-core/switch-expression-ts"; import { snapPoint } from "../SnapGrid"; import { PositionalNodeHandleId } from "../connections/PositionalNodeHandles"; @@ -31,7 +32,6 @@ import { getBoundsCenterPoint } from "../maths/Maths"; import { Bounds, getDiscretelyAutoPositionedEdgeParams } from "../maths/Maths"; import { AutoPositionedEdgeMarker } from "./AutoPositionedEdgeMarker"; import { SnapGrid } from "../../store/Store"; -import { Normalized } from "../../normalization/normalize"; export function getSnappedMultiPointAnchoredEdgePath({ snapGrid, diff --git a/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts b/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts index d63d5014afd..b2f36fcef13 100644 --- a/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts +++ b/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts @@ -23,6 +23,7 @@ import { addEdgeWaypoint } from "../../mutations/addEdgeWaypoint"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { snapPoint } from "../SnapGrid"; import { DC__Point } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefToQName"; import { DmnDiagramNodeData } from "../nodes/Nodes"; import { DmnDiagramEdgeData } from "./Edges"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; @@ -30,7 +31,6 @@ import { addEdge } from "../../mutations/addEdge"; import { EdgeType, NodeType } from "../connections/graphStructure"; import { PositionalNodeHandleId } from "../connections/PositionalNodeHandles"; import { getHandlePosition } from "../maths/DmnMaths"; -import { xmlHrefToQName } from "../../xml/xmlHrefToQName"; export function usePotentialWaypointControls( waypoints: DC__Point[], diff --git a/packages/dmn-editor/src/diagram/graph/graph.ts b/packages/dmn-editor/src/diagram/graph/graph.ts index 72ff4f72de5..73797975b81 100644 --- a/packages/dmn-editor/src/diagram/graph/graph.ts +++ b/packages/dmn-editor/src/diagram/graph/graph.ts @@ -18,8 +18,8 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Unpacked } from "../../tsExt/tsExt"; -import { Normalized } from "../../normalization/normalize"; export type AdjMatrix = Record< string, diff --git a/packages/dmn-editor/src/diagram/maths/DmnMaths.ts b/packages/dmn-editor/src/diagram/maths/DmnMaths.ts index 12690dfa78e..7dc80b30c57 100644 --- a/packages/dmn-editor/src/diagram/maths/DmnMaths.ts +++ b/packages/dmn-editor/src/diagram/maths/DmnMaths.ts @@ -24,6 +24,7 @@ import { DC__Point, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { SnapGrid } from "../../store/Store"; import { snapBoundsDimensions, snapBoundsPosition } from "../SnapGrid"; import { PositionalNodeHandleId } from "../connections/PositionalNodeHandles"; @@ -31,7 +32,6 @@ import { AutoPositionedEdgeMarker } from "../edges/AutoPositionedEdgeMarker"; import { NODE_TYPES } from "../nodes/NodeTypes"; import { NodeDmnObjects } from "../nodes/Nodes"; import { getCenter } from "./Maths"; -import { Normalized } from "../../normalization/normalize"; export const DEFAULT_INTRACTION_WIDTH = 40; export const CONTAINER_NODES_DESIRABLE_PADDING = 60; diff --git a/packages/dmn-editor/src/diagram/nodes/DataTypeNodePanel.tsx b/packages/dmn-editor/src/diagram/nodes/DataTypeNodePanel.tsx index d0cd47d90fb..1359832a425 100644 --- a/packages/dmn-editor/src/diagram/nodes/DataTypeNodePanel.tsx +++ b/packages/dmn-editor/src/diagram/nodes/DataTypeNodePanel.tsx @@ -22,12 +22,11 @@ import { DMN15__tInformationItem, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../../store/StoreContext"; import { OnCreateDataType, OnToggle, OnTypeRefChange, TypeRefSelector } from "../../dataTypes/TypeRefSelector"; import { useDmnEditor } from "../../DmnEditorContext"; import { useResolvedTypeRef } from "../../dataTypes/useResolvedTypeRef"; -import { Normalized } from "../../normalization/normalize"; function stopPropagation(e: React.MouseEvent | React.KeyboardEvent) { e.stopPropagation(); diff --git a/packages/dmn-editor/src/diagram/nodes/EditableNodeLabel.tsx b/packages/dmn-editor/src/diagram/nodes/EditableNodeLabel.tsx index f86959e5b29..ab4b8365f52 100644 --- a/packages/dmn-editor/src/diagram/nodes/EditableNodeLabel.tsx +++ b/packages/dmn-editor/src/diagram/nodes/EditableNodeLabel.tsx @@ -25,6 +25,7 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContex import { UniqueNameIndex } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { buildFeelQNameFromXmlQName } from "../../feel/buildFeelQName"; import { DMN15__tNamedElement } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Truncate } from "@patternfly/react-core/dist/js/components/Truncate"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { invalidInlineFeelNameStyle } from "../../feel/InlineFeelNameInput"; @@ -34,7 +35,6 @@ import { flushSync } from "react-dom"; import { NodeLabelPosition } from "./NodeSvgs"; import { State } from "../../store/Store"; import "./EditableNodeLabel.css"; -import { Normalized } from "../../normalization/normalize"; import { useSettings } from "../../settings/DmnEditorSettingsContext"; export type OnEditableNodeLabelChange = (value: string | undefined) => void; diff --git a/packages/dmn-editor/src/diagram/nodes/NodeStyle.ts b/packages/dmn-editor/src/diagram/nodes/NodeStyle.ts index c1730ab46d7..94a569a66e2 100644 --- a/packages/dmn-editor/src/diagram/nodes/NodeStyle.ts +++ b/packages/dmn-editor/src/diagram/nodes/NodeStyle.ts @@ -19,10 +19,10 @@ import React, { useMemo } from "react"; import { DMNDI15__DMNStyle } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { NodeType } from "../connections/graphStructure"; import { NODE_TYPES } from "./NodeTypes"; import { NodeLabelPosition } from "./NodeSvgs"; -import { Normalized } from "../../normalization/normalize"; export interface NodeStyle { fontCssProperties: React.CSSProperties; diff --git a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx index 9da807bfcc8..51c673e6388 100644 --- a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx +++ b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx @@ -30,6 +30,7 @@ import { DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { drag } from "d3-drag"; import { select } from "d3-selection"; import * as React from "react"; @@ -71,7 +72,6 @@ import { OutgoingStuffNodePanel } from "./OutgoingStuffNodePanel"; import { propsHaveSameValuesDeep } from "../memoization/memoization"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { NODE_LAYERS } from "../../store/computed/computeDiagramData"; -import { Normalized } from "../../normalization/normalize"; import { useSettings } from "../../settings/DmnEditorSettingsContext"; export type ElementFilter = E extends any diff --git a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx index b21e543428b..aae8422ef7f 100644 --- a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx +++ b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx @@ -20,6 +20,7 @@ import * as React from "react"; import { useMemo } from "react"; import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Unpacked } from "../tsExt/tsExt"; import { TypeRefLabel } from "../dataTypes/TypeRefLabel"; import { NodeIcon } from "../icons/Icons"; @@ -30,7 +31,6 @@ import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-co import { useDmnEditorStore } from "../store/StoreContext"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; -import { Normalized } from "../normalization/normalize"; import { Tooltip } from "@patternfly/react-core/dist/js/components/Tooltip"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; diff --git a/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx b/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx index 2cb1ceb5dbf..0d3f0cc9e54 100644 --- a/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx +++ b/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx @@ -19,10 +19,10 @@ import * as React from "react"; import { useCallback, useState } from "react"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { DiagramLhsPanel, DmnEditorTab } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex"; -import { buildXmlHref } from "../xml/xmlHrefs"; import { EmptyState, EmptyStateBody, diff --git a/packages/dmn-editor/src/feel/buildFeelQName.ts b/packages/dmn-editor/src/feel/buildFeelQName.ts index 41b8a75c8d1..a8ab5c34616 100644 --- a/packages/dmn-editor/src/feel/buildFeelQName.ts +++ b/packages/dmn-editor/src/feel/buildFeelQName.ts @@ -18,9 +18,9 @@ */ import { DMN15__tImport, DMN15__tNamedElement } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import { XmlParserTsRootElementBaseType } from "@kie-tools/xml-parser-ts"; -import { Normalized } from "../normalization/normalize"; export type FeelQNameBuild = { full: string; diff --git a/packages/dmn-editor/src/includedModels/IncludedModels.tsx b/packages/dmn-editor/src/includedModels/IncludedModels.tsx index cb929054328..efb1034f059 100644 --- a/packages/dmn-editor/src/includedModels/IncludedModels.tsx +++ b/packages/dmn-editor/src/includedModels/IncludedModels.tsx @@ -21,6 +21,7 @@ import * as React from "react"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { ns as dmn12ns } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_2/ts-gen/meta"; import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button"; import { Card, CardActions, CardBody, CardHeader, CardTitle } from "@patternfly/react-core/dist/js/components/Card"; import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; @@ -56,7 +57,6 @@ import { useInViewSelect } from "../responsiveness/useInViewSelect"; import { useCancelableEffect } from "@kie-tools-core/react-hooks/dist/useCancelableEffect"; import { State } from "../store/Store"; import "./IncludedModels.css"; -import { Normalized } from "../normalization/normalize"; import { Popover, PopoverPosition } from "@patternfly/react-core/dist/js/components/Popover"; import { AlertActionCloseButton, AlertActionLink } from "@patternfly/react-core/dist/js/components/Alert"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/includedModels/importNamespaces.ts b/packages/dmn-editor/src/includedModels/importNamespaces.ts index e8345f98916..7b6afba97b5 100644 --- a/packages/dmn-editor/src/includedModels/importNamespaces.ts +++ b/packages/dmn-editor/src/includedModels/importNamespaces.ts @@ -19,8 +19,8 @@ import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { allDmnImportNamespaces } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { allPmmlImportNamespaces, getPmmlNamespaceFromDmnImport } from "../pmml/pmml"; -import { Normalized } from "../normalization/normalize"; export function getNamespaceOfDmnImport({ dmnImport }: { dmnImport: Normalized }) { if (allDmnImportNamespaces.has(dmnImport["@_importType"])) { diff --git a/packages/dmn-editor/src/mutations/addConnectedNode.ts b/packages/dmn-editor/src/mutations/addConnectedNode.ts index 6bd26ba3173..ebb78db6dd6 100644 --- a/packages/dmn-editor/src/mutations/addConnectedNode.ts +++ b/packages/dmn-editor/src/mutations/addConnectedNode.ts @@ -17,7 +17,7 @@ * under the License. */ -import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DC__Bounds, DMN15__tAuthorityRequirement, @@ -26,6 +26,8 @@ import { DMN15__tInformationRequirement, DMN15__tKnowledgeRequirement, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; import { AutoPositionedEdgeMarker } from "../diagram/edges/AutoPositionedEdgeMarker"; import { EDGE_TYPES } from "../diagram/edges/EdgeTypes"; @@ -36,8 +38,6 @@ import { NodeNature, nodeNatures } from "./NodeNature"; import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; -import { buildXmlHref } from "../xml/xmlHrefs"; -import { Normalized } from "../normalization/normalize"; import { ExternalModelsIndex } from "../DmnEditor"; export function addConnectedNode({ diff --git a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts index 18c45243d80..12b6efc2dd7 100644 --- a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts +++ b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts @@ -18,17 +18,15 @@ */ import { DMN15__tDefinitions, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { parseXmlHref, xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml"; import { getContainmentRelationship, getDecisionServiceDividerLineLocalY } from "../diagram/maths/DmnMaths"; import { addOrGetDrd } from "./addOrGetDrd"; import { repopulateInputDataAndDecisionsOnDecisionService } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { SnapGrid } from "../store/Store"; import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; -import { Normalized } from "../normalization/normalize"; import { ExternalModelsIndex } from "../DmnEditor"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; -import { DmnLatestModel } from "@kie-tools/dmn-marshaller/dist"; -import { xmlHrefToQName } from "../xml/xmlHrefToQName"; export function addDecisionToDecisionService({ definitions, diff --git a/packages/dmn-editor/src/mutations/addEdge.ts b/packages/dmn-editor/src/mutations/addEdge.ts index b45591a26a9..41bf1979ec3 100644 --- a/packages/dmn-editor/src/mutations/addEdge.ts +++ b/packages/dmn-editor/src/mutations/addEdge.ts @@ -28,6 +28,7 @@ import { DMN15__tKnowledgeRequirement, DMNDI15__DMNEdge, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; import { _checkIsValidConnection } from "../diagram/connections/isValidConnection"; @@ -39,7 +40,6 @@ import { Unpacked } from "../tsExt/tsExt"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; import { AutoPositionedEdgeMarker } from "../diagram/edges/AutoPositionedEdgeMarker"; -import { Normalized } from "../normalization/normalize"; import { ExternalModelsIndex } from "../DmnEditor"; export function addEdge({ diff --git a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts index 8331ed9ca56..41cf6489b25 100644 --- a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts @@ -18,8 +18,8 @@ */ import { DC__Point, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { addOrGetDrd } from "./addOrGetDrd"; -import { Normalized } from "../normalization/normalize"; export function addEdgeWaypoint({ definitions, diff --git a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts index dd7ab5281a9..743facddf49 100644 --- a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts +++ b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts @@ -22,18 +22,17 @@ import { DMN15__tDecisionService, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, parseXmlHref, xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml"; import { ExternalModelsIndex } from "../DmnEditor"; import { getAutoLayoutedInfo } from "../autolayout/autoLayoutInfo"; import { DECISION_SERVICE_COLLAPSED_DIMENSIONS, MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; -import { Normalized } from "../normalization/normalize"; import { Computed, SnapGrid, State } from "../store/Store"; import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts"; import { computeDiagramData } from "../store/computed/computeDiagramData"; import { computeDirectlyIncludedExternalModelsByNamespace } from "../store/computed/computeDirectlyIncludedExternalModelsByNamespace"; import { computeIndexedDrd } from "../store/computed/computeIndexes"; -import { xmlHrefToQName } from "../xml/xmlHrefToQName"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; import { addOrGetDrd } from "./addOrGetDrd"; import { addShape } from "./addShape"; import { applyAutoLayoutToDrd } from "./applyAutoLayoutToDrd"; diff --git a/packages/dmn-editor/src/mutations/addImport.ts b/packages/dmn-editor/src/mutations/addImport.ts index 2e802dfafe1..58f9ddbd022 100644 --- a/packages/dmn-editor/src/mutations/addImport.ts +++ b/packages/dmn-editor/src/mutations/addImport.ts @@ -19,7 +19,7 @@ import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tDefinitions, DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; export function addImport({ definitions, diff --git a/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts b/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts deleted file mode 100644 index 253623ccb4c..00000000000 --- a/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; - -export function addMissingImportNamespaces(definitions: Normalized) { - if (definitions.import === undefined) { - return; - } - - // Collect all declared namespaces - const definedNamespaces = new Set( - Object.keys(definitions) - .filter((keys: keyof DMN15__tDefinitions) => String(keys).startsWith("@_xmlns:")) - .map((xmlnsKey: keyof DMN15__tDefinitions) => definitions[xmlnsKey]) - ); - - // Add missing import namespace declarations as `xmlns:included*` - let includedIndex = 0; - for (let index = 0; index < definitions.import.length; index++) { - const importedModelNamespace = definitions.import[index]["@_namespace"]; - - // Check if namespace is already declared - if (definedNamespaces.has(importedModelNamespace)) { - // Ignore namespaces that are already declared - continue; - } - - // Get next available `included*` namespace declaration name - while (definitions[`@_xmlns:included${includedIndex}`]) { - includedIndex++; - } - - definitions[`@_xmlns:included${includedIndex}`] = importedModelNamespace; - } -} diff --git a/packages/dmn-editor/src/mutations/addOrGetDrd.ts b/packages/dmn-editor/src/mutations/addOrGetDrd.ts index 6cf19f7928c..cdeaa54ef70 100644 --- a/packages/dmn-editor/src/mutations/addOrGetDrd.ts +++ b/packages/dmn-editor/src/mutations/addOrGetDrd.ts @@ -19,7 +19,7 @@ import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; export function getDefaultDrdName({ drdIndex }: { drdIndex: number }) { return drdIndex === 0 ? "Default DRD" : "Unnamed DRD"; diff --git a/packages/dmn-editor/src/mutations/addShape.ts b/packages/dmn-editor/src/mutations/addShape.ts index f81585b9106..8204be4086a 100644 --- a/packages/dmn-editor/src/mutations/addShape.ts +++ b/packages/dmn-editor/src/mutations/addShape.ts @@ -22,9 +22,9 @@ import { DMN15__tDefinitions, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { NodeType } from "../diagram/connections/graphStructure"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; -import { Normalized } from "../normalization/normalize"; import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; diff --git a/packages/dmn-editor/src/mutations/addStandaloneNode.ts b/packages/dmn-editor/src/mutations/addStandaloneNode.ts index ce78b8b3ac9..e400c667ace 100644 --- a/packages/dmn-editor/src/mutations/addStandaloneNode.ts +++ b/packages/dmn-editor/src/mutations/addStandaloneNode.ts @@ -20,14 +20,14 @@ import { switchExpression } from "@kie-tools-core/switch-expression-ts"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DC__Bounds, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { NodeType } from "../diagram/connections/graphStructure"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { NodeNature, nodeNatures } from "./NodeNature"; import { addOrGetDrd as getDefaultDiagram } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; -import { buildXmlHref } from "../xml/xmlHrefs"; -import { Normalized } from "../normalization/normalize"; import { ExternalModelsIndex } from "../DmnEditor"; export function addStandaloneNode({ diff --git a/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts b/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts index f1ab338af15..a65d6cbfc56 100644 --- a/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts +++ b/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts @@ -21,8 +21,8 @@ import { DMN15__tDefinitions, DMN15__tItemDefinition, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { getNewItemDefinition } from "../dataTypes/DataTypeSpec"; -import { Normalized } from "../normalization/normalize"; export function addTopLevelItemDefinition({ definitions, diff --git a/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts index baf78e2994e..26ddb0f9c3b 100644 --- a/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts +++ b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts @@ -18,6 +18,7 @@ */ import { DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import * as Elk from "elkjs/lib/elk.bundled.js"; import * as RF from "reactflow"; @@ -30,7 +31,6 @@ import { addEdge } from "../mutations/addEdge"; import { repositionNode } from "../mutations/repositionNode"; import { resizeNode } from "../mutations/resizeNode"; import { updateDecisionServiceDividerLine } from "../mutations/updateDecisionServiceDividerLine"; -import { Normalized } from "../normalization/normalize"; import { State } from "../store/Store"; import { AutolayoutParentNode, FAKE_MARKER, visitNodeAndNested } from "../autolayout/autoLayoutInfo"; import { ExternalDmnsIndex, ExternalModelsIndex } from "../DmnEditor"; diff --git a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts index 81f09c3c518..0893b42d317 100644 --- a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts +++ b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts @@ -18,9 +18,9 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { repopulateInputDataAndDecisionsOnDecisionService } from "./repopulateInputDataAndDecisionsOnDecisionService"; -import { Normalized } from "../normalization/normalize"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; import { ExternalModelsIndex } from "../DmnEditor"; export function deleteDecisionFromDecisionService({ diff --git a/packages/dmn-editor/src/mutations/deleteEdge.ts b/packages/dmn-editor/src/mutations/deleteEdge.ts index 38846da5c73..ceaec6adee9 100644 --- a/packages/dmn-editor/src/mutations/deleteEdge.ts +++ b/packages/dmn-editor/src/mutations/deleteEdge.ts @@ -23,11 +23,11 @@ import { DMN15__tDefinitions, DMNDI15__DMNEdge, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefToQName"; import { addOrGetDrd } from "./addOrGetDrd"; import { DmnDiagramEdgeData } from "../diagram/edges/Edges"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; -import { Normalized } from "../normalization/normalize"; -import { xmlHrefToQName } from "../xml/xmlHrefToQName"; import { ExternalModelsIndex } from "../DmnEditor"; export enum EdgeDeletionMode { diff --git a/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts index ca03b38b03f..e8b77624d90 100644 --- a/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts @@ -18,8 +18,8 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { addOrGetDrd } from "./addOrGetDrd"; -import { Normalized } from "../normalization/normalize"; export function deleteEdgeWaypoint({ definitions, diff --git a/packages/dmn-editor/src/mutations/deleteImport.ts b/packages/dmn-editor/src/mutations/deleteImport.ts index 4195c39afa2..5ab74798b7e 100644 --- a/packages/dmn-editor/src/mutations/deleteImport.ts +++ b/packages/dmn-editor/src/mutations/deleteImport.ts @@ -18,8 +18,8 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { getXmlNamespaceDeclarationName } from "../xml/xmlNamespaceDeclarations"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { getXmlNamespaceDeclarationName } from "@kie-tools/dmn-marshaller/dist/xml/xmlNamespaceDeclarations"; import { computeDiagramData } from "../store/computed/computeDiagramData"; import { deleteNode, NodeDeletionMode } from "./deleteNode"; import { nodeNatures } from "./NodeNature"; diff --git a/packages/dmn-editor/src/mutations/deleteNode.ts b/packages/dmn-editor/src/mutations/deleteNode.ts index 5782ec13b86..0133ee02200 100644 --- a/packages/dmn-editor/src/mutations/deleteNode.ts +++ b/packages/dmn-editor/src/mutations/deleteNode.ts @@ -18,19 +18,18 @@ */ import { DMN15__tDefinitions, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { getNewDmnIdRandomizer } from "@kie-tools/dmn-marshaller/dist/idRandomizer/dmnIdRandomizer"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml"; import { NodeNature } from "./NodeNature"; import { addOrGetDrd } from "./addOrGetDrd"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { XmlQName, buildXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; -import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; -import { buildXmlHref } from "../xml/xmlHrefs"; import { Unpacked } from "../tsExt/tsExt"; import { DrgEdge } from "../diagram/graph/graph"; import { EdgeDeletionMode, deleteEdge } from "./deleteEdge"; import { Computed } from "../store/Store"; import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts"; -import { xmlHrefToQName } from "../xml/xmlHrefToQName"; -import { Normalized } from "../normalization/normalize"; import { ExternalDmnsIndex, ExternalModelsIndex } from "../DmnEditor"; export enum NodeDeletionMode { diff --git a/packages/dmn-editor/src/mutations/renameImport.ts b/packages/dmn-editor/src/mutations/renameImport.ts index 5b2821f18fd..b10dc6f9cd2 100644 --- a/packages/dmn-editor/src/mutations/renameImport.ts +++ b/packages/dmn-editor/src/mutations/renameImport.ts @@ -22,6 +22,7 @@ import { DMN15__tFunctionDefinition, DMN15__tLiteralExpression, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { traverseExpressionsInExpressionHolders, traverseItemDefinitions, @@ -31,7 +32,6 @@ import { buildFeelQName, parseFeelQName } from "../feel/parseFeelQName"; import { DataTypeIndex } from "../dataTypes/DataTypes"; import { DMN15__tContext } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; -import { Normalized } from "../normalization/normalize"; export function renameImport({ definitions, diff --git a/packages/dmn-editor/src/mutations/renameItemDefinition.ts b/packages/dmn-editor/src/mutations/renameItemDefinition.ts index 8de71e9be32..e6048862f30 100644 --- a/packages/dmn-editor/src/mutations/renameItemDefinition.ts +++ b/packages/dmn-editor/src/mutations/renameItemDefinition.ts @@ -23,8 +23,8 @@ import { traverseItemDefinitions, traverseTypeRefedInExpressionHolders, } from "../dataTypes/DataTypeSpec"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DataTypeIndex } from "../dataTypes/DataTypes"; -import { Normalized } from "../normalization/normalize"; export function renameItemDefinition({ definitions, diff --git a/packages/dmn-editor/src/mutations/renameNode.ts b/packages/dmn-editor/src/mutations/renameNode.ts index bc15f5246c6..43ccb802c18 100644 --- a/packages/dmn-editor/src/mutations/renameNode.ts +++ b/packages/dmn-editor/src/mutations/renameNode.ts @@ -22,7 +22,7 @@ import { DMN15__tGroup, DMN15__tTextAnnotation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function renameDrgElement({ diff --git a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts index 35f4e6c2102..47e51225e88 100644 --- a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts +++ b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts @@ -21,9 +21,9 @@ import { DMN15__tDecisionService, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { ExternalModelsIndex } from "../DmnEditor"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; export function repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions, diff --git a/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts index c577b2f4926..21e7375b969 100644 --- a/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts @@ -18,8 +18,8 @@ */ import { DC__Point, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { addOrGetDrd } from "./addOrGetDrd"; -import { Normalized } from "../normalization/normalize"; export function repositionEdgeWaypoint({ definitions, diff --git a/packages/dmn-editor/src/mutations/repositionNode.ts b/packages/dmn-editor/src/mutations/repositionNode.ts index 2e27f1497f8..7ead8953bd0 100644 --- a/packages/dmn-editor/src/mutations/repositionNode.ts +++ b/packages/dmn-editor/src/mutations/repositionNode.ts @@ -23,11 +23,11 @@ import { DMNDI15__DMNEdge, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { NodeType } from "../diagram/connections/graphStructure"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; -import { Normalized } from "../normalization/normalize"; export function repositionNode({ definitions, diff --git a/packages/dmn-editor/src/mutations/resizeNode.ts b/packages/dmn-editor/src/mutations/resizeNode.ts index ee991a1cc90..bbccba8048a 100644 --- a/packages/dmn-editor/src/mutations/resizeNode.ts +++ b/packages/dmn-editor/src/mutations/resizeNode.ts @@ -24,6 +24,7 @@ import { DMNDI15__DMNEdge, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { snapShapeDimensions, snapShapePosition } from "../diagram/SnapGrid"; import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; import { NodeType } from "../diagram/connections/graphStructure"; @@ -33,7 +34,6 @@ import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { SnapGrid } from "../store/Store"; import { addOrGetDrd } from "./addOrGetDrd"; import { DECISION_SERVICE_DIVIDER_LINE_PADDING } from "./updateDecisionServiceDividerLine"; -import { Normalized } from "../normalization/normalize"; import { ExternalDmnsIndex } from "../DmnEditor"; export function resizeNode({ diff --git a/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts b/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts index 3461fd68fe5..daebac4cb93 100644 --- a/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts +++ b/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts @@ -24,14 +24,14 @@ import { DMNDI15__DMNDecisionServiceDividerLine, DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { addNamespaceToHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { addOrGetDrd } from "./addOrGetDrd"; import { snapShapeDimensions, snapShapePosition } from "../diagram/SnapGrid"; import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { SnapGrid } from "../store/Store"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; -import { addNamespaceToHref } from "../xml/xmlHrefs"; import { ExternalDmnsIndex } from "../DmnEditor"; export const DECISION_SERVICE_DIVIDER_LINE_PADDING = 100; diff --git a/packages/dmn-editor/src/mutations/updateExpression.ts b/packages/dmn-editor/src/mutations/updateExpression.ts index f81bc318ed3..5087508a22c 100644 --- a/packages/dmn-editor/src/mutations/updateExpression.ts +++ b/packages/dmn-editor/src/mutations/updateExpression.ts @@ -22,8 +22,8 @@ import { DMN15__tDefinitions, DMN15__tFunctionDefinition, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { renameDrgElement } from "./renameNode"; -import { Normalized } from "../normalization/normalize"; export function updateExpression({ definitions, diff --git a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts index 51574efcec8..a49923cea8a 100644 --- a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts +++ b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts @@ -18,8 +18,8 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { addOrGetDrd } from "./addOrGetDrd"; -import { Normalized } from "../normalization/normalize"; export function updateExpressionWidths({ definitions, diff --git a/packages/dmn-editor/src/normalization/autoGenerateDrd.ts b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts index 5b2ef11a65e..0ed052a1ce8 100644 --- a/packages/dmn-editor/src/normalization/autoGenerateDrd.ts +++ b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts @@ -25,14 +25,14 @@ import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { getNodeTypeFromDmnObject } from "../diagram/maths/DmnMaths"; import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; -import { parseXmlHref } from "../xml/xmlHrefs"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { computeIndexedDrd } from "../store/computed/computeIndexes"; import { getDefaultDrdName } from "../mutations/addOrGetDrd"; import { addShape } from "../mutations/addShape"; import { addEdge } from "../mutations/addEdge"; import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; -import { Normalized } from "./normalize"; export async function autoGenerateDrd(args: { model: State["dmn"]["model"]; diff --git a/packages/dmn-editor/src/pmml/pmml.ts b/packages/dmn-editor/src/pmml/pmml.ts index 5fed0e6df35..7b3c647eb06 100644 --- a/packages/dmn-editor/src/pmml/pmml.ts +++ b/packages/dmn-editor/src/pmml/pmml.ts @@ -18,9 +18,9 @@ */ import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { buildXmlHref } from "../xml/xmlHrefs"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import * as __path from "path"; -import { Normalized } from "../normalization/normalize"; export const KIE_PMML_NAMESPACE = "https://kie.org/pmml"; diff --git a/packages/dmn-editor/src/propertiesPanel/BeePropertiesPanel.tsx b/packages/dmn-editor/src/propertiesPanel/BeePropertiesPanel.tsx index 5707a3ed75f..7f28ab97209 100644 --- a/packages/dmn-editor/src/propertiesPanel/BeePropertiesPanel.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BeePropertiesPanel.tsx @@ -24,9 +24,9 @@ import { DrawerHead, DrawerPanelContent, } from "@patternfly/react-core/dist/js/components/Drawer"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { useMemo } from "react"; -import { buildXmlHref } from "../xml/xmlHrefs"; import { SingleNodeProperties } from "./SingleNodeProperties"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; diff --git a/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx b/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx index dc91036dc27..a46e4522655 100644 --- a/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx @@ -19,6 +19,7 @@ import * as React from "react"; import { DMN15__tBusinessKnowledgeModel } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; @@ -30,7 +31,6 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanel.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanel.tsx index 6c676742955..b0584882d8f 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanel.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanel.tsx @@ -25,7 +25,7 @@ import { DrawerPanelContent, } from "@patternfly/react-core/dist/js/components/Drawer"; import { useMemo } from "react"; -import { buildXmlHref } from "../xml/xmlHrefs"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { SingleNodeProperties } from "./SingleNodeProperties"; import { generateBoxedExpressionIndex } from "../boxedExpressions/boxedExpressionIndex"; import { Form, FormSection } from "@patternfly/react-core/dist/js/components/Form"; @@ -35,7 +35,6 @@ import { DecisionTableOutputHeaderCell } from "./BoxedExpressionPropertiesPanelC import { LiteralExpressionContentCell } from "./BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell"; import { ExpressionRootCell } from "./BoxedExpressionPropertiesPanelComponents/ExpressionRootCell"; import { DecisionTableInputRule } from "./BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell"; -import { AllExpressions } from "../dataTypes/DataTypeSpec"; import { DecisionTableRootCell } from "./BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell"; import { InvocationFunctionCallCell } from "./BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell"; import { FunctionDefinitionParameterCell } from "./BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell"; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx index 4bc7ed0cac8..ec91b469980 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx @@ -21,10 +21,10 @@ import * as React from "react"; import { useMemo } from "react"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tContext, DMN15__tInformationItem } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; import { useDmnEditorStore } from "../../store/StoreContext"; -import { Normalized } from "../../normalization/normalize"; export function ContextInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx index af49cd0d7fc..7dbe7d13a1f 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx @@ -23,8 +23,9 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { ContentField, DescriptionField, ExpressionLanguageField, NameField, TypeRefField } from "./Fields"; import { FormGroup, FormSection } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tInputClause } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditor } from "../../DmnEditorContext"; -import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { PropertiesPanelHeader } from "../PropertiesPanelHeader"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; @@ -32,7 +33,6 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; -import { Normalized } from "../../normalization/normalize"; export function DecisionTableInputHeaderCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx index 00b416f197d..c7b49b928df 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx @@ -22,6 +22,7 @@ import { useMemo } from "react"; import { DescriptionField, ExpressionLanguageField, TypeRefField } from "./Fields"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tDecisionTable, DMN15__tUnaryTests } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; @@ -30,7 +31,6 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditor } from "../../DmnEditorContext"; import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../../normalization/normalize"; export function DecisionTableInputRule(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadOnly: boolean }) { const dmnEditorStoreApi = useDmnEditorStoreApi(); diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx index 3168c723aad..46dca185da5 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx @@ -23,6 +23,8 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { ContentField, DescriptionField, ExpressionLanguageField, NameField, TypeRefField } from "./Fields"; import { FormGroup, FormSection } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tDecision, DMN15__tOutputClause } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { PropertiesPanelHeader } from "../PropertiesPanelHeader"; import { BoxedDecisionTable, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useDmnEditor } from "../../DmnEditorContext"; @@ -32,9 +34,7 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; -import { Normalized } from "../../normalization/normalize"; import { renameDrgElement } from "../../mutations/renameNode"; -import { buildXmlHref } from "../../xml/xmlHrefs"; export function DecisionTableOutputHeaderCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx index 593b9d7ce8d..c65bad38d39 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx @@ -25,6 +25,7 @@ import { DMN15__tDecisionTable, DMN15__tLiteralExpression, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; @@ -33,7 +34,6 @@ import { BoxedDecisionTable, DmnBuiltInDataType } from "@kie-tools/boxed-express import { useDmnEditor } from "../../DmnEditorContext"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../../normalization/normalize"; export function DecisionTableOutputRuleCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx index 22bca2440df..bbc22e5fb58 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx @@ -22,11 +22,11 @@ import { useMemo } from "react"; import { DescriptionField, TextField, TextFieldType } from "./Fields"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tDecisionTable } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { useDmnEditorStore } from "../../store/StoreContext"; -import { Normalized } from "../../normalization/normalize"; type DecisionTableRoot = Pick< Normalized, diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx index 445cf834c05..d946840c174 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx @@ -29,13 +29,13 @@ import { DMN15__tFunctionDefinition, DMN15__tInformationItem, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { PropertiesPanelHeader } from "../PropertiesPanelHeader"; import { Text } from "@patternfly/react-core/dist/js/components/Text"; import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constraints"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; -import { Normalized } from "../../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function FunctionDefinitionParameterCell(props: { diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx index 6a3c0f91aa7..4d85f287b9d 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx @@ -25,8 +25,8 @@ import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tFunctionDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../../store/StoreContext"; -import { Normalized } from "../../normalization/normalize"; type FunctionDefinitionRoot = Pick< Normalized, diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx index 812559ffafe..9e6f0181466 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx @@ -22,15 +22,14 @@ import { useCallback, useMemo } from "react"; import { DescriptionField, NameField, TypeRefField } from "./Fields"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tInformationItem } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useDmnEditor } from "../../DmnEditorContext"; -import { Constraints, ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constraints"; +import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constraints"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; -import { Normalized } from "../../normalization/normalize"; export function InformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx index 3bf809756d9..49af9d91377 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx @@ -24,7 +24,7 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { DMN15__tLiteralExpression } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; export function InvocationFunctionCallCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx index 71d9917cbe4..7069529f9e5 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx @@ -24,10 +24,10 @@ import { DMN15__tInformationItem, DMN15__tInvocation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; -import { Normalized } from "../../normalization/normalize"; export function InvocationInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx index 036026ed35d..62844db0930 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx @@ -24,7 +24,7 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { DMN15__tIterator } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { Normalized } from "../../normalization/normalize"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; export function IteratorVariableCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadOnly: boolean }) { const selectedObjectId = useDmnEditorStore((s) => s.boxedExpressionEditor.selectedObjectId); diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx index e0c1413ca06..320e163f353 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx @@ -22,11 +22,11 @@ import { useMemo } from "react"; import { DescriptionField, ExpressionLanguageField } from "./Fields"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tLiteralExpression } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; -import { Normalized } from "../../normalization/normalize"; export function LiteralExpressionContentCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx index 9b35db2b365..bf12fa4de1a 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx @@ -21,10 +21,10 @@ import * as React from "react"; import { useMemo } from "react"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; import { DMN15__tInformationItem } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; -import { Normalized } from "../../normalization/normalize"; export function RelationInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts index 1b4ab772cba..75c07a63f44 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts @@ -23,11 +23,11 @@ import { DMN15__tBusinessKnowledgeModel, DMN15__tDecision, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; -import { buildXmlHref } from "../../xml/xmlHrefs"; import { AllExpressionsWithoutTypes } from "../../dataTypes/DataTypeSpec"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../../normalization/normalize"; export function useBoxedExpressionUpdater( expressionPath: ExpressionPath[] | undefined diff --git a/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx b/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx index dad07ad505a..a48ddfec3aa 100644 --- a/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx @@ -19,6 +19,7 @@ import * as React from "react"; import { DMN15__tDecision } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; @@ -30,7 +31,6 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx index 39822a2f402..19102553b35 100644 --- a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx @@ -25,6 +25,8 @@ import { DMN15__tInputData, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, parseXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; @@ -32,7 +34,6 @@ import { DocumentationLinksFormGroup } from "./DocumentationLinksFormGroup"; import { TypeRefSelector } from "../dataTypes/TypeRefSelector"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { useCallback, useMemo } from "react"; -import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; import { DmnObjectListItem } from "../externalNodes/DmnObjectListItem"; import { renameDrgElement } from "../mutations/renameNode"; import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; @@ -43,7 +44,6 @@ import { useExternalModels } from "../includedModels/DmnEditorDependenciesContex import { DragAndDrop, Draggable } from "../draggable/Draggable"; import { buildFeelQNameFromNamespace } from "../feel/buildFeelQName"; import { Alert, AlertVariant } from "@patternfly/react-core/dist/js/components/Alert/Alert"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { ExternalDmn } from "../DmnEditor"; import { Unpacked } from "../tsExt/tsExt"; diff --git a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx index fdd067c5386..ff3229e8d19 100644 --- a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx +++ b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx @@ -18,6 +18,7 @@ */ import { DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button"; import { FormSection } from "@patternfly/react-core/dist/js/components/Form"; import { NumberInput } from "@patternfly/react-core/dist/js/components/NumberInput"; @@ -36,7 +37,6 @@ import { ColorPicker } from "./ColorPicker"; import { PropertiesPanelHeader } from "./PropertiesPanelHeader"; import "./FontOptions.css"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; // https://www.w3schools.com/cssref/css_websafe_fonts.php diff --git a/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx b/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx index aa496c3110a..b18d32d55e5 100644 --- a/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx @@ -19,13 +19,13 @@ import * as React from "react"; import { DMN15__tGroup } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput"; import { useDmnEditorStoreApi } from "../store/StoreContext"; import { renameGroupNode } from "../mutations/renameNode"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; export function GroupProperties({ group, index }: { group: Normalized; index: number }) { diff --git a/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx b/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx index cc8f0de3efd..e3baada963f 100644 --- a/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx @@ -19,6 +19,7 @@ import * as React from "react"; import { DMN15__tInputData } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; @@ -30,7 +31,6 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx b/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx index 35806a36ee9..3c1586c84e8 100644 --- a/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx @@ -19,6 +19,7 @@ import * as React from "react"; import { DMN15__tKnowledgeSource } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; @@ -28,7 +29,6 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { renameDrgElement } from "../mutations/renameNode"; import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useCallback } from "react"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; export function KnowledgeSourceProperties({ diff --git a/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx b/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx index 9bfa883ded1..f2808c3ec28 100644 --- a/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx +++ b/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx @@ -24,6 +24,7 @@ import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput"; import { CubeIcon } from "@patternfly/react-icons/dist/js/icons/cube-icon"; import { PropertiesPanelHeader } from "./PropertiesPanelHeader"; import { DC__Bounds, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { State } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { addOrGetDrd } from "../mutations/addOrGetDrd"; @@ -39,7 +40,6 @@ import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NodeType } from "../diagram/connections/graphStructure"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button"; import { DC__Dimension } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_2/ts-gen/types"; -import { Normalized } from "../normalization/normalize"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useSettings } from "../settings/DmnEditorSettingsContext"; diff --git a/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx b/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx index 2be84cd41d7..2e1060e7273 100644 --- a/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx @@ -41,6 +41,7 @@ import { DMN15__tKnowledgeSource, DMN15__tTextAnnotation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { getNodeTypeFromDmnObject } from "../diagram/maths/DmnMaths"; import { NodeIcon } from "../icons/Icons"; import { GroupProperties } from "./GroupProperties"; @@ -50,7 +51,6 @@ import { PropertiesPanelHeader } from "./PropertiesPanelHeader"; import { UnknownProperties } from "./UnknownProperties"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import "./SingleNodeProperties.css"; -import { Normalized } from "../normalization/normalize"; export function SingleNodeProperties({ nodeId }: { nodeId: string }) { const dmnEditorStoreApi = useDmnEditorStoreApi(); diff --git a/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx b/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx index d0dc580df6d..f5857e4cffd 100644 --- a/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx @@ -19,13 +19,13 @@ import * as React from "react"; import { DMN15__tTextAnnotation } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput"; import { useDmnEditorStoreApi } from "../store/StoreContext"; import { updateTextAnnotation } from "../mutations/renameNode"; -import { Normalized } from "../normalization/normalize"; import { useSettings } from "../settings/DmnEditorSettingsContext"; export function TextAnnotationProperties({ diff --git a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx index 32782b41c2e..1addbafad04 100644 --- a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx @@ -20,6 +20,7 @@ import * as React from "react"; import { Alert, AlertVariant } from "@patternfly/react-core/dist/js/components/Alert/Alert"; import { DMN15__tDefinitions, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { useDmnEditorStore } from "../store/StoreContext"; import { useMemo } from "react"; import { Unpacked } from "../tsExt/tsExt"; @@ -28,7 +29,6 @@ import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components import { useDmnEditor } from "../DmnEditorContext"; import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; -import { Normalized } from "../normalization/normalize"; export function UnknownProperties(props: { shape: Normalized; dmnElementRefQName: XmlQName }) { const thisDmn = useDmnEditorStore((s) => s.dmn); diff --git a/packages/dmn-editor/src/store/Store.ts b/packages/dmn-editor/src/store/Store.ts index 702fb19b3ec..aa9658991aa 100644 --- a/packages/dmn-editor/src/store/Store.ts +++ b/packages/dmn-editor/src/store/Store.ts @@ -18,6 +18,7 @@ */ import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; +import { normalize, Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { enableMapSet } from "immer"; import * as RF from "reactflow"; @@ -25,7 +26,6 @@ import { create } from "zustand"; import { immer } from "zustand/middleware/immer"; import { ExternalModelsIndex } from "../DmnEditor"; import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; -import { normalize, Normalized } from "../normalization/normalize"; import { ComputedStateCache } from "./ComputedStateCache"; import { computeAllFeelVariableUniqueNames } from "./computed/computeAllFeelVariableUniqueNames"; import { computeDataTypes } from "./computed/computeDataTypes"; diff --git a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts index 3ab2a584842..534f24e9af8 100644 --- a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts +++ b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts @@ -18,7 +18,7 @@ */ import { getDecisionServicePropertiesRelativeToThisDmn } from "../../mutations/addExistingDecisionServiceToDrd"; -import { buildXmlHref } from "../../xml/xmlHrefs"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { State } from "../Store"; export function computeContainingDecisionServiceHrefsByDecisionHrefs({ diff --git a/packages/dmn-editor/src/store/computed/computeDataTypes.ts b/packages/dmn-editor/src/store/computed/computeDataTypes.ts index 4670400ad60..704448fb005 100644 --- a/packages/dmn-editor/src/store/computed/computeDataTypes.ts +++ b/packages/dmn-editor/src/store/computed/computeDataTypes.ts @@ -19,12 +19,12 @@ import { DMN15__tImport, DMN15__tItemDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { UniqueNameIndex } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { builtInFeelTypeNames } from "../../dataTypes/BuiltInFeelTypes"; import { DataType, DataTypeIndex } from "../../dataTypes/DataTypes"; import { buildFeelQNameFromNamespace } from "../../feel/buildFeelQName"; import { TypeOrReturnType } from "../ComputedStateCache"; import { Computed, State } from "../Store"; -import { Normalized } from "../../normalization/normalize"; export function computeDataTypes( namespace: State["dmn"]["model"]["definitions"]["@_namespace"], diff --git a/packages/dmn-editor/src/store/computed/computeDiagramData.ts b/packages/dmn-editor/src/store/computed/computeDiagramData.ts index 6205dc4c921..c5722448786 100644 --- a/packages/dmn-editor/src/store/computed/computeDiagramData.ts +++ b/packages/dmn-editor/src/store/computed/computeDiagramData.ts @@ -21,6 +21,8 @@ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn- import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import * as RF from "reactflow"; import { KIE_DMN_UNKNOWN_NAMESPACE } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref, parseXmlHref, xmlHrefToQName } from "@kie-tools/dmn-marshaller/dist/xml"; import { snapShapeDimensions, snapShapePosition } from "../../diagram/SnapGrid"; import { EdgeType, NodeType } from "../../diagram/connections/graphStructure"; import { EDGE_TYPES } from "../../diagram/edges/EdgeTypes"; @@ -32,13 +34,10 @@ import { ___NASTY_HACK_FOR_SAFARI_to_force_redrawing_svgs_and_avoid_repaint_glit import { NODE_TYPES } from "../../diagram/nodes/NodeTypes"; import { DmnDiagramNodeData, NodeDmnObjects } from "../../diagram/nodes/Nodes"; import { Unpacked } from "../../tsExt/tsExt"; -import { buildXmlHref, parseXmlHref } from "../../xml/xmlHrefs"; import { TypeOrReturnType } from "../ComputedStateCache"; import { Computed, State } from "../Store"; import { getDecisionServicePropertiesRelativeToThisDmn } from "../../mutations/addExistingDecisionServiceToDrd"; -import { Normalized } from "../../normalization/normalize"; import { KIE_UNKNOWN_NAMESPACE } from "../../kie/kie"; -import { xmlHrefToQName } from "../../xml/xmlHrefToQName"; export const NODE_LAYERS = { GROUP_NODE: 0, diff --git a/packages/dmn-editor/src/store/computed/computeIndexes.ts b/packages/dmn-editor/src/store/computed/computeIndexes.ts index de381e762ce..dd7867ae53f 100644 --- a/packages/dmn-editor/src/store/computed/computeIndexes.ts +++ b/packages/dmn-editor/src/store/computed/computeIndexes.ts @@ -17,12 +17,12 @@ * under the License. */ -import { DMNDI15__DMNEdge, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { XmlQName, parseXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; +import { DMNDI15__DMNEdge, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { KIE_DMN_UNKNOWN_NAMESPACE } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; -import { buildXmlHref } from "../../xml/xmlHrefs"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; +import { buildXmlHref } from "@kie-tools/dmn-marshaller/dist/xml/xmlHrefs"; import { Computed, State } from "../Store"; -import { Normalized } from "../../normalization/normalize"; export function computeIndexedDrd( thisDmnsNamespace: string, diff --git a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx index 56d74dee53c..3d9922f2118 100644 --- a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx +++ b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx @@ -24,7 +24,7 @@ import "@patternfly/react-core/dist/styles/base.css"; import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex"; import { Page, PageSection } from "@patternfly/react-core/dist/js/components/Page"; import { DmnLatestModel, DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller"; -import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize, Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { availableModelsByPath, modelsByNamespace } from "./availableModelsToInclude"; import { generateEmptyDmn15 } from "../misc/empty/Empty.stories"; import { loanPreQualificationDmn } from "../useCases/loanPreQualification/LoanPreQualification.stories"; diff --git a/packages/dmn-editor/stories/dev/availableModelsToInclude.ts b/packages/dmn-editor/stories/dev/availableModelsToInclude.ts index a2cace85153..bca1dd1eb59 100644 --- a/packages/dmn-editor/stories/dev/availableModelsToInclude.ts +++ b/packages/dmn-editor/stories/dev/availableModelsToInclude.ts @@ -18,7 +18,7 @@ */ import { getMarshaller } from "@kie-tools/dmn-marshaller"; -import { normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { XML2PMML } from "@kie-tools/pmml-editor-marshaller"; import * as DmnEditor from "../../src/DmnEditor"; import { getPmmlNamespace } from "../../src/pmml/pmml"; diff --git a/packages/dmn-editor/stories/dmnEditorStoriesWrapper.tsx b/packages/dmn-editor/stories/dmnEditorStoriesWrapper.tsx index 17b58fc7283..25191c97e9e 100644 --- a/packages/dmn-editor/stories/dmnEditorStoriesWrapper.tsx +++ b/packages/dmn-editor/stories/dmnEditorStoriesWrapper.tsx @@ -22,7 +22,7 @@ import { useCallback, useState, useRef, useMemo, useEffect } from "react"; import { useArgs } from "@storybook/preview-api"; import { DmnEditor, DmnEditorProps, DmnEditorRef, EvaluationResults, ValidationMessages } from "../src/DmnEditor"; import { DmnLatestModel, getMarshaller } from "@kie-tools/dmn-marshaller"; -import { normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { diff } from "deep-object-diff"; import { generateEmptyDmn15 } from "./misc/empty/Empty.stories"; diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx index 388de3a4ff7..7bd165e1b8b 100644 --- a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx +++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx @@ -32,9 +32,9 @@ import { OnRequestExternalModelsAvailableToInclude, OnDmnModelChange, } from "@kie-tools/dmn-editor/dist/DmnEditor"; -import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize, Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; -import { DmnEditorWrapper, StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper"; +import { DmnEditorWrapper } from "../../dmnEditorStoriesWrapper"; import { availableModelsByPath, modelsByNamespace } from "./availableModelsToInclude"; diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts index 46bb7291be0..a46faf4fd42 100644 --- a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts +++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts @@ -18,7 +18,7 @@ */ import { getMarshaller } from "@kie-tools/dmn-marshaller"; -import { normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize"; +import { normalize } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { XML2PMML } from "@kie-tools/pmml-editor-marshaller"; import * as DmnEditor from "@kie-tools/dmn-editor/dist/DmnEditor"; import { getPmmlNamespace } from "@kie-tools/dmn-editor/dist/pmml/pmml"; diff --git a/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts b/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts index a7ab7490158..17c60cd24dc 100644 --- a/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts +++ b/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts @@ -17,10 +17,10 @@ * under the License. */ -import { Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize"; import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { KIE__tComponentsWidthsExtension } from "@kie-tools/dmn-marshaller/dist/schemas/kie-1_0/ts-gen/types"; +import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize"; import { updateExpressionWidths } from "@kie-tools/dmn-editor/dist/mutations/updateExpressionWidths"; describe("updateExpressionWidth", () => { diff --git a/packages/dmn-marshaller/package.json b/packages/dmn-marshaller/package.json index da8c37a3140..e33a18a59fb 100644 --- a/packages/dmn-marshaller/package.json +++ b/packages/dmn-marshaller/package.json @@ -33,7 +33,8 @@ "test": "rimraf dist-tests && run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { - "@kie-tools/xml-parser-ts": "workspace:*" + "@kie-tools/xml-parser-ts": "workspace:*", + "uuid": "^8.3.2" }, "devDependencies": { "@babel/core": "^7.16.0", @@ -49,6 +50,7 @@ "@types/jest": "^29.5.12", "@types/jest-when": "^3.5.5", "@types/react": "^17.0.6", + "@types/uuid": "^8.3.0", "jest": "^29.7.0", "jest-junit": "^16.0.0", "jest-when": "^3.6.0", diff --git a/packages/dmn-editor/src/idRandomizer/dmnIdRandomizer.tsx b/packages/dmn-marshaller/src/idRandomizer/dmnIdRandomizer.ts similarity index 88% rename from packages/dmn-editor/src/idRandomizer/dmnIdRandomizer.tsx rename to packages/dmn-marshaller/src/idRandomizer/dmnIdRandomizer.ts index b5e6e7c06b3..50a3fe9ce58 100644 --- a/packages/dmn-editor/src/idRandomizer/dmnIdRandomizer.tsx +++ b/packages/dmn-marshaller/src/idRandomizer/dmnIdRandomizer.ts @@ -17,19 +17,16 @@ * under the License. */ -import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; -import { - elements as dmn15elements, - meta as dmn15meta, -} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/meta"; +import { v4 as uuid } from "uuid"; import { XmlParserTsIdRandomizer, XmlParserTsIdRandomizerMatcher } from "@kie-tools/xml-parser-ts/dist/idRandomizer"; +import { elements as dmn15elements, meta as dmn15meta } from "../schemas/dmn-1_5/ts-gen/meta"; import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; export function getNewDmnIdRandomizer() { return new XmlParserTsIdRandomizer({ meta: dmn15meta, elements: dmn15elements, - newIdGenerator: generateUuid, + newIdGenerator: () => `_${uuid()}`.toLocaleUpperCase(), matchers: [tDmnElementReferenceIdRandomizerMatcher], }); } diff --git a/packages/dmn-editor/src/normalization/normalize.ts b/packages/dmn-marshaller/src/normalization/normalize.ts similarity index 62% rename from packages/dmn-editor/src/normalization/normalize.ts rename to packages/dmn-marshaller/src/normalization/normalize.ts index 4aa6a64ab9a..0c043610665 100644 --- a/packages/dmn-editor/src/normalization/normalize.ts +++ b/packages/dmn-marshaller/src/normalization/normalize.ts @@ -17,10 +17,9 @@ * under the License. */ -import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; +import { DmnLatestModel } from ".."; import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; -import { addMissingImportNamespaces } from "../mutations/addMissingImportNamespaces"; -import { State } from "../store/Store"; +import { DMN15__tDefinitions } from "../schemas/dmn-1_5/ts-gen/types"; export type Normalized = WithRequiredDeep; @@ -32,7 +31,7 @@ type WithRequiredDeep = T extends undefined ? { [P in K]-?: NonNullable> } : T); -export function normalize(model: DmnLatestModel): State["dmn"]["model"] { +export function normalize(model: DmnLatestModel): Normalized { getNewDmnIdRandomizer() .ack({ json: model.definitions.drgElement, @@ -67,3 +66,35 @@ export function normalize(model: DmnLatestModel): State["dmn"]["model"] { return normalizedModel; } + +function addMissingImportNamespaces(definitions: Normalized) { + if (definitions.import === undefined) { + return; + } + + // Collect all declared namespaces + const definedNamespaces = new Set( + Object.keys(definitions) + .filter((keys: keyof DMN15__tDefinitions) => String(keys).startsWith("@_xmlns:")) + .map((xmlnsKey: keyof DMN15__tDefinitions) => definitions[xmlnsKey]) + ); + + // Add missing import namespace declarations as `xmlns:included*` + let includedIndex = 0; + for (let index = 0; index < definitions.import.length; index++) { + const importedModelNamespace = definitions.import[index]["@_namespace"]; + + // Check if namespace is already declared + if (definedNamespaces.has(importedModelNamespace)) { + // Ignore namespaces that are already declared + continue; + } + + // Get next available `included*` namespace declaration name + while (definitions[`@_xmlns:included${includedIndex}`]) { + includedIndex++; + } + + definitions[`@_xmlns:included${includedIndex}`] = importedModelNamespace; + } +} diff --git a/packages/dmn-marshaller/src/xml/index.ts b/packages/dmn-marshaller/src/xml/index.ts new file mode 100644 index 00000000000..a934b9b8c31 --- /dev/null +++ b/packages/dmn-marshaller/src/xml/index.ts @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export * from "./xmlHrefs"; +export * from "./xmlHrefToQName"; +export * from "./xmlNamespaceDeclarations"; diff --git a/packages/dmn-editor/src/xml/xmlHrefToQName.ts b/packages/dmn-marshaller/src/xml/xmlHrefToQName.ts similarity index 100% rename from packages/dmn-editor/src/xml/xmlHrefToQName.ts rename to packages/dmn-marshaller/src/xml/xmlHrefToQName.ts index cda3d3b46fa..d5affd84a00 100644 --- a/packages/dmn-editor/src/xml/xmlHrefToQName.ts +++ b/packages/dmn-marshaller/src/xml/xmlHrefToQName.ts @@ -18,9 +18,9 @@ */ import { buildXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; +import { XmlParserTsRootElementBaseType } from "@kie-tools/xml-parser-ts"; import { parseXmlHref } from "./xmlHrefs"; import { getXmlNamespaceDeclarationName } from "./xmlNamespaceDeclarations"; -import { XmlParserTsRootElementBaseType } from "@kie-tools/xml-parser-ts"; export function xmlHrefToQName(hrefString: string, rootElement: XmlParserTsRootElementBaseType | undefined) { const href = parseXmlHref(hrefString); diff --git a/packages/dmn-editor/src/xml/xmlHrefs.ts b/packages/dmn-marshaller/src/xml/xmlHrefs.ts similarity index 100% rename from packages/dmn-editor/src/xml/xmlHrefs.ts rename to packages/dmn-marshaller/src/xml/xmlHrefs.ts diff --git a/packages/dmn-editor/src/xml/xmlNamespaceDeclarations.ts b/packages/dmn-marshaller/src/xml/xmlNamespaceDeclarations.ts similarity index 100% rename from packages/dmn-editor/src/xml/xmlNamespaceDeclarations.ts rename to packages/dmn-marshaller/src/xml/xmlNamespaceDeclarations.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff06cf04da9..8f2d4243af1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -861,13 +861,13 @@ importers: version: 1.67.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) + version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)) jest-junit: specifier: ^16.0.0 version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3))) rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -876,7 +876,7 @@ importers: version: 0.0.2 ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -1030,13 +1030,13 @@ importers: version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)) + version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) jest-junit: specifier: ^16.0.0 version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))) react-json-view: specifier: ^1.21.3 version: 1.21.3(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -1051,7 +1051,7 @@ importers: version: 7.4.6 ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -3856,6 +3856,9 @@ importers: '@kie-tools/xml-parser-ts': specifier: workspace:* version: link:../xml-parser-ts + uuid: + specifier: ^8.3.2 + version: 8.3.2 devDependencies: '@babel/core': specifier: ^7.16.0 @@ -3896,6 +3899,9 @@ importers: '@types/react': specifier: ^17.0.6 version: 17.0.21 + '@types/uuid': + specifier: ^8.3.0 + version: 8.3.0 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)) @@ -51232,10 +51238,6 @@ snapshots: dependencies: jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) - jest-when@3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))): - dependencies: - jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) - jest-when@3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))): dependencies: jest: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)) @@ -56809,11 +56811,11 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.16.12) esbuild: 0.15.13 - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3): + ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)) + jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -56828,24 +56830,6 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.16.12) esbuild: 0.18.20 - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.5.4 - typescript: 5.5.3 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.16.12 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.16.12) - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: bs-logger: 0.2.6