Comparing version 12.5.8 to 12.5.9
@@ -19,3 +19,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import TabContext from "../TabContext"; | ||
import { genDataNodeKey, stringify } from "../util"; | ||
import { stringify } from "../util"; | ||
import AddButton from "./AddButton"; | ||
@@ -294,3 +294,3 @@ import ExtraContent from "./ExtraContent"; | ||
var key = _ref2.key; | ||
var btnNode = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.querySelector("[data-node-key=\"".concat(genDataNodeKey(key), "\"]")); | ||
var btnNode = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.querySelector("[data-node-key=\"".concat(key, "\"]")); | ||
if (btnNode) { | ||
@@ -297,0 +297,0 @@ newSizes.set(key, { |
@@ -5,3 +5,2 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import * as React from 'react'; | ||
import { genDataNodeKey } from "../util"; | ||
function TabNode(_ref) { | ||
@@ -44,3 +43,3 @@ var _classNames; | ||
, | ||
"data-node-key": genDataNodeKey(key), | ||
"data-node-key": key, | ||
className: classNames(tabPrefix, (_classNames = {}, _defineProperty(_classNames, "".concat(tabPrefix, "-with-remove"), removable), _defineProperty(_classNames, "".concat(tabPrefix, "-active"), active), _defineProperty(_classNames, "".concat(tabPrefix, "-disabled"), disabled), _classNames)), | ||
@@ -47,0 +46,0 @@ style: style, |
@@ -6,2 +6,1 @@ /** | ||
export declare function stringify<K extends string | number | symbol, V>(obj: Record<K, V> | Map<K, V>): string; | ||
export declare function genDataNodeKey(key: string): string; |
@@ -16,6 +16,2 @@ /** | ||
return JSON.stringify(tgt); | ||
} | ||
var RC_TABS_DOUBLE_QUOTE = 'TABS_DQ'; | ||
export function genDataNodeKey(key) { | ||
return key.replace(/"/g, RC_TABS_DOUBLE_QUOTE); | ||
} |
@@ -302,3 +302,3 @@ "use strict"; | ||
var key = _ref2.key; | ||
var btnNode = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.querySelector("[data-node-key=\"".concat((0, _util.genDataNodeKey)(key), "\"]")); | ||
var btnNode = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.querySelector("[data-node-key=\"".concat(key, "\"]")); | ||
if (btnNode) { | ||
@@ -305,0 +305,0 @@ newSizes.set(key, { |
@@ -13,3 +13,2 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _util = require("../util"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -54,3 +53,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
, | ||
"data-node-key": (0, _util.genDataNodeKey)(key), | ||
"data-node-key": key, | ||
className: (0, _classnames.default)(tabPrefix, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(tabPrefix, "-with-remove"), removable), (0, _defineProperty2.default)(_classNames, "".concat(tabPrefix, "-active"), active), (0, _defineProperty2.default)(_classNames, "".concat(tabPrefix, "-disabled"), disabled), _classNames)), | ||
@@ -57,0 +56,0 @@ style: style, |
@@ -6,2 +6,1 @@ /** | ||
export declare function stringify<K extends string | number | symbol, V>(obj: Record<K, V> | Map<K, V>): string; | ||
export declare function genDataNodeKey(key: string): string; |
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
exports.genDataNodeKey = genDataNodeKey; | ||
exports.stringify = stringify; | ||
@@ -24,6 +23,2 @@ /** | ||
return JSON.stringify(tgt); | ||
} | ||
var RC_TABS_DOUBLE_QUOTE = 'TABS_DQ'; | ||
function genDataNodeKey(key) { | ||
return key.replace(/"/g, RC_TABS_DOUBLE_QUOTE); | ||
} |
{ | ||
"name": "rc-tabs", | ||
"version": "12.5.8", | ||
"version": "12.5.9", | ||
"description": "tabs ui component for react", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153878
3662