Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-editor.js
function getSpacingPresetCssVar(value) {
[18500] Fix | Delete
if (!value) {
[18501] Fix | Delete
return;
[18502] Fix | Delete
}
[18503] Fix | Delete
const slug = value.match(/var:preset\|spacing\|(.+)/);
[18504] Fix | Delete
if (!slug) {
[18505] Fix | Delete
return value;
[18506] Fix | Delete
}
[18507] Fix | Delete
return `var(--wp--preset--spacing--${slug[1]})`;
[18508] Fix | Delete
}
[18509] Fix | Delete
[18510] Fix | Delete
/**
[18511] Fix | Delete
* Returns the slug section of the given spacing preset string.
[18512] Fix | Delete
*
[18513] Fix | Delete
* @param {string} value Value to extract slug from.
[18514] Fix | Delete
*
[18515] Fix | Delete
* @return {string|undefined} The int value of the slug from given spacing preset.
[18516] Fix | Delete
*/
[18517] Fix | Delete
function getSpacingPresetSlug(value) {
[18518] Fix | Delete
if (!value) {
[18519] Fix | Delete
return;
[18520] Fix | Delete
}
[18521] Fix | Delete
if (value === '0' || value === 'default') {
[18522] Fix | Delete
return value;
[18523] Fix | Delete
}
[18524] Fix | Delete
const slug = value.match(/var:preset\|spacing\|(.+)/);
[18525] Fix | Delete
return slug ? slug[1] : undefined;
[18526] Fix | Delete
}
[18527] Fix | Delete
[18528] Fix | Delete
/**
[18529] Fix | Delete
* Converts spacing preset value into a Range component value .
[18530] Fix | Delete
*
[18531] Fix | Delete
* @param {string} presetValue Value to convert to Range value.
[18532] Fix | Delete
* @param {Array} spacingSizes Array of current spacing preset value objects.
[18533] Fix | Delete
*
[18534] Fix | Delete
* @return {number} The int value for use in Range control.
[18535] Fix | Delete
*/
[18536] Fix | Delete
function getSliderValueFromPreset(presetValue, spacingSizes) {
[18537] Fix | Delete
if (presetValue === undefined) {
[18538] Fix | Delete
return 0;
[18539] Fix | Delete
}
[18540] Fix | Delete
const slug = parseFloat(presetValue, 10) === 0 ? '0' : getSpacingPresetSlug(presetValue);
[18541] Fix | Delete
const sliderValue = spacingSizes.findIndex(spacingSize => {
[18542] Fix | Delete
return String(spacingSize.slug) === slug;
[18543] Fix | Delete
});
[18544] Fix | Delete
[18545] Fix | Delete
// Returning NaN rather than undefined as undefined makes range control thumb sit in center
[18546] Fix | Delete
return sliderValue !== -1 ? sliderValue : NaN;
[18547] Fix | Delete
}
[18548] Fix | Delete
[18549] Fix | Delete
/**
[18550] Fix | Delete
* Gets an items with the most occurrence within an array
[18551] Fix | Delete
* https://stackoverflow.com/a/20762713
[18552] Fix | Delete
*
[18553] Fix | Delete
* @param {Array<any>} arr Array of items to check.
[18554] Fix | Delete
* @return {any} The item with the most occurrences.
[18555] Fix | Delete
*/
[18556] Fix | Delete
function mode(arr) {
[18557] Fix | Delete
return arr.sort((a, b) => arr.filter(v => v === a).length - arr.filter(v => v === b).length).pop();
[18558] Fix | Delete
}
[18559] Fix | Delete
[18560] Fix | Delete
/**
[18561] Fix | Delete
* Gets the 'all' input value from values data.
[18562] Fix | Delete
*
[18563] Fix | Delete
* @param {Object} values Box spacing values
[18564] Fix | Delete
*
[18565] Fix | Delete
* @return {string} The most common value from all sides of box.
[18566] Fix | Delete
*/
[18567] Fix | Delete
function getAllRawValue(values = {}) {
[18568] Fix | Delete
return mode(Object.values(values));
[18569] Fix | Delete
}
[18570] Fix | Delete
[18571] Fix | Delete
/**
[18572] Fix | Delete
* Checks to determine if values are mixed.
[18573] Fix | Delete
*
[18574] Fix | Delete
* @param {Object} values Box values.
[18575] Fix | Delete
* @param {Array} sides Sides that values relate to.
[18576] Fix | Delete
*
[18577] Fix | Delete
* @return {boolean} Whether values are mixed.
[18578] Fix | Delete
*/
[18579] Fix | Delete
function isValuesMixed(values = {}, sides = ALL_SIDES) {
[18580] Fix | Delete
return Object.values(values).length >= 1 && Object.values(values).length < sides.length || new Set(Object.values(values)).size > 1;
[18581] Fix | Delete
}
[18582] Fix | Delete
[18583] Fix | Delete
/**
[18584] Fix | Delete
* Checks to determine if values are defined.
[18585] Fix | Delete
*
[18586] Fix | Delete
* @param {Object} values Box values.
[18587] Fix | Delete
*
[18588] Fix | Delete
* @return {boolean} Whether values are defined.
[18589] Fix | Delete
*/
[18590] Fix | Delete
function isValuesDefined(values) {
[18591] Fix | Delete
if (values === undefined || values === null) {
[18592] Fix | Delete
return false;
[18593] Fix | Delete
}
[18594] Fix | Delete
return Object.values(values).filter(value => !!value).length > 0;
[18595] Fix | Delete
}
[18596] Fix | Delete
[18597] Fix | Delete
/**
[18598] Fix | Delete
* Determines whether a particular axis has support. If no axis is
[18599] Fix | Delete
* specified, this function checks if either axis is supported.
[18600] Fix | Delete
*
[18601] Fix | Delete
* @param {Array} sides Supported sides.
[18602] Fix | Delete
* @param {string} axis Which axis to check.
[18603] Fix | Delete
*
[18604] Fix | Delete
* @return {boolean} Whether there is support for the specified axis or both axes.
[18605] Fix | Delete
*/
[18606] Fix | Delete
function hasAxisSupport(sides, axis) {
[18607] Fix | Delete
if (!sides || !sides.length) {
[18608] Fix | Delete
return false;
[18609] Fix | Delete
}
[18610] Fix | Delete
const hasHorizontalSupport = sides.includes('horizontal') || sides.includes('left') && sides.includes('right');
[18611] Fix | Delete
const hasVerticalSupport = sides.includes('vertical') || sides.includes('top') && sides.includes('bottom');
[18612] Fix | Delete
if (axis === 'horizontal') {
[18613] Fix | Delete
return hasHorizontalSupport;
[18614] Fix | Delete
}
[18615] Fix | Delete
if (axis === 'vertical') {
[18616] Fix | Delete
return hasVerticalSupport;
[18617] Fix | Delete
}
[18618] Fix | Delete
return hasHorizontalSupport || hasVerticalSupport;
[18619] Fix | Delete
}
[18620] Fix | Delete
[18621] Fix | Delete
/**
[18622] Fix | Delete
* Determines which menu options should be included in the SidePicker.
[18623] Fix | Delete
*
[18624] Fix | Delete
* @param {Array} sides Supported sides.
[18625] Fix | Delete
*
[18626] Fix | Delete
* @return {Object} Menu options with each option containing label & icon.
[18627] Fix | Delete
*/
[18628] Fix | Delete
function getSupportedMenuItems(sides) {
[18629] Fix | Delete
if (!sides || !sides.length) {
[18630] Fix | Delete
return {};
[18631] Fix | Delete
}
[18632] Fix | Delete
const menuItems = {};
[18633] Fix | Delete
[18634] Fix | Delete
// Determine the primary "side" menu options.
[18635] Fix | Delete
const hasHorizontalSupport = hasAxisSupport(sides, 'horizontal');
[18636] Fix | Delete
const hasVerticalSupport = hasAxisSupport(sides, 'vertical');
[18637] Fix | Delete
if (hasHorizontalSupport && hasVerticalSupport) {
[18638] Fix | Delete
menuItems.axial = {
[18639] Fix | Delete
label: LABELS.axial,
[18640] Fix | Delete
icon: ICONS.axial
[18641] Fix | Delete
};
[18642] Fix | Delete
} else if (hasHorizontalSupport) {
[18643] Fix | Delete
menuItems.axial = {
[18644] Fix | Delete
label: LABELS.horizontal,
[18645] Fix | Delete
icon: ICONS.horizontal
[18646] Fix | Delete
};
[18647] Fix | Delete
} else if (hasVerticalSupport) {
[18648] Fix | Delete
menuItems.axial = {
[18649] Fix | Delete
label: LABELS.vertical,
[18650] Fix | Delete
icon: ICONS.vertical
[18651] Fix | Delete
};
[18652] Fix | Delete
}
[18653] Fix | Delete
[18654] Fix | Delete
// Track whether we have any individual sides so we can omit the custom
[18655] Fix | Delete
// option if required.
[18656] Fix | Delete
let numberOfIndividualSides = 0;
[18657] Fix | Delete
ALL_SIDES.forEach(side => {
[18658] Fix | Delete
if (sides.includes(side)) {
[18659] Fix | Delete
numberOfIndividualSides += 1;
[18660] Fix | Delete
menuItems[side] = {
[18661] Fix | Delete
label: LABELS[side],
[18662] Fix | Delete
icon: ICONS[side]
[18663] Fix | Delete
};
[18664] Fix | Delete
}
[18665] Fix | Delete
});
[18666] Fix | Delete
[18667] Fix | Delete
// Add custom item if there are enough sides to warrant a separated view.
[18668] Fix | Delete
if (numberOfIndividualSides > 1) {
[18669] Fix | Delete
menuItems.custom = {
[18670] Fix | Delete
label: LABELS.custom,
[18671] Fix | Delete
icon: ICONS.custom
[18672] Fix | Delete
};
[18673] Fix | Delete
}
[18674] Fix | Delete
return menuItems;
[18675] Fix | Delete
}
[18676] Fix | Delete
[18677] Fix | Delete
/**
[18678] Fix | Delete
* Checks if the supported sides are balanced for each axis.
[18679] Fix | Delete
* - Horizontal - both left and right sides are supported.
[18680] Fix | Delete
* - Vertical - both top and bottom are supported.
[18681] Fix | Delete
*
[18682] Fix | Delete
* @param {Array} sides The supported sides which may be axes as well.
[18683] Fix | Delete
*
[18684] Fix | Delete
* @return {boolean} Whether or not the supported sides are balanced.
[18685] Fix | Delete
*/
[18686] Fix | Delete
function hasBalancedSidesSupport(sides = []) {
[18687] Fix | Delete
const counts = {
[18688] Fix | Delete
top: 0,
[18689] Fix | Delete
right: 0,
[18690] Fix | Delete
bottom: 0,
[18691] Fix | Delete
left: 0
[18692] Fix | Delete
};
[18693] Fix | Delete
sides.forEach(side => counts[side] += 1);
[18694] Fix | Delete
return (counts.top + counts.bottom) % 2 === 0 && (counts.left + counts.right) % 2 === 0;
[18695] Fix | Delete
}
[18696] Fix | Delete
[18697] Fix | Delete
/**
[18698] Fix | Delete
* Determines which view the SpacingSizesControl should default to on its
[18699] Fix | Delete
* first render; Axial, Custom, or Single side.
[18700] Fix | Delete
*
[18701] Fix | Delete
* @param {Object} values Current side values.
[18702] Fix | Delete
* @param {Array} sides Supported sides.
[18703] Fix | Delete
*
[18704] Fix | Delete
* @return {string} View to display.
[18705] Fix | Delete
*/
[18706] Fix | Delete
function getInitialView(values = {}, sides) {
[18707] Fix | Delete
const {
[18708] Fix | Delete
top,
[18709] Fix | Delete
right,
[18710] Fix | Delete
bottom,
[18711] Fix | Delete
left
[18712] Fix | Delete
} = values;
[18713] Fix | Delete
const sideValues = [top, right, bottom, left].filter(Boolean);
[18714] Fix | Delete
[18715] Fix | Delete
// Axial ( Horizontal & vertical ).
[18716] Fix | Delete
// - Has axial side support
[18717] Fix | Delete
// - Has axial side values which match
[18718] Fix | Delete
// - Has no values and the supported sides are balanced
[18719] Fix | Delete
const hasMatchingAxialValues = top === bottom && left === right && (!!top || !!left);
[18720] Fix | Delete
const hasNoValuesAndBalancedSides = !sideValues.length && hasBalancedSidesSupport(sides);
[18721] Fix | Delete
if (hasAxisSupport(sides) && (hasMatchingAxialValues || hasNoValuesAndBalancedSides)) {
[18722] Fix | Delete
return VIEWS.axial;
[18723] Fix | Delete
}
[18724] Fix | Delete
[18725] Fix | Delete
// Single side.
[18726] Fix | Delete
// - Ensure the side returned is the first side that has a value.
[18727] Fix | Delete
if (sideValues.length === 1) {
[18728] Fix | Delete
let side;
[18729] Fix | Delete
Object.entries(values).some(([key, value]) => {
[18730] Fix | Delete
side = key;
[18731] Fix | Delete
return value !== undefined;
[18732] Fix | Delete
});
[18733] Fix | Delete
return side;
[18734] Fix | Delete
}
[18735] Fix | Delete
[18736] Fix | Delete
// Only single side supported and no value defined.
[18737] Fix | Delete
if (sides?.length === 1 && !sideValues.length) {
[18738] Fix | Delete
return sides[0];
[18739] Fix | Delete
}
[18740] Fix | Delete
[18741] Fix | Delete
// Default to the Custom (separated sides) view.
[18742] Fix | Delete
return VIEWS.custom;
[18743] Fix | Delete
}
[18744] Fix | Delete
[18745] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/gap.js
[18746] Fix | Delete
/**
[18747] Fix | Delete
* Internal dependencies
[18748] Fix | Delete
*/
[18749] Fix | Delete
[18750] Fix | Delete
[18751] Fix | Delete
/**
[18752] Fix | Delete
* Returns a BoxControl object value from a given blockGap style value.
[18753] Fix | Delete
* The string check is for backwards compatibility before Gutenberg supported
[18754] Fix | Delete
* split gap values (row and column) and the value was a string n + unit.
[18755] Fix | Delete
*
[18756] Fix | Delete
* @param {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.
[18757] Fix | Delete
* @return {Object|null} A value to pass to the BoxControl component.
[18758] Fix | Delete
*/
[18759] Fix | Delete
function getGapBoxControlValueFromStyle(blockGapValue) {
[18760] Fix | Delete
if (!blockGapValue) {
[18761] Fix | Delete
return null;
[18762] Fix | Delete
}
[18763] Fix | Delete
const isValueString = typeof blockGapValue === 'string';
[18764] Fix | Delete
return {
[18765] Fix | Delete
top: isValueString ? blockGapValue : blockGapValue?.top,
[18766] Fix | Delete
left: isValueString ? blockGapValue : blockGapValue?.left
[18767] Fix | Delete
};
[18768] Fix | Delete
}
[18769] Fix | Delete
[18770] Fix | Delete
/**
[18771] Fix | Delete
* Returns a CSS value for the `gap` property from a given blockGap style.
[18772] Fix | Delete
*
[18773] Fix | Delete
* @param {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.
[18774] Fix | Delete
* @param {string?} defaultValue A default gap value.
[18775] Fix | Delete
* @return {string|null} The concatenated gap value (row and column).
[18776] Fix | Delete
*/
[18777] Fix | Delete
function getGapCSSValue(blockGapValue, defaultValue = '0') {
[18778] Fix | Delete
const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
[18779] Fix | Delete
if (!blockGapBoxControlValue) {
[18780] Fix | Delete
return null;
[18781] Fix | Delete
}
[18782] Fix | Delete
const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue;
[18783] Fix | Delete
const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue;
[18784] Fix | Delete
return row === column ? row : `${row} ${column}`;
[18785] Fix | Delete
}
[18786] Fix | Delete
[18787] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/icons.js
[18788] Fix | Delete
/**
[18789] Fix | Delete
* WordPress dependencies
[18790] Fix | Delete
*/
[18791] Fix | Delete
[18792] Fix | Delete
[18793] Fix | Delete
const alignBottom = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[18794] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18795] Fix | Delete
viewBox: "0 0 24 24",
[18796] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[18797] Fix | Delete
d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"
[18798] Fix | Delete
})
[18799] Fix | Delete
});
[18800] Fix | Delete
const alignCenter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[18801] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18802] Fix | Delete
viewBox: "0 0 24 24",
[18803] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[18804] Fix | Delete
d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
[18805] Fix | Delete
})
[18806] Fix | Delete
});
[18807] Fix | Delete
const alignTop = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[18808] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18809] Fix | Delete
viewBox: "0 0 24 24",
[18810] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[18811] Fix | Delete
d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z"
[18812] Fix | Delete
})
[18813] Fix | Delete
});
[18814] Fix | Delete
const alignStretch = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[18815] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18816] Fix | Delete
viewBox: "0 0 24 24",
[18817] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[18818] Fix | Delete
d: "M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"
[18819] Fix | Delete
})
[18820] Fix | Delete
});
[18821] Fix | Delete
const spaceBetween = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[18822] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18823] Fix | Delete
viewBox: "0 0 24 24",
[18824] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[18825] Fix | Delete
d: "M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"
[18826] Fix | Delete
})
[18827] Fix | Delete
});
[18828] Fix | Delete
[18829] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/ui.js
[18830] Fix | Delete
/**
[18831] Fix | Delete
* WordPress dependencies
[18832] Fix | Delete
*/
[18833] Fix | Delete
[18834] Fix | Delete
[18835] Fix | Delete
[18836] Fix | Delete
/**
[18837] Fix | Delete
* Internal dependencies
[18838] Fix | Delete
*/
[18839] Fix | Delete
[18840] Fix | Delete
[18841] Fix | Delete
const BLOCK_ALIGNMENTS_CONTROLS = {
[18842] Fix | Delete
top: {
[18843] Fix | Delete
icon: alignTop,
[18844] Fix | Delete
title: (0,external_wp_i18n_namespaceObject._x)('Align top', 'Block vertical alignment setting')
[18845] Fix | Delete
},
[18846] Fix | Delete
center: {
[18847] Fix | Delete
icon: alignCenter,
[18848] Fix | Delete
title: (0,external_wp_i18n_namespaceObject._x)('Align middle', 'Block vertical alignment setting')
[18849] Fix | Delete
},
[18850] Fix | Delete
bottom: {
[18851] Fix | Delete
icon: alignBottom,
[18852] Fix | Delete
title: (0,external_wp_i18n_namespaceObject._x)('Align bottom', 'Block vertical alignment setting')
[18853] Fix | Delete
},
[18854] Fix | Delete
stretch: {
[18855] Fix | Delete
icon: alignStretch,
[18856] Fix | Delete
title: (0,external_wp_i18n_namespaceObject._x)('Stretch to fill', 'Block vertical alignment setting')
[18857] Fix | Delete
},
[18858] Fix | Delete
'space-between': {
[18859] Fix | Delete
icon: spaceBetween,
[18860] Fix | Delete
title: (0,external_wp_i18n_namespaceObject._x)('Space between', 'Block vertical alignment setting')
[18861] Fix | Delete
}
[18862] Fix | Delete
};
[18863] Fix | Delete
const DEFAULT_CONTROLS = ['top', 'center', 'bottom'];
[18864] Fix | Delete
const DEFAULT_CONTROL = 'top';
[18865] Fix | Delete
function BlockVerticalAlignmentUI({
[18866] Fix | Delete
value,
[18867] Fix | Delete
onChange,
[18868] Fix | Delete
controls = DEFAULT_CONTROLS,
[18869] Fix | Delete
isCollapsed = true,
[18870] Fix | Delete
isToolbar
[18871] Fix | Delete
}) {
[18872] Fix | Delete
function applyOrUnset(align) {
[18873] Fix | Delete
return () => onChange(value === align ? undefined : align);
[18874] Fix | Delete
}
[18875] Fix | Delete
const activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[value];
[18876] Fix | Delete
const defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[DEFAULT_CONTROL];
[18877] Fix | Delete
const UIComponent = isToolbar ? external_wp_components_namespaceObject.ToolbarGroup : external_wp_components_namespaceObject.ToolbarDropdownMenu;
[18878] Fix | Delete
const extraProps = isToolbar ? {
[18879] Fix | Delete
isCollapsed
[18880] Fix | Delete
} : {};
[18881] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UIComponent, {
[18882] Fix | Delete
icon: activeAlignment ? activeAlignment.icon : defaultAlignmentControl.icon,
[18883] Fix | Delete
label: (0,external_wp_i18n_namespaceObject._x)('Change vertical alignment', 'Block vertical alignment setting label'),
[18884] Fix | Delete
controls: controls.map(control => {
[18885] Fix | Delete
return {
[18886] Fix | Delete
...BLOCK_ALIGNMENTS_CONTROLS[control],
[18887] Fix | Delete
isActive: value === control,
[18888] Fix | Delete
role: isCollapsed ? 'menuitemradio' : undefined,
[18889] Fix | Delete
onClick: applyOrUnset(control)
[18890] Fix | Delete
};
[18891] Fix | Delete
}),
[18892] Fix | Delete
...extraProps
[18893] Fix | Delete
});
[18894] Fix | Delete
}
[18895] Fix | Delete
[18896] Fix | Delete
/**
[18897] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md
[18898] Fix | Delete
*/
[18899] Fix | Delete
/* harmony default export */ const ui = (BlockVerticalAlignmentUI);
[18900] Fix | Delete
[18901] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/index.js
[18902] Fix | Delete
/**
[18903] Fix | Delete
* Internal dependencies
[18904] Fix | Delete
*/
[18905] Fix | Delete
[18906] Fix | Delete
[18907] Fix | Delete
const BlockVerticalAlignmentControl = props => {
[18908] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ui, {
[18909] Fix | Delete
...props,
[18910] Fix | Delete
isToolbar: false
[18911] Fix | Delete
});
[18912] Fix | Delete
};
[18913] Fix | Delete
const BlockVerticalAlignmentToolbar = props => {
[18914] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ui, {
[18915] Fix | Delete
...props,
[18916] Fix | Delete
isToolbar: true
[18917] Fix | Delete
});
[18918] Fix | Delete
};
[18919] Fix | Delete
[18920] Fix | Delete
/**
[18921] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md
[18922] Fix | Delete
*/
[18923] Fix | Delete
[18924] Fix | Delete
[18925] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/justify-content-control/ui.js
[18926] Fix | Delete
/**
[18927] Fix | Delete
* WordPress dependencies
[18928] Fix | Delete
*/
[18929] Fix | Delete
[18930] Fix | Delete
[18931] Fix | Delete
[18932] Fix | Delete
[18933] Fix | Delete
const icons = {
[18934] Fix | Delete
left: justify_left,
[18935] Fix | Delete
center: justify_center,
[18936] Fix | Delete
right: justify_right,
[18937] Fix | Delete
'space-between': justify_space_between,
[18938] Fix | Delete
stretch: justify_stretch
[18939] Fix | Delete
};
[18940] Fix | Delete
function JustifyContentUI({
[18941] Fix | Delete
allowedControls = ['left', 'center', 'right', 'space-between'],
[18942] Fix | Delete
isCollapsed = true,
[18943] Fix | Delete
onChange,
[18944] Fix | Delete
value,
[18945] Fix | Delete
popoverProps,
[18946] Fix | Delete
isToolbar
[18947] Fix | Delete
}) {
[18948] Fix | Delete
// If the control is already selected we want a click
[18949] Fix | Delete
// again on the control to deselect the item, so we
[18950] Fix | Delete
// call onChange( undefined )
[18951] Fix | Delete
const handleClick = next => {
[18952] Fix | Delete
if (next === value) {
[18953] Fix | Delete
onChange(undefined);
[18954] Fix | Delete
} else {
[18955] Fix | Delete
onChange(next);
[18956] Fix | Delete
}
[18957] Fix | Delete
};
[18958] Fix | Delete
const icon = value ? icons[value] : icons.left;
[18959] Fix | Delete
const allControls = [{
[18960] Fix | Delete
name: 'left',
[18961] Fix | Delete
icon: justify_left,
[18962] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Justify items left'),
[18963] Fix | Delete
isActive: 'left' === value,
[18964] Fix | Delete
onClick: () => handleClick('left')
[18965] Fix | Delete
}, {
[18966] Fix | Delete
name: 'center',
[18967] Fix | Delete
icon: justify_center,
[18968] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Justify items center'),
[18969] Fix | Delete
isActive: 'center' === value,
[18970] Fix | Delete
onClick: () => handleClick('center')
[18971] Fix | Delete
}, {
[18972] Fix | Delete
name: 'right',
[18973] Fix | Delete
icon: justify_right,
[18974] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Justify items right'),
[18975] Fix | Delete
isActive: 'right' === value,
[18976] Fix | Delete
onClick: () => handleClick('right')
[18977] Fix | Delete
}, {
[18978] Fix | Delete
name: 'space-between',
[18979] Fix | Delete
icon: justify_space_between,
[18980] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Space between items'),
[18981] Fix | Delete
isActive: 'space-between' === value,
[18982] Fix | Delete
onClick: () => handleClick('space-between')
[18983] Fix | Delete
}, {
[18984] Fix | Delete
name: 'stretch',
[18985] Fix | Delete
icon: justify_stretch,
[18986] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Stretch items'),
[18987] Fix | Delete
isActive: 'stretch' === value,
[18988] Fix | Delete
onClick: () => handleClick('stretch')
[18989] Fix | Delete
}];
[18990] Fix | Delete
const UIComponent = isToolbar ? external_wp_components_namespaceObject.ToolbarGroup : external_wp_components_namespaceObject.ToolbarDropdownMenu;
[18991] Fix | Delete
const extraProps = isToolbar ? {
[18992] Fix | Delete
isCollapsed
[18993] Fix | Delete
} : {};
[18994] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UIComponent, {
[18995] Fix | Delete
icon: icon,
[18996] Fix | Delete
popoverProps: popoverProps,
[18997] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Change items justification'),
[18998] Fix | Delete
controls: allControls.filter(elem => allowedControls.includes(elem.name)),
[18999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function