Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
[22000] Fix | Delete
if (change) {
[22001] Fix | Delete
onChange(change, e);
[22002] Fix | Delete
}
[22003] Fix | Delete
}
[22004] Fix | Delete
}, {
[22005] Fix | Delete
key: "handleMouseDown",
[22006] Fix | Delete
value: function handleMouseDown(e) {
[22007] Fix | Delete
this.handleChange(e);
[22008] Fix | Delete
window.addEventListener('mousemove', this.handleChange);
[22009] Fix | Delete
window.addEventListener('mouseup', this.handleMouseUp);
[22010] Fix | Delete
}
[22011] Fix | Delete
}, {
[22012] Fix | Delete
key: "handleMouseUp",
[22013] Fix | Delete
value: function handleMouseUp() {
[22014] Fix | Delete
this.unbindEventListeners();
[22015] Fix | Delete
}
[22016] Fix | Delete
}, {
[22017] Fix | Delete
key: "preventKeyEvents",
[22018] Fix | Delete
value: function preventKeyEvents(event) {
[22019] Fix | Delete
if (event.keyCode === external_wp_keycodes_["TAB"]) {
[22020] Fix | Delete
return;
[22021] Fix | Delete
}
[22022] Fix | Delete
[22023] Fix | Delete
event.preventDefault();
[22024] Fix | Delete
}
[22025] Fix | Delete
}, {
[22026] Fix | Delete
key: "unbindEventListeners",
[22027] Fix | Delete
value: function unbindEventListeners() {
[22028] Fix | Delete
window.removeEventListener('mousemove', this.handleChange);
[22029] Fix | Delete
window.removeEventListener('mouseup', this.handleMouseUp);
[22030] Fix | Delete
}
[22031] Fix | Delete
}, {
[22032] Fix | Delete
key: "render",
[22033] Fix | Delete
value: function render() {
[22034] Fix | Delete
var _this2 = this;
[22035] Fix | Delete
[22036] Fix | Delete
var rgb = this.props.rgb;
[22037] Fix | Delete
var rgbString = "".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b);
[22038] Fix | Delete
var gradient = {
[22039] Fix | Delete
background: "linear-gradient(to right, rgba(".concat(rgbString, ", 0) 0%, rgba(").concat(rgbString, ", 1) 100%)")
[22040] Fix | Delete
};
[22041] Fix | Delete
var pointerLocation = {
[22042] Fix | Delete
left: "".concat(rgb.a * 100, "%")
[22043] Fix | Delete
};
[22044] Fix | Delete
var shortcuts = {
[22045] Fix | Delete
up: function up() {
[22046] Fix | Delete
return _this2.increase();
[22047] Fix | Delete
},
[22048] Fix | Delete
right: function right() {
[22049] Fix | Delete
return _this2.increase();
[22050] Fix | Delete
},
[22051] Fix | Delete
'shift+up': function shiftUp() {
[22052] Fix | Delete
return _this2.increase(0.1);
[22053] Fix | Delete
},
[22054] Fix | Delete
'shift+right': function shiftRight() {
[22055] Fix | Delete
return _this2.increase(0.1);
[22056] Fix | Delete
},
[22057] Fix | Delete
pageup: function pageup() {
[22058] Fix | Delete
return _this2.increase(0.1);
[22059] Fix | Delete
},
[22060] Fix | Delete
end: function end() {
[22061] Fix | Delete
return _this2.increase(1);
[22062] Fix | Delete
},
[22063] Fix | Delete
down: function down() {
[22064] Fix | Delete
return _this2.decrease();
[22065] Fix | Delete
},
[22066] Fix | Delete
left: function left() {
[22067] Fix | Delete
return _this2.decrease();
[22068] Fix | Delete
},
[22069] Fix | Delete
'shift+down': function shiftDown() {
[22070] Fix | Delete
return _this2.decrease(0.1);
[22071] Fix | Delete
},
[22072] Fix | Delete
'shift+left': function shiftLeft() {
[22073] Fix | Delete
return _this2.decrease(0.1);
[22074] Fix | Delete
},
[22075] Fix | Delete
pagedown: function pagedown() {
[22076] Fix | Delete
return _this2.decrease(0.1);
[22077] Fix | Delete
},
[22078] Fix | Delete
home: function home() {
[22079] Fix | Delete
return _this2.decrease(1);
[22080] Fix | Delete
}
[22081] Fix | Delete
};
[22082] Fix | Delete
return Object(external_wp_element_["createElement"])(keyboard_shortcuts, {
[22083] Fix | Delete
shortcuts: shortcuts
[22084] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22085] Fix | Delete
className: "components-color-picker__alpha"
[22086] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22087] Fix | Delete
className: "components-color-picker__alpha-gradient",
[22088] Fix | Delete
style: gradient
[22089] Fix | Delete
}), Object(external_wp_element_["createElement"])("div", {
[22090] Fix | Delete
className: "components-color-picker__alpha-bar",
[22091] Fix | Delete
ref: this.container,
[22092] Fix | Delete
onMouseDown: this.handleMouseDown,
[22093] Fix | Delete
onTouchMove: this.handleChange,
[22094] Fix | Delete
onTouchStart: this.handleChange
[22095] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22096] Fix | Delete
tabIndex: "0",
[22097] Fix | Delete
role: "slider",
[22098] Fix | Delete
"aria-valuemax": "1",
[22099] Fix | Delete
"aria-valuemin": "0",
[22100] Fix | Delete
"aria-valuenow": rgb.a,
[22101] Fix | Delete
"aria-orientation": "horizontal",
[22102] Fix | Delete
"aria-label": Object(external_wp_i18n_["__"])('Alpha value, from 0 (transparent) to 1 (fully opaque).'),
[22103] Fix | Delete
className: "components-color-picker__alpha-pointer",
[22104] Fix | Delete
style: pointerLocation,
[22105] Fix | Delete
onKeyDown: this.preventKeyEvents
[22106] Fix | Delete
}))));
[22107] Fix | Delete
}
[22108] Fix | Delete
}]);
[22109] Fix | Delete
[22110] Fix | Delete
return Alpha;
[22111] Fix | Delete
}(external_wp_element_["Component"]);
[22112] Fix | Delete
/* harmony default export */ var color_picker_alpha = (Object(external_wp_compose_["pure"])(alpha_Alpha));
[22113] Fix | Delete
[22114] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/color-picker/hue.js
[22115] Fix | Delete
[22116] Fix | Delete
[22117] Fix | Delete
[22118] Fix | Delete
[22119] Fix | Delete
[22120] Fix | Delete
[22121] Fix | Delete
[22122] Fix | Delete
[22123] Fix | Delete
function hue_createSuper(Derived) { var hasNativeReflectConstruct = hue_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
[22124] Fix | Delete
[22125] Fix | Delete
function hue_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[22126] Fix | Delete
[22127] Fix | Delete
/**
[22128] Fix | Delete
* Parts of this source were derived and modified from react-color,
[22129] Fix | Delete
* released under the MIT license.
[22130] Fix | Delete
*
[22131] Fix | Delete
* https://github.com/casesandberg/react-color/
[22132] Fix | Delete
*
[22133] Fix | Delete
* Copyright (c) 2015 Case Sandberg
[22134] Fix | Delete
*
[22135] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a copy
[22136] Fix | Delete
* of this software and associated documentation files (the "Software"), to deal
[22137] Fix | Delete
* in the Software without restriction, including without limitation the rights
[22138] Fix | Delete
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
[22139] Fix | Delete
* copies of the Software, and to permit persons to whom the Software is
[22140] Fix | Delete
* furnished to do so, subject to the following conditions:
[22141] Fix | Delete
*
[22142] Fix | Delete
* The above copyright notice and this permission notice shall be included in
[22143] Fix | Delete
* all copies or substantial portions of the Software.
[22144] Fix | Delete
*
[22145] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
[22146] Fix | Delete
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
[22147] Fix | Delete
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
[22148] Fix | Delete
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
[22149] Fix | Delete
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
[22150] Fix | Delete
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
[22151] Fix | Delete
* THE SOFTWARE.
[22152] Fix | Delete
*/
[22153] Fix | Delete
[22154] Fix | Delete
/**
[22155] Fix | Delete
* External dependencies
[22156] Fix | Delete
*/
[22157] Fix | Delete
[22158] Fix | Delete
/**
[22159] Fix | Delete
* WordPress dependencies
[22160] Fix | Delete
*/
[22161] Fix | Delete
[22162] Fix | Delete
[22163] Fix | Delete
[22164] Fix | Delete
[22165] Fix | Delete
[22166] Fix | Delete
/**
[22167] Fix | Delete
* Internal dependencies
[22168] Fix | Delete
*/
[22169] Fix | Delete
[22170] Fix | Delete
[22171] Fix | Delete
[22172] Fix | Delete
[22173] Fix | Delete
var hue_Hue = /*#__PURE__*/function (_Component) {
[22174] Fix | Delete
Object(inherits["a" /* default */])(Hue, _Component);
[22175] Fix | Delete
[22176] Fix | Delete
var _super = hue_createSuper(Hue);
[22177] Fix | Delete
[22178] Fix | Delete
function Hue() {
[22179] Fix | Delete
var _this;
[22180] Fix | Delete
[22181] Fix | Delete
Object(classCallCheck["a" /* default */])(this, Hue);
[22182] Fix | Delete
[22183] Fix | Delete
_this = _super.apply(this, arguments);
[22184] Fix | Delete
_this.container = Object(external_wp_element_["createRef"])();
[22185] Fix | Delete
_this.increase = _this.increase.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22186] Fix | Delete
_this.decrease = _this.decrease.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22187] Fix | Delete
_this.handleChange = _this.handleChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22188] Fix | Delete
_this.handleMouseDown = _this.handleMouseDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22189] Fix | Delete
_this.handleMouseUp = _this.handleMouseUp.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22190] Fix | Delete
return _this;
[22191] Fix | Delete
}
[22192] Fix | Delete
[22193] Fix | Delete
Object(createClass["a" /* default */])(Hue, [{
[22194] Fix | Delete
key: "componentWillUnmount",
[22195] Fix | Delete
value: function componentWillUnmount() {
[22196] Fix | Delete
this.unbindEventListeners();
[22197] Fix | Delete
}
[22198] Fix | Delete
}, {
[22199] Fix | Delete
key: "increase",
[22200] Fix | Delete
value: function increase() {
[22201] Fix | Delete
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
[22202] Fix | Delete
var _this$props = this.props,
[22203] Fix | Delete
hsl = _this$props.hsl,
[22204] Fix | Delete
_this$props$onChange = _this$props.onChange,
[22205] Fix | Delete
onChange = _this$props$onChange === void 0 ? external_lodash_["noop"] : _this$props$onChange;
[22206] Fix | Delete
var change = {
[22207] Fix | Delete
h: hsl.h + amount >= 359 ? 359 : hsl.h + amount,
[22208] Fix | Delete
s: hsl.s,
[22209] Fix | Delete
l: hsl.l,
[22210] Fix | Delete
a: hsl.a,
[22211] Fix | Delete
source: 'rgb'
[22212] Fix | Delete
};
[22213] Fix | Delete
onChange(change);
[22214] Fix | Delete
}
[22215] Fix | Delete
}, {
[22216] Fix | Delete
key: "decrease",
[22217] Fix | Delete
value: function decrease() {
[22218] Fix | Delete
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
[22219] Fix | Delete
var _this$props2 = this.props,
[22220] Fix | Delete
hsl = _this$props2.hsl,
[22221] Fix | Delete
_this$props2$onChange = _this$props2.onChange,
[22222] Fix | Delete
onChange = _this$props2$onChange === void 0 ? external_lodash_["noop"] : _this$props2$onChange;
[22223] Fix | Delete
var change = {
[22224] Fix | Delete
h: hsl.h <= amount ? 0 : hsl.h - amount,
[22225] Fix | Delete
s: hsl.s,
[22226] Fix | Delete
l: hsl.l,
[22227] Fix | Delete
a: hsl.a,
[22228] Fix | Delete
source: 'rgb'
[22229] Fix | Delete
};
[22230] Fix | Delete
onChange(change);
[22231] Fix | Delete
}
[22232] Fix | Delete
}, {
[22233] Fix | Delete
key: "handleChange",
[22234] Fix | Delete
value: function handleChange(e) {
[22235] Fix | Delete
var _this$props$onChange2 = this.props.onChange,
[22236] Fix | Delete
onChange = _this$props$onChange2 === void 0 ? external_lodash_["noop"] : _this$props$onChange2;
[22237] Fix | Delete
var change = calculateHueChange(e, this.props, this.container.current);
[22238] Fix | Delete
[22239] Fix | Delete
if (change) {
[22240] Fix | Delete
onChange(change, e);
[22241] Fix | Delete
}
[22242] Fix | Delete
}
[22243] Fix | Delete
}, {
[22244] Fix | Delete
key: "handleMouseDown",
[22245] Fix | Delete
value: function handleMouseDown(e) {
[22246] Fix | Delete
this.handleChange(e);
[22247] Fix | Delete
window.addEventListener('mousemove', this.handleChange);
[22248] Fix | Delete
window.addEventListener('mouseup', this.handleMouseUp);
[22249] Fix | Delete
}
[22250] Fix | Delete
}, {
[22251] Fix | Delete
key: "handleMouseUp",
[22252] Fix | Delete
value: function handleMouseUp() {
[22253] Fix | Delete
this.unbindEventListeners();
[22254] Fix | Delete
}
[22255] Fix | Delete
}, {
[22256] Fix | Delete
key: "preventKeyEvents",
[22257] Fix | Delete
value: function preventKeyEvents(event) {
[22258] Fix | Delete
if (event.keyCode === external_wp_keycodes_["TAB"]) {
[22259] Fix | Delete
return;
[22260] Fix | Delete
}
[22261] Fix | Delete
[22262] Fix | Delete
event.preventDefault();
[22263] Fix | Delete
}
[22264] Fix | Delete
}, {
[22265] Fix | Delete
key: "unbindEventListeners",
[22266] Fix | Delete
value: function unbindEventListeners() {
[22267] Fix | Delete
window.removeEventListener('mousemove', this.handleChange);
[22268] Fix | Delete
window.removeEventListener('mouseup', this.handleMouseUp);
[22269] Fix | Delete
}
[22270] Fix | Delete
}, {
[22271] Fix | Delete
key: "render",
[22272] Fix | Delete
value: function render() {
[22273] Fix | Delete
var _this2 = this;
[22274] Fix | Delete
[22275] Fix | Delete
var _this$props3 = this.props,
[22276] Fix | Delete
_this$props3$hsl = _this$props3.hsl,
[22277] Fix | Delete
hsl = _this$props3$hsl === void 0 ? {} : _this$props3$hsl,
[22278] Fix | Delete
instanceId = _this$props3.instanceId;
[22279] Fix | Delete
var pointerLocation = {
[22280] Fix | Delete
left: "".concat(hsl.h * 100 / 360, "%")
[22281] Fix | Delete
};
[22282] Fix | Delete
var shortcuts = {
[22283] Fix | Delete
up: function up() {
[22284] Fix | Delete
return _this2.increase();
[22285] Fix | Delete
},
[22286] Fix | Delete
right: function right() {
[22287] Fix | Delete
return _this2.increase();
[22288] Fix | Delete
},
[22289] Fix | Delete
'shift+up': function shiftUp() {
[22290] Fix | Delete
return _this2.increase(10);
[22291] Fix | Delete
},
[22292] Fix | Delete
'shift+right': function shiftRight() {
[22293] Fix | Delete
return _this2.increase(10);
[22294] Fix | Delete
},
[22295] Fix | Delete
pageup: function pageup() {
[22296] Fix | Delete
return _this2.increase(10);
[22297] Fix | Delete
},
[22298] Fix | Delete
end: function end() {
[22299] Fix | Delete
return _this2.increase(359);
[22300] Fix | Delete
},
[22301] Fix | Delete
down: function down() {
[22302] Fix | Delete
return _this2.decrease();
[22303] Fix | Delete
},
[22304] Fix | Delete
left: function left() {
[22305] Fix | Delete
return _this2.decrease();
[22306] Fix | Delete
},
[22307] Fix | Delete
'shift+down': function shiftDown() {
[22308] Fix | Delete
return _this2.decrease(10);
[22309] Fix | Delete
},
[22310] Fix | Delete
'shift+left': function shiftLeft() {
[22311] Fix | Delete
return _this2.decrease(10);
[22312] Fix | Delete
},
[22313] Fix | Delete
pagedown: function pagedown() {
[22314] Fix | Delete
return _this2.decrease(10);
[22315] Fix | Delete
},
[22316] Fix | Delete
home: function home() {
[22317] Fix | Delete
return _this2.decrease(359);
[22318] Fix | Delete
}
[22319] Fix | Delete
};
[22320] Fix | Delete
return Object(external_wp_element_["createElement"])(keyboard_shortcuts, {
[22321] Fix | Delete
shortcuts: shortcuts
[22322] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22323] Fix | Delete
className: "components-color-picker__hue"
[22324] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22325] Fix | Delete
className: "components-color-picker__hue-gradient"
[22326] Fix | Delete
}), Object(external_wp_element_["createElement"])("div", {
[22327] Fix | Delete
className: "components-color-picker__hue-bar",
[22328] Fix | Delete
ref: this.container,
[22329] Fix | Delete
onMouseDown: this.handleMouseDown,
[22330] Fix | Delete
onTouchMove: this.handleChange,
[22331] Fix | Delete
onTouchStart: this.handleChange
[22332] Fix | Delete
}, Object(external_wp_element_["createElement"])("div", {
[22333] Fix | Delete
tabIndex: "0",
[22334] Fix | Delete
role: "slider",
[22335] Fix | Delete
"aria-valuemax": "1",
[22336] Fix | Delete
"aria-valuemin": "359",
[22337] Fix | Delete
"aria-valuenow": hsl.h,
[22338] Fix | Delete
"aria-orientation": "horizontal",
[22339] Fix | Delete
"aria-label": Object(external_wp_i18n_["__"])('Hue value in degrees, from 0 to 359.'),
[22340] Fix | Delete
"aria-describedby": "components-color-picker__hue-description-".concat(instanceId),
[22341] Fix | Delete
className: "components-color-picker__hue-pointer",
[22342] Fix | Delete
style: pointerLocation,
[22343] Fix | Delete
onKeyDown: this.preventKeyEvents
[22344] Fix | Delete
}), Object(external_wp_element_["createElement"])(visually_hidden["a" /* default */], {
[22345] Fix | Delete
as: "p",
[22346] Fix | Delete
id: "components-color-picker__hue-description-".concat(instanceId)
[22347] Fix | Delete
}, Object(external_wp_i18n_["__"])('Move the arrow left or right to change hue.')))));
[22348] Fix | Delete
}
[22349] Fix | Delete
}]);
[22350] Fix | Delete
[22351] Fix | Delete
return Hue;
[22352] Fix | Delete
}(external_wp_element_["Component"]);
[22353] Fix | Delete
/* harmony default export */ var hue = (Object(external_wp_compose_["compose"])(external_wp_compose_["pure"], external_wp_compose_["withInstanceId"])(hue_Hue));
[22354] Fix | Delete
[22355] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text-control/index.js
[22356] Fix | Delete
[22357] Fix | Delete
[22358] Fix | Delete
[22359] Fix | Delete
[22360] Fix | Delete
/**
[22361] Fix | Delete
* WordPress dependencies
[22362] Fix | Delete
*/
[22363] Fix | Delete
[22364] Fix | Delete
[22365] Fix | Delete
/**
[22366] Fix | Delete
* Internal dependencies
[22367] Fix | Delete
*/
[22368] Fix | Delete
[22369] Fix | Delete
[22370] Fix | Delete
/**
[22371] Fix | Delete
* @typedef OwnProps
[22372] Fix | Delete
* @property {string} label Label for the control.
[22373] Fix | Delete
* @property {boolean} [hideLabelFromVision] Whether to accessibly hide the label.
[22374] Fix | Delete
* @property {string} value Value of the input.
[22375] Fix | Delete
* @property {string} [help] Optional help text for the control.
[22376] Fix | Delete
* @property {string} [className] Classname passed to BaseControl wrapper
[22377] Fix | Delete
* @property {(value: string) => void} onChange Handle changes.
[22378] Fix | Delete
* @property {string} [type='text'] Type of the input.
[22379] Fix | Delete
*/
[22380] Fix | Delete
[22381] Fix | Delete
/** @typedef {OwnProps & import('react').ComponentProps<'input'>} Props */
[22382] Fix | Delete
[22383] Fix | Delete
/**
[22384] Fix | Delete
*
[22385] Fix | Delete
* @param {Props} props Props
[22386] Fix | Delete
* @param {import('react').Ref<HTMLInputElement>} [ref]
[22387] Fix | Delete
*/
[22388] Fix | Delete
[22389] Fix | Delete
function TextControl(_ref, ref) {
[22390] Fix | Delete
var label = _ref.label,
[22391] Fix | Delete
hideLabelFromVision = _ref.hideLabelFromVision,
[22392] Fix | Delete
value = _ref.value,
[22393] Fix | Delete
help = _ref.help,
[22394] Fix | Delete
className = _ref.className,
[22395] Fix | Delete
onChange = _ref.onChange,
[22396] Fix | Delete
_ref$type = _ref.type,
[22397] Fix | Delete
type = _ref$type === void 0 ? 'text' : _ref$type,
[22398] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["label", "hideLabelFromVision", "value", "help", "className", "onChange", "type"]);
[22399] Fix | Delete
[22400] Fix | Delete
var instanceId = Object(external_wp_compose_["useInstanceId"])(TextControl);
[22401] Fix | Delete
var id = "inspector-text-control-".concat(instanceId);
[22402] Fix | Delete
[22403] Fix | Delete
var onChangeValue = function onChangeValue(
[22404] Fix | Delete
/** @type {import('react').ChangeEvent<HTMLInputElement>} */
[22405] Fix | Delete
event) {
[22406] Fix | Delete
return onChange(event.target.value);
[22407] Fix | Delete
};
[22408] Fix | Delete
[22409] Fix | Delete
return Object(external_wp_element_["createElement"])(base_control, {
[22410] Fix | Delete
label: label,
[22411] Fix | Delete
hideLabelFromVision: hideLabelFromVision,
[22412] Fix | Delete
id: id,
[22413] Fix | Delete
help: help,
[22414] Fix | Delete
className: className
[22415] Fix | Delete
}, Object(external_wp_element_["createElement"])("input", Object(esm_extends["a" /* default */])({
[22416] Fix | Delete
className: "components-text-control__input",
[22417] Fix | Delete
type: type,
[22418] Fix | Delete
id: id,
[22419] Fix | Delete
value: value,
[22420] Fix | Delete
onChange: onChangeValue,
[22421] Fix | Delete
"aria-describedby": !!help ? id + '__help' : undefined,
[22422] Fix | Delete
ref: ref
[22423] Fix | Delete
}, props)));
[22424] Fix | Delete
}
[22425] Fix | Delete
[22426] Fix | Delete
/* harmony default export */ var text_control = (Object(external_wp_element_["forwardRef"])(TextControl));
[22427] Fix | Delete
[22428] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/color-picker/inputs.js
[22429] Fix | Delete
[22430] Fix | Delete
[22431] Fix | Delete
[22432] Fix | Delete
[22433] Fix | Delete
[22434] Fix | Delete
[22435] Fix | Delete
[22436] Fix | Delete
[22437] Fix | Delete
[22438] Fix | Delete
[22439] Fix | Delete
function inputs_createSuper(Derived) { var hasNativeReflectConstruct = inputs_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
[22440] Fix | Delete
[22441] Fix | Delete
function inputs_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[22442] Fix | Delete
[22443] Fix | Delete
/**
[22444] Fix | Delete
* External dependencies
[22445] Fix | Delete
*/
[22446] Fix | Delete
[22447] Fix | Delete
/**
[22448] Fix | Delete
* WordPress dependencies
[22449] Fix | Delete
*/
[22450] Fix | Delete
[22451] Fix | Delete
[22452] Fix | Delete
[22453] Fix | Delete
[22454] Fix | Delete
[22455] Fix | Delete
[22456] Fix | Delete
[22457] Fix | Delete
/**
[22458] Fix | Delete
* Internal dependencies
[22459] Fix | Delete
*/
[22460] Fix | Delete
[22461] Fix | Delete
[22462] Fix | Delete
[22463] Fix | Delete
[22464] Fix | Delete
[22465] Fix | Delete
/* Wrapper for TextControl, only used to handle intermediate state while typing. */
[22466] Fix | Delete
[22467] Fix | Delete
var inputs_Input = /*#__PURE__*/function (_Component) {
[22468] Fix | Delete
Object(inherits["a" /* default */])(Input, _Component);
[22469] Fix | Delete
[22470] Fix | Delete
var _super = inputs_createSuper(Input);
[22471] Fix | Delete
[22472] Fix | Delete
function Input() {
[22473] Fix | Delete
var _this;
[22474] Fix | Delete
[22475] Fix | Delete
Object(classCallCheck["a" /* default */])(this, Input);
[22476] Fix | Delete
[22477] Fix | Delete
_this = _super.apply(this, arguments);
[22478] Fix | Delete
_this.handleBlur = _this.handleBlur.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22479] Fix | Delete
_this.handleChange = _this.handleChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22480] Fix | Delete
_this.handleKeyDown = _this.handleKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
[22481] Fix | Delete
return _this;
[22482] Fix | Delete
}
[22483] Fix | Delete
[22484] Fix | Delete
Object(createClass["a" /* default */])(Input, [{
[22485] Fix | Delete
key: "handleBlur",
[22486] Fix | Delete
value: function handleBlur() {
[22487] Fix | Delete
var _this$props = this.props,
[22488] Fix | Delete
value = _this$props.value,
[22489] Fix | Delete
valueKey = _this$props.valueKey,
[22490] Fix | Delete
onChange = _this$props.onChange,
[22491] Fix | Delete
source = _this$props.source;
[22492] Fix | Delete
onChange({
[22493] Fix | Delete
source: source,
[22494] Fix | Delete
state: 'commit',
[22495] Fix | Delete
value: value,
[22496] Fix | Delete
valueKey: valueKey
[22497] Fix | Delete
});
[22498] Fix | Delete
}
[22499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function