@elliemae/ds-props-helpers 3.37.0-rc.4 → 3.37.0
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/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/useOwnerProps/index.js +41 -0
- package/dist/cjs/useOwnerProps/index.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/useOwnerProps/index.js +11 -0
- package/dist/esm/useOwnerProps/index.js.map +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/useOwnerProps/index.d.ts +4 -0
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
useGetGlobalAttributes: () => import_globalProps.useGetGlobalAttributes,
|
|
44
44
|
useGetXstyledProps: () => import_xstyledProps.useGetXstyledProps,
|
|
45
45
|
useMemoMergePropsWithDefault: () => import_defaultProps.useMemoMergePropsWithDefault,
|
|
46
|
+
useOwnerProps: () => import_useOwnerProps.useOwnerProps,
|
|
46
47
|
useValidateTypescriptPropTypes: () => import_validation.useValidateTypescriptPropTypes,
|
|
47
48
|
validateTypescriptPropTypesImplementation: () => import_validation.validateTypescriptPropTypesImplementation,
|
|
48
49
|
xstyledPropTypes: () => import_xstyledProps.xstyledPropTypes
|
|
@@ -58,4 +59,5 @@ var import_xstyledProps = require("./xstyledProps/index.js");
|
|
|
58
59
|
var import_useDeprecateComponent = require("./useDeprecateComponent/index.js");
|
|
59
60
|
var import_propsPerDataTestId = require("./propsPerDataTestId/index.js");
|
|
60
61
|
var import_propsPerSlot = require("./propsPerSlot/index.js");
|
|
62
|
+
var import_useOwnerProps = require("./useOwnerProps/index.js");
|
|
61
63
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6C;AAC7C,sBAA2C;AAC3C,yBAKO;AACP,uBAA4D;AAE5D,wBAKO;AACP,0BAAwE;AACxE,mCAAsC;AAEtC,gCAAsE;AACtE,0BAAyC;",
|
|
4
|
+
"sourcesContent": ["export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6C;AAC7C,sBAA2C;AAC3C,yBAKO;AACP,uBAA4D;AAE5D,wBAKO;AACP,0BAAwE;AACxE,mCAAsC;AAEtC,gCAAsE;AACtE,0BAAyC;AACzC,2BAA8B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useOwnerProps_exports = {};
|
|
30
|
+
__export(useOwnerProps_exports, {
|
|
31
|
+
useOwnerProps: () => useOwnerProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useOwnerProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
const useOwnerProps = (props, args) => {
|
|
37
|
+
const getOwnerProps = (0, import_react.useCallback)(() => props, [props]);
|
|
38
|
+
const getOwnerPropsArguments = (0, import_react.useCallback)(() => args ?? {}, [args]);
|
|
39
|
+
return { getOwnerProps, getOwnerPropsArguments };
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/useOwnerProps/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback } from 'react';\n\nexport const useOwnerProps = <P, A extends object = Record<string, never>>(props: P, args?: A) => {\n const getOwnerProps = useCallback(() => props, [props]);\n const getOwnerPropsArguments = useCallback(() => args ?? {}, [args]);\n return { getOwnerProps, getOwnerPropsArguments };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4B;AAErB,MAAM,gBAAgB,CAA8C,OAAU,SAAa;AAChG,QAAM,oBAAgB,0BAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AACtD,QAAM,6BAAyB,0BAAY,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AACnE,SAAO,EAAE,eAAe,uBAAuB;AACjD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { useGetXstyledProps, xstyledPropTypes } from "./xstyledProps/index.js";
|
|
|
17
17
|
import { useDeprecateComponent } from "./useDeprecateComponent/index.js";
|
|
18
18
|
import { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from "./propsPerDataTestId/index.js";
|
|
19
19
|
import { getPropsPerSlotPropTypes } from "./propsPerSlot/index.js";
|
|
20
|
+
import { useOwnerProps } from "./useOwnerProps/index.js";
|
|
20
21
|
export {
|
|
21
22
|
PropTypes,
|
|
22
23
|
describe,
|
|
@@ -33,6 +34,7 @@ export {
|
|
|
33
34
|
useGetGlobalAttributes,
|
|
34
35
|
useGetXstyledProps,
|
|
35
36
|
useMemoMergePropsWithDefault,
|
|
37
|
+
useOwnerProps,
|
|
36
38
|
useValidateTypescriptPropTypes,
|
|
37
39
|
validateTypescriptPropTypesImplementation,
|
|
38
40
|
xstyledPropTypes
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;AAC7C,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,iBAAyC;AAE5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA4B,oBAAoB,wBAAwB;AACxE,SAAS,6BAA6B;AAEtC,SAAS,uBAAuB,sCAAsC;AACtE,SAAS,gCAAgC;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;AAC7C,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,iBAAyC;AAE5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA4B,oBAAoB,wBAAwB;AACxE,SAAS,6BAA6B;AAEtC,SAAS,uBAAuB,sCAAsC;AACtE,SAAS,gCAAgC;AACzC,SAAS,qBAAqB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
const useOwnerProps = (props, args) => {
|
|
4
|
+
const getOwnerProps = useCallback(() => props, [props]);
|
|
5
|
+
const getOwnerPropsArguments = useCallback(() => args ?? {}, [args]);
|
|
6
|
+
return { getOwnerProps, getOwnerPropsArguments };
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
useOwnerProps
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/useOwnerProps/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback } from 'react';\n\nexport const useOwnerProps = <P, A extends object = Record<string, never>>(props: P, args?: A) => {\n const getOwnerProps = useCallback(() => props, [props]);\n const getOwnerPropsArguments = useCallback(() => args ?? {}, [args]);\n return { getOwnerProps, getOwnerPropsArguments };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,mBAAmB;AAErB,MAAM,gBAAgB,CAA8C,OAAU,SAAa;AAChG,QAAM,gBAAgB,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AACtD,QAAM,yBAAyB,YAAY,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AACnE,SAAO,EAAE,eAAe,uBAAuB;AACjD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyl
|
|
|
8
8
|
export { useDeprecateComponent } from './useDeprecateComponent/index.js';
|
|
9
9
|
export { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';
|
|
10
10
|
export { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';
|
|
11
|
+
export { useOwnerProps } from './useOwnerProps/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-props-helpers",
|
|
3
|
-
"version": "3.37.0
|
|
3
|
+
"version": "3.37.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Props Helpers",
|
|
6
6
|
"files": [
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"fast-deep-equal": "~3.1.3",
|
|
37
37
|
"prop-types": "~15.8.1",
|
|
38
|
-
"@elliemae/ds-
|
|
39
|
-
"@elliemae/ds-
|
|
38
|
+
"@elliemae/ds-system": "3.37.0",
|
|
39
|
+
"@elliemae/ds-typescript-helpers": "3.37.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@elliemae/pui-cli": "9.0.0-next.50",
|
|
43
|
-
"@elliemae/ds-monorepo-devops": "3.37.0
|
|
43
|
+
"@elliemae/ds-monorepo-devops": "3.37.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"lodash": "^4.17.21",
|