Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
}
[21000] Fix | Delete
function handleShady() {
[21001] Fix | Delete
return "\n\t\t&.is-shady {\n\t\t\tbackground: ".concat(backgroundShady, ";\n\t\t}\n\t");
[21002] Fix | Delete
}
[21003] Fix | Delete
[21004] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/index.js
[21005] Fix | Delete
[21006] Fix | Delete
[21007] Fix | Delete
[21008] Fix | Delete
[21009] Fix | Delete
/**
[21010] Fix | Delete
* External dependencies
[21011] Fix | Delete
*/
[21012] Fix | Delete
[21013] Fix | Delete
/**
[21014] Fix | Delete
* Internal dependencies
[21015] Fix | Delete
*/
[21016] Fix | Delete
[21017] Fix | Delete
[21018] Fix | Delete
[21019] Fix | Delete
var card_defaultProps = {
[21020] Fix | Delete
isBorderless: false,
[21021] Fix | Delete
isElevated: false,
[21022] Fix | Delete
size: 'medium'
[21023] Fix | Delete
};
[21024] Fix | Delete
function Card(props) {
[21025] Fix | Delete
var className = props.className,
[21026] Fix | Delete
isBorderless = props.isBorderless,
[21027] Fix | Delete
isElevated = props.isElevated,
[21028] Fix | Delete
size = props.size,
[21029] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "isBorderless", "isElevated", "size"]);
[21030] Fix | Delete
[21031] Fix | Delete
var Provider = CardContext.Provider;
[21032] Fix | Delete
var contextProps = {
[21033] Fix | Delete
isBorderless: isBorderless,
[21034] Fix | Delete
isElevated: isElevated,
[21035] Fix | Delete
size: size
[21036] Fix | Delete
};
[21037] Fix | Delete
var classes = classnames_default()('components-card', isBorderless && 'is-borderless', isElevated && 'is-elevated', size && "is-size-".concat(size), className);
[21038] Fix | Delete
return Object(external_wp_element_["createElement"])(Provider, {
[21039] Fix | Delete
value: contextProps
[21040] Fix | Delete
}, Object(external_wp_element_["createElement"])(CardUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21041] Fix | Delete
className: classes
[21042] Fix | Delete
})));
[21043] Fix | Delete
}
[21044] Fix | Delete
Card.defaultProps = card_defaultProps;
[21045] Fix | Delete
/* harmony default export */ var card = (Card);
[21046] Fix | Delete
[21047] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/body.js
[21048] Fix | Delete
[21049] Fix | Delete
[21050] Fix | Delete
[21051] Fix | Delete
[21052] Fix | Delete
[21053] Fix | Delete
function body_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[21054] Fix | Delete
[21055] Fix | Delete
function body_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { body_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { body_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[21056] Fix | Delete
[21057] Fix | Delete
/**
[21058] Fix | Delete
* External dependencies
[21059] Fix | Delete
*/
[21060] Fix | Delete
[21061] Fix | Delete
/**
[21062] Fix | Delete
* Internal dependencies
[21063] Fix | Delete
*/
[21064] Fix | Delete
[21065] Fix | Delete
[21066] Fix | Delete
[21067] Fix | Delete
var body_defaultProps = {
[21068] Fix | Delete
isShady: false,
[21069] Fix | Delete
size: 'medium'
[21070] Fix | Delete
};
[21071] Fix | Delete
function CardBody(props) {
[21072] Fix | Delete
var className = props.className,
[21073] Fix | Delete
isShady = props.isShady,
[21074] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "isShady"]);
[21075] Fix | Delete
[21076] Fix | Delete
var mergedProps = body_objectSpread(body_objectSpread(body_objectSpread({}, body_defaultProps), context_useCardContext()), props);
[21077] Fix | Delete
[21078] Fix | Delete
var size = mergedProps.size;
[21079] Fix | Delete
var classes = classnames_default()('components-card__body', isShady && 'is-shady', size && "is-size-".concat(size), className);
[21080] Fix | Delete
return Object(external_wp_element_["createElement"])(BodyUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21081] Fix | Delete
className: classes
[21082] Fix | Delete
}));
[21083] Fix | Delete
}
[21084] Fix | Delete
/* harmony default export */ var card_body = (CardBody);
[21085] Fix | Delete
[21086] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/divider.js
[21087] Fix | Delete
[21088] Fix | Delete
[21089] Fix | Delete
[21090] Fix | Delete
[21091] Fix | Delete
/**
[21092] Fix | Delete
* External dependencies
[21093] Fix | Delete
*/
[21094] Fix | Delete
[21095] Fix | Delete
/**
[21096] Fix | Delete
* Internal dependencies
[21097] Fix | Delete
*/
[21098] Fix | Delete
[21099] Fix | Delete
[21100] Fix | Delete
function CardDivider(props) {
[21101] Fix | Delete
var className = props.className,
[21102] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className"]);
[21103] Fix | Delete
[21104] Fix | Delete
var classes = classnames_default()('components-card__divider', className);
[21105] Fix | Delete
return Object(external_wp_element_["createElement"])(DividerUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21106] Fix | Delete
children: null,
[21107] Fix | Delete
className: classes,
[21108] Fix | Delete
role: "separator"
[21109] Fix | Delete
}));
[21110] Fix | Delete
}
[21111] Fix | Delete
/* harmony default export */ var divider = (CardDivider);
[21112] Fix | Delete
[21113] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/footer.js
[21114] Fix | Delete
[21115] Fix | Delete
[21116] Fix | Delete
[21117] Fix | Delete
[21118] Fix | Delete
[21119] Fix | Delete
function footer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[21120] Fix | Delete
[21121] Fix | Delete
function footer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { footer_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { footer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[21122] Fix | Delete
[21123] Fix | Delete
/**
[21124] Fix | Delete
* External dependencies
[21125] Fix | Delete
*/
[21126] Fix | Delete
[21127] Fix | Delete
/**
[21128] Fix | Delete
* Internal dependencies
[21129] Fix | Delete
*/
[21130] Fix | Delete
[21131] Fix | Delete
[21132] Fix | Delete
[21133] Fix | Delete
var footer_defaultProps = {
[21134] Fix | Delete
isBorderless: false,
[21135] Fix | Delete
isShady: false,
[21136] Fix | Delete
size: 'medium'
[21137] Fix | Delete
};
[21138] Fix | Delete
function CardFooter(props) {
[21139] Fix | Delete
var className = props.className,
[21140] Fix | Delete
isShady = props.isShady,
[21141] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "isShady"]);
[21142] Fix | Delete
[21143] Fix | Delete
var mergedProps = footer_objectSpread(footer_objectSpread(footer_objectSpread({}, footer_defaultProps), context_useCardContext()), props);
[21144] Fix | Delete
[21145] Fix | Delete
var isBorderless = mergedProps.isBorderless,
[21146] Fix | Delete
size = mergedProps.size;
[21147] Fix | Delete
var classes = classnames_default()('components-card__footer', isBorderless && 'is-borderless', isShady && 'is-shady', size && "is-size-".concat(size), className);
[21148] Fix | Delete
return Object(external_wp_element_["createElement"])(FooterUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21149] Fix | Delete
className: classes
[21150] Fix | Delete
}));
[21151] Fix | Delete
}
[21152] Fix | Delete
/* harmony default export */ var footer = (CardFooter);
[21153] Fix | Delete
[21154] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/header.js
[21155] Fix | Delete
[21156] Fix | Delete
[21157] Fix | Delete
[21158] Fix | Delete
[21159] Fix | Delete
[21160] Fix | Delete
function header_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[21161] Fix | Delete
[21162] Fix | Delete
function header_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { header_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { header_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[21163] Fix | Delete
[21164] Fix | Delete
/**
[21165] Fix | Delete
* External dependencies
[21166] Fix | Delete
*/
[21167] Fix | Delete
[21168] Fix | Delete
/**
[21169] Fix | Delete
* Internal dependencies
[21170] Fix | Delete
*/
[21171] Fix | Delete
[21172] Fix | Delete
[21173] Fix | Delete
[21174] Fix | Delete
var header_defaultProps = {
[21175] Fix | Delete
isBorderless: false,
[21176] Fix | Delete
isShady: false,
[21177] Fix | Delete
size: 'medium'
[21178] Fix | Delete
};
[21179] Fix | Delete
function CardHeader(props) {
[21180] Fix | Delete
var className = props.className,
[21181] Fix | Delete
isShady = props.isShady,
[21182] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "isShady"]);
[21183] Fix | Delete
[21184] Fix | Delete
var mergedProps = header_objectSpread(header_objectSpread(header_objectSpread({}, header_defaultProps), context_useCardContext()), props);
[21185] Fix | Delete
[21186] Fix | Delete
var isBorderless = mergedProps.isBorderless,
[21187] Fix | Delete
size = mergedProps.size;
[21188] Fix | Delete
var classes = classnames_default()('components-card__header', isBorderless && 'is-borderless', isShady && 'is-shady', size && "is-size-".concat(size), className);
[21189] Fix | Delete
return Object(external_wp_element_["createElement"])(HeaderUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21190] Fix | Delete
className: classes
[21191] Fix | Delete
}));
[21192] Fix | Delete
}
[21193] Fix | Delete
/* harmony default export */ var card_header = (CardHeader);
[21194] Fix | Delete
[21195] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/media.js
[21196] Fix | Delete
[21197] Fix | Delete
[21198] Fix | Delete
[21199] Fix | Delete
[21200] Fix | Delete
/**
[21201] Fix | Delete
* External dependencies
[21202] Fix | Delete
*/
[21203] Fix | Delete
[21204] Fix | Delete
/**
[21205] Fix | Delete
* Internal dependencies
[21206] Fix | Delete
*/
[21207] Fix | Delete
[21208] Fix | Delete
[21209] Fix | Delete
function CardMedia(props) {
[21210] Fix | Delete
var className = props.className,
[21211] Fix | Delete
additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["className"]);
[21212] Fix | Delete
[21213] Fix | Delete
var classes = classnames_default()('components-card__media', className);
[21214] Fix | Delete
return Object(external_wp_element_["createElement"])(MediaUI, Object(esm_extends["a" /* default */])({}, additionalProps, {
[21215] Fix | Delete
className: classes
[21216] Fix | Delete
}));
[21217] Fix | Delete
}
[21218] Fix | Delete
/* harmony default export */ var media = (CardMedia);
[21219] Fix | Delete
[21220] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
[21221] Fix | Delete
var build_module_icon = __webpack_require__("iClF");
[21222] Fix | Delete
[21223] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
[21224] Fix | Delete
var check = __webpack_require__("RMJe");
[21225] Fix | Delete
[21226] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/checkbox-control/index.js
[21227] Fix | Delete
[21228] Fix | Delete
[21229] Fix | Delete
[21230] Fix | Delete
[21231] Fix | Delete
/**
[21232] Fix | Delete
* WordPress dependencies
[21233] Fix | Delete
*/
[21234] Fix | Delete
[21235] Fix | Delete
[21236] Fix | Delete
/**
[21237] Fix | Delete
* Internal dependencies
[21238] Fix | Delete
*/
[21239] Fix | Delete
[21240] Fix | Delete
[21241] Fix | Delete
function CheckboxControl(_ref) {
[21242] Fix | Delete
var label = _ref.label,
[21243] Fix | Delete
className = _ref.className,
[21244] Fix | Delete
heading = _ref.heading,
[21245] Fix | Delete
checked = _ref.checked,
[21246] Fix | Delete
help = _ref.help,
[21247] Fix | Delete
onChange = _ref.onChange,
[21248] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["label", "className", "heading", "checked", "help", "onChange"]);
[21249] Fix | Delete
[21250] Fix | Delete
var instanceId = Object(external_wp_compose_["useInstanceId"])(CheckboxControl);
[21251] Fix | Delete
var id = "inspector-checkbox-control-".concat(instanceId);
[21252] Fix | Delete
[21253] Fix | Delete
var onChangeValue = function onChangeValue(event) {
[21254] Fix | Delete
return onChange(event.target.checked);
[21255] Fix | Delete
};
[21256] Fix | Delete
[21257] Fix | Delete
return Object(external_wp_element_["createElement"])(base_control, {
[21258] Fix | Delete
label: heading,
[21259] Fix | Delete
id: id,
[21260] Fix | Delete
help: help,
[21261] Fix | Delete
className: className
[21262] Fix | Delete
}, Object(external_wp_element_["createElement"])("span", {
[21263] Fix | Delete
className: "components-checkbox-control__input-container"
[21264] Fix | Delete
}, Object(external_wp_element_["createElement"])("input", Object(esm_extends["a" /* default */])({
[21265] Fix | Delete
id: id,
[21266] Fix | Delete
className: "components-checkbox-control__input",
[21267] Fix | Delete
type: "checkbox",
[21268] Fix | Delete
value: "1",
[21269] Fix | Delete
onChange: onChangeValue,
[21270] Fix | Delete
checked: checked,
[21271] Fix | Delete
"aria-describedby": !!help ? id + '__help' : undefined
[21272] Fix | Delete
}, props)), checked ? Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[21273] Fix | Delete
icon: check["a" /* default */],
[21274] Fix | Delete
className: "components-checkbox-control__checked",
[21275] Fix | Delete
role: "presentation"
[21276] Fix | Delete
}) : null), Object(external_wp_element_["createElement"])("label", {
[21277] Fix | Delete
className: "components-checkbox-control__label",
[21278] Fix | Delete
htmlFor: id
[21279] Fix | Delete
}, label));
[21280] Fix | Delete
}
[21281] Fix | Delete
[21282] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/clipboard-button/index.js
[21283] Fix | Delete
[21284] Fix | Delete
[21285] Fix | Delete
[21286] Fix | Delete
[21287] Fix | Delete
/**
[21288] Fix | Delete
* External dependencies
[21289] Fix | Delete
*/
[21290] Fix | Delete
[21291] Fix | Delete
/**
[21292] Fix | Delete
* WordPress dependencies
[21293] Fix | Delete
*/
[21294] Fix | Delete
[21295] Fix | Delete
[21296] Fix | Delete
[21297] Fix | Delete
/**
[21298] Fix | Delete
* Internal dependencies
[21299] Fix | Delete
*/
[21300] Fix | Delete
[21301] Fix | Delete
[21302] Fix | Delete
function ClipboardButton(_ref) {
[21303] Fix | Delete
var className = _ref.className,
[21304] Fix | Delete
children = _ref.children,
[21305] Fix | Delete
onCopy = _ref.onCopy,
[21306] Fix | Delete
onFinishCopy = _ref.onFinishCopy,
[21307] Fix | Delete
text = _ref.text,
[21308] Fix | Delete
buttonProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "children", "onCopy", "onFinishCopy", "text"]);
[21309] Fix | Delete
[21310] Fix | Delete
var ref = Object(external_wp_element_["useRef"])();
[21311] Fix | Delete
var hasCopied = Object(external_wp_compose_["useCopyOnClick"])(ref, text);
[21312] Fix | Delete
var lastHasCopied = Object(external_wp_element_["useRef"])(hasCopied);
[21313] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[21314] Fix | Delete
if (lastHasCopied.current === hasCopied) {
[21315] Fix | Delete
return;
[21316] Fix | Delete
}
[21317] Fix | Delete
[21318] Fix | Delete
if (hasCopied) {
[21319] Fix | Delete
onCopy();
[21320] Fix | Delete
} else if (onFinishCopy) {
[21321] Fix | Delete
onFinishCopy();
[21322] Fix | Delete
}
[21323] Fix | Delete
[21324] Fix | Delete
lastHasCopied.current = hasCopied;
[21325] Fix | Delete
}, [onCopy, onFinishCopy, hasCopied]);
[21326] Fix | Delete
var classes = classnames_default()('components-clipboard-button', className); // Workaround for inconsistent behavior in Safari, where <textarea> is not
[21327] Fix | Delete
// the document.activeElement at the moment when the copy event fires.
[21328] Fix | Delete
// This causes documentHasSelection() in the copy-handler component to
[21329] Fix | Delete
// mistakenly override the ClipboardButton, and copy a serialized string
[21330] Fix | Delete
// of the current block instead.
[21331] Fix | Delete
[21332] Fix | Delete
var focusOnCopyEventTarget = function focusOnCopyEventTarget(event) {
[21333] Fix | Delete
event.target.focus();
[21334] Fix | Delete
};
[21335] Fix | Delete
[21336] Fix | Delete
return Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], Object(esm_extends["a" /* default */])({}, buttonProps, {
[21337] Fix | Delete
className: classes,
[21338] Fix | Delete
ref: ref,
[21339] Fix | Delete
onCopy: focusOnCopyEventTarget
[21340] Fix | Delete
}), children);
[21341] Fix | Delete
}
[21342] Fix | Delete
[21343] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
[21344] Fix | Delete
var edit = __webpack_require__("B9Az");
[21345] Fix | Delete
[21346] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
[21347] Fix | Delete
var library_close = __webpack_require__("w95h");
[21348] Fix | Delete
[21349] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
[21350] Fix | Delete
var chevron_up = __webpack_require__("XgzB");
[21351] Fix | Delete
[21352] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
[21353] Fix | Delete
var chevron_down = __webpack_require__("NWDH");
[21354] Fix | Delete
[21355] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
[21356] Fix | Delete
var plus = __webpack_require__("Q4Sy");
[21357] Fix | Delete
[21358] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dropdown/index.js
[21359] Fix | Delete
[21360] Fix | Delete
[21361] Fix | Delete
[21362] Fix | Delete
[21363] Fix | Delete
/**
[21364] Fix | Delete
* External dependencies
[21365] Fix | Delete
*/
[21366] Fix | Delete
[21367] Fix | Delete
/**
[21368] Fix | Delete
* WordPress dependencies
[21369] Fix | Delete
*/
[21370] Fix | Delete
[21371] Fix | Delete
[21372] Fix | Delete
/**
[21373] Fix | Delete
* Internal dependencies
[21374] Fix | Delete
*/
[21375] Fix | Delete
[21376] Fix | Delete
[21377] Fix | Delete
[21378] Fix | Delete
function useObservableState(initialState, onStateChange) {
[21379] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(initialState),
[21380] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[21381] Fix | Delete
state = _useState2[0],
[21382] Fix | Delete
setState = _useState2[1];
[21383] Fix | Delete
[21384] Fix | Delete
return [state, function (value) {
[21385] Fix | Delete
setState(value);
[21386] Fix | Delete
[21387] Fix | Delete
if (onStateChange) {
[21388] Fix | Delete
onStateChange(value);
[21389] Fix | Delete
}
[21390] Fix | Delete
}];
[21391] Fix | Delete
}
[21392] Fix | Delete
[21393] Fix | Delete
function Dropdown(_ref) {
[21394] Fix | Delete
var _popoverProps$anchorR;
[21395] Fix | Delete
[21396] Fix | Delete
var renderContent = _ref.renderContent,
[21397] Fix | Delete
renderToggle = _ref.renderToggle,
[21398] Fix | Delete
_ref$position = _ref.position,
[21399] Fix | Delete
position = _ref$position === void 0 ? 'bottom right' : _ref$position,
[21400] Fix | Delete
className = _ref.className,
[21401] Fix | Delete
contentClassName = _ref.contentClassName,
[21402] Fix | Delete
expandOnMobile = _ref.expandOnMobile,
[21403] Fix | Delete
headerTitle = _ref.headerTitle,
[21404] Fix | Delete
focusOnMount = _ref.focusOnMount,
[21405] Fix | Delete
popoverProps = _ref.popoverProps,
[21406] Fix | Delete
onClose = _ref.onClose,
[21407] Fix | Delete
onToggle = _ref.onToggle;
[21408] Fix | Delete
var containerRef = Object(external_wp_element_["useRef"])();
[21409] Fix | Delete
[21410] Fix | Delete
var _useObservableState = useObservableState(false, onToggle),
[21411] Fix | Delete
_useObservableState2 = Object(slicedToArray["a" /* default */])(_useObservableState, 2),
[21412] Fix | Delete
isOpen = _useObservableState2[0],
[21413] Fix | Delete
setIsOpen = _useObservableState2[1];
[21414] Fix | Delete
[21415] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[21416] Fix | Delete
return function () {
[21417] Fix | Delete
if (onToggle) {
[21418] Fix | Delete
onToggle(false);
[21419] Fix | Delete
}
[21420] Fix | Delete
};
[21421] Fix | Delete
}, []);
[21422] Fix | Delete
[21423] Fix | Delete
function toggle() {
[21424] Fix | Delete
setIsOpen(!isOpen);
[21425] Fix | Delete
}
[21426] Fix | Delete
/**
[21427] Fix | Delete
* Closes the dropdown if a focus leaves the dropdown wrapper. This is
[21428] Fix | Delete
* intentionally distinct from `onClose` since focus loss from the popover
[21429] Fix | Delete
* is expected to occur when using the Dropdown's toggle button, in which
[21430] Fix | Delete
* case the correct behavior is to keep the dropdown closed. The same applies
[21431] Fix | Delete
* in case when focus is moved to the modal dialog.
[21432] Fix | Delete
*/
[21433] Fix | Delete
[21434] Fix | Delete
[21435] Fix | Delete
function closeIfFocusOutside() {
[21436] Fix | Delete
var ownerDocument = containerRef.current.ownerDocument;
[21437] Fix | Delete
[21438] Fix | Delete
if (!containerRef.current.contains(ownerDocument.activeElement) && !ownerDocument.activeElement.closest('[role="dialog"]')) {
[21439] Fix | Delete
close();
[21440] Fix | Delete
}
[21441] Fix | Delete
}
[21442] Fix | Delete
[21443] Fix | Delete
function close() {
[21444] Fix | Delete
if (onClose) {
[21445] Fix | Delete
onClose();
[21446] Fix | Delete
}
[21447] Fix | Delete
[21448] Fix | Delete
setIsOpen(false);
[21449] Fix | Delete
}
[21450] Fix | Delete
[21451] Fix | Delete
var args = {
[21452] Fix | Delete
isOpen: isOpen,
[21453] Fix | Delete
onToggle: toggle,
[21454] Fix | Delete
onClose: close
[21455] Fix | Delete
};
[21456] Fix | Delete
return Object(external_wp_element_["createElement"])("div", {
[21457] Fix | Delete
className: classnames_default()('components-dropdown', className),
[21458] Fix | Delete
ref: containerRef
[21459] Fix | Delete
}, renderToggle(args), isOpen && Object(external_wp_element_["createElement"])(popover["a" /* default */], Object(esm_extends["a" /* default */])({
[21460] Fix | Delete
position: position,
[21461] Fix | Delete
onClose: close,
[21462] Fix | Delete
onFocusOutside: closeIfFocusOutside,
[21463] Fix | Delete
expandOnMobile: expandOnMobile,
[21464] Fix | Delete
headerTitle: headerTitle,
[21465] Fix | Delete
focusOnMount: focusOnMount
[21466] Fix | Delete
}, popoverProps, {
[21467] Fix | Delete
anchorRef: (_popoverProps$anchorR = popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.anchorRef) !== null && _popoverProps$anchorR !== void 0 ? _popoverProps$anchorR : containerRef.current,
[21468] Fix | Delete
className: classnames_default()('components-dropdown__content', popoverProps ? popoverProps.className : undefined, contentClassName)
[21469] Fix | Delete
}), renderContent(args)));
[21470] Fix | Delete
}
[21471] Fix | Delete
[21472] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/circular-option-picker/index.js
[21473] Fix | Delete
[21474] Fix | Delete
[21475] Fix | Delete
[21476] Fix | Delete
[21477] Fix | Delete
/**
[21478] Fix | Delete
* External dependencies
[21479] Fix | Delete
*/
[21480] Fix | Delete
[21481] Fix | Delete
/**
[21482] Fix | Delete
* WordPress dependencies
[21483] Fix | Delete
*/
[21484] Fix | Delete
[21485] Fix | Delete
[21486] Fix | Delete
/**
[21487] Fix | Delete
* Internal dependencies
[21488] Fix | Delete
*/
[21489] Fix | Delete
[21490] Fix | Delete
[21491] Fix | Delete
[21492] Fix | Delete
[21493] Fix | Delete
[21494] Fix | Delete
function Option(_ref) {
[21495] Fix | Delete
var className = _ref.className,
[21496] Fix | Delete
isSelected = _ref.isSelected,
[21497] Fix | Delete
selectedIconProps = _ref.selectedIconProps,
[21498] Fix | Delete
tooltipText = _ref.tooltipText,
[21499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function