iguazio.dashboard-react-controls 0.0.39 → 1.2.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.
Files changed (79) hide show
  1. package/dist/components/Backdrop/Backdrop.js +4 -11
  2. package/dist/components/Button/Button.js +25 -28
  3. package/dist/components/ConfirmDialog/ConfirmDialog.js +10 -24
  4. package/dist/components/FormCheckBox/FormCheckBox.js +25 -25
  5. package/dist/components/FormChipCell/FormChip/FormChip.js +33 -33
  6. package/dist/components/FormChipCell/FormChipCell.js +66 -109
  7. package/dist/components/FormChipCell/FormChipCellView.js +19 -37
  8. package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +58 -90
  9. package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +24 -22
  10. package/dist/components/FormChipCell/formChipCell.util.js +0 -1
  11. package/dist/components/FormCombobox/FormCombobox.js +82 -140
  12. package/dist/components/FormInput/FormInput.js +110 -175
  13. package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +6 -21
  14. package/dist/components/FormKeyValueTable/FormKeyValueTable.js +23 -39
  15. package/dist/components/FormRadio/FormRadio.js +23 -22
  16. package/dist/components/FormSelect/FormSelect.js +56 -92
  17. package/dist/components/FormSelect/FormSelect.test.js +19 -35
  18. package/dist/components/FormTextarea/FormTextarea.js +44 -69
  19. package/dist/components/Modal/Modal.js +8 -21
  20. package/dist/components/Modal/Modal.scss +2 -2
  21. package/dist/components/PopUpDialog/PopUpDialog.js +28 -43
  22. package/dist/components/RoundedIcon/RoundedIcon.js +7 -18
  23. package/dist/components/RoundedIcon/roundedIcon.scss +2 -2
  24. package/dist/components/Tip/Tip.js +25 -40
  25. package/dist/components/Tip/Tip.test.js +36 -45
  26. package/dist/components/Tooltip/Tooltip.js +40 -64
  27. package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +2 -8
  28. package/dist/components/TooltipTemplate/TextTooltipTemplate.js +2 -12
  29. package/dist/components/Wizard/Wizard.js +35 -57
  30. package/dist/components/Wizard/Wizard.scss +1 -3
  31. package/dist/components/Wizard/WizardSteps/WizardSteps.js +4 -16
  32. package/dist/components/Wizard/WizardSteps/WizardSteps.scss +1 -0
  33. package/dist/components/index.js +0 -18
  34. package/dist/constants.js +4 -6
  35. package/dist/elements/FormActionButton/FormActionButton.js +6 -12
  36. package/dist/elements/FormRowActions/FormRowActions.js +6 -18
  37. package/dist/elements/HiddenChipsBlock/HiddenChipsBlock.js +37 -55
  38. package/dist/elements/OptionsMenu/OptionsMenu.js +4 -14
  39. package/dist/elements/SelectOption/SelectOption.js +6 -18
  40. package/dist/elements/SelectOption/SelectOption.test.js +19 -12
  41. package/dist/elements/SelectOption/selectOption.scss +5 -2
  42. package/dist/elements/ValidationTemplate/ValidationTemplate.js +2 -11
  43. package/dist/elements/index.js +0 -6
  44. package/dist/hooks/index.js +0 -1
  45. package/dist/hooks/useDebounce.js +1 -5
  46. package/dist/hooks/useDetectOutsideClick.js +4 -8
  47. package/dist/hooks/useFormTable.hook.js +31 -41
  48. package/dist/images/archive-icon.svg +3 -0
  49. package/dist/images/arrow.svg +1 -1
  50. package/dist/images/close.svg +2 -2
  51. package/dist/images/collapse.svg +2 -2
  52. package/dist/images/copy-to-clipboard-icon.svg +3 -0
  53. package/dist/images/deploy-icon.svg +4 -0
  54. package/dist/images/edit.svg +1 -1
  55. package/dist/images/edit_old.svg +3 -0
  56. package/dist/images/expand.svg +2 -2
  57. package/dist/images/eye-icon.svg +3 -0
  58. package/dist/images/link-icon.svg +5 -0
  59. package/dist/images/monitor-icon.svg +3 -0
  60. package/dist/images/refresh.svg +1 -1
  61. package/dist/images/tag-icon.svg +4 -0
  62. package/dist/images/unarchive-icon.svg +3 -0
  63. package/dist/images/yaml.svg +2 -3
  64. package/dist/images/yaml_old.svg +4 -0
  65. package/dist/index.js +0 -13
  66. package/dist/scss/borders.scss +1 -1
  67. package/dist/scss/colors.scss +2 -0
  68. package/dist/scss/common.scss +7 -3
  69. package/dist/scss/mixins.scss +6 -19
  70. package/dist/scss/shadows.scss +3 -3
  71. package/dist/scss/variables.scss +2 -0
  72. package/dist/types.js +19 -49
  73. package/dist/utils/common.util.js +3 -13
  74. package/dist/utils/form.util.js +20 -24
  75. package/dist/utils/generateChipsList.util.js +0 -3
  76. package/dist/utils/getFirstScrollableParent.util.js +0 -5
  77. package/dist/utils/validation.util.js +72 -94
  78. package/package.json +104 -104
  79. package/dist/images/eye.svg +0 -4
