Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
onShow = _ref2$onShow === void 0 ? external_lodash_["noop"] : _ref2$onShow,
[32000] Fix | Delete
_ref2$timeout = _ref2.timeout,
[32001] Fix | Delete
timeout = _ref2$timeout === void 0 ? 300 : _ref2$timeout;
[32002] Fix | Delete
[32003] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(false),
[32004] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[32005] Fix | Delete
show = _useState2[0],
[32006] Fix | Delete
setShow = _useState2[1];
[32007] Fix | Delete
[32008] Fix | Delete
var timeoutRef = Object(external_wp_element_["useRef"])();
[32009] Fix | Delete
var setDebouncedTimeout = Object(external_wp_element_["useCallback"])(function (callback) {
[32010] Fix | Delete
window.clearTimeout(timeoutRef.current);
[32011] Fix | Delete
timeoutRef.current = setTimeout(callback, timeout);
[32012] Fix | Delete
}, [timeout]);
[32013] Fix | Delete
var handleOnMouseMove = Object(external_wp_element_["useCallback"])(function (event) {
[32014] Fix | Delete
onMouseMove(event);
[32015] Fix | Delete
setDebouncedTimeout(function () {
[32016] Fix | Delete
if (!show) {
[32017] Fix | Delete
setShow(true);
[32018] Fix | Delete
onShow();
[32019] Fix | Delete
}
[32020] Fix | Delete
});
[32021] Fix | Delete
}, []);
[32022] Fix | Delete
var handleOnMouseLeave = Object(external_wp_element_["useCallback"])(function (event) {
[32023] Fix | Delete
onMouseLeave(event);
[32024] Fix | Delete
setDebouncedTimeout(function () {
[32025] Fix | Delete
setShow(false);
[32026] Fix | Delete
onHide();
[32027] Fix | Delete
});
[32028] Fix | Delete
}, []);
[32029] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[32030] Fix | Delete
return function () {
[32031] Fix | Delete
window.clearTimeout(timeoutRef.current);
[32032] Fix | Delete
};
[32033] Fix | Delete
});
[32034] Fix | Delete
return {
[32035] Fix | Delete
onMouseMove: handleOnMouseMove,
[32036] Fix | Delete
onMouseLeave: handleOnMouseLeave
[32037] Fix | Delete
};
[32038] Fix | Delete
}
[32039] Fix | Delete
[32040] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/styles/range-control-styles.js
[32041] Fix | Delete
[32042] Fix | Delete
[32043] Fix | Delete
function range_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
[32044] Fix | Delete
[32045] Fix | Delete
/**
[32046] Fix | Delete
* External dependencies
[32047] Fix | Delete
*/
[32048] Fix | Delete
[32049] Fix | Delete
[32050] Fix | Delete
/**
[32051] Fix | Delete
* Internal dependencies
[32052] Fix | Delete
*/
[32053] Fix | Delete
[32054] Fix | Delete
[32055] Fix | Delete
[32056] Fix | Delete
var range_control_styles_ref = true ? {
[32057] Fix | Delete
name: "tdik1c",
[32058] Fix | Delete
styles: "height:30px;min-height:30px;"
[32059] Fix | Delete
} : undefined;
[32060] Fix | Delete
[32061] Fix | Delete
var rangeHeight = function rangeHeight() {
[32062] Fix | Delete
return range_control_styles_ref;
[32063] Fix | Delete
};
[32064] Fix | Delete
[32065] Fix | Delete
var thumbSize = 20;
[32066] Fix | Delete
var range_control_styles_Root = styled_base_browser_esm("div", {
[32067] Fix | Delete
target: "exqw8y20",
[32068] Fix | Delete
label: "Root"
[32069] Fix | Delete
})( true ? {
[32070] Fix | Delete
name: "44oaj8",
[32071] Fix | Delete
styles: "-webkit-tap-highlight-color:transparent;box-sizing:border-box;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;"
[32072] Fix | Delete
} : undefined);
[32073] Fix | Delete
[32074] Fix | Delete
var range_control_styles_wrapperColor = function wrapperColor(_ref4) {
[32075] Fix | Delete
var _ref4$color = _ref4.color,
[32076] Fix | Delete
colorProp = _ref4$color === void 0 ? colors_color('ui.borderFocus') : _ref4$color;
[32077] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32078] Fix | Delete
color: colorProp
[32079] Fix | Delete
}, true ? "" : undefined);
[32080] Fix | Delete
};
[32081] Fix | Delete
[32082] Fix | Delete
var range_control_styles_wrapperMargin = function wrapperMargin(_ref5) {
[32083] Fix | Delete
var marks = _ref5.marks;
[32084] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32085] Fix | Delete
marginBottom: marks ? 16 : null
[32086] Fix | Delete
}, true ? "" : undefined);
[32087] Fix | Delete
};
[32088] Fix | Delete
[32089] Fix | Delete
var range_control_styles_Wrapper = styled_base_browser_esm("div", {
[32090] Fix | Delete
target: "exqw8y21",
[32091] Fix | Delete
label: "Wrapper"
[32092] Fix | Delete
})("box-sizing:border-box;color:", colors_color('blue.medium.focus'), ";display:block;flex:1;padding-top:15px;position:relative;width:100%;", range_control_styles_wrapperColor, ";", rangeHeight, ";", range_control_styles_wrapperMargin, ";", rtl_rtl({
[32093] Fix | Delete
marginLeft: 10
[32094] Fix | Delete
}), true ? "" : undefined);
[32095] Fix | Delete
var BeforeIconWrapper = styled_base_browser_esm("span", {
[32096] Fix | Delete
target: "exqw8y22",
[32097] Fix | Delete
label: "BeforeIconWrapper"
[32098] Fix | Delete
})("margin-top:3px;", rtl_rtl({
[32099] Fix | Delete
marginRight: 6
[32100] Fix | Delete
}), true ? "" : undefined);
[32101] Fix | Delete
var AfterIconWrapper = styled_base_browser_esm("span", {
[32102] Fix | Delete
target: "exqw8y23",
[32103] Fix | Delete
label: "AfterIconWrapper"
[32104] Fix | Delete
})("margin-top:3px;", rtl_rtl({
[32105] Fix | Delete
marginLeft: 16
[32106] Fix | Delete
}), true ? "" : undefined);
[32107] Fix | Delete
[32108] Fix | Delete
var range_control_styles_railBackgroundColor = function railBackgroundColor(_ref6) {
[32109] Fix | Delete
var disabled = _ref6.disabled,
[32110] Fix | Delete
railColor = _ref6.railColor;
[32111] Fix | Delete
var background = railColor || null;
[32112] Fix | Delete
[32113] Fix | Delete
if (disabled) {
[32114] Fix | Delete
background = colors_color('lightGray.400');
[32115] Fix | Delete
}
[32116] Fix | Delete
[32117] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32118] Fix | Delete
background: background
[32119] Fix | Delete
}, true ? "" : undefined);
[32120] Fix | Delete
};
[32121] Fix | Delete
[32122] Fix | Delete
var Rail = styled_base_browser_esm("span", {
[32123] Fix | Delete
target: "exqw8y24",
[32124] Fix | Delete
label: "Rail"
[32125] Fix | Delete
})("background-color:", colors_color('lightGray.600'), ";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:3px;position:absolute;margin-top:14px;top:0;", range_control_styles_railBackgroundColor, ";" + ( true ? "" : undefined));
[32126] Fix | Delete
[32127] Fix | Delete
var range_control_styles_trackBackgroundColor = function trackBackgroundColor(_ref7) {
[32128] Fix | Delete
var disabled = _ref7.disabled,
[32129] Fix | Delete
trackColor = _ref7.trackColor;
[32130] Fix | Delete
var background = trackColor || 'currentColor';
[32131] Fix | Delete
[32132] Fix | Delete
if (disabled) {
[32133] Fix | Delete
background = colors_color('lightGray.800');
[32134] Fix | Delete
}
[32135] Fix | Delete
[32136] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32137] Fix | Delete
background: background
[32138] Fix | Delete
}, true ? "" : undefined);
[32139] Fix | Delete
};
[32140] Fix | Delete
[32141] Fix | Delete
var Track = styled_base_browser_esm("span", {
[32142] Fix | Delete
target: "exqw8y25",
[32143] Fix | Delete
label: "Track"
[32144] Fix | Delete
})("background-color:currentColor;border-radius:1px;box-sizing:border-box;height:3px;pointer-events:none;display:block;position:absolute;margin-top:14px;top:0;", range_control_styles_trackBackgroundColor, ";" + ( true ? "" : undefined));
[32145] Fix | Delete
var MarksWrapper = styled_base_browser_esm("span", {
[32146] Fix | Delete
target: "exqw8y26",
[32147] Fix | Delete
label: "MarksWrapper"
[32148] Fix | Delete
})( true ? {
[32149] Fix | Delete
name: "8d21nl",
[32150] Fix | Delete
styles: "box-sizing:border-box;display:block;pointer-events:none;position:relative;width:100%;user-select:none;"
[32151] Fix | Delete
} : undefined);
[32152] Fix | Delete
[32153] Fix | Delete
var range_control_styles_markFill = function markFill(_ref8) {
[32154] Fix | Delete
var disabled = _ref8.disabled,
[32155] Fix | Delete
isFilled = _ref8.isFilled;
[32156] Fix | Delete
var backgroundColor = isFilled ? 'currentColor' : colors_color('lightGray.600');
[32157] Fix | Delete
[32158] Fix | Delete
if (disabled) {
[32159] Fix | Delete
backgroundColor = colors_color('lightGray.800');
[32160] Fix | Delete
}
[32161] Fix | Delete
[32162] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32163] Fix | Delete
backgroundColor: backgroundColor
[32164] Fix | Delete
}, true ? "" : undefined);
[32165] Fix | Delete
};
[32166] Fix | Delete
[32167] Fix | Delete
var Mark = styled_base_browser_esm("span", {
[32168] Fix | Delete
target: "exqw8y27",
[32169] Fix | Delete
label: "Mark"
[32170] Fix | Delete
})("box-sizing:border-box;height:9px;left:0;position:absolute;top:-4px;width:1px;", range_control_styles_markFill, ";" + ( true ? "" : undefined));
[32171] Fix | Delete
[32172] Fix | Delete
var range_control_styles_markLabelFill = function markLabelFill(_ref9) {
[32173] Fix | Delete
var isFilled = _ref9.isFilled;
[32174] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32175] Fix | Delete
color: isFilled ? colors_color('darkGray.300') : colors_color('lightGray.600')
[32176] Fix | Delete
}, true ? "" : undefined);
[32177] Fix | Delete
};
[32178] Fix | Delete
[32179] Fix | Delete
var MarkLabel = styled_base_browser_esm("span", {
[32180] Fix | Delete
target: "exqw8y28",
[32181] Fix | Delete
label: "MarkLabel"
[32182] Fix | Delete
})("box-sizing:border-box;color:", colors_color('lightGray.600'), ";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;", range_control_styles_markLabelFill, ";" + ( true ? "" : undefined));
[32183] Fix | Delete
var ThumbWrapper = styled_base_browser_esm("span", {
[32184] Fix | Delete
target: "exqw8y29",
[32185] Fix | Delete
label: "ThumbWrapper"
[32186] Fix | Delete
})("align-items:center;box-sizing:border-box;display:flex;height:", thumbSize, "px;justify-content:center;margin-top:5px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:", thumbSize, "px;", rtl_rtl({
[32187] Fix | Delete
marginLeft: -10
[32188] Fix | Delete
}), true ? "" : undefined);
[32189] Fix | Delete
[32190] Fix | Delete
var range_control_styles_thumbFocus = function thumbFocus(_ref10) {
[32191] Fix | Delete
var isFocused = _ref10.isFocused;
[32192] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32193] Fix | Delete
borderColor: isFocused ? colors_color('ui.borderFocus') : colors_color('darkGray.200'),
[32194] Fix | Delete
boxShadow: isFocused ? "\n\t\t\t\t0 0 0 1px ".concat(colors_color('ui.borderFocus'), "\n\t\t\t") : "\n\t\t\t\t0 0 0 rgba(0, 0, 0, 0)\n\t\t\t"
[32195] Fix | Delete
}, true ? "" : undefined);
[32196] Fix | Delete
};
[32197] Fix | Delete
[32198] Fix | Delete
var Thumb = styled_base_browser_esm("span", {
[32199] Fix | Delete
target: "exqw8y210",
[32200] Fix | Delete
label: "Thumb"
[32201] Fix | Delete
})("align-items:center;background-color:white;border-radius:50%;border:1px solid ", colors_color('darkGray.200'), ";box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;", range_control_styles_thumbFocus, ";" + ( true ? "" : undefined));
[32202] Fix | Delete
var InputRange = styled_base_browser_esm("input", {
[32203] Fix | Delete
target: "exqw8y211",
[32204] Fix | Delete
label: "InputRange"
[32205] Fix | Delete
})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -", thumbSize / 2, "px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ", thumbSize, "px );" + ( true ? "" : undefined));
[32206] Fix | Delete
[32207] Fix | Delete
var range_control_styles_tooltipShow = function tooltipShow(_ref11) {
[32208] Fix | Delete
var show = _ref11.show;
[32209] Fix | Delete
return /*#__PURE__*/Object(core_browser_esm["b" /* css */])({
[32210] Fix | Delete
opacity: show ? 1 : 0
[32211] Fix | Delete
}, true ? "" : undefined);
[32212] Fix | Delete
};
[32213] Fix | Delete
[32214] Fix | Delete
var range_control_styles_ref2 = true ? {
[32215] Fix | Delete
name: "5qqmyx",
[32216] Fix | Delete
styles: "top:-80%;"
[32217] Fix | Delete
} : undefined;
[32218] Fix | Delete
[32219] Fix | Delete
var range_control_styles_ref3 = true ? {
[32220] Fix | Delete
name: "eda4eg",
[32221] Fix | Delete
styles: "bottom:-80%;"
[32222] Fix | Delete
} : undefined;
[32223] Fix | Delete
[32224] Fix | Delete
var tooltipPosition = function tooltipPosition(_ref12) {
[32225] Fix | Delete
var position = _ref12.position;
[32226] Fix | Delete
var isTop = position === 'top';
[32227] Fix | Delete
[32228] Fix | Delete
if (isTop) {
[32229] Fix | Delete
return range_control_styles_ref2;
[32230] Fix | Delete
}
[32231] Fix | Delete
[32232] Fix | Delete
return range_control_styles_ref3;
[32233] Fix | Delete
};
[32234] Fix | Delete
[32235] Fix | Delete
var range_control_styles_Tooltip = styled_base_browser_esm("span", {
[32236] Fix | Delete
target: "exqw8y212",
[32237] Fix | Delete
label: "Tooltip"
[32238] Fix | Delete
})("background:", colors_color('ui.border'), ";border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;", range_control_styles_tooltipShow, ";", tooltipPosition, ";", reduceMotion('transition'), ";", rtl_rtl({
[32239] Fix | Delete
transform: 'translateX(-50%)'
[32240] Fix | Delete
}, {
[32241] Fix | Delete
transform: 'translateX(50%)'
[32242] Fix | Delete
}), true ? "" : undefined);
[32243] Fix | Delete
var InputNumber = /*#__PURE__*/styled_base_browser_esm(number_control, {
[32244] Fix | Delete
target: "exqw8y213",
[32245] Fix | Delete
label: "InputNumber"
[32246] Fix | Delete
})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:", space(8), ";input[type='number']&{", rangeHeight, ";}", rtl_rtl({
[32247] Fix | Delete
marginLeft: space(2)
[32248] Fix | Delete
}), true ? "" : undefined);
[32249] Fix | Delete
var ActionRightWrapper = styled_base_browser_esm("span", {
[32250] Fix | Delete
target: "exqw8y214",
[32251] Fix | Delete
label: "ActionRightWrapper"
[32252] Fix | Delete
})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;", rangeHeight, ";}", rtl_rtl({
[32253] Fix | Delete
marginLeft: 8
[32254] Fix | Delete
}), true ? "" : undefined);
[32255] Fix | Delete
[32256] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/input-range.js
[32257] Fix | Delete
[32258] Fix | Delete
[32259] Fix | Delete
[32260] Fix | Delete
[32261] Fix | Delete
/**
[32262] Fix | Delete
* External dependencies
[32263] Fix | Delete
*/
[32264] Fix | Delete
[32265] Fix | Delete
/**
[32266] Fix | Delete
* WordPress dependencies
[32267] Fix | Delete
*/
[32268] Fix | Delete
[32269] Fix | Delete
[32270] Fix | Delete
/**
[32271] Fix | Delete
* Internal dependencies
[32272] Fix | Delete
*/
[32273] Fix | Delete
[32274] Fix | Delete
[32275] Fix | Delete
[32276] Fix | Delete
[32277] Fix | Delete
[32278] Fix | Delete
function input_range_InputRange(_ref, ref) {
[32279] Fix | Delete
var describedBy = _ref.describedBy,
[32280] Fix | Delete
_ref$isShiftStepEnabl = _ref.isShiftStepEnabled,
[32281] Fix | Delete
isShiftStepEnabled = _ref$isShiftStepEnabl === void 0 ? true : _ref$isShiftStepEnabl,
[32282] Fix | Delete
label = _ref.label,
[32283] Fix | Delete
_ref$onHideTooltip = _ref.onHideTooltip,
[32284] Fix | Delete
onHideTooltip = _ref$onHideTooltip === void 0 ? external_lodash_["noop"] : _ref$onHideTooltip,
[32285] Fix | Delete
_ref$onMouseLeave = _ref.onMouseLeave,
[32286] Fix | Delete
onMouseLeave = _ref$onMouseLeave === void 0 ? external_lodash_["noop"] : _ref$onMouseLeave,
[32287] Fix | Delete
_ref$step = _ref.step,
[32288] Fix | Delete
step = _ref$step === void 0 ? 1 : _ref$step,
[32289] Fix | Delete
_ref$onBlur = _ref.onBlur,
[32290] Fix | Delete
onBlur = _ref$onBlur === void 0 ? external_lodash_["noop"] : _ref$onBlur,
[32291] Fix | Delete
_ref$onChange = _ref.onChange,
[32292] Fix | Delete
onChange = _ref$onChange === void 0 ? external_lodash_["noop"] : _ref$onChange,
[32293] Fix | Delete
_ref$onFocus = _ref.onFocus,
[32294] Fix | Delete
onFocus = _ref$onFocus === void 0 ? external_lodash_["noop"] : _ref$onFocus,
[32295] Fix | Delete
_ref$onMouseMove = _ref.onMouseMove,
[32296] Fix | Delete
onMouseMove = _ref$onMouseMove === void 0 ? external_lodash_["noop"] : _ref$onMouseMove,
[32297] Fix | Delete
_ref$onShowTooltip = _ref.onShowTooltip,
[32298] Fix | Delete
onShowTooltip = _ref$onShowTooltip === void 0 ? external_lodash_["noop"] : _ref$onShowTooltip,
[32299] Fix | Delete
_ref$shiftStep = _ref.shiftStep,
[32300] Fix | Delete
shiftStep = _ref$shiftStep === void 0 ? 10 : _ref$shiftStep,
[32301] Fix | Delete
value = _ref.value,
[32302] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["describedBy", "isShiftStepEnabled", "label", "onHideTooltip", "onMouseLeave", "step", "onBlur", "onChange", "onFocus", "onMouseMove", "onShowTooltip", "shiftStep", "value"]);
[32303] Fix | Delete
[32304] Fix | Delete
var jumpStep = use_jump_step({
[32305] Fix | Delete
step: step,
[32306] Fix | Delete
shiftStep: shiftStep,
[32307] Fix | Delete
isShiftStepEnabled: isShiftStepEnabled
[32308] Fix | Delete
});
[32309] Fix | Delete
var hoverInteractions = useDebouncedHoverInteraction({
[32310] Fix | Delete
onHide: onHideTooltip,
[32311] Fix | Delete
onMouseLeave: onMouseLeave,
[32312] Fix | Delete
onMouseMove: onMouseMove,
[32313] Fix | Delete
onShow: onShowTooltip
[32314] Fix | Delete
});
[32315] Fix | Delete
return Object(external_wp_element_["createElement"])(InputRange, Object(esm_extends["a" /* default */])({}, props, hoverInteractions, {
[32316] Fix | Delete
"aria-describedby": describedBy,
[32317] Fix | Delete
"aria-label": label,
[32318] Fix | Delete
"aria-hidden": false,
[32319] Fix | Delete
onBlur: onBlur,
[32320] Fix | Delete
onChange: onChange,
[32321] Fix | Delete
onFocus: onFocus,
[32322] Fix | Delete
ref: ref,
[32323] Fix | Delete
step: jumpStep,
[32324] Fix | Delete
tabIndex: 0,
[32325] Fix | Delete
type: "range",
[32326] Fix | Delete
value: value
[32327] Fix | Delete
}));
[32328] Fix | Delete
}
[32329] Fix | Delete
[32330] Fix | Delete
var input_range_ForwardedComponent = Object(external_wp_element_["forwardRef"])(input_range_InputRange);
[32331] Fix | Delete
/* harmony default export */ var input_range = (input_range_ForwardedComponent);
[32332] Fix | Delete
[32333] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/mark.js
[32334] Fix | Delete
[32335] Fix | Delete
[32336] Fix | Delete
[32337] Fix | Delete
[32338] Fix | Delete
/**
[32339] Fix | Delete
* External dependencies
[32340] Fix | Delete
*/
[32341] Fix | Delete
[32342] Fix | Delete
/**
[32343] Fix | Delete
* Internal dependencies
[32344] Fix | Delete
*/
[32345] Fix | Delete
[32346] Fix | Delete
[32347] Fix | Delete
function RangeMark(_ref) {
[32348] Fix | Delete
var className = _ref.className,
[32349] Fix | Delete
_ref$isFilled = _ref.isFilled,
[32350] Fix | Delete
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
[32351] Fix | Delete
label = _ref.label,
[32352] Fix | Delete
_ref$style = _ref.style,
[32353] Fix | Delete
style = _ref$style === void 0 ? {} : _ref$style,
[32354] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "isFilled", "label", "style"]);
[32355] Fix | Delete
[32356] Fix | Delete
var classes = classnames_default()('components-range-control__mark', isFilled && 'is-filled', className);
[32357] Fix | Delete
var labelClasses = classnames_default()('components-range-control__mark-label', isFilled && 'is-filled');
[32358] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(Mark, Object(esm_extends["a" /* default */])({}, props, {
[32359] Fix | Delete
"aria-hidden": "true",
[32360] Fix | Delete
className: classes,
[32361] Fix | Delete
isFilled: isFilled,
[32362] Fix | Delete
style: style
[32363] Fix | Delete
})), label && Object(external_wp_element_["createElement"])(MarkLabel, {
[32364] Fix | Delete
"aria-hidden": "true",
[32365] Fix | Delete
className: labelClasses,
[32366] Fix | Delete
isFilled: isFilled,
[32367] Fix | Delete
style: style
[32368] Fix | Delete
}, label));
[32369] Fix | Delete
}
[32370] Fix | Delete
[32371] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/rail.js
[32372] Fix | Delete
[32373] Fix | Delete
[32374] Fix | Delete
[32375] Fix | Delete
[32376] Fix | Delete
[32377] Fix | Delete
function rail_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; }
[32378] Fix | Delete
[32379] Fix | Delete
function rail_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { rail_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 { rail_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[32380] Fix | Delete
[32381] Fix | Delete
/**
[32382] Fix | Delete
* WordPress dependencies
[32383] Fix | Delete
*/
[32384] Fix | Delete
[32385] Fix | Delete
/**
[32386] Fix | Delete
* Internal dependencies
[32387] Fix | Delete
*/
[32388] Fix | Delete
[32389] Fix | Delete
[32390] Fix | Delete
[32391] Fix | Delete
function RangeRail(_ref) {
[32392] Fix | Delete
var _ref$disabled = _ref.disabled,
[32393] Fix | Delete
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
[32394] Fix | Delete
_ref$marks = _ref.marks,
[32395] Fix | Delete
marks = _ref$marks === void 0 ? false : _ref$marks,
[32396] Fix | Delete
_ref$min = _ref.min,
[32397] Fix | Delete
min = _ref$min === void 0 ? 0 : _ref$min,
[32398] Fix | Delete
_ref$max = _ref.max,
[32399] Fix | Delete
max = _ref$max === void 0 ? 100 : _ref$max,
[32400] Fix | Delete
_ref$step = _ref.step,
[32401] Fix | Delete
step = _ref$step === void 0 ? 1 : _ref$step,
[32402] Fix | Delete
_ref$value = _ref.value,
[32403] Fix | Delete
value = _ref$value === void 0 ? 0 : _ref$value,
[32404] Fix | Delete
restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["disabled", "marks", "min", "max", "step", "value"]);
[32405] Fix | Delete
[32406] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(Rail, Object(esm_extends["a" /* default */])({
[32407] Fix | Delete
disabled: disabled
[32408] Fix | Delete
}, restProps)), marks && Object(external_wp_element_["createElement"])(Marks, {
[32409] Fix | Delete
disabled: disabled,
[32410] Fix | Delete
marks: marks,
[32411] Fix | Delete
min: min,
[32412] Fix | Delete
max: max,
[32413] Fix | Delete
step: step,
[32414] Fix | Delete
value: value
[32415] Fix | Delete
}));
[32416] Fix | Delete
}
[32417] Fix | Delete
[32418] Fix | Delete
function Marks(_ref2) {
[32419] Fix | Delete
var _ref2$disabled = _ref2.disabled,
[32420] Fix | Delete
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
[32421] Fix | Delete
_ref2$marks = _ref2.marks,
[32422] Fix | Delete
marks = _ref2$marks === void 0 ? false : _ref2$marks,
[32423] Fix | Delete
_ref2$min = _ref2.min,
[32424] Fix | Delete
min = _ref2$min === void 0 ? 0 : _ref2$min,
[32425] Fix | Delete
_ref2$max = _ref2.max,
[32426] Fix | Delete
max = _ref2$max === void 0 ? 100 : _ref2$max,
[32427] Fix | Delete
_ref2$step = _ref2.step,
[32428] Fix | Delete
step = _ref2$step === void 0 ? 1 : _ref2$step,
[32429] Fix | Delete
_ref2$value = _ref2.value,
[32430] Fix | Delete
value = _ref2$value === void 0 ? 0 : _ref2$value;
[32431] Fix | Delete
var marksData = useMarks({
[32432] Fix | Delete
marks: marks,
[32433] Fix | Delete
min: min,
[32434] Fix | Delete
max: max,
[32435] Fix | Delete
step: step,
[32436] Fix | Delete
value: value
[32437] Fix | Delete
});
[32438] Fix | Delete
return Object(external_wp_element_["createElement"])(MarksWrapper, {
[32439] Fix | Delete
"aria-hidden": "true",
[32440] Fix | Delete
className: "components-range-control__marks"
[32441] Fix | Delete
}, marksData.map(function (mark) {
[32442] Fix | Delete
return Object(external_wp_element_["createElement"])(RangeMark, Object(esm_extends["a" /* default */])({}, mark, {
[32443] Fix | Delete
key: mark.key,
[32444] Fix | Delete
"aria-hidden": "true",
[32445] Fix | Delete
disabled: disabled
[32446] Fix | Delete
}));
[32447] Fix | Delete
}));
[32448] Fix | Delete
}
[32449] Fix | Delete
[32450] Fix | Delete
function useMarks(_ref3) {
[32451] Fix | Delete
var marks = _ref3.marks,
[32452] Fix | Delete
_ref3$min = _ref3.min,
[32453] Fix | Delete
min = _ref3$min === void 0 ? 0 : _ref3$min,
[32454] Fix | Delete
_ref3$max = _ref3.max,
[32455] Fix | Delete
max = _ref3$max === void 0 ? 100 : _ref3$max,
[32456] Fix | Delete
_ref3$step = _ref3.step,
[32457] Fix | Delete
step = _ref3$step === void 0 ? 1 : _ref3$step,
[32458] Fix | Delete
_ref3$value = _ref3.value,
[32459] Fix | Delete
value = _ref3$value === void 0 ? 0 : _ref3$value;
[32460] Fix | Delete
[32461] Fix | Delete
if (!marks) {
[32462] Fix | Delete
return [];
[32463] Fix | Delete
}
[32464] Fix | Delete
[32465] Fix | Delete
var range = max - min;
[32466] Fix | Delete
[32467] Fix | Delete
if (!Array.isArray(marks)) {
[32468] Fix | Delete
marks = [];
[32469] Fix | Delete
var count = 1 + Math.round(range / step);
[32470] Fix | Delete
[32471] Fix | Delete
while (count > marks.push({
[32472] Fix | Delete
value: step * marks.length + min
[32473] Fix | Delete
})) {
[32474] Fix | Delete
;
[32475] Fix | Delete
}
[32476] Fix | Delete
}
[32477] Fix | Delete
[32478] Fix | Delete
var placedMarks = [];
[32479] Fix | Delete
marks.forEach(function (mark, index) {
[32480] Fix | Delete
if (mark.value < min || mark.value > max) {
[32481] Fix | Delete
return;
[32482] Fix | Delete
}
[32483] Fix | Delete
[32484] Fix | Delete
var key = "mark-".concat(index);
[32485] Fix | Delete
var isFilled = mark.value <= value;
[32486] Fix | Delete
var offset = "".concat((mark.value - min) / range * 100, "%");
[32487] Fix | Delete
[32488] Fix | Delete
var offsetStyle = Object(esm_defineProperty["a" /* default */])({}, Object(external_wp_i18n_["isRTL"])() ? 'right' : 'left', offset);
[32489] Fix | Delete
[32490] Fix | Delete
placedMarks.push(rail_objectSpread(rail_objectSpread({}, mark), {}, {
[32491] Fix | Delete
isFilled: isFilled,
[32492] Fix | Delete
key: key,
[32493] Fix | Delete
style: offsetStyle
[32494] Fix | Delete
}));
[32495] Fix | Delete
});
[32496] Fix | Delete
return placedMarks;
[32497] Fix | Delete
}
[32498] Fix | Delete
[32499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function