__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import getVariation from "./getVariation.js";
import { variationPlacements, basePlacements, placements as allPlacements } from "../enums.js";
import detectOverflow from "./detectOverflow.js";
import getBasePlacement from "./getBasePlacement.js";
export default function computeAutoPlacement(state, options) {
if (options === void 0) {
options = {};
}
var _options = options,
placement = _options.placement,
boundary = _options.boundary,
rootBoundary = _options.rootBoundary,
padding = _options.padding,
flipVariations = _options.flipVariations,
_options$allowedAutoP = _options.allowedAutoPlacements,
allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;
var variation = getVariation(placement);
var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
return getVariation(placement) === variation;
}) : basePlacements;
var allowedPlacements = placements.filter(function (placement) {
return allowedAutoPlacements.indexOf(placement) >= 0;
});
if (allowedPlacements.length === 0) {
allowedPlacements = placements;
if (false) {
console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
}
}
// $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
var overflows = allowedPlacements.reduce(function (acc, placement) {
acc[placement] = detectOverflow(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding
})[getBasePlacement(placement)];
return acc;
}, {});
return Object.keys(overflows).sort(function (a, b) {
return overflows[a] - overflows[b];
});
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| computeAutoPlacement.js | File | 1.93 KB | 0644 |
|
| computeOffsets.js | File | 1.68 KB | 0644 |
|
| debounce.js | File | 301 B | 0644 |
|
| detectOverflow.js | File | 3.29 KB | 0644 |
|
| expandToHashMap.js | File | 159 B | 0644 |
|
| format.js | File | 285 B | 0644 |
|
| getAltAxis.js | File | 79 B | 0644 |
|
| getAltLen.js | File | 89 B | 0644 |
|
| getBasePlacement.js | File | 125 B | 0644 |
|
| getFreshSideObject.js | File | 117 B | 0644 |
|
| getMainAxisFromPlacement.js | File | 127 B | 0644 |
|
| getOppositePlacement.js | File | 248 B | 0644 |
|
| getOppositeVariationPlacement.js | File | 209 B | 0644 |
|
| getVariation.js | File | 85 B | 0644 |
|
| math.js | File | 84 B | 0644 |
|
| mergeByName.js | File | 526 B | 0644 |
|
| mergePaddingObject.js | File | 184 B | 0644 |
|
| orderModifiers.js | File | 1.21 KB | 0644 |
|
| rectToClientRect.js | File | 191 B | 0644 |
|
| uniqueBy.js | File | 251 B | 0644 |
|
| validateModifiers.js | File | 3.17 KB | 0644 |
|
| within.js | File | 262 B | 0644 |
|