{"version":3,"file":"default-packages_common_packages_core_src_input_numeric-input_numeric-input_tsx.b82ba36b982ae9c7.prod.js","mappings":"kgBAMA,MAAMA,GAAmB,aAAO,MAAK;;EAQxBC,EAAa,EAAGC,YAC3B,SAACF,EAAgB,CAACG,WAAW,SAASC,GAAI,EAAC,cAC9BC,IAAVH,IACC,+BACE,SAAC,KAAU,eARe,cAQmBI,OAAK,EAACC,KAAM,KAASC,OAAM,SACrEN,O,4wBCbJ,MAAMO,EAAsB,CACjCC,EACAC,EACAC,EACAC,IAGKH,GAAaC,GAIhB,SAAC,IAAO,CACNC,QAASD,EACTG,SAAU,KAASC,OACnBC,WAAS,KACJH,GAAgB,CAAC,EAAE,SAEvBD,IATIA,E,+ICMJ,MAAMK,EAA2C,CACtD,CACEC,UAAW,EAAGC,YAAaC,OAAOC,MAAMF,GACxCG,cAAe,CACbC,OAAQ,kBAGZ,CACEL,UAAW,EAAGM,MAAKL,WAAmB,MAAPK,GAAeL,GAASK,EACvDF,cAAe,EAAGE,UAAU,CAC1BD,OAAQ,gBACRE,QAAiB,IAARD,EAAY,iCAAmC,2BAA2BA,OAGvF,CACEN,UAAW,EAAGQ,MAAKP,WAAmB,MAAPO,GAAeP,GAASO,EACvDJ,cAAe,EAAGI,UAAU,CAC1BH,OAAQ,gBACRE,QAAS,8BAA8BC,Q,wkBClBtC,MAAMC,EAAgB,uDAa7B,SAASC,EAAoBC,GAC3B,MACMC,EAAWD,EAAKE,aADH,KAEbC,EAAMH,EAAKE,aAAa,GACxBE,EAAOJ,EAAKE,aAAa,GAGzBG,EAAS,IAAIC,OAFH,GAAGH,QAAUC,KAEMG,KAAKN,GAExC,OAAQI,GAAUA,EAAO,IAAO,GAClC,CAeO,SAASG,EAA0BlB,EAAwBU,GAChE,MAAMS,EAAgB,GAAKnB,EAC3B,GAAIoB,WAAWD,GAAeE,aAAerB,EAAMqB,WACjD,OAAOrB,EAAMqB,WAGf,MAAMC,EAAmBb,EAAoBC,GAG7C,OAAOS,EACJI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C5BC,yBACE,uIACFC,YACE,uNACFC,iBAAkB,gDAClBC,8BACE,kIACFC,iCACE,qIACFC,SAAU,2DACVC,YAAa,+EACbC,aACE,qJACFC,YACE,4JACFC,kBAAmB,2DACnBC,YACE,wJACFC,WAAY,qEACZC,cAAe,mEACfC,cAAe,6EACfC,cAAe,+DACfC,QAAS,iFACTC,aAAc,uCACdC,YAAa,6CACbC,mBACE,4FACFC,gBACE,sGACFC,aACE,mHACFC,0BACE,2FACFC,aAAc,qEACdC,gBAAiB,4DACjBC,sBACE,8EACFC,qBACE,0FACFC,gBAAiB,kEACjBC,mBACE,kFACFC,qBAAsB,kEACtBC,uBAAwB,yEACxBC,eAAgB,kFAChBC,kBACE,gGACFC,iBAAkB,gEAClBC,wBACE,0FACFC,eAAgB,8DAChBC,cACE,sIACFC,kBAAmB,+EACnBC,sBAAuB,uDACvBC,aAAc,uEACdC,wBAAyB,kEACzBC,IAAK,wIACLC,KAAM,8GACNC,wBAAyB,gDACzBC,gBAAiB,iEACjBC,oBAAqB,wCACrBC,oBAAqB,oEACrBC,cACE,oMACFC,aAAc,iCACdC,iBACE,kIACFC,eACE,yJACFC,qBAAsB,yDACtBC,oBACE,4FACFC,cAAe,iFACfC,SACE,+GACFC,UAAW,qFACXC,aAAc,+BACdC,SAAU,yDACVC,YAAa,wCACbC,kBAAmB,+BACnBC,mBAAoB,oDACpBC,eACE,0PACFC,wBAAyB,2IAGzBC,aACE,wFACFC,gBAAiB,oCACjBC,uBACE,2GACFC,IAAK,8EACLC,iBAAkB,4DAClBC,cACE,8FACFC,qBACE,kGACFC,OAAQ,yDACRC,gBACE,mGACFC,qBACE,mLACFC,cAAe,oDACfC,QAAS,gCACTC,kBAAmB,kEACnBC,0BACE,+OACFC,oBACE,gHACFC,mBACE,sIACFC,iBAAkB,0BAClBC,gBAAiB,mCACjBC,YACE,kGACFC,YAAa,4BACbC,yBACE,qFACFC,kBAAmB,qCACnBC,iBACE,gHACFC,0BACE,iFACFC,wBAAyB,2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AGkB,C","sources":["webpack://aurora-new-frontend/./packages/common/packages/core/src/input/input-error.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/tooltip/with-disabled-tooltip.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/validator/validators.ts","webpack://aurora-new-frontend/./packages/common/packages/core/src/input/numeric-input/patched-blueprint-numeric-input/numeric-input-utils.ts","webpack://aurora-new-frontend/./packages/common/packages/core/src/input/numeric-input/patched-blueprint-numeric-input/numeric-input.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/input/numeric-input/numeric-input.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/input/tags.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/tooltip/tooltip-content.ts","webpack://aurora-new-frontend/./packages/common/packages/core/src/tooltip/tooltip.tsx","webpack://aurora-new-frontend/./packages/common/packages/core/src/validator/use-validator.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { Flex } from '@rebass/grid';\n\nimport { AuroraText, TextType } from '../typography';\n\nconst StyledInputError = styled(Flex)`\n height: 16px;\n`;\n\nexport const INPUT_ERROR_TESTID = 'input-error';\ninterface InputErrorProps {\n error: string | undefined;\n}\nexport const InputError = ({ error }: InputErrorProps) => (\n \n {error !== undefined && (\n <>\n \n {error}\n \n >\n )}\n \n);\n","import React from 'react';\n\nimport { ITooltipProps, Position, Tooltip } from '@blueprintjs/core';\n\ntype ProvidedTooltipProps = 'content' | 'position' | 'usePortal';\n\nexport const withDisabledTooltip = (\n disabled: boolean | undefined,\n disabledReason: string | undefined,\n content: T,\n tooltipProps?: Omit &\n Partial> & { key?: string },\n) => {\n if (!disabled || !disabledReason) {\n return content;\n }\n return (\n \n {content}\n \n );\n};\n","import { IInputGroupProps, INumericInputProps } from '@blueprintjs/core';\n\ntype SimpleType = string | number | boolean | null | undefined;\nexport type ValidatorProps = SimpleType | Record;\n\nexport interface Validator {\n // An undefined condition will always fail validation and display the error message\n condition?: (props: Props) => boolean;\n failureResult: ((props: Props) => Result) | Result;\n}\n\nexport type Validators = Validator[];\n\nexport type NumericInputValidators = Validators<\n Pick & { value: number },\n { inline: string; tooltip?: string }\n>;\n\nexport type TextInputValidators = Validators<{ value: IInputGroupProps['value'] }, string>;\n\nexport const minMaxValidators: NumericInputValidators = [\n {\n condition: ({ value }) => !Number.isNaN(value),\n failureResult: {\n inline: 'Invalid Entry',\n },\n },\n {\n condition: ({ min, value }) => min == null || value >= min,\n failureResult: ({ min }) => ({\n inline: 'Invalid Entry',\n tooltip: min === 0 ? `Please enter a positive number` : `Should not be less than ${min}`,\n }),\n },\n {\n condition: ({ max, value }) => max == null || value <= max,\n failureResult: ({ max }) => ({\n inline: 'Invalid Entry',\n tooltip: `Should not be greater than ${max}`,\n }),\n },\n];\n\n// taken from http://emailregex.com/\nconst emailCheckRegex =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\nexport const emailValidators: TextInputValidators = [\n {\n condition: ({ value }) => !!value && emailCheckRegex.test(value),\n failureResult: 'Please enter a valid email address',\n },\n];\n","/*\n * Copyright 2018 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useIntl } from '@aurorasolar/intl';\n\ntype Intl = ReturnType;\n\n/* eslint-disable */\nexport const CLAMP_MIN_MAX = `Patched-Blueprint clamp: max cannot be less than min`;\n\nfunction clamp(val: number, min: number, max: number) {\n if (val == null) {\n return val;\n }\n if (max < min) {\n throw new Error(CLAMP_MIN_MAX);\n }\n return Math.min(Math.max(val, min), max);\n}\n\n/** Returns the `decimal` number separator based on locale */\nfunction getDecimalSeparator(intl: Intl) {\n const testNumber = 1.9;\n const testText = intl.formatNumber(testNumber);\n const one = intl.formatNumber(1);\n const nine = intl.formatNumber(9);\n const pattern = `${one}(.+)${nine}`;\n\n const result = new RegExp(pattern).exec(testText);\n\n return (result && result[1]) || '.';\n}\n\n/** Transform the localized character (ex. \"\") to a javascript recognizable string number (ex. \"10.99\") */\nfunction transformLocalizedNumberToStringNumber(character: string, intl: Intl) {\n const charactersMap = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => intl.formatNumber(value));\n const jsNumber = charactersMap.indexOf(character);\n\n if (jsNumber !== -1) {\n return jsNumber;\n } else {\n return character;\n }\n}\n\n/** Transforms the localized number (ex. \"10,99\") to a javascript recognizable string number (ex. \"10.99\") */\nexport function parseStringToStringNumber(value: number | string, intl: Intl): string {\n const valueAsString = '' + value;\n if (parseFloat(valueAsString).toString() === value.toString()) {\n return value.toString();\n }\n\n const decimalSeparator = getDecimalSeparator(intl);\n //const sanitizedString = sanitizeNumericInput(valueAsString, locale);\n\n return valueAsString\n .split('')\n .map((character) => transformLocalizedNumberToStringNumber(character, intl))\n .join('')\n .replace(decimalSeparator, '.');\n}\n\nexport function clampValue(value: number, min?: number, max?: number) {\n // defaultProps won't work if the user passes in null, so just default\n // to +/- infinity here instead, as a catch-all.\n const adjustedMin = min != null ? min : -Infinity;\n const adjustedMax = max != null ? max : Infinity;\n return clamp(value, adjustedMin, adjustedMax);\n}\n\nexport function getValueOrEmptyValue(value: number | string = '', intl: Intl) {\n return parseStringToStringNumber(value, intl);\n}\n\n/** Returns `true` if the string represents a valid numeric value, like \"1e6\". */\n/** Returns `true` if the string represents a valid numeric value, like \"1e6\". */\nexport function isValueNumeric(value: string, intl: Intl) {\n // checking if a string is numeric in Typescript is a big pain, because\n // we can't simply toss a string parameter to isFinite. below is the\n // essential approach that jQuery uses, which involves subtracting a\n // parsed numeric value from the string representation of the value. we\n // need to cast the value to the `any` type to allow this operation\n // between dissimilar types.\n const stringToStringNumber = parseStringToStringNumber(value, intl);\n return value != null && (stringToStringNumber as any) - parseFloat(stringToStringNumber) + 1 >= 0;\n}\n\nexport function isValidNumericKeyboardEvent(e: React.KeyboardEvent, intl: Intl) {\n // unit tests may not include e.key. don't bother disabling those events.\n if (e.key == null) {\n return true;\n }\n\n // allow modified key strokes that may involve letters and other\n // non-numeric/invalid characters (Cmd + A, Cmd + C, Cmd + V, Cmd + X).\n if (e.ctrlKey || e.altKey || e.metaKey) {\n return true;\n }\n\n // keys that print a single character when pressed have a `key` name of\n // length 1. every other key has a longer `key` name (e.g. \"Backspace\",\n // \"ArrowUp\", \"Shift\"). since none of those keys can print a character\n // to the field--and since they may have important native behaviors\n // beyond printing a character--we don't want to disable their effects.\n const isSingleCharKey = e.key.length === 1;\n if (!isSingleCharKey) {\n return true;\n }\n\n // now we can simply check that the single character that wants to be printed\n // is a floating-point number character that we're allowed to print.\n return isFloatingPointNumericCharacter(e.key, intl);\n}\n\n/**\n * A regex that matches a string of length 1 (i.e. a standalone character)\n * if and only if it is a floating-point number character as defined by W3C:\n * https://www.w3.org/TR/2012/WD-html-markup-20120329/datatypes.html#common.data.float\n *\n * Floating-point number characters are the only characters that can be\n * printed within a default input[type=\"number\"]. This component should\n * behave the same way when this.props.allowNumericCharactersOnly = true.\n * See here for the input[type=\"number\"].value spec:\n * https://www.w3.org/TR/2012/WD-html-markup-20120329/input.number.html#input.number.attrs.value\n */\nexport function isFloatingPointNumericCharacter(character: string, intl: Intl) {\n const decimalSeparator = getDecimalSeparator(intl).replace('.', '\\\\.');\n const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => intl.formatNumber(value)).join('');\n const localeFloatingPointNumericCharacterRegex = new RegExp(\n '^[Ee' + numbers + '\\\\+\\\\-' + decimalSeparator + ']$',\n );\n\n return localeFloatingPointNumericCharacterRegex.test(character);\n}\n\n/**\n * Round the value to have _up to_ the specified maximum precision.\n *\n * This differs from `toFixed(5)` in that trailing zeroes are not added on\n * more precise values, resulting in shorter strings.\n */\nexport function toMaxPrecision(value: number, maxPrecision: number) {\n // round the value to have the specified maximum precision (toFixed is the wrong choice,\n // because it would show trailing zeros in the decimal part out to the specified precision)\n // source: http://stackoverflow.com/a/18358056/5199574\n const scaleFactor = Math.pow(10, maxPrecision);\n return Math.round(value * scaleFactor) / scaleFactor;\n}\n","/*\n * Copyright 2017 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable */\nimport * as React from 'react';\n\nimport { useIntl } from '@aurorasolar/intl';\nimport {\n AbstractPureComponent2,\n Button,\n ButtonGroup,\n Classes,\n ControlGroup,\n DISPLAYNAME_PREFIX,\n HTMLInputProps,\n InputGroup,\n INumericInputProps,\n Keys,\n Position,\n removeNonHTMLProps,\n Utils,\n} from '@blueprintjs/core';\nimport * as Errors from '@blueprintjs/core/src/common/errors';\n\nimport {\n clampValue,\n isFloatingPointNumericCharacter,\n isValidNumericKeyboardEvent,\n isValueNumeric,\n parseStringToStringNumber,\n toMaxPrecision,\n} from './numeric-input-utils';\n\ntype Intl = ReturnType;\n\nexport interface IRawNumericInputProps extends INumericInputProps {\n intl: Intl;\n}\n\nexport interface INumericInputState {\n prevMinProp?: number;\n prevMaxProp?: number;\n prevValueProp?: number | string;\n shouldSelectAfterUpdate: boolean;\n stepMaxPrecision: number;\n value: string;\n}\n\nenum IncrementDirection {\n DOWN = -1,\n UP = +1,\n}\n\nconst NON_HTML_PROPS: Array = [\n 'allowNumericCharactersOnly',\n 'buttonPosition',\n 'clampValueOnBlur',\n 'className',\n 'majorStepSize',\n 'minorStepSize',\n 'onButtonClick',\n 'onValueChange',\n 'selectAllOnFocus',\n 'selectAllOnIncrement',\n 'stepSize',\n];\n\ntype ButtonEventHandlers = Required<\n Pick, 'onKeyDown' | 'onMouseDown'>\n>;\n\nclass RawNumericInput extends AbstractPureComponent2<\n HTMLInputProps & IRawNumericInputProps,\n INumericInputState\n> {\n public static displayName = `${DISPLAYNAME_PREFIX}.NumericInput`;\n\n public static VALUE_EMPTY = '';\n\n public static VALUE_ZERO = '0';\n\n public static defaultProps: Omit = {\n allowNumericCharactersOnly: true,\n buttonPosition: Position.RIGHT,\n clampValueOnBlur: false,\n large: false,\n majorStepSize: 10,\n minorStepSize: 0.1,\n selectAllOnFocus: false,\n selectAllOnIncrement: false,\n stepSize: 1,\n value: RawNumericInput.VALUE_EMPTY,\n };\n\n public static getDerivedStateFromProps(props: IRawNumericInputProps, state: INumericInputState) {\n const nextState = {\n prevMinProp: props.min,\n prevMaxProp: props.max,\n prevValueProp: props.value,\n };\n\n const didMinChange = props.min !== state.prevMinProp;\n const didMaxChange = props.max !== state.prevMaxProp;\n const didBoundsChange = didMinChange || didMaxChange;\n const didValuePropChange = props.value !== state.prevValueProp;\n let value: string = state.value;\n if (didValuePropChange && typeof props.value === 'number') {\n value = props.intl.formatNumber(props.value, { useGrouping: false });\n } else if (didValuePropChange) {\n value = props.value?.toString() ?? '';\n }\n\n const stepMaxPrecision = RawNumericInput.getStepMaxPrecision(props);\n\n const sanitizedValue =\n value !== RawNumericInput.VALUE_EMPTY\n ? RawNumericInput.getSanitizedValue(\n value,\n stepMaxPrecision,\n props.min!,\n props.max!,\n undefined,\n props.intl,\n )\n : RawNumericInput.VALUE_EMPTY;\n\n // if a new min and max were provided that cause the existing value to fall\n // outside of the new bounds, then clamp the value to the new valid range.\n if (didBoundsChange && sanitizedValue !== state.value) {\n return { ...nextState, stepMaxPrecision, value: sanitizedValue };\n } else {\n return { ...nextState, stepMaxPrecision, value };\n }\n }\n\n private static CONTINUOUS_CHANGE_DELAY = 300;\n\n private static CONTINUOUS_CHANGE_INTERVAL = 100;\n\n // Value Helpers\n // =============\n private static getStepMaxPrecision(props: HTMLInputProps & IRawNumericInputProps) {\n if (props.minorStepSize != null) {\n return Utils.countDecimalPlaces(props.minorStepSize);\n }\n return Utils.countDecimalPlaces(props.stepSize!);\n }\n\n private static getSanitizedValue(\n value: string,\n stepMaxPrecision: number,\n min: number,\n max: number,\n delta = 0,\n intl: Intl,\n ) {\n if (!isValueNumeric(value, intl)) {\n return RawNumericInput.VALUE_EMPTY;\n }\n const currentValue = parseStringToStringNumber(value, intl);\n const nextValue = toMaxPrecision(Number(currentValue) + delta, stepMaxPrecision);\n const clamped = clampValue(nextValue, min, max);\n\n const convertedClamped = intl.formatNumber(clamped, { useGrouping: false });\n return convertedClamped;\n }\n\n public state: INumericInputState = {\n shouldSelectAfterUpdate: false,\n stepMaxPrecision: RawNumericInput.getStepMaxPrecision(this.props),\n value: this.props.intl.formatNumber(\n Number(parseStringToStringNumber(this.props.value ?? '', this.props.intl)),\n { useGrouping: false },\n ),\n };\n\n // updating these flags need not trigger re-renders, so don't include them in this.state.\n private didPasteEventJustOccur = false;\n\n private delta = 0;\n\n private inputElement: HTMLInputElement | null = null;\n\n private intervalId: number | null = null;\n\n private incrementButtonHandlers = this.getButtonEventHandlers(IncrementDirection.UP);\n\n private decrementButtonHandlers = this.getButtonEventHandlers(IncrementDirection.DOWN);\n\n public render() {\n const { buttonPosition, className, fill, large } = this.props;\n const containerClasses = [Classes.NUMERIC_INPUT, { [Classes.LARGE]: large }, className];\n if (large) containerClasses.push(Classes.LARGE);\n const buttons = this.renderButtons();\n return (\n \n {buttonPosition === Position.LEFT && buttons}\n {this.renderInput()}\n {buttonPosition === Position.RIGHT && buttons}\n \n );\n }\n\n public componentDidUpdate(prevProps: IRawNumericInputProps, prevState: INumericInputState) {\n super.componentDidUpdate(prevProps, prevState);\n if (this.state.shouldSelectAfterUpdate) {\n this.inputElement?.setSelectionRange(0, this.state.value.length);\n }\n\n const didControlledValueChange = this.props.value !== prevProps.value;\n\n if (!didControlledValueChange && this.state.value !== prevState.value) {\n this.invokeValueCallback(this.state.value, this.props.onValueChange);\n }\n }\n\n protected validateProps(nextProps: HTMLInputProps & IRawNumericInputProps) {\n const { majorStepSize, max, min, minorStepSize, stepSize } = nextProps;\n if (min != null && max != null && min > max) {\n throw new Error(Errors.NUMERIC_INPUT_MIN_MAX);\n }\n if (stepSize == null) {\n throw new Error(Errors.NUMERIC_INPUT_STEP_SIZE_NULL);\n }\n if (stepSize <= 0) {\n throw new Error(Errors.NUMERIC_INPUT_STEP_SIZE_NON_POSITIVE);\n }\n if (minorStepSize && minorStepSize <= 0) {\n throw new Error(Errors.NUMERIC_INPUT_MINOR_STEP_SIZE_NON_POSITIVE);\n }\n if (majorStepSize && majorStepSize <= 0) {\n throw new Error(Errors.NUMERIC_INPUT_MAJOR_STEP_SIZE_NON_POSITIVE);\n }\n if (minorStepSize && minorStepSize > stepSize) {\n throw new Error(Errors.NUMERIC_INPUT_MINOR_STEP_SIZE_BOUND);\n }\n if (majorStepSize && majorStepSize < stepSize) {\n throw new Error(Errors.NUMERIC_INPUT_MAJOR_STEP_SIZE_BOUND);\n }\n }\n\n // Render Helpers\n // ==============\n\n private renderButtons() {\n const { intent } = this.props;\n const disabled = this.props.disabled || this.props.readOnly;\n return (\n \n \n \n \n );\n }\n\n private renderInput() {\n const inputGroupHtmlProps = removeNonHTMLProps(this.props, NON_HTML_PROPS, true);\n return (\n \n );\n }\n\n private inputRef = (input: HTMLInputElement | null) => {\n this.inputElement = input;\n Utils.safeInvoke(this.props.inputRef, input);\n };\n\n // Callbacks - Buttons\n // ===================\n\n private getButtonEventHandlers(direction: IncrementDirection): ButtonEventHandlers {\n return {\n // keydown is fired repeatedly when held so it's implicitly continuous\n onKeyDown: (evt) => {\n if (Keys.isKeyboardClick(evt.keyCode)) {\n this.handleButtonClick(evt, direction);\n }\n },\n onMouseDown: (evt) => {\n this.handleButtonClick(evt, direction);\n this.startContinuousChange();\n },\n };\n }\n\n private handleButtonClick = (\n e: React.MouseEvent | React.KeyboardEvent,\n direction: IncrementDirection,\n ) => {\n const delta = this.updateDelta(direction, e);\n const nextValue = this.incrementValue(delta);\n this.invokeValueCallback(nextValue, this.props.onButtonClick);\n };\n\n private startContinuousChange() {\n // The button's onMouseUp event handler doesn't fire if the user\n // releases outside of the button, so we need to watch all the way\n // from the top.\n document.addEventListener('mouseup', this.stopContinuousChange);\n\n // Initial delay is slightly longer to prevent the user from\n // accidentally triggering the continuous increment/decrement.\n this.setTimeout(() => {\n this.intervalId = window.setInterval(\n this.handleContinuousChange,\n RawNumericInput.CONTINUOUS_CHANGE_INTERVAL,\n );\n }, RawNumericInput.CONTINUOUS_CHANGE_DELAY);\n }\n\n private stopContinuousChange = () => {\n this.delta = 0;\n this.clearTimeouts();\n clearInterval(this.intervalId!);\n document.removeEventListener('mouseup', this.stopContinuousChange);\n };\n\n private handleContinuousChange = () => {\n const nextValue = this.incrementValue(this.delta);\n this.invokeValueCallback(nextValue, this.props.onButtonClick);\n };\n\n // Callbacks - Input\n // =================\n\n private handleInputFocus = (e: React.FocusEvent) => {\n // update this state flag to trigger update for input selection (see componentDidUpdate)\n this.setState({ shouldSelectAfterUpdate: !!this.props.selectAllOnFocus });\n Utils.safeInvoke(this.props.onFocus, e);\n };\n\n private handleInputBlur = (e: React.FocusEvent) => {\n // always disable this flag on blur so it's ready for next time.\n this.setState({ shouldSelectAfterUpdate: false });\n\n if (this.props.clampValueOnBlur) {\n const { value } = e.target as HTMLInputElement;\n const sanitizedValue = this.getSanitizedValue(value);\n this.setState({ value: sanitizedValue });\n }\n\n Utils.safeInvoke(this.props.onBlur, e);\n };\n\n private handleInputKeyDown = (e: React.KeyboardEvent) => {\n if (this.props.disabled || this.props.readOnly) {\n return;\n }\n\n const { keyCode } = e;\n\n let direction: IncrementDirection | null = null;\n\n if (keyCode === Keys.ARROW_UP) {\n direction = IncrementDirection.UP;\n } else if (keyCode === Keys.ARROW_DOWN) {\n direction = IncrementDirection.DOWN;\n }\n\n if (direction != null) {\n // when the input field has focus, some key combinations will modify\n // the field's selection range. we'll actually want to select all\n // text in the field after we modify the value on the following\n // lines. preventing the default selection behavior lets us do that\n // without interference.\n e.preventDefault();\n\n const delta = this.updateDelta(direction, e);\n this.incrementValue(delta);\n }\n\n Utils.safeInvoke(this.props.onKeyDown, e);\n };\n\n private handleInputKeyPress = (e: React.KeyboardEvent) => {\n // we prohibit keystrokes in onKeyPress instead of onKeyDown, because\n // e.key is not trustworthy in onKeyDown in all browsers.\n if (this.props.allowNumericCharactersOnly && !isValidNumericKeyboardEvent(e, this.props.intl)) {\n e.preventDefault();\n }\n\n Utils.safeInvoke(this.props.onKeyPress, e);\n };\n\n private handleInputPaste = (e: React.ClipboardEvent) => {\n this.didPasteEventJustOccur = true;\n Utils.safeInvoke(this.props.onPaste, e);\n };\n\n private handleInputChange = (e: React.FormEvent) => {\n const { value } = e.target as HTMLInputElement;\n\n let nextValue = value;\n if (this.props.allowNumericCharactersOnly && this.didPasteEventJustOccur) {\n this.didPasteEventJustOccur = false;\n const valueChars = value.split('');\n const sanitizedValueChars = valueChars.filter((char) =>\n isFloatingPointNumericCharacter(char, this.props.intl),\n );\n const sanitizedValue = sanitizedValueChars.join('');\n nextValue = sanitizedValue;\n }\n this.setState({ shouldSelectAfterUpdate: false, value: nextValue });\n };\n\n private invokeValueCallback(\n value: string,\n callback: ((valueAsNumber: number, valueAsString: string) => void) | undefined,\n ) {\n Utils.safeInvoke(callback, Number(parseStringToStringNumber(value, this.props.intl)), value);\n }\n\n private incrementValue(delta: number) {\n // pretend we're incrementing from 0 if currValue is empty\n const currValue = this.state.value || RawNumericInput.VALUE_ZERO;\n const nextValue = this.getSanitizedValue(currValue, delta);\n\n this.setState({ shouldSelectAfterUpdate: !!this.props.selectAllOnIncrement, value: nextValue });\n\n return nextValue;\n }\n\n private getIncrementDelta(\n direction: IncrementDirection,\n isShiftKeyPressed: boolean,\n isAltKeyPressed: boolean,\n ) {\n const { majorStepSize, minorStepSize, stepSize } = this.props;\n\n if (isShiftKeyPressed && majorStepSize != null) {\n return direction * majorStepSize;\n }\n if (isAltKeyPressed && minorStepSize != null) {\n return direction * minorStepSize;\n }\n return direction * stepSize!;\n }\n\n private getSanitizedValue(value: string, delta = 0) {\n return RawNumericInput.getSanitizedValue(\n value,\n this.state.stepMaxPrecision,\n this.props.min!,\n this.props.max!,\n delta,\n this.props.intl,\n );\n }\n\n private updateDelta(direction: IncrementDirection, e: React.MouseEvent | React.KeyboardEvent) {\n this.delta = this.getIncrementDelta(direction, e.shiftKey, e.altKey);\n return this.delta;\n }\n}\n\nexport const NumericInput = (props: HTMLInputProps & INumericInputProps) => {\n const intl = useIntl();\n return ;\n};\n","import { FC, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { Box, Flex } from 'reflexbox/styled-components';\nimport styled, { css } from 'styled-components';\n\nimport { useIntl } from '@aurorasolar/intl';\nimport { HTMLInputProps, INumericInputProps } from '@blueprintjs/core';\n\nimport { Colors } from '../../colors';\nimport { CURRENCIES, CurrencyTypes } from '../../constants/currencies';\nimport { DropdownButtonType, StandardSelect } from '../../select';\nimport { AuroraTooltip, AuroraTooltipKey } from '../../tooltip';\nimport { withDisabledTooltip } from '../../tooltip/with-disabled-tooltip';\nimport { Text } from '../../typography';\nimport { minMaxValidators, NumericInputValidators, useValidator } from '../../validator';\nimport {\n DefaultInputCSS,\n EProposalInputAdditionalCss,\n EProposalNumericalInputAdditionalCss,\n} from '../base';\nimport { InputError } from '../input-error';\nimport { CadInspectorTag, NumericInputLeftTag, NumericInputRightTag } from '../tags';\nimport { NumericInput } from './patched-blueprint-numeric-input/numeric-input';\n\ninterface AuroraNumericInputCustomProps {\n 'aria-label'?: string;\n allowEmptyValueOutput?: boolean;\n label?: string;\n marginBottom?: number;\n noInlineErrors?: boolean;\n validators?: NumericInputValidators;\n disabledReason?: string;\n labelTooltipKey?: AuroraTooltipKey;\n}\n\nexport type AuroraNumericInputProps = AuroraNumericInputCustomProps &\n INumericInputProps &\n HTMLInputProps;\n\n// checks for '-' or a number ending with 'e'\nexport const IS_PRE_VALID = /^-$|^-?\\d+e$/;\n\nconst StyledNumericInput = styled(NumericInput)`\n ${DefaultInputCSS}\n\n && .bp3-input-group {\n width: ${({ fill, width }) => (!fill && !width ? '180px' : 'unset')};\n height: ${({ height }) => (height !== null ? `${height}px` : 'inherit')};\n }\n\n && .bp3-input-group,\n && .bp3-input {\n ${({ height }) => (height != null ? `height: ${height};` : '')}\n ${({ width }) =>\n width != null\n ? css`\n min-width: unset;\n width: ${width};\n `\n : ''}\n }\n`;\n\nexport interface DisplayAsString {\n value?: string;\n}\n\nexport const AuroraNumericInput: FC = (props) => {\n const {\n allowEmptyValueOutput = false,\n disabledReason,\n validators = [],\n onValueChange,\n label,\n noInlineErrors = false,\n 'aria-label': ariaLabel,\n marginBottom = 3,\n labelTooltipKey,\n ...inputProps\n } = props;\n const { disabled, min, max } = inputProps;\n const [errors, validate] = useValidator([...validators, ...minMaxValidators]);\n const [displayAsString, setDisplayAsString] = useState();\n\n useEffect(() => {\n if (inputProps.value) {\n setDisplayAsString(undefined);\n }\n }, [inputProps.value]);\n\n return (\n \n {label && (\n \n \n {label}\n \n {labelTooltipKey && }\n \n )}\n {withDisabledTooltip(\n disabled,\n disabledReason,\n {\n inputProps.onBlur?.(...args);\n }}\n onValueChange={(updatedValue, valueAsString) => {\n const isEmpty = valueAsString === '';\n if (IS_PRE_VALID.test(valueAsString) || (isEmpty && !allowEmptyValueOutput)) {\n // A Pre-valid value is a value that does not warrant an error\n // but also does not trigger onValueChange\n return;\n }\n\n if (validate({ max, min, value: updatedValue })) {\n onValueChange?.(updatedValue, valueAsString);\n setDisplayAsString({ value: valueAsString });\n }\n }}\n />,\n )}\n {!noInlineErrors && }\n \n );\n};\n\nexport const CadInspectorNumericInput = (\n props: AuroraNumericInputProps & { rightTag?: string },\n) => {\n const { rightTag, ...otherProps } = props;\n return (\n {rightTag} : undefined}\n width=\"96px\"\n {...otherProps}\n />\n );\n};\n\nexport const EProposalBlueNumericInput = styled(AuroraNumericInput)`\n ${EProposalInputAdditionalCss}\n ${EProposalNumericalInputAdditionalCss}\n`;\n\nexport const FormPercentageInput = (props: AuroraNumericInputProps) => (\n %}\n {...props}\n />\n);\n\nconst convertToMoneyValue = (n: number, currencyPrecision: number, locale: string): string => {\n if (Number.isNaN(n)) {\n return '';\n }\n const minimumFractionDigits = Number.isInteger(n) ? 0 : currencyPrecision;\n return Intl.NumberFormat(locale, {\n maximumFractionDigits: 20, // 20 is the maximum possible value for this field\n minimumFractionDigits,\n }).format(n);\n};\n\nexport const FormMoneyInput: FC<\n AuroraNumericInputProps & {\n currencyType?: CurrencyTypes | null;\n prefix?: string;\n suffix?: string;\n }\n> = ({ currencyType, prefix, suffix, ...props }) => {\n const { value } = props;\n const currency = CURRENCIES[currencyType ?? CurrencyTypes.Usd];\n const { locale } = useIntl();\n const initialValue = typeof value === 'string' ? parseFloat(value) : value ?? undefined;\n\n const backingValue = useRef(initialValue as number);\n const hasFocus = useRef(false);\n const [focusProps, setFocusProps] = useState({\n allowNumericCharactersOnly: true,\n value,\n });\n\n useLayoutEffect(() => {\n backingValue.current = initialValue as number;\n if (!hasFocus.current) {\n setFocusProps({\n allowNumericCharactersOnly: true,\n value:\n typeof value === 'number'\n ? convertToMoneyValue(value, currency.decimalPlaces, locale)\n : value,\n });\n }\n }, [currency.decimalPlaces, value, initialValue, locale]);\n\n const isPrefix: boolean = !!prefix || !currency.isSuffix;\n const prefixStr: string | undefined = isPrefix ? prefix ?? currency.symbol : undefined;\n\n const isSuffix: boolean = !!suffix || !!currency.isSuffix;\n const suffixStr: string | undefined = isSuffix ? suffix ?? currency.symbol : undefined;\n\n return (\n {prefixStr} : undefined}\n max={Infinity}\n min={-Infinity}\n minorStepSize={0.01}\n noInlineErrors\n rightElement={\n suffixStr ? {suffixStr} : undefined\n }\n stepSize={0.01}\n {...props}\n {...focusProps}\n lang={locale}\n onBlur={(...args) => {\n hasFocus.current = false;\n setFocusProps({\n allowNumericCharactersOnly: true,\n value:\n typeof backingValue.current === 'number'\n ? convertToMoneyValue(backingValue.current, currency.decimalPlaces, locale)\n : backingValue.current,\n });\n props?.onBlur?.(...args);\n }}\n onFocus={(...args) => {\n hasFocus.current = true;\n const valueAsString =\n typeof backingValue?.current === 'number' && Number.isNaN(backingValue?.current)\n ? ''\n : backingValue?.current?.toLocaleString(locale);\n setFocusProps({\n allowNumericCharactersOnly: true,\n value: valueAsString,\n });\n props?.onFocus?.(...args);\n }}\n onInput={(e, ...args) => {\n backingValue.current = parseFloat(e.currentTarget.value);\n props?.onInput?.(e, ...args);\n }}\n />\n );\n};\n\nconst FullHeightActionAuroraNumericInput = styled(AuroraNumericInput)`\n &&& .bp3-input-action {\n background-color: ${Colors.GRAY_200};\n margin: 1.75px 0.75px 0 0;\n height: calc(100% - 2.25px);\n border-radius: 0 6px 6px 0;\n }\n &&& .bp3-input-action div,\n &&& .bp3-input-action span,\n &&& button {\n margin: 0;\n height: 100%;\n justify-content: center;\n align-items: center;\n }\n\n &&& .bp3-input-action button span {\n height: unset;\n color: ${Colors.GRAY_600};\n }\n`;\n\nconst NoScrollStandardSelect = styled(({ ...props }) => )`\n &&& .bp3-overlay .bp3-transition-container {\n height: max-content;\n background-color: white;\n }\n &&& button {\n padding: 0 16px;\n }\n`;\n\ninterface NumericInputWithSelectableUnitProps {\n selectOptions: T[];\n selectedItem?: T;\n onItemSelected: (item: T) => void;\n getItemKey: (item: T) => string;\n getItemLabel: (item: T) => string;\n}\nexport function NumericInputWithSelectableUnit({\n selectOptions,\n selectedItem,\n getItemKey,\n getItemLabel,\n onItemSelected,\n ...props\n}: NumericInputWithSelectableUnitProps & AuroraNumericInputProps) {\n const defaultItem = selectOptions.length > 0 ? selectOptions[0] : undefined;\n const selectMenu = (\n \n );\n\n return ;\n}\n\nexport const EProposalFormMoneyInput = styled(FormMoneyInput)`\n ${EProposalInputAdditionalCss}\n ${EProposalNumericalInputAdditionalCss}\n`;\n\n// workaround for fixing the padding issue of money input with right tag\nexport const MoneyInputWithRightTag = styled(FormMoneyInput)`\n && .bp3-tag ~ .bp3-input {\n padding-left: 55px;\n }\n`;\n\n// workaround for fixing the padding issue of numeric input with left icon and right tag\nexport const NumericInputWithLeftIconAndRightTag = styled(AuroraNumericInput)`\n && .bp3-tag ~ .bp3-input {\n padding-left: 55px;\n }\n`;\n","import styled from 'styled-components';\n\nimport { Tag } from '@blueprintjs/core';\n\nimport { Colors } from '../colors';\nimport { defaultButtonBorderRadius } from '../layout';\n\nexport const TransparentTag = styled(Tag)`\n && {\n background-color: transparent !important;\n color: ${Colors.GRAY_500} !important;\n }\n`;\n\nexport const NumericInputRightTag = styled(Tag)`\n background: ${Colors.GRAY_100};\n color: ${Colors.GRAY_600};\n border-radius: 0 5px 5px 0;\n padding: 0 16px;\n`;\n\nexport const NumericInputLeftTag = styled(Tag).attrs(() => ({ className: 'bp3-input-action' }))`\n background: ${Colors.GRAY_100};\n color: ${Colors.GRAY_600};\n border-radius: 5px 0 0 5px;\n padding: 0 16px;\n`;\n\nexport const NumericInputLeftTransparentTag = styled(NumericInputLeftTag)`\n background: transparent;\n`;\n\nexport const CadInspectorTag = styled(Tag)`\n background: ${Colors.GRAY_100};\n color: ${Colors.GRAY_600};\n\n &.bp3-tag {\n margin: 0;\n padding: 0;\n height: 40px;\n width: 32px;\n text-align: center;\n border-radius: 0 ${defaultButtonBorderRadius}px ${defaultButtonBorderRadius}px 0;\n }\n`;\n","export const TooltipContent = {\n addDealerFeeToSystemCost:\n 'Check this to have cost-based calculations use the Loan Principal (including the dealer fee) instead of the cost in the Pricing Page',\n avgOnMCosts:\n 'The Average Operation and Maintenance Costs based on Cashflow Discount Rate, Project Life, Fixed O&M Costs, Variable O&M, O&M Inflation, System Production, Degradation Rate, System Size, Inverter Replacement Cost',\n billingFrequency: 'How often utilities send the electricity bill',\n cbiCanBeAppliedToggleForAdder:\n 'Toggle on if the amount associated with this adder can be included when calculating cost based incentives like the Federal ITC.',\n cbiCanBeAppliedToggleForDiscount:\n 'Toggle on if the amount associated with this discount can be included when calculating cost based incentives like the Federal ITC.',\n codeYear: \"The fire codes are unique to AHJ's pathways requirements\",\n degradation: 'How much less the system will produce each year due to equipment degradation',\n discountRate:\n 'The interest rate used to compare future cashflows to present cashflows. Changing this number affects your NPV, LCOE and a\tnumber of placeholders',\n downPayment:\n 'Amount of system cost that the system owner pays upfront. For a $20,000 system, a 10% downpayment means the system owner pays $2,000 and borrows $18,000.',\n endOfBillingCycle: 'The end of the billing cycle or the month true up occurs',\n energyUsage:\n 'There are demand charges associated with this utility rate. Exclude these charges when entering bill amount–only enter costs related to energy usage.',\n exportRule: 'An export rule defining the compensation for exporting to the grid',\n financingType: 'Determines whether this is a Cash, Loan, Lease, or PPA financing',\n fireSprinkler: 'Houses with automatic fire suppression sprinklers affect code requirements',\n fitEscalation: 'The annual increase (or decrease) in the feed-in tariff rate',\n fitRate: 'The cost per kWh that the customer will be compensated for the energy produced',\n fitStartYear: 'The first year of the feed-in tariff',\n fixedCharge: 'The base fixed charge for the utility rate',\n fixedExportPenalty:\n 'The value of excess kWh sold to the grid is the Retail Rate reduced by the specified rate',\n fixedExportRate:\n 'Excess kWh sold to the grid will be compensated at the flat value specified rather than Retail Rate',\n fixedOnmCost:\n 'The estimated fixed operations and maintenance costs associated with the system based off the size of the system',\n incentiveApplyToDealerFee:\n 'Check this to have cost-based incentives apply to the loan principal plus the dealer fee',\n incentiveCap: 'The maximum dollar amount that can be received from this incentive',\n incentiveCapped: 'Select Yes if the incentive is capped at a certain amount',\n incentiveDisbursement:\n 'Incentives are either dispersed through a cash grant or a tax credit/rebate',\n incentiveFixedAmount:\n 'Fixed amount incentives are issued as grants, which are issued up front to the customer',\n incentiveOffset: 'The percent of the system cost that is offset by this incentive',\n incentivePBIAmount:\n 'The price per kWh that the customer will be compensated for the energy produced',\n incentivePBIDuration: 'The amount of years this incentive is available to the customer',\n incentivePBIEscalation: 'Annual increase (or decrease) in the performance-based incentives rate',\n incentiveScope: 'Select whether the incentive is issued at the national level or the local level',\n incentiveSSAmount:\n 'The price per Watt (DC, STC) that the customer will be compensated for the size of the system',\n incentiveSSBasis: 'The current and rating the system sized incentive is based on',\n incentiveSSDisbursement:\n 'System sized incentives are issued as grants, which are issued up front to the customer',\n incentiveTaxed: 'Check this box if this incentive is applied to income taxes',\n incentiveType:\n 'The type of incentive - this determines whether it is based on the build cost, system wattage, energy production, or a fixed amount',\n includeDealerFees: 'If yes, dealer fees will be included in the financing from this integration.',\n interestTaxDeductible: 'Choose whether the loan interests are tax deductible',\n inverterLife: 'The expected number of years until the inverter needs to be replaced',\n inverterReplacementCost: 'The cost of replacing the inverter (per watt of rated AC power)',\n irr: 'The return on investment of the solar installation. Use this to compare solar to other financial investments, such as the bond market',\n lcoe: 'The effective cost of solar energy per kWh. Often used to compare the cost of solar energy to utility rates',\n leadCaptureUtilityInput: 'Enter whole dollar amounts i.e. $82.50 as $83',\n leaseEscalation: 'The annual increase (or decrease) in the monthly lease payment',\n leaseMonthlyPayment: 'The monthly payment ($) for the lease',\n leaseUpFrontPayment: 'The amount that the system owner pays as collateral for the lease',\n loanDealerFee:\n \"The percentage of the loan principal that the financial institution takes as a fee. The principal for this loan is increased to be equal to the cost in the Pricing Page plus the financier's cut\",\n loanDuration: 'The term of the loan in months',\n loanInterestRate:\n 'The proportion of a loan that is charged as interest to the borrower, expressed as an annual percentage of the loan outstanding',\n loanPrepayment:\n 'The percentage of the loan that the system owner pays off, or buys down. This is typically 30%, which corresponds to paying down the loan with the ITC',\n loanPrepaymentAmount: 'The percentage of the loan that will be paid off early',\n loanPrepaymentMonth:\n 'The month that the prepayment will be paid to the lender and the loan will be reamortized',\n loanPrincipal: 'The percentage of system cost minus grants that will be financed with the loan',\n loanType:\n 'The type of loan - Mortgage, Interest-Only followed by Mortgage, Bullet, and No-Payment followed by Mortgage',\n localDepr: 'The reduction in value of an asset over time for local tax and accounting purposes',\n localTaxRate: 'The % local (state) tax rate',\n location: 'Location of the estimated consumption profile data set',\n minimumBill: 'The minimum bill for the utility rate',\n minSapRequirement: 'Must generate irradiance map',\n monthlyBillSavings: 'The average 1st-year monthly utility bill savings',\n monthlyPayment:\n 'Monthly payments are an estimate only. Payments shown reflect all eligible incentives. Actual payments may vary based on personal financial information, final project specifications, or other information provided to the financier by the applicant.',\n mosaicCreateSalesperson: `This occurs if the sales rep who is signed into Aurora does not exist in Mosaic.\n\nIf no, the rep will use a generic developer account.`,\n nationalDepr:\n 'The reduction in value of an asset over time for national tax and accounting purposes',\n nationalTaxRate: 'The % national (federal) tax rate',\n netSurplusCompensation:\n 'The rate that the system owner is paid for every kWh they produced in excess of their energy consumption',\n npv: 'The present value of future cash flows minus the initial cost of the system',\n OnmCostInflation: 'The assumed annual increase in O&M costs due to inflation',\n paybackPeriod:\n 'Number of years for the savings from solar to recoup the initial cash outlay for the system',\n percentExportPenalty:\n 'The value of excess kWh sold to the grid is the Retail Rate reduced by the specified percentage',\n perKWh: 'The annual utility bill divided by annual consumption.',\n perKwhPostSolar:\n 'The lifetime cost of going solar divided by the lifetime energy production of your solar system.',\n postSolarUtilityRate:\n 'The utility rate of the home/building after going solar. This can be the same as the current (pre-solar) utility rate, or it could be different. Use this to model a rate switch',\n ppaEscalation: 'The annual increase (or decrease) in the PPA rate',\n ppaRate: 'The price per kWh for the PPA',\n ppaUpFrontPayment: 'The amount that the system owner pays as collateral for the PPA',\n prepaymentWillBeCompleted:\n 'If this is checked, the prepayment percent of the loan will be paid down in the specified month, which keeps the loan payments the same. If this is not checked, the prepayment will not be made, resulting in higher monthly loan payments.',\n preSolarUtilityRate:\n 'The current utility rate of the home/building (i.e. before going solar) as defined in the consumption profile',\n profitabilityIndex:\n 'The present value of future cash flows divided by the system cost. This is a way of normalizing NPVs for projects of different size',\n projectIndexList: 'View projects as a list',\n projectIndexMap: 'View projects within Google Maps',\n projectLife:\n 'The expected life of the project in years. This determines the length of the financial analysis',\n projectType: 'Residential or Commercial',\n proposalShareLinkRefresh:\n 'Note: refreshing the link will create a new link and invalidate the previous link.',\n roofPanelCoverage: 'Calculated from top down roof view',\n solarUtilityRate:\n 'The utility rate of the home/building pre/post solar. If the post solar rate is different, add a rate switch.',\n taxAppliedElectricityRate:\n 'Check this box if Utility bill savings or Feed In Tariffs are taxed as revenue',\n taxAppliedFeedInTariffs: 'Check this box if the Feed In Tariffs are tax deductible',\n taxAppliedUtilityBillSavings: 'Check this box if utility bill savings are taxed as revenue',\n taxDeductibleOnm: 'Check this box if the Operation and Maintenance Costs are tax deductible',\n totalLifetimeSavings:\n 'The present value of utility bill savings minus any costs assocated with installing, financing, and operating the PV system',\n trueUpPeriod:\n 'How often utilities net the energy production against consumption to calculate the monthly electricity bill',\n utilityFlatRate: 'The cost per kWh of electricity of the utility rate',\n utilityRateEscalation: 'The expected annual increase in utility rates',\n variableOnmCost:\n 'The estimated variable operations and maintenance costs associated with the system',\n};\n\nexport default TooltipContent;\n","import { FunctionComponent, ReactNode } from 'react';\nimport { Flex } from 'reflexbox/styled-components';\nimport styled from 'styled-components';\n\nimport { ITooltipProps, Tooltip } from '@blueprintjs/core';\nimport { Box } from '@rebass/grid';\n\nimport { Colors } from '../colors';\nimport { AuroraIcon, AuroraIconType } from '../icon';\nimport { TooltipContent } from './tooltip-content';\n\nexport const TooltipWrapper = styled.span<{ maxWidth?: string }>`\n && {\n height: 20px;\n\n .bp3-popover-content {\n max-width: ${({ maxWidth }) => maxWidth ?? '200px'};\n text-align: center;\n }\n\n .bp3-popover-target {\n height: 20px;\n }\n }\n`;\n\nconst FlexWithWrap = styled(Flex)`\n white-space: pre-wrap;\n`;\n\nexport type AuroraTooltipKey = keyof typeof TooltipContent;\nexport enum TooltipTextAlign {\n Center = 'center',\n Left = 'left',\n Right = 'right',\n}\ninterface AuroraTooltipProps extends Omit {\n tooltipKey?: AuroraTooltipKey;\n iconColor?: string;\n textAlign?: TooltipTextAlign;\n inline?: boolean;\n content?: ReactNode;\n maxWidth?: string;\n}\n\nexport const AuroraTooltip: FunctionComponent = ({\n tooltipKey,\n iconColor,\n textAlign,\n inline,\n content: textContent,\n maxWidth,\n ...rest\n}) => {\n const content = (\n \n \n {tooltipKey ? TooltipContent[tooltipKey] : textContent}\n \n }\n usePortal={false}\n {...rest}\n >\n \n \n \n );\n\n if (inline) {\n return <>{content}>;\n }\n\n return (\n \n {content}\n \n );\n};\n","import { useCallback, useState } from 'react';\n\nimport { Validator, ValidatorProps, Validators } from './validators';\n\nconst renderResult = (\n failureResult: Validator['failureResult'],\n props: Props,\n) =>\n typeof failureResult === 'function'\n ? (failureResult as (props: Props) => Result)(props)\n : failureResult;\n\n// if validator arrays are built dynamicallly, they will never be the same twice.\n// convert the validators to a string, to check if it is the same from render to render\nconst hashValidators = (\n validators: Validators,\n) =>\n validators\n .map(({ failureResult }) => {\n if (typeof failureResult === 'object') {\n return JSON.stringify(failureResult);\n }\n return String(failureResult);\n })\n .join('-');\n\nexport const useValidator = (\n validators: Validator[] = [],\n) => {\n const [failures, setFailures] = useState([]);\n const validate = useCallback(\n (props: Props) => {\n const currentFailures = validators\n .filter(({ condition }) => !(condition?.(props) ?? false))\n .map(({ failureResult }) => renderResult(failureResult, props));\n\n setFailures(currentFailures);\n return currentFailures.length === 0;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [hashValidators(validators)],\n );\n\n return [failures, validate] as const;\n};\n"],"names":["StyledInputError","InputError","error","alignItems","my","undefined","small","type","DANGER","withDisabledTooltip","disabled","disabledReason","content","tooltipProps","position","BOTTOM","usePortal","minMaxValidators","condition","value","Number","isNaN","failureResult","inline","min","tooltip","max","CLAMP_MIN_MAX","getDecimalSeparator","intl","testText","formatNumber","one","nine","result","RegExp","exec","parseStringToStringNumber","valueAsString","parseFloat","toString","decimalSeparator","split","map","character","jsNumber","indexOf","transformLocalizedNumberToStringNumber","join","replace","clampValue","val","Error","Math","clamp","Infinity","isFloatingPointNumericCharacter","numbers","test","IncrementDirection","NON_HTML_PROPS","RawNumericInput","state","shouldSelectAfterUpdate","stepMaxPrecision","getStepMaxPrecision","this","props","useGrouping","didPasteEventJustOccur","delta","inputElement","intervalId","incrementButtonHandlers","getButtonEventHandlers","UP","decrementButtonHandlers","DOWN","inputRef","input","handleButtonClick","e","direction","updateDelta","nextValue","incrementValue","invokeValueCallback","onButtonClick","stopContinuousChange","clearTimeouts","clearInterval","document","removeEventListener","handleContinuousChange","handleInputFocus","setState","selectAllOnFocus","onFocus","handleInputBlur","clampValueOnBlur","target","sanitizedValue","getSanitizedValue","onBlur","handleInputKeyDown","readOnly","keyCode","preventDefault","onKeyDown","handleInputKeyPress","allowNumericCharactersOnly","key","ctrlKey","altKey","metaKey","length","isValidNumericKeyboardEvent","onKeyPress","handleInputPaste","onPaste","handleInputChange","filter","char","getDerivedStateFromProps","nextState","prevMinProp","prevMaxProp","prevValueProp","didMinChange","didMaxChange","didBoundsChange","didValuePropChange","VALUE_EMPTY","minorStepSize","stepSize","stringToStringNumber","isValueNumeric","currentValue","maxPrecision","scaleFactor","pow","round","toMaxPrecision","clamped","render","buttonPosition","className","fill","large","containerClasses","push","buttons","renderButtons","LEFT","renderInput","RIGHT","componentDidUpdate","prevProps","prevState","super","setSelectionRange","onValueChange","validateProps","nextProps","majorStepSize","intent","vertical","icon","inputGroupHtmlProps","autoComplete","leftIcon","onChange","rightElement","evt","onMouseDown","startContinuousChange","addEventListener","setTimeout","window","setInterval","CONTINUOUS_CHANGE_INTERVAL","CONTINUOUS_CHANGE_DELAY","callback","currValue","VALUE_ZERO","selectAllOnIncrement","getIncrementDelta","isShiftKeyPressed","isAltKeyPressed","shiftKey","displayName","defaultProps","IS_PRE_VALID","StyledNumericInput","width","height","css","AuroraNumericInput","allowEmptyValueOutput","validators","label","noInlineErrors","ariaLabel","marginBottom","labelTooltipKey","inputProps","errors","validate","displayAsString","setDisplayAsString","useState","useEffect","mb","flexDirection","textAlign","color","GRAY_600","GRAY_700","tooltipKey","args","updatedValue","isEmpty","CadInspectorNumericInput","rightTag","otherProps","convertToMoneyValue","n","currencyPrecision","locale","minimumFractionDigits","isInteger","Intl","NumberFormat","maximumFractionDigits","format","FormMoneyInput","currencyType","prefix","suffix","currency","Usd","initialValue","backingValue","useRef","hasFocus","focusProps","setFocusProps","useLayoutEffect","current","decimalPlaces","prefixStr","isSuffix","symbol","suffixStr","lang","toLocaleString","onInput","currentTarget","GRAY_200","GRAY_500","NumericInputRightTag","GRAY_100","NumericInputLeftTag","attrs","CadInspectorTag","TooltipContent","addDealerFeeToSystemCost","avgOnMCosts","billingFrequency","cbiCanBeAppliedToggleForAdder","cbiCanBeAppliedToggleForDiscount","codeYear","degradation","discountRate","downPayment","endOfBillingCycle","energyUsage","exportRule","financingType","fireSprinkler","fitEscalation","fitRate","fitStartYear","fixedCharge","fixedExportPenalty","fixedExportRate","fixedOnmCost","incentiveApplyToDealerFee","incentiveCap","incentiveCapped","incentiveDisbursement","incentiveFixedAmount","incentiveOffset","incentivePBIAmount","incentivePBIDuration","incentivePBIEscalation","incentiveScope","incentiveSSAmount","incentiveSSBasis","incentiveSSDisbursement","incentiveTaxed","incentiveType","includeDealerFees","interestTaxDeductible","inverterLife","inverterReplacementCost","irr","lcoe","leadCaptureUtilityInput","leaseEscalation","leaseMonthlyPayment","leaseUpFrontPayment","loanDealerFee","loanDuration","loanInterestRate","loanPrepayment","loanPrepaymentAmount","loanPrepaymentMonth","loanPrincipal","loanType","localDepr","localTaxRate","location","minimumBill","minSapRequirement","monthlyBillSavings","monthlyPayment","mosaicCreateSalesperson","nationalDepr","nationalTaxRate","netSurplusCompensation","npv","OnmCostInflation","paybackPeriod","percentExportPenalty","perKWh","perKwhPostSolar","postSolarUtilityRate","ppaEscalation","ppaRate","ppaUpFrontPayment","prepaymentWillBeCompleted","preSolarUtilityRate","profitabilityIndex","projectIndexList","projectIndexMap","projectLife","projectType","proposalShareLinkRefresh","roofPanelCoverage","solarUtilityRate","taxAppliedElectricityRate","taxAppliedFeedInTariffs","taxAppliedUtilityBillSavings","taxDeductibleOnm","totalLifetimeSavings","trueUpPeriod","utilityFlatRate","utilityRateEscalation","variableOnmCost","TooltipWrapper","span","maxWidth","FlexWithWrap","TooltipTextAlign","AuroraTooltip","iconColor","textContent","rest","fillColor","name","INFO_OUTLINE","pl","pt","hashValidators","JSON","stringify","String","useValidator","failures","setFailures","useCallback","currentFailures","renderResult"],"sourceRoot":""}