1 line
2.9 KiB
JSON
1 line
2.9 KiB
JSON
{"ast":null,"code":"import { fillRef, supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nvar TriggerWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var children = props.children,\n getTriggerDOMNode = props.getTriggerDOMNode;\n var canUseRef = supportRef(children);\n\n // When use `getTriggerDOMNode`, we should do additional work to get the real dom\n var setRef = React.useCallback(function (node) {\n fillRef(ref, getTriggerDOMNode ? getTriggerDOMNode(node) : node);\n }, [getTriggerDOMNode]);\n var mergedRef = useComposeRef(setRef, children.ref);\n return canUseRef ? /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n }) : children;\n});\nif (process.env.NODE_ENV !== 'production') {\n TriggerWrapper.displayName = 'TriggerWrapper';\n}\nexport default TriggerWrapper;","map":{"version":3,"names":["fillRef","supportRef","useComposeRef","React","TriggerWrapper","forwardRef","props","ref","children","getTriggerDOMNode","canUseRef","setRef","useCallback","node","mergedRef","cloneElement","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@rc-component/trigger/es/TriggerWrapper.js"],"sourcesContent":["import { fillRef, supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nvar TriggerWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var children = props.children,\n getTriggerDOMNode = props.getTriggerDOMNode;\n var canUseRef = supportRef(children);\n\n // When use `getTriggerDOMNode`, we should do additional work to get the real dom\n var setRef = React.useCallback(function (node) {\n fillRef(ref, getTriggerDOMNode ? getTriggerDOMNode(node) : node);\n }, [getTriggerDOMNode]);\n var mergedRef = useComposeRef(setRef, children.ref);\n return canUseRef ? /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n }) : children;\n});\nif (process.env.NODE_ENV !== 'production') {\n TriggerWrapper.displayName = 'TriggerWrapper';\n}\nexport default TriggerWrapper;"],"mappings":"AAAA,SAASA,OAAO,EAAEC,UAAU,EAAEC,aAAa,QAAQ,gBAAgB;AACnE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,IAAIC,cAAc,GAAG,aAAaD,KAAK,CAACE,UAAU,CAAC,UAAUC,KAAK,EAAEC,GAAG,EAAE;EACvE,IAAIC,QAAQ,GAAGF,KAAK,CAACE,QAAQ;IAC3BC,iBAAiB,GAAGH,KAAK,CAACG,iBAAiB;EAC7C,IAAIC,SAAS,GAAGT,UAAU,CAACO,QAAQ,CAAC;;EAEpC;EACA,IAAIG,MAAM,GAAGR,KAAK,CAACS,WAAW,CAAC,UAAUC,IAAI,EAAE;IAC7Cb,OAAO,CAACO,GAAG,EAAEE,iBAAiB,GAAGA,iBAAiB,CAACI,IAAI,CAAC,GAAGA,IAAI,CAAC;EAClE,CAAC,EAAE,CAACJ,iBAAiB,CAAC,CAAC;EACvB,IAAIK,SAAS,GAAGZ,aAAa,CAACS,MAAM,EAAEH,QAAQ,CAACD,GAAG,CAAC;EACnD,OAAOG,SAAS,GAAG,aAAaP,KAAK,CAACY,YAAY,CAACP,QAAQ,EAAE;IAC3DD,GAAG,EAAEO;EACP,CAAC,CAAC,GAAGN,QAAQ;AACf,CAAC,CAAC;AACF,IAAIQ,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACzCd,cAAc,CAACe,WAAW,GAAG,gBAAgB;AAC/C;AACA,eAAef,cAAc","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |