@elliemae/ds-legacy-card-v2-action-addon 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/useCardV2ActionAddon.js +2 -2
- package/dist/cjs/config/useCardV2ActionAddon.js.map +2 -2
- package/dist/esm/config/useCardV2ActionAddon.js +1 -1
- package/dist/esm/config/useCardV2ActionAddon.js.map +1 -1
- package/dist/types/config/useCardV2ActionAddon.d.ts +1 -2
- package/dist/types/config/useValidateProps.d.ts +0 -1
- package/dist/types/styles.d.ts +1 -5
- package/package.json +7 -7
- package/dist/types/react-desc-prop-types.d.ts +0 -21
|
@@ -33,7 +33,7 @@ __export(useCardV2ActionAddon_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(useCardV2ActionAddon_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_utilities = require("@elliemae/ds-legacy-utilities");
|
|
38
38
|
var import_uid = require("uid");
|
|
39
39
|
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
@@ -44,7 +44,7 @@ const useCardV2ActionAddon = (propsFromUser) => {
|
|
|
44
44
|
import_react_desc_prop_types.defaultProps
|
|
45
45
|
);
|
|
46
46
|
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardV2ActionAddonPropTypes);
|
|
47
|
-
const globalProps = (0,
|
|
47
|
+
const globalProps = (0, import_lodash_es.omit)((0, import_ds_legacy_utilities.useGetGlobalAttributes)(propsWithDefault), [
|
|
48
48
|
"cols",
|
|
49
49
|
"rows",
|
|
50
50
|
"wrap"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useCardV2ActionAddon.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2ActionAddonT, DSCardV2ActionAddonPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2ActionAddonCTX {\n propsWithDefault: DSCardV2ActionAddonT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2ActionAddon = (propsFromUser: DSCardV2ActionAddonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2ActionAddonT.InternalProps>(\n propsFromUser,\n defaultProps,\n );\n useValidateProps(propsWithDefault, DSCardV2ActionAddonPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2ActionAddonT.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 // 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 // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\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 { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2ActionAddonT, DSCardV2ActionAddonPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2ActionAddonCTX {\n propsWithDefault: DSCardV2ActionAddonT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2ActionAddon = (propsFromUser: DSCardV2ActionAddonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2ActionAddonT.InternalProps>(\n propsFromUser,\n defaultProps,\n );\n useValidateProps(propsWithDefault, DSCardV2ActionAddonPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2ActionAddonT.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 // 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 // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\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,iCAAyF;AACzF,iBAAoB;AACpB,mCAAsF;AACtF,8BAAiC;AAS1B,MAAM,uBAAuB,CAAC,kBAA8C;AAIjF,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,gDAAiB,kBAAkB,yDAA4B;AAI/D,QAAM,kBAAc,2BAAK,mDAA2D,gBAAgB,GAAG;AAAA,IACrG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,mBAAe,+CAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,UAAM,gBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2 from "react";
|
|
3
|
-
import { omit } from "lodash";
|
|
3
|
+
import { omit } from "lodash-es";
|
|
4
4
|
import { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-legacy-utilities";
|
|
5
5
|
import { uid } from "uid";
|
|
6
6
|
import { DSCardV2ActionAddonPropTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useCardV2ActionAddon.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2ActionAddonT, DSCardV2ActionAddonPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2ActionAddonCTX {\n propsWithDefault: DSCardV2ActionAddonT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2ActionAddon = (propsFromUser: DSCardV2ActionAddonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2ActionAddonT.InternalProps>(\n propsFromUser,\n defaultProps,\n );\n useValidateProps(propsWithDefault, DSCardV2ActionAddonPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2ActionAddonT.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 // 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 // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash-es';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2ActionAddonT, DSCardV2ActionAddonPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2ActionAddonCTX {\n propsWithDefault: DSCardV2ActionAddonT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2ActionAddon = (propsFromUser: DSCardV2ActionAddonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2ActionAddonT.InternalProps>(\n propsFromUser,\n defaultProps,\n );\n useValidateProps(propsWithDefault, DSCardV2ActionAddonPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2ActionAddonT.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 // 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 // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AACpB,SAAoC,8BAA8B,oBAAoB;AACtF,SAAS,wBAAwB;AAS1B,MAAM,uBAAuB,CAAC,kBAA8C;AAIjF,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,mBAAiB,kBAAkB,4BAA4B;AAI/D,QAAM,cAAc,KAAK,uBAA2D,gBAAgB,GAAG;AAAA,IACrG;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;AAM1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-legacy-utilities';
|
|
3
2
|
import { type DSCardV2ActionAddonT } from '../react-desc-prop-types.js';
|
|
4
3
|
export interface CardV2ActionAddonCTX {
|
|
@@ -9,7 +8,7 @@ export interface CardV2ActionAddonCTX {
|
|
|
9
8
|
}
|
|
10
9
|
export declare const useCardV2ActionAddon: (propsFromUser: DSCardV2ActionAddonT.Props) => {
|
|
11
10
|
propsWithDefault: DSCardV2ActionAddonT.InternalProps;
|
|
12
|
-
globalProps:
|
|
11
|
+
globalProps: any;
|
|
13
12
|
xstyledProps: import("@elliemae/ds-legacy-utilities").XstyledProps;
|
|
14
13
|
instanceUid: string;
|
|
15
14
|
};
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { DSCardV2ActionAddonT } from './react-desc-prop-types.js';
|
|
3
|
-
declare const Addon: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-legacy-button-v2").DSButtonT.Props>, import("@elliemae/ds-legacy-system").Theme, {
|
|
4
|
-
onClick: DSCardV2ActionAddonT.Props['onClick'];
|
|
5
|
-
} & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
|
|
1
|
+
declare const Addon: any;
|
|
6
2
|
export { Addon };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-legacy-card-v2-action-addon",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Card V2 Action Addon",
|
|
6
6
|
"files": [
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@xstyled/system": "~3.7.3",
|
|
39
39
|
"uid": "~2.0.1",
|
|
40
|
-
"@elliemae/ds-legacy-button-v2": "1.0.
|
|
41
|
-
"@elliemae/ds-legacy-
|
|
42
|
-
"@elliemae/ds-legacy-utilities": "1.0.
|
|
43
|
-
"@elliemae/ds-legacy-
|
|
40
|
+
"@elliemae/ds-legacy-button-v2": "1.0.16",
|
|
41
|
+
"@elliemae/ds-legacy-system": "1.0.16",
|
|
42
|
+
"@elliemae/ds-legacy-utilities": "1.0.16",
|
|
43
|
+
"@elliemae/ds-legacy-icons": "1.0.16"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@elliemae/pui-cli": "9.0.0-next.50",
|
|
47
|
-
"lodash": "^4.17.21",
|
|
47
|
+
"lodash-es": "^4.17.21",
|
|
48
48
|
"styled-components": "~5.3.9",
|
|
49
|
-
"@elliemae/ds-legacy-monorepo-devops": "1.0.
|
|
49
|
+
"@elliemae/ds-legacy-monorepo-devops": "1.0.16"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^17.0.2",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { WeakValidationMap } from 'react';
|
|
2
|
-
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-legacy-utilities';
|
|
3
|
-
export declare namespace DSCardV2ActionAddonT {
|
|
4
|
-
interface RequiredProps {
|
|
5
|
-
}
|
|
6
|
-
interface DefaultProps {
|
|
7
|
-
}
|
|
8
|
-
interface OptionalProps {
|
|
9
|
-
label?: string;
|
|
10
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
-
icon?: JSX.Element;
|
|
12
|
-
innerRef: React.RefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);
|
|
13
|
-
}
|
|
14
|
-
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
15
|
-
}
|
|
16
|
-
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export declare const defaultProps: DSCardV2ActionAddonT.DefaultProps;
|
|
20
|
-
export declare const DSCardV2ActionAddonPropTypes: DSPropTypesSchema<DSCardV2ActionAddonT.Props>;
|
|
21
|
-
export declare const DSCardV2ActionAddonPropTypesSchema: WeakValidationMap<DSCardV2ActionAddonT.Props>;
|