fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

View File

@@ -0,0 +1,561 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { useEffect, useRef, useState } from '@wordpress/element';
import { __, _n, sprintf } from '@wordpress/i18n';
import { useDebounce, useInstanceId, usePrevious } from '@wordpress/compose';
import { speak } from '@wordpress/a11y';
import isShallowEqual from '@wordpress/is-shallow-equal';
/**
* Internal dependencies
*/
import Token from './token';
import TokenInput from './token-input';
import { TokensAndInputWrapperFlex } from './styles';
import SuggestionsList from './suggestions-list';
import { FlexItem } from '../flex';
import { StyledHelp, StyledLabel } from '../base-control/styles/base-control-styles';
import { Spacer } from '../spacer';
import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
const identity = value => value;
/**
* A `FormTokenField` is a field similar to the tags and categories fields in the interim editor chrome,
* or the "to" field in Mail on OS X. Tokens can be entered by typing them or selecting them from a list of suggested tokens.
*
* Up to one hundred suggestions that match what the user has typed so far will be shown from which the user can pick from (auto-complete).
* Tokens are separated by the "," character. Suggestions can be selected with the up or down arrows and added with the tab or enter key.
*
* The `value` property is handled in a manner similar to controlled form components.
* See [Forms](http://facebook.github.io/react/docs/forms.html) in the React Documentation for more information.
*/
export function FormTokenField(props) {
const {
autoCapitalize,
autoComplete,
maxLength,
placeholder,
label = __('Add item'),
className,
suggestions = [],
maxSuggestions = 100,
value = [],
displayTransform = identity,
saveTransform = token => token.trim(),
onChange = () => {},
onInputChange = () => {},
onFocus = undefined,
isBorderless = false,
disabled = false,
tokenizeOnSpace = false,
messages = {
added: __('Item added.'),
removed: __('Item removed.'),
remove: __('Remove item'),
__experimentalInvalid: __('Invalid item')
},
__experimentalRenderItem,
__experimentalExpandOnFocus = false,
__experimentalValidateInput = () => true,
__experimentalShowHowTo = true,
__next40pxDefaultSize = false,
__experimentalAutoSelectFirstMatch = false,
__nextHasNoMarginBottom = false,
tokenizeOnBlur = false
} = useDeprecated36pxDefaultSizeProp(props, 'wp.components.FormTokenField');
const instanceId = useInstanceId(FormTokenField);
// We reset to these initial values again in the onBlur
const [incompleteTokenValue, setIncompleteTokenValue] = useState('');
const [inputOffsetFromEnd, setInputOffsetFromEnd] = useState(0);
const [isActive, setIsActive] = useState(false);
const [isExpanded, setIsExpanded] = useState(false);
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = useState(-1);
const [selectedSuggestionScroll, setSelectedSuggestionScroll] = useState(false);
const prevSuggestions = usePrevious(suggestions);
const prevValue = usePrevious(value);
const input = useRef(null);
const tokensAndInput = useRef(null);
const debouncedSpeak = useDebounce(speak, 500);
useEffect(() => {
// Make sure to focus the input when the isActive state is true.
if (isActive && !hasFocus()) {
focus();
}
}, [isActive]);
useEffect(() => {
const suggestionsDidUpdate = !isShallowEqual(suggestions, prevSuggestions || []);
if (suggestionsDidUpdate || value !== prevValue) {
updateSuggestions(suggestionsDidUpdate);
}
// TODO: updateSuggestions() should first be refactored so its actual deps are clearer.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [suggestions, prevSuggestions, value, prevValue]);
useEffect(() => {
updateSuggestions();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [incompleteTokenValue]);
useEffect(() => {
updateSuggestions();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [__experimentalAutoSelectFirstMatch]);
if (disabled && isActive) {
setIsActive(false);
setIncompleteTokenValue('');
}
function focus() {
input.current?.focus();
}
function hasFocus() {
return input.current === input.current?.ownerDocument.activeElement;
}
function onFocusHandler(event) {
// If focus is on the input or on the container, set the isActive state to true.
if (hasFocus() || event.target === tokensAndInput.current) {
setIsActive(true);
setIsExpanded(__experimentalExpandOnFocus || isExpanded);
} else {
/*
* Otherwise, focus is on one of the token "remove" buttons and we
* set the isActive state to false to prevent the input to be
* re-focused, see componentDidUpdate().
*/
setIsActive(false);
}
if ('function' === typeof onFocus) {
onFocus(event);
}
}
function onBlur(event) {
if (inputHasValidValue() && __experimentalValidateInput(incompleteTokenValue)) {
setIsActive(false);
if (tokenizeOnBlur && inputHasValidValue()) {
addNewToken(incompleteTokenValue);
}
} else {
// Reset to initial state
setIncompleteTokenValue('');
setInputOffsetFromEnd(0);
setIsActive(false);
if (__experimentalExpandOnFocus) {
// If `__experimentalExpandOnFocus` is true, don't close the suggestions list when
// the user clicks on it (`tokensAndInput` will be the element that caused the blur).
const hasFocusWithin = event.relatedTarget === tokensAndInput.current;
setIsExpanded(hasFocusWithin);
} else {
// Else collapse the suggestion list. This will result in the suggestion list closing
// after a suggestion has been submitted since that causes a blur.
setIsExpanded(false);
}
setSelectedSuggestionIndex(-1);
setSelectedSuggestionScroll(false);
}
}
function onKeyDown(event) {
let preventDefault = false;
if (event.defaultPrevented ||
// Ignore keydowns from IMEs
event.nativeEvent.isComposing ||
// Workaround for Mac Safari where the final Enter/Backspace of an IME composition
// is `isComposing=false`, even though it's technically still part of the composition.
// These can only be detected by keyCode.
event.keyCode === 229) {
return;
}
switch (event.key) {
case 'Backspace':
preventDefault = handleDeleteKey(deleteTokenBeforeInput);
break;
case 'Enter':
preventDefault = addCurrentToken();
break;
case 'ArrowLeft':
preventDefault = handleLeftArrowKey();
break;
case 'ArrowUp':
preventDefault = handleUpArrowKey();
break;
case 'ArrowRight':
preventDefault = handleRightArrowKey();
break;
case 'ArrowDown':
preventDefault = handleDownArrowKey();
break;
case 'Delete':
preventDefault = handleDeleteKey(deleteTokenAfterInput);
break;
case 'Space':
if (tokenizeOnSpace) {
preventDefault = addCurrentToken();
}
break;
case 'Escape':
preventDefault = handleEscapeKey(event);
break;
default:
break;
}
if (preventDefault) {
event.preventDefault();
}
}
function onKeyPress(event) {
let preventDefault = false;
switch (event.key) {
case ',':
preventDefault = handleCommaKey();
break;
default:
break;
}
if (preventDefault) {
event.preventDefault();
}
}
function onContainerTouched(event) {
// Prevent clicking/touching the tokensAndInput container from blurring
// the input and adding the current token.
if (event.target === tokensAndInput.current && isActive) {
event.preventDefault();
}
}
function onTokenClickRemove(event) {
deleteToken(event.value);
focus();
}
function onSuggestionHovered(suggestion) {
const index = getMatchingSuggestions().indexOf(suggestion);
if (index >= 0) {
setSelectedSuggestionIndex(index);
setSelectedSuggestionScroll(false);
}
}
function onSuggestionSelected(suggestion) {
addNewToken(suggestion);
}
function onInputChangeHandler(event) {
const text = event.value;
const separator = tokenizeOnSpace ? /[ ,\t]+/ : /[,\t]+/;
const items = text.split(separator);
const tokenValue = items[items.length - 1] || '';
if (items.length > 1) {
addNewTokens(items.slice(0, -1));
}
setIncompleteTokenValue(tokenValue);
onInputChange(tokenValue);
}
function handleDeleteKey(_deleteToken) {
let preventDefault = false;
if (hasFocus() && isInputEmpty()) {
_deleteToken();
preventDefault = true;
}
return preventDefault;
}
function handleLeftArrowKey() {
let preventDefault = false;
if (isInputEmpty()) {
moveInputBeforePreviousToken();
preventDefault = true;
}
return preventDefault;
}
function handleRightArrowKey() {
let preventDefault = false;
if (isInputEmpty()) {
moveInputAfterNextToken();
preventDefault = true;
}
return preventDefault;
}
function handleUpArrowKey() {
setSelectedSuggestionIndex(index => {
return (index === 0 ? getMatchingSuggestions(incompleteTokenValue, suggestions, value, maxSuggestions, saveTransform).length : index) - 1;
});
setSelectedSuggestionScroll(true);
return true; // PreventDefault.
}
function handleDownArrowKey() {
setSelectedSuggestionIndex(index => {
return (index + 1) % getMatchingSuggestions(incompleteTokenValue, suggestions, value, maxSuggestions, saveTransform).length;
});
setSelectedSuggestionScroll(true);
return true; // PreventDefault.
}
function handleEscapeKey(event) {
if (event.target instanceof HTMLInputElement) {
setIncompleteTokenValue(event.target.value);
setIsExpanded(false);
setSelectedSuggestionIndex(-1);
setSelectedSuggestionScroll(false);
}
return true; // PreventDefault.
}
function handleCommaKey() {
if (inputHasValidValue()) {
addNewToken(incompleteTokenValue);
}
return true; // PreventDefault.
}
function moveInputToIndex(index) {
setInputOffsetFromEnd(value.length - Math.max(index, -1) - 1);
}
function moveInputBeforePreviousToken() {
setInputOffsetFromEnd(prevInputOffsetFromEnd => {
return Math.min(prevInputOffsetFromEnd + 1, value.length);
});
}
function moveInputAfterNextToken() {
setInputOffsetFromEnd(prevInputOffsetFromEnd => {
return Math.max(prevInputOffsetFromEnd - 1, 0);
});
}
function deleteTokenBeforeInput() {
const index = getIndexOfInput() - 1;
if (index > -1) {
deleteToken(value[index]);
}
}
function deleteTokenAfterInput() {
const index = getIndexOfInput();
if (index < value.length) {
deleteToken(value[index]);
// Update input offset since it's the offset from the last token.
moveInputToIndex(index);
}
}
function addCurrentToken() {
let preventDefault = false;
const selectedSuggestion = getSelectedSuggestion();
if (selectedSuggestion) {
addNewToken(selectedSuggestion);
preventDefault = true;
} else if (inputHasValidValue()) {
addNewToken(incompleteTokenValue);
preventDefault = true;
}
return preventDefault;
}
function addNewTokens(tokens) {
const tokensToAdd = [...new Set(tokens.map(saveTransform).filter(Boolean).filter(token => !valueContainsToken(token)))];
if (tokensToAdd.length > 0) {
const newValue = [...value];
newValue.splice(getIndexOfInput(), 0, ...tokensToAdd);
onChange(newValue);
}
}
function addNewToken(token) {
if (!__experimentalValidateInput(token)) {
speak(messages.__experimentalInvalid, 'assertive');
return;
}
addNewTokens([token]);
speak(messages.added, 'assertive');
setIncompleteTokenValue('');
setSelectedSuggestionIndex(-1);
setSelectedSuggestionScroll(false);
setIsExpanded(!__experimentalExpandOnFocus);
if (isActive && !tokenizeOnBlur) {
focus();
}
}
function deleteToken(token) {
const newTokens = value.filter(item => {
return getTokenValue(item) !== getTokenValue(token);
});
onChange(newTokens);
speak(messages.removed, 'assertive');
}
function getTokenValue(token) {
if ('object' === typeof token) {
return token.value;
}
return token;
}
function getMatchingSuggestions(searchValue = incompleteTokenValue, _suggestions = suggestions, _value = value, _maxSuggestions = maxSuggestions, _saveTransform = saveTransform) {
let match = _saveTransform(searchValue);
const startsWithMatch = [];
const containsMatch = [];
const normalizedValue = _value.map(item => {
if (typeof item === 'string') {
return item;
}
return item.value;
});
if (match.length === 0) {
_suggestions = _suggestions.filter(suggestion => !normalizedValue.includes(suggestion));
} else {
match = match.toLocaleLowerCase();
_suggestions.forEach(suggestion => {
const index = suggestion.toLocaleLowerCase().indexOf(match);
if (normalizedValue.indexOf(suggestion) === -1) {
if (index === 0) {
startsWithMatch.push(suggestion);
} else if (index > 0) {
containsMatch.push(suggestion);
}
}
});
_suggestions = startsWithMatch.concat(containsMatch);
}
return _suggestions.slice(0, _maxSuggestions);
}
function getSelectedSuggestion() {
if (selectedSuggestionIndex !== -1) {
return getMatchingSuggestions()[selectedSuggestionIndex];
}
return undefined;
}
function valueContainsToken(token) {
return value.some(item => {
return getTokenValue(token) === getTokenValue(item);
});
}
function getIndexOfInput() {
return value.length - inputOffsetFromEnd;
}
function isInputEmpty() {
return incompleteTokenValue.length === 0;
}
function inputHasValidValue() {
return saveTransform(incompleteTokenValue).length > 0;
}
function updateSuggestions(resetSelectedSuggestion = true) {
const inputHasMinimumChars = incompleteTokenValue.trim().length > 1;
const matchingSuggestions = getMatchingSuggestions(incompleteTokenValue);
const hasMatchingSuggestions = matchingSuggestions.length > 0;
const shouldExpandIfFocuses = hasFocus() && __experimentalExpandOnFocus;
setIsExpanded(shouldExpandIfFocuses || inputHasMinimumChars && hasMatchingSuggestions);
if (resetSelectedSuggestion) {
if (__experimentalAutoSelectFirstMatch && inputHasMinimumChars && hasMatchingSuggestions) {
setSelectedSuggestionIndex(0);
setSelectedSuggestionScroll(true);
} else {
setSelectedSuggestionIndex(-1);
setSelectedSuggestionScroll(false);
}
}
if (inputHasMinimumChars) {
const message = hasMatchingSuggestions ? sprintf( /* translators: %d: number of results. */
_n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');
debouncedSpeak(message, 'assertive');
}
}
function renderTokensAndInput() {
const components = value.map(renderToken);
components.splice(getIndexOfInput(), 0, renderInput());
return components;
}
function renderToken(token, index, tokens) {
const _value = getTokenValue(token);
const status = typeof token !== 'string' ? token.status : undefined;
const termPosition = index + 1;
const termsCount = tokens.length;
return createElement(FlexItem, {
key: 'token-' + _value
}, createElement(Token, {
value: _value,
status: status,
title: typeof token !== 'string' ? token.title : undefined,
displayTransform: displayTransform,
onClickRemove: onTokenClickRemove,
isBorderless: typeof token !== 'string' && token.isBorderless || isBorderless,
onMouseEnter: typeof token !== 'string' ? token.onMouseEnter : undefined,
onMouseLeave: typeof token !== 'string' ? token.onMouseLeave : undefined,
disabled: 'error' !== status && disabled,
messages: messages,
termsCount: termsCount,
termPosition: termPosition
}));
}
function renderInput() {
const inputProps = {
instanceId,
autoCapitalize,
autoComplete,
placeholder: value.length === 0 ? placeholder : '',
key: 'input',
disabled,
value: incompleteTokenValue,
onBlur,
isExpanded,
selectedSuggestionIndex
};
return createElement(TokenInput, {
...inputProps,
onChange: !(maxLength && value.length >= maxLength) ? onInputChangeHandler : undefined,
ref: input
});
}
const classes = classnames(className, 'components-form-token-field__input-container', {
'is-active': isActive,
'is-disabled': disabled
});
let tokenFieldProps = {
className: 'components-form-token-field',
tabIndex: -1
};
const matchingSuggestions = getMatchingSuggestions();
if (!disabled) {
tokenFieldProps = Object.assign({}, tokenFieldProps, {
onKeyDown,
onKeyPress,
onFocus: onFocusHandler
});
}
// Disable reason: There is no appropriate role which describes the
// input container intended accessible usability.
// TODO: Refactor click detection to use blur to stop propagation.
/* eslint-disable jsx-a11y/no-static-element-interactions */
return createElement("div", {
...tokenFieldProps
}, createElement(StyledLabel, {
htmlFor: `components-form-token-input-${instanceId}`,
className: "components-form-token-field__label"
}, label), createElement("div", {
ref: tokensAndInput,
className: classes,
tabIndex: -1,
onMouseDown: onContainerTouched,
onTouchStart: onContainerTouched
}, createElement(TokensAndInputWrapperFlex, {
justify: "flex-start",
align: "center",
gap: 1,
wrap: true,
__next40pxDefaultSize: __next40pxDefaultSize,
hasTokens: !!value.length
}, renderTokensAndInput()), isExpanded && createElement(SuggestionsList, {
instanceId: instanceId,
match: saveTransform(incompleteTokenValue),
displayTransform: displayTransform,
suggestions: matchingSuggestions,
selectedIndex: selectedSuggestionIndex,
scrollIntoView: selectedSuggestionScroll,
onHover: onSuggestionHovered,
onSelect: onSuggestionSelected,
__experimentalRenderItem: __experimentalRenderItem
})), !__nextHasNoMarginBottom && createElement(Spacer, {
marginBottom: 2
}), __experimentalShowHowTo && createElement(StyledHelp, {
id: `components-form-token-suggestions-howto-${instanceId}`,
className: "components-form-token-field__help",
__nextHasNoMarginBottom: __nextHasNoMarginBottom
}, tokenizeOnSpace ? __('Separate with commas, spaces, or the Enter key.') : __('Separate with commas or the Enter key.')));
/* eslint-enable jsx-a11y/no-static-element-interactions */
}
export default FormTokenField;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,24 @@
import _styled from "@emotion/styled/base";
/**
* External dependencies
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { Flex } from '../flex';
import { space } from '../utils/space';
import { boxSizingReset } from '../utils';
const deprecatedPaddings = ({
__next40pxDefaultSize,
hasTokens
}) => !__next40pxDefaultSize && /*#__PURE__*/css("padding-top:", space(hasTokens ? 1 : 0.5), ";padding-bottom:", space(hasTokens ? 1 : 0.5), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:deprecatedPaddings;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZm9ybS10b2tl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xleCA9IHN0eWxlZCggRmxleCApYFxuXHRwYWRkaW5nOiA3cHg7XG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cblxuXHQkeyBkZXByZWNhdGVkUGFkZGluZ3MgfVxuYDtcbiJdfQ== */");
export const TokensAndInputWrapperFlex = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
target: "ehq8nmi0"
} : {
target: "ehq8nmi0",
label: "TokensAndInputWrapperFlex"
})("padding:7px;", boxSizingReset, " ", deprecatedPaddings, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZm9ybS10b2tlbi1maWVsZC9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEJ1RCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2Zvcm0tdG9rZW4tZmllbGQvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vZmxleCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuXG50eXBlIFRva2Vuc0FuZElucHV0V3JhcHBlclByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU6IGJvb2xlYW47XG5cdGhhc1Rva2VuczogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGRlcHJlY2F0ZWRQYWRkaW5ncyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGhhc1Rva2Vucyxcbn06IFRva2Vuc0FuZElucHV0V3JhcHBlclByb3BzICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiZcblx0Y3NzYFxuXHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggaGFzVG9rZW5zID8gMSA6IDAuNSApIH07XG5cdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBoYXNUb2tlbnMgPyAxIDogMC41ICkgfTtcblx0YDtcblxuZXhwb3J0IGNvbnN0IFRva2Vuc0FuZElucHV0V3JhcHBlckZsZXggPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZzogN3B4O1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5cblx0JHsgZGVwcmVjYXRlZFBhZGRpbmdzIH1cbmA7XG4iXX0= */"));
//# sourceMappingURL=styles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["css","Flex","space","boxSizingReset","deprecatedPaddings","__next40pxDefaultSize","hasTokens","process","env","NODE_ENV","TokensAndInputWrapperFlex","_styled","target","label"],"sources":["@wordpress/components/src/form-token-field/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../flex';\nimport { space } from '../utils/space';\nimport { boxSizingReset } from '../utils';\n\ntype TokensAndInputWrapperProps = {\n\t__next40pxDefaultSize: boolean;\n\thasTokens: boolean;\n};\n\nconst deprecatedPaddings = ( {\n\t__next40pxDefaultSize,\n\thasTokens,\n}: TokensAndInputWrapperProps ) =>\n\t! __next40pxDefaultSize &&\n\tcss`\n\t\tpadding-top: ${ space( hasTokens ? 1 : 0.5 ) };\n\t\tpadding-bottom: ${ space( hasTokens ? 1 : 0.5 ) };\n\t`;\n\nexport const TokensAndInputWrapperFlex = styled( Flex )`\n\tpadding: 7px;\n\t${ boxSizingReset }\n\n\t${ deprecatedPaddings }\n`;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,cAAc,QAAQ,UAAU;AAOzC,MAAMC,kBAAkB,GAAGA,CAAE;EAC5BC,qBAAqB;EACrBC;AAC2B,CAAC,KAC5B,CAAED,qBAAqB,iBACvBL,GAAG,iBACcE,KAAK,CAAEI,SAAS,GAAG,CAAC,GAAG,GAAI,CAAC,sBACzBJ,KAAK,CAAEI,SAAS,GAAG,CAAC,GAAG,GAAI,CAAC,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,wDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,m2CAC/C;AAEF,OAAO,MAAMC,yBAAyB,GAAG,aAAAC,OAAA,CAAQV,IAAI,EAAAM,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,iBAEnDV,cAAc,OAEdC,kBAAkB,SAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,o2CACrB"}

View File

@@ -0,0 +1,118 @@
import { createElement } from "react";
/**
* External dependencies
*/
import scrollView from 'dom-scroll-into-view';
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';
import { useRefEffect } from '@wordpress/compose';
/**
* Internal dependencies
*/
const handleMouseDown = e => {
// By preventing default here, we will not lose focus of <input> when clicking a suggestion.
e.preventDefault();
};
export function SuggestionsList({
selectedIndex,
scrollIntoView,
match,
onHover,
onSelect,
suggestions = [],
displayTransform,
instanceId,
__experimentalRenderItem
}) {
const [scrollingIntoView, setScrollingIntoView] = useState(false);
const listRef = useRefEffect(listNode => {
// only have to worry about scrolling selected suggestion into view
// when already expanded.
let rafId;
if (selectedIndex > -1 && scrollIntoView && listNode.children[selectedIndex]) {
setScrollingIntoView(true);
scrollView(listNode.children[selectedIndex], listNode, {
onlyScrollIfNeeded: true
});
rafId = requestAnimationFrame(() => {
setScrollingIntoView(false);
});
}
return () => {
if (rafId !== undefined) {
cancelAnimationFrame(rafId);
}
};
}, [selectedIndex, scrollIntoView]);
const handleHover = suggestion => {
return () => {
if (!scrollingIntoView) {
onHover?.(suggestion);
}
};
};
const handleClick = suggestion => {
return () => {
onSelect?.(suggestion);
};
};
const computeSuggestionMatch = suggestion => {
const matchText = displayTransform(match).toLocaleLowerCase();
if (matchText.length === 0) {
return null;
}
const transformedSuggestion = displayTransform(suggestion);
const indexOfMatch = transformedSuggestion.toLocaleLowerCase().indexOf(matchText);
return {
suggestionBeforeMatch: transformedSuggestion.substring(0, indexOfMatch),
suggestionMatch: transformedSuggestion.substring(indexOfMatch, indexOfMatch + matchText.length),
suggestionAfterMatch: transformedSuggestion.substring(indexOfMatch + matchText.length)
};
};
return createElement("ul", {
ref: listRef,
className: "components-form-token-field__suggestions-list",
id: `components-form-token-suggestions-${instanceId}`,
role: "listbox"
}, suggestions.map((suggestion, index) => {
const matchText = computeSuggestionMatch(suggestion);
const className = classnames('components-form-token-field__suggestion', {
'is-selected': index === selectedIndex
});
let output;
if (typeof __experimentalRenderItem === 'function') {
output = __experimentalRenderItem({
item: suggestion
});
} else if (matchText) {
output = createElement("span", {
"aria-label": displayTransform(suggestion)
}, matchText.suggestionBeforeMatch, createElement("strong", {
className: "components-form-token-field__suggestion-match"
}, matchText.suggestionMatch), matchText.suggestionAfterMatch);
} else {
output = displayTransform(suggestion);
}
/* eslint-disable jsx-a11y/click-events-have-key-events */
return createElement("li", {
id: `components-form-token-suggestions-${instanceId}-${index}`,
role: "option",
className: className,
key: typeof suggestion === 'object' && 'value' in suggestion ? suggestion?.value : displayTransform(suggestion),
onMouseDown: handleMouseDown,
onClick: handleClick(suggestion),
onMouseEnter: handleHover(suggestion),
"aria-selected": index === selectedIndex
}, output);
/* eslint-enable jsx-a11y/click-events-have-key-events */
}));
}
export default SuggestionsList;
//# sourceMappingURL=suggestions-list.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,71 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { forwardRef, useState } from '@wordpress/element';
/**
* Internal dependencies
*/
export function UnForwardedTokenInput(props, ref) {
const {
value,
isExpanded,
instanceId,
selectedSuggestionIndex,
className,
onChange,
onFocus,
onBlur,
...restProps
} = props;
const [hasFocus, setHasFocus] = useState(false);
const size = value ? value.length + 1 : 0;
const onChangeHandler = event => {
if (onChange) {
onChange({
value: event.target.value
});
}
};
const onFocusHandler = e => {
setHasFocus(true);
onFocus?.(e);
};
const onBlurHandler = e => {
setHasFocus(false);
onBlur?.(e);
};
return createElement("input", {
ref: ref,
id: `components-form-token-input-${instanceId}`,
type: "text",
...restProps,
value: value || '',
onChange: onChangeHandler,
onFocus: onFocusHandler,
onBlur: onBlurHandler,
size: size,
className: classnames(className, 'components-form-token-field__input'),
autoComplete: "off",
role: "combobox",
"aria-expanded": isExpanded,
"aria-autocomplete": "list",
"aria-owns": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,
"aria-activedescendant":
// Only add the `aria-activedescendant` attribute when:
// - the user is actively interacting with the input (`hasFocus`)
// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)
// - the list of suggestions are rendered in the DOM (`isExpanded`)
hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,
"aria-describedby": `components-form-token-suggestions-howto-${instanceId}`
});
}
export const TokenInput = forwardRef(UnForwardedTokenInput);
export default TokenInput;
//# sourceMappingURL=token-input.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["classnames","forwardRef","useState","UnForwardedTokenInput","props","ref","value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur","restProps","hasFocus","setHasFocus","size","length","onChangeHandler","event","target","onFocusHandler","e","onBlurHandler","createElement","id","type","autoComplete","role","undefined","TokenInput"],"sources":["@wordpress/components/src/form-token-field/token-input.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, ForwardedRef, FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TokenInputProps } from './types';\n\nexport function UnForwardedTokenInput(\n\tprops: WordPressComponentProps< TokenInputProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tvalue,\n\t\tisExpanded,\n\t\tinstanceId,\n\t\tselectedSuggestionIndex,\n\t\tclassName,\n\t\tonChange,\n\t\tonFocus,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst [ hasFocus, setHasFocus ] = useState( false );\n\n\tconst size = value ? value.length + 1 : 0;\n\n\tconst onChangeHandler = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tif ( onChange ) {\n\t\t\tonChange( {\n\t\t\t\tvalue: event.target.value,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst onFocusHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( true );\n\t\tonFocus?.( e );\n\t};\n\n\tconst onBlurHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( false );\n\t\tonBlur?.( e );\n\t};\n\n\treturn (\n\t\t<input\n\t\t\tref={ ref }\n\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\ttype=\"text\"\n\t\t\t{ ...restProps }\n\t\t\tvalue={ value || '' }\n\t\t\tonChange={ onChangeHandler }\n\t\t\tonFocus={ onFocusHandler }\n\t\t\tonBlur={ onBlurHandler }\n\t\t\tsize={ size }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-form-token-field__input'\n\t\t\t) }\n\t\t\tautoComplete=\"off\"\n\t\t\trole=\"combobox\"\n\t\t\taria-expanded={ isExpanded }\n\t\t\taria-autocomplete=\"list\"\n\t\t\taria-owns={\n\t\t\t\tisExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-activedescendant={\n\t\t\t\t// Only add the `aria-activedescendant` attribute when:\n\t\t\t\t// - the user is actively interacting with the input (`hasFocus`)\n\t\t\t\t// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n\t\t\t\t// - the list of suggestions are rendered in the DOM (`isExpanded`)\n\t\t\t\thasFocus && selectedSuggestionIndex !== -1 && isExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }-${ selectedSuggestionIndex }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-describedby={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t/>\n\t);\n}\n\nexport const TokenInput = forwardRef( UnForwardedTokenInput );\n\nexport default TokenInput;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEzD;AACA;AACA;;AAIA,OAAO,SAASC,qBAAqBA,CACpCC,KAAiE,EACjEC,GAAqC,EACpC;EACD,MAAM;IACLC,KAAK;IACLC,UAAU;IACVC,UAAU;IACVC,uBAAuB;IACvBC,SAAS;IACTC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACN,GAAGC;EACJ,CAAC,GAAGV,KAAK;EAET,MAAM,CAAEW,QAAQ,EAAEC,WAAW,CAAE,GAAGd,QAAQ,CAAE,KAAM,CAAC;EAEnD,MAAMe,IAAI,GAAGX,KAAK,GAAGA,KAAK,CAACY,MAAM,GAAG,CAAC,GAAG,CAAC;EAEzC,MAAMC,eAAe,GAAKC,KAAsC,IAAM;IACrE,IAAKT,QAAQ,EAAG;MACfA,QAAQ,CAAE;QACTL,KAAK,EAAEc,KAAK,CAACC,MAAM,CAACf;MACrB,CAAE,CAAC;IACJ;EACD,CAAC;EAED,MAAMgB,cAAqD,GAAKC,CAAC,IAAM;IACtEP,WAAW,CAAE,IAAK,CAAC;IACnBJ,OAAO,GAAIW,CAAE,CAAC;EACf,CAAC;EAED,MAAMC,aAAoD,GAAKD,CAAC,IAAM;IACrEP,WAAW,CAAE,KAAM,CAAC;IACpBH,MAAM,GAAIU,CAAE,CAAC;EACd,CAAC;EAED,OACCE,aAAA;IACCpB,GAAG,EAAGA,GAAK;IACXqB,EAAE,EAAI,+BAA+BlB,UAAY,EAAG;IACpDmB,IAAI,EAAC,MAAM;IAAA,GACNb,SAAS;IACdR,KAAK,EAAGA,KAAK,IAAI,EAAI;IACrBK,QAAQ,EAAGQ,eAAiB;IAC5BP,OAAO,EAAGU,cAAgB;IAC1BT,MAAM,EAAGW,aAAe;IACxBP,IAAI,EAAGA,IAAM;IACbP,SAAS,EAAGV,UAAU,CACrBU,SAAS,EACT,oCACD,CAAG;IACHkB,YAAY,EAAC,KAAK;IAClBC,IAAI,EAAC,UAAU;IACf,iBAAgBtB,UAAY;IAC5B,qBAAkB,MAAM;IACxB,aACCA,UAAU,GACN,qCAAqCC,UAAY,EAAC,GACnDsB,SACH;IACD;IACC;IACA;IACA;IACA;IACAf,QAAQ,IAAIN,uBAAuB,KAAK,CAAC,CAAC,IAAIF,UAAU,GACpD,qCAAqCC,UAAY,IAAIC,uBAAyB,EAAC,GAChFqB,SACH;IACD,oBAAoB,2CAA2CtB,UAAY;EAAG,CAC9E,CAAC;AAEJ;AAEA,OAAO,MAAMuB,UAAU,GAAG9B,UAAU,CAAEE,qBAAsB,CAAC;AAE7D,eAAe4B,UAAU"}

View File

@@ -0,0 +1,69 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { useInstanceId } from '@wordpress/compose';
import { __, sprintf } from '@wordpress/i18n';
import { closeSmall } from '@wordpress/icons';
/**
* Internal dependencies
*/
import Button from '../button';
import { VisuallyHidden } from '../visually-hidden';
const noop = () => {};
export default function Token({
value,
status,
title,
displayTransform,
isBorderless = false,
disabled = false,
onClickRemove = noop,
onMouseEnter,
onMouseLeave,
messages,
termPosition,
termsCount
}) {
const instanceId = useInstanceId(Token);
const tokenClasses = classnames('components-form-token-field__token', {
'is-error': 'error' === status,
'is-success': 'success' === status,
'is-validating': 'validating' === status,
'is-borderless': isBorderless,
'is-disabled': disabled
});
const onClick = () => onClickRemove({
value
});
const transformedValue = displayTransform(value);
const termPositionAndCount = sprintf( /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
__('%1$s (%2$s of %3$s)'), transformedValue, termPosition, termsCount);
return createElement("span", {
className: tokenClasses,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
title: title
}, createElement("span", {
className: "components-form-token-field__token-text",
id: `components-form-token-field__token-text-${instanceId}`
}, createElement(VisuallyHidden, {
as: "span"
}, termPositionAndCount), createElement("span", {
"aria-hidden": "true"
}, transformedValue)), createElement(Button, {
className: "components-form-token-field__remove-token",
icon: closeSmall,
onClick: !disabled ? onClick : undefined,
disabled: disabled,
label: messages.remove,
"aria-describedby": `components-form-token-field__token-text-${instanceId}`
}));
}
//# sourceMappingURL=token.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["classnames","useInstanceId","__","sprintf","closeSmall","Button","VisuallyHidden","noop","Token","value","status","title","displayTransform","isBorderless","disabled","onClickRemove","onMouseEnter","onMouseLeave","messages","termPosition","termsCount","instanceId","tokenClasses","onClick","transformedValue","termPositionAndCount","createElement","className","id","as","icon","undefined","label","remove"],"sources":["@wordpress/components/src/form-token-field/token.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { TokenProps } from './types';\n\nconst noop = () => {};\n\nexport default function Token( {\n\tvalue,\n\tstatus,\n\ttitle,\n\tdisplayTransform,\n\tisBorderless = false,\n\tdisabled = false,\n\tonClickRemove = noop,\n\tonMouseEnter,\n\tonMouseLeave,\n\tmessages,\n\ttermPosition,\n\ttermsCount,\n}: TokenProps ) {\n\tconst instanceId = useInstanceId( Token );\n\tconst tokenClasses = classnames( 'components-form-token-field__token', {\n\t\t'is-error': 'error' === status,\n\t\t'is-success': 'success' === status,\n\t\t'is-validating': 'validating' === status,\n\t\t'is-borderless': isBorderless,\n\t\t'is-disabled': disabled,\n\t} );\n\n\tconst onClick = () => onClickRemove( { value } );\n\n\tconst transformedValue = displayTransform( value );\n\tconst termPositionAndCount = sprintf(\n\t\t/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n\t\t__( '%1$s (%2$s of %3$s)' ),\n\t\ttransformedValue,\n\t\ttermPosition,\n\t\ttermsCount\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ tokenClasses }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\ttitle={ title }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"components-form-token-field__token-text\"\n\t\t\t\tid={ `components-form-token-field__token-text-${ instanceId }` }\n\t\t\t>\n\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t{ termPositionAndCount }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<span aria-hidden=\"true\">{ transformedValue }</span>\n\t\t\t</span>\n\n\t\t\t<Button\n\t\t\t\tclassName=\"components-form-token-field__remove-token\"\n\t\t\t\ticon={ closeSmall }\n\t\t\t\tonClick={ ! disabled ? onClick : undefined }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tlabel={ messages.remove }\n\t\t\t\taria-describedby={ `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