@@ -1,39 +1,42 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  var _react = _interopRequireDefault(require("react"));
6
-
7
4
  var _react2 = require("@testing-library/react");
8
-
9
5
  var _Tip = _interopRequireDefault(require("./Tip"));
10
-
11
6
  var _jsxRuntime = require("react/jsx-runtime");
12
-
13
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
16
-
8
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
9
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
17
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
18
-
19
11
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
20
-
21
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
-
23
13
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
-
25
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
-
14
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
17
+ Copyright 2022 Iguazio Systems Ltd.
18
+ Licensed under the Apache License, Version 2.0 (the "License") with
19
+ an addition restriction as set forth herein. You may not use this
20
+ file except in compliance with the License. You may obtain a copy of
21
+ the License at http://www.apache.org/licenses/LICENSE-2.0.
22
+ Unless required by applicable law or agreed to in writing, software
23
+ distributed under the License is distributed on an "AS IS" BASIS,
24
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
25
+ implied. See the License for the specific language governing
26
+ permissions and limitations under the License.
27
+ In addition, you may not use the software for any purposes that are
28
+ illegal under applicable law, and the grant of the foregoing license
29
+ under the Apache 2.0 license is conditioned upon your compliance with
30
+ such restriction.
31
+ */
27
32
  jest.mock('../../images/question-mark.svg', function () {
28
33
  return {
29
34
  ReactComponent: 'Question-icon'
30
35
  };
31
36
  });
32
-
33
37
  var renderComponent = function renderComponent(props) {
34
38
  return (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tip.default, _objectSpread({}, props)));
35
39
  };
36
-
37
40
  describe('Tip component', function () {
38
41
  var wrapper;
39
42
  beforeEach(function () {
@@ -47,38 +50,28 @@ describe('Tip component', function () {
47
50
  });
48
51
  it('should display tip text if mouse over the icon', function () {
49
52
  var tipIcon = wrapper.getByTestId('tip-icon');
50
-
51
53
  _react2.fireEvent.mouseEnter(tipIcon);
52
-
53
54
  expect(wrapper.queryByTestId('tip-text')).not.toBeNull();
54
55
  });
55
56
  it('should hide tip text if mouse leave the icon', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
56
57
  var tipIcon, tipText;
57
58
  return _regeneratorRuntime().wrap(function _callee$(_context) {
58
- while (1) {
59
- switch (_context.prev = _context.next) {
60
- case 0:
61
- tipIcon = wrapper.getByTestId('tip-icon');
62
-
63
- _react2.fireEvent.mouseEnter(tipIcon);
64
-
65
- expect(wrapper.queryByTestId('tip-text')).not.toBeNull();
66
-
67
- _react2.fireEvent.mouseLeave(tipIcon);
68
-
69
- _context.next = 6;
70
- return (0, _react2.waitForElementToBeRemoved)(function () {
71
- return wrapper.queryByTestId('tip-text');
72
- });
73
-
74
- case 6:
75
- tipText = _context.sent;
76
- expect(tipText).toBeUndefined();
77
-
78
- case 8:
79
- case "end":
80
- return _context.stop();
81
- }
59
+ while (1) switch (_context.prev = _context.next) {
60
+ case 0:
61
+ tipIcon = wrapper.getByTestId('tip-icon');
62
+ _react2.fireEvent.mouseEnter(tipIcon);
63
+ expect(wrapper.queryByTestId('tip-text')).not.toBeNull();
64
+ _react2.fireEvent.mouseLeave(tipIcon);
65
+ _context.next = 6;
66
+ return (0, _react2.waitForElementToBeRemoved)(function () {
67
+ return wrapper.queryByTestId('tip-text');
68
+ });
69
+ case 6:
70
+ tipText = _context.sent;
71
+ expect(tipText).toBeUndefined();
72
+ case 8:
73
+ case "end":
74
+ return _context.stop();
82
75
  }
83
76
  }, _callee);
84
77
  })));
@@ -87,9 +80,7 @@ describe('Tip component', function () {
87
80
  text: "Lorem Ipsum is simply dummy text of the printing and typesetting"
88
81
  }));
89
82
  var tipIcon = wrapper.getByTestId('tip-icon');
90
-
91
83
  _react2.fireEvent.mouseEnter(tipIcon);
92
-
93
84
  var tipText = wrapper.getByTestId('tip-text');
94
85
  expect(tipText.className).toMatch('tip_big');
95
86
  });
