@skbkontur/react-ui 5.3.4 → 5.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/cjs/components/ComboBox/ComboBox.d.ts +4 -1
- package/cjs/components/ComboBox/ComboBox.js +5 -0
- package/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/cjs/components/FileUploader/FileUploader.js +1 -0
- package/cjs/components/FileUploader/FileUploader.js.map +1 -1
- package/cjs/components/MaskedInput/MaskedInput.d.ts +8 -0
- package/cjs/components/MaskedInput/MaskedInput.js +23 -2
- package/cjs/components/MaskedInput/MaskedInput.js.map +1 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +3 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.js +23 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +3 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.js +8 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox.d.ts +4 -1
- package/components/FileUploader/FileUploader/FileUploader.js +1 -0
- package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
- package/components/MaskedInput/MaskedInput/MaskedInput.js +11 -1
- package/components/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
- package/components/MaskedInput/MaskedInput.d.ts +8 -0
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +33 -12
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +3 -1
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +4 -0
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReactDOM","globalObject","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ReactUIFeatureFlagsContext","getFullReactUIFlagsContext","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","size","CustomComboBox","_class","_CustomComboBox","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","call","apply","concat","state","requestId","cancelationToken","canOpenPopup","cancelLoaderDelay","focus","opts","props","disabled","withoutOpenDropdown","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","forEach","handleEffect","version","search","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","searchOnFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","close","setTimeout","handleInputClick","_inheritsLoose","_proto","prototype","_search","_asyncToGenerator","_regeneratorRuntime","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","race","sent","t0","code","finish","stop","_x","cancelSearch","open","render","_this3","viewProps","align","borderless","disablePortal","error","drawArrow","menuPos","menuAlign","placeholder","totalCount","showClearIcon","warning","id","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","onValueChange","onClickOutside","onFocus","onMobileClose","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onClearCrossClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","createElement","Consumer","flags","featureFlags","_extends","ref","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","fixValueChange","comboBoxAllowValueChangeInEditingState","reset","PureComponent","__KONTUR_REACT_UI__","displayName"],"sources":["CustomComboBox.tsx"],"sourcesContent":["import type { AriaAttributes, HTMLAttributes } from 'react';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport type { InputIconType, Input, ShowClearIcon } from '../../components/Input';\nimport type { Menu } from '../Menu';\nimport type { InputLikeText } from '../InputLikeText';\nimport type { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport type { CommonProps } from '../CommonWrapper';\nimport { CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode';\nimport { rootNode } from '../../lib/rootNode';\nimport type { ComboBoxExtendedItem } from '../../components/ComboBox';\nimport type { SizeProp } from '../../lib/types/props';\nimport type { ReactUIFeatureFlags } from '../../lib/featureFlagsContext';\nimport { ReactUIFeatureFlagsContext, getFullReactUIFlagsContext } from '../../lib/featureFlagsContext';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport type { CustomComboBoxAction, CustomComboBoxEffect } from './CustomComboBoxReducer';\nimport { reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport * from './tids';\n\nexport interface CustomComboBoxProps<T>\n extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n CommonProps {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: SizeProp;\n totalCount?: number;\n value?: Nullable<T>;\n showClearIcon?: ShowClearIcon;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<Array<ComboBoxExtendedItem<T>>>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n size: 'small',\n};\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n public static displayName = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n private featureFlags!: ReactUIFeatureFlags;\n private canOpenPopup = true;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = (opts?: { withoutOpenDropdown?: boolean }) => {\n if (this.props.disabled) {\n return;\n }\n\n if (opts?.withoutOpenDropdown) {\n this.canOpenPopup = false;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n globalObject.setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n menuAlign: this.props.menuAlign,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n showClearIcon: this.props.showClearIcon,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n 'aria-label': this.props['aria-label'],\n id: this.props.id,\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onMobileClose: this.handleMobileClose,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onClearCrossClick: () => this.dispatch({ type: 'ClearCrossClick' }),\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <ReactUIFeatureFlagsContext.Consumer>\n {(flags) => {\n this.featureFlags = getFullReactUIFlagsContext(flags);\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} size={this.props.size} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }}\n </ReactUIFeatureFlagsContext.Consumer>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' }, false);\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch(\n {\n type: 'DidUpdate',\n prevProps,\n prevState,\n fixValueChange: this.featureFlags.comboBoxAllowValueChangeInEditingState,\n },\n false,\n );\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>, sync = true) => {\n const updateState = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n };\n\n // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n if (sync && React.version.search('18') === 0) {\n ReactDOM.flushSync(() => updateState(action));\n } else {\n updateState(action);\n }\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n\n this.focused = true;\n this.dispatch({ type: 'Focus', searchOnFocus: this.canOpenPopup && this.props.searchOnFocus });\n\n if (!this.canOpenPopup) {\n this.canOpenPopup = true;\n }\n };\n\n private handleMobileClose = () => {\n this.handleInputBlur();\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n globalObject.setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n }, 0);\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n if (this.state.opened && !this.isMobileLayout) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"],"mappings":";AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,YAAY,QAAQ,0BAA0B;;;;;;;AAOvD,SAASC,gBAAgB,EAAEC,a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2J,mBAAmB,GAAG,gBAAgB,EAAA3J,eAAA,CACtC4J,WAAW,GAAG,gBAAgB,EAAA5J,eAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","ReactDOM","globalObject","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ReactUIFeatureFlagsContext","getFullReactUIFlagsContext","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","size","CustomComboBox","_class","_CustomComboBox","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","call","apply","concat","state","requestId","cancelationToken","canOpenPopup","cancelLoaderDelay","focus","opts","props","disabled","withoutOpenDropdown","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","forEach","handleEffect","version","search","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","searchOnFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","close","setTimeout","handleInputClick","_inheritsLoose","_proto","prototype","_search","_asyncToGenerator","_regeneratorRuntime","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","race","sent","t0","code","finish","stop","_x","cancelSearch","open","render","_this3","viewProps","align","borderless","disablePortal","error","drawArrow","menuPos","menuAlign","placeholder","totalCount","showClearIcon","warning","id","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","mask","maskChar","formatChars","onBeforePasteInMask","onValueChange","onClickOutside","onFocus","onMobileClose","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onClearCrossClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","createElement","Consumer","flags","featureFlags","_extends","ref","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","fixValueChange","comboBoxAllowValueChangeInEditingState","reset","PureComponent","__KONTUR_REACT_UI__","displayName"],"sources":["CustomComboBox.tsx"],"sourcesContent":["import type { AriaAttributes, HTMLAttributes } from 'react';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport type { InputIconType, Input, ShowClearIcon } from '../../components/Input';\nimport type { Menu } from '../Menu';\nimport type { InputLikeText } from '../InputLikeText';\nimport type { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport type { CommonProps } from '../CommonWrapper';\nimport { CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode';\nimport { rootNode } from '../../lib/rootNode';\nimport type { ComboBoxExtendedItem } from '../../components/ComboBox';\nimport type { SizeProp } from '../../lib/types/props';\nimport type { ReactUIFeatureFlags } from '../../lib/featureFlagsContext';\nimport { ReactUIFeatureFlagsContext, getFullReactUIFlagsContext } from '../../lib/featureFlagsContext';\nimport type { MaskedInputOnBeforePasteValue, MaskedInputProps } from '../../components/MaskedInput';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport type { CustomComboBoxAction, CustomComboBoxEffect } from './CustomComboBoxReducer';\nimport { reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport * from './tids';\n\nexport interface CustomComboBoxProps<T>\n extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n CommonProps,\n Partial<Pick<MaskedInputProps, 'mask' | 'maskChar' | 'formatChars'>> {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: SizeProp;\n totalCount?: number;\n value?: Nullable<T>;\n showClearIcon?: ShowClearIcon;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n onBeforePasteInMask?: MaskedInputOnBeforePasteValue;\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<Array<ComboBoxExtendedItem<T>>>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n size: 'small',\n};\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n public static displayName = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n private featureFlags!: ReactUIFeatureFlags;\n private canOpenPopup = true;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = (opts?: { withoutOpenDropdown?: boolean }) => {\n if (this.props.disabled) {\n return;\n }\n\n if (opts?.withoutOpenDropdown) {\n this.canOpenPopup = false;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n globalObject.setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n menuAlign: this.props.menuAlign,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n showClearIcon: this.props.showClearIcon,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n 'aria-label': this.props['aria-label'],\n id: this.props.id,\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n mask: this.props.mask,\n maskChar: this.props.maskChar,\n formatChars: this.props.formatChars,\n onBeforePasteInMask: this.props.onBeforePasteInMask,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onMobileClose: this.handleMobileClose,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onClearCrossClick: () => this.dispatch({ type: 'ClearCrossClick' }),\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <ReactUIFeatureFlagsContext.Consumer>\n {(flags) => {\n this.featureFlags = getFullReactUIFlagsContext(flags);\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} size={this.props.size} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }}\n </ReactUIFeatureFlagsContext.Consumer>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' }, false);\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch(\n {\n type: 'DidUpdate',\n prevProps,\n prevState,\n fixValueChange: this.featureFlags.comboBoxAllowValueChangeInEditingState,\n },\n false,\n );\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>, sync = true) => {\n const updateState = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n };\n\n // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n if (sync && React.version.search('18') === 0) {\n ReactDOM.flushSync(() => updateState(action));\n } else {\n updateState(action);\n }\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n\n this.focused = true;\n this.dispatch({ type: 'Focus', searchOnFocus: this.canOpenPopup && this.props.searchOnFocus });\n\n if (!this.canOpenPopup) {\n this.canOpenPopup = true;\n }\n };\n\n private handleMobileClose = () => {\n this.handleInputBlur();\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n globalObject.setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n }, 0);\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n if (this.state.opened && !this.isMobileLayout) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"],"mappings":";AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,YAAY,QAAQ,0BAA0B;;;;;;;AAOvD,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,iBAAiB;AACjE,SAASC,eAAe,QAAQ,kCAAkC;;AAElE,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,gBAAgB,QAAQ,6CAA6C;;AAE9E,SAASC,QAAQ,QAAQ,oBAAoB;;;;AAI7C,SAASC,0BAA0B,EAAEC,0BAA0B,QAAQ,+BAA+B;;;AAGtG,SAASC,qBAAqB,QAAQ,uBAAuB;;AAE7D,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,YAAY,QAAQ,gBAAgB;;AAE7C,cAAc,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEtB,OAAO,IAAMC,wBAAwB,GAAG,GAAG;AAC3C,OAAO,IAAMC,gBAAgB,GAAG,IAAI;;AAEpC,OAAO,IAAMC,YAAY,GAAG;EAC1BC,YAAY,EAAE,KAAK;EACnBC,OAAO,EAAE,KAAK;EACdC,KAAK,EAAE,IAAI;EACXC,OAAO,EAAE,KAAK;EACdC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAE,KAAK;EACdC,SAAS,EAAE,EAAE;EACbC,aAAa,EAAE,SAAAA,cAAA,UAAMC,SAAS;EAC9BC,aAAa,EAAEf,qBAAqB,CAACgB,OAAO;EAC5CC,IAAI,EAAE;AACR,CAAC;;AAED;;AA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AzB,SAAAA,mBAA0BC,SAAiC,EAAEC,SAAiC,EAAE,CAC9F,IAAIA,SAAS,CAACvK,OAAO,IAAI,CAAC,IAAI,CAACyB,KAAK,CAACzB,OAAO,EAAE,CAC5C,IAAI,CAACwC,UAAU,CAAC,CAAC,CACnB,CACA,IAAI,CAACC,QAAQ,CACX,EACEmB,IAAI,EAAE,WAAW,EACjB0G,SAAS,EAATA,SAAS,EACTC,SAAS,EAATA,SAAS,EACTC,cAAc,EAAE,IAAI,CAACT,YAAY,CAACU,sCAAsC,CAC1E,CAAC,EACD,KACF,CAAC,CACH,CAAC,CAED;AACF;AACA,KAFE,CAAAhG,MAAA,CAGOiG,KAAK,GAAZ,SAAAA,MAAA,EAAe,CACb,IAAI,CAACjI,QAAQ,CAAC,EAAEmB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAClC,CAAC,QAAAjD,cAAA,GArQoC7B,KAAK,CAAC6L,aAAa,GAAA9J,eAAA,CAC1C+J,mBAAmB,GAAG,gBAAgB,EAAA/J,eAAA,CACtCgK,WAAW,GAAG,gBAAgB,EAAAhK,eAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
@@ -9,9 +9,10 @@ import type { CommonProps } from '../CommonWrapper';
|
|
|
9
9
|
import type { TGetRootNode } from '../../lib/rootNode';
|
|
10
10
|
import type { ComboBoxExtendedItem } from '../../components/ComboBox';
|
|
11
11
|
import type { SizeProp } from '../../lib/types/props';
|
|
12
|
+
import type { MaskedInputOnBeforePasteValue, MaskedInputProps } from '../../components/MaskedInput';
|
|
12
13
|
import { ComboBoxRequestStatus } from './CustomComboBoxTypes';
|
|
13
14
|
export * from './tids';
|
|
14
|
-
export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'>, CommonProps {
|
|
15
|
+
export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'>, CommonProps, Partial<Pick<MaskedInputProps, 'mask' | 'maskChar' | 'formatChars'>> {
|
|
15
16
|
align?: 'left' | 'center' | 'right';
|
|
16
17
|
autoFocus?: boolean;
|
|
17
18
|
borderless?: boolean;
|
|
@@ -61,6 +62,7 @@ export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-descr
|
|
|
61
62
|
itemToValue: (item: T) => string | number;
|
|
62
63
|
getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;
|
|
63
64
|
inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
|
|
65
|
+
onBeforePasteInMask?: MaskedInputOnBeforePasteValue;
|
|
64
66
|
}
|
|
65
67
|
export interface CustomComboBoxState<T> {
|
|
66
68
|
editing: boolean;
|