funda-ui 2.2.105 → 2.2.225
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/CascadingSelect/index.d.ts +1 -0
- package/CascadingSelect/index.js +5 -3
- package/CascadingSelectE2E/index.d.ts +1 -0
- package/CascadingSelectE2E/index.js +5 -3
- package/DropdownMenu/index.d.ts +1 -0
- package/DropdownMenu/index.js +9 -5
- package/EventCalendarTimeline/index.d.ts +1 -0
- package/EventCalendarTimeline/index.js +4 -2
- package/LiveSearch/index.d.ts +1 -0
- package/LiveSearch/index.js +5 -3
- package/MultiFuncSelect/index.d.ts +1 -0
- package/MultiFuncSelect/index.js +5 -3
- package/Tooltip/index.d.ts +2 -0
- package/Tooltip/index.js +5 -3
- package/lib/cjs/CascadingSelect/index.d.ts +1 -0
- package/lib/cjs/CascadingSelect/index.js +5 -3
- package/lib/cjs/CascadingSelectE2E/index.d.ts +1 -0
- package/lib/cjs/CascadingSelectE2E/index.js +5 -3
- package/lib/cjs/DropdownMenu/index.d.ts +1 -0
- package/lib/cjs/DropdownMenu/index.js +9 -5
- package/lib/cjs/EventCalendarTimeline/index.d.ts +1 -0
- package/lib/cjs/EventCalendarTimeline/index.js +4 -2
- package/lib/cjs/LiveSearch/index.d.ts +1 -0
- package/lib/cjs/LiveSearch/index.js +5 -3
- package/lib/cjs/MultiFuncSelect/index.d.ts +1 -0
- package/lib/cjs/MultiFuncSelect/index.js +5 -3
- package/lib/cjs/Tooltip/index.d.ts +2 -0
- package/lib/cjs/Tooltip/index.js +5 -3
- package/lib/esm/CascadingSelect/index.tsx +5 -2
- package/lib/esm/CascadingSelectE2E/index.tsx +5 -2
- package/lib/esm/DropdownMenu/index.tsx +13 -7
- package/lib/esm/EventCalendarTimeline/index.tsx +5 -2
- package/lib/esm/LiveSearch/index.tsx +5 -2
- package/lib/esm/MultiFuncSelect/index.tsx +5 -2
- package/lib/esm/Tooltip/index.tsx +7 -3
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ declare type CascadingSelectOptionChangeFnType = (input: any, currentData: any,
|
|
|
8
8
|
declare type CascadingSelectProps = {
|
|
9
9
|
wrapperClassName?: string;
|
|
10
10
|
controlClassName?: string;
|
|
11
|
+
exceededSidePosOffset?: number;
|
|
11
12
|
value?: string;
|
|
12
13
|
label?: React.ReactNode | string;
|
|
13
14
|
name?: string;
|
package/CascadingSelect/index.js
CHANGED
|
@@ -487,7 +487,7 @@ var convert = __webpack_require__(498);
|
|
|
487
487
|
// EXTERNAL MODULE: ./src/utils/get-element-property.js
|
|
488
488
|
var get_element_property = __webpack_require__(378);
|
|
489
489
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
490
|
-
var _excluded = ["wrapperClassName", "controlClassName", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
490
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
491
491
|
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; }
|
|
492
492
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
493
493
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -514,6 +514,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
514
514
|
var CascadingSelect = function CascadingSelect(props) {
|
|
515
515
|
var wrapperClassName = props.wrapperClassName,
|
|
516
516
|
controlClassName = props.controlClassName,
|
|
517
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
517
518
|
disabled = props.disabled,
|
|
518
519
|
required = props.required,
|
|
519
520
|
value = props.value,
|
|
@@ -546,6 +547,7 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
546
547
|
onFocus = props.onFocus,
|
|
547
548
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
548
549
|
var POS_OFFSET = 0;
|
|
550
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
549
551
|
var VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
550
552
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
551
553
|
var idRes = id || uniqueID;
|
|
@@ -659,14 +661,14 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
659
661
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
660
662
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
661
663
|
if (_modalBox.right > window.innerWidth) {
|
|
662
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
664
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
663
665
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
664
666
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
665
667
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
666
668
|
}
|
|
667
669
|
|
|
668
670
|
if (_modalBox.left < 0) {
|
|
669
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
671
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
670
672
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
671
673
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
672
674
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -640,7 +640,7 @@ var get_element_property = __webpack_require__(378);
|
|
|
640
640
|
// EXTERNAL MODULE: ./src/utils/tree.js
|
|
641
641
|
var tree = __webpack_require__(602);
|
|
642
642
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
643
|
-
var _excluded = ["wrapperClassName", "controlClassName", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
643
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
644
644
|
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; }
|
|
645
645
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
646
646
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -668,6 +668,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
668
668
|
var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
669
669
|
var wrapperClassName = props.wrapperClassName,
|
|
670
670
|
controlClassName = props.controlClassName,
|
|
671
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
671
672
|
disabled = props.disabled,
|
|
672
673
|
required = props.required,
|
|
673
674
|
value = props.value,
|
|
@@ -698,6 +699,7 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
698
699
|
onFocus = props.onFocus,
|
|
699
700
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
700
701
|
var POS_OFFSET = 0;
|
|
702
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
701
703
|
var VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
702
704
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
703
705
|
var idRes = id || uniqueID;
|
|
@@ -836,14 +838,14 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
836
838
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
837
839
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
838
840
|
if (_modalBox.right > window.innerWidth) {
|
|
839
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
841
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
840
842
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
841
843
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
842
844
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
843
845
|
}
|
|
844
846
|
|
|
845
847
|
if (_modalBox.left < 0) {
|
|
846
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
848
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
847
849
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
848
850
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
849
851
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
package/DropdownMenu/index.d.ts
CHANGED
package/DropdownMenu/index.js
CHANGED
|
@@ -282,6 +282,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
282
282
|
listClassName = props.listClassName,
|
|
283
283
|
hyperlinkClassName = props.hyperlinkClassName,
|
|
284
284
|
showClassName = props.showClassName,
|
|
285
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
285
286
|
hoverOn = props.hoverOn,
|
|
286
287
|
hoverOff = props.hoverOff,
|
|
287
288
|
hoverDelay = props.hoverDelay,
|
|
@@ -297,6 +298,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
297
298
|
id = props.id,
|
|
298
299
|
onChange = props.onChange;
|
|
299
300
|
var POS_OFFSET = 0;
|
|
301
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
300
302
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
301
303
|
var idRes = id || uniqueID;
|
|
302
304
|
var modalRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -418,18 +420,20 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
418
420
|
//-----------
|
|
419
421
|
// Determine whether it exceeds the far right or left side of the screen
|
|
420
422
|
var _modalContent = modalRef.current;
|
|
423
|
+
var _modalListContent = modalRef.current.querySelector('.dd-menu-list__inner');
|
|
421
424
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
425
|
+
var _modalListBox = _modalListContent.getBoundingClientRect();
|
|
422
426
|
var _iconRef = iconRef.current;
|
|
423
|
-
if (
|
|
424
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
427
|
+
if (_modalListBox.right > window.innerWidth) {
|
|
428
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
425
429
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
426
430
|
_iconRef.style.marginLeft = "".concat(_modalOffsetPosition, "px");
|
|
427
431
|
|
|
428
432
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
429
433
|
}
|
|
430
434
|
|
|
431
|
-
if (
|
|
432
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
435
|
+
if (_modalListBox.left < 0) {
|
|
436
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
433
437
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
434
438
|
_iconRef.style.marginLeft = "-".concat(_modalOffsetPosition2, "px");
|
|
435
439
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -527,7 +531,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
527
531
|
className: "dd-menu-list__icon ".concat(isOpen ? 'active' : '')
|
|
528
532
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
529
533
|
ref: listRef,
|
|
530
|
-
className: "".concat(listClassName ? listClassName : 'dd-menu-default__inner', " ").concat(isOpen ? showClassName ? showClassName : 'show' : '')
|
|
534
|
+
className: "dd-menu-list__inner ".concat(listClassName ? listClassName : 'dd-menu-default__inner', " ").concat(isOpen ? showClassName ? showClassName : 'show' : '')
|
|
531
535
|
}, selectOptionsListPresentation))));
|
|
532
536
|
};
|
|
533
537
|
/* harmony default export */ const src = (DropdownMenu);
|
|
@@ -52,6 +52,7 @@ declare type EventCalendarTimelineProps = {
|
|
|
52
52
|
tableCellMinWidth?: number;
|
|
53
53
|
tableTooltipDirection?: string;
|
|
54
54
|
tableTooltipOffset?: number;
|
|
55
|
+
tableTooltipExceededSidePosOffset?: number;
|
|
55
56
|
tableTooltipSize?: string;
|
|
56
57
|
tableTooltipDisabled?: boolean;
|
|
57
58
|
/** -- */
|
|
@@ -1157,6 +1157,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1157
1157
|
tableCellMinWidth = props.tableCellMinWidth,
|
|
1158
1158
|
tableTooltipDirection = props.tableTooltipDirection,
|
|
1159
1159
|
tableTooltipOffset = props.tableTooltipOffset,
|
|
1160
|
+
tableTooltipExceededSidePosOffset = props.tableTooltipExceededSidePosOffset,
|
|
1160
1161
|
tableTooltipSize = props.tableTooltipSize,
|
|
1161
1162
|
tableTooltipDisabled = props.tableTooltipDisabled,
|
|
1162
1163
|
id = props.id;
|
|
@@ -1247,6 +1248,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1247
1248
|
setTableRowNum = _useState28[1];
|
|
1248
1249
|
|
|
1249
1250
|
// table grid tooltip
|
|
1251
|
+
var CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET = Number(tableTooltipExceededSidePosOffset) || 15;
|
|
1250
1252
|
var CELL_TOOLTIP_POS_OFFSET = typeof tableTooltipOffset === 'undefined' ? 10 : tableTooltipOffset;
|
|
1251
1253
|
var tableTooltipModalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1252
1254
|
var _useState29 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
@@ -1408,14 +1410,14 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1408
1410
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1409
1411
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
1410
1412
|
if (_modalBox.right > window.innerWidth) {
|
|
1411
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
1413
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
1412
1414
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
1413
1415
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
1414
1416
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
1415
1417
|
}
|
|
1416
1418
|
|
|
1417
1419
|
if (_modalBox.left < 0) {
|
|
1418
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
1420
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
1419
1421
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
1420
1422
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
1421
1423
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
package/LiveSearch/index.d.ts
CHANGED
package/LiveSearch/index.js
CHANGED
|
@@ -743,7 +743,7 @@ var get_element_property = __webpack_require__(378);
|
|
|
743
743
|
var cjs = __webpack_require__(962);
|
|
744
744
|
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
|
|
745
745
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
746
|
-
var _excluded = ["wrapperClassName", "controlClassName", "appearance", "disabled", "required", "placeholder", "value", "label", "name", "id", "icon", "btnId", "fetchTrigger", "hideIcon", "depth", "maxLength", "style", "winWidth", "tabIndex", "data", "fetchAutoShow", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur"];
|
|
746
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "appearance", "disabled", "required", "placeholder", "value", "label", "name", "id", "icon", "btnId", "fetchTrigger", "hideIcon", "depth", "maxLength", "style", "winWidth", "tabIndex", "data", "fetchAutoShow", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur"];
|
|
747
747
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
748
748
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
749
749
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -769,6 +769,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
769
769
|
var LiveSearch = function LiveSearch(props) {
|
|
770
770
|
var wrapperClassName = props.wrapperClassName,
|
|
771
771
|
controlClassName = props.controlClassName,
|
|
772
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
772
773
|
appearance = props.appearance,
|
|
773
774
|
disabled = props.disabled,
|
|
774
775
|
required = props.required,
|
|
@@ -799,6 +800,7 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
799
800
|
onBlur = props.onBlur,
|
|
800
801
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
801
802
|
var POS_OFFSET = 0;
|
|
803
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
802
804
|
var INPUT_MATCH_ENABLED = typeof fetchAutoShow === 'undefined' || fetchAutoShow === false ? true : false;
|
|
803
805
|
var WIN_WIDTH = typeof winWidth === 'function' ? winWidth() : winWidth ? winWidth : 'auto';
|
|
804
806
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
@@ -948,14 +950,14 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
948
950
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
949
951
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
950
952
|
if (_modalBox.right > window.innerWidth) {
|
|
951
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
953
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
952
954
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
953
955
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
954
956
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
955
957
|
}
|
|
956
958
|
|
|
957
959
|
if (_modalBox.left < 0) {
|
|
958
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
960
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
959
961
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
960
962
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
961
963
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -35,6 +35,7 @@ interface CleanTriggerConfig {
|
|
|
35
35
|
declare type MultiFuncSelectProps = {
|
|
36
36
|
wrapperClassName?: string;
|
|
37
37
|
controlClassName?: string;
|
|
38
|
+
exceededSidePosOffset?: number;
|
|
38
39
|
multiSelect?: MultiSelectConfig;
|
|
39
40
|
multiSelectSelectedItemOnlyStatus?: multiSelectSelectedItemOnlyStatusConfig;
|
|
40
41
|
cleanTrigger?: CleanTriggerConfig;
|
package/MultiFuncSelect/index.js
CHANGED
|
@@ -876,7 +876,7 @@ var enableBodyScroll = function enableBodyScroll(targetElement) {
|
|
|
876
876
|
// EXTERNAL MODULE: ./src/utils/tree.js
|
|
877
877
|
var tree = __webpack_require__(602);
|
|
878
878
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
879
|
-
var _excluded = ["wrapperClassName", "controlClassName", "multiSelect", "multiSelectSelectedItemOnlyStatus", "disabled", "required", "value", "label", "name", "readOnly", "placeholder", "id", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus"];
|
|
879
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "multiSelect", "multiSelectSelectedItemOnlyStatus", "disabled", "required", "value", "label", "name", "readOnly", "placeholder", "id", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus"];
|
|
880
880
|
function src_toConsumableArray(arr) { return src_arrayWithoutHoles(arr) || src_iterableToArray(arr) || src_unsupportedIterableToArray(arr) || src_nonIterableSpread(); }
|
|
881
881
|
function src_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
882
882
|
function src_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -912,6 +912,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
912
912
|
var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, _ref2) {
|
|
913
913
|
var wrapperClassName = props.wrapperClassName,
|
|
914
914
|
controlClassName = props.controlClassName,
|
|
915
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
915
916
|
multiSelect = props.multiSelect,
|
|
916
917
|
multiSelectSelectedItemOnlyStatus = props.multiSelectSelectedItemOnlyStatus,
|
|
917
918
|
disabled = props.disabled,
|
|
@@ -960,6 +961,7 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
960
961
|
var INDENT_PLACEHOLDER = doubleIndent ? " " : " ";
|
|
961
962
|
var INDENT_LAST_PLACEHOLDER = "".concat(typeof indentation !== 'undefined' && indentation !== '' ? "".concat(indentation, " ") : '');
|
|
962
963
|
var POS_OFFSET = 0;
|
|
964
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
963
965
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
964
966
|
var idRes = id || uniqueID;
|
|
965
967
|
var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -1589,14 +1591,14 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
1589
1591
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1590
1592
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
1591
1593
|
if (_modalBox.right > window.innerWidth) {
|
|
1592
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
1594
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
1593
1595
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
1594
1596
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
1595
1597
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
1596
1598
|
}
|
|
1597
1599
|
|
|
1598
1600
|
if (_modalBox.left < 0) {
|
|
1599
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
1601
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
1600
1602
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
1601
1603
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
1602
1604
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
package/Tooltip/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare type TooltipProps = {
|
|
|
5
5
|
direction?: string;
|
|
6
6
|
/** Position offset */
|
|
7
7
|
offset?: number;
|
|
8
|
+
/** Offset px that exceeds the far right or left side of the screen */
|
|
9
|
+
exceededSidePosOffset?: number;
|
|
8
10
|
/** The size of the content area. Defaults to `auto`. Possible values are: `auto`, `large`, `medium`, `small` */
|
|
9
11
|
size?: string;
|
|
10
12
|
/** The number of milliseconds to determine hover intent, defaults to 200 */
|
package/Tooltip/index.js
CHANGED
|
@@ -253,13 +253,15 @@ var Tooltip = function Tooltip(props) {
|
|
|
253
253
|
var wrapperClassName = props.wrapperClassName,
|
|
254
254
|
direction = props.direction,
|
|
255
255
|
offset = props.offset,
|
|
256
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
256
257
|
size = props.size,
|
|
257
258
|
hoverDelay = props.hoverDelay,
|
|
258
259
|
mouseOutDelay = props.mouseOutDelay,
|
|
259
260
|
content = props.content,
|
|
260
261
|
id = props.id,
|
|
261
262
|
children = props.children;
|
|
262
|
-
var POS_OFFSET =
|
|
263
|
+
var POS_OFFSET = Number(offset) || 10;
|
|
264
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
263
265
|
var uniqueID = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-");
|
|
264
266
|
var idRes = id || uniqueID;
|
|
265
267
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -341,14 +343,14 @@ var Tooltip = function Tooltip(props) {
|
|
|
341
343
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
342
344
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
343
345
|
if (_modalBox.right > window.innerWidth) {
|
|
344
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
346
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
345
347
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
346
348
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
347
349
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
348
350
|
}
|
|
349
351
|
|
|
350
352
|
if (_modalBox.left < 0) {
|
|
351
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
353
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
352
354
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
353
355
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
354
356
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -8,6 +8,7 @@ declare type CascadingSelectOptionChangeFnType = (input: any, currentData: any,
|
|
|
8
8
|
declare type CascadingSelectProps = {
|
|
9
9
|
wrapperClassName?: string;
|
|
10
10
|
controlClassName?: string;
|
|
11
|
+
exceededSidePosOffset?: number;
|
|
11
12
|
value?: string;
|
|
12
13
|
label?: React.ReactNode | string;
|
|
13
14
|
name?: string;
|
|
@@ -487,7 +487,7 @@ var convert = __webpack_require__(498);
|
|
|
487
487
|
// EXTERNAL MODULE: ./src/utils/get-element-property.js
|
|
488
488
|
var get_element_property = __webpack_require__(378);
|
|
489
489
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
490
|
-
var _excluded = ["wrapperClassName", "controlClassName", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
490
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
491
491
|
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; }
|
|
492
492
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
493
493
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -514,6 +514,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
514
514
|
var CascadingSelect = function CascadingSelect(props) {
|
|
515
515
|
var wrapperClassName = props.wrapperClassName,
|
|
516
516
|
controlClassName = props.controlClassName,
|
|
517
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
517
518
|
disabled = props.disabled,
|
|
518
519
|
required = props.required,
|
|
519
520
|
value = props.value,
|
|
@@ -546,6 +547,7 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
546
547
|
onFocus = props.onFocus,
|
|
547
548
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
548
549
|
var POS_OFFSET = 0;
|
|
550
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
549
551
|
var VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
550
552
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
551
553
|
var idRes = id || uniqueID;
|
|
@@ -659,14 +661,14 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
659
661
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
660
662
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
661
663
|
if (_modalBox.right > window.innerWidth) {
|
|
662
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
664
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
663
665
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
664
666
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
665
667
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
666
668
|
}
|
|
667
669
|
|
|
668
670
|
if (_modalBox.left < 0) {
|
|
669
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
671
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
670
672
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
671
673
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
672
674
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -640,7 +640,7 @@ var get_element_property = __webpack_require__(378);
|
|
|
640
640
|
// EXTERNAL MODULE: ./src/utils/tree.js
|
|
641
641
|
var tree = __webpack_require__(602);
|
|
642
642
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
643
|
-
var _excluded = ["wrapperClassName", "controlClassName", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
643
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
644
644
|
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; }
|
|
645
645
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
646
646
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -668,6 +668,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
668
668
|
var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
669
669
|
var wrapperClassName = props.wrapperClassName,
|
|
670
670
|
controlClassName = props.controlClassName,
|
|
671
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
671
672
|
disabled = props.disabled,
|
|
672
673
|
required = props.required,
|
|
673
674
|
value = props.value,
|
|
@@ -698,6 +699,7 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
698
699
|
onFocus = props.onFocus,
|
|
699
700
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
700
701
|
var POS_OFFSET = 0;
|
|
702
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
701
703
|
var VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
702
704
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
703
705
|
var idRes = id || uniqueID;
|
|
@@ -836,14 +838,14 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
836
838
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
837
839
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
838
840
|
if (_modalBox.right > window.innerWidth) {
|
|
839
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
841
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
840
842
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
841
843
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
842
844
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
843
845
|
}
|
|
844
846
|
|
|
845
847
|
if (_modalBox.left < 0) {
|
|
846
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
848
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
847
849
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
848
850
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
849
851
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -282,6 +282,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
282
282
|
listClassName = props.listClassName,
|
|
283
283
|
hyperlinkClassName = props.hyperlinkClassName,
|
|
284
284
|
showClassName = props.showClassName,
|
|
285
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
285
286
|
hoverOn = props.hoverOn,
|
|
286
287
|
hoverOff = props.hoverOff,
|
|
287
288
|
hoverDelay = props.hoverDelay,
|
|
@@ -297,6 +298,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
297
298
|
id = props.id,
|
|
298
299
|
onChange = props.onChange;
|
|
299
300
|
var POS_OFFSET = 0;
|
|
301
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
300
302
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
301
303
|
var idRes = id || uniqueID;
|
|
302
304
|
var modalRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -418,18 +420,20 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
418
420
|
//-----------
|
|
419
421
|
// Determine whether it exceeds the far right or left side of the screen
|
|
420
422
|
var _modalContent = modalRef.current;
|
|
423
|
+
var _modalListContent = modalRef.current.querySelector('.dd-menu-list__inner');
|
|
421
424
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
425
|
+
var _modalListBox = _modalListContent.getBoundingClientRect();
|
|
422
426
|
var _iconRef = iconRef.current;
|
|
423
|
-
if (
|
|
424
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
427
|
+
if (_modalListBox.right > window.innerWidth) {
|
|
428
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
425
429
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
426
430
|
_iconRef.style.marginLeft = "".concat(_modalOffsetPosition, "px");
|
|
427
431
|
|
|
428
432
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
429
433
|
}
|
|
430
434
|
|
|
431
|
-
if (
|
|
432
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
435
|
+
if (_modalListBox.left < 0) {
|
|
436
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
433
437
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
434
438
|
_iconRef.style.marginLeft = "-".concat(_modalOffsetPosition2, "px");
|
|
435
439
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -527,7 +531,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
527
531
|
className: "dd-menu-list__icon ".concat(isOpen ? 'active' : '')
|
|
528
532
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
529
533
|
ref: listRef,
|
|
530
|
-
className: "".concat(listClassName ? listClassName : 'dd-menu-default__inner', " ").concat(isOpen ? showClassName ? showClassName : 'show' : '')
|
|
534
|
+
className: "dd-menu-list__inner ".concat(listClassName ? listClassName : 'dd-menu-default__inner', " ").concat(isOpen ? showClassName ? showClassName : 'show' : '')
|
|
531
535
|
}, selectOptionsListPresentation))));
|
|
532
536
|
};
|
|
533
537
|
/* harmony default export */ const src = (DropdownMenu);
|
|
@@ -52,6 +52,7 @@ declare type EventCalendarTimelineProps = {
|
|
|
52
52
|
tableCellMinWidth?: number;
|
|
53
53
|
tableTooltipDirection?: string;
|
|
54
54
|
tableTooltipOffset?: number;
|
|
55
|
+
tableTooltipExceededSidePosOffset?: number;
|
|
55
56
|
tableTooltipSize?: string;
|
|
56
57
|
tableTooltipDisabled?: boolean;
|
|
57
58
|
/** -- */
|
|
@@ -1157,6 +1157,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1157
1157
|
tableCellMinWidth = props.tableCellMinWidth,
|
|
1158
1158
|
tableTooltipDirection = props.tableTooltipDirection,
|
|
1159
1159
|
tableTooltipOffset = props.tableTooltipOffset,
|
|
1160
|
+
tableTooltipExceededSidePosOffset = props.tableTooltipExceededSidePosOffset,
|
|
1160
1161
|
tableTooltipSize = props.tableTooltipSize,
|
|
1161
1162
|
tableTooltipDisabled = props.tableTooltipDisabled,
|
|
1162
1163
|
id = props.id;
|
|
@@ -1247,6 +1248,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1247
1248
|
setTableRowNum = _useState28[1];
|
|
1248
1249
|
|
|
1249
1250
|
// table grid tooltip
|
|
1251
|
+
var CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET = Number(tableTooltipExceededSidePosOffset) || 15;
|
|
1250
1252
|
var CELL_TOOLTIP_POS_OFFSET = typeof tableTooltipOffset === 'undefined' ? 10 : tableTooltipOffset;
|
|
1251
1253
|
var tableTooltipModalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1252
1254
|
var _useState29 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
@@ -1408,14 +1410,14 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
1408
1410
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1409
1411
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
1410
1412
|
if (_modalBox.right > window.innerWidth) {
|
|
1411
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
1413
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
1412
1414
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
1413
1415
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
1414
1416
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
1415
1417
|
}
|
|
1416
1418
|
|
|
1417
1419
|
if (_modalBox.left < 0) {
|
|
1418
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
1420
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
1419
1421
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
1420
1422
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
1421
1423
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -743,7 +743,7 @@ var get_element_property = __webpack_require__(378);
|
|
|
743
743
|
var cjs = __webpack_require__(962);
|
|
744
744
|
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
|
|
745
745
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
746
|
-
var _excluded = ["wrapperClassName", "controlClassName", "appearance", "disabled", "required", "placeholder", "value", "label", "name", "id", "icon", "btnId", "fetchTrigger", "hideIcon", "depth", "maxLength", "style", "winWidth", "tabIndex", "data", "fetchAutoShow", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur"];
|
|
746
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "appearance", "disabled", "required", "placeholder", "value", "label", "name", "id", "icon", "btnId", "fetchTrigger", "hideIcon", "depth", "maxLength", "style", "winWidth", "tabIndex", "data", "fetchAutoShow", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur"];
|
|
747
747
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
748
748
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
749
749
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -769,6 +769,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
769
769
|
var LiveSearch = function LiveSearch(props) {
|
|
770
770
|
var wrapperClassName = props.wrapperClassName,
|
|
771
771
|
controlClassName = props.controlClassName,
|
|
772
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
772
773
|
appearance = props.appearance,
|
|
773
774
|
disabled = props.disabled,
|
|
774
775
|
required = props.required,
|
|
@@ -799,6 +800,7 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
799
800
|
onBlur = props.onBlur,
|
|
800
801
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
801
802
|
var POS_OFFSET = 0;
|
|
803
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
802
804
|
var INPUT_MATCH_ENABLED = typeof fetchAutoShow === 'undefined' || fetchAutoShow === false ? true : false;
|
|
803
805
|
var WIN_WIDTH = typeof winWidth === 'function' ? winWidth() : winWidth ? winWidth : 'auto';
|
|
804
806
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
@@ -948,14 +950,14 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
948
950
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
949
951
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
950
952
|
if (_modalBox.right > window.innerWidth) {
|
|
951
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
953
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
952
954
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
953
955
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
954
956
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
955
957
|
}
|
|
956
958
|
|
|
957
959
|
if (_modalBox.left < 0) {
|
|
958
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
960
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
959
961
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
960
962
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
961
963
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -35,6 +35,7 @@ interface CleanTriggerConfig {
|
|
|
35
35
|
declare type MultiFuncSelectProps = {
|
|
36
36
|
wrapperClassName?: string;
|
|
37
37
|
controlClassName?: string;
|
|
38
|
+
exceededSidePosOffset?: number;
|
|
38
39
|
multiSelect?: MultiSelectConfig;
|
|
39
40
|
multiSelectSelectedItemOnlyStatus?: multiSelectSelectedItemOnlyStatusConfig;
|
|
40
41
|
cleanTrigger?: CleanTriggerConfig;
|
|
@@ -876,7 +876,7 @@ var enableBodyScroll = function enableBodyScroll(targetElement) {
|
|
|
876
876
|
// EXTERNAL MODULE: ./src/utils/tree.js
|
|
877
877
|
var tree = __webpack_require__(602);
|
|
878
878
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
879
|
-
var _excluded = ["wrapperClassName", "controlClassName", "multiSelect", "multiSelectSelectedItemOnlyStatus", "disabled", "required", "value", "label", "name", "readOnly", "placeholder", "id", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus"];
|
|
879
|
+
var _excluded = ["wrapperClassName", "controlClassName", "exceededSidePosOffset", "multiSelect", "multiSelectSelectedItemOnlyStatus", "disabled", "required", "value", "label", "name", "readOnly", "placeholder", "id", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus"];
|
|
880
880
|
function src_toConsumableArray(arr) { return src_arrayWithoutHoles(arr) || src_iterableToArray(arr) || src_unsupportedIterableToArray(arr) || src_nonIterableSpread(); }
|
|
881
881
|
function src_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
882
882
|
function src_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -912,6 +912,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
912
912
|
var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, _ref2) {
|
|
913
913
|
var wrapperClassName = props.wrapperClassName,
|
|
914
914
|
controlClassName = props.controlClassName,
|
|
915
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
915
916
|
multiSelect = props.multiSelect,
|
|
916
917
|
multiSelectSelectedItemOnlyStatus = props.multiSelectSelectedItemOnlyStatus,
|
|
917
918
|
disabled = props.disabled,
|
|
@@ -960,6 +961,7 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
960
961
|
var INDENT_PLACEHOLDER = doubleIndent ? " " : " ";
|
|
961
962
|
var INDENT_LAST_PLACEHOLDER = "".concat(typeof indentation !== 'undefined' && indentation !== '' ? "".concat(indentation, " ") : '');
|
|
962
963
|
var POS_OFFSET = 0;
|
|
964
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
963
965
|
var uniqueID = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useId)().replace(/\:/g, "-");
|
|
964
966
|
var idRes = id || uniqueID;
|
|
965
967
|
var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -1589,14 +1591,14 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
1589
1591
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1590
1592
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
1591
1593
|
if (_modalBox.right > window.innerWidth) {
|
|
1592
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
1594
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
1593
1595
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
1594
1596
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
1595
1597
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
1596
1598
|
}
|
|
1597
1599
|
|
|
1598
1600
|
if (_modalBox.left < 0) {
|
|
1599
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
1601
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
1600
1602
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
1601
1603
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
1602
1604
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -5,6 +5,8 @@ declare type TooltipProps = {
|
|
|
5
5
|
direction?: string;
|
|
6
6
|
/** Position offset */
|
|
7
7
|
offset?: number;
|
|
8
|
+
/** Offset px that exceeds the far right or left side of the screen */
|
|
9
|
+
exceededSidePosOffset?: number;
|
|
8
10
|
/** The size of the content area. Defaults to `auto`. Possible values are: `auto`, `large`, `medium`, `small` */
|
|
9
11
|
size?: string;
|
|
10
12
|
/** The number of milliseconds to determine hover intent, defaults to 200 */
|
package/lib/cjs/Tooltip/index.js
CHANGED
|
@@ -253,13 +253,15 @@ var Tooltip = function Tooltip(props) {
|
|
|
253
253
|
var wrapperClassName = props.wrapperClassName,
|
|
254
254
|
direction = props.direction,
|
|
255
255
|
offset = props.offset,
|
|
256
|
+
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
256
257
|
size = props.size,
|
|
257
258
|
hoverDelay = props.hoverDelay,
|
|
258
259
|
mouseOutDelay = props.mouseOutDelay,
|
|
259
260
|
content = props.content,
|
|
260
261
|
id = props.id,
|
|
261
262
|
children = props.children;
|
|
262
|
-
var POS_OFFSET =
|
|
263
|
+
var POS_OFFSET = Number(offset) || 10;
|
|
264
|
+
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
263
265
|
var uniqueID = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-");
|
|
264
266
|
var idRes = id || uniqueID;
|
|
265
267
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -341,14 +343,14 @@ var Tooltip = function Tooltip(props) {
|
|
|
341
343
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
342
344
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
343
345
|
if (_modalBox.right > window.innerWidth) {
|
|
344
|
-
var _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
346
|
+
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
345
347
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
346
348
|
_modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
|
|
347
349
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
348
350
|
}
|
|
349
351
|
|
|
350
352
|
if (_modalBox.left < 0) {
|
|
351
|
-
var _modalOffsetPosition2 = Math.abs(_modalBox.left) +
|
|
353
|
+
var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
352
354
|
_modalContent.dataset.offset = _modalOffsetPosition2;
|
|
353
355
|
_modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
|
|
354
356
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -23,6 +23,7 @@ type CascadingSelectOptionChangeFnType = (input: any, currentData: any, index: a
|
|
|
23
23
|
type CascadingSelectProps = {
|
|
24
24
|
wrapperClassName?: string;
|
|
25
25
|
controlClassName?: string;
|
|
26
|
+
exceededSidePosOffset?: number;
|
|
26
27
|
value?: string;
|
|
27
28
|
label?: React.ReactNode | string;
|
|
28
29
|
name?: string;
|
|
@@ -79,6 +80,7 @@ const CascadingSelect = (props: CascadingSelectProps) => {
|
|
|
79
80
|
const {
|
|
80
81
|
wrapperClassName,
|
|
81
82
|
controlClassName,
|
|
83
|
+
exceededSidePosOffset,
|
|
82
84
|
disabled,
|
|
83
85
|
required,
|
|
84
86
|
value,
|
|
@@ -114,6 +116,7 @@ const CascadingSelect = (props: CascadingSelectProps) => {
|
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
const POS_OFFSET = 0;
|
|
119
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
117
120
|
const VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
118
121
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
119
122
|
const idRes = id || uniqueID;
|
|
@@ -233,7 +236,7 @@ const CascadingSelect = (props: CascadingSelectProps) => {
|
|
|
233
236
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
234
237
|
|
|
235
238
|
if (_modalBox.right > window.innerWidth) {
|
|
236
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
239
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
237
240
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
238
241
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
239
242
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -241,7 +244,7 @@ const CascadingSelect = (props: CascadingSelectProps) => {
|
|
|
241
244
|
|
|
242
245
|
|
|
243
246
|
if (_modalBox.left < 0) {
|
|
244
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
247
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
245
248
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
246
249
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
247
250
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -40,6 +40,7 @@ interface fetchArrayConfig {
|
|
|
40
40
|
type CascadingSelectE2EProps = {
|
|
41
41
|
wrapperClassName?: string;
|
|
42
42
|
controlClassName?: string;
|
|
43
|
+
exceededSidePosOffset?: number;
|
|
43
44
|
value?: string;
|
|
44
45
|
label?: React.ReactNode | string;
|
|
45
46
|
name?: string;
|
|
@@ -98,6 +99,7 @@ const CascadingSelectE2E = (props: CascadingSelectE2EProps) => {
|
|
|
98
99
|
const {
|
|
99
100
|
wrapperClassName,
|
|
100
101
|
controlClassName,
|
|
102
|
+
exceededSidePosOffset,
|
|
101
103
|
disabled,
|
|
102
104
|
required,
|
|
103
105
|
value,
|
|
@@ -131,6 +133,7 @@ const CascadingSelectE2E = (props: CascadingSelectE2EProps) => {
|
|
|
131
133
|
|
|
132
134
|
|
|
133
135
|
const POS_OFFSET = 0;
|
|
136
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
134
137
|
const VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
|
|
135
138
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
136
139
|
const idRes = id || uniqueID;
|
|
@@ -269,7 +272,7 @@ const CascadingSelectE2E = (props: CascadingSelectE2EProps) => {
|
|
|
269
272
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
270
273
|
|
|
271
274
|
if (_modalBox.right > window.innerWidth) {
|
|
272
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
275
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
273
276
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
274
277
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
275
278
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -277,7 +280,7 @@ const CascadingSelectE2E = (props: CascadingSelectE2EProps) => {
|
|
|
277
280
|
|
|
278
281
|
|
|
279
282
|
if (_modalBox.left < 0) {
|
|
280
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
283
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
281
284
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
282
285
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
283
286
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -16,6 +16,7 @@ type DropdownMenuProps = {
|
|
|
16
16
|
listClassName?: string;
|
|
17
17
|
hyperlinkClassName?: string;
|
|
18
18
|
showClassName?: string;
|
|
19
|
+
exceededSidePosOffset?: number;
|
|
19
20
|
hoverOn?: boolean;
|
|
20
21
|
hoverOff?: boolean;
|
|
21
22
|
hoverDelay?: number;
|
|
@@ -49,6 +50,7 @@ const DropdownMenu = (props: DropdownMenuProps) => {
|
|
|
49
50
|
listClassName,
|
|
50
51
|
hyperlinkClassName,
|
|
51
52
|
showClassName,
|
|
53
|
+
exceededSidePosOffset,
|
|
52
54
|
hoverOn,
|
|
53
55
|
hoverOff,
|
|
54
56
|
hoverDelay,
|
|
@@ -66,6 +68,7 @@ const DropdownMenu = (props: DropdownMenuProps) => {
|
|
|
66
68
|
} = props;
|
|
67
69
|
|
|
68
70
|
const POS_OFFSET = 0;
|
|
71
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
69
72
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
70
73
|
const idRes = id || uniqueID;
|
|
71
74
|
const modalRef = useRef<any>(null);
|
|
@@ -207,16 +210,19 @@ const DropdownMenu = (props: DropdownMenuProps) => {
|
|
|
207
210
|
_modalRef.classList.remove('pos-top');
|
|
208
211
|
}
|
|
209
212
|
|
|
210
|
-
|
|
213
|
+
|
|
211
214
|
// STEP 4:
|
|
212
215
|
//-----------
|
|
213
216
|
// Determine whether it exceeds the far right or left side of the screen
|
|
214
217
|
const _modalContent = modalRef.current;
|
|
218
|
+
const _modalListContent = modalRef.current.querySelector('.dd-menu-list__inner');
|
|
215
219
|
const _modalBox = _modalContent.getBoundingClientRect();
|
|
220
|
+
const _modalListBox = _modalListContent.getBoundingClientRect();
|
|
216
221
|
const _iconRef: any = iconRef.current;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
if (_modalListBox.right > window.innerWidth) {
|
|
225
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
220
226
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
221
227
|
_iconRef.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
222
228
|
|
|
@@ -224,8 +230,8 @@ const DropdownMenu = (props: DropdownMenuProps) => {
|
|
|
224
230
|
}
|
|
225
231
|
|
|
226
232
|
|
|
227
|
-
if (
|
|
228
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
233
|
+
if (_modalListBox.left < 0) {
|
|
234
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
229
235
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
230
236
|
_iconRef.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
231
237
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -356,7 +362,7 @@ const DropdownMenu = (props: DropdownMenuProps) => {
|
|
|
356
362
|
|
|
357
363
|
<ul
|
|
358
364
|
ref={listRef}
|
|
359
|
-
className={
|
|
365
|
+
className={`dd-menu-list__inner ${listClassName ? listClassName : 'dd-menu-default__inner'} ${isOpen ? (showClassName ? showClassName : 'show') : ''}`}
|
|
360
366
|
>
|
|
361
367
|
{selectOptionsListPresentation}
|
|
362
368
|
</ul>
|
|
@@ -71,6 +71,7 @@ type EventCalendarTimelineProps = {
|
|
|
71
71
|
// tooltip
|
|
72
72
|
tableTooltipDirection?: string;
|
|
73
73
|
tableTooltipOffset?: number;
|
|
74
|
+
tableTooltipExceededSidePosOffset?: number;
|
|
74
75
|
tableTooltipSize?: string;
|
|
75
76
|
tableTooltipDisabled?: boolean;
|
|
76
77
|
|
|
@@ -127,6 +128,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
127
128
|
//
|
|
128
129
|
tableTooltipDirection,
|
|
129
130
|
tableTooltipOffset,
|
|
131
|
+
tableTooltipExceededSidePosOffset,
|
|
130
132
|
tableTooltipSize,
|
|
131
133
|
tableTooltipDisabled,
|
|
132
134
|
|
|
@@ -182,6 +184,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
182
184
|
const [tableRowNum, setTableRowNum] = useState<number>(-1);
|
|
183
185
|
|
|
184
186
|
// table grid tooltip
|
|
187
|
+
const CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET = Number(tableTooltipExceededSidePosOffset) || 15;
|
|
185
188
|
const CELL_TOOLTIP_POS_OFFSET = typeof tableTooltipOffset === 'undefined' ? 10 : tableTooltipOffset;
|
|
186
189
|
const tableTooltipModalRef = useRef<any>(null);
|
|
187
190
|
const [isShowTableTooltip, setIsShowTableTooltip] = useState<boolean>(false);
|
|
@@ -350,7 +353,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
350
353
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
351
354
|
|
|
352
355
|
if (_modalBox.right > window.innerWidth) {
|
|
353
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
356
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
354
357
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
355
358
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
356
359
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -358,7 +361,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
358
361
|
|
|
359
362
|
|
|
360
363
|
if (_modalBox.left < 0) {
|
|
361
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
364
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET;
|
|
362
365
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
363
366
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
364
367
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -12,6 +12,7 @@ import SearchBar from 'funda-searchbar';
|
|
|
12
12
|
type LiveSearchProps = {
|
|
13
13
|
wrapperClassName?: string;
|
|
14
14
|
controlClassName?: string;
|
|
15
|
+
exceededSidePosOffset?: number;
|
|
15
16
|
appearance?: string;
|
|
16
17
|
value?: string;
|
|
17
18
|
label?: React.ReactNode | string;
|
|
@@ -52,6 +53,7 @@ const LiveSearch = (props: LiveSearchProps) => {
|
|
|
52
53
|
const {
|
|
53
54
|
wrapperClassName,
|
|
54
55
|
controlClassName,
|
|
56
|
+
exceededSidePosOffset,
|
|
55
57
|
appearance,
|
|
56
58
|
disabled,
|
|
57
59
|
required,
|
|
@@ -85,6 +87,7 @@ const LiveSearch = (props: LiveSearchProps) => {
|
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
const POS_OFFSET = 0;
|
|
90
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
88
91
|
const INPUT_MATCH_ENABLED = typeof fetchAutoShow === 'undefined' || fetchAutoShow === false ? true : false;
|
|
89
92
|
const WIN_WIDTH = typeof winWidth === 'function' ? winWidth() : winWidth ? winWidth : 'auto';
|
|
90
93
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
@@ -245,7 +248,7 @@ const LiveSearch = (props: LiveSearchProps) => {
|
|
|
245
248
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
246
249
|
|
|
247
250
|
if (_modalBox.right > window.innerWidth) {
|
|
248
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
251
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
249
252
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
250
253
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
251
254
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -253,7 +256,7 @@ const LiveSearch = (props: LiveSearchProps) => {
|
|
|
253
256
|
|
|
254
257
|
|
|
255
258
|
if (_modalBox.left < 0) {
|
|
256
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
259
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
257
260
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
258
261
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
259
262
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -68,6 +68,7 @@ interface CleanTriggerConfig {
|
|
|
68
68
|
type MultiFuncSelectProps = {
|
|
69
69
|
wrapperClassName?: string;
|
|
70
70
|
controlClassName?: string;
|
|
71
|
+
exceededSidePosOffset?: number;
|
|
71
72
|
multiSelect?: MultiSelectConfig;
|
|
72
73
|
multiSelectSelectedItemOnlyStatus?: multiSelectSelectedItemOnlyStatusConfig;
|
|
73
74
|
cleanTrigger?: CleanTriggerConfig;
|
|
@@ -118,6 +119,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
118
119
|
const {
|
|
119
120
|
wrapperClassName,
|
|
120
121
|
controlClassName,
|
|
122
|
+
exceededSidePosOffset,
|
|
121
123
|
multiSelect,
|
|
122
124
|
multiSelectSelectedItemOnlyStatus,
|
|
123
125
|
disabled,
|
|
@@ -169,6 +171,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
169
171
|
const INDENT_PLACEHOLDER = doubleIndent ? ` ` : ` `;
|
|
170
172
|
const INDENT_LAST_PLACEHOLDER = `${typeof indentation !== 'undefined' && indentation !== '' ? `${indentation} ` : ''}`;
|
|
171
173
|
const POS_OFFSET = 0;
|
|
174
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
172
175
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
173
176
|
const idRes = id || uniqueID;
|
|
174
177
|
const rootRef = useRef<any>(null);
|
|
@@ -863,7 +866,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
863
866
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
864
867
|
|
|
865
868
|
if (_modalBox.right > window.innerWidth) {
|
|
866
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
869
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
867
870
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
868
871
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
869
872
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -871,7 +874,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
871
874
|
|
|
872
875
|
|
|
873
876
|
if (_modalBox.left < 0) {
|
|
874
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
877
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
875
878
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
876
879
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
877
880
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -9,6 +9,8 @@ type TooltipProps = {
|
|
|
9
9
|
direction?: string;
|
|
10
10
|
/** Position offset */
|
|
11
11
|
offset?: number;
|
|
12
|
+
/** Offset px that exceeds the far right or left side of the screen */
|
|
13
|
+
exceededSidePosOffset?: number;
|
|
12
14
|
/** The size of the content area. Defaults to `auto`. Possible values are: `auto`, `large`, `medium`, `small` */
|
|
13
15
|
size?: string;
|
|
14
16
|
/** The number of milliseconds to determine hover intent, defaults to 200 */
|
|
@@ -28,6 +30,7 @@ const Tooltip = (props: TooltipProps) => {
|
|
|
28
30
|
wrapperClassName,
|
|
29
31
|
direction,
|
|
30
32
|
offset,
|
|
33
|
+
exceededSidePosOffset,
|
|
31
34
|
size,
|
|
32
35
|
hoverDelay,
|
|
33
36
|
mouseOutDelay,
|
|
@@ -37,7 +40,8 @@ const Tooltip = (props: TooltipProps) => {
|
|
|
37
40
|
} = props;
|
|
38
41
|
|
|
39
42
|
|
|
40
|
-
const POS_OFFSET =
|
|
43
|
+
const POS_OFFSET = Number(offset) || 10;
|
|
44
|
+
const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
41
45
|
const uniqueID = useId().replace(/\:/g, "-");
|
|
42
46
|
const idRes = id || uniqueID;
|
|
43
47
|
const rootRef = useRef<any>(null);
|
|
@@ -127,7 +131,7 @@ const Tooltip = (props: TooltipProps) => {
|
|
|
127
131
|
if (typeof _modalContent.dataset.offset === 'undefined') {
|
|
128
132
|
|
|
129
133
|
if (_modalBox.right > window.innerWidth) {
|
|
130
|
-
const _modalOffsetPosition = _modalBox.right - window.innerWidth +
|
|
134
|
+
const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
131
135
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
132
136
|
_modalContent.style.marginLeft = `-${_modalOffsetPosition}px`;
|
|
133
137
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
|
@@ -135,7 +139,7 @@ const Tooltip = (props: TooltipProps) => {
|
|
|
135
139
|
|
|
136
140
|
|
|
137
141
|
if (_modalBox.left < 0) {
|
|
138
|
-
const _modalOffsetPosition = Math.abs(_modalBox.left) +
|
|
142
|
+
const _modalOffsetPosition = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
|
|
139
143
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
140
144
|
_modalContent.style.marginLeft = `${_modalOffsetPosition}px`;
|
|
141
145
|
// console.log('_modalPosition: ', _modalOffsetPosition)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "2.2.
|
|
5
|
+
"version": "2.2.225",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|