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
/**
[26500] Fix | Delete
* Override props assigned to save component to inject border color.
[26501] Fix | Delete
*
[26502] Fix | Delete
* @param {Object} props Additional props applied to save element.
[26503] Fix | Delete
* @param {Object|string} blockNameOrType Block type definition.
[26504] Fix | Delete
* @param {Object} attributes Block's attributes.
[26505] Fix | Delete
*
[26506] Fix | Delete
* @return {Object} Filtered props to apply to save element.
[26507] Fix | Delete
*/
[26508] Fix | Delete
function border_addSaveProps(props, blockNameOrType, attributes) {
[26509] Fix | Delete
if (!hasBorderSupport(blockNameOrType, 'color') || shouldSkipSerialization(blockNameOrType, BORDER_SUPPORT_KEY, 'color')) {
[26510] Fix | Delete
return props;
[26511] Fix | Delete
}
[26512] Fix | Delete
const borderClasses = getBorderClasses(attributes);
[26513] Fix | Delete
const newClassName = dist_clsx(props.className, borderClasses);
[26514] Fix | Delete
[26515] Fix | Delete
// If we are clearing the last of the previous classes in `className`
[26516] Fix | Delete
// set it to `undefined` to avoid rendering empty DOM attributes.
[26517] Fix | Delete
props.className = newClassName ? newClassName : undefined;
[26518] Fix | Delete
return props;
[26519] Fix | Delete
}
[26520] Fix | Delete
[26521] Fix | Delete
/**
[26522] Fix | Delete
* Generates a CSS class name consisting of all the applicable border color
[26523] Fix | Delete
* classes given the current block attributes.
[26524] Fix | Delete
*
[26525] Fix | Delete
* @param {Object} attributes Block's attributes.
[26526] Fix | Delete
*
[26527] Fix | Delete
* @return {string} CSS class name.
[26528] Fix | Delete
*/
[26529] Fix | Delete
function getBorderClasses(attributes) {
[26530] Fix | Delete
const {
[26531] Fix | Delete
borderColor,
[26532] Fix | Delete
style
[26533] Fix | Delete
} = attributes;
[26534] Fix | Delete
const borderColorClass = getColorClassName('border-color', borderColor);
[26535] Fix | Delete
return dist_clsx({
[26536] Fix | Delete
'has-border-color': borderColor || style?.border?.color,
[26537] Fix | Delete
[borderColorClass]: !!borderColorClass
[26538] Fix | Delete
});
[26539] Fix | Delete
}
[26540] Fix | Delete
function border_useBlockProps({
[26541] Fix | Delete
name,
[26542] Fix | Delete
borderColor,
[26543] Fix | Delete
style
[26544] Fix | Delete
}) {
[26545] Fix | Delete
const {
[26546] Fix | Delete
colors
[26547] Fix | Delete
} = useMultipleOriginColorsAndGradients();
[26548] Fix | Delete
if (!hasBorderSupport(name, 'color') || shouldSkipSerialization(name, BORDER_SUPPORT_KEY, 'color')) {
[26549] Fix | Delete
return {};
[26550] Fix | Delete
}
[26551] Fix | Delete
const {
[26552] Fix | Delete
color: borderColorValue
[26553] Fix | Delete
} = getMultiOriginColor({
[26554] Fix | Delete
colors,
[26555] Fix | Delete
namedColor: borderColor
[26556] Fix | Delete
});
[26557] Fix | Delete
const {
[26558] Fix | Delete
color: borderTopColor
[26559] Fix | Delete
} = getMultiOriginColor({
[26560] Fix | Delete
colors,
[26561] Fix | Delete
namedColor: getColorSlugFromVariable(style?.border?.top?.color)
[26562] Fix | Delete
});
[26563] Fix | Delete
const {
[26564] Fix | Delete
color: borderRightColor
[26565] Fix | Delete
} = getMultiOriginColor({
[26566] Fix | Delete
colors,
[26567] Fix | Delete
namedColor: getColorSlugFromVariable(style?.border?.right?.color)
[26568] Fix | Delete
});
[26569] Fix | Delete
const {
[26570] Fix | Delete
color: borderBottomColor
[26571] Fix | Delete
} = getMultiOriginColor({
[26572] Fix | Delete
colors,
[26573] Fix | Delete
namedColor: getColorSlugFromVariable(style?.border?.bottom?.color)
[26574] Fix | Delete
});
[26575] Fix | Delete
const {
[26576] Fix | Delete
color: borderLeftColor
[26577] Fix | Delete
} = getMultiOriginColor({
[26578] Fix | Delete
colors,
[26579] Fix | Delete
namedColor: getColorSlugFromVariable(style?.border?.left?.color)
[26580] Fix | Delete
});
[26581] Fix | Delete
const extraStyles = {
[26582] Fix | Delete
borderTopColor: borderTopColor || borderColorValue,
[26583] Fix | Delete
borderRightColor: borderRightColor || borderColorValue,
[26584] Fix | Delete
borderBottomColor: borderBottomColor || borderColorValue,
[26585] Fix | Delete
borderLeftColor: borderLeftColor || borderColorValue
[26586] Fix | Delete
};
[26587] Fix | Delete
return border_addSaveProps({
[26588] Fix | Delete
style: utils_cleanEmptyObject(extraStyles) || {}
[26589] Fix | Delete
}, name, {
[26590] Fix | Delete
borderColor,
[26591] Fix | Delete
style
[26592] Fix | Delete
});
[26593] Fix | Delete
}
[26594] Fix | Delete
/* harmony default export */ const border = ({
[26595] Fix | Delete
useBlockProps: border_useBlockProps,
[26596] Fix | Delete
addSaveProps: border_addSaveProps,
[26597] Fix | Delete
attributeKeys: ['borderColor', 'style'],
[26598] Fix | Delete
hasSupport(name) {
[26599] Fix | Delete
return hasBorderSupport(name, 'color');
[26600] Fix | Delete
}
[26601] Fix | Delete
});
[26602] Fix | Delete
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/border/addAttributes', addAttributes);
[26603] Fix | Delete
[26604] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradients/use-gradient.js
[26605] Fix | Delete
/**
[26606] Fix | Delete
* WordPress dependencies
[26607] Fix | Delete
*/
[26608] Fix | Delete
[26609] Fix | Delete
[26610] Fix | Delete
[26611] Fix | Delete
/**
[26612] Fix | Delete
* Internal dependencies
[26613] Fix | Delete
*/
[26614] Fix | Delete
[26615] Fix | Delete
[26616] Fix | Delete
[26617] Fix | Delete
function __experimentalGetGradientClass(gradientSlug) {
[26618] Fix | Delete
if (!gradientSlug) {
[26619] Fix | Delete
return undefined;
[26620] Fix | Delete
}
[26621] Fix | Delete
return `has-${gradientSlug}-gradient-background`;
[26622] Fix | Delete
}
[26623] Fix | Delete
[26624] Fix | Delete
/**
[26625] Fix | Delete
* Retrieves the gradient value per slug.
[26626] Fix | Delete
*
[26627] Fix | Delete
* @param {Array} gradients Gradient Palette
[26628] Fix | Delete
* @param {string} slug Gradient slug
[26629] Fix | Delete
*
[26630] Fix | Delete
* @return {string} Gradient value.
[26631] Fix | Delete
*/
[26632] Fix | Delete
function getGradientValueBySlug(gradients, slug) {
[26633] Fix | Delete
const gradient = gradients?.find(g => g.slug === slug);
[26634] Fix | Delete
return gradient && gradient.gradient;
[26635] Fix | Delete
}
[26636] Fix | Delete
function __experimentalGetGradientObjectByGradientValue(gradients, value) {
[26637] Fix | Delete
const gradient = gradients?.find(g => g.gradient === value);
[26638] Fix | Delete
return gradient;
[26639] Fix | Delete
}
[26640] Fix | Delete
[26641] Fix | Delete
/**
[26642] Fix | Delete
* Retrieves the gradient slug per slug.
[26643] Fix | Delete
*
[26644] Fix | Delete
* @param {Array} gradients Gradient Palette
[26645] Fix | Delete
* @param {string} value Gradient value
[26646] Fix | Delete
* @return {string} Gradient slug.
[26647] Fix | Delete
*/
[26648] Fix | Delete
function getGradientSlugByValue(gradients, value) {
[26649] Fix | Delete
const gradient = __experimentalGetGradientObjectByGradientValue(gradients, value);
[26650] Fix | Delete
return gradient && gradient.slug;
[26651] Fix | Delete
}
[26652] Fix | Delete
function __experimentalUseGradient({
[26653] Fix | Delete
gradientAttribute = 'gradient',
[26654] Fix | Delete
customGradientAttribute = 'customGradient'
[26655] Fix | Delete
} = {}) {
[26656] Fix | Delete
const {
[26657] Fix | Delete
clientId
[26658] Fix | Delete
} = useBlockEditContext();
[26659] Fix | Delete
const [userGradientPalette, themeGradientPalette, defaultGradientPalette] = use_settings_useSettings('color.gradients.custom', 'color.gradients.theme', 'color.gradients.default');
[26660] Fix | Delete
const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userGradientPalette || []), ...(themeGradientPalette || []), ...(defaultGradientPalette || [])], [userGradientPalette, themeGradientPalette, defaultGradientPalette]);
[26661] Fix | Delete
const {
[26662] Fix | Delete
gradient,
[26663] Fix | Delete
customGradient
[26664] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[26665] Fix | Delete
const {
[26666] Fix | Delete
getBlockAttributes
[26667] Fix | Delete
} = select(store);
[26668] Fix | Delete
const attributes = getBlockAttributes(clientId) || {};
[26669] Fix | Delete
return {
[26670] Fix | Delete
customGradient: attributes[customGradientAttribute],
[26671] Fix | Delete
gradient: attributes[gradientAttribute]
[26672] Fix | Delete
};
[26673] Fix | Delete
}, [clientId, gradientAttribute, customGradientAttribute]);
[26674] Fix | Delete
const {
[26675] Fix | Delete
updateBlockAttributes
[26676] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[26677] Fix | Delete
const setGradient = (0,external_wp_element_namespaceObject.useCallback)(newGradientValue => {
[26678] Fix | Delete
const slug = getGradientSlugByValue(allGradients, newGradientValue);
[26679] Fix | Delete
if (slug) {
[26680] Fix | Delete
updateBlockAttributes(clientId, {
[26681] Fix | Delete
[gradientAttribute]: slug,
[26682] Fix | Delete
[customGradientAttribute]: undefined
[26683] Fix | Delete
});
[26684] Fix | Delete
return;
[26685] Fix | Delete
}
[26686] Fix | Delete
updateBlockAttributes(clientId, {
[26687] Fix | Delete
[gradientAttribute]: undefined,
[26688] Fix | Delete
[customGradientAttribute]: newGradientValue
[26689] Fix | Delete
});
[26690] Fix | Delete
}, [allGradients, clientId, updateBlockAttributes]);
[26691] Fix | Delete
const gradientClass = __experimentalGetGradientClass(gradient);
[26692] Fix | Delete
let gradientValue;
[26693] Fix | Delete
if (gradient) {
[26694] Fix | Delete
gradientValue = getGradientValueBySlug(allGradients, gradient);
[26695] Fix | Delete
} else {
[26696] Fix | Delete
gradientValue = customGradient;
[26697] Fix | Delete
}
[26698] Fix | Delete
return {
[26699] Fix | Delete
gradientClass,
[26700] Fix | Delete
gradientValue,
[26701] Fix | Delete
setGradient
[26702] Fix | Delete
};
[26703] Fix | Delete
}
[26704] Fix | Delete
[26705] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/control.js
[26706] Fix | Delete
/**
[26707] Fix | Delete
* External dependencies
[26708] Fix | Delete
*/
[26709] Fix | Delete
[26710] Fix | Delete
[26711] Fix | Delete
/**
[26712] Fix | Delete
* WordPress dependencies
[26713] Fix | Delete
*/
[26714] Fix | Delete
[26715] Fix | Delete
[26716] Fix | Delete
[26717] Fix | Delete
/**
[26718] Fix | Delete
* Internal dependencies
[26719] Fix | Delete
*/
[26720] Fix | Delete
[26721] Fix | Delete
[26722] Fix | Delete
[26723] Fix | Delete
[26724] Fix | Delete
const {
[26725] Fix | Delete
Tabs
[26726] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[26727] Fix | Delete
const colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
[26728] Fix | Delete
const TAB_IDS = {
[26729] Fix | Delete
color: 'color',
[26730] Fix | Delete
gradient: 'gradient'
[26731] Fix | Delete
};
[26732] Fix | Delete
function ColorGradientControlInner({
[26733] Fix | Delete
colors,
[26734] Fix | Delete
gradients,
[26735] Fix | Delete
disableCustomColors,
[26736] Fix | Delete
disableCustomGradients,
[26737] Fix | Delete
__experimentalIsRenderedInSidebar,
[26738] Fix | Delete
className,
[26739] Fix | Delete
label,
[26740] Fix | Delete
onColorChange,
[26741] Fix | Delete
onGradientChange,
[26742] Fix | Delete
colorValue,
[26743] Fix | Delete
gradientValue,
[26744] Fix | Delete
clearable,
[26745] Fix | Delete
showTitle = true,
[26746] Fix | Delete
enableAlpha,
[26747] Fix | Delete
headingLevel
[26748] Fix | Delete
}) {
[26749] Fix | Delete
const canChooseAColor = onColorChange && (colors && colors.length > 0 || !disableCustomColors);
[26750] Fix | Delete
const canChooseAGradient = onGradientChange && (gradients && gradients.length > 0 || !disableCustomGradients);
[26751] Fix | Delete
if (!canChooseAColor && !canChooseAGradient) {
[26752] Fix | Delete
return null;
[26753] Fix | Delete
}
[26754] Fix | Delete
const tabPanels = {
[26755] Fix | Delete
[TAB_IDS.color]: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ColorPalette, {
[26756] Fix | Delete
value: colorValue,
[26757] Fix | Delete
onChange: canChooseAGradient ? newColor => {
[26758] Fix | Delete
onColorChange(newColor);
[26759] Fix | Delete
onGradientChange();
[26760] Fix | Delete
} : onColorChange,
[26761] Fix | Delete
colors,
[26762] Fix | Delete
disableCustomColors,
[26763] Fix | Delete
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
[26764] Fix | Delete
clearable: clearable,
[26765] Fix | Delete
enableAlpha: enableAlpha,
[26766] Fix | Delete
headingLevel: headingLevel
[26767] Fix | Delete
}),
[26768] Fix | Delete
[TAB_IDS.gradient]: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.GradientPicker, {
[26769] Fix | Delete
value: gradientValue,
[26770] Fix | Delete
onChange: canChooseAColor ? newGradient => {
[26771] Fix | Delete
onGradientChange(newGradient);
[26772] Fix | Delete
onColorChange();
[26773] Fix | Delete
} : onGradientChange,
[26774] Fix | Delete
gradients,
[26775] Fix | Delete
disableCustomGradients,
[26776] Fix | Delete
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
[26777] Fix | Delete
clearable: clearable,
[26778] Fix | Delete
headingLevel: headingLevel
[26779] Fix | Delete
})
[26780] Fix | Delete
};
[26781] Fix | Delete
const renderPanelType = type => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[26782] Fix | Delete
className: "block-editor-color-gradient-control__panel",
[26783] Fix | Delete
children: tabPanels[type]
[26784] Fix | Delete
});
[26785] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl, {
[26786] Fix | Delete
__nextHasNoMarginBottom: true,
[26787] Fix | Delete
className: dist_clsx('block-editor-color-gradient-control', className),
[26788] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("fieldset", {
[26789] Fix | Delete
className: "block-editor-color-gradient-control__fieldset",
[26790] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[26791] Fix | Delete
spacing: 1,
[26792] Fix | Delete
children: [showTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("legend", {
[26793] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[26794] Fix | Delete
className: "block-editor-color-gradient-control__color-indicator",
[26795] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
[26796] Fix | Delete
children: label
[26797] Fix | Delete
})
[26798] Fix | Delete
})
[26799] Fix | Delete
}), canChooseAColor && canChooseAGradient && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[26800] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs, {
[26801] Fix | Delete
defaultTabId: gradientValue ? TAB_IDS.gradient : !!canChooseAColor && TAB_IDS.color,
[26802] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs.TabList, {
[26803] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
[26804] Fix | Delete
tabId: TAB_IDS.color,
[26805] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Color')
[26806] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
[26807] Fix | Delete
tabId: TAB_IDS.gradient,
[26808] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Gradient')
[26809] Fix | Delete
})]
[26810] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
[26811] Fix | Delete
tabId: TAB_IDS.color,
[26812] Fix | Delete
className: "block-editor-color-gradient-control__panel",
[26813] Fix | Delete
focusable: false,
[26814] Fix | Delete
children: tabPanels.color
[26815] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
[26816] Fix | Delete
tabId: TAB_IDS.gradient,
[26817] Fix | Delete
className: "block-editor-color-gradient-control__panel",
[26818] Fix | Delete
focusable: false,
[26819] Fix | Delete
children: tabPanels.gradient
[26820] Fix | Delete
})]
[26821] Fix | Delete
})
[26822] Fix | Delete
}), !canChooseAGradient && renderPanelType(TAB_IDS.color), !canChooseAColor && renderPanelType(TAB_IDS.gradient)]
[26823] Fix | Delete
})
[26824] Fix | Delete
})
[26825] Fix | Delete
});
[26826] Fix | Delete
}
[26827] Fix | Delete
function ColorGradientControlSelect(props) {
[26828] Fix | Delete
const [colors, gradients, customColors, customGradients] = use_settings_useSettings('color.palette', 'color.gradients', 'color.custom', 'color.customGradient');
[26829] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorGradientControlInner, {
[26830] Fix | Delete
colors: colors,
[26831] Fix | Delete
gradients: gradients,
[26832] Fix | Delete
disableCustomColors: !customColors,
[26833] Fix | Delete
disableCustomGradients: !customGradients,
[26834] Fix | Delete
...props
[26835] Fix | Delete
});
[26836] Fix | Delete
}
[26837] Fix | Delete
function ColorGradientControl(props) {
[26838] Fix | Delete
if (colorsAndGradientKeys.every(key => props.hasOwnProperty(key))) {
[26839] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorGradientControlInner, {
[26840] Fix | Delete
...props
[26841] Fix | Delete
});
[26842] Fix | Delete
}
[26843] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorGradientControlSelect, {
[26844] Fix | Delete
...props
[26845] Fix | Delete
});
[26846] Fix | Delete
}
[26847] Fix | Delete
/* harmony default export */ const control = (ColorGradientControl);
[26848] Fix | Delete
[26849] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/color-panel.js
[26850] Fix | Delete
/**
[26851] Fix | Delete
* External dependencies
[26852] Fix | Delete
*/
[26853] Fix | Delete
[26854] Fix | Delete
[26855] Fix | Delete
/**
[26856] Fix | Delete
* WordPress dependencies
[26857] Fix | Delete
*/
[26858] Fix | Delete
[26859] Fix | Delete
[26860] Fix | Delete
[26861] Fix | Delete
[26862] Fix | Delete
/**
[26863] Fix | Delete
* Internal dependencies
[26864] Fix | Delete
*/
[26865] Fix | Delete
[26866] Fix | Delete
[26867] Fix | Delete
[26868] Fix | Delete
[26869] Fix | Delete
[26870] Fix | Delete
[26871] Fix | Delete
[26872] Fix | Delete
function useHasColorPanel(settings) {
[26873] Fix | Delete
const hasTextPanel = useHasTextPanel(settings);
[26874] Fix | Delete
const hasBackgroundPanel = color_panel_useHasBackgroundPanel(settings);
[26875] Fix | Delete
const hasLinkPanel = useHasLinkPanel(settings);
[26876] Fix | Delete
const hasHeadingPanel = useHasHeadingPanel(settings);
[26877] Fix | Delete
const hasButtonPanel = useHasButtonPanel(settings);
[26878] Fix | Delete
const hasCaptionPanel = useHasCaptionPanel(settings);
[26879] Fix | Delete
return hasTextPanel || hasBackgroundPanel || hasLinkPanel || hasHeadingPanel || hasButtonPanel || hasCaptionPanel;
[26880] Fix | Delete
}
[26881] Fix | Delete
function useHasTextPanel(settings) {
[26882] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26883] Fix | Delete
return settings?.color?.text && (colors?.length > 0 || settings?.color?.custom);
[26884] Fix | Delete
}
[26885] Fix | Delete
function useHasLinkPanel(settings) {
[26886] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26887] Fix | Delete
return settings?.color?.link && (colors?.length > 0 || settings?.color?.custom);
[26888] Fix | Delete
}
[26889] Fix | Delete
function useHasCaptionPanel(settings) {
[26890] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26891] Fix | Delete
return settings?.color?.caption && (colors?.length > 0 || settings?.color?.custom);
[26892] Fix | Delete
}
[26893] Fix | Delete
function useHasHeadingPanel(settings) {
[26894] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26895] Fix | Delete
const gradients = useGradientsPerOrigin(settings);
[26896] Fix | Delete
return settings?.color?.heading && (colors?.length > 0 || settings?.color?.custom || gradients?.length > 0 || settings?.color?.customGradient);
[26897] Fix | Delete
}
[26898] Fix | Delete
function useHasButtonPanel(settings) {
[26899] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26900] Fix | Delete
const gradients = useGradientsPerOrigin(settings);
[26901] Fix | Delete
return settings?.color?.button && (colors?.length > 0 || settings?.color?.custom || gradients?.length > 0 || settings?.color?.customGradient);
[26902] Fix | Delete
}
[26903] Fix | Delete
function color_panel_useHasBackgroundPanel(settings) {
[26904] Fix | Delete
const colors = useColorsPerOrigin(settings);
[26905] Fix | Delete
const gradients = useGradientsPerOrigin(settings);
[26906] Fix | Delete
return settings?.color?.background && (colors?.length > 0 || settings?.color?.custom || gradients?.length > 0 || settings?.color?.customGradient);
[26907] Fix | Delete
}
[26908] Fix | Delete
function ColorToolsPanel({
[26909] Fix | Delete
resetAllFilter,
[26910] Fix | Delete
onChange,
[26911] Fix | Delete
value,
[26912] Fix | Delete
panelId,
[26913] Fix | Delete
children
[26914] Fix | Delete
}) {
[26915] Fix | Delete
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
[26916] Fix | Delete
const resetAll = () => {
[26917] Fix | Delete
const updatedValue = resetAllFilter(value);
[26918] Fix | Delete
onChange(updatedValue);
[26919] Fix | Delete
};
[26920] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
[26921] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Elements'),
[26922] Fix | Delete
resetAll: resetAll,
[26923] Fix | Delete
panelId: panelId,
[26924] Fix | Delete
hasInnerWrapper: true,
[26925] Fix | Delete
headingLevel: 3,
[26926] Fix | Delete
className: "color-block-support-panel",
[26927] Fix | Delete
__experimentalFirstVisibleItemClass: "first",
[26928] Fix | Delete
__experimentalLastVisibleItemClass: "last",
[26929] Fix | Delete
dropdownMenuProps: dropdownMenuProps,
[26930] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[26931] Fix | Delete
className: "color-block-support-panel__inner-wrapper",
[26932] Fix | Delete
children: children
[26933] Fix | Delete
})
[26934] Fix | Delete
});
[26935] Fix | Delete
}
[26936] Fix | Delete
const color_panel_DEFAULT_CONTROLS = {
[26937] Fix | Delete
text: true,
[26938] Fix | Delete
background: true,
[26939] Fix | Delete
link: true,
[26940] Fix | Delete
heading: true,
[26941] Fix | Delete
button: true,
[26942] Fix | Delete
caption: true
[26943] Fix | Delete
};
[26944] Fix | Delete
const popoverProps = {
[26945] Fix | Delete
placement: 'left-start',
[26946] Fix | Delete
offset: 36,
[26947] Fix | Delete
shift: true
[26948] Fix | Delete
};
[26949] Fix | Delete
const {
[26950] Fix | Delete
Tabs: color_panel_Tabs
[26951] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[26952] Fix | Delete
const LabeledColorIndicators = ({
[26953] Fix | Delete
indicators,
[26954] Fix | Delete
label
[26955] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
[26956] Fix | Delete
justify: "flex-start",
[26957] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalZStack, {
[26958] Fix | Delete
isLayered: false,
[26959] Fix | Delete
offset: -8,
[26960] Fix | Delete
children: indicators.map((indicator, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Flex, {
[26961] Fix | Delete
expanded: false,
[26962] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ColorIndicator, {
[26963] Fix | Delete
colorValue: indicator
[26964] Fix | Delete
})
[26965] Fix | Delete
}, index))
[26966] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[26967] Fix | Delete
className: "block-editor-panel-color-gradient-settings__color-name",
[26968] Fix | Delete
title: label,
[26969] Fix | Delete
children: label
[26970] Fix | Delete
})]
[26971] Fix | Delete
});
[26972] Fix | Delete
function ColorPanelTab({
[26973] Fix | Delete
isGradient,
[26974] Fix | Delete
inheritedValue,
[26975] Fix | Delete
userValue,
[26976] Fix | Delete
setValue,
[26977] Fix | Delete
colorGradientControlSettings
[26978] Fix | Delete
}) {
[26979] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(control, {
[26980] Fix | Delete
...colorGradientControlSettings,
[26981] Fix | Delete
showTitle: false,
[26982] Fix | Delete
enableAlpha: true,
[26983] Fix | Delete
__experimentalIsRenderedInSidebar: true,
[26984] Fix | Delete
colorValue: isGradient ? undefined : inheritedValue,
[26985] Fix | Delete
gradientValue: isGradient ? inheritedValue : undefined,
[26986] Fix | Delete
onColorChange: isGradient ? undefined : setValue,
[26987] Fix | Delete
onGradientChange: isGradient ? setValue : undefined,
[26988] Fix | Delete
clearable: inheritedValue === userValue,
[26989] Fix | Delete
headingLevel: 3
[26990] Fix | Delete
});
[26991] Fix | Delete
}
[26992] Fix | Delete
function ColorPanelDropdown({
[26993] Fix | Delete
label,
[26994] Fix | Delete
hasValue,
[26995] Fix | Delete
resetValue,
[26996] Fix | Delete
isShownByDefault,
[26997] Fix | Delete
indicators,
[26998] Fix | Delete
tabs,
[26999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function