@elliemae/ds-decision-graph 3.52.1 → 3.53.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config/useDecisionGraph.js.map +2 -2
- package/dist/cjs/config/useValidateProps.js +1 -1
- package/dist/cjs/config/useValidateProps.js.map +2 -2
- package/dist/cjs/parts/mermaid/MermaidDecisionChart.js +1 -1
- package/dist/cjs/parts/mermaid/MermaidDecisionChart.js.map +2 -2
- package/dist/cjs/parts/mermaid/decisionTreeToMermaidMD.js +2 -0
- package/dist/cjs/parts/mermaid/decisionTreeToMermaidMD.js.map +2 -2
- package/dist/esm/config/useDecisionGraph.js.map +2 -2
- package/dist/esm/config/useValidateProps.js +1 -1
- package/dist/esm/config/useValidateProps.js.map +2 -2
- package/dist/esm/parts/mermaid/MermaidDecisionChart.js +1 -1
- package/dist/esm/parts/mermaid/MermaidDecisionChart.js.map +2 -2
- package/dist/esm/parts/mermaid/decisionTreeToMermaidMD.js +2 -0
- package/dist/esm/parts/mermaid/decisionTreeToMermaidMD.js.map +2 -2
- package/dist/types/config/useDecisionGraph.d.ts +182 -182
- package/dist/types/constants/index.d.ts +3 -1
- package/package.json +7 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useDecisionGraph.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSDecisionGraphT, DSDecisionGraphPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAyF;AACzF,iBAAoB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSDecisionGraphT, DSDecisionGraphPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface DecisionGraphCTX {\n propsWithDefault: DSDecisionGraphT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useDecisionGraph = (propsFromUser: DSDecisionGraphT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSDecisionGraphT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSDecisionGraphPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSDecisionGraphT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n }),\n [propsWithDefault, globalProps, xstyledProps, instanceUid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAyF;AACzF,iBAAoB;AAEpB,mCAA8E;AAC9E,8BAAiC;AAS1B,MAAM,mBAAmB,CAAC,kBAA0C;AAIzE,QAAM,uBAAmB,sDAA6D,eAAe,yCAAY;AACjH,gDAAiB,kBAAkB,qDAAwB;AAI3D,QAAM,kBAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,UAAM,gBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAO1D,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,cAAc,WAAW;AAAA,EAC3D;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -34,8 +34,8 @@ module.exports = __toCommonJS(useValidateProps_exports);
|
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
-
var import_constants = require("../constants/index.js");
|
|
38
37
|
var import_ajv = __toESM(require("ajv"));
|
|
38
|
+
var import_constants = require("../constants/index.js");
|
|
39
39
|
const useValidateProps = (props, propTypes) => {
|
|
40
40
|
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSDecisionGraphName);
|
|
41
41
|
import_react.default.useEffect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type DSDecisionGraphT } from '../react-desc-prop-types.js';\nimport { DSDecisionGraphName, JSON_SCHEMA } from '../constants/index.js';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,8BAA+C;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport Ajv from 'ajv';\nimport { type DSDecisionGraphT } from '../react-desc-prop-types.js';\nimport { DSDecisionGraphName, JSON_SCHEMA } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSDecisionGraphT.InternalProps,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSDecisionGraphName);\n React.useEffect(() => {\n const ajv = new Ajv();\n const validate = ajv.compile(JSON_SCHEMA);\n const valid = validate(props.chartJson);\n if (!valid) {\n throw new Error(`Invalid JSON: ${JSON.stringify(validate.errors)}`);\n }\n }, [props.chartJson]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,8BAA+C;AAC/C,iBAAgB;AAEhB,uBAAiD;AAE1C,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,oCAAmB;AACpE,eAAAA,QAAM,UAAU,MAAM;AACpB,UAAM,MAAM,IAAI,WAAAC,QAAI;AACpB,UAAM,WAAW,IAAI,QAAQ,4BAAW;AACxC,UAAM,QAAQ,SAAS,MAAM,SAAS;AACtC,QAAI,CAAC,OAAO;AACV,YAAM,IAAI,MAAM,iBAAiB,KAAK,UAAU,SAAS,MAAM,CAAC,EAAE;AAAA,IACpE;AAAA,EACF,GAAG,CAAC,MAAM,SAAS,CAAC;AACtB;",
|
|
6
6
|
"names": ["React", "Ajv"]
|
|
7
7
|
}
|
|
@@ -34,8 +34,8 @@ module.exports = __toCommonJS(MermaidDecisionChart_exports);
|
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_decisionTreeToMermaidMD = require("./decisionTreeToMermaidMD.js");
|
|
38
37
|
var import_mermaid = __toESM(require("mermaid"));
|
|
38
|
+
var import_decisionTreeToMermaidMD = require("./decisionTreeToMermaidMD.js");
|
|
39
39
|
const MermaidDecisionChart = (props) => {
|
|
40
40
|
const { chartJson, uid, direction } = props;
|
|
41
41
|
const mermaidRef = import_react.default.useRef(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/mermaid/MermaidDecisionChart.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\nimport { decisionTreeToMermaidMD } from './decisionTreeToMermaidMD.js';\n// https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/mermaid.ts#L367\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport mermaid from 'mermaid';\nimport type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\nimport { decisionTreeToMermaidMD } from './decisionTreeToMermaidMD.js';\n// https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/mermaid.ts#L367\n\ntype MermaidProps = {\n chartJson: DSDecisionGraphT.Props['chartJson'];\n uid: string;\n direction: DSDecisionGraphT.Directions;\n};\n\nexport const MermaidDecisionChart = (props: MermaidProps) => {\n const { chartJson, uid, direction } = props;\n const mermaidRef = React.useRef<HTMLPreElement>(null);\n // this operation should be O(1), but depending on the size of the decision tree,\n // it is still potentially beneficial to memoize it...\n const mermaidMD = React.useMemo(() => decisionTreeToMermaidMD(chartJson, direction), [chartJson, direction]);\n\n // on mount initialize mermaid\n React.useEffect(() => {\n mermaid.initialize({\n startOnLoad: false,\n });\n }, []);\n\n React.useEffect(() => {\n setTimeout(() => {\n const renderAsync = async () => {\n const { svg } = await mermaid.render(`mermaid-svg-${uid}`, mermaidMD);\n if (mermaidRef.current) {\n mermaidRef.current.innerHTML = svg;\n }\n };\n // eslint-disable-next-line no-void\n void renderAsync();\n }, 0);\n }, [mermaidMD, uid]);\n\n return <pre ref={mermaidRef} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCd;AAvCT,mBAAkB;AAClB,qBAAoB;AAEpB,qCAAwC;AASjC,MAAM,uBAAuB,CAAC,UAAwB;AAC3D,QAAM,EAAE,WAAW,KAAK,UAAU,IAAI;AACtC,QAAM,aAAa,aAAAA,QAAM,OAAuB,IAAI;AAGpD,QAAM,YAAY,aAAAA,QAAM,QAAQ,UAAM,wDAAwB,WAAW,SAAS,GAAG,CAAC,WAAW,SAAS,CAAC;AAG3G,eAAAA,QAAM,UAAU,MAAM;AACpB,mBAAAC,QAAQ,WAAW;AAAA,MACjB,aAAa;AAAA,IACf,CAAC;AAAA,EACH,GAAG,CAAC,CAAC;AAEL,eAAAD,QAAM,UAAU,MAAM;AACpB,eAAW,MAAM;AACf,YAAM,cAAc,YAAY;AAC9B,cAAM,EAAE,IAAI,IAAI,MAAM,eAAAC,QAAQ,OAAO,eAAe,GAAG,IAAI,SAAS;AACpE,YAAI,WAAW,SAAS;AACtB,qBAAW,QAAQ,YAAY;AAAA,QACjC;AAAA,MACF;AAEA,WAAK,YAAY;AAAA,IACnB,GAAG,CAAC;AAAA,EACN,GAAG,CAAC,WAAW,GAAG,CAAC;AAEnB,SAAO,4CAAC,SAAI,KAAK,YAAY;AAC/B;",
|
|
6
6
|
"names": ["React", "mermaid"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/mermaid/decisionTreeToMermaidMD.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWvB,SAAS,uBAAuB,UAAoE;AAClG,MAAI,eAA8C;AAClD,UAAQ,SAAS,OAAO,SAAS,SAAS,CAAC,GAAG;AAAA,IAC5C,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,EACJ;AACA,SAAO;AACT;AACA,SAAS,eAAe,MAA4E;AAClG,UAAQ,KAAK,mBAAmB,KAAK,oBAAoB,eAAe;AAC1E;AAEA,SAAS,gBACP,MACA,UAC+B;AAC/B,MAAI;AAEJ,MAAI,eAAe,IAAI,GAAG;AACxB,mBAAe,GAAG,MAAM,cAAc,QAAQ,MAAM,KAAK,QAAQ;AAAA,EACnE,OAAO;AACL,mBAAe,GAAG,MAAM,cAAc,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAClE;AAEA,SAAO;AACT;AAQA,MAAM,UAAU,CACd,MACA,eACA,WAAsC,QACnC;AACH,QAAM,eAAiC;AAAA,IACrC,UAAU,KAAK;AAAA,IACf,MAAM;AAAA,IACN,cAAc,gBAAgB,MAAM,QAAQ;AAAA,EAC9C;AACA,gBAAc,IAAI,UAAU,YAAY;AACxC,MAAI,KAAK,UAAU;AACjB,YAAQ,KAAK,UAAU,eAAe,GAAG,QAAQ,GAAG;AAAA,EACtD;AACA,MAAI,KAAK,WAAW;AAClB,YAAQ,KAAK,WAAW,eAAe,GAAG,QAAQ,GAAG;AAAA,EACvD;AACA,MAAI,KAAK,mBAAmB;AAC1B,YAAQ,KAAK,mBAAmB,eAAe,GAAG,QAAQ,GAAG;AAAA,EAC/D;AACF;AAOA,MAAM,sBAAsB,CAAC,aAA0F;AACrH,QAAM,gBAAkE,oBAAI,IAAI;AAChF,QAAM,gBAA+C,SAAS;AAE9D,UAAQ,eAAe,aAAa;AACpC,SAAO;AACT;AAQO,MAAM,0BAA0B,CACrC,UACA,YAAyC,SACtC;AACH,QAAM,QAAQ;AAAA,SAAe,SAAS,UAAU;AAAA;AAAA;AAChD,MAAI,YAAY,GAAG,KAAK,aAAa,SAAS;AAAA;AAE9C,QAAM,gBAAgB,oBAAoB,QAAQ;AAClD,gBAAc,QAAQ,CAAC,MAAM,aAAa;AACxC,QAAI,aAAa,IAAK;AACtB,UAAM,eAAe,SAAS,MAAM,GAAG,EAAE;AACzC,UAAM,aAAa,cAAc,IAAI,YAAY;AACjD,QAAI,YAAY;AACd,YAAM,eAAe,uBAAuB,QAAQ;AACpD,mBAAa,IAAK,WAAW,YAAY,GAAG,YAAY,GAAG,KAAK,YAAY;AAAA;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
|
|
4
|
+
"sourcesContent": ["import type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\n\n/** ************************************************************\n ***************** Mermaid Markdown Generator *****************\n ************************************************************ */\n\ntype FlatDecisionNode = {\n nodeText: string;\n path: DSDecisionGraphT.NodePath;\n nodeMarkdown?: DSDecisionGraphT.NodeMarkdown;\n};\nfunction nodePathToLinkMarkdown(nodePath: DSDecisionGraphT.NodePath): DSDecisionGraphT.LinkMarkdown {\n let linkMarkdown: DSDecisionGraphT.LinkMarkdown = '';\n switch (nodePath.charAt(nodePath.length - 1)) {\n case 't':\n linkMarkdown = `-->|true|`;\n break;\n case 'f':\n linkMarkdown = `-->|false|`;\n break;\n case 'o':\n linkMarkdown = `-->|N/A|`;\n break;\n default:\n break;\n }\n return linkMarkdown;\n}\nfunction isQuestionText(node: DSDecisionGraphT.DecisionNode): node is DSDecisionGraphT.QuestionNode {\n return (node.semanticMeaning && node.semanticMeaning === 'question') ?? false;\n}\n\nfunction nodeToMermaidMD(\n node: DSDecisionGraphT.DecisionNode,\n nodePath: DSDecisionGraphT.NodePath,\n): DSDecisionGraphT.NodeMarkdown {\n let nodeMarkdown: DSDecisionGraphT.NodeMarkdown;\n\n if (isQuestionText(node)) {\n nodeMarkdown = `${node?.repeatedId ?? nodePath}{{\"${node.nodeText}\"}}`;\n } else {\n nodeMarkdown = `${node?.repeatedId ?? nodePath}(\"${node.nodeText}\")`;\n }\n\n return nodeMarkdown;\n}\n\n/**\n * Recursively flattens a decision tree node and its children.\n * @param {DSDecisionGraphT.DecisionNode} node - The decision tree node to flatten.\n * @param { Map<DSDecisionGraphT.NodePath, FlatDecisionNode>} decisionNodes - the map to track the flattened nodes.\n * @param {DSDecisionGraphT.NodePath} nodePath - The path of the current node in the decision tree.\n */\nconst flatten = (\n node: DSDecisionGraphT.DecisionNode,\n decisionNodes: Map<DSDecisionGraphT.NodePath, FlatDecisionNode>,\n nodePath: DSDecisionGraphT.NodePath = 's' as DSDecisionGraphT.NodePath,\n) => {\n const decisionNode: FlatDecisionNode = {\n nodeText: node.nodeText,\n path: nodePath,\n nodeMarkdown: nodeToMermaidMD(node, nodePath),\n };\n decisionNodes.set(nodePath, decisionNode);\n if (node.truePath) {\n flatten(node.truePath, decisionNodes, `${nodePath}t`);\n }\n if (node.falsePath) {\n flatten(node.falsePath, decisionNodes, `${nodePath}f`);\n }\n if (node.notApplicablePath) {\n flatten(node.notApplicablePath, decisionNodes, `${nodePath}o`);\n }\n};\n\n/**\n * Flattens a decision tree into a map of flat decision nodes.\n * @param {DSDecisionGraphT.RootNode} rootNode - The root node of the decision tree to flatten.\n * @returns {Map<DSDecisionGraphT.NodePath, FlatDecisionNode>} A map of flat decision nodes, where each node is identified by its node ID.\n */\nconst flattenDecisionTree = (rootNode: DSDecisionGraphT.RootNode): Map<DSDecisionGraphT.NodePath, FlatDecisionNode> => {\n const decisionNodes: Map<DSDecisionGraphT.NodePath, FlatDecisionNode> = new Map();\n const treeToFlatten: DSDecisionGraphT.DecisionNode = rootNode.subtree;\n\n flatten(treeToFlatten, decisionNodes);\n return decisionNodes;\n};\n\n/**\n * Flattens a decision tree into a map of flat decision nodes.\n * @param {DSDecisionGraphT.RootNode} rootNode - The root node of the decision tree to flatten.\n * @param {DSDecisionGraphT.Directions} direction - direction of the flowchart, default is LR (left to right)\n * @returns {string} A map of flat decision nodes, where each node is identified by its node ID.\n */\nexport const decisionTreeToMermaidMD = (\n rootNode: DSDecisionGraphT.RootNode,\n direction: DSDecisionGraphT.Directions = 'LR',\n) => {\n const title = `---\\ntitle: ${rootNode.chartTitle}\\n---\\n`;\n let mermaidMD = `${title}flowchart ${direction};\\n`;\n // let mermaidMD = `flowchart LR;\\n subgraph ${rootNode.chartTitle};\\n`; // this add an highlight to the chart and the title\n const decisionNodes = flattenDecisionTree(rootNode);\n decisionNodes.forEach((node, nodePath) => {\n if (nodePath === 's') return;\n const parentNodeId = nodePath.slice(0, -1) as DSDecisionGraphT.NodePath;\n const parentNode = decisionNodes.get(parentNodeId);\n if (parentNode) {\n const linkMarkdown = nodePathToLinkMarkdown(nodePath);\n mermaidMD += `\\t${parentNode.nodeMarkdown}${linkMarkdown}${node.nodeMarkdown}\\n`;\n }\n });\n // mermaidMD += 'end;\\n';\n return mermaidMD;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWvB,SAAS,uBAAuB,UAAoE;AAClG,MAAI,eAA8C;AAClD,UAAQ,SAAS,OAAO,SAAS,SAAS,CAAC,GAAG;AAAA,IAC5C,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF;AACE;AAAA,EACJ;AACA,SAAO;AACT;AACA,SAAS,eAAe,MAA4E;AAClG,UAAQ,KAAK,mBAAmB,KAAK,oBAAoB,eAAe;AAC1E;AAEA,SAAS,gBACP,MACA,UAC+B;AAC/B,MAAI;AAEJ,MAAI,eAAe,IAAI,GAAG;AACxB,mBAAe,GAAG,MAAM,cAAc,QAAQ,MAAM,KAAK,QAAQ;AAAA,EACnE,OAAO;AACL,mBAAe,GAAG,MAAM,cAAc,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAClE;AAEA,SAAO;AACT;AAQA,MAAM,UAAU,CACd,MACA,eACA,WAAsC,QACnC;AACH,QAAM,eAAiC;AAAA,IACrC,UAAU,KAAK;AAAA,IACf,MAAM;AAAA,IACN,cAAc,gBAAgB,MAAM,QAAQ;AAAA,EAC9C;AACA,gBAAc,IAAI,UAAU,YAAY;AACxC,MAAI,KAAK,UAAU;AACjB,YAAQ,KAAK,UAAU,eAAe,GAAG,QAAQ,GAAG;AAAA,EACtD;AACA,MAAI,KAAK,WAAW;AAClB,YAAQ,KAAK,WAAW,eAAe,GAAG,QAAQ,GAAG;AAAA,EACvD;AACA,MAAI,KAAK,mBAAmB;AAC1B,YAAQ,KAAK,mBAAmB,eAAe,GAAG,QAAQ,GAAG;AAAA,EAC/D;AACF;AAOA,MAAM,sBAAsB,CAAC,aAA0F;AACrH,QAAM,gBAAkE,oBAAI,IAAI;AAChF,QAAM,gBAA+C,SAAS;AAE9D,UAAQ,eAAe,aAAa;AACpC,SAAO;AACT;AAQO,MAAM,0BAA0B,CACrC,UACA,YAAyC,SACtC;AACH,QAAM,QAAQ;AAAA,SAAe,SAAS,UAAU;AAAA;AAAA;AAChD,MAAI,YAAY,GAAG,KAAK,aAAa,SAAS;AAAA;AAE9C,QAAM,gBAAgB,oBAAoB,QAAQ;AAClD,gBAAc,QAAQ,CAAC,MAAM,aAAa;AACxC,QAAI,aAAa,IAAK;AACtB,UAAM,eAAe,SAAS,MAAM,GAAG,EAAE;AACzC,UAAM,aAAa,cAAc,IAAI,YAAY;AACjD,QAAI,YAAY;AACd,YAAM,eAAe,uBAAuB,QAAQ;AACpD,mBAAa,IAAK,WAAW,YAAY,GAAG,YAAY,GAAG,KAAK,YAAY;AAAA;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useDecisionGraph.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSDecisionGraphT, DSDecisionGraphPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSDecisionGraphT, DSDecisionGraphPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface DecisionGraphCTX {\n propsWithDefault: DSDecisionGraphT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useDecisionGraph = (propsFromUser: DSDecisionGraphT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSDecisionGraphT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSDecisionGraphPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSDecisionGraphT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n }),\n [propsWithDefault, globalProps, xstyledProps, instanceUid],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AAEpB,SAAgC,0BAA0B,oBAAoB;AAC9E,SAAS,wBAAwB;AAS1B,MAAM,mBAAmB,CAAC,kBAA0C;AAIzE,QAAM,mBAAmB,6BAA6D,eAAe,YAAY;AACjH,mBAAiB,kBAAkB,wBAAwB;AAI3D,QAAM,cAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAO1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,cAAc,WAAW;AAAA,EAC3D;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
3
|
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
4
|
-
import { DSDecisionGraphName, JSON_SCHEMA } from "../constants/index.js";
|
|
5
4
|
import Ajv from "ajv";
|
|
5
|
+
import { DSDecisionGraphName, JSON_SCHEMA } from "../constants/index.js";
|
|
6
6
|
const useValidateProps = (props, propTypes) => {
|
|
7
7
|
useValidateTypescriptPropTypes(props, propTypes, DSDecisionGraphName);
|
|
8
8
|
React2.useEffect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type DSDecisionGraphT } from '../react-desc-prop-types.js';\nimport { DSDecisionGraphName, JSON_SCHEMA } from '../constants/index.js';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAElB,SAAS,sCAAsC;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport Ajv from 'ajv';\nimport { type DSDecisionGraphT } from '../react-desc-prop-types.js';\nimport { DSDecisionGraphName, JSON_SCHEMA } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSDecisionGraphT.InternalProps,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSDecisionGraphName);\n React.useEffect(() => {\n const ajv = new Ajv();\n const validate = ajv.compile(JSON_SCHEMA);\n const valid = validate(props.chartJson);\n if (!valid) {\n throw new Error(`Invalid JSON: ${JSON.stringify(validate.errors)}`);\n }\n }, [props.chartJson]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAElB,SAAS,sCAAsC;AAC/C,OAAO,SAAS;AAEhB,SAAS,qBAAqB,mBAAmB;AAE1C,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,mBAAmB;AACpE,EAAAA,OAAM,UAAU,MAAM;AACpB,UAAM,MAAM,IAAI,IAAI;AACpB,UAAM,WAAW,IAAI,QAAQ,WAAW;AACxC,UAAM,QAAQ,SAAS,MAAM,SAAS;AACtC,QAAI,CAAC,OAAO;AACV,YAAM,IAAI,MAAM,iBAAiB,KAAK,UAAU,SAAS,MAAM,CAAC,EAAE;AAAA,IACpE;AAAA,EACF,GAAG,CAAC,MAAM,SAAS,CAAC;AACtB;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import { decisionTreeToMermaidMD } from "./decisionTreeToMermaidMD.js";
|
|
5
4
|
import mermaid from "mermaid";
|
|
5
|
+
import { decisionTreeToMermaidMD } from "./decisionTreeToMermaidMD.js";
|
|
6
6
|
const MermaidDecisionChart = (props) => {
|
|
7
7
|
const { chartJson, uid, direction } = props;
|
|
8
8
|
const mermaidRef = React2.useRef(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/mermaid/MermaidDecisionChart.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\nimport { decisionTreeToMermaidMD } from './decisionTreeToMermaidMD.js';\n// https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/mermaid.ts#L367\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport mermaid from 'mermaid';\nimport type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\nimport { decisionTreeToMermaidMD } from './decisionTreeToMermaidMD.js';\n// https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/mermaid.ts#L367\n\ntype MermaidProps = {\n chartJson: DSDecisionGraphT.Props['chartJson'];\n uid: string;\n direction: DSDecisionGraphT.Directions;\n};\n\nexport const MermaidDecisionChart = (props: MermaidProps) => {\n const { chartJson, uid, direction } = props;\n const mermaidRef = React.useRef<HTMLPreElement>(null);\n // this operation should be O(1), but depending on the size of the decision tree,\n // it is still potentially beneficial to memoize it...\n const mermaidMD = React.useMemo(() => decisionTreeToMermaidMD(chartJson, direction), [chartJson, direction]);\n\n // on mount initialize mermaid\n React.useEffect(() => {\n mermaid.initialize({\n startOnLoad: false,\n });\n }, []);\n\n React.useEffect(() => {\n setTimeout(() => {\n const renderAsync = async () => {\n const { svg } = await mermaid.render(`mermaid-svg-${uid}`, mermaidMD);\n if (mermaidRef.current) {\n mermaidRef.current.innerHTML = svg;\n }\n };\n // eslint-disable-next-line no-void\n void renderAsync();\n }, 0);\n }, [mermaidMD, uid]);\n\n return <pre ref={mermaidRef} />;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuCd;AAvCT,OAAOA,YAAW;AAClB,OAAO,aAAa;AAEpB,SAAS,+BAA+B;AASjC,MAAM,uBAAuB,CAAC,UAAwB;AAC3D,QAAM,EAAE,WAAW,KAAK,UAAU,IAAI;AACtC,QAAM,aAAaA,OAAM,OAAuB,IAAI;AAGpD,QAAM,YAAYA,OAAM,QAAQ,MAAM,wBAAwB,WAAW,SAAS,GAAG,CAAC,WAAW,SAAS,CAAC;AAG3G,EAAAA,OAAM,UAAU,MAAM;AACpB,YAAQ,WAAW;AAAA,MACjB,aAAa;AAAA,IACf,CAAC;AAAA,EACH,GAAG,CAAC,CAAC;AAEL,EAAAA,OAAM,UAAU,MAAM;AACpB,eAAW,MAAM;AACf,YAAM,cAAc,YAAY;AAC9B,cAAM,EAAE,IAAI,IAAI,MAAM,QAAQ,OAAO,eAAe,GAAG,IAAI,SAAS;AACpE,YAAI,WAAW,SAAS;AACtB,qBAAW,QAAQ,YAAY;AAAA,QACjC;AAAA,MACF;AAEA,WAAK,YAAY;AAAA,IACnB,GAAG,CAAC;AAAA,EACN,GAAG,CAAC,WAAW,GAAG,CAAC;AAEnB,SAAO,oBAAC,SAAI,KAAK,YAAY;AAC/B;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/mermaid/decisionTreeToMermaidMD.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\n\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACWvB,SAAS,uBAAuB,UAAoE;AAClG,MAAI,eAA8C;AAClD,UAAQ,SAAS,OAAO,SAAS,SAAS,CAAC,GAAG;AAAA,IAC5C,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,EACJ;AACA,SAAO;AACT;AACA,SAAS,eAAe,MAA4E;AAClG,UAAQ,KAAK,mBAAmB,KAAK,oBAAoB,eAAe;AAC1E;AAEA,SAAS,gBACP,MACA,UAC+B;AAC/B,MAAI;AAEJ,MAAI,eAAe,IAAI,GAAG;AACxB,mBAAe,GAAG,MAAM,cAAc,QAAQ,MAAM,KAAK,QAAQ;AAAA,EACnE,OAAO;AACL,mBAAe,GAAG,MAAM,cAAc,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAClE;AAEA,SAAO;AACT;AAQA,MAAM,UAAU,CACd,MACA,eACA,WAAsC,QACnC;AACH,QAAM,eAAiC;AAAA,IACrC,UAAU,KAAK;AAAA,IACf,MAAM;AAAA,IACN,cAAc,gBAAgB,MAAM,QAAQ;AAAA,EAC9C;AACA,gBAAc,IAAI,UAAU,YAAY;AACxC,MAAI,KAAK,UAAU;AACjB,YAAQ,KAAK,UAAU,eAAe,GAAG,QAAQ,GAAG;AAAA,EACtD;AACA,MAAI,KAAK,WAAW;AAClB,YAAQ,KAAK,WAAW,eAAe,GAAG,QAAQ,GAAG;AAAA,EACvD;AACA,MAAI,KAAK,mBAAmB;AAC1B,YAAQ,KAAK,mBAAmB,eAAe,GAAG,QAAQ,GAAG;AAAA,EAC/D;AACF;AAOA,MAAM,sBAAsB,CAAC,aAA0F;AACrH,QAAM,gBAAkE,oBAAI,IAAI;AAChF,QAAM,gBAA+C,SAAS;AAE9D,UAAQ,eAAe,aAAa;AACpC,SAAO;AACT;AAQO,MAAM,0BAA0B,CACrC,UACA,YAAyC,SACtC;AACH,QAAM,QAAQ;AAAA,SAAe,SAAS,UAAU;AAAA;AAAA;AAChD,MAAI,YAAY,GAAG,KAAK,aAAa,SAAS;AAAA;AAE9C,QAAM,gBAAgB,oBAAoB,QAAQ;AAClD,gBAAc,QAAQ,CAAC,MAAM,aAAa;AACxC,QAAI,aAAa,IAAK;AACtB,UAAM,eAAe,SAAS,MAAM,GAAG,EAAE;AACzC,UAAM,aAAa,cAAc,IAAI,YAAY;AACjD,QAAI,YAAY;AACd,YAAM,eAAe,uBAAuB,QAAQ;AACpD,mBAAa,IAAK,WAAW,YAAY,GAAG,YAAY,GAAG,KAAK,YAAY;AAAA;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSDecisionGraphT } from '../../react-desc-prop-types.js';\n\n/** ************************************************************\n ***************** Mermaid Markdown Generator *****************\n ************************************************************ */\n\ntype FlatDecisionNode = {\n nodeText: string;\n path: DSDecisionGraphT.NodePath;\n nodeMarkdown?: DSDecisionGraphT.NodeMarkdown;\n};\nfunction nodePathToLinkMarkdown(nodePath: DSDecisionGraphT.NodePath): DSDecisionGraphT.LinkMarkdown {\n let linkMarkdown: DSDecisionGraphT.LinkMarkdown = '';\n switch (nodePath.charAt(nodePath.length - 1)) {\n case 't':\n linkMarkdown = `-->|true|`;\n break;\n case 'f':\n linkMarkdown = `-->|false|`;\n break;\n case 'o':\n linkMarkdown = `-->|N/A|`;\n break;\n default:\n break;\n }\n return linkMarkdown;\n}\nfunction isQuestionText(node: DSDecisionGraphT.DecisionNode): node is DSDecisionGraphT.QuestionNode {\n return (node.semanticMeaning && node.semanticMeaning === 'question') ?? false;\n}\n\nfunction nodeToMermaidMD(\n node: DSDecisionGraphT.DecisionNode,\n nodePath: DSDecisionGraphT.NodePath,\n): DSDecisionGraphT.NodeMarkdown {\n let nodeMarkdown: DSDecisionGraphT.NodeMarkdown;\n\n if (isQuestionText(node)) {\n nodeMarkdown = `${node?.repeatedId ?? nodePath}{{\"${node.nodeText}\"}}`;\n } else {\n nodeMarkdown = `${node?.repeatedId ?? nodePath}(\"${node.nodeText}\")`;\n }\n\n return nodeMarkdown;\n}\n\n/**\n * Recursively flattens a decision tree node and its children.\n * @param {DSDecisionGraphT.DecisionNode} node - The decision tree node to flatten.\n * @param { Map<DSDecisionGraphT.NodePath, FlatDecisionNode>} decisionNodes - the map to track the flattened nodes.\n * @param {DSDecisionGraphT.NodePath} nodePath - The path of the current node in the decision tree.\n */\nconst flatten = (\n node: DSDecisionGraphT.DecisionNode,\n decisionNodes: Map<DSDecisionGraphT.NodePath, FlatDecisionNode>,\n nodePath: DSDecisionGraphT.NodePath = 's' as DSDecisionGraphT.NodePath,\n) => {\n const decisionNode: FlatDecisionNode = {\n nodeText: node.nodeText,\n path: nodePath,\n nodeMarkdown: nodeToMermaidMD(node, nodePath),\n };\n decisionNodes.set(nodePath, decisionNode);\n if (node.truePath) {\n flatten(node.truePath, decisionNodes, `${nodePath}t`);\n }\n if (node.falsePath) {\n flatten(node.falsePath, decisionNodes, `${nodePath}f`);\n }\n if (node.notApplicablePath) {\n flatten(node.notApplicablePath, decisionNodes, `${nodePath}o`);\n }\n};\n\n/**\n * Flattens a decision tree into a map of flat decision nodes.\n * @param {DSDecisionGraphT.RootNode} rootNode - The root node of the decision tree to flatten.\n * @returns {Map<DSDecisionGraphT.NodePath, FlatDecisionNode>} A map of flat decision nodes, where each node is identified by its node ID.\n */\nconst flattenDecisionTree = (rootNode: DSDecisionGraphT.RootNode): Map<DSDecisionGraphT.NodePath, FlatDecisionNode> => {\n const decisionNodes: Map<DSDecisionGraphT.NodePath, FlatDecisionNode> = new Map();\n const treeToFlatten: DSDecisionGraphT.DecisionNode = rootNode.subtree;\n\n flatten(treeToFlatten, decisionNodes);\n return decisionNodes;\n};\n\n/**\n * Flattens a decision tree into a map of flat decision nodes.\n * @param {DSDecisionGraphT.RootNode} rootNode - The root node of the decision tree to flatten.\n * @param {DSDecisionGraphT.Directions} direction - direction of the flowchart, default is LR (left to right)\n * @returns {string} A map of flat decision nodes, where each node is identified by its node ID.\n */\nexport const decisionTreeToMermaidMD = (\n rootNode: DSDecisionGraphT.RootNode,\n direction: DSDecisionGraphT.Directions = 'LR',\n) => {\n const title = `---\\ntitle: ${rootNode.chartTitle}\\n---\\n`;\n let mermaidMD = `${title}flowchart ${direction};\\n`;\n // let mermaidMD = `flowchart LR;\\n subgraph ${rootNode.chartTitle};\\n`; // this add an highlight to the chart and the title\n const decisionNodes = flattenDecisionTree(rootNode);\n decisionNodes.forEach((node, nodePath) => {\n if (nodePath === 's') return;\n const parentNodeId = nodePath.slice(0, -1) as DSDecisionGraphT.NodePath;\n const parentNode = decisionNodes.get(parentNodeId);\n if (parentNode) {\n const linkMarkdown = nodePathToLinkMarkdown(nodePath);\n mermaidMD += `\\t${parentNode.nodeMarkdown}${linkMarkdown}${node.nodeMarkdown}\\n`;\n }\n });\n // mermaidMD += 'end;\\n';\n return mermaidMD;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACWvB,SAAS,uBAAuB,UAAoE;AAClG,MAAI,eAA8C;AAClD,UAAQ,SAAS,OAAO,SAAS,SAAS,CAAC,GAAG;AAAA,IAC5C,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF,KAAK;AACH,qBAAe;AACf;AAAA,IACF;AACE;AAAA,EACJ;AACA,SAAO;AACT;AACA,SAAS,eAAe,MAA4E;AAClG,UAAQ,KAAK,mBAAmB,KAAK,oBAAoB,eAAe;AAC1E;AAEA,SAAS,gBACP,MACA,UAC+B;AAC/B,MAAI;AAEJ,MAAI,eAAe,IAAI,GAAG;AACxB,mBAAe,GAAG,MAAM,cAAc,QAAQ,MAAM,KAAK,QAAQ;AAAA,EACnE,OAAO;AACL,mBAAe,GAAG,MAAM,cAAc,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAClE;AAEA,SAAO;AACT;AAQA,MAAM,UAAU,CACd,MACA,eACA,WAAsC,QACnC;AACH,QAAM,eAAiC;AAAA,IACrC,UAAU,KAAK;AAAA,IACf,MAAM;AAAA,IACN,cAAc,gBAAgB,MAAM,QAAQ;AAAA,EAC9C;AACA,gBAAc,IAAI,UAAU,YAAY;AACxC,MAAI,KAAK,UAAU;AACjB,YAAQ,KAAK,UAAU,eAAe,GAAG,QAAQ,GAAG;AAAA,EACtD;AACA,MAAI,KAAK,WAAW;AAClB,YAAQ,KAAK,WAAW,eAAe,GAAG,QAAQ,GAAG;AAAA,EACvD;AACA,MAAI,KAAK,mBAAmB;AAC1B,YAAQ,KAAK,mBAAmB,eAAe,GAAG,QAAQ,GAAG;AAAA,EAC/D;AACF;AAOA,MAAM,sBAAsB,CAAC,aAA0F;AACrH,QAAM,gBAAkE,oBAAI,IAAI;AAChF,QAAM,gBAA+C,SAAS;AAE9D,UAAQ,eAAe,aAAa;AACpC,SAAO;AACT;AAQO,MAAM,0BAA0B,CACrC,UACA,YAAyC,SACtC;AACH,QAAM,QAAQ;AAAA,SAAe,SAAS,UAAU;AAAA;AAAA;AAChD,MAAI,YAAY,GAAG,KAAK,aAAa,SAAS;AAAA;AAE9C,QAAM,gBAAgB,oBAAoB,QAAQ;AAClD,gBAAc,QAAQ,CAAC,MAAM,aAAa;AACxC,QAAI,aAAa,IAAK;AACtB,UAAM,eAAe,SAAS,MAAM,GAAG,EAAE;AACzC,UAAM,aAAa,cAAc,IAAI,YAAY;AACjD,QAAI,YAAY;AACd,YAAM,eAAe,uBAAuB,QAAQ;AACpD,mBAAa,IAAK,WAAW,YAAY,GAAG,YAAY,GAAG,KAAK,YAAY;AAAA;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';
|
|
3
|
-
import { type DSDecisionGraphT } from '../react-desc-prop-types.js';
|
|
4
3
|
import type { DSGridT } from '@elliemae/ds-grid';
|
|
4
|
+
import { type DSDecisionGraphT } from '../react-desc-prop-types.js';
|
|
5
5
|
export interface DecisionGraphCTX {
|
|
6
6
|
propsWithDefault: DSDecisionGraphT.InternalProps;
|
|
7
7
|
globalProps: ReturnType<typeof useGetGlobalAttributes>;
|
|
@@ -11,61 +11,61 @@ export interface DecisionGraphCTX {
|
|
|
11
11
|
export declare const useDecisionGraph: (propsFromUser: DSDecisionGraphT.Props) => {
|
|
12
12
|
propsWithDefault: DSDecisionGraphT.InternalProps;
|
|
13
13
|
globalProps: Partial<Pick<DSGridT.Props, "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
|
|
14
|
-
form?: string | undefined;
|
|
15
|
-
list?: string | undefined;
|
|
16
|
-
"aria-activedescendant"?: string | undefined;
|
|
14
|
+
form?: string | undefined | undefined;
|
|
15
|
+
list?: string | undefined | undefined;
|
|
16
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
17
17
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
18
|
-
"aria-autocomplete"?: "none" | "
|
|
19
|
-
"aria-braillelabel"?: string | undefined;
|
|
20
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
18
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
19
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
20
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
21
21
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
22
|
-
"aria-checked"?: boolean | "
|
|
23
|
-
"aria-colcount"?: number | undefined;
|
|
24
|
-
"aria-colindex"?: number | undefined;
|
|
25
|
-
"aria-colindextext"?: string | undefined;
|
|
26
|
-
"aria-colspan"?: number | undefined;
|
|
27
|
-
"aria-controls"?: string | undefined;
|
|
28
|
-
"aria-current"?: boolean | "
|
|
29
|
-
"aria-describedby"?: string | undefined;
|
|
30
|
-
"aria-description"?: string | undefined;
|
|
31
|
-
"aria-details"?: string | undefined;
|
|
22
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
23
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
24
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
25
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
26
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
27
|
+
"aria-controls"?: string | undefined | undefined;
|
|
28
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
29
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
30
|
+
"aria-description"?: string | undefined | undefined;
|
|
31
|
+
"aria-details"?: string | undefined | undefined;
|
|
32
32
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
33
|
-
"aria-dropeffect"?: "none" | "
|
|
34
|
-
"aria-errormessage"?: string | undefined;
|
|
33
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
34
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
35
35
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
36
|
-
"aria-flowto"?: string | undefined;
|
|
36
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
37
37
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
38
|
-
"aria-haspopup"?: boolean | "
|
|
38
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
39
39
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
40
|
-
"aria-invalid"?: boolean | "
|
|
41
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
42
|
-
"aria-label"?: string | undefined;
|
|
43
|
-
"aria-labelledby"?: string | undefined;
|
|
44
|
-
"aria-level"?: number | undefined;
|
|
45
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
40
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
41
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
42
|
+
"aria-label"?: string | undefined | undefined;
|
|
43
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
44
|
+
"aria-level"?: number | undefined | undefined;
|
|
45
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
46
46
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
47
47
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
48
48
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
49
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
50
|
-
"aria-owns"?: string | undefined;
|
|
51
|
-
"aria-placeholder"?: string | undefined;
|
|
52
|
-
"aria-posinset"?: number | undefined;
|
|
53
|
-
"aria-pressed"?: boolean | "
|
|
49
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
50
|
+
"aria-owns"?: string | undefined | undefined;
|
|
51
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
52
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
53
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
54
54
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
55
|
-
"aria-relevant"?: "
|
|
55
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
56
56
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
57
|
-
"aria-roledescription"?: string | undefined;
|
|
58
|
-
"aria-rowcount"?: number | undefined;
|
|
59
|
-
"aria-rowindex"?: number | undefined;
|
|
60
|
-
"aria-rowindextext"?: string | undefined;
|
|
61
|
-
"aria-rowspan"?: number | undefined;
|
|
57
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
58
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
59
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
60
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
61
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
62
62
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
63
|
-
"aria-setsize"?: number | undefined;
|
|
64
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
65
|
-
"aria-valuemax"?: number | undefined;
|
|
66
|
-
"aria-valuemin"?: number | undefined;
|
|
67
|
-
"aria-valuenow"?: number | undefined;
|
|
68
|
-
"aria-valuetext"?: string | undefined;
|
|
63
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
64
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
65
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
66
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
67
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
68
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
69
69
|
children?: React.ReactNode;
|
|
70
70
|
onCopy?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
71
71
|
onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -85,7 +85,7 @@ export declare const useDecisionGraph: (propsFromUser: DSDecisionGraphT.Props) =
|
|
|
85
85
|
onBlurCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
|
|
86
86
|
onChange?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
87
87
|
onChangeCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
88
|
-
onBeforeInput?: React.
|
|
88
|
+
onBeforeInput?: React.InputEventHandler<HTMLDivElement> | undefined;
|
|
89
89
|
onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
90
90
|
onInput?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
91
91
|
onInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -225,156 +225,156 @@ export declare const useDecisionGraph: (propsFromUser: DSDecisionGraphT.Props) =
|
|
|
225
225
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
226
226
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
227
227
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
228
|
-
defaultChecked?: boolean | undefined;
|
|
228
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
229
229
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
230
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
231
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
232
|
-
accessKey?: string | undefined;
|
|
233
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined;
|
|
234
|
-
autoFocus?: boolean | undefined;
|
|
235
|
-
className?: string | undefined;
|
|
230
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
231
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
232
|
+
accessKey?: string | undefined | undefined;
|
|
233
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
234
|
+
autoFocus?: boolean | undefined | undefined;
|
|
235
|
+
className?: string | undefined | undefined;
|
|
236
236
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
237
|
-
contextMenu?: string | undefined;
|
|
238
|
-
dir?: string | undefined;
|
|
237
|
+
contextMenu?: string | undefined | undefined;
|
|
238
|
+
dir?: string | undefined | undefined;
|
|
239
239
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
240
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
241
|
-
hidden?: boolean | undefined;
|
|
242
|
-
id?: string | undefined;
|
|
243
|
-
lang?: string | undefined;
|
|
244
|
-
nonce?: string | undefined;
|
|
245
|
-
slot?: string | undefined;
|
|
240
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
241
|
+
hidden?: boolean | undefined | undefined;
|
|
242
|
+
id?: string | undefined | undefined;
|
|
243
|
+
lang?: string | undefined | undefined;
|
|
244
|
+
nonce?: string | undefined | undefined;
|
|
245
|
+
slot?: string | undefined | undefined;
|
|
246
246
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
247
247
|
style?: React.CSSProperties | undefined;
|
|
248
248
|
tabIndex?: 0 | -1 | undefined;
|
|
249
|
-
title?: string | undefined;
|
|
250
|
-
translate?: "yes" | "no" | undefined;
|
|
251
|
-
radioGroup?: string | undefined;
|
|
249
|
+
title?: string | undefined | undefined;
|
|
250
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
251
|
+
radioGroup?: string | undefined | undefined;
|
|
252
252
|
role?: React.AriaRole | undefined;
|
|
253
|
-
about?: string | undefined;
|
|
254
|
-
content?: string | undefined;
|
|
255
|
-
datatype?: string | undefined;
|
|
253
|
+
about?: string | undefined | undefined;
|
|
254
|
+
content?: string | undefined | undefined;
|
|
255
|
+
datatype?: string | undefined | undefined;
|
|
256
256
|
inlist?: any;
|
|
257
|
-
prefix?: string | undefined;
|
|
258
|
-
property?: string | undefined;
|
|
259
|
-
rel?: string | undefined;
|
|
260
|
-
resource?: string | undefined;
|
|
261
|
-
rev?: string | undefined;
|
|
262
|
-
typeof?: string | undefined;
|
|
263
|
-
vocab?: string | undefined;
|
|
264
|
-
autoCorrect?: string | undefined;
|
|
265
|
-
autoSave?: string | undefined;
|
|
266
|
-
color?: string | undefined;
|
|
267
|
-
itemProp?: string | undefined;
|
|
268
|
-
itemScope?: boolean | undefined;
|
|
269
|
-
itemType?: string | undefined;
|
|
270
|
-
itemID?: string | undefined;
|
|
271
|
-
itemRef?: string | undefined;
|
|
272
|
-
results?: number | undefined;
|
|
273
|
-
security?: string | undefined;
|
|
274
|
-
unselectable?: "
|
|
275
|
-
inputMode?: "none" | "
|
|
276
|
-
is?: string | undefined;
|
|
277
|
-
exportparts?: string | undefined;
|
|
278
|
-
part?: string | undefined;
|
|
279
|
-
accept?: string | undefined;
|
|
280
|
-
acceptCharset?: string | undefined;
|
|
257
|
+
prefix?: string | undefined | undefined;
|
|
258
|
+
property?: string | undefined | undefined;
|
|
259
|
+
rel?: string | undefined | undefined;
|
|
260
|
+
resource?: string | undefined | undefined;
|
|
261
|
+
rev?: string | undefined | undefined;
|
|
262
|
+
typeof?: string | undefined | undefined;
|
|
263
|
+
vocab?: string | undefined | undefined;
|
|
264
|
+
autoCorrect?: string | undefined | undefined;
|
|
265
|
+
autoSave?: string | undefined | undefined;
|
|
266
|
+
color?: string | undefined | undefined;
|
|
267
|
+
itemProp?: string | undefined | undefined;
|
|
268
|
+
itemScope?: boolean | undefined | undefined;
|
|
269
|
+
itemType?: string | undefined | undefined;
|
|
270
|
+
itemID?: string | undefined | undefined;
|
|
271
|
+
itemRef?: string | undefined | undefined;
|
|
272
|
+
results?: number | undefined | undefined;
|
|
273
|
+
security?: string | undefined | undefined;
|
|
274
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
275
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
276
|
+
is?: string | undefined | undefined;
|
|
277
|
+
exportparts?: string | undefined | undefined;
|
|
278
|
+
part?: string | undefined | undefined;
|
|
279
|
+
accept?: string | undefined | undefined;
|
|
280
|
+
acceptCharset?: string | undefined | undefined;
|
|
281
281
|
action?: string | undefined;
|
|
282
|
-
allowFullScreen?: boolean | undefined;
|
|
283
|
-
allowTransparency?: boolean | undefined;
|
|
284
|
-
alt?: string | undefined;
|
|
285
|
-
async?: boolean | undefined;
|
|
286
|
-
autoComplete?: string | undefined;
|
|
287
|
-
autoPlay?: boolean | undefined;
|
|
288
|
-
capture?: boolean | "user" | "environment" | undefined;
|
|
289
|
-
cellPadding?: string |
|
|
290
|
-
cellSpacing?: string |
|
|
291
|
-
charSet?: string | undefined;
|
|
292
|
-
challenge?: string | undefined;
|
|
293
|
-
checked?: boolean | undefined;
|
|
294
|
-
cite?: string | undefined;
|
|
295
|
-
classID?: string | undefined;
|
|
296
|
-
cols?: number | undefined;
|
|
297
|
-
colSpan?: number | undefined;
|
|
298
|
-
controls?: boolean | undefined;
|
|
299
|
-
coords?: string | undefined;
|
|
282
|
+
allowFullScreen?: boolean | undefined | undefined;
|
|
283
|
+
allowTransparency?: boolean | undefined | undefined;
|
|
284
|
+
alt?: string | undefined | undefined;
|
|
285
|
+
async?: boolean | undefined | undefined;
|
|
286
|
+
autoComplete?: string | undefined | undefined;
|
|
287
|
+
autoPlay?: boolean | undefined | undefined;
|
|
288
|
+
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
289
|
+
cellPadding?: number | string | undefined | undefined;
|
|
290
|
+
cellSpacing?: number | string | undefined | undefined;
|
|
291
|
+
charSet?: string | undefined | undefined;
|
|
292
|
+
challenge?: string | undefined | undefined;
|
|
293
|
+
checked?: boolean | undefined | undefined;
|
|
294
|
+
cite?: string | undefined | undefined;
|
|
295
|
+
classID?: string | undefined | undefined;
|
|
296
|
+
cols?: number | undefined | undefined;
|
|
297
|
+
colSpan?: number | undefined | undefined;
|
|
298
|
+
controls?: boolean | undefined | undefined;
|
|
299
|
+
coords?: string | undefined | undefined;
|
|
300
300
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
301
|
-
data?: string | undefined;
|
|
302
|
-
dateTime?: string | undefined;
|
|
303
|
-
default?: boolean | undefined;
|
|
304
|
-
defer?: boolean | undefined;
|
|
305
|
-
disabled?: boolean | undefined;
|
|
301
|
+
data?: string | undefined | undefined;
|
|
302
|
+
dateTime?: string | undefined | undefined;
|
|
303
|
+
default?: boolean | undefined | undefined;
|
|
304
|
+
defer?: boolean | undefined | undefined;
|
|
305
|
+
disabled?: boolean | undefined | undefined;
|
|
306
306
|
download?: any;
|
|
307
|
-
encType?: string | undefined;
|
|
307
|
+
encType?: string | undefined | undefined;
|
|
308
308
|
formAction?: string | undefined;
|
|
309
|
-
formEncType?: string | undefined;
|
|
310
|
-
formMethod?: string | undefined;
|
|
311
|
-
formNoValidate?: boolean | undefined;
|
|
312
|
-
formTarget?: string | undefined;
|
|
313
|
-
frameBorder?: string |
|
|
314
|
-
headers?: string | undefined;
|
|
315
|
-
height?: string |
|
|
316
|
-
high?: number | undefined;
|
|
317
|
-
href?: string | undefined;
|
|
318
|
-
hrefLang?: string | undefined;
|
|
319
|
-
htmlFor?: string | undefined;
|
|
320
|
-
httpEquiv?: string | undefined;
|
|
321
|
-
integrity?: string | undefined;
|
|
322
|
-
keyParams?: string | undefined;
|
|
323
|
-
keyType?: string | undefined;
|
|
324
|
-
kind?: string | undefined;
|
|
325
|
-
label?: string | undefined;
|
|
326
|
-
loop?: boolean | undefined;
|
|
327
|
-
low?: number | undefined;
|
|
328
|
-
manifest?: string | undefined;
|
|
329
|
-
marginHeight?: number | undefined;
|
|
330
|
-
marginWidth?: number | undefined;
|
|
331
|
-
max?: string |
|
|
332
|
-
maxLength?: number | undefined;
|
|
333
|
-
media?: string | undefined;
|
|
334
|
-
mediaGroup?: string | undefined;
|
|
335
|
-
method?: string | undefined;
|
|
336
|
-
min?: string |
|
|
337
|
-
minLength?: number | undefined;
|
|
338
|
-
multiple?: boolean | undefined;
|
|
339
|
-
muted?: boolean | undefined;
|
|
340
|
-
name?: string | undefined;
|
|
341
|
-
noValidate?: boolean | undefined;
|
|
342
|
-
open?: boolean | undefined;
|
|
343
|
-
optimum?: number | undefined;
|
|
344
|
-
pattern?: string | undefined;
|
|
345
|
-
placeholder?: string | undefined;
|
|
346
|
-
playsInline?: boolean | undefined;
|
|
347
|
-
poster?: string | undefined;
|
|
348
|
-
preload?: string | undefined;
|
|
349
|
-
readOnly?: boolean | undefined;
|
|
350
|
-
required?: boolean | undefined;
|
|
351
|
-
reversed?: boolean | undefined;
|
|
352
|
-
rows?: number | undefined;
|
|
353
|
-
rowSpan?: number | undefined;
|
|
354
|
-
sandbox?: string | undefined;
|
|
355
|
-
scope?: string | undefined;
|
|
356
|
-
scoped?: boolean | undefined;
|
|
357
|
-
scrolling?: string | undefined;
|
|
358
|
-
seamless?: boolean | undefined;
|
|
359
|
-
selected?: boolean | undefined;
|
|
360
|
-
shape?: string | undefined;
|
|
361
|
-
size?: number | undefined;
|
|
362
|
-
sizes?: string | undefined;
|
|
363
|
-
span?: number | undefined;
|
|
364
|
-
src?: string | undefined;
|
|
365
|
-
srcDoc?: string | undefined;
|
|
366
|
-
srcLang?: string | undefined;
|
|
367
|
-
srcSet?: string | undefined;
|
|
368
|
-
start?: number | undefined;
|
|
369
|
-
step?: string |
|
|
370
|
-
summary?: string | undefined;
|
|
371
|
-
target?: string | undefined;
|
|
372
|
-
type?: string | undefined;
|
|
373
|
-
useMap?: string | undefined;
|
|
309
|
+
formEncType?: string | undefined | undefined;
|
|
310
|
+
formMethod?: string | undefined | undefined;
|
|
311
|
+
formNoValidate?: boolean | undefined | undefined;
|
|
312
|
+
formTarget?: string | undefined | undefined;
|
|
313
|
+
frameBorder?: number | string | undefined | undefined;
|
|
314
|
+
headers?: string | undefined | undefined;
|
|
315
|
+
height?: number | string | undefined | undefined;
|
|
316
|
+
high?: number | undefined | undefined;
|
|
317
|
+
href?: string | undefined | undefined;
|
|
318
|
+
hrefLang?: string | undefined | undefined;
|
|
319
|
+
htmlFor?: string | undefined | undefined;
|
|
320
|
+
httpEquiv?: string | undefined | undefined;
|
|
321
|
+
integrity?: string | undefined | undefined;
|
|
322
|
+
keyParams?: string | undefined | undefined;
|
|
323
|
+
keyType?: string | undefined | undefined;
|
|
324
|
+
kind?: string | undefined | undefined;
|
|
325
|
+
label?: string | undefined | undefined;
|
|
326
|
+
loop?: boolean | undefined | undefined;
|
|
327
|
+
low?: number | undefined | undefined;
|
|
328
|
+
manifest?: string | undefined | undefined;
|
|
329
|
+
marginHeight?: number | undefined | undefined;
|
|
330
|
+
marginWidth?: number | undefined | undefined;
|
|
331
|
+
max?: number | string | undefined | undefined;
|
|
332
|
+
maxLength?: number | undefined | undefined;
|
|
333
|
+
media?: string | undefined | undefined;
|
|
334
|
+
mediaGroup?: string | undefined | undefined;
|
|
335
|
+
method?: string | undefined | undefined;
|
|
336
|
+
min?: number | string | undefined | undefined;
|
|
337
|
+
minLength?: number | undefined | undefined;
|
|
338
|
+
multiple?: boolean | undefined | undefined;
|
|
339
|
+
muted?: boolean | undefined | undefined;
|
|
340
|
+
name?: string | undefined | undefined;
|
|
341
|
+
noValidate?: boolean | undefined | undefined;
|
|
342
|
+
open?: boolean | undefined | undefined;
|
|
343
|
+
optimum?: number | undefined | undefined;
|
|
344
|
+
pattern?: string | undefined | undefined;
|
|
345
|
+
placeholder?: string | undefined | undefined;
|
|
346
|
+
playsInline?: boolean | undefined | undefined;
|
|
347
|
+
poster?: string | undefined | undefined;
|
|
348
|
+
preload?: string | undefined | undefined;
|
|
349
|
+
readOnly?: boolean | undefined | undefined;
|
|
350
|
+
required?: boolean | undefined | undefined;
|
|
351
|
+
reversed?: boolean | undefined | undefined;
|
|
352
|
+
rows?: number | undefined | undefined;
|
|
353
|
+
rowSpan?: number | undefined | undefined;
|
|
354
|
+
sandbox?: string | undefined | undefined;
|
|
355
|
+
scope?: string | undefined | undefined;
|
|
356
|
+
scoped?: boolean | undefined | undefined;
|
|
357
|
+
scrolling?: string | undefined | undefined;
|
|
358
|
+
seamless?: boolean | undefined | undefined;
|
|
359
|
+
selected?: boolean | undefined | undefined;
|
|
360
|
+
shape?: string | undefined | undefined;
|
|
361
|
+
size?: number | undefined | undefined;
|
|
362
|
+
sizes?: string | undefined | undefined;
|
|
363
|
+
span?: number | undefined | undefined;
|
|
364
|
+
src?: string | undefined | undefined;
|
|
365
|
+
srcDoc?: string | undefined | undefined;
|
|
366
|
+
srcLang?: string | undefined | undefined;
|
|
367
|
+
srcSet?: string | undefined | undefined;
|
|
368
|
+
start?: number | undefined | undefined;
|
|
369
|
+
step?: number | string | undefined | undefined;
|
|
370
|
+
summary?: string | undefined | undefined;
|
|
371
|
+
target?: string | undefined | undefined;
|
|
372
|
+
type?: string | undefined | undefined;
|
|
373
|
+
useMap?: string | undefined | undefined;
|
|
374
374
|
value?: string | number | readonly string[] | undefined;
|
|
375
|
-
width?: string |
|
|
376
|
-
wmode?: string | undefined;
|
|
377
|
-
wrap?: string | undefined;
|
|
375
|
+
width?: number | string | undefined | undefined;
|
|
376
|
+
wmode?: string | undefined | undefined;
|
|
377
|
+
wrap?: string | undefined | undefined;
|
|
378
378
|
}, keyof DSGridT.Props>>;
|
|
379
379
|
xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
380
380
|
instanceUid: string;
|
|
@@ -2,7 +2,9 @@ export declare const DSDecisionGraphName = "DSDecisiongraph";
|
|
|
2
2
|
export declare const DECISION_GRAPH_SLOTS: {
|
|
3
3
|
readonly WRAPPER: "wrapper";
|
|
4
4
|
};
|
|
5
|
-
export declare const DECISION_GRAPH_DATA_TESTID:
|
|
5
|
+
export declare const DECISION_GRAPH_DATA_TESTID: {
|
|
6
|
+
readonly WRAPPER: "ds-decisiongraph-wrapper";
|
|
7
|
+
};
|
|
6
8
|
export declare const JSON_SCHEMA: {
|
|
7
9
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
8
10
|
readonly type: "object";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-decision-graph",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.53.0-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Decision Graph",
|
|
6
6
|
"files": [
|
|
@@ -36,22 +36,18 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xstyled/styled-components": "~3.7.3",
|
|
40
39
|
"ajv": "^8.17.1",
|
|
41
40
|
"mermaid": "^11.6.0",
|
|
42
|
-
"uid": "
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-grid": "3.
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-system": "3.52.1"
|
|
41
|
+
"uid": "^2.0.2",
|
|
42
|
+
"@elliemae/ds-props-helpers": "3.53.0-alpha.2",
|
|
43
|
+
"@elliemae/ds-grid": "3.53.0-alpha.2",
|
|
44
|
+
"@elliemae/ds-system": "3.53.0-alpha.2"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
47
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
50
48
|
"@xstyled/system": "~3.7.3",
|
|
51
49
|
"jest": "~29.7.0",
|
|
52
|
-
"
|
|
53
|
-
"styled-components": "~5.3.9",
|
|
54
|
-
"@elliemae/ds-monorepo-devops": "3.52.1"
|
|
50
|
+
"@elliemae/ds-monorepo-devops": "3.53.0-alpha.2"
|
|
55
51
|
},
|
|
56
52
|
"peerDependencies": {
|
|
57
53
|
"lodash-es": "^4.17.21",
|