Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
* External dependencies
[29500] Fix | Delete
*/
[29501] Fix | Delete
[29502] Fix | Delete
[29503] Fix | Delete
/**
[29504] Fix | Delete
* WordPress dependencies
[29505] Fix | Delete
*/
[29506] Fix | Delete
[29507] Fix | Delete
[29508] Fix | Delete
[29509] Fix | Delete
[29510] Fix | Delete
/**
[29511] Fix | Delete
* Internal dependencies
[29512] Fix | Delete
*/
[29513] Fix | Delete
[29514] Fix | Delete
[29515] Fix | Delete
[29516] Fix | Delete
[29517] Fix | Delete
[29518] Fix | Delete
function select_control_useUniqueId(idProp) {
[29519] Fix | Delete
var instanceId = Object(external_wp_compose_["useInstanceId"])(SelectControl);
[29520] Fix | Delete
var id = "inspector-select-control-".concat(instanceId);
[29521] Fix | Delete
return idProp || id;
[29522] Fix | Delete
}
[29523] Fix | Delete
[29524] Fix | Delete
function SelectControl(_ref, ref) {
[29525] Fix | Delete
var className = _ref.className,
[29526] Fix | Delete
_ref$disabled = _ref.disabled,
[29527] Fix | Delete
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
[29528] Fix | Delete
help = _ref.help,
[29529] Fix | Delete
hideLabelFromVision = _ref.hideLabelFromVision,
[29530] Fix | Delete
idProp = _ref.id,
[29531] Fix | Delete
label = _ref.label,
[29532] Fix | Delete
_ref$multiple = _ref.multiple,
[29533] Fix | Delete
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
[29534] Fix | Delete
_ref$onBlur = _ref.onBlur,
[29535] Fix | Delete
onBlur = _ref$onBlur === void 0 ? external_lodash_["noop"] : _ref$onBlur,
[29536] Fix | Delete
_ref$onChange = _ref.onChange,
[29537] Fix | Delete
onChange = _ref$onChange === void 0 ? external_lodash_["noop"] : _ref$onChange,
[29538] Fix | Delete
_ref$onFocus = _ref.onFocus,
[29539] Fix | Delete
onFocus = _ref$onFocus === void 0 ? external_lodash_["noop"] : _ref$onFocus,
[29540] Fix | Delete
_ref$options = _ref.options,
[29541] Fix | Delete
options = _ref$options === void 0 ? [] : _ref$options,
[29542] Fix | Delete
_ref$size = _ref.size,
[29543] Fix | Delete
size = _ref$size === void 0 ? 'default' : _ref$size,
[29544] Fix | Delete
valueProp = _ref.value,
[29545] Fix | Delete
_ref$labelPosition = _ref.labelPosition,
[29546] Fix | Delete
labelPosition = _ref$labelPosition === void 0 ? 'top' : _ref$labelPosition,
[29547] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "disabled", "help", "hideLabelFromVision", "id", "label", "multiple", "onBlur", "onChange", "onFocus", "options", "size", "value", "labelPosition"]);
[29548] Fix | Delete
[29549] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(false),
[29550] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[29551] Fix | Delete
isFocused = _useState2[0],
[29552] Fix | Delete
setIsFocused = _useState2[1];
[29553] Fix | Delete
[29554] Fix | Delete
var id = select_control_useUniqueId(idProp);
[29555] Fix | Delete
var helpId = help ? "".concat(id, "__help") : undefined; // Disable reason: A select with an onchange throws a warning
[29556] Fix | Delete
[29557] Fix | Delete
if (Object(external_lodash_["isEmpty"])(options)) return null;
[29558] Fix | Delete
[29559] Fix | Delete
var handleOnBlur = function handleOnBlur(event) {
[29560] Fix | Delete
onBlur(event);
[29561] Fix | Delete
setIsFocused(false);
[29562] Fix | Delete
};
[29563] Fix | Delete
[29564] Fix | Delete
var handleOnFocus = function handleOnFocus(event) {
[29565] Fix | Delete
onFocus(event);
[29566] Fix | Delete
setIsFocused(true);
[29567] Fix | Delete
};
[29568] Fix | Delete
[29569] Fix | Delete
var handleOnChange = function handleOnChange(event) {
[29570] Fix | Delete
if (multiple) {
[29571] Fix | Delete
var selectedOptions = Object(toConsumableArray["a" /* default */])(event.target.options).filter(function (_ref2) {
[29572] Fix | Delete
var selected = _ref2.selected;
[29573] Fix | Delete
return selected;
[29574] Fix | Delete
});
[29575] Fix | Delete
[29576] Fix | Delete
var newValues = selectedOptions.map(function (_ref3) {
[29577] Fix | Delete
var value = _ref3.value;
[29578] Fix | Delete
return value;
[29579] Fix | Delete
});
[29580] Fix | Delete
onChange(newValues);
[29581] Fix | Delete
return;
[29582] Fix | Delete
}
[29583] Fix | Delete
[29584] Fix | Delete
onChange(event.target.value, {
[29585] Fix | Delete
event: event
[29586] Fix | Delete
});
[29587] Fix | Delete
};
[29588] Fix | Delete
[29589] Fix | Delete
var classes = classnames_default()('components-select-control', className);
[29590] Fix | Delete
/* eslint-disable jsx-a11y/no-onchange */
[29591] Fix | Delete
[29592] Fix | Delete
return Object(external_wp_element_["createElement"])(base_control, {
[29593] Fix | Delete
help: help
[29594] Fix | Delete
}, Object(external_wp_element_["createElement"])(input_base, {
[29595] Fix | Delete
className: classes,
[29596] Fix | Delete
disabled: disabled,
[29597] Fix | Delete
hideLabelFromVision: hideLabelFromVision,
[29598] Fix | Delete
id: id,
[29599] Fix | Delete
isFocused: isFocused,
[29600] Fix | Delete
label: label,
[29601] Fix | Delete
size: size,
[29602] Fix | Delete
suffix: Object(external_wp_element_["createElement"])(DownArrowWrapper, null, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[29603] Fix | Delete
icon: chevron_down["a" /* default */],
[29604] Fix | Delete
size: 18
[29605] Fix | Delete
})),
[29606] Fix | Delete
labelPosition: labelPosition
[29607] Fix | Delete
}, Object(external_wp_element_["createElement"])(Select, Object(esm_extends["a" /* default */])({}, props, {
[29608] Fix | Delete
"aria-describedby": helpId,
[29609] Fix | Delete
className: "components-select-control__input",
[29610] Fix | Delete
disabled: disabled,
[29611] Fix | Delete
id: id,
[29612] Fix | Delete
multiple: multiple,
[29613] Fix | Delete
onBlur: handleOnBlur,
[29614] Fix | Delete
onChange: handleOnChange,
[29615] Fix | Delete
onFocus: handleOnFocus,
[29616] Fix | Delete
ref: ref,
[29617] Fix | Delete
size: size,
[29618] Fix | Delete
value: valueProp
[29619] Fix | Delete
}), options.map(function (option, index) {
[29620] Fix | Delete
var key = option.id || "".concat(option.label, "-").concat(option.value, "-").concat(index);
[29621] Fix | Delete
return Object(external_wp_element_["createElement"])("option", {
[29622] Fix | Delete
key: key,
[29623] Fix | Delete
value: option.value,
[29624] Fix | Delete
disabled: option.disabled
[29625] Fix | Delete
}, option.label);
[29626] Fix | Delete
}))));
[29627] Fix | Delete
/* eslint-enable jsx-a11y/no-onchange */
[29628] Fix | Delete
}
[29629] Fix | Delete
[29630] Fix | Delete
var select_control_ForwardedComponent = Object(external_wp_element_["forwardRef"])(SelectControl);
[29631] Fix | Delete
/* harmony default export */ var select_control = (select_control_ForwardedComponent);
[29632] Fix | Delete
[29633] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dimension-control/sizes.js
[29634] Fix | Delete
/**
[29635] Fix | Delete
* Sizes
[29636] Fix | Delete
*
[29637] Fix | Delete
* defines the sizes used in dimension controls
[29638] Fix | Delete
* all hardcoded `size` values are based on the value of
[29639] Fix | Delete
* the Sass variable `$block-padding` from
[29640] Fix | Delete
* `packages/block-editor/src/components/dimension-control/sizes.js`.
[29641] Fix | Delete
*/
[29642] Fix | Delete
[29643] Fix | Delete
/**
[29644] Fix | Delete
* WordPress dependencies
[29645] Fix | Delete
*/
[29646] Fix | Delete
[29647] Fix | Delete
/**
[29648] Fix | Delete
* Finds the correct size object from the provided sizes
[29649] Fix | Delete
* table by size slug (eg: `medium`)
[29650] Fix | Delete
*
[29651] Fix | Delete
* @param {Array} sizes containing objects for each size definition
[29652] Fix | Delete
* @param {string} slug a string representation of the size (eg: `medium`)
[29653] Fix | Delete
* @return {Object} the matching size definition
[29654] Fix | Delete
*/
[29655] Fix | Delete
[29656] Fix | Delete
var findSizeBySlug = function findSizeBySlug(sizes, slug) {
[29657] Fix | Delete
return sizes.find(function (size) {
[29658] Fix | Delete
return slug === size.slug;
[29659] Fix | Delete
});
[29660] Fix | Delete
};
[29661] Fix | Delete
/* harmony default export */ var dimension_control_sizes = ([{
[29662] Fix | Delete
name: Object(external_wp_i18n_["__"])('None'),
[29663] Fix | Delete
slug: 'none'
[29664] Fix | Delete
}, {
[29665] Fix | Delete
name: Object(external_wp_i18n_["__"])('Small'),
[29666] Fix | Delete
slug: 'small'
[29667] Fix | Delete
}, {
[29668] Fix | Delete
name: Object(external_wp_i18n_["__"])('Medium'),
[29669] Fix | Delete
slug: 'medium'
[29670] Fix | Delete
}, {
[29671] Fix | Delete
name: Object(external_wp_i18n_["__"])('Large'),
[29672] Fix | Delete
slug: 'large'
[29673] Fix | Delete
}, {
[29674] Fix | Delete
name: Object(external_wp_i18n_["__"])('Extra Large'),
[29675] Fix | Delete
slug: 'xlarge'
[29676] Fix | Delete
}]);
[29677] Fix | Delete
[29678] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dimension-control/index.js
[29679] Fix | Delete
[29680] Fix | Delete
[29681] Fix | Delete
/**
[29682] Fix | Delete
* External dependencies
[29683] Fix | Delete
*/
[29684] Fix | Delete
[29685] Fix | Delete
[29686] Fix | Delete
/**
[29687] Fix | Delete
* WordPress dependencies
[29688] Fix | Delete
*/
[29689] Fix | Delete
[29690] Fix | Delete
/**
[29691] Fix | Delete
* Internal dependencies
[29692] Fix | Delete
*/
[29693] Fix | Delete
[29694] Fix | Delete
[29695] Fix | Delete
[29696] Fix | Delete
[29697] Fix | Delete
/**
[29698] Fix | Delete
* Internal dependencies
[29699] Fix | Delete
*/
[29700] Fix | Delete
[29701] Fix | Delete
[29702] Fix | Delete
function DimensionControl(props) {
[29703] Fix | Delete
var label = props.label,
[29704] Fix | Delete
value = props.value,
[29705] Fix | Delete
_props$sizes = props.sizes,
[29706] Fix | Delete
sizes = _props$sizes === void 0 ? dimension_control_sizes : _props$sizes,
[29707] Fix | Delete
icon = props.icon,
[29708] Fix | Delete
onChange = props.onChange,
[29709] Fix | Delete
_props$className = props.className,
[29710] Fix | Delete
className = _props$className === void 0 ? '' : _props$className;
[29711] Fix | Delete
[29712] Fix | Delete
var onChangeSpacingSize = function onChangeSpacingSize(val) {
[29713] Fix | Delete
var theSize = findSizeBySlug(sizes, val);
[29714] Fix | Delete
[29715] Fix | Delete
if (!theSize || value === theSize.slug) {
[29716] Fix | Delete
onChange(undefined);
[29717] Fix | Delete
} else if (Object(external_lodash_["isFunction"])(onChange)) {
[29718] Fix | Delete
onChange(theSize.slug);
[29719] Fix | Delete
}
[29720] Fix | Delete
};
[29721] Fix | Delete
[29722] Fix | Delete
var formatSizesAsOptions = function formatSizesAsOptions(theSizes) {
[29723] Fix | Delete
var options = theSizes.map(function (_ref) {
[29724] Fix | Delete
var name = _ref.name,
[29725] Fix | Delete
slug = _ref.slug;
[29726] Fix | Delete
return {
[29727] Fix | Delete
label: name,
[29728] Fix | Delete
value: slug
[29729] Fix | Delete
};
[29730] Fix | Delete
});
[29731] Fix | Delete
return [{
[29732] Fix | Delete
label: Object(external_wp_i18n_["__"])('Default'),
[29733] Fix | Delete
value: ''
[29734] Fix | Delete
}].concat(options);
[29735] Fix | Delete
};
[29736] Fix | Delete
[29737] Fix | Delete
var selectLabel = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, icon && Object(external_wp_element_["createElement"])(components_build_module_icon["a" /* default */], {
[29738] Fix | Delete
icon: icon
[29739] Fix | Delete
}), label);
[29740] Fix | Delete
return Object(external_wp_element_["createElement"])(select_control, {
[29741] Fix | Delete
className: classnames_default()(className, 'block-editor-dimension-control'),
[29742] Fix | Delete
label: selectLabel,
[29743] Fix | Delete
hideLabelFromVision: false,
[29744] Fix | Delete
value: value,
[29745] Fix | Delete
onChange: onChangeSpacingSize,
[29746] Fix | Delete
options: formatSizesAsOptions(sizes)
[29747] Fix | Delete
});
[29748] Fix | Delete
}
[29749] Fix | Delete
/* harmony default export */ var dimension_control = (DimensionControl);
[29750] Fix | Delete
[29751] Fix | Delete
// EXTERNAL MODULE: external ["wp","dom"]
[29752] Fix | Delete
var external_wp_dom_ = __webpack_require__("1CF3");
[29753] Fix | Delete
[29754] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/disabled/styles/disabled-styles.js
[29755] Fix | Delete
[29756] Fix | Delete
[29757] Fix | Delete
function disabled_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
[29758] Fix | Delete
[29759] Fix | Delete
var StyledWrapper = styled_base_browser_esm("div", {
[29760] Fix | Delete
target: "e1ac3xxk0",
[29761] Fix | Delete
label: "StyledWrapper"
[29762] Fix | Delete
})( true ? {
[29763] Fix | Delete
name: "u2jump",
[29764] Fix | Delete
styles: "position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"
[29765] Fix | Delete
} : undefined);
[29766] Fix | Delete
[29767] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/disabled/index.js
[29768] Fix | Delete
[29769] Fix | Delete
[29770] Fix | Delete
[29771] Fix | Delete
[29772] Fix | Delete
/**
[29773] Fix | Delete
* External dependencies
[29774] Fix | Delete
*/
[29775] Fix | Delete
[29776] Fix | Delete
[29777] Fix | Delete
/**
[29778] Fix | Delete
* WordPress dependencies
[29779] Fix | Delete
*/
[29780] Fix | Delete
[29781] Fix | Delete
[29782] Fix | Delete
[29783] Fix | Delete
/**
[29784] Fix | Delete
* Internal dependencies
[29785] Fix | Delete
*/
[29786] Fix | Delete
[29787] Fix | Delete
[29788] Fix | Delete
[29789] Fix | Delete
var _createContext = Object(external_wp_element_["createContext"])(false),
[29790] Fix | Delete
Consumer = _createContext.Consumer,
[29791] Fix | Delete
disabled_Provider = _createContext.Provider;
[29792] Fix | Delete
/**
[29793] Fix | Delete
* Names of control nodes which qualify for disabled behavior.
[29794] Fix | Delete
*
[29795] Fix | Delete
* See WHATWG HTML Standard: 4.10.18.5: "Enabling and disabling form controls: the disabled attribute".
[29796] Fix | Delete
*
[29797] Fix | Delete
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute
[29798] Fix | Delete
*
[29799] Fix | Delete
* @type {string[]}
[29800] Fix | Delete
*/
[29801] Fix | Delete
[29802] Fix | Delete
[29803] Fix | Delete
var DISABLED_ELIGIBLE_NODE_NAMES = ['BUTTON', 'FIELDSET', 'INPUT', 'OPTGROUP', 'OPTION', 'SELECT', 'TEXTAREA'];
[29804] Fix | Delete
[29805] Fix | Delete
function Disabled(_ref) {
[29806] Fix | Delete
var className = _ref.className,
[29807] Fix | Delete
children = _ref.children,
[29808] Fix | Delete
_ref$isDisabled = _ref.isDisabled,
[29809] Fix | Delete
isDisabled = _ref$isDisabled === void 0 ? true : _ref$isDisabled,
[29810] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "children", "isDisabled"]);
[29811] Fix | Delete
[29812] Fix | Delete
var node = Object(external_wp_element_["useRef"])();
[29813] Fix | Delete
[29814] Fix | Delete
var disable = function disable() {
[29815] Fix | Delete
external_wp_dom_["focus"].focusable.find(node.current).forEach(function (focusable) {
[29816] Fix | Delete
if (Object(external_lodash_["includes"])(DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName)) {
[29817] Fix | Delete
focusable.setAttribute('disabled', '');
[29818] Fix | Delete
}
[29819] Fix | Delete
[29820] Fix | Delete
if (focusable.nodeName === 'A') {
[29821] Fix | Delete
focusable.setAttribute('tabindex', -1);
[29822] Fix | Delete
}
[29823] Fix | Delete
[29824] Fix | Delete
var tabIndex = focusable.getAttribute('tabindex');
[29825] Fix | Delete
[29826] Fix | Delete
if (tabIndex !== null && tabIndex !== '-1') {
[29827] Fix | Delete
focusable.removeAttribute('tabindex');
[29828] Fix | Delete
}
[29829] Fix | Delete
[29830] Fix | Delete
if (focusable.hasAttribute('contenteditable')) {
[29831] Fix | Delete
focusable.setAttribute('contenteditable', 'false');
[29832] Fix | Delete
}
[29833] Fix | Delete
});
[29834] Fix | Delete
}; // Debounce re-disable since disabling process itself will incur
[29835] Fix | Delete
// additional mutations which should be ignored.
[29836] Fix | Delete
[29837] Fix | Delete
[29838] Fix | Delete
var debouncedDisable = Object(external_wp_element_["useCallback"])(Object(external_lodash_["debounce"])(disable, {
[29839] Fix | Delete
leading: true
[29840] Fix | Delete
}), []);
[29841] Fix | Delete
Object(external_wp_element_["useLayoutEffect"])(function () {
[29842] Fix | Delete
if (!isDisabled) {
[29843] Fix | Delete
return;
[29844] Fix | Delete
}
[29845] Fix | Delete
[29846] Fix | Delete
disable();
[29847] Fix | Delete
var observer = new window.MutationObserver(debouncedDisable);
[29848] Fix | Delete
observer.observe(node.current, {
[29849] Fix | Delete
childList: true,
[29850] Fix | Delete
attributes: true,
[29851] Fix | Delete
subtree: true
[29852] Fix | Delete
});
[29853] Fix | Delete
return function () {
[29854] Fix | Delete
observer.disconnect();
[29855] Fix | Delete
debouncedDisable.cancel();
[29856] Fix | Delete
};
[29857] Fix | Delete
}, []);
[29858] Fix | Delete
[29859] Fix | Delete
if (!isDisabled) {
[29860] Fix | Delete
return Object(external_wp_element_["createElement"])(disabled_Provider, {
[29861] Fix | Delete
value: false
[29862] Fix | Delete
}, children);
[29863] Fix | Delete
}
[29864] Fix | Delete
[29865] Fix | Delete
return Object(external_wp_element_["createElement"])(disabled_Provider, {
[29866] Fix | Delete
value: true
[29867] Fix | Delete
}, Object(external_wp_element_["createElement"])(StyledWrapper, Object(esm_extends["a" /* default */])({
[29868] Fix | Delete
ref: node,
[29869] Fix | Delete
className: classnames_default()(className, 'components-disabled')
[29870] Fix | Delete
}, props), children));
[29871] Fix | Delete
}
[29872] Fix | Delete
[29873] Fix | Delete
Disabled.Consumer = Consumer;
[29874] Fix | Delete
/* harmony default export */ var build_module_disabled = (Disabled);
[29875] Fix | Delete
[29876] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/__keys-e6a5cfbe.js
[29877] Fix | Delete
// Automatically generated
[29878] Fix | Delete
var DISCLOSURE_STATE_KEYS = ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation"];
[29879] Fix | Delete
var DISCLOSURE_KEYS = DISCLOSURE_STATE_KEYS;
[29880] Fix | Delete
var DISCLOSURE_CONTENT_KEYS = DISCLOSURE_KEYS;
[29881] Fix | Delete
[29882] Fix | Delete
[29883] Fix | Delete
[29884] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/Disclosure/DisclosureContent.js
[29885] Fix | Delete
[29886] Fix | Delete
[29887] Fix | Delete
[29888] Fix | Delete
[29889] Fix | Delete
[29890] Fix | Delete
[29891] Fix | Delete
[29892] Fix | Delete
[29893] Fix | Delete
[29894] Fix | Delete
[29895] Fix | Delete
var useDisclosureContent = Object(createHook["a" /* createHook */])({
[29896] Fix | Delete
name: "DisclosureContent",
[29897] Fix | Delete
compose: Role["a" /* useRole */],
[29898] Fix | Delete
keys: DISCLOSURE_CONTENT_KEYS,
[29899] Fix | Delete
useProps: function useProps(options, _ref) {
[29900] Fix | Delete
var htmlOnTransitionEnd = _ref.onTransitionEnd,
[29901] Fix | Delete
htmlOnAnimationEnd = _ref.onAnimationEnd,
[29902] Fix | Delete
htmlStyle = _ref.style,
[29903] Fix | Delete
htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2["a" /* _ */])(_ref, ["onTransitionEnd", "onAnimationEnd", "style"]);
[29904] Fix | Delete
[29905] Fix | Delete
var animating = options.animated && options.animating;
[29906] Fix | Delete
[29907] Fix | Delete
var _React$useState = Object(external_React_["useState"])(null),
[29908] Fix | Delete
transition = _React$useState[0],
[29909] Fix | Delete
setTransition = _React$useState[1];
[29910] Fix | Delete
[29911] Fix | Delete
var hidden = !options.visible && !animating;
[29912] Fix | Delete
var style = hidden ? Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({
[29913] Fix | Delete
display: "none"
[29914] Fix | Delete
}, htmlStyle) : htmlStyle;
[29915] Fix | Delete
var onTransitionEndRef = Object(useLiveRef["a" /* useLiveRef */])(htmlOnTransitionEnd);
[29916] Fix | Delete
var onAnimationEndRef = Object(useLiveRef["a" /* useLiveRef */])(htmlOnAnimationEnd);
[29917] Fix | Delete
var raf = Object(external_React_["useRef"])(0);
[29918] Fix | Delete
Object(external_React_["useEffect"])(function () {
[29919] Fix | Delete
if (!options.animated) return undefined; // Double RAF is needed so the browser has enough time to paint the
[29920] Fix | Delete
// default styles before processing the `data-enter` attribute. Otherwise
[29921] Fix | Delete
// it wouldn't be considered a transition.
[29922] Fix | Delete
// See https://github.com/reakit/reakit/issues/643
[29923] Fix | Delete
[29924] Fix | Delete
raf.current = window.requestAnimationFrame(function () {
[29925] Fix | Delete
raf.current = window.requestAnimationFrame(function () {
[29926] Fix | Delete
if (options.visible) {
[29927] Fix | Delete
setTransition("enter");
[29928] Fix | Delete
} else if (animating) {
[29929] Fix | Delete
setTransition("leave");
[29930] Fix | Delete
} else {
[29931] Fix | Delete
setTransition(null);
[29932] Fix | Delete
}
[29933] Fix | Delete
});
[29934] Fix | Delete
});
[29935] Fix | Delete
return function () {
[29936] Fix | Delete
return window.cancelAnimationFrame(raf.current);
[29937] Fix | Delete
};
[29938] Fix | Delete
}, [options.animated, options.visible, animating]);
[29939] Fix | Delete
var onEnd = Object(external_React_["useCallback"])(function (event) {
[29940] Fix | Delete
if (!Object(isSelfTarget["a" /* isSelfTarget */])(event)) return;
[29941] Fix | Delete
if (!animating) return; // Ignores number animated
[29942] Fix | Delete
[29943] Fix | Delete
if (options.animated === true) {
[29944] Fix | Delete
var _options$stopAnimatio;
[29945] Fix | Delete
[29946] Fix | Delete
(_options$stopAnimatio = options.stopAnimation) === null || _options$stopAnimatio === void 0 ? void 0 : _options$stopAnimatio.call(options);
[29947] Fix | Delete
}
[29948] Fix | Delete
}, [options.animated, animating, options.stopAnimation]);
[29949] Fix | Delete
var onTransitionEnd = Object(external_React_["useCallback"])(function (event) {
[29950] Fix | Delete
var _onTransitionEndRef$c;
[29951] Fix | Delete
[29952] Fix | Delete
(_onTransitionEndRef$c = onTransitionEndRef.current) === null || _onTransitionEndRef$c === void 0 ? void 0 : _onTransitionEndRef$c.call(onTransitionEndRef, event);
[29953] Fix | Delete
onEnd(event);
[29954] Fix | Delete
}, [onEnd]);
[29955] Fix | Delete
var onAnimationEnd = Object(external_React_["useCallback"])(function (event) {
[29956] Fix | Delete
var _onAnimationEndRef$cu;
[29957] Fix | Delete
[29958] Fix | Delete
(_onAnimationEndRef$cu = onAnimationEndRef.current) === null || _onAnimationEndRef$cu === void 0 ? void 0 : _onAnimationEndRef$cu.call(onAnimationEndRef, event);
[29959] Fix | Delete
onEnd(event);
[29960] Fix | Delete
}, [onEnd]);
[29961] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({
[29962] Fix | Delete
id: options.baseId,
[29963] Fix | Delete
"data-enter": transition === "enter" ? "" : undefined,
[29964] Fix | Delete
"data-leave": transition === "leave" ? "" : undefined,
[29965] Fix | Delete
onTransitionEnd: onTransitionEnd,
[29966] Fix | Delete
onAnimationEnd: onAnimationEnd,
[29967] Fix | Delete
hidden: hidden,
[29968] Fix | Delete
style: style
[29969] Fix | Delete
}, htmlProps);
[29970] Fix | Delete
}
[29971] Fix | Delete
});
[29972] Fix | Delete
var DisclosureContent = Object(createComponent["a" /* createComponent */])({
[29973] Fix | Delete
as: "div",
[29974] Fix | Delete
useHook: useDisclosureContent
[29975] Fix | Delete
});
[29976] Fix | Delete
[29977] Fix | Delete
[29978] Fix | Delete
[29979] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/draggable/index.js
[29980] Fix | Delete
[29981] Fix | Delete
[29982] Fix | Delete
/**
[29983] Fix | Delete
* WordPress dependencies
[29984] Fix | Delete
*/
[29985] Fix | Delete
[29986] Fix | Delete
var dragImageClass = 'components-draggable__invisible-drag-image';
[29987] Fix | Delete
var cloneWrapperClass = 'components-draggable__clone';
[29988] Fix | Delete
var cloneHeightTransformationBreakpoint = 700;
[29989] Fix | Delete
var clonePadding = 0;
[29990] Fix | Delete
var bodyClass = 'is-dragging-components-draggable';
[29991] Fix | Delete
function Draggable(_ref) {
[29992] Fix | Delete
var children = _ref.children,
[29993] Fix | Delete
onDragStart = _ref.onDragStart,
[29994] Fix | Delete
onDragOver = _ref.onDragOver,
[29995] Fix | Delete
onDragEnd = _ref.onDragEnd,
[29996] Fix | Delete
cloneClassname = _ref.cloneClassname,
[29997] Fix | Delete
elementId = _ref.elementId,
[29998] Fix | Delete
transferData = _ref.transferData,
[29999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function