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: components.js
fn();
[48000] Fix | Delete
}, time);
[48001] Fix | Delete
this.timeoutIds.push(id);
[48002] Fix | Delete
};
[48003] Fix | Delete
[48004] Fix | Delete
this.setItemCount = count => {
[48005] Fix | Delete
this.itemCount = count;
[48006] Fix | Delete
};
[48007] Fix | Delete
[48008] Fix | Delete
this.unsetItemCount = () => {
[48009] Fix | Delete
this.itemCount = null;
[48010] Fix | Delete
};
[48011] Fix | Delete
[48012] Fix | Delete
this.setHighlightedIndex = function (highlightedIndex, otherStateToSet) {
[48013] Fix | Delete
if (highlightedIndex === void 0) {
[48014] Fix | Delete
highlightedIndex = _this.props.defaultHighlightedIndex;
[48015] Fix | Delete
}
[48016] Fix | Delete
[48017] Fix | Delete
if (otherStateToSet === void 0) {
[48018] Fix | Delete
otherStateToSet = {};
[48019] Fix | Delete
}
[48020] Fix | Delete
[48021] Fix | Delete
otherStateToSet = pickState(otherStateToSet);
[48022] Fix | Delete
[48023] Fix | Delete
_this.internalSetState({
[48024] Fix | Delete
highlightedIndex,
[48025] Fix | Delete
...otherStateToSet
[48026] Fix | Delete
});
[48027] Fix | Delete
};
[48028] Fix | Delete
[48029] Fix | Delete
this.clearSelection = cb => {
[48030] Fix | Delete
this.internalSetState({
[48031] Fix | Delete
selectedItem: null,
[48032] Fix | Delete
inputValue: '',
[48033] Fix | Delete
highlightedIndex: this.props.defaultHighlightedIndex,
[48034] Fix | Delete
isOpen: this.props.defaultIsOpen
[48035] Fix | Delete
}, cb);
[48036] Fix | Delete
};
[48037] Fix | Delete
[48038] Fix | Delete
this.selectItem = (item, otherStateToSet, cb) => {
[48039] Fix | Delete
otherStateToSet = pickState(otherStateToSet);
[48040] Fix | Delete
this.internalSetState({
[48041] Fix | Delete
isOpen: this.props.defaultIsOpen,
[48042] Fix | Delete
highlightedIndex: this.props.defaultHighlightedIndex,
[48043] Fix | Delete
selectedItem: item,
[48044] Fix | Delete
inputValue: this.props.itemToString(item),
[48045] Fix | Delete
...otherStateToSet
[48046] Fix | Delete
}, cb);
[48047] Fix | Delete
};
[48048] Fix | Delete
[48049] Fix | Delete
this.selectItemAtIndex = (itemIndex, otherStateToSet, cb) => {
[48050] Fix | Delete
const item = this.items[itemIndex];
[48051] Fix | Delete
[48052] Fix | Delete
if (item == null) {
[48053] Fix | Delete
return;
[48054] Fix | Delete
}
[48055] Fix | Delete
[48056] Fix | Delete
this.selectItem(item, otherStateToSet, cb);
[48057] Fix | Delete
};
[48058] Fix | Delete
[48059] Fix | Delete
this.selectHighlightedItem = (otherStateToSet, cb) => {
[48060] Fix | Delete
return this.selectItemAtIndex(this.getState().highlightedIndex, otherStateToSet, cb);
[48061] Fix | Delete
};
[48062] Fix | Delete
[48063] Fix | Delete
this.internalSetState = (stateToSet, cb) => {
[48064] Fix | Delete
let isItemSelected, onChangeArg;
[48065] Fix | Delete
const onStateChangeArg = {};
[48066] Fix | Delete
const isStateToSetFunction = typeof stateToSet === 'function'; // we want to call `onInputValueChange` before the `setState` call
[48067] Fix | Delete
// so someone controlling the `inputValue` state gets notified of
[48068] Fix | Delete
// the input change as soon as possible. This avoids issues with
[48069] Fix | Delete
// preserving the cursor position.
[48070] Fix | Delete
// See https://github.com/downshift-js/downshift/issues/217 for more info.
[48071] Fix | Delete
[48072] Fix | Delete
if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {
[48073] Fix | Delete
this.props.onInputValueChange(stateToSet.inputValue, { ...this.getStateAndHelpers(),
[48074] Fix | Delete
...stateToSet
[48075] Fix | Delete
});
[48076] Fix | Delete
}
[48077] Fix | Delete
[48078] Fix | Delete
return this.setState(state => {
[48079] Fix | Delete
state = this.getState(state);
[48080] Fix | Delete
let newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet; // Your own function that could modify the state that will be set.
[48081] Fix | Delete
[48082] Fix | Delete
newStateToSet = this.props.stateReducer(state, newStateToSet); // checks if an item is selected, regardless of if it's different from
[48083] Fix | Delete
// what was selected before
[48084] Fix | Delete
// used to determine if onSelect and onChange callbacks should be called
[48085] Fix | Delete
[48086] Fix | Delete
isItemSelected = newStateToSet.hasOwnProperty('selectedItem'); // this keeps track of the object we want to call with setState
[48087] Fix | Delete
[48088] Fix | Delete
const nextState = {}; // this is just used to tell whether the state changed
[48089] Fix | Delete
// and we're trying to update that state. OR if the selection has changed and we're
[48090] Fix | Delete
// trying to update the selection
[48091] Fix | Delete
[48092] Fix | Delete
if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {
[48093] Fix | Delete
onChangeArg = newStateToSet.selectedItem;
[48094] Fix | Delete
}
[48095] Fix | Delete
[48096] Fix | Delete
newStateToSet.type = newStateToSet.type || unknown;
[48097] Fix | Delete
Object.keys(newStateToSet).forEach(key => {
[48098] Fix | Delete
// onStateChangeArg should only have the state that is
[48099] Fix | Delete
// actually changing
[48100] Fix | Delete
if (state[key] !== newStateToSet[key]) {
[48101] Fix | Delete
onStateChangeArg[key] = newStateToSet[key];
[48102] Fix | Delete
} // the type is useful for the onStateChangeArg
[48103] Fix | Delete
// but we don't actually want to set it in internal state.
[48104] Fix | Delete
// this is an undocumented feature for now... Not all internalSetState
[48105] Fix | Delete
// calls support it and I'm not certain we want them to yet.
[48106] Fix | Delete
// But it enables users controlling the isOpen state to know when
[48107] Fix | Delete
// the isOpen state changes due to mouseup events which is quite handy.
[48108] Fix | Delete
[48109] Fix | Delete
[48110] Fix | Delete
if (key === 'type') {
[48111] Fix | Delete
return;
[48112] Fix | Delete
}
[48113] Fix | Delete
[48114] Fix | Delete
newStateToSet[key]; // if it's coming from props, then we don't care to set it internally
[48115] Fix | Delete
[48116] Fix | Delete
if (!isControlledProp(this.props, key)) {
[48117] Fix | Delete
nextState[key] = newStateToSet[key];
[48118] Fix | Delete
}
[48119] Fix | Delete
}); // if stateToSet is a function, then we weren't able to call onInputValueChange
[48120] Fix | Delete
// earlier, so we'll call it now that we know what the inputValue state will be.
[48121] Fix | Delete
[48122] Fix | Delete
if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {
[48123] Fix | Delete
this.props.onInputValueChange(newStateToSet.inputValue, { ...this.getStateAndHelpers(),
[48124] Fix | Delete
...newStateToSet
[48125] Fix | Delete
});
[48126] Fix | Delete
}
[48127] Fix | Delete
[48128] Fix | Delete
return nextState;
[48129] Fix | Delete
}, () => {
[48130] Fix | Delete
// call the provided callback if it's a function
[48131] Fix | Delete
cbToCb(cb)(); // only call the onStateChange and onChange callbacks if
[48132] Fix | Delete
// we have relevant information to pass them.
[48133] Fix | Delete
[48134] Fix | Delete
const hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;
[48135] Fix | Delete
[48136] Fix | Delete
if (hasMoreStateThanType) {
[48137] Fix | Delete
this.props.onStateChange(onStateChangeArg, this.getStateAndHelpers());
[48138] Fix | Delete
}
[48139] Fix | Delete
[48140] Fix | Delete
if (isItemSelected) {
[48141] Fix | Delete
this.props.onSelect(stateToSet.selectedItem, this.getStateAndHelpers());
[48142] Fix | Delete
}
[48143] Fix | Delete
[48144] Fix | Delete
if (onChangeArg !== undefined) {
[48145] Fix | Delete
this.props.onChange(onChangeArg, this.getStateAndHelpers());
[48146] Fix | Delete
} // this is currently undocumented and therefore subject to change
[48147] Fix | Delete
// We'll try to not break it, but just be warned.
[48148] Fix | Delete
[48149] Fix | Delete
[48150] Fix | Delete
this.props.onUserAction(onStateChangeArg, this.getStateAndHelpers());
[48151] Fix | Delete
});
[48152] Fix | Delete
};
[48153] Fix | Delete
[48154] Fix | Delete
this.rootRef = node => this._rootNode = node;
[48155] Fix | Delete
[48156] Fix | Delete
this.getRootProps = function (_temp, _temp2) {
[48157] Fix | Delete
let {
[48158] Fix | Delete
refKey = 'ref',
[48159] Fix | Delete
ref,
[48160] Fix | Delete
...rest
[48161] Fix | Delete
} = _temp === void 0 ? {} : _temp;
[48162] Fix | Delete
let {
[48163] Fix | Delete
suppressRefError = false
[48164] Fix | Delete
} = _temp2 === void 0 ? {} : _temp2;
[48165] Fix | Delete
// this is used in the render to know whether the user has called getRootProps.
[48166] Fix | Delete
// It uses that to know whether to apply the props automatically
[48167] Fix | Delete
_this.getRootProps.called = true;
[48168] Fix | Delete
_this.getRootProps.refKey = refKey;
[48169] Fix | Delete
_this.getRootProps.suppressRefError = suppressRefError;
[48170] Fix | Delete
[48171] Fix | Delete
const {
[48172] Fix | Delete
isOpen
[48173] Fix | Delete
} = _this.getState();
[48174] Fix | Delete
[48175] Fix | Delete
return {
[48176] Fix | Delete
[refKey]: handleRefs(ref, _this.rootRef),
[48177] Fix | Delete
role: 'combobox',
[48178] Fix | Delete
'aria-expanded': isOpen,
[48179] Fix | Delete
'aria-haspopup': 'listbox',
[48180] Fix | Delete
'aria-owns': isOpen ? _this.menuId : null,
[48181] Fix | Delete
'aria-labelledby': _this.labelId,
[48182] Fix | Delete
...rest
[48183] Fix | Delete
};
[48184] Fix | Delete
};
[48185] Fix | Delete
[48186] Fix | Delete
this.keyDownHandlers = {
[48187] Fix | Delete
ArrowDown(event) {
[48188] Fix | Delete
event.preventDefault();
[48189] Fix | Delete
[48190] Fix | Delete
if (this.getState().isOpen) {
[48191] Fix | Delete
const amount = event.shiftKey ? 5 : 1;
[48192] Fix | Delete
this.moveHighlightedIndex(amount, {
[48193] Fix | Delete
type: keyDownArrowDown
[48194] Fix | Delete
});
[48195] Fix | Delete
} else {
[48196] Fix | Delete
this.internalSetState({
[48197] Fix | Delete
isOpen: true,
[48198] Fix | Delete
type: keyDownArrowDown
[48199] Fix | Delete
}, () => {
[48200] Fix | Delete
const itemCount = this.getItemCount();
[48201] Fix | Delete
[48202] Fix | Delete
if (itemCount > 0) {
[48203] Fix | Delete
const {
[48204] Fix | Delete
highlightedIndex
[48205] Fix | Delete
} = this.getState();
[48206] Fix | Delete
const nextHighlightedIndex = getNextWrappingIndex(1, highlightedIndex, itemCount, index => this.getItemNodeFromIndex(index));
[48207] Fix | Delete
this.setHighlightedIndex(nextHighlightedIndex, {
[48208] Fix | Delete
type: keyDownArrowDown
[48209] Fix | Delete
});
[48210] Fix | Delete
}
[48211] Fix | Delete
});
[48212] Fix | Delete
}
[48213] Fix | Delete
},
[48214] Fix | Delete
[48215] Fix | Delete
ArrowUp(event) {
[48216] Fix | Delete
event.preventDefault();
[48217] Fix | Delete
[48218] Fix | Delete
if (this.getState().isOpen) {
[48219] Fix | Delete
const amount = event.shiftKey ? -5 : -1;
[48220] Fix | Delete
this.moveHighlightedIndex(amount, {
[48221] Fix | Delete
type: keyDownArrowUp
[48222] Fix | Delete
});
[48223] Fix | Delete
} else {
[48224] Fix | Delete
this.internalSetState({
[48225] Fix | Delete
isOpen: true,
[48226] Fix | Delete
type: keyDownArrowUp
[48227] Fix | Delete
}, () => {
[48228] Fix | Delete
const itemCount = this.getItemCount();
[48229] Fix | Delete
[48230] Fix | Delete
if (itemCount > 0) {
[48231] Fix | Delete
const {
[48232] Fix | Delete
highlightedIndex
[48233] Fix | Delete
} = this.getState();
[48234] Fix | Delete
const nextHighlightedIndex = getNextWrappingIndex(-1, highlightedIndex, itemCount, index => this.getItemNodeFromIndex(index));
[48235] Fix | Delete
this.setHighlightedIndex(nextHighlightedIndex, {
[48236] Fix | Delete
type: keyDownArrowUp
[48237] Fix | Delete
});
[48238] Fix | Delete
}
[48239] Fix | Delete
});
[48240] Fix | Delete
}
[48241] Fix | Delete
},
[48242] Fix | Delete
[48243] Fix | Delete
Enter(event) {
[48244] Fix | Delete
if (event.which === 229) {
[48245] Fix | Delete
return;
[48246] Fix | Delete
}
[48247] Fix | Delete
[48248] Fix | Delete
const {
[48249] Fix | Delete
isOpen,
[48250] Fix | Delete
highlightedIndex
[48251] Fix | Delete
} = this.getState();
[48252] Fix | Delete
[48253] Fix | Delete
if (isOpen && highlightedIndex != null) {
[48254] Fix | Delete
event.preventDefault();
[48255] Fix | Delete
const item = this.items[highlightedIndex];
[48256] Fix | Delete
const itemNode = this.getItemNodeFromIndex(highlightedIndex);
[48257] Fix | Delete
[48258] Fix | Delete
if (item == null || itemNode && itemNode.hasAttribute('disabled')) {
[48259] Fix | Delete
return;
[48260] Fix | Delete
}
[48261] Fix | Delete
[48262] Fix | Delete
this.selectHighlightedItem({
[48263] Fix | Delete
type: keyDownEnter
[48264] Fix | Delete
});
[48265] Fix | Delete
}
[48266] Fix | Delete
},
[48267] Fix | Delete
[48268] Fix | Delete
Escape(event) {
[48269] Fix | Delete
event.preventDefault();
[48270] Fix | Delete
this.reset({
[48271] Fix | Delete
type: keyDownEscape,
[48272] Fix | Delete
...(!this.state.isOpen && {
[48273] Fix | Delete
selectedItem: null,
[48274] Fix | Delete
inputValue: ''
[48275] Fix | Delete
})
[48276] Fix | Delete
});
[48277] Fix | Delete
}
[48278] Fix | Delete
[48279] Fix | Delete
};
[48280] Fix | Delete
this.buttonKeyDownHandlers = { ...this.keyDownHandlers,
[48281] Fix | Delete
[48282] Fix | Delete
' '(event) {
[48283] Fix | Delete
event.preventDefault();
[48284] Fix | Delete
this.toggleMenu({
[48285] Fix | Delete
type: keyDownSpaceButton
[48286] Fix | Delete
});
[48287] Fix | Delete
}
[48288] Fix | Delete
[48289] Fix | Delete
};
[48290] Fix | Delete
this.inputKeyDownHandlers = { ...this.keyDownHandlers,
[48291] Fix | Delete
[48292] Fix | Delete
Home(event) {
[48293] Fix | Delete
const {
[48294] Fix | Delete
isOpen
[48295] Fix | Delete
} = this.getState();
[48296] Fix | Delete
[48297] Fix | Delete
if (!isOpen) {
[48298] Fix | Delete
return;
[48299] Fix | Delete
}
[48300] Fix | Delete
[48301] Fix | Delete
event.preventDefault();
[48302] Fix | Delete
const itemCount = this.getItemCount();
[48303] Fix | Delete
[48304] Fix | Delete
if (itemCount <= 0 || !isOpen) {
[48305] Fix | Delete
return;
[48306] Fix | Delete
} // get next non-disabled starting downwards from 0 if that's disabled.
[48307] Fix | Delete
[48308] Fix | Delete
[48309] Fix | Delete
const newHighlightedIndex = getNextNonDisabledIndex(1, 0, itemCount, index => this.getItemNodeFromIndex(index), false);
[48310] Fix | Delete
this.setHighlightedIndex(newHighlightedIndex, {
[48311] Fix | Delete
type: keyDownHome
[48312] Fix | Delete
});
[48313] Fix | Delete
},
[48314] Fix | Delete
[48315] Fix | Delete
End(event) {
[48316] Fix | Delete
const {
[48317] Fix | Delete
isOpen
[48318] Fix | Delete
} = this.getState();
[48319] Fix | Delete
[48320] Fix | Delete
if (!isOpen) {
[48321] Fix | Delete
return;
[48322] Fix | Delete
}
[48323] Fix | Delete
[48324] Fix | Delete
event.preventDefault();
[48325] Fix | Delete
const itemCount = this.getItemCount();
[48326] Fix | Delete
[48327] Fix | Delete
if (itemCount <= 0 || !isOpen) {
[48328] Fix | Delete
return;
[48329] Fix | Delete
} // get next non-disabled starting upwards from last index if that's disabled.
[48330] Fix | Delete
[48331] Fix | Delete
[48332] Fix | Delete
const newHighlightedIndex = getNextNonDisabledIndex(-1, itemCount - 1, itemCount, index => this.getItemNodeFromIndex(index), false);
[48333] Fix | Delete
this.setHighlightedIndex(newHighlightedIndex, {
[48334] Fix | Delete
type: keyDownEnd
[48335] Fix | Delete
});
[48336] Fix | Delete
}
[48337] Fix | Delete
[48338] Fix | Delete
};
[48339] Fix | Delete
[48340] Fix | Delete
this.getToggleButtonProps = function (_temp3) {
[48341] Fix | Delete
let {
[48342] Fix | Delete
onClick,
[48343] Fix | Delete
onPress,
[48344] Fix | Delete
onKeyDown,
[48345] Fix | Delete
onKeyUp,
[48346] Fix | Delete
onBlur,
[48347] Fix | Delete
...rest
[48348] Fix | Delete
} = _temp3 === void 0 ? {} : _temp3;
[48349] Fix | Delete
[48350] Fix | Delete
const {
[48351] Fix | Delete
isOpen
[48352] Fix | Delete
} = _this.getState();
[48353] Fix | Delete
[48354] Fix | Delete
const enabledEventHandlers = {
[48355] Fix | Delete
onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),
[48356] Fix | Delete
onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),
[48357] Fix | Delete
onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),
[48358] Fix | Delete
onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)
[48359] Fix | Delete
};
[48360] Fix | Delete
const eventHandlers = rest.disabled ? {} : enabledEventHandlers;
[48361] Fix | Delete
return {
[48362] Fix | Delete
type: 'button',
[48363] Fix | Delete
role: 'button',
[48364] Fix | Delete
'aria-label': isOpen ? 'close menu' : 'open menu',
[48365] Fix | Delete
'aria-haspopup': true,
[48366] Fix | Delete
'data-toggle': true,
[48367] Fix | Delete
...eventHandlers,
[48368] Fix | Delete
...rest
[48369] Fix | Delete
};
[48370] Fix | Delete
};
[48371] Fix | Delete
[48372] Fix | Delete
this.buttonHandleKeyUp = event => {
[48373] Fix | Delete
// Prevent click event from emitting in Firefox
[48374] Fix | Delete
event.preventDefault();
[48375] Fix | Delete
};
[48376] Fix | Delete
[48377] Fix | Delete
this.buttonHandleKeyDown = event => {
[48378] Fix | Delete
const key = normalizeArrowKey(event);
[48379] Fix | Delete
[48380] Fix | Delete
if (this.buttonKeyDownHandlers[key]) {
[48381] Fix | Delete
this.buttonKeyDownHandlers[key].call(this, event);
[48382] Fix | Delete
}
[48383] Fix | Delete
};
[48384] Fix | Delete
[48385] Fix | Delete
this.buttonHandleClick = event => {
[48386] Fix | Delete
event.preventDefault(); // handle odd case for Safari and Firefox which
[48387] Fix | Delete
// don't give the button the focus properly.
[48388] Fix | Delete
[48389] Fix | Delete
/* istanbul ignore if (can't reasonably test this) */
[48390] Fix | Delete
[48391] Fix | Delete
if (this.props.environment.document.activeElement === this.props.environment.document.body) {
[48392] Fix | Delete
event.target.focus();
[48393] Fix | Delete
} // to simplify testing components that use downshift, we'll not wrap this in a setTimeout
[48394] Fix | Delete
// if the NODE_ENV is test. With the proper build system, this should be dead code eliminated
[48395] Fix | Delete
// when building for production and should therefore have no impact on production code.
[48396] Fix | Delete
[48397] Fix | Delete
[48398] Fix | Delete
if (false) {} else {
[48399] Fix | Delete
// Ensure that toggle of menu occurs after the potential blur event in iOS
[48400] Fix | Delete
this.internalSetTimeout(() => this.toggleMenu({
[48401] Fix | Delete
type: clickButton
[48402] Fix | Delete
}));
[48403] Fix | Delete
}
[48404] Fix | Delete
};
[48405] Fix | Delete
[48406] Fix | Delete
this.buttonHandleBlur = event => {
[48407] Fix | Delete
const blurTarget = event.target; // Save blur target for comparison with activeElement later
[48408] Fix | Delete
// Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element
[48409] Fix | Delete
[48410] Fix | Delete
this.internalSetTimeout(() => {
[48411] Fix | Delete
if (!this.isMouseDown && (this.props.environment.document.activeElement == null || this.props.environment.document.activeElement.id !== this.inputId) && this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)
[48412] Fix | Delete
) {
[48413] Fix | Delete
this.reset({
[48414] Fix | Delete
type: blurButton
[48415] Fix | Delete
});
[48416] Fix | Delete
}
[48417] Fix | Delete
});
[48418] Fix | Delete
};
[48419] Fix | Delete
[48420] Fix | Delete
this.getLabelProps = props => {
[48421] Fix | Delete
return {
[48422] Fix | Delete
htmlFor: this.inputId,
[48423] Fix | Delete
id: this.labelId,
[48424] Fix | Delete
...props
[48425] Fix | Delete
};
[48426] Fix | Delete
};
[48427] Fix | Delete
[48428] Fix | Delete
this.getInputProps = function (_temp4) {
[48429] Fix | Delete
let {
[48430] Fix | Delete
onKeyDown,
[48431] Fix | Delete
onBlur,
[48432] Fix | Delete
onChange,
[48433] Fix | Delete
onInput,
[48434] Fix | Delete
onChangeText,
[48435] Fix | Delete
...rest
[48436] Fix | Delete
} = _temp4 === void 0 ? {} : _temp4;
[48437] Fix | Delete
let onChangeKey;
[48438] Fix | Delete
let eventHandlers = {};
[48439] Fix | Delete
/* istanbul ignore next (preact) */
[48440] Fix | Delete
[48441] Fix | Delete
{
[48442] Fix | Delete
onChangeKey = 'onChange';
[48443] Fix | Delete
}
[48444] Fix | Delete
[48445] Fix | Delete
const {
[48446] Fix | Delete
inputValue,
[48447] Fix | Delete
isOpen,
[48448] Fix | Delete
highlightedIndex
[48449] Fix | Delete
} = _this.getState();
[48450] Fix | Delete
[48451] Fix | Delete
if (!rest.disabled) {
[48452] Fix | Delete
eventHandlers = {
[48453] Fix | Delete
[onChangeKey]: callAllEventHandlers(onChange, onInput, _this.inputHandleChange),
[48454] Fix | Delete
onKeyDown: callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown),
[48455] Fix | Delete
onBlur: callAllEventHandlers(onBlur, _this.inputHandleBlur)
[48456] Fix | Delete
};
[48457] Fix | Delete
}
[48458] Fix | Delete
[48459] Fix | Delete
return {
[48460] Fix | Delete
'aria-autocomplete': 'list',
[48461] Fix | Delete
'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : null,
[48462] Fix | Delete
'aria-controls': isOpen ? _this.menuId : null,
[48463] Fix | Delete
'aria-labelledby': _this.labelId,
[48464] Fix | Delete
// https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
[48465] Fix | Delete
// revert back since autocomplete="nope" is ignored on latest Chrome and Opera
[48466] Fix | Delete
autoComplete: 'off',
[48467] Fix | Delete
value: inputValue,
[48468] Fix | Delete
id: _this.inputId,
[48469] Fix | Delete
...eventHandlers,
[48470] Fix | Delete
...rest
[48471] Fix | Delete
};
[48472] Fix | Delete
};
[48473] Fix | Delete
[48474] Fix | Delete
this.inputHandleKeyDown = event => {
[48475] Fix | Delete
const key = normalizeArrowKey(event);
[48476] Fix | Delete
[48477] Fix | Delete
if (key && this.inputKeyDownHandlers[key]) {
[48478] Fix | Delete
this.inputKeyDownHandlers[key].call(this, event);
[48479] Fix | Delete
}
[48480] Fix | Delete
};
[48481] Fix | Delete
[48482] Fix | Delete
this.inputHandleChange = event => {
[48483] Fix | Delete
this.internalSetState({
[48484] Fix | Delete
type: changeInput,
[48485] Fix | Delete
isOpen: true,
[48486] Fix | Delete
inputValue: event.target.value,
[48487] Fix | Delete
highlightedIndex: this.props.defaultHighlightedIndex
[48488] Fix | Delete
});
[48489] Fix | Delete
};
[48490] Fix | Delete
[48491] Fix | Delete
this.inputHandleBlur = () => {
[48492] Fix | Delete
// Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element
[48493] Fix | Delete
this.internalSetTimeout(() => {
[48494] Fix | Delete
const downshiftButtonIsActive = this.props.environment.document && !!this.props.environment.document.activeElement && !!this.props.environment.document.activeElement.dataset && this.props.environment.document.activeElement.dataset.toggle && this._rootNode && this._rootNode.contains(this.props.environment.document.activeElement);
[48495] Fix | Delete
[48496] Fix | Delete
if (!this.isMouseDown && !downshiftButtonIsActive) {
[48497] Fix | Delete
this.reset({
[48498] Fix | Delete
type: blurInput
[48499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function