@fluentui/react-utilities 9.7.1 → 9.7.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/.swcrc +30 -0
- package/CHANGELOG.json +34 -1
- package/CHANGELOG.md +14 -2
- package/dist/index.d.ts +15 -3
- package/lib/compose/getSlots.js +3 -3
- package/lib/compose/getSlots.js.map +1 -1
- package/lib/compose/index.js.map +1 -1
- package/lib/compose/isResolvedShorthand.js.map +1 -1
- package/lib/compose/resolveShorthand.js.map +1 -1
- package/lib/compose/types.js +1 -1
- package/lib/compose/types.js.map +1 -1
- package/lib/events/index.js.map +1 -1
- package/lib/events/mouseTouchHelpers.js +1 -0
- package/lib/events/mouseTouchHelpers.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useControllableState.js.map +1 -1
- package/lib/hooks/useEventCallback.js.map +1 -1
- package/lib/hooks/useFirstMount.js.map +1 -1
- package/lib/hooks/useForceUpdate.js.map +1 -1
- package/lib/hooks/useId.js.map +1 -1
- package/lib/hooks/useIsomorphicLayoutEffect.js +1 -2
- package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/lib/hooks/useMergedRefs.js.map +1 -1
- package/lib/hooks/useOnClickOutside.js +16 -9
- package/lib/hooks/useOnClickOutside.js.map +1 -1
- package/lib/hooks/useOnScrollOutside.js +3 -1
- package/lib/hooks/useOnScrollOutside.js.map +1 -1
- package/lib/hooks/usePrevious.js.map +1 -1
- package/lib/hooks/useScrollbarWidth.js.map +1 -1
- package/lib/hooks/useTimeout.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/ssr/SSRContext.js +2 -2
- package/lib/ssr/SSRContext.js.map +1 -1
- package/lib/ssr/canUseDOM.js +1 -2
- package/lib/ssr/canUseDOM.js.map +1 -1
- package/lib/ssr/index.js.map +1 -1
- package/lib/trigger/applyTriggerPropsToChildren.js.map +1 -1
- package/lib/trigger/getTriggerChild.js.map +1 -1
- package/lib/trigger/index.js.map +1 -1
- package/lib/trigger/isFluentTrigger.js +1 -0
- package/lib/trigger/isFluentTrigger.js.map +1 -1
- package/lib/trigger/types.js +1 -1
- package/lib/trigger/types.js.map +1 -1
- package/lib/utils/clamp.js +1 -2
- package/lib/utils/clamp.js.map +1 -1
- package/lib/utils/getNativeElementProps.js +2 -2
- package/lib/utils/getNativeElementProps.js.map +1 -1
- package/lib/utils/getRTLSafeKey.js +1 -2
- package/lib/utils/getRTLSafeKey.js.map +1 -1
- package/lib/utils/getReactCallbackName.js +1 -0
- package/lib/utils/getReactCallbackName.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isHTMLElement.js +12 -7
- package/lib/utils/isHTMLElement.js.map +1 -1
- package/lib/utils/isInteractiveHTMLElement.js.map +1 -1
- package/lib/utils/mergeCallbacks.js +1 -2
- package/lib/utils/mergeCallbacks.js.map +1 -1
- package/lib/utils/omit.js +1 -2
- package/lib/utils/omit.js.map +1 -1
- package/lib/utils/properties.js +24 -51
- package/lib/utils/properties.js.map +1 -1
- package/lib-commonjs/compose/getSlots.js +48 -55
- package/lib-commonjs/compose/getSlots.js.map +1 -1
- package/lib-commonjs/compose/index.js +8 -7
- package/lib-commonjs/compose/index.js.map +1 -1
- package/lib-commonjs/compose/isResolvedShorthand.js +9 -37
- package/lib-commonjs/compose/isResolvedShorthand.js.map +1 -1
- package/lib-commonjs/compose/resolveShorthand.js +25 -32
- package/lib-commonjs/compose/resolveShorthand.js.map +1 -1
- package/lib-commonjs/compose/types.js +5 -2
- package/lib-commonjs/compose/types.js.map +1 -1
- package/lib-commonjs/events/index.js +5 -4
- package/lib-commonjs/events/index.js.map +1 -1
- package/lib-commonjs/events/mouseTouchHelpers.js +40 -37
- package/lib-commonjs/events/mouseTouchHelpers.js.map +1 -1
- package/lib-commonjs/hooks/index.js +16 -15
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useControllableState.js +63 -64
- package/lib-commonjs/hooks/useControllableState.js.map +1 -1
- package/lib-commonjs/hooks/useEventCallback.js +25 -31
- package/lib-commonjs/hooks/useEventCallback.js.map +1 -1
- package/lib-commonjs/hooks/useFirstMount.js +15 -23
- package/lib-commonjs/hooks/useFirstMount.js.map +1 -1
- package/lib-commonjs/hooks/useForceUpdate.js +9 -11
- package/lib-commonjs/hooks/useForceUpdate.js.map +1 -1
- package/lib-commonjs/hooks/useId.js +47 -46
- package/lib-commonjs/hooks/useId.js.map +1 -1
- package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js +10 -16
- package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/lib-commonjs/hooks/useMergedRefs.js +25 -27
- package/lib-commonjs/hooks/useMergedRefs.js.map +1 -1
- package/lib-commonjs/hooks/useOnClickOutside.js +118 -114
- package/lib-commonjs/hooks/useOnClickOutside.js.map +1 -1
- package/lib-commonjs/hooks/useOnScrollOutside.js +35 -36
- package/lib-commonjs/hooks/useOnScrollOutside.js.map +1 -1
- package/lib-commonjs/hooks/usePrevious.js +17 -15
- package/lib-commonjs/hooks/usePrevious.js.map +1 -1
- package/lib-commonjs/hooks/useScrollbarWidth.js +32 -32
- package/lib-commonjs/hooks/useScrollbarWidth.js.map +1 -1
- package/lib-commonjs/hooks/useTimeout.js +30 -30
- package/lib-commonjs/hooks/useTimeout.js.map +1 -1
- package/lib-commonjs/index.js +52 -214
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/ssr/SSRContext.js +57 -59
- package/lib-commonjs/ssr/SSRContext.js.map +1 -1
- package/lib-commonjs/ssr/canUseDOM.js +12 -12
- package/lib-commonjs/ssr/canUseDOM.js.map +1 -1
- package/lib-commonjs/ssr/index.js +6 -5
- package/lib-commonjs/ssr/index.js.map +1 -1
- package/lib-commonjs/trigger/applyTriggerPropsToChildren.js +29 -31
- package/lib-commonjs/trigger/applyTriggerPropsToChildren.js.map +1 -1
- package/lib-commonjs/trigger/getTriggerChild.js +16 -36
- package/lib-commonjs/trigger/getTriggerChild.js.map +1 -1
- package/lib-commonjs/trigger/index.js +8 -7
- package/lib-commonjs/trigger/index.js.map +1 -1
- package/lib-commonjs/trigger/isFluentTrigger.js +10 -11
- package/lib-commonjs/trigger/isFluentTrigger.js.map +1 -1
- package/lib-commonjs/trigger/types.js +5 -2
- package/lib-commonjs/trigger/types.js.map +1 -1
- package/lib-commonjs/utils/clamp.js +10 -9
- package/lib-commonjs/utils/clamp.js.map +1 -1
- package/lib-commonjs/utils/getNativeElementProps.js +54 -61
- package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
- package/lib-commonjs/utils/getRTLSafeKey.js +22 -21
- package/lib-commonjs/utils/getRTLSafeKey.js.map +1 -1
- package/lib-commonjs/utils/getReactCallbackName.js +24 -24
- package/lib-commonjs/utils/getReactCallbackName.js.map +1 -1
- package/lib-commonjs/utils/index.js +12 -11
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isHTMLElement.js +22 -15
- package/lib-commonjs/utils/isHTMLElement.js.map +1 -1
- package/lib-commonjs/utils/isInteractiveHTMLElement.js +20 -24
- package/lib-commonjs/utils/isInteractiveHTMLElement.js.map +1 -1
- package/lib-commonjs/utils/mergeCallbacks.js +14 -13
- package/lib-commonjs/utils/mergeCallbacks.js.map +1 -1
- package/lib-commonjs/utils/omit.js +18 -17
- package/lib-commonjs/utils/omit.js.map +1 -1
- package/lib-commonjs/utils/properties.js +327 -223
- package/lib-commonjs/utils/properties.js.map +1 -1
- package/package.json +5 -4
- package/lib-amd/compose/getSlots.js +0 -58
- package/lib-amd/compose/getSlots.js.map +0 -1
- package/lib-amd/compose/index.js +0 -9
- package/lib-amd/compose/index.js.map +0 -1
- package/lib-amd/compose/isResolvedShorthand.js +0 -40
- package/lib-amd/compose/isResolvedShorthand.js.map +0 -1
- package/lib-amd/compose/resolveShorthand.js +0 -27
- package/lib-amd/compose/resolveShorthand.js.map +0 -1
- package/lib-amd/compose/types.js +0 -5
- package/lib-amd/compose/types.js.map +0 -1
- package/lib-amd/events/index.js +0 -6
- package/lib-amd/events/index.js.map +0 -1
- package/lib-amd/events/mouseTouchHelpers.js +0 -39
- package/lib-amd/events/mouseTouchHelpers.js.map +0 -1
- package/lib-amd/hooks/index.js +0 -17
- package/lib-amd/hooks/index.js.map +0 -1
- package/lib-amd/hooks/useControllableState.js +0 -81
- package/lib-amd/hooks/useControllableState.js.map +0 -1
- package/lib-amd/hooks/useEventCallback.js +0 -36
- package/lib-amd/hooks/useEventCallback.js.map +0 -1
- package/lib-amd/hooks/useFirstMount.js +0 -26
- package/lib-amd/hooks/useFirstMount.js.map +0 -1
- package/lib-amd/hooks/useForceUpdate.js +0 -14
- package/lib-amd/hooks/useForceUpdate.js.map +0 -1
- package/lib-amd/hooks/useId.js +0 -54
- package/lib-amd/hooks/useId.js.map +0 -1
- package/lib-amd/hooks/useIsomorphicLayoutEffect.js +0 -17
- package/lib-amd/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/lib-amd/hooks/useMergedRefs.js +0 -34
- package/lib-amd/hooks/useMergedRefs.js.map +0 -1
- package/lib-amd/hooks/useOnClickOutside.js +0 -114
- package/lib-amd/hooks/useOnClickOutside.js.map +0 -1
- package/lib-amd/hooks/useOnScrollOutside.js +0 -31
- package/lib-amd/hooks/useOnScrollOutside.js.map +0 -1
- package/lib-amd/hooks/usePrevious.js +0 -17
- package/lib-amd/hooks/usePrevious.js.map +0 -1
- package/lib-amd/hooks/useScrollbarWidth.js +0 -32
- package/lib-amd/hooks/useScrollbarWidth.js.map +0 -1
- package/lib-amd/hooks/useTimeout.js +0 -33
- package/lib-amd/hooks/useTimeout.js.map +0 -1
- package/lib-amd/index.js +0 -40
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/ssr/SSRContext.js +0 -69
- package/lib-amd/ssr/SSRContext.js.map +0 -1
- package/lib-amd/ssr/canUseDOM.js +0 -16
- package/lib-amd/ssr/canUseDOM.js.map +0 -1
- package/lib-amd/ssr/index.js +0 -7
- package/lib-amd/ssr/index.js.map +0 -1
- package/lib-amd/trigger/applyTriggerPropsToChildren.js +0 -40
- package/lib-amd/trigger/applyTriggerPropsToChildren.js.map +0 -1
- package/lib-amd/trigger/getTriggerChild.js +0 -40
- package/lib-amd/trigger/getTriggerChild.js.map +0 -1
- package/lib-amd/trigger/index.js +0 -9
- package/lib-amd/trigger/index.js.map +0 -1
- package/lib-amd/trigger/isFluentTrigger.js +0 -15
- package/lib-amd/trigger/isFluentTrigger.js.map +0 -1
- package/lib-amd/trigger/types.js +0 -5
- package/lib-amd/trigger/types.js.map +0 -1
- package/lib-amd/utils/clamp.js +0 -16
- package/lib-amd/utils/clamp.js.map +0 -1
- package/lib-amd/utils/getNativeElementProps.js +0 -64
- package/lib-amd/utils/getNativeElementProps.js.map +0 -1
- package/lib-amd/utils/getRTLSafeKey.js +0 -24
- package/lib-amd/utils/getRTLSafeKey.js.map +0 -1
- package/lib-amd/utils/index.js +0 -13
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/isHTMLElement.js +0 -22
- package/lib-amd/utils/isHTMLElement.js.map +0 -1
- package/lib-amd/utils/isInteractiveHTMLElement.js +0 -25
- package/lib-amd/utils/isInteractiveHTMLElement.js.map +0 -1
- package/lib-amd/utils/mergeCallbacks.js +0 -40
- package/lib-amd/utils/mergeCallbacks.js.map +0 -1
- package/lib-amd/utils/omit.js +0 -31
- package/lib-amd/utils/omit.js.map +0 -1
- package/lib-amd/utils/properties.js +0 -450
- package/lib-amd/utils/properties.js.map +0 -1
@@ -1,69 +1,62 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
getNativeElementProps: ()=>getNativeElementProps,
|
13
|
+
getPartitionedNativeProps: ()=>getPartitionedNativeProps
|
5
14
|
});
|
6
|
-
|
7
|
-
const
|
15
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
16
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
17
|
+
const _properties = require("./properties");
|
8
18
|
const nativeElementMap = {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
19
|
+
label: _properties.labelProperties,
|
20
|
+
audio: _properties.audioProperties,
|
21
|
+
video: _properties.videoProperties,
|
22
|
+
ol: _properties.olProperties,
|
23
|
+
li: _properties.liProperties,
|
24
|
+
a: _properties.anchorProperties,
|
25
|
+
button: _properties.buttonProperties,
|
26
|
+
input: _properties.inputProperties,
|
27
|
+
textarea: _properties.textAreaProperties,
|
28
|
+
select: _properties.selectProperties,
|
29
|
+
option: _properties.optionProperties,
|
30
|
+
table: _properties.tableProperties,
|
31
|
+
tr: _properties.trProperties,
|
32
|
+
th: _properties.thProperties,
|
33
|
+
td: _properties.tdProperties,
|
34
|
+
colGroup: _properties.colGroupProperties,
|
35
|
+
col: _properties.colProperties,
|
36
|
+
fieldset: _properties.fieldsetProperties,
|
37
|
+
form: _properties.formProperties,
|
38
|
+
iframe: _properties.iframeProperties,
|
39
|
+
img: _properties.imgProperties,
|
40
|
+
time: _properties.timeProperties,
|
41
|
+
dialog: _properties.dialogProperties
|
32
42
|
};
|
33
|
-
/**
|
34
|
-
* Given an element tagname and user props, filters the props to only allowed props for the given
|
35
|
-
* element type.
|
36
|
-
* @param tagName - Tag name (e.g. "div")
|
37
|
-
* @param props - Props object
|
38
|
-
* @param excludedPropNames - List of props to disallow
|
39
|
-
*/
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
41
43
|
function getNativeElementProps(tagName, props, excludedPropNames) {
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
const allowedPropNames = tagName && nativeElementMap[tagName] || _properties.htmlElementProperties;
|
45
|
+
allowedPropNames.as = 1;
|
46
|
+
return (0, _properties.getNativeProps)(props, allowedPropNames, excludedPropNames);
|
45
47
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
return {
|
61
|
-
root: {
|
62
|
-
style: props.style,
|
63
|
-
className: props.className
|
64
|
-
},
|
65
|
-
primary: getNativeElementProps(primarySlotTagName, props, [...(excludedPropNames || []), 'style', 'className'])
|
66
|
-
};
|
67
|
-
};
|
68
|
-
exports.getPartitionedNativeProps = getPartitionedNativeProps;
|
48
|
+
const getPartitionedNativeProps = ({ primarySlotTagName , props , excludedPropNames })=>{
|
49
|
+
return {
|
50
|
+
root: {
|
51
|
+
style: props.style,
|
52
|
+
className: props.className
|
53
|
+
},
|
54
|
+
primary: getNativeElementProps(primarySlotTagName, props, [
|
55
|
+
...excludedPropNames || [],
|
56
|
+
'style',
|
57
|
+
'className'
|
58
|
+
])
|
59
|
+
};
|
60
|
+
}; //# sourceMappingURL=getNativeElementProps.js.map
|
61
|
+
|
69
62
|
//# sourceMappingURL=getNativeElementProps.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/getNativeElementProps.js"],"sourcesContent":["import * as React from 'react';\nimport { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps, timeProperties, dialogProperties } from './properties';\nconst nativeElementMap = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n dialog: dialogProperties\n};\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps(tagName, props, excludedPropNames) {\n const allowedPropNames = tagName && nativeElementMap[tagName] || htmlElementProperties;\n allowedPropNames.as = 1;\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = ({\n primarySlotTagName,\n props,\n excludedPropNames\n}) => {\n return {\n root: {\n style: props.style,\n className: props.className\n },\n primary: getNativeElementProps(primarySlotTagName, props, [...(excludedPropNames || []), 'style', 'className'])\n };\n};\n//# sourceMappingURL=getNativeElementProps.js.map"],"names":["getNativeElementProps","getPartitionedNativeProps","nativeElementMap","label","labelProperties","audio","audioProperties","video","videoProperties","ol","olProperties","li","liProperties","a","anchorProperties","button","buttonProperties","input","inputProperties","textarea","textAreaProperties","select","selectProperties","option","optionProperties","table","tableProperties","tr","trProperties","th","thProperties","td","tdProperties","colGroup","colGroupProperties","col","colProperties","fieldset","fieldsetProperties","form","formProperties","iframe","iframeProperties","img","imgProperties","time","timeProperties","dialog","dialogProperties","tagName","props","excludedPropNames","allowedPropNames","htmlElementProperties","as","getNativeProps","primarySlotTagName","root","style","className","primary"],"mappings":";;;;;;;;;;;IAkCgBA,qBAAqB,MAArBA;IAaHC,yBAAyB,MAAzBA;;;6DA/CU;4BACga;AACvb,MAAMC,mBAAmB;IACvBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,GAAGC,4BAAgB;IACnBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,UAAUC,8BAAkB;IAC5BC,QAAQC,4BAAgB;IACxBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,UAAUC,8BAAkB;IAC5BC,KAAKC,yBAAa;IAClBC,UAAUC,8BAAkB;IAC5BC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;IACxBC,KAAKC,yBAAa;IAClBC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;AAC1B;AAQO,SAAShD,sBAAsBiD,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,EAAE;IACvE,MAAMC,mBAAmBH,WAAW/C,gBAAgB,CAAC+C,QAAQ,IAAII,iCAAqB;IACtFD,iBAAiBE,EAAE,GAAG;IACtB,OAAOC,IAAAA,0BAAc,EAACL,OAAOE,kBAAkBD;AACjD;AASO,MAAMlD,4BAA4B,CAAC,EACxCuD,mBAAkB,EAClBN,MAAK,EACLC,kBAAiB,EAClB,GAAK;IACJ,OAAO;QACLM,MAAM;YACJC,OAAOR,MAAMQ,KAAK;YAClBC,WAAWT,MAAMS,SAAS;QAC5B;QACAC,SAAS5D,sBAAsBwD,oBAAoBN,OAAO;eAAKC,qBAAqB,EAAE;YAAG;YAAS;SAAY;IAChH;AACF,GACA,iDAAiD"}
|
@@ -1,27 +1,28 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.getRTLSafeKey = void 0;
|
7
1
|
/**
|
8
2
|
* @internal
|
9
3
|
* Finds and swaps a provided key for it's right to left format.
|
10
|
-
*/
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
4
|
+
*/ "use strict";
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
Object.defineProperty(exports, "getRTLSafeKey", {
|
9
|
+
enumerable: true,
|
10
|
+
get: ()=>getRTLSafeKey
|
11
|
+
});
|
12
|
+
const getRTLSafeKey = (key, dir)=>{
|
13
|
+
if (dir === 'rtl') {
|
14
|
+
switch(key){
|
15
|
+
case 'ArrowLeft':
|
16
|
+
{
|
17
|
+
return 'ArrowRight';
|
18
|
+
}
|
19
|
+
case 'ArrowRight':
|
20
|
+
{
|
21
|
+
return 'ArrowLeft';
|
22
|
+
}
|
21
23
|
}
|
22
24
|
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
exports.getRTLSafeKey = getRTLSafeKey;
|
25
|
+
return key;
|
26
|
+
}; //# sourceMappingURL=getRTLSafeKey.js.map
|
27
|
+
|
27
28
|
//# sourceMappingURL=getRTLSafeKey.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/getRTLSafeKey.js"],"sourcesContent":["/**\n * @internal\n * Finds and swaps a provided key for it's right to left format.\n */export const getRTLSafeKey = (key, dir) => {\n if (dir === 'rtl') {\n switch (key) {\n case 'ArrowLeft':\n {\n return 'ArrowRight';\n }\n case 'ArrowRight':\n {\n return 'ArrowLeft';\n }\n }\n }\n return key;\n};\n//# sourceMappingURL=getRTLSafeKey.js.map"],"names":["getRTLSafeKey","key","dir"],"mappings":"AAAA;;;CAGC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,gBAAgB,CAACC,KAAKC,MAAQ;IAC5C,IAAIA,QAAQ,OAAO;QACjB,OAAQD;YACN,KAAK;gBACH;oBACE,OAAO;gBACT;YACF,KAAK;gBACH;oBACE,OAAO;gBACT;QACJ;IACF,CAAC;IACD,OAAOA;AACT,GACA,yCAAyC"}
|
@@ -1,30 +1,30 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "getReactCallbackName", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>getReactCallbackName
|
5
8
|
});
|
6
|
-
|
7
|
-
|
8
|
-
* React.SyntheticEvent contains name of a callback that should be fired, this function returns it.
|
9
|
-
*
|
10
|
-
* Ideally, it should also distinguish regular and "capture" callbacks, but it's possible only with React 17 as
|
11
|
-
* ".eventPhase" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events
|
12
|
-
* are handled in bubble phase.
|
13
|
-
*/
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
14
11
|
function getReactCallbackName(event) {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
if (event._reactName) {
|
13
|
+
return event._reactName;
|
14
|
+
}
|
15
|
+
if (event.dispatchConfig) {
|
16
|
+
if (event.dispatchConfig.registrationName) {
|
17
|
+
return event.dispatchConfig.registrationName;
|
18
|
+
}
|
19
|
+
return event.dispatchConfig.phasedRegistrationNames.bubbled;
|
21
20
|
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
|
21
|
+
if (process.env.NODE_ENV !== 'production') {
|
22
|
+
// eslint-disable-next-line no-console
|
23
|
+
console.error([
|
24
|
+
'Passed React.SyntheticEvent does not contain ".dispatchConfig" or "._reactName".',
|
25
|
+
'This should not happen, please report it to https://github.com/microsoft/fluentui'
|
26
|
+
]);
|
27
|
+
}
|
28
|
+
} //# sourceMappingURL=getReactCallbackName.js.map
|
29
|
+
|
30
30
|
//# sourceMappingURL=getReactCallbackName.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/getReactCallbackName.js"],"sourcesContent":["import * as React from 'react';\n/**\n * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.\n *\n * Ideally, it should also distinguish regular and \"capture\" callbacks, but it's possible only with React 17 as\n * \".eventPhase\" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events\n * are handled in bubble phase.\n */\nexport function getReactCallbackName(event) {\n if (event._reactName) {\n return event._reactName;\n }\n if (event.dispatchConfig) {\n if (event.dispatchConfig.registrationName) {\n return event.dispatchConfig.registrationName;\n }\n return event.dispatchConfig.phasedRegistrationNames.bubbled;\n }\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(['Passed React.SyntheticEvent does not contain \".dispatchConfig\" or \"._reactName\".', 'This should not happen, please report it to https://github.com/microsoft/fluentui']);\n }\n}\n//# sourceMappingURL=getReactCallbackName.js.map"],"names":["getReactCallbackName","event","_reactName","dispatchConfig","registrationName","phasedRegistrationNames","bubbled","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAQgBA;;aAAAA;;;6DARO;AAQhB,SAASA,qBAAqBC,KAAK,EAAE;IAC1C,IAAIA,MAAMC,UAAU,EAAE;QACpB,OAAOD,MAAMC,UAAU;IACzB,CAAC;IACD,IAAID,MAAME,cAAc,EAAE;QACxB,IAAIF,MAAME,cAAc,CAACC,gBAAgB,EAAE;YACzC,OAAOH,MAAME,cAAc,CAACC,gBAAgB;QAC9C,CAAC;QACD,OAAOH,MAAME,cAAc,CAACE,uBAAuB,CAACC,OAAO;IAC7D,CAAC;IACD,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;YAAC;YAAoF;SAAoF;IACzL,CAAC;AACH,EACA,gDAAgD"}
|
@@ -1,15 +1,16 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
|
+
_exportStar(require("./clamp"), exports);
|
7
|
+
_exportStar(require("./getNativeElementProps"), exports);
|
8
|
+
_exportStar(require("./getRTLSafeKey"), exports);
|
9
|
+
_exportStar(require("./mergeCallbacks"), exports);
|
10
|
+
_exportStar(require("./omit"), exports);
|
11
|
+
_exportStar(require("./properties"), exports);
|
12
|
+
_exportStar(require("./isHTMLElement"), exports);
|
13
|
+
_exportStar(require("./isInteractiveHTMLElement"), exports);
|
14
|
+
//# sourceMappingURL=index.js.map
|
15
|
+
|
15
16
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getNativeElementProps';\nexport * from './getRTLSafeKey';\nexport * from './mergeCallbacks';\nexport * from './omit';\nexport * from './properties';\nexport * from './isHTMLElement';\nexport * from './isInteractiveHTMLElement';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -1,22 +1,29 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.isHTMLElement = void 0;
|
7
1
|
/**
|
8
|
-
* @internal
|
9
2
|
* Verifies if a given node is an HTMLElement,
|
10
3
|
* this method works seamlessly with frames and elements from different documents
|
11
4
|
*
|
12
|
-
* This is
|
13
|
-
* might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)
|
5
|
+
* This is preferred over simply using `instanceof`.
|
6
|
+
* Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)
|
7
|
+
*
|
8
|
+
* @example
|
9
|
+
* ```ts
|
10
|
+
* isHTMLElement(event.target) && event.target.focus()
|
11
|
+
* isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value
|
12
|
+
* ```
|
14
13
|
*
|
15
|
-
*/
|
14
|
+
*/ "use strict";
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
16
|
+
value: true
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "isHTMLElement", {
|
19
|
+
enumerable: true,
|
20
|
+
get: ()=>isHTMLElement
|
21
|
+
});
|
16
22
|
function isHTMLElement(element, options) {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
23
|
+
var _typedElement_ownerDocument;
|
24
|
+
const typedElement = element;
|
25
|
+
var _options_constructorName;
|
26
|
+
return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);
|
27
|
+
} //# sourceMappingURL=isHTMLElement.js.map
|
28
|
+
|
22
29
|
//# sourceMappingURL=isHTMLElement.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/isHTMLElement.js"],"sourcesContent":["/**\n * Verifies if a given node is an HTMLElement,\n * this method works seamlessly with frames and elements from different documents\n *\n * This is preferred over simply using `instanceof`.\n * Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)\n *\n * @example\n * ```ts\n * isHTMLElement(event.target) && event.target.focus()\n * isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value\n * ```\n *\n */export function isHTMLElement(element, options) {\n var _typedElement_ownerDocument;\n const typedElement = element;\n var _options_constructorName;\n return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);\n}\n//# sourceMappingURL=isHTMLElement.js.map"],"names":["isHTMLElement","element","options","_typedElement_ownerDocument","typedElement","_options_constructorName","Boolean","ownerDocument","defaultView","constructorName"],"mappings":"AAAA;;;;;;;;;;;;;CAaC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,cAAcC,OAAO,EAAEC,OAAO,EAAE;IACjD,IAAIC;IACJ,MAAMC,eAAeH;IACrB,IAAII;IACJ,OAAOC,QAAQ,AAACF,CAAAA,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAI,AAACD,CAAAA,8BAA8BC,aAAaG,aAAa,AAAD,MAAO,IAAI,IAAIJ,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BK,WAAW,AAAD,KAAMJ,wBAAwBA,aAAaG,aAAa,CAACC,WAAW,CAAC,AAACH,CAAAA,2BAA2BH,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQO,eAAe,AAAD,MAAO,IAAI,IAAIJ,6BAA6B,KAAK,IAAIA,2BAA2B,aAAa,CAAC;AACpf,EACA,yCAAyC"}
|
@@ -1,29 +1,25 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "isInteractiveHTMLElement", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>isInteractiveHTMLElement
|
5
8
|
});
|
6
|
-
|
7
|
-
const isHTMLElement_1 = /*#__PURE__*/require("./isHTMLElement");
|
8
|
-
/**
|
9
|
-
* @internal
|
10
|
-
* Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys
|
11
|
-
*/
|
9
|
+
const _isHTMLElement = require("./isHTMLElement");
|
12
10
|
function isInteractiveHTMLElement(element) {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
tagName
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
exports.isInteractiveHTMLElement = isInteractiveHTMLElement;
|
11
|
+
if (!(0, _isHTMLElement.isHTMLElement)(element)) {
|
12
|
+
return false;
|
13
|
+
}
|
14
|
+
const { tagName } = element;
|
15
|
+
switch(tagName){
|
16
|
+
case 'BUTTON':
|
17
|
+
case 'A':
|
18
|
+
case 'INPUT':
|
19
|
+
case 'TEXTAREA':
|
20
|
+
return true;
|
21
|
+
}
|
22
|
+
return element.isContentEditable;
|
23
|
+
} //# sourceMappingURL=isInteractiveHTMLElement.js.map
|
24
|
+
|
29
25
|
//# sourceMappingURL=isInteractiveHTMLElement.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/isInteractiveHTMLElement.js"],"sourcesContent":["import { isHTMLElement } from './isHTMLElement';\n/**\n * @internal\n * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys\n */\nexport function isInteractiveHTMLElement(element) {\n if (!isHTMLElement(element)) {\n return false;\n }\n const {\n tagName\n } = element;\n switch (tagName) {\n case 'BUTTON':\n case 'A':\n case 'INPUT':\n case 'TEXTAREA':\n return true;\n }\n return element.isContentEditable;\n}\n//# sourceMappingURL=isInteractiveHTMLElement.js.map"],"names":["isInteractiveHTMLElement","element","isHTMLElement","tagName","isContentEditable"],"mappings":";;;;+BAKgBA;;aAAAA;;+BALc;AAKvB,SAASA,yBAAyBC,OAAO,EAAE;IAChD,IAAI,CAACC,IAAAA,4BAAa,EAACD,UAAU;QAC3B,OAAO,KAAK;IACd,CAAC;IACD,MAAM,EACJE,QAAO,EACR,GAAGF;IACJ,OAAQE;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO,IAAI;IACf;IACA,OAAOF,QAAQG,iBAAiB;AAClC,EACA,oDAAoD"}
|
@@ -1,9 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.mergeCallbacks = void 0;
|
7
1
|
/**
|
8
2
|
* @internal
|
9
3
|
* Combine two event callbacks into a single callback function that calls each one in order.
|
@@ -26,12 +20,19 @@ exports.mergeCallbacks = void 0;
|
|
26
20
|
* @param callback2 - The second callback to be called, or undefined
|
27
21
|
*
|
28
22
|
* @returns A function that that calls the provided functions in order
|
29
|
-
*/
|
23
|
+
*/ "use strict";
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
25
|
+
value: true
|
26
|
+
});
|
27
|
+
Object.defineProperty(exports, "mergeCallbacks", {
|
28
|
+
enumerable: true,
|
29
|
+
get: ()=>mergeCallbacks
|
30
|
+
});
|
30
31
|
function mergeCallbacks(callback1, callback2) {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
}
|
36
|
-
|
32
|
+
return (...args)=>{
|
33
|
+
callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);
|
34
|
+
callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);
|
35
|
+
};
|
36
|
+
} //# sourceMappingURL=mergeCallbacks.js.map
|
37
|
+
|
37
38
|
//# sourceMappingURL=mergeCallbacks.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/mergeCallbacks.js"],"sourcesContent":["/**\n * @internal\n * Combine two event callbacks into a single callback function that calls each one in order.\n *\n * Usage example:\n * ```ts\n * state.slot.onChange = mergeCallbacks(state.slot.onChange, ev => {\n * // Handle onChange\n * });\n * ```\n *\n * The primary use is to avoid the need to capture an existing callback (`state.slot.onChange` in the example) to a\n * local variable before replacing with a new listener that calls the existing one. This helps avoid bugs like:\n * * Infinite recursion by calling the re-assigned state.slot.onChange if it's not captured to a local variable.\n * * Missing a call to the original onChange due to an early return or other conditional.\n *\n * If you need a callback that is stable between renders, wrap the result in {@link useEventCallback}.\n *\n * @param callback1 - The first callback to be called, or undefined\n * @param callback2 - The second callback to be called, or undefined\n *\n * @returns A function that that calls the provided functions in order\n */export function mergeCallbacks(callback1, callback2) {\n return (...args) => {\n callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);\n callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);\n };\n}\n//# sourceMappingURL=mergeCallbacks.js.map"],"names":["mergeCallbacks","callback1","callback2","args"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;CAsBC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,eAAeC,SAAS,EAAEC,SAAS,EAAE;IACtD,OAAO,CAAC,GAAGC,OAAS;QAClBF,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaE,KAAK;QACxED,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaC,KAAK;IAC1E;AACF,EACA,0CAA0C"}
|
@@ -1,9 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.omit = void 0;
|
7
1
|
/**
|
8
2
|
* Tiny helper to do the minimal amount of work in duplicating an object but omitting some
|
9
3
|
* props. This ends up faster than using object ...rest or reduce to filter.
|
@@ -16,17 +10,24 @@ exports.omit = void 0;
|
|
16
10
|
*
|
17
11
|
* @param obj - The object to clone
|
18
12
|
* @param exclusions - The array of keys to exclude
|
19
|
-
*/
|
20
|
-
|
13
|
+
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
14
|
+
"use strict";
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
16
|
+
value: true
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "omit", {
|
19
|
+
enumerable: true,
|
20
|
+
get: ()=>omit
|
21
|
+
});
|
21
22
|
function omit(obj, exclusions) {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
24
|
+
const result = {};
|
25
|
+
for(const key in obj){
|
26
|
+
if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {
|
27
|
+
result[key] = obj[key];
|
28
|
+
}
|
27
29
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
exports.omit = omit;
|
30
|
+
return result;
|
31
|
+
} //# sourceMappingURL=omit.js.map
|
32
|
+
|
32
33
|
//# sourceMappingURL=omit.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/omit.js"],"sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit(obj, exclusions) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n for (const key in obj) {\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n//# sourceMappingURL=omit.js.map"],"names":["omit","obj","exclusions","result","key","indexOf","hasOwnProperty"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAAG,8DAA8D;;;;;+BAClDA;;aAAAA;;AAAT,SAASA,KAAKC,GAAG,EAAEC,UAAU,EAAE;IACpC,8DAA8D;IAC9D,MAAMC,SAAS,CAAC;IAChB,IAAK,MAAMC,OAAOH,IAAK;QACrB,IAAIC,WAAWG,OAAO,CAACD,SAAS,CAAC,KAAKH,IAAIK,cAAc,CAACF,MAAM;YAC7DD,MAAM,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;QACxB,CAAC;IACH;IACA,OAAOD;AACT,EACA,gCAAgC"}
|