@@ -1,115 +1,96 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _reactDom = require("react-dom");
13
-
14
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
11
  var _reactTransitionGroup = require("react-transition-group");
17
-
18
12
  var _classnames = _interopRequireDefault(require("classnames"));
19
-
20
13
  var _lodash = require("lodash");
21
-
22
14
  var _common = require("../../utils/common.util");
23
-
24
15
  require("./tooltip.scss");
25
-
26
16
  var _jsxRuntime = require("react/jsx-runtime");
27
-
28
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
18
  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); }
31
-
32
19
  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; }
33
-
34
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
-
36
21
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
-
38
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
22
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
24
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
40
25
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
-
42
26
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
43
-
44
27
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
45
-
46
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
47
-
48
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
49
-
50
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
-
28
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
29
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
30
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /*
31
+ Copyright 2022 Iguazio Systems Ltd.
32
+ Licensed under the Apache License, Version 2.0 (the "License") with
33
+ an addition restriction as set forth herein. You may not use this
34
+ file except in compliance with the License. You may obtain a copy of
35
+ the License at http://www.apache.org/licenses/LICENSE-2.0.
36
+ Unless required by applicable law or agreed to in writing, software
37
+ distributed under the License is distributed on an "AS IS" BASIS,
38
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
39
+ implied. See the License for the specific language governing
40
+ permissions and limitations under the License.
41
+ In addition, you may not use the software for any purposes that are
42
+ illegal under applicable law, and the grant of the foregoing license
43
+ under the Apache 2.0 license is conditioned upon your compliance with
44
+ such restriction.
45
+ */
52
46
  var Tooltip = function Tooltip(_ref) {
53
47
  var children = _ref.children,
54
- className = _ref.className,
55
- hidden = _ref.hidden,
56
- template = _ref.template,
57
- textShow = _ref.textShow;
58
-
48
+ className = _ref.className,
49
+ hidden = _ref.hidden,
50
+ template = _ref.template,
51
+ textShow = _ref.textShow;
59
52
  var _useState = (0, _react.useState)(false),
60
- _useState2 = _slicedToArray(_useState, 2),
61
- show = _useState2[0],
62
- setShow = _useState2[1];
63
-
53
+ _useState2 = _slicedToArray(_useState, 2),
54
+ show = _useState2[0],
55
+ setShow = _useState2[1];
64
56
  var _useState3 = (0, _react.useState)({}),
65
- _useState4 = _slicedToArray(_useState3, 2),
66
- style = _useState4[0],
67
- setStyle = _useState4[1];
68
-
57
+ _useState4 = _slicedToArray(_useState3, 2),
58
+ style = _useState4[0],
59
+ setStyle = _useState4[1];
69
60
  var tooltipClassNames = (0, _classnames.default)('data-ellipsis', 'tooltip-wrapper', className);
70
61
  var duration = 200;
71
62
  var parentRef = (0, _react.useRef)();
72
63
  var tooltipRef = (0, _react.useRef)();
73
64
  var offset = 10;
74
-
75
65
  var handleScroll = function handleScroll() {
76
66
  setShow(false);
77
67
  };
78
-
79
68
  var handleMouseLeave = function handleMouseLeave() {
80
69
  setShow(false);
81
70
  };
82
-
83
71
  var handleMouseEnter = (0, _react.useCallback)(function (event) {
84
72
  var _parentRef$current$ch = _slicedToArray(parentRef.current.childNodes, 1),
85
- child = _parentRef$current$ch[0];
86
-
73
+ child = _parentRef$current$ch[0];
87
74
  var show = !hidden && (textShow ? true : !child ? false : child.nodeType !== Node.TEXT_NODE ||
88
75
  /*
89
76
  If the child node is a text node and the text of the child node inside the container is greater than the width of the container, then show tooltip.
90
77
  */
91
78
  child.nodeType === Node.TEXT_NODE && parentRef.current.scrollWidth > parentRef.current.offsetWidth);
92
-
93
79
  if (show) {
94
80
  var _parentRef$current$ge, _parentRef$current, _tooltipRef$current$g, _tooltipRef$current;
95
-
96
81
  setShow(true);
97
-
98
82
  var _ref2 = (_parentRef$current$ge = parentRef === null || parentRef === void 0 ? void 0 : (_parentRef$current = parentRef.current) === null || _parentRef$current === void 0 ? void 0 : _parentRef$current.getBoundingClientRect()) !== null && _parentRef$current$ge !== void 0 ? _parentRef$current$ge : {},
99
- height = _ref2.height,
100
- top = _ref2.top,
101
- bottom = _ref2.bottom;
102
-
83
+ height = _ref2.height,
84
+ top = _ref2.top,
85
+ bottom = _ref2.bottom;
103
86
  var _ref3 = (_tooltipRef$current$g = (_tooltipRef$current = tooltipRef.current) === null || _tooltipRef$current === void 0 ? void 0 : _tooltipRef$current.getBoundingClientRect()) !== null && _tooltipRef$current$g !== void 0 ? _tooltipRef$current$g : {
104
- height: 0,
105
- width: 0
106
- },
107
- tooltipHeight = _ref3.height,
108
- tooltipWidth = _ref3.width;
109
-
87
+ height: 0,
88
+ width: 0
89
+ },
90
+ tooltipHeight = _ref3.height,
91
+ tooltipWidth = _ref3.width;
110
92
  var leftPosition = event.x - (event.x + tooltipWidth - window.innerWidth + offset);
111
93
  var left = event.x + tooltipWidth + offset > window.innerWidth ? leftPosition > offset ? leftPosition : offset : event.x + offset;
112
-
113
94
  if (top + height + offset + tooltipHeight >= window.innerHeight) {
114
95
  setStyle({
115
96
  top: bottom - height - offset - tooltipHeight,
@@ -130,7 +111,6 @@ var Tooltip = function Tooltip(_ref) {
130
111
  }, 100);
131
112
  (0, _react.useEffect)(function () {
132
113
  var node = parentRef.current;
133
-
134
114
  if (node) {
135
115
  node.addEventListener('mouseenter', handleMouseEnter);
136
116
  node.addEventListener('mouseleave', handleMouseLeave);
@@ -144,7 +124,6 @@ var Tooltip = function Tooltip(_ref) {
144
124
  if (show) {
145
125
  window.addEventListener('scroll', handleScroll, true);
146
126
  }
147
-
148
127
  return function () {
149
128
  return window.removeEventListener('scroll', handleScroll, true);
150
129
  };
@@ -176,7 +155,6 @@ var Tooltip = function Tooltip(_ref) {
176
155
  }), document.getElementById('overlay_container'))]
177
156
  });
178
157
  };
179
-
180
158
  Tooltip.defaultProps = {
181
159
  hidden: false,
182
160
  textShow: false
@@ -187,7 +165,5 @@ Tooltip.propTypes = {
187
165
  template: _propTypes.default.element.isRequired,
188
166
  textShow: _propTypes.default.bool
189
167
  };
190
-
191
168
  var _default = /*#__PURE__*/_react.default.memo(Tooltip);
192
-
193
169
  exports.default = _default;
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  require("./producerTooltipTemplate.scss");
13
-
14
10
  var _jsxRuntime = require("react/jsx-runtime");
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  /*
19
13
  Copyright 2022 Iguazio Systems Ltd.
20
14
  Licensed under the Apache License, Version 2.0 (the "License") with
@@ -31,9 +25,10 @@ illegal under applicable law, and the grant of the foregoing license
31
25
  under the Apache 2.0 license is conditioned upon your compliance with
32
26
  such restriction.
33
27
  */
28
+
34
29
  var ProducerTooltipTemplate = function ProducerTooltipTemplate(_ref) {
35
30
  var kind = _ref.kind,
36
- owner = _ref.owner;
31
+ owner = _ref.owner;
37
32
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
38
33
  className: "tooltip-container",
39
34
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -49,7 +44,6 @@ var ProducerTooltipTemplate = function ProducerTooltipTemplate(_ref) {
49
44
  })]
50
45
  });
51
46
  };
52
-
53
47
  ProducerTooltipTemplate.defaultProps = {
54
48
  kind: '',
55
49
  owner: ''
@@ -1,28 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
11
  require("./textTooltipTemplate.scss");
17
-
18
12
  var _jsxRuntime = require("react/jsx-runtime");
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  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); }
23
-
24
15
  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; }
25
-
26
16
  /*
27
17
  Copyright 2022 Iguazio Systems Ltd.
28
18
  Licensed under the Apache License, Version 2.0 (the "License") with
@@ -39,9 +29,10 @@ illegal under applicable law, and the grant of the foregoing license
39
29
  under the Apache 2.0 license is conditioned upon your compliance with
40
30
  such restriction.
41
31
  */
32
+
42
33
  var TextTooltipTemplate = function TextTooltipTemplate(_ref) {
43
34
  var text = _ref.text,
44
- warning = _ref.warning;
35
+ warning = _ref.warning;
45
36
  var textRef = (0, _react.useRef)();
46
37
  var tooltipClassNames = (0, _classnames.default)('tooltip-template', 'tooltip__text', warning && 'tooltip__warning');
47
38
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -52,7 +43,6 @@ var TextTooltipTemplate = function TextTooltipTemplate(_ref) {
52
43
  })
53
44
  });
54
45
  };
55
-
56
46
  TextTooltipTemplate.propTypes = {
57
47
  text: ''
58
48
  };