@semcore/inline-input 16.1.1 → 16.1.2-prerelease.1
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 +6 -0
- package/README.md +1 -31
- package/lib/cjs/InlineInput.js +87 -90
- package/lib/cjs/InlineInput.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +2 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/InlineInput.js +88 -90
- package/lib/es6/InlineInput.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/InlineInput.mjs +85 -85
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/index.d.ts +6 -6
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineInput.js","names":["React","createComponent","Component","sstyled","Root","Box","InvalidStateBox","autoFocusEnhance","style","_sstyled","insert","CheckM","CloseM","Spin","ButtonLink","localizedMessages","i18nEnhance","InputNumber","hasParent","pointInsideOfRect","_ref17","x","y","rect","width","height","InlineInputBase","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren10","_this$inputRef$curren11","_this$asProps3","onBlurBehavior","Date","now","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren12","_this$inputRef$curren13","_createClass","componentDidMount","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren14","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","disabled","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","_this$asProps7","Children","styles","createElement","cn","_objectSpread","_assignProps","handleBlur","i18n","Value","_Component2","_super2","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref10","SAddon","_assignProps3","ConfirmControl","_ref4","_ref12","_props$title","_ref18","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref11","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref14","_props$title2","_ref19","_props$onCancel","_props$value2","_ref13","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref15","_assignProps8","NumberControls","_ref7","_ref16","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport { ITooltipProps } from '@semcore/tooltip';\nimport style from './style/inline-input.shadow.css';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport Spin from '@semcore/spin';\nimport { ButtonLink } from '@semcore/button';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport InputNumber, { InputNumberValueProps } from '@semcore/input-number';\nimport { IRootComponentHandlers } from '@semcore/core';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren ? (\n <Children />\n ) : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use={'secondary'}\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren ? (\n <Children />\n ) : (\n <ButtonLink\n use={'secondary'}\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}) as any;\n\nexport default InlineInput;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,EAAEC,eAAe,QAAQ,mBAAmB;AACxD,OAAOC,gBAAgB,MAAM,mDAAmD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGjF,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,IAAI,MAAM,eAAe;AAChC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,WAAW,MAAiC,uBAAuB;AAE1E,SAASC,SAAS,QAAQ,mCAAmC;AAgE7D,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,MAAA,EAQjB;EAAA,IAPJC,CAAC,GAAAD,MAAA,CAADC,CAAC;IACDC,CAAC,GAAAF,MAAA,CAADE,CAAC;IACDC,IAAI,GAAAH,MAAA,CAAJG,IAAI;EAMJ,OAAOF,CAAC,IAAIE,IAAI,CAACF,CAAC,IAAIA,CAAC,IAA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AAA,GAAApC,YAAA;IAAAqC,MAAA;EAC3D,IAAM3C,MAAM,GAEiCxI,WAAW,CAACiI,KAAK;EAA9D,OAAAkD,MAAA,GAAOjM,OAAO,CAAC0J,KAAK,CAAClB,MAAM,CAAC,eAAC3I,KAAA,CAAA4I,aAAA,CAACa,MAAM,EAAA2C,MAAA,CAAAvD,EAAA,WAAAC,aAAA,KAAAuD,aAAA,KAAAF,KAAA,IAA8B;AACpE,CAAC;AAED,SAASG,cAAcA,CAACzC,KAA4B,EAAE;EAAA,IAAA0C,KAAA,GAAAxC,YAAA;IAAAyC,MAAA;EACpD,IAAMC,SAAS,GAGMxL,WAAW,CAACyL,QAAQ;EADzC,OAAAF,MAAA,GAAOrM,OAAO,CAAC0J,KAAK,CAAClB,MAAM,CAAC,eAC1B3I,KAAA,CAAA4I,aAAA,CAAC6D,SAAS,EAAAD,MAAA,CAAA3D,EAAA,cAAAC,aAAA,KAAA6D,aAAA;IAAA,OAAoCC,WAAW,CAAChD;EAAK,GAAA2C,KAAA,IAAI;AAEvE;;AAEA;AACA,IAAMK,WAAW,GAAG3M,eAAe,CAACyB,eAAe,EAAE;EACnDkI,KAAK,EAALA,KAAK;EACLV,KAAK,EAALA,KAAK;EACLiB,cAAc,EAAdA,cAAc;EACdoB,aAAa,EAAbA,aAAa;EACbW,WAAW,EAAXA,WAAW;EACXI,cAAc,EAAdA;AACF,CAAC,CAAQ;AAET,eAAeM,WAAW"}
|
|
1
|
+
{"version":3,"file":"InlineInput.js","names":["ButtonLink","createComponent","Component","sstyled","Root","autoFocusEnhance","i18nEnhance","hasParent","Box","InvalidStateBox","CheckM","CloseM","InputNumber","Spin","React","style","_sstyled","insert","localizedMessages","pointInsideOfRect","_ref15","x","y","rect","width","height","InlineInputBase","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","call","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren0","_this$inputRef$curren1","_this$asProps3","onBlurBehavior","Date","now","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren10","_this$inputRef$curren11","_inherits","_createClass","componentDidMount","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren12","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","disabled","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","_this$asProps7","Children","styles","createElement","cn","_objectSpread","_assignProps","handleBlur","i18n","Value","_Component2","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","_assignProps3","ConfirmControl","_ref4","_ref10","_props$title","_ref16","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref1","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref12","_props$title2","_ref17","_props$onCancel","_props$value2","_ref11","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref13","_assignProps8","NumberControls","_ref7","_ref14","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { IRootComponentHandlers } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport InputNumber, { type InputNumberValueProps } from '@semcore/input-number';\nimport Spin from '@semcore/spin';\nimport type { ITooltipProps } from '@semcore/tooltip';\nimport React from 'react';\n\nimport style from './style/inline-input.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use='secondary'\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n use='secondary'\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}) as any;\n\nexport default InlineInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,gBAAgB,MAAM,mDAAmD;AAChF,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,GAAG,EAAEC,eAAe,QAAQ,mBAAmB;AACxD,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,WAAW,MAAsC,uBAAuB;AAC/E,OAAOC,IAAI,MAAM,eAAe;AAEhC,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAG1B,SAASC,iBAAiB,QAAQ,gDAAgD;AAgElF,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAA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AAAsC,KAAA,GAAApC,YAAA;IAAAqC,MAAA;EAC3D,IAAM3C,MAAM,GAEiCzI,WAAW,CAACmI,KAAK;EAA9D,OAAAiD,MAAA,GAAO7L,OAAO,CAACsJ,KAAK,CAACjB,MAAM,CAAC,eAAC1H,KAAA,CAAA2H,aAAA,CAACY,MAAM,EAAA2C,MAAA,CAAAtD,EAAA,WAAAC,aAAA,KAAAsD,aAAA,KAAAF,KAAA,GAA6B,CAAC;AACpE,CAAC;AAED,SAASG,cAAcA,CAACzC,KAA4B,EAAE;EAAA,IAAA0C,KAAA,GAAAxC,YAAA;IAAAyC,MAAA;EACpD,IAAMC,SAAS,GAGMzL,WAAW,CAAC0L,QAAQ;EADzC,OAAAF,MAAA,GAAOjM,OAAO,CAACsJ,KAAK,CAACjB,MAAM,CAAC,eAC1B1H,KAAA,CAAA2H,aAAA,CAAC4D,SAAS,EAAAD,MAAA,CAAA1D,EAAA,cAAAC,aAAA,KAAA4D,aAAA;IAAA,OAAoCC,WAAW,CAAChD;EAAK,GAAA2C,KAAA,GAAG,CAAC;AAEvE;;AAEA;AACA,IAAMK,WAAW,GAAGvM,eAAe,CAACyB,eAAe,EAAE;EACnD8H,KAAK,EAALA,KAAK;EACLT,KAAK,EAALA,KAAK;EACLgB,cAAc,EAAdA,cAAc;EACdoB,aAAa,EAAbA,aAAa;EACbW,WAAW,EAAXA,WAAW;EACXI,cAAc,EAAdA;AACF,CAAC,CAAQ;AAET,eAAeM,WAAW","ignoreList":[]}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm' | 'none';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputConfirmControlProps,\n InlineInputProps\n >;\n CancelControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputCancelControlProps,\n InlineInputProps\n >;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', {}, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import InlineInputBase from './InlineInput';\nexport default InlineInputBase;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,eAAe;AAC3C,eAAeA,eAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import InlineInputBase from './InlineInput';\nexport default InlineInputBase;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,eAAe;AAC3C,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -6,12 +6,12 @@ import it from './it.json';
|
|
|
6
6
|
import ja from './ja.json';
|
|
7
7
|
import ko from './ko.json';
|
|
8
8
|
import nl from './nl.json';
|
|
9
|
+
import pl from './pl.json';
|
|
9
10
|
import pt from './pt.json';
|
|
11
|
+
import sv from './sv.json';
|
|
10
12
|
import tr from './tr.json';
|
|
11
13
|
import vi from './vi.json';
|
|
12
14
|
import zh from './zh.json';
|
|
13
|
-
import pl from './pl.json';
|
|
14
|
-
import sv from './sv.json';
|
|
15
15
|
export var localizedMessages = {
|
|
16
16
|
de: de,
|
|
17
17
|
en: en,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFL,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
|
package/lib/esm/InlineInput.mjs
CHANGED
|
@@ -1,103 +1,105 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import { Box, InvalidStateBox } from "@semcore/flex-box";
|
|
9
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
|
+
import { ButtonLink } from "@semcore/button";
|
|
11
11
|
import autoFocusEnhance from "@semcore/core/lib/utils/enhances/autoFocusEnhance";
|
|
12
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
13
|
+
import { hasParent } from "@semcore/core/lib/utils/hasParent";
|
|
14
|
+
import { Box, InvalidStateBox } from "@semcore/flex-box";
|
|
12
15
|
import CheckM from "@semcore/icon/Check/m";
|
|
13
16
|
import CloseM from "@semcore/icon/Close/m";
|
|
17
|
+
import InputNumber from "@semcore/input-number";
|
|
14
18
|
import Spin from "@semcore/spin";
|
|
15
|
-
import
|
|
19
|
+
import React from "react";
|
|
16
20
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
function _callSuper(t, o, e) {
|
|
22
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
23
|
+
}
|
|
20
24
|
/*!__reshadow-styles__:"./style/inline-input.shadow.css"*/
|
|
21
25
|
var style = (
|
|
22
26
|
/*__reshadow_css_start__*/
|
|
23
27
|
(sstyled.insert(
|
|
24
28
|
/*__inner_css_start__*/
|
|
25
|
-
".
|
|
29
|
+
".___SInlineInput_cxe8f_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_cxe8f_gg_ .___SConfirmIcon_cxe8f_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_cxe8f_gg_ .___SConfirmIcon_cxe8f_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_cxe8f_gg_ .___SCancelIcon_cxe8f_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_cxe8f_gg_ .___SCancelIcon_cxe8f_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_cxe8f_gg_.__disabled_cxe8f_gg_{cursor:default;pointer-events:none;opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SValue_cxe8f_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SValue_cxe8f_gg_:focus{outline:0}.___SValue_cxe8f_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_cxe8f_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_cxe8f_gg_.__disabled_cxe8f_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_cxe8f_gg_::-webkit-inner-spin-button,.___SValue_cxe8f_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_cxe8f_gg_._type_number_cxe8f_gg_{-moz-appearance:textfield}.___SUnderline_cxe8f_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_cxe8f_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_cxe8f_gg_.__disabled_cxe8f_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_cxe8f_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SInlineInput_cxe8f_gg_._state_valid_cxe8f_gg_ .___SUnderline_cxe8f_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_cxe8f_gg_._state_valid_cxe8f_gg_ .___SUnderline_cxe8f_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInlineInput_cxe8f_gg_._state_invalid_cxe8f_gg_ .___SUnderline_cxe8f_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_cxe8f_gg_._state_invalid_cxe8f_gg_ .___SUnderline_cxe8f_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SValue_cxe8f_gg_:focus~.___SControls_cxe8f_gg_{display:flex}.___SInvalidPattern_cxe8f_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}",
|
|
26
30
|
/*__inner_css_end__*/
|
|
27
|
-
"
|
|
31
|
+
"cxe8f_gg_"
|
|
28
32
|
), /*__reshadow_css_end__*/
|
|
29
33
|
{
|
|
30
|
-
"__SInlineInput": "
|
|
31
|
-
"_disabled": "
|
|
32
|
-
"__SUnderline": "
|
|
33
|
-
"__SAddon": "
|
|
34
|
-
"_state_valid": "
|
|
35
|
-
"_state_invalid": "
|
|
36
|
-
"__SValue": "
|
|
37
|
-
"__SControls": "
|
|
38
|
-
"__SInvalidPattern": "
|
|
39
|
-
"__SConfirmIcon": "
|
|
40
|
-
"__SCancelIcon": "
|
|
41
|
-
"_type_number": "
|
|
34
|
+
"__SInlineInput": "___SInlineInput_cxe8f_gg_",
|
|
35
|
+
"_disabled": "__disabled_cxe8f_gg_",
|
|
36
|
+
"__SUnderline": "___SUnderline_cxe8f_gg_",
|
|
37
|
+
"__SAddon": "___SAddon_cxe8f_gg_",
|
|
38
|
+
"_state_valid": "_state_valid_cxe8f_gg_",
|
|
39
|
+
"_state_invalid": "_state_invalid_cxe8f_gg_",
|
|
40
|
+
"__SValue": "___SValue_cxe8f_gg_",
|
|
41
|
+
"__SControls": "___SControls_cxe8f_gg_",
|
|
42
|
+
"__SInvalidPattern": "___SInvalidPattern_cxe8f_gg_",
|
|
43
|
+
"__SConfirmIcon": "___SConfirmIcon_cxe8f_gg_",
|
|
44
|
+
"__SCancelIcon": "___SCancelIcon_cxe8f_gg_",
|
|
45
|
+
"_type_number": "_type_number_cxe8f_gg_"
|
|
42
46
|
})
|
|
43
47
|
);
|
|
44
|
-
var pointInsideOfRect = function pointInsideOfRect2(
|
|
45
|
-
var x =
|
|
48
|
+
var pointInsideOfRect = function pointInsideOfRect2(_ref15) {
|
|
49
|
+
var x = _ref15.x, y = _ref15.y, rect = _ref15.rect;
|
|
46
50
|
return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;
|
|
47
51
|
};
|
|
48
52
|
var InlineInputBase = /* @__PURE__ */ function(_Component) {
|
|
49
|
-
_inherits(InlineInputBase2, _Component);
|
|
50
|
-
var _super = _createSuper(InlineInputBase2);
|
|
51
53
|
function InlineInputBase2() {
|
|
52
54
|
var _this;
|
|
53
55
|
_classCallCheck(this, InlineInputBase2);
|
|
54
56
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
57
|
args[_key] = arguments[_key];
|
|
56
58
|
}
|
|
57
|
-
_this =
|
|
58
|
-
_defineProperty(
|
|
59
|
-
_defineProperty(
|
|
60
|
-
_defineProperty(
|
|
61
|
-
_defineProperty(
|
|
62
|
-
_defineProperty(
|
|
63
|
-
_defineProperty(
|
|
64
|
-
_defineProperty(
|
|
59
|
+
_this = _callSuper(this, InlineInputBase2, [].concat(args));
|
|
60
|
+
_defineProperty(_this, "rootRef", /* @__PURE__ */ React.createRef());
|
|
61
|
+
_defineProperty(_this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
62
|
+
_defineProperty(_this, "inputHandlersRef", /* @__PURE__ */ React.createRef());
|
|
63
|
+
_defineProperty(_this, "initValue", "");
|
|
64
|
+
_defineProperty(_this, "lastMouseDownPosition", null);
|
|
65
|
+
_defineProperty(_this, "lastHandledKeyboardEvent", -1);
|
|
66
|
+
_defineProperty(_this, "handleDocumentMouseDown", function(event) {
|
|
65
67
|
_this.lastMouseDownPosition = {
|
|
66
68
|
x: event.clientX,
|
|
67
69
|
y: event.clientY
|
|
68
70
|
};
|
|
69
71
|
_this.lastHandledKeyboardEvent = -1;
|
|
70
72
|
});
|
|
71
|
-
_defineProperty(
|
|
73
|
+
_defineProperty(_this, "handleDocumentKeyDown", function() {
|
|
72
74
|
_this.lastMouseDownPosition = null;
|
|
73
75
|
});
|
|
74
|
-
_defineProperty(
|
|
76
|
+
_defineProperty(_this, "increment", function(event) {
|
|
75
77
|
var _this$inputRef$curren, _this$inputRef$curren2, _this$inputRef$curren3, _this$inputHandlersRe, _this$inputRef$curren4;
|
|
76
78
|
if (((_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.value) === "") _this.inputRef.current.value = _this.inputRef.current.min || "0";
|
|
77
|
-
(_this$inputRef$curren2 = _this.inputRef.current) === null || _this$inputRef$curren2 === void 0
|
|
78
|
-
(_this$inputHandlersRe = _this.inputHandlersRef.current) === null || _this$inputHandlersRe === void 0
|
|
79
|
+
(_this$inputRef$curren2 = _this.inputRef.current) === null || _this$inputRef$curren2 === void 0 || (_this$inputRef$curren3 = _this$inputRef$curren2.stepUp) === null || _this$inputRef$curren3 === void 0 || _this$inputRef$curren3.call(_this$inputRef$curren2, event);
|
|
80
|
+
(_this$inputHandlersRe = _this.inputHandlersRef.current) === null || _this$inputHandlersRe === void 0 || _this$inputHandlersRe.value((_this$inputRef$curren4 = _this.inputRef.current) === null || _this$inputRef$curren4 === void 0 ? void 0 : _this$inputRef$curren4.value, event);
|
|
79
81
|
});
|
|
80
|
-
_defineProperty(
|
|
82
|
+
_defineProperty(_this, "decrement", function(event) {
|
|
81
83
|
var _this$inputRef$curren5, _this$inputRef$curren6, _this$inputRef$curren7, _this$inputHandlersRe2, _this$inputRef$curren8;
|
|
82
84
|
if (((_this$inputRef$curren5 = _this.inputRef.current) === null || _this$inputRef$curren5 === void 0 ? void 0 : _this$inputRef$curren5.value) === "") _this.inputRef.current.value = _this.inputRef.current.max || "0";
|
|
83
|
-
(_this$inputRef$curren6 = _this.inputRef.current) === null || _this$inputRef$curren6 === void 0
|
|
84
|
-
(_this$inputHandlersRe2 = _this.inputHandlersRef.current) === null || _this$inputHandlersRe2 === void 0
|
|
85
|
+
(_this$inputRef$curren6 = _this.inputRef.current) === null || _this$inputRef$curren6 === void 0 || (_this$inputRef$curren7 = _this$inputRef$curren6.stepDown) === null || _this$inputRef$curren7 === void 0 || _this$inputRef$curren7.call(_this$inputRef$curren6, event);
|
|
86
|
+
(_this$inputHandlersRe2 = _this.inputHandlersRef.current) === null || _this$inputHandlersRe2 === void 0 || _this$inputHandlersRe2.value((_this$inputRef$curren8 = _this.inputRef.current) === null || _this$inputRef$curren8 === void 0 ? void 0 : _this$inputRef$curren8.value, event);
|
|
85
87
|
});
|
|
86
|
-
_defineProperty(
|
|
88
|
+
_defineProperty(_this, "handleMouseDownAddon", function(event) {
|
|
87
89
|
var _this$inputRef$curren9;
|
|
88
90
|
event.preventDefault();
|
|
89
|
-
(_this$inputRef$curren9 = _this.inputRef.current) === null || _this$inputRef$curren9 === void 0
|
|
91
|
+
(_this$inputRef$curren9 = _this.inputRef.current) === null || _this$inputRef$curren9 === void 0 || _this$inputRef$curren9.focus();
|
|
90
92
|
});
|
|
91
|
-
_defineProperty(
|
|
93
|
+
_defineProperty(_this, "handleConfirm", function(text, event) {
|
|
92
94
|
var _this$asProps$onConfi, _this$asProps;
|
|
93
|
-
(_this$asProps$onConfi = (_this$asProps = _this.asProps).onConfirm) === null || _this$asProps$onConfi === void 0
|
|
95
|
+
(_this$asProps$onConfi = (_this$asProps = _this.asProps).onConfirm) === null || _this$asProps$onConfi === void 0 || _this$asProps$onConfi.call(_this$asProps, text, event);
|
|
94
96
|
});
|
|
95
|
-
_defineProperty(
|
|
97
|
+
_defineProperty(_this, "handleCancel", function(prevText, event) {
|
|
96
98
|
var _this$asProps$onCance, _this$asProps2;
|
|
97
|
-
(_this$asProps$onCance = (_this$asProps2 = _this.asProps).onCancel) === null || _this$asProps$onCance === void 0
|
|
99
|
+
(_this$asProps$onCance = (_this$asProps2 = _this.asProps).onCancel) === null || _this$asProps$onCance === void 0 || _this$asProps$onCance.call(_this$asProps2, prevText, event);
|
|
98
100
|
});
|
|
99
|
-
_defineProperty(
|
|
100
|
-
var _this$inputRef$
|
|
101
|
+
_defineProperty(_this, "handleBlur", function(event) {
|
|
102
|
+
var _this$inputRef$curren0, _this$inputRef$curren1;
|
|
101
103
|
var _this$asProps3 = _this.asProps, onConfirm = _this$asProps3.onConfirm, onCancel = _this$asProps3.onCancel, onBlurBehavior = _this$asProps3.onBlurBehavior;
|
|
102
104
|
if (!onBlurBehavior) return;
|
|
103
105
|
if (Date.now() - _this.lastHandledKeyboardEvent < 250) return;
|
|
@@ -113,24 +115,25 @@ var InlineInputBase = /* @__PURE__ */ function(_Component) {
|
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
|
-
if (onBlurBehavior === "confirm") onConfirm === null || onConfirm === void 0
|
|
117
|
-
if (onBlurBehavior === "cancel") onCancel === null || onCancel === void 0
|
|
118
|
+
if (onBlurBehavior === "confirm") onConfirm === null || onConfirm === void 0 || onConfirm((_this$inputRef$curren0 = (_this$inputRef$curren1 = _this.inputRef.current) === null || _this$inputRef$curren1 === void 0 ? void 0 : _this$inputRef$curren1.value) !== null && _this$inputRef$curren0 !== void 0 ? _this$inputRef$curren0 : "", event);
|
|
119
|
+
if (onBlurBehavior === "cancel") onCancel === null || onCancel === void 0 || onCancel(_this.initValue, event);
|
|
118
120
|
});
|
|
119
|
-
_defineProperty(
|
|
121
|
+
_defineProperty(_this, "handleKeyDown", function(event) {
|
|
120
122
|
var _this$asProps4 = _this.asProps, onConfirm = _this$asProps4.onConfirm, onCancel = _this$asProps4.onCancel;
|
|
121
123
|
if (event.key === "Enter") {
|
|
122
|
-
var _this$inputRef$
|
|
123
|
-
onConfirm === null || onConfirm === void 0
|
|
124
|
+
var _this$inputRef$curren10, _this$inputRef$curren11;
|
|
125
|
+
onConfirm === null || onConfirm === void 0 || onConfirm((_this$inputRef$curren10 = (_this$inputRef$curren11 = _this.inputRef.current) === null || _this$inputRef$curren11 === void 0 ? void 0 : _this$inputRef$curren11.value) !== null && _this$inputRef$curren10 !== void 0 ? _this$inputRef$curren10 : "", event);
|
|
124
126
|
_this.lastHandledKeyboardEvent = Date.now();
|
|
125
127
|
}
|
|
126
128
|
if (event.key === "Escape") {
|
|
127
|
-
onCancel === null || onCancel === void 0
|
|
129
|
+
onCancel === null || onCancel === void 0 || onCancel(_this.initValue, event);
|
|
128
130
|
_this.lastHandledKeyboardEvent = Date.now();
|
|
129
131
|
}
|
|
130
132
|
});
|
|
131
133
|
return _this;
|
|
132
134
|
}
|
|
133
|
-
|
|
135
|
+
_inherits(InlineInputBase2, _Component);
|
|
136
|
+
return _createClass(InlineInputBase2, [{
|
|
134
137
|
key: "componentDidMount",
|
|
135
138
|
value: function componentDidMount() {
|
|
136
139
|
if (!this.asProps.onBlurBehavior) return;
|
|
@@ -154,10 +157,10 @@ var InlineInputBase = /* @__PURE__ */ function(_Component) {
|
|
|
154
157
|
}, {
|
|
155
158
|
key: "getConfirmControlProps",
|
|
156
159
|
value: function getConfirmControlProps() {
|
|
157
|
-
var _this$inputRef$
|
|
160
|
+
var _this$inputRef$curren12;
|
|
158
161
|
var _this$asProps5 = this.asProps, loading = _this$asProps5.loading, getI18nText = _this$asProps5.getI18nText;
|
|
159
162
|
return {
|
|
160
|
-
value: (_this$inputRef$
|
|
163
|
+
value: (_this$inputRef$curren12 = this.inputRef.current) === null || _this$inputRef$curren12 === void 0 ? void 0 : _this$inputRef$curren12.value,
|
|
161
164
|
loading,
|
|
162
165
|
onConfirm: this.handleConfirm,
|
|
163
166
|
getI18nText
|
|
@@ -223,7 +226,6 @@ var InlineInputBase = /* @__PURE__ */ function(_Component) {
|
|
|
223
226
|
}, _ref))), /* @__PURE__ */ React.createElement(SUnderline, _ref8.cn("SUnderline", {}), state === "invalid" && /* @__PURE__ */ React.createElement(SInvalidPattern, _ref8.cn("SInvalidPattern", {})), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {}))));
|
|
224
227
|
}
|
|
225
228
|
}]);
|
|
226
|
-
return InlineInputBase2;
|
|
227
229
|
}(Component);
|
|
228
230
|
_defineProperty(InlineInputBase, "displayName", "InlineInput");
|
|
229
231
|
_defineProperty(InlineInputBase, "enhance", [i18nEnhance(localizedMessages)]);
|
|
@@ -235,13 +237,12 @@ _defineProperty(InlineInputBase, "defaultProps", {
|
|
|
235
237
|
});
|
|
236
238
|
_defineProperty(InlineInputBase, "style", style);
|
|
237
239
|
var Value = /* @__PURE__ */ function(_Component2) {
|
|
238
|
-
_inherits(Value2, _Component2);
|
|
239
|
-
var _super2 = _createSuper(Value2);
|
|
240
240
|
function Value2() {
|
|
241
241
|
_classCallCheck(this, Value2);
|
|
242
|
-
return
|
|
242
|
+
return _callSuper(this, Value2, arguments);
|
|
243
243
|
}
|
|
244
|
-
|
|
244
|
+
_inherits(Value2, _Component2);
|
|
245
|
+
return _createClass(Value2, [{
|
|
245
246
|
key: "uncontrolledProps",
|
|
246
247
|
value: function uncontrolledProps() {
|
|
247
248
|
return {
|
|
@@ -261,7 +262,6 @@ var Value = /* @__PURE__ */ function(_Component2) {
|
|
|
261
262
|
}, _ref2))));
|
|
262
263
|
}
|
|
263
264
|
}]);
|
|
264
|
-
return Value2;
|
|
265
265
|
}(Component);
|
|
266
266
|
_defineProperty(Value, "defaultProps", {
|
|
267
267
|
defaultValue: ""
|
|
@@ -269,18 +269,18 @@ _defineProperty(Value, "defaultProps", {
|
|
|
269
269
|
_defineProperty(Value, "enhance", [autoFocusEnhance()]);
|
|
270
270
|
_defineProperty(Value, "hoistProps", ["disabled"]);
|
|
271
271
|
var Addon = function Addon2(props) {
|
|
272
|
-
var _ref3 = arguments[0],
|
|
272
|
+
var _ref3 = arguments[0], _ref0;
|
|
273
273
|
var SAddon = Box;
|
|
274
|
-
return
|
|
274
|
+
return _ref0 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref0.cn("SAddon", _objectSpread({}, assignProps({}, _ref3))));
|
|
275
275
|
};
|
|
276
276
|
var ConfirmControl = function ConfirmControl2(props) {
|
|
277
|
-
var _ref4 = arguments[0],
|
|
277
|
+
var _ref4 = arguments[0], _ref10, _props$title, _ref16;
|
|
278
278
|
var SAddon = Box;
|
|
279
279
|
var Children = props.Children, hasChildren = props.children;
|
|
280
280
|
var title = (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : props.getI18nText("confirm");
|
|
281
281
|
var handleConfirm = React.useCallback(function(event) {
|
|
282
282
|
var _props$onConfirm, _props$value;
|
|
283
|
-
(_props$onConfirm = props.onConfirm) === null || _props$onConfirm === void 0
|
|
283
|
+
(_props$onConfirm = props.onConfirm) === null || _props$onConfirm === void 0 || _props$onConfirm.call(props, (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : "", event);
|
|
284
284
|
}, [props.onConfirm, props.value]);
|
|
285
285
|
var handleKeydown = React.useCallback(function(event) {
|
|
286
286
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -290,17 +290,17 @@ var ConfirmControl = function ConfirmControl2(props) {
|
|
|
290
290
|
}
|
|
291
291
|
}, [handleConfirm]);
|
|
292
292
|
if (props.loading) {
|
|
293
|
-
var
|
|
294
|
-
return
|
|
293
|
+
var _ref1;
|
|
294
|
+
return _ref1 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref1.cn("SAddon", _objectSpread({}, assignProps({}, _ref4))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {})) : /* @__PURE__ */ React.createElement(Spin, _ref1.cn("Spin", {
|
|
295
295
|
"size": "xs"
|
|
296
296
|
})));
|
|
297
297
|
}
|
|
298
298
|
var sstyles = sstyled(props.styles);
|
|
299
299
|
var sConfirmIconStyles = sstyles.cn("SConfirmIcon", {});
|
|
300
|
-
return
|
|
300
|
+
return _ref10 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref10.cn("SAddon", _objectSpread({}, assignProps({
|
|
301
301
|
"onKeyDown": handleKeydown
|
|
302
|
-
}, _ref4))), hasChildren ? /* @__PURE__ */ React.createElement(Children,
|
|
303
|
-
"addonLeft": (
|
|
302
|
+
}, _ref4))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {})) : /* @__PURE__ */ React.createElement(ButtonLink, _ref10.cn("ButtonLink", {
|
|
303
|
+
"addonLeft": (_ref16 = props.icon) !== null && _ref16 !== void 0 ? _ref16 : CheckM,
|
|
304
304
|
"use": "secondary",
|
|
305
305
|
"onClick": handleConfirm,
|
|
306
306
|
"className": sConfirmIconStyles.className,
|
|
@@ -309,13 +309,13 @@ var ConfirmControl = function ConfirmControl2(props) {
|
|
|
309
309
|
})));
|
|
310
310
|
};
|
|
311
311
|
var CancelControl = function CancelControl2(props) {
|
|
312
|
-
var _ref5 = arguments[0],
|
|
312
|
+
var _ref5 = arguments[0], _ref12, _props$title2, _ref17;
|
|
313
313
|
var SAddon = Box;
|
|
314
314
|
var Children = props.Children, hasChildren = props.children;
|
|
315
315
|
var title = (_props$title2 = props.title) !== null && _props$title2 !== void 0 ? _props$title2 : props.getI18nText("discard");
|
|
316
316
|
var handleCancel = React.useCallback(function(event) {
|
|
317
317
|
var _props$onCancel, _props$value2;
|
|
318
|
-
(_props$onCancel = props.onCancel) === null || _props$onCancel === void 0
|
|
318
|
+
(_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, (_props$value2 = props.value) !== null && _props$value2 !== void 0 ? _props$value2 : "", event);
|
|
319
319
|
}, [props.onCancel, props.value]);
|
|
320
320
|
var handleKeydown = React.useCallback(function(event) {
|
|
321
321
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -325,16 +325,16 @@ var CancelControl = function CancelControl2(props) {
|
|
|
325
325
|
}
|
|
326
326
|
}, [handleCancel]);
|
|
327
327
|
if (props.disabled) {
|
|
328
|
-
var
|
|
329
|
-
return
|
|
328
|
+
var _ref11;
|
|
329
|
+
return _ref11 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref11.cn("SAddon", _objectSpread({}, assignProps({}, _ref5))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : /* @__PURE__ */ React.createElement(CloseM, _ref11.cn("CloseM", {})));
|
|
330
330
|
}
|
|
331
331
|
var sstyles = sstyled(props.styles);
|
|
332
332
|
var sCancelIconStyles = sstyles.cn("SCancelIcon", {});
|
|
333
|
-
return
|
|
333
|
+
return _ref12 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SAddon, _ref12.cn("SAddon", _objectSpread({}, assignProps({
|
|
334
334
|
"onKeyDown": handleKeydown
|
|
335
|
-
}, _ref5))), hasChildren ? /* @__PURE__ */ React.createElement(Children,
|
|
335
|
+
}, _ref5))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref12.cn("Children", {})) : /* @__PURE__ */ React.createElement(ButtonLink, _ref12.cn("ButtonLink", {
|
|
336
336
|
"use": "secondary",
|
|
337
|
-
"addonLeft": (
|
|
337
|
+
"addonLeft": (_ref17 = props.icon) !== null && _ref17 !== void 0 ? _ref17 : CloseM,
|
|
338
338
|
"onClick": handleCancel,
|
|
339
339
|
"className": sCancelIconStyles.className,
|
|
340
340
|
"style": sCancelIconStyles.style,
|
|
@@ -342,14 +342,14 @@ var CancelControl = function CancelControl2(props) {
|
|
|
342
342
|
})));
|
|
343
343
|
};
|
|
344
344
|
var NumberValue = function NumberValue2(props) {
|
|
345
|
-
var _ref6 = arguments[0],
|
|
345
|
+
var _ref6 = arguments[0], _ref13;
|
|
346
346
|
var SValue = InputNumber.Value;
|
|
347
|
-
return
|
|
347
|
+
return _ref13 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SValue, _ref13.cn("SValue", _objectSpread({}, assignProps({}, _ref6))));
|
|
348
348
|
};
|
|
349
349
|
function NumberControls(props) {
|
|
350
|
-
var _ref7 = arguments[0],
|
|
350
|
+
var _ref7 = arguments[0], _ref14;
|
|
351
351
|
var SControls = InputNumber.Controls;
|
|
352
|
-
return
|
|
352
|
+
return _ref14 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SControls, _ref14.cn("SControls", _objectSpread({}, assignProps({
|
|
353
353
|
"tag": InlineInput.Addon
|
|
354
354
|
}, _ref7))));
|
|
355
355
|
}
|
|
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
|
|
|
6
6
|
import ja from "./ja.json.mjs";
|
|
7
7
|
import ko from "./ko.json.mjs";
|
|
8
8
|
import nl from "./nl.json.mjs";
|
|
9
|
+
import pl from "./pl.json.mjs";
|
|
9
10
|
import pt from "./pt.json.mjs";
|
|
11
|
+
import sv from "./sv.json.mjs";
|
|
10
12
|
import tr from "./tr.json.mjs";
|
|
11
13
|
import vi from "./vi.json.mjs";
|
|
12
14
|
import zh from "./zh.json.mjs";
|
|
13
|
-
import pl from "./pl.json.mjs";
|
|
14
|
-
import sv from "./sv.json.mjs";
|
|
15
15
|
var localizedMessages = {
|
|
16
16
|
de,
|
|
17
17
|
en,
|