@elliemae/ds-legacy-decision-graph 1.0.13 → 1.0.16
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 +2 -2
- package/dist/cjs/config/useDecisionGraph.js.map +2 -2
- package/dist/esm/config/useDecisionGraph.js +1 -1
- package/dist/esm/config/useDecisionGraph.js.map +1 -1
- package/dist/types/config/useDecisionGraph.d.ts +1 -2
- package/dist/types/config/useValidateProps.d.ts +0 -1
- package/dist/types/react-desc-prop-types.d.ts +0 -1
- package/package.json +9 -9
|
@@ -33,7 +33,7 @@ __export(useDecisionGraph_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(useDecisionGraph_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_lodash_es = require("lodash-es");
|
|
37
37
|
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
38
38
|
var import_uid = require("uid");
|
|
39
39
|
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
@@ -41,7 +41,7 @@ var import_useValidateProps = require("./useValidateProps.js");
|
|
|
41
41
|
const useDecisionGraph = (propsFromUser) => {
|
|
42
42
|
const propsWithDefault = (0, import_ds_legacy_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
43
43
|
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSDecisionGraphPropTypes);
|
|
44
|
-
const globalProps = (0,
|
|
44
|
+
const globalProps = (0, import_lodash_es.omit)((0, import_ds_legacy_props_helpers.useGetGlobalAttributes)(propsWithDefault), [
|
|
45
45
|
"cols",
|
|
46
46
|
"rows",
|
|
47
47
|
"wrap"
|
|
@@ -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 { omit } from 'lodash';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\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 = omit(useGetGlobalAttributes<DSDecisionGraphT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\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,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash-es';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\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 = omit(useGetGlobalAttributes<DSDecisionGraphT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\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,uBAAqB;AACrB,qCAIO;AACP,iBAAoB;AACpB,mCAA8E;AAC9E,8BAAiC;AAS1B,MAAM,mBAAmB,CAAC,kBAA0C;AAIzE,QAAM,uBAAmB,6DAA6D,eAAe,yCAAY;AACjH,gDAAiB,kBAAkB,qDAAwB;AAI3D,QAAM,kBAAc,2BAAK,uDAAuD,gBAAgB,GAAG;AAAA,IACjG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,mBAAe,mDAAmB,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
|
}
|
|
@@ -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 { omit } from 'lodash';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\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 = omit(useGetGlobalAttributes<DSDecisionGraphT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\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"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash-es';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\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 = omit(useGetGlobalAttributes<DSDecisionGraphT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\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
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW;AACpB,SAAgC,0BAA0B,oBAAoB;AAC9E,SAAS,wBAAwB;AAS1B,MAAM,mBAAmB,CAAC,kBAA0C;AAIzE,QAAM,mBAAmB,6BAA6D,eAAe,YAAY;AACjH,mBAAiB,kBAAkB,wBAAwB;AAI3D,QAAM,cAAc,KAAK,uBAAuD,gBAAgB,GAAG;AAAA,IACjG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,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,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-legacy-props-helpers';
|
|
3
2
|
import { type DSDecisionGraphT } from '../react-desc-prop-types.js';
|
|
4
3
|
export interface DecisionGraphCTX {
|
|
@@ -9,7 +8,7 @@ export interface DecisionGraphCTX {
|
|
|
9
8
|
}
|
|
10
9
|
export declare const useDecisionGraph: (propsFromUser: DSDecisionGraphT.Props) => {
|
|
11
10
|
propsWithDefault: DSDecisionGraphT.InternalProps;
|
|
12
|
-
globalProps:
|
|
11
|
+
globalProps: any;
|
|
13
12
|
xstyledProps: import("@elliemae/ds-legacy-props-helpers").XstyledProps;
|
|
14
13
|
instanceUid: string;
|
|
15
14
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-legacy-props-helpers';
|
|
2
|
-
import type { WeakValidationMap } from 'react';
|
|
3
2
|
export declare namespace DSDecisionGraphT {
|
|
4
3
|
type Directions = 'LR' | 'TD';
|
|
5
4
|
type SemanticMeaning = 'question' | 'conclusion';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-legacy-decision-graph",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Decision Graph",
|
|
6
6
|
"files": [
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"ajv": "^8.12.0",
|
|
40
40
|
"mermaid": "^10.5.0",
|
|
41
41
|
"uid": "~2.0.1",
|
|
42
|
-
"@elliemae/ds-legacy-
|
|
43
|
-
"@elliemae/ds-legacy-
|
|
44
|
-
"@elliemae/ds-legacy-
|
|
45
|
-
"@elliemae/ds-legacy-
|
|
46
|
-
"@elliemae/ds-legacy-
|
|
42
|
+
"@elliemae/ds-legacy-button": "1.0.16",
|
|
43
|
+
"@elliemae/ds-legacy-props-helpers": "1.0.16",
|
|
44
|
+
"@elliemae/ds-legacy-grid": "1.0.16",
|
|
45
|
+
"@elliemae/ds-legacy-system": "1.0.16",
|
|
46
|
+
"@elliemae/ds-legacy-utilities": "1.0.16"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@elliemae/pui-cli": "9.0.0-next.50",
|
|
50
50
|
"@xstyled/system": "3.7.0",
|
|
51
|
-
"lodash": "^4.17.21",
|
|
51
|
+
"lodash-es": "^4.17.21",
|
|
52
52
|
"styled-components": "~5.3.9",
|
|
53
|
-
"@elliemae/ds-legacy-monorepo-devops": "1.0.
|
|
53
|
+
"@elliemae/ds-legacy-monorepo-devops": "1.0.16"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"lodash": "^4.17.21",
|
|
56
|
+
"lodash-es": "^4.17.21",
|
|
57
57
|
"react": "^17.0.2",
|
|
58
58
|
"react-dom": "^17.0.2",
|
|
59
59
|
"styled-components": "~5.3.9"
|