Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
}
[17000] Fix | Delete
[17001] Fix | Delete
return useRecognizers({
[17002] Fix | Delete
pinch: handler
[17003] Fix | Delete
}, buildPinchConfig.current(config));
[17004] Fix | Delete
}
[17005] Fix | Delete
[17006] Fix | Delete
var WheelRecognizer = /*#__PURE__*/function (_CoordinatesRecognize) {
[17007] Fix | Delete
_inheritsLoose(WheelRecognizer, _CoordinatesRecognize);
[17008] Fix | Delete
[17009] Fix | Delete
function WheelRecognizer() {
[17010] Fix | Delete
var _this;
[17011] Fix | Delete
[17012] Fix | Delete
_this = _CoordinatesRecognize.apply(this, arguments) || this;
[17013] Fix | Delete
_this.ingKey = 'wheeling';
[17014] Fix | Delete
_this.stateKey = 'wheel';
[17015] Fix | Delete
_this.debounced = true;
[17016] Fix | Delete
[17017] Fix | Delete
_this.handleEvent = function (event) {
[17018] Fix | Delete
if (event.ctrlKey && 'pinch' in _this.controller.handlers) return;
[17019] Fix | Delete
if (!_this.enabled) return;
[17020] Fix | Delete
[17021] Fix | Delete
_this.setTimeout(_this.onEnd);
[17022] Fix | Delete
[17023] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[17024] Fix | Delete
[17025] Fix | Delete
var values = addV(getWheelEventValues(event, _this.transform), _this.state.values);
[17026] Fix | Delete
[17027] Fix | Delete
if (!_this.state._active) {
[17028] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event, _this.state.values), getGenericPayload(_assertThisInitialized(_this), event, true)));
[17029] Fix | Delete
[17030] Fix | Delete
var movement = _this.getMovement(values);
[17031] Fix | Delete
[17032] Fix | Delete
var geometry = calculateAllGeometry(movement.delta);
[17033] Fix | Delete
[17034] Fix | Delete
_this.updateGestureState(movement);
[17035] Fix | Delete
[17036] Fix | Delete
_this.updateGestureState(geometry);
[17037] Fix | Delete
} else {
[17038] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getKinematics(values, event)));
[17039] Fix | Delete
}
[17040] Fix | Delete
[17041] Fix | Delete
_this.fireGestureHandler();
[17042] Fix | Delete
};
[17043] Fix | Delete
[17044] Fix | Delete
_this.onEnd = function () {
[17045] Fix | Delete
_this.clean();
[17046] Fix | Delete
[17047] Fix | Delete
if (!_this.state._active) return;
[17048] Fix | Delete
[17049] Fix | Delete
var movement = _this.getMovement(_this.state.values);
[17050] Fix | Delete
[17051] Fix | Delete
_this.updateGestureState(movement);
[17052] Fix | Delete
[17053] Fix | Delete
_this.updateGestureState({
[17054] Fix | Delete
_active: false,
[17055] Fix | Delete
velocities: [0, 0],
[17056] Fix | Delete
velocity: 0
[17057] Fix | Delete
});
[17058] Fix | Delete
[17059] Fix | Delete
_this.fireGestureHandler();
[17060] Fix | Delete
};
[17061] Fix | Delete
[17062] Fix | Delete
return _this;
[17063] Fix | Delete
}
[17064] Fix | Delete
[17065] Fix | Delete
var _proto = WheelRecognizer.prototype;
[17066] Fix | Delete
[17067] Fix | Delete
_proto.addBindings = function addBindings$1(bindings) {
[17068] Fix | Delete
addBindings(bindings, 'onWheel', this.handleEvent);
[17069] Fix | Delete
};
[17070] Fix | Delete
[17071] Fix | Delete
return WheelRecognizer;
[17072] Fix | Delete
}(CoordinatesRecognizer);
[17073] Fix | Delete
[17074] Fix | Delete
/**
[17075] Fix | Delete
* Wheel hook.
[17076] Fix | Delete
*
[17077] Fix | Delete
* @param handler - the function fired every time the wheel gesture updates
[17078] Fix | Delete
* @param the config object including generic options and wheel options
[17079] Fix | Delete
*/
[17080] Fix | Delete
[17081] Fix | Delete
function useWheel(handler, config) {
[17082] Fix | Delete
if (config === void 0) {
[17083] Fix | Delete
config = {};
[17084] Fix | Delete
}
[17085] Fix | Delete
[17086] Fix | Delete
RecognizersMap.set('wheel', WheelRecognizer);
[17087] Fix | Delete
var buildWheelConfig = Object(external_React_["useRef"])();
[17088] Fix | Delete
[17089] Fix | Delete
if (!buildWheelConfig.current) {
[17090] Fix | Delete
buildWheelConfig.current = memoizeOne(_buildWheelConfig, isEqual);
[17091] Fix | Delete
}
[17092] Fix | Delete
[17093] Fix | Delete
return useRecognizers({
[17094] Fix | Delete
wheel: handler
[17095] Fix | Delete
}, buildWheelConfig.current(config));
[17096] Fix | Delete
}
[17097] Fix | Delete
[17098] Fix | Delete
var MoveRecognizer = /*#__PURE__*/function (_CoordinatesRecognize) {
[17099] Fix | Delete
_inheritsLoose(MoveRecognizer, _CoordinatesRecognize);
[17100] Fix | Delete
[17101] Fix | Delete
function MoveRecognizer() {
[17102] Fix | Delete
var _this;
[17103] Fix | Delete
[17104] Fix | Delete
_this = _CoordinatesRecognize.apply(this, arguments) || this;
[17105] Fix | Delete
_this.ingKey = 'moving';
[17106] Fix | Delete
_this.stateKey = 'move';
[17107] Fix | Delete
_this.debounced = true;
[17108] Fix | Delete
[17109] Fix | Delete
_this.onMove = function (event) {
[17110] Fix | Delete
if (!_this.enabled) return;
[17111] Fix | Delete
[17112] Fix | Delete
_this.setTimeout(_this.onMoveEnd);
[17113] Fix | Delete
[17114] Fix | Delete
if (!_this.state._active) _this.onMoveStart(event);else _this.onMoveChange(event);
[17115] Fix | Delete
};
[17116] Fix | Delete
[17117] Fix | Delete
_this.onMoveStart = function (event) {
[17118] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[17119] Fix | Delete
[17120] Fix | Delete
var values = getPointerEventValues(event, _this.transform);
[17121] Fix | Delete
[17122] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event), getGenericPayload(_assertThisInitialized(_this), event, true)));
[17123] Fix | Delete
[17124] Fix | Delete
_this.updateGestureState(_this.getMovement(values));
[17125] Fix | Delete
[17126] Fix | Delete
_this.fireGestureHandler();
[17127] Fix | Delete
};
[17128] Fix | Delete
[17129] Fix | Delete
_this.onMoveChange = function (event) {
[17130] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[17131] Fix | Delete
[17132] Fix | Delete
var values = getPointerEventValues(event, _this.transform);
[17133] Fix | Delete
[17134] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getKinematics(values, event)));
[17135] Fix | Delete
[17136] Fix | Delete
_this.fireGestureHandler();
[17137] Fix | Delete
};
[17138] Fix | Delete
[17139] Fix | Delete
_this.onMoveEnd = function () {
[17140] Fix | Delete
_this.clean();
[17141] Fix | Delete
[17142] Fix | Delete
if (!_this.state._active) return;
[17143] Fix | Delete
var values = _this.state.values;
[17144] Fix | Delete
[17145] Fix | Delete
_this.updateGestureState(_this.getMovement(values));
[17146] Fix | Delete
[17147] Fix | Delete
_this.updateGestureState({
[17148] Fix | Delete
velocities: [0, 0],
[17149] Fix | Delete
velocity: 0,
[17150] Fix | Delete
_active: false
[17151] Fix | Delete
});
[17152] Fix | Delete
[17153] Fix | Delete
_this.fireGestureHandler();
[17154] Fix | Delete
};
[17155] Fix | Delete
[17156] Fix | Delete
_this.hoverTransform = function () {
[17157] Fix | Delete
return _this.controller.config.hover.transform || _this.controller.config.transform;
[17158] Fix | Delete
};
[17159] Fix | Delete
[17160] Fix | Delete
_this.onPointerEnter = function (event) {
[17161] Fix | Delete
_this.controller.state.shared.hovering = true;
[17162] Fix | Delete
if (!_this.controller.config.enabled) return;
[17163] Fix | Delete
[17164] Fix | Delete
if (_this.controller.config.hover.enabled) {
[17165] Fix | Delete
var values = getPointerEventValues(event, _this.hoverTransform());
[17166] Fix | Delete
[17167] Fix | Delete
var state = _extends({}, _this.controller.state.shared, _this.state, getGenericPayload(_assertThisInitialized(_this), event, true), {
[17168] Fix | Delete
args: _this.args,
[17169] Fix | Delete
values: values,
[17170] Fix | Delete
active: true,
[17171] Fix | Delete
hovering: true
[17172] Fix | Delete
});
[17173] Fix | Delete
[17174] Fix | Delete
_this.controller.handlers.hover(_extends({}, state, _this.mapStateValues(state)));
[17175] Fix | Delete
}
[17176] Fix | Delete
[17177] Fix | Delete
if ('move' in _this.controller.handlers) _this.onMoveStart(event);
[17178] Fix | Delete
};
[17179] Fix | Delete
[17180] Fix | Delete
_this.onPointerLeave = function (event) {
[17181] Fix | Delete
_this.controller.state.shared.hovering = false;
[17182] Fix | Delete
if ('move' in _this.controller.handlers) _this.onMoveEnd();
[17183] Fix | Delete
if (!_this.controller.config.hover.enabled) return;
[17184] Fix | Delete
var values = getPointerEventValues(event, _this.hoverTransform());
[17185] Fix | Delete
[17186] Fix | Delete
var state = _extends({}, _this.controller.state.shared, _this.state, getGenericPayload(_assertThisInitialized(_this), event), {
[17187] Fix | Delete
args: _this.args,
[17188] Fix | Delete
values: values,
[17189] Fix | Delete
active: false
[17190] Fix | Delete
});
[17191] Fix | Delete
[17192] Fix | Delete
_this.controller.handlers.hover(_extends({}, state, _this.mapStateValues(state)));
[17193] Fix | Delete
};
[17194] Fix | Delete
[17195] Fix | Delete
return _this;
[17196] Fix | Delete
}
[17197] Fix | Delete
[17198] Fix | Delete
var _proto = MoveRecognizer.prototype;
[17199] Fix | Delete
[17200] Fix | Delete
_proto.addBindings = function addBindings$1(bindings) {
[17201] Fix | Delete
if ('move' in this.controller.handlers) {
[17202] Fix | Delete
addBindings(bindings, 'onPointerMove', this.onMove);
[17203] Fix | Delete
}
[17204] Fix | Delete
[17205] Fix | Delete
if ('hover' in this.controller.handlers) {
[17206] Fix | Delete
addBindings(bindings, 'onPointerEnter', this.onPointerEnter);
[17207] Fix | Delete
[17208] Fix | Delete
addBindings(bindings, 'onPointerLeave', this.onPointerLeave);
[17209] Fix | Delete
}
[17210] Fix | Delete
};
[17211] Fix | Delete
[17212] Fix | Delete
return MoveRecognizer;
[17213] Fix | Delete
}(CoordinatesRecognizer);
[17214] Fix | Delete
[17215] Fix | Delete
/**
[17216] Fix | Delete
* Move hook.
[17217] Fix | Delete
*
[17218] Fix | Delete
* @param handler - the function fired every time the move gesture updates
[17219] Fix | Delete
* @param [config={}] - the config object including generic options and move options
[17220] Fix | Delete
*/
[17221] Fix | Delete
[17222] Fix | Delete
function useMove(handler, config) {
[17223] Fix | Delete
if (config === void 0) {
[17224] Fix | Delete
config = {};
[17225] Fix | Delete
}
[17226] Fix | Delete
[17227] Fix | Delete
RecognizersMap.set('move', MoveRecognizer);
[17228] Fix | Delete
var buildMoveConfig = Object(external_React_["useRef"])();
[17229] Fix | Delete
[17230] Fix | Delete
if (!buildMoveConfig.current) {
[17231] Fix | Delete
buildMoveConfig.current = memoizeOne(_buildMoveConfig, isEqual);
[17232] Fix | Delete
}
[17233] Fix | Delete
[17234] Fix | Delete
return useRecognizers({
[17235] Fix | Delete
move: handler
[17236] Fix | Delete
}, buildMoveConfig.current(config));
[17237] Fix | Delete
}
[17238] Fix | Delete
[17239] Fix | Delete
/**
[17240] Fix | Delete
* Hover hook.
[17241] Fix | Delete
*
[17242] Fix | Delete
* @param handler - the function fired every time the hover gesture updates
[17243] Fix | Delete
* @param [config={}] - the config object including generic options and hover options
[17244] Fix | Delete
*/
[17245] Fix | Delete
[17246] Fix | Delete
function useHover(handler, config) {
[17247] Fix | Delete
if (config === void 0) {
[17248] Fix | Delete
config = {};
[17249] Fix | Delete
}
[17250] Fix | Delete
[17251] Fix | Delete
RecognizersMap.set('hover', MoveRecognizer);
[17252] Fix | Delete
var buildHoverConfig = Object(external_React_["useRef"])();
[17253] Fix | Delete
[17254] Fix | Delete
if (!buildHoverConfig.current) {
[17255] Fix | Delete
buildHoverConfig.current = memoizeOne(_buildHoverConfig, isEqual);
[17256] Fix | Delete
}
[17257] Fix | Delete
[17258] Fix | Delete
return useRecognizers({
[17259] Fix | Delete
hover: handler
[17260] Fix | Delete
}, buildHoverConfig.current(config));
[17261] Fix | Delete
}
[17262] Fix | Delete
[17263] Fix | Delete
var ScrollRecognizer = /*#__PURE__*/function (_CoordinatesRecognize) {
[17264] Fix | Delete
_inheritsLoose(ScrollRecognizer, _CoordinatesRecognize);
[17265] Fix | Delete
[17266] Fix | Delete
function ScrollRecognizer() {
[17267] Fix | Delete
var _this;
[17268] Fix | Delete
[17269] Fix | Delete
_this = _CoordinatesRecognize.apply(this, arguments) || this;
[17270] Fix | Delete
_this.ingKey = 'scrolling';
[17271] Fix | Delete
_this.stateKey = 'scroll';
[17272] Fix | Delete
_this.debounced = true;
[17273] Fix | Delete
[17274] Fix | Delete
_this.handleEvent = function (event) {
[17275] Fix | Delete
if (!_this.enabled) return;
[17276] Fix | Delete
[17277] Fix | Delete
_this.clearTimeout();
[17278] Fix | Delete
[17279] Fix | Delete
_this.setTimeout(_this.onEnd);
[17280] Fix | Delete
[17281] Fix | Delete
var values = getScrollEventValues(event, _this.transform);
[17282] Fix | Delete
[17283] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[17284] Fix | Delete
[17285] Fix | Delete
if (!_this.state._active) {
[17286] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event, _this.state.values), getGenericPayload(_assertThisInitialized(_this), event, true)));
[17287] Fix | Delete
[17288] Fix | Delete
var movementDetection = _this.getMovement(values);
[17289] Fix | Delete
[17290] Fix | Delete
var geometry = calculateAllGeometry(movementDetection.delta);
[17291] Fix | Delete
[17292] Fix | Delete
_this.updateGestureState(movementDetection);
[17293] Fix | Delete
[17294] Fix | Delete
_this.updateGestureState(geometry);
[17295] Fix | Delete
} else {
[17296] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getKinematics(values, event)));
[17297] Fix | Delete
}
[17298] Fix | Delete
[17299] Fix | Delete
_this.fireGestureHandler();
[17300] Fix | Delete
};
[17301] Fix | Delete
[17302] Fix | Delete
_this.onEnd = function () {
[17303] Fix | Delete
_this.clean();
[17304] Fix | Delete
[17305] Fix | Delete
if (!_this.state._active) return;
[17306] Fix | Delete
[17307] Fix | Delete
_this.updateGestureState(_extends({}, _this.getMovement(_this.state.values), {
[17308] Fix | Delete
_active: false,
[17309] Fix | Delete
velocities: [0, 0],
[17310] Fix | Delete
velocity: 0
[17311] Fix | Delete
}));
[17312] Fix | Delete
[17313] Fix | Delete
_this.fireGestureHandler();
[17314] Fix | Delete
};
[17315] Fix | Delete
[17316] Fix | Delete
return _this;
[17317] Fix | Delete
}
[17318] Fix | Delete
[17319] Fix | Delete
var _proto = ScrollRecognizer.prototype;
[17320] Fix | Delete
[17321] Fix | Delete
_proto.addBindings = function addBindings$1(bindings) {
[17322] Fix | Delete
addBindings(bindings, 'onScroll', this.handleEvent);
[17323] Fix | Delete
};
[17324] Fix | Delete
[17325] Fix | Delete
return ScrollRecognizer;
[17326] Fix | Delete
}(CoordinatesRecognizer);
[17327] Fix | Delete
[17328] Fix | Delete
/**
[17329] Fix | Delete
* Scroll hook.
[17330] Fix | Delete
*
[17331] Fix | Delete
* @param handler - the function fired every time the scroll gesture updates
[17332] Fix | Delete
* @param [config={}] - the config object including generic options and scroll options
[17333] Fix | Delete
*/
[17334] Fix | Delete
[17335] Fix | Delete
function useScroll(handler, config) {
[17336] Fix | Delete
if (config === void 0) {
[17337] Fix | Delete
config = {};
[17338] Fix | Delete
}
[17339] Fix | Delete
[17340] Fix | Delete
RecognizersMap.set('scroll', ScrollRecognizer);
[17341] Fix | Delete
var buildScrollConfig = Object(external_React_["useRef"])();
[17342] Fix | Delete
[17343] Fix | Delete
if (!buildScrollConfig.current) {
[17344] Fix | Delete
buildScrollConfig.current = memoizeOne(_buildScrollConfig, isEqual);
[17345] Fix | Delete
}
[17346] Fix | Delete
[17347] Fix | Delete
return useRecognizers({
[17348] Fix | Delete
scroll: handler
[17349] Fix | Delete
}, buildScrollConfig.current(config));
[17350] Fix | Delete
}
[17351] Fix | Delete
[17352] Fix | Delete
var RE_NOT_NATIVE = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;
[17353] Fix | Delete
[17354] Fix | Delete
function sortHandlers(handlers) {
[17355] Fix | Delete
var _native = {};
[17356] Fix | Delete
var handle = {};
[17357] Fix | Delete
var actions = new Set();
[17358] Fix | Delete
[17359] Fix | Delete
for (var key in handlers) {
[17360] Fix | Delete
if (RE_NOT_NATIVE.test(key)) {
[17361] Fix | Delete
actions.add(RegExp.lastMatch);
[17362] Fix | Delete
handle[key] = handlers[key];
[17363] Fix | Delete
} else {
[17364] Fix | Delete
_native[key] = handlers[key];
[17365] Fix | Delete
}
[17366] Fix | Delete
}
[17367] Fix | Delete
[17368] Fix | Delete
return [handle, _native, actions];
[17369] Fix | Delete
}
[17370] Fix | Delete
/**
[17371] Fix | Delete
* @public
[17372] Fix | Delete
*
[17373] Fix | Delete
* The most complete gesture hook, allowing support for multiple gestures.
[17374] Fix | Delete
*
[17375] Fix | Delete
* @param {Handlers} handlers - an object with on[Gesture] keys containg gesture handlers
[17376] Fix | Delete
* @param {UseGestureConfig} [config={}] - the full config object
[17377] Fix | Delete
* @returns {(...args: any[]) => HookReturnType<Config>}
[17378] Fix | Delete
*/
[17379] Fix | Delete
[17380] Fix | Delete
[17381] Fix | Delete
function useGesture(_handlers, config) {
[17382] Fix | Delete
if (config === void 0) {
[17383] Fix | Delete
config = {};
[17384] Fix | Delete
}
[17385] Fix | Delete
[17386] Fix | Delete
var _sortHandlers = sortHandlers(_handlers),
[17387] Fix | Delete
handlers = _sortHandlers[0],
[17388] Fix | Delete
nativeHandlers = _sortHandlers[1],
[17389] Fix | Delete
actions = _sortHandlers[2];
[17390] Fix | Delete
[17391] Fix | Delete
RecognizersMap.set('drag', DragRecognizer);
[17392] Fix | Delete
RecognizersMap.set('hover', MoveRecognizer);
[17393] Fix | Delete
RecognizersMap.set('move', MoveRecognizer);
[17394] Fix | Delete
RecognizersMap.set('pinch', PinchRecognizer);
[17395] Fix | Delete
RecognizersMap.set('scroll', ScrollRecognizer);
[17396] Fix | Delete
RecognizersMap.set('wheel', WheelRecognizer);
[17397] Fix | Delete
var mergedConfig = buildComplexConfig(config, actions);
[17398] Fix | Delete
var internalHandlers = {};
[17399] Fix | Delete
if (actions.has('onDrag')) internalHandlers.drag = includeStartEndHandlers(handlers, 'onDrag');
[17400] Fix | Delete
if (actions.has('onWheel')) internalHandlers.wheel = includeStartEndHandlers(handlers, 'onWheel');
[17401] Fix | Delete
if (actions.has('onScroll')) internalHandlers.scroll = includeStartEndHandlers(handlers, 'onScroll');
[17402] Fix | Delete
if (actions.has('onMove')) internalHandlers.move = includeStartEndHandlers(handlers, 'onMove');
[17403] Fix | Delete
if (actions.has('onPinch')) internalHandlers.pinch = includeStartEndHandlers(handlers, 'onPinch');
[17404] Fix | Delete
if (actions.has('onHover')) internalHandlers.hover = handlers.onHover;
[17405] Fix | Delete
return useRecognizers(internalHandlers, mergedConfig, nativeHandlers);
[17406] Fix | Delete
}
[17407] Fix | Delete
[17408] Fix | Delete
function includeStartEndHandlers(handlers, handlerKey) {
[17409] Fix | Delete
var startKey = handlerKey + 'Start';
[17410] Fix | Delete
var endKey = handlerKey + 'End';
[17411] Fix | Delete
[17412] Fix | Delete
var fn = function fn(state) {
[17413] Fix | Delete
var memo = undefined;
[17414] Fix | Delete
if (state.first && startKey in handlers) handlers[startKey](state);
[17415] Fix | Delete
if (handlerKey in handlers) memo = handlers[handlerKey](state);
[17416] Fix | Delete
if (state.last && endKey in handlers) handlers[endKey](state);
[17417] Fix | Delete
return memo;
[17418] Fix | Delete
};
[17419] Fix | Delete
[17420] Fix | Delete
return fn;
[17421] Fix | Delete
}
[17422] Fix | Delete
[17423] Fix | Delete
[17424] Fix | Delete
[17425] Fix | Delete
// EXTERNAL MODULE: external ["wp","keycodes"]
[17426] Fix | Delete
var external_wp_keycodes_ = __webpack_require__("RxS6");
[17427] Fix | Delete
[17428] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/input-control/utils.js
[17429] Fix | Delete
/**
[17430] Fix | Delete
* WordPress dependencies
[17431] Fix | Delete
*/
[17432] Fix | Delete
[17433] Fix | Delete
/**
[17434] Fix | Delete
* Gets a CSS cursor value based on a drag direction.
[17435] Fix | Delete
*
[17436] Fix | Delete
* @param {string} dragDirection The drag direction.
[17437] Fix | Delete
* @return {string} The CSS cursor value.
[17438] Fix | Delete
*/
[17439] Fix | Delete
[17440] Fix | Delete
function getDragCursor(dragDirection) {
[17441] Fix | Delete
var dragCursor = 'ns-resize';
[17442] Fix | Delete
[17443] Fix | Delete
switch (dragDirection) {
[17444] Fix | Delete
case 'n':
[17445] Fix | Delete
case 's':
[17446] Fix | Delete
dragCursor = 'ns-resize';
[17447] Fix | Delete
break;
[17448] Fix | Delete
[17449] Fix | Delete
case 'e':
[17450] Fix | Delete
case 'w':
[17451] Fix | Delete
dragCursor = 'ew-resize';
[17452] Fix | Delete
break;
[17453] Fix | Delete
}
[17454] Fix | Delete
[17455] Fix | Delete
return dragCursor;
[17456] Fix | Delete
}
[17457] Fix | Delete
/**
[17458] Fix | Delete
* Custom hook that renders a drag cursor when dragging.
[17459] Fix | Delete
*
[17460] Fix | Delete
* @param {boolean} isDragging The dragging state.
[17461] Fix | Delete
* @param {string} dragDirection The drag direction.
[17462] Fix | Delete
*
[17463] Fix | Delete
* @return {string} The CSS cursor value.
[17464] Fix | Delete
*/
[17465] Fix | Delete
[17466] Fix | Delete
function useDragCursor(isDragging, dragDirection) {
[17467] Fix | Delete
var dragCursor = getDragCursor(dragDirection);
[17468] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[17469] Fix | Delete
if (isDragging) {
[17470] Fix | Delete
document.documentElement.style.cursor = dragCursor;
[17471] Fix | Delete
} else {
[17472] Fix | Delete
document.documentElement.style.cursor = null;
[17473] Fix | Delete
}
[17474] Fix | Delete
}, [isDragging]);
[17475] Fix | Delete
return dragCursor;
[17476] Fix | Delete
}
[17477] Fix | Delete
[17478] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/input-control/state.js
[17479] Fix | Delete
[17480] Fix | Delete
[17481] Fix | Delete
[17482] Fix | Delete
function state_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; }
[17483] Fix | Delete
[17484] Fix | Delete
function state_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { state_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 { state_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[17485] Fix | Delete
[17486] Fix | Delete
/**
[17487] Fix | Delete
* External dependencies
[17488] Fix | Delete
*/
[17489] Fix | Delete
[17490] Fix | Delete
/**
[17491] Fix | Delete
* WordPress dependencies
[17492] Fix | Delete
*/
[17493] Fix | Delete
[17494] Fix | Delete
[17495] Fix | Delete
[17496] Fix | Delete
var initialStateReducer = function initialStateReducer(state) {
[17497] Fix | Delete
return state;
[17498] Fix | Delete
};
[17499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function