Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
});
[37500] Fix | Delete
var termsByParent = Object(external_lodash_["groupBy"])(flatTermsWithParentAndChildren, 'parent');
[37501] Fix | Delete
[37502] Fix | Delete
if (termsByParent.null && termsByParent.null.length) {
[37503] Fix | Delete
return flatTermsWithParentAndChildren;
[37504] Fix | Delete
}
[37505] Fix | Delete
[37506] Fix | Delete
var fillWithChildren = function fillWithChildren(terms) {
[37507] Fix | Delete
return terms.map(function (term) {
[37508] Fix | Delete
var children = termsByParent[term.id];
[37509] Fix | Delete
return terms_objectSpread(terms_objectSpread({}, term), {}, {
[37510] Fix | Delete
children: children && children.length ? fillWithChildren(children) : []
[37511] Fix | Delete
});
[37512] Fix | Delete
});
[37513] Fix | Delete
};
[37514] Fix | Delete
[37515] Fix | Delete
return fillWithChildren(termsByParent['0'] || []);
[37516] Fix | Delete
}
[37517] Fix | Delete
[37518] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tree-select/index.js
[37519] Fix | Delete
[37520] Fix | Delete
[37521] Fix | Delete
[37522] Fix | Delete
[37523] Fix | Delete
[37524] Fix | Delete
/**
[37525] Fix | Delete
* External dependencies
[37526] Fix | Delete
*/
[37527] Fix | Delete
[37528] Fix | Delete
/**
[37529] Fix | Delete
* WordPress dependencies
[37530] Fix | Delete
*/
[37531] Fix | Delete
[37532] Fix | Delete
[37533] Fix | Delete
/**
[37534] Fix | Delete
* Internal dependencies
[37535] Fix | Delete
*/
[37536] Fix | Delete
[37537] Fix | Delete
[37538] Fix | Delete
[37539] Fix | Delete
function tree_select_getSelectOptions(tree) {
[37540] Fix | Delete
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
[37541] Fix | Delete
return Object(external_lodash_["flatMap"])(tree, function (treeNode) {
[37542] Fix | Delete
return [{
[37543] Fix | Delete
value: treeNode.id,
[37544] Fix | Delete
label: Object(external_lodash_["repeat"])("\xA0", level * 3) + Object(external_lodash_["unescape"])(treeNode.name)
[37545] Fix | Delete
}].concat(Object(toConsumableArray["a" /* default */])(tree_select_getSelectOptions(treeNode.children || [], level + 1)));
[37546] Fix | Delete
});
[37547] Fix | Delete
}
[37548] Fix | Delete
[37549] Fix | Delete
function TreeSelect(_ref) {
[37550] Fix | Delete
var label = _ref.label,
[37551] Fix | Delete
noOptionLabel = _ref.noOptionLabel,
[37552] Fix | Delete
onChange = _ref.onChange,
[37553] Fix | Delete
selectedId = _ref.selectedId,
[37554] Fix | Delete
tree = _ref.tree,
[37555] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["label", "noOptionLabel", "onChange", "selectedId", "tree"]);
[37556] Fix | Delete
[37557] Fix | Delete
var options = Object(external_wp_element_["useMemo"])(function () {
[37558] Fix | Delete
return Object(external_lodash_["compact"])([noOptionLabel && {
[37559] Fix | Delete
value: '',
[37560] Fix | Delete
label: noOptionLabel
[37561] Fix | Delete
}].concat(Object(toConsumableArray["a" /* default */])(tree_select_getSelectOptions(tree))));
[37562] Fix | Delete
}, [noOptionLabel, tree]);
[37563] Fix | Delete
return Object(external_wp_element_["createElement"])(select_control, Object(esm_extends["a" /* default */])({
[37564] Fix | Delete
label: label,
[37565] Fix | Delete
options: options,
[37566] Fix | Delete
onChange: onChange
[37567] Fix | Delete
}, {
[37568] Fix | Delete
value: selectedId
[37569] Fix | Delete
}, props));
[37570] Fix | Delete
}
[37571] Fix | Delete
[37572] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/category-select.js
[37573] Fix | Delete
[37574] Fix | Delete
[37575] Fix | Delete
[37576] Fix | Delete
[37577] Fix | Delete
/**
[37578] Fix | Delete
* Internal dependencies
[37579] Fix | Delete
*/
[37580] Fix | Delete
[37581] Fix | Delete
[37582] Fix | Delete
/**
[37583] Fix | Delete
* WordPress dependencies
[37584] Fix | Delete
*/
[37585] Fix | Delete
[37586] Fix | Delete
[37587] Fix | Delete
function CategorySelect(_ref) {
[37588] Fix | Delete
var label = _ref.label,
[37589] Fix | Delete
noOptionLabel = _ref.noOptionLabel,
[37590] Fix | Delete
categoriesList = _ref.categoriesList,
[37591] Fix | Delete
selectedCategoryId = _ref.selectedCategoryId,
[37592] Fix | Delete
onChange = _ref.onChange,
[37593] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["label", "noOptionLabel", "categoriesList", "selectedCategoryId", "onChange"]);
[37594] Fix | Delete
[37595] Fix | Delete
var termsTree = Object(external_wp_element_["useMemo"])(function () {
[37596] Fix | Delete
return buildTermsTree(categoriesList);
[37597] Fix | Delete
}, [categoriesList]);
[37598] Fix | Delete
return Object(external_wp_element_["createElement"])(TreeSelect, Object(esm_extends["a" /* default */])({
[37599] Fix | Delete
label: label,
[37600] Fix | Delete
noOptionLabel: noOptionLabel,
[37601] Fix | Delete
onChange: onChange
[37602] Fix | Delete
}, {
[37603] Fix | Delete
tree: termsTree,
[37604] Fix | Delete
selectedId: selectedCategoryId
[37605] Fix | Delete
}, props));
[37606] Fix | Delete
}
[37607] Fix | Delete
[37608] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/author-select.js
[37609] Fix | Delete
[37610] Fix | Delete
[37611] Fix | Delete
[37612] Fix | Delete
/**
[37613] Fix | Delete
* Internal dependencies
[37614] Fix | Delete
*/
[37615] Fix | Delete
[37616] Fix | Delete
[37617] Fix | Delete
function AuthorSelect(_ref) {
[37618] Fix | Delete
var label = _ref.label,
[37619] Fix | Delete
noOptionLabel = _ref.noOptionLabel,
[37620] Fix | Delete
authorList = _ref.authorList,
[37621] Fix | Delete
selectedAuthorId = _ref.selectedAuthorId,
[37622] Fix | Delete
onChange = _ref.onChange;
[37623] Fix | Delete
if (!authorList) return null;
[37624] Fix | Delete
var termsTree = buildTermsTree(authorList);
[37625] Fix | Delete
return Object(external_wp_element_["createElement"])(TreeSelect, Object(esm_extends["a" /* default */])({
[37626] Fix | Delete
label: label,
[37627] Fix | Delete
noOptionLabel: noOptionLabel,
[37628] Fix | Delete
onChange: onChange
[37629] Fix | Delete
}, {
[37630] Fix | Delete
tree: termsTree,
[37631] Fix | Delete
selectedId: selectedAuthorId
[37632] Fix | Delete
}));
[37633] Fix | Delete
}
[37634] Fix | Delete
[37635] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/index.js
[37636] Fix | Delete
[37637] Fix | Delete
[37638] Fix | Delete
[37639] Fix | Delete
/**
[37640] Fix | Delete
* WordPress dependencies
[37641] Fix | Delete
*/
[37642] Fix | Delete
[37643] Fix | Delete
/**
[37644] Fix | Delete
* Internal dependencies
[37645] Fix | Delete
*/
[37646] Fix | Delete
[37647] Fix | Delete
[37648] Fix | Delete
[37649] Fix | Delete
[37650] Fix | Delete
var DEFAULT_MIN_ITEMS = 1;
[37651] Fix | Delete
var DEFAULT_MAX_ITEMS = 100;
[37652] Fix | Delete
var MAX_CATEGORIES_SUGGESTIONS = 20;
[37653] Fix | Delete
function QueryControls(_ref) {
[37654] Fix | Delete
var authorList = _ref.authorList,
[37655] Fix | Delete
selectedAuthorId = _ref.selectedAuthorId,
[37656] Fix | Delete
categoriesList = _ref.categoriesList,
[37657] Fix | Delete
selectedCategoryId = _ref.selectedCategoryId,
[37658] Fix | Delete
categorySuggestions = _ref.categorySuggestions,
[37659] Fix | Delete
selectedCategories = _ref.selectedCategories,
[37660] Fix | Delete
numberOfItems = _ref.numberOfItems,
[37661] Fix | Delete
order = _ref.order,
[37662] Fix | Delete
orderBy = _ref.orderBy,
[37663] Fix | Delete
_ref$maxItems = _ref.maxItems,
[37664] Fix | Delete
maxItems = _ref$maxItems === void 0 ? DEFAULT_MAX_ITEMS : _ref$maxItems,
[37665] Fix | Delete
_ref$minItems = _ref.minItems,
[37666] Fix | Delete
minItems = _ref$minItems === void 0 ? DEFAULT_MIN_ITEMS : _ref$minItems,
[37667] Fix | Delete
onCategoryChange = _ref.onCategoryChange,
[37668] Fix | Delete
onAuthorChange = _ref.onAuthorChange,
[37669] Fix | Delete
onNumberOfItemsChange = _ref.onNumberOfItemsChange,
[37670] Fix | Delete
onOrderChange = _ref.onOrderChange,
[37671] Fix | Delete
onOrderByChange = _ref.onOrderByChange;
[37672] Fix | Delete
return [onOrderChange && onOrderByChange && Object(external_wp_element_["createElement"])(select_control, {
[37673] Fix | Delete
key: "query-controls-order-select",
[37674] Fix | Delete
label: Object(external_wp_i18n_["__"])('Order by'),
[37675] Fix | Delete
value: "".concat(orderBy, "/").concat(order),
[37676] Fix | Delete
options: [{
[37677] Fix | Delete
label: Object(external_wp_i18n_["__"])('Newest to oldest'),
[37678] Fix | Delete
value: 'date/desc'
[37679] Fix | Delete
}, {
[37680] Fix | Delete
label: Object(external_wp_i18n_["__"])('Oldest to newest'),
[37681] Fix | Delete
value: 'date/asc'
[37682] Fix | Delete
}, {
[37683] Fix | Delete
/* translators: label for ordering posts by title in ascending order */
[37684] Fix | Delete
label: Object(external_wp_i18n_["__"])('A → Z'),
[37685] Fix | Delete
value: 'title/asc'
[37686] Fix | Delete
}, {
[37687] Fix | Delete
/* translators: label for ordering posts by title in descending order */
[37688] Fix | Delete
label: Object(external_wp_i18n_["__"])('Z → A'),
[37689] Fix | Delete
value: 'title/desc'
[37690] Fix | Delete
}],
[37691] Fix | Delete
onChange: function onChange(value) {
[37692] Fix | Delete
var _value$split = value.split('/'),
[37693] Fix | Delete
_value$split2 = Object(slicedToArray["a" /* default */])(_value$split, 2),
[37694] Fix | Delete
newOrderBy = _value$split2[0],
[37695] Fix | Delete
newOrder = _value$split2[1];
[37696] Fix | Delete
[37697] Fix | Delete
if (newOrder !== order) {
[37698] Fix | Delete
onOrderChange(newOrder);
[37699] Fix | Delete
}
[37700] Fix | Delete
[37701] Fix | Delete
if (newOrderBy !== orderBy) {
[37702] Fix | Delete
onOrderByChange(newOrderBy);
[37703] Fix | Delete
}
[37704] Fix | Delete
}
[37705] Fix | Delete
}), categoriesList && onCategoryChange && Object(external_wp_element_["createElement"])(CategorySelect, {
[37706] Fix | Delete
key: "query-controls-category-select",
[37707] Fix | Delete
categoriesList: categoriesList,
[37708] Fix | Delete
label: Object(external_wp_i18n_["__"])('Category'),
[37709] Fix | Delete
noOptionLabel: Object(external_wp_i18n_["__"])('All'),
[37710] Fix | Delete
selectedCategoryId: selectedCategoryId,
[37711] Fix | Delete
onChange: onCategoryChange
[37712] Fix | Delete
}), categorySuggestions && onCategoryChange && Object(external_wp_element_["createElement"])(form_token_field, {
[37713] Fix | Delete
key: "query-controls-categories-select",
[37714] Fix | Delete
label: Object(external_wp_i18n_["__"])('Categories'),
[37715] Fix | Delete
value: selectedCategories && selectedCategories.map(function (item) {
[37716] Fix | Delete
return {
[37717] Fix | Delete
id: item.id,
[37718] Fix | Delete
value: item.name || item.value
[37719] Fix | Delete
};
[37720] Fix | Delete
}),
[37721] Fix | Delete
suggestions: Object.keys(categorySuggestions),
[37722] Fix | Delete
onChange: onCategoryChange,
[37723] Fix | Delete
maxSuggestions: MAX_CATEGORIES_SUGGESTIONS
[37724] Fix | Delete
}), onAuthorChange && Object(external_wp_element_["createElement"])(AuthorSelect, {
[37725] Fix | Delete
key: "query-controls-author-select",
[37726] Fix | Delete
authorList: authorList,
[37727] Fix | Delete
label: Object(external_wp_i18n_["__"])('Author'),
[37728] Fix | Delete
noOptionLabel: Object(external_wp_i18n_["__"])('All'),
[37729] Fix | Delete
selectedAuthorId: selectedAuthorId,
[37730] Fix | Delete
onChange: onAuthorChange
[37731] Fix | Delete
}), onNumberOfItemsChange && Object(external_wp_element_["createElement"])(range_control, {
[37732] Fix | Delete
key: "query-controls-range-control",
[37733] Fix | Delete
label: Object(external_wp_i18n_["__"])('Number of items'),
[37734] Fix | Delete
value: numberOfItems,
[37735] Fix | Delete
onChange: onNumberOfItemsChange,
[37736] Fix | Delete
min: minItems,
[37737] Fix | Delete
max: maxItems,
[37738] Fix | Delete
required: true
[37739] Fix | Delete
})];
[37740] Fix | Delete
}
[37741] Fix | Delete
[37742] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/node_modules/reakit-warning/es/warning.js
[37743] Fix | Delete
var warning = __webpack_require__("JKGo");
[37744] Fix | Delete
[37745] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/__keys-d251e56b.js
[37746] Fix | Delete
// Automatically generated
[37747] Fix | Delete
var RADIO_STATE_KEYS = ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "state", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "setState"];
[37748] Fix | Delete
var RADIO_KEYS = [].concat(RADIO_STATE_KEYS, ["value", "checked", "unstable_checkOnFocus"]);
[37749] Fix | Delete
var RADIO_GROUP_KEYS = RADIO_STATE_KEYS;
[37750] Fix | Delete
[37751] Fix | Delete
[37752] Fix | Delete
[37753] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/Radio/Radio.js
[37754] Fix | Delete
[37755] Fix | Delete
[37756] Fix | Delete
[37757] Fix | Delete
[37758] Fix | Delete
[37759] Fix | Delete
[37760] Fix | Delete
[37761] Fix | Delete
[37762] Fix | Delete
[37763] Fix | Delete
[37764] Fix | Delete
[37765] Fix | Delete
[37766] Fix | Delete
[37767] Fix | Delete
[37768] Fix | Delete
[37769] Fix | Delete
[37770] Fix | Delete
[37771] Fix | Delete
[37772] Fix | Delete
[37773] Fix | Delete
[37774] Fix | Delete
[37775] Fix | Delete
[37776] Fix | Delete
[37777] Fix | Delete
[37778] Fix | Delete
[37779] Fix | Delete
[37780] Fix | Delete
[37781] Fix | Delete
[37782] Fix | Delete
[37783] Fix | Delete
[37784] Fix | Delete
[37785] Fix | Delete
[37786] Fix | Delete
[37787] Fix | Delete
function getChecked(options) {
[37788] Fix | Delete
if (typeof options.checked !== "undefined") {
[37789] Fix | Delete
return options.checked;
[37790] Fix | Delete
}
[37791] Fix | Delete
[37792] Fix | Delete
return typeof options.value !== "undefined" && options.state === options.value;
[37793] Fix | Delete
}
[37794] Fix | Delete
[37795] Fix | Delete
function useInitialChecked(options) {
[37796] Fix | Delete
var _React$useState = Object(external_React_["useState"])(function () {
[37797] Fix | Delete
return getChecked(options);
[37798] Fix | Delete
}),
[37799] Fix | Delete
initialChecked = _React$useState[0];
[37800] Fix | Delete
[37801] Fix | Delete
var _React$useState2 = Object(external_React_["useState"])(options.currentId),
[37802] Fix | Delete
initialCurrentId = _React$useState2[0];
[37803] Fix | Delete
[37804] Fix | Delete
var id = options.id,
[37805] Fix | Delete
setCurrentId = options.setCurrentId;
[37806] Fix | Delete
Object(external_React_["useEffect"])(function () {
[37807] Fix | Delete
if (initialChecked && id && initialCurrentId !== id) {
[37808] Fix | Delete
setCurrentId === null || setCurrentId === void 0 ? void 0 : setCurrentId(id);
[37809] Fix | Delete
}
[37810] Fix | Delete
}, [initialChecked, id, setCurrentId, initialCurrentId]);
[37811] Fix | Delete
}
[37812] Fix | Delete
[37813] Fix | Delete
function fireChange(element, onChange) {
[37814] Fix | Delete
var event = Object(createEvent["a" /* createEvent */])(element, "change");
[37815] Fix | Delete
Object.defineProperties(event, {
[37816] Fix | Delete
type: {
[37817] Fix | Delete
value: "change"
[37818] Fix | Delete
},
[37819] Fix | Delete
target: {
[37820] Fix | Delete
value: element
[37821] Fix | Delete
},
[37822] Fix | Delete
currentTarget: {
[37823] Fix | Delete
value: element
[37824] Fix | Delete
}
[37825] Fix | Delete
});
[37826] Fix | Delete
onChange === null || onChange === void 0 ? void 0 : onChange(event);
[37827] Fix | Delete
}
[37828] Fix | Delete
[37829] Fix | Delete
var useRadio = Object(createHook["a" /* createHook */])({
[37830] Fix | Delete
name: "Radio",
[37831] Fix | Delete
compose: CompositeItem["b" /* useCompositeItem */],
[37832] Fix | Delete
keys: RADIO_KEYS,
[37833] Fix | Delete
useOptions: function useOptions(_ref, _ref2) {
[37834] Fix | Delete
var _options$value;
[37835] Fix | Delete
[37836] Fix | Delete
var value = _ref2.value,
[37837] Fix | Delete
checked = _ref2.checked;
[37838] Fix | Delete
[37839] Fix | Delete
var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,
[37840] Fix | Delete
unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? false : _ref$unstable_clickOn,
[37841] Fix | Delete
_ref$unstable_checkOn = _ref.unstable_checkOnFocus,
[37842] Fix | Delete
unstable_checkOnFocus = _ref$unstable_checkOn === void 0 ? true : _ref$unstable_checkOn,
[37843] Fix | Delete
options = Object(_rollupPluginBabelHelpers_1f0bf8c2["a" /* _ */])(_ref, ["unstable_clickOnEnter", "unstable_checkOnFocus"]);
[37844] Fix | Delete
[37845] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({
[37846] Fix | Delete
checked: checked,
[37847] Fix | Delete
unstable_clickOnEnter: unstable_clickOnEnter,
[37848] Fix | Delete
unstable_checkOnFocus: unstable_checkOnFocus
[37849] Fix | Delete
}, options), {}, {
[37850] Fix | Delete
value: (_options$value = options.value) != null ? _options$value : value
[37851] Fix | Delete
});
[37852] Fix | Delete
},
[37853] Fix | Delete
useProps: function useProps(options, _ref3) {
[37854] Fix | Delete
var htmlRef = _ref3.ref,
[37855] Fix | Delete
htmlOnChange = _ref3.onChange,
[37856] Fix | Delete
htmlOnClick = _ref3.onClick,
[37857] Fix | Delete
htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2["a" /* _ */])(_ref3, ["ref", "onChange", "onClick"]);
[37858] Fix | Delete
[37859] Fix | Delete
var ref = Object(external_React_["useRef"])(null);
[37860] Fix | Delete
[37861] Fix | Delete
var _React$useState3 = Object(external_React_["useState"])(true),
[37862] Fix | Delete
isNativeRadio = _React$useState3[0],
[37863] Fix | Delete
setIsNativeRadio = _React$useState3[1];
[37864] Fix | Delete
[37865] Fix | Delete
var checked = getChecked(options);
[37866] Fix | Delete
var isCurrentItemRef = Object(useLiveRef["a" /* useLiveRef */])(options.currentId === options.id);
[37867] Fix | Delete
var onChangeRef = Object(useLiveRef["a" /* useLiveRef */])(htmlOnChange);
[37868] Fix | Delete
var onClickRef = Object(useLiveRef["a" /* useLiveRef */])(htmlOnClick);
[37869] Fix | Delete
useInitialChecked(options);
[37870] Fix | Delete
Object(external_React_["useEffect"])(function () {
[37871] Fix | Delete
var element = ref.current;
[37872] Fix | Delete
[37873] Fix | Delete
if (!element) {
[37874] Fix | Delete
false ? undefined : void 0;
[37875] Fix | Delete
return;
[37876] Fix | Delete
}
[37877] Fix | Delete
[37878] Fix | Delete
if (element.tagName !== "INPUT" || element.type !== "radio") {
[37879] Fix | Delete
setIsNativeRadio(false);
[37880] Fix | Delete
}
[37881] Fix | Delete
}, []);
[37882] Fix | Delete
var onChange = Object(external_React_["useCallback"])(function (event) {
[37883] Fix | Delete
var _onChangeRef$current, _options$setState;
[37884] Fix | Delete
[37885] Fix | Delete
(_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call(onChangeRef, event);
[37886] Fix | Delete
if (event.defaultPrevented) return;
[37887] Fix | Delete
if (options.disabled) return;
[37888] Fix | Delete
(_options$setState = options.setState) === null || _options$setState === void 0 ? void 0 : _options$setState.call(options, options.value);
[37889] Fix | Delete
}, [options.disabled, options.setState, options.value]);
[37890] Fix | Delete
var onClick = Object(external_React_["useCallback"])(function (event) {
[37891] Fix | Delete
var _onClickRef$current;
[37892] Fix | Delete
[37893] Fix | Delete
(_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);
[37894] Fix | Delete
if (event.defaultPrevented) return;
[37895] Fix | Delete
if (isNativeRadio) return;
[37896] Fix | Delete
fireChange(event.currentTarget, onChange);
[37897] Fix | Delete
}, [onChange, isNativeRadio]);
[37898] Fix | Delete
Object(external_React_["useEffect"])(function () {
[37899] Fix | Delete
var element = ref.current;
[37900] Fix | Delete
if (!element) return;
[37901] Fix | Delete
[37902] Fix | Delete
if (options.unstable_moves && isCurrentItemRef.current && options.unstable_checkOnFocus) {
[37903] Fix | Delete
fireChange(element, onChange);
[37904] Fix | Delete
}
[37905] Fix | Delete
}, [options.unstable_moves, options.unstable_checkOnFocus, onChange]);
[37906] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({
[37907] Fix | Delete
ref: Object(useForkRef["a" /* useForkRef */])(ref, htmlRef),
[37908] Fix | Delete
role: !isNativeRadio ? "radio" : undefined,
[37909] Fix | Delete
type: isNativeRadio ? "radio" : undefined,
[37910] Fix | Delete
value: isNativeRadio ? options.value : undefined,
[37911] Fix | Delete
name: isNativeRadio ? options.baseId : undefined,
[37912] Fix | Delete
"aria-checked": checked,
[37913] Fix | Delete
checked: checked,
[37914] Fix | Delete
onChange: onChange,
[37915] Fix | Delete
onClick: onClick
[37916] Fix | Delete
}, htmlProps);
[37917] Fix | Delete
}
[37918] Fix | Delete
});
[37919] Fix | Delete
var Radio = Object(createComponent["a" /* createComponent */])({
[37920] Fix | Delete
as: "input",
[37921] Fix | Delete
memo: true,
[37922] Fix | Delete
useHook: useRadio
[37923] Fix | Delete
});
[37924] Fix | Delete
[37925] Fix | Delete
[37926] Fix | Delete
[37927] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-context/index.js
[37928] Fix | Delete
/**
[37929] Fix | Delete
* WordPress dependencies
[37930] Fix | Delete
*/
[37931] Fix | Delete
[37932] Fix | Delete
var RadioContext = Object(external_wp_element_["createContext"])({
[37933] Fix | Delete
state: null,
[37934] Fix | Delete
setState: function setState() {}
[37935] Fix | Delete
});
[37936] Fix | Delete
/* harmony default export */ var radio_context = (RadioContext);
[37937] Fix | Delete
[37938] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio/index.js
[37939] Fix | Delete
[37940] Fix | Delete
[37941] Fix | Delete
[37942] Fix | Delete
[37943] Fix | Delete
/**
[37944] Fix | Delete
* External dependencies
[37945] Fix | Delete
*/
[37946] Fix | Delete
[37947] Fix | Delete
/**
[37948] Fix | Delete
* WordPress dependencies
[37949] Fix | Delete
*/
[37950] Fix | Delete
[37951] Fix | Delete
[37952] Fix | Delete
/**
[37953] Fix | Delete
* Internal dependencies
[37954] Fix | Delete
*/
[37955] Fix | Delete
[37956] Fix | Delete
[37957] Fix | Delete
[37958] Fix | Delete
[37959] Fix | Delete
function radio_Radio(_ref, ref) {
[37960] Fix | Delete
var children = _ref.children,
[37961] Fix | Delete
value = _ref.value,
[37962] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["children", "value"]);
[37963] Fix | Delete
[37964] Fix | Delete
var radioContext = Object(external_wp_element_["useContext"])(radio_context);
[37965] Fix | Delete
var checked = radioContext.state === value;
[37966] Fix | Delete
return Object(external_wp_element_["createElement"])(Radio, Object(esm_extends["a" /* default */])({
[37967] Fix | Delete
ref: ref,
[37968] Fix | Delete
as: build_module_button["a" /* default */],
[37969] Fix | Delete
isPrimary: checked,
[37970] Fix | Delete
isSecondary: !checked,
[37971] Fix | Delete
value: value
[37972] Fix | Delete
}, radioContext, props), children || value);
[37973] Fix | Delete
}
[37974] Fix | Delete
[37975] Fix | Delete
/* harmony default export */ var build_module_radio = (Object(external_wp_element_["forwardRef"])(radio_Radio));
[37976] Fix | Delete
[37977] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/Radio/RadioState.js
[37978] Fix | Delete
[37979] Fix | Delete
[37980] Fix | Delete
[37981] Fix | Delete
[37982] Fix | Delete
[37983] Fix | Delete
[37984] Fix | Delete
[37985] Fix | Delete
[37986] Fix | Delete
[37987] Fix | Delete
[37988] Fix | Delete
[37989] Fix | Delete
[37990] Fix | Delete
[37991] Fix | Delete
function useRadioState(initialState) {
[37992] Fix | Delete
if (initialState === void 0) {
[37993] Fix | Delete
initialState = {};
[37994] Fix | Delete
}
[37995] Fix | Delete
[37996] Fix | Delete
var _useSealedState = useSealedState(initialState),
[37997] Fix | Delete
initialValue = _useSealedState.state,
[37998] Fix | Delete
_useSealedState$loop = _useSealedState.loop,
[37999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function