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ACC,CAAC9L,GAAO6E,MAAK,C","sources":["webpack://wooftech/./node_modules/@kaspernj/api-maker/src/event-updated.jsx","webpack://wooftech/./node_modules/@kaspernj/api-maker/src/inputs/input-wrapper.jsx","webpack://wooftech/./node_modules/@kaspernj/api-maker/src/inputs/input.jsx","webpack://wooftech/./node_modules/@kaspernj/api-maker/src/inputs/money.jsx","webpack://wooftech/./node_modules/@kaspernj/api-maker/src/inputs/auto-submit.mjs","webpack://wooftech/./node_modules/@kaspernj/api-maker/src/use-updated-event.mjs"],"sourcesContent":["import PropTypes from \"prop-types\"\nimport propTypesExact from \"prop-types-exact\"\nimport {memo} from \"react\"\nimport {shapeComponent, ShapeComponent} from \"set-state-compare/src/shape-component.js\"\nimport useUpdatedEvent from \"./use-updated-event.mjs\"\n\nexport default memo(shapeComponent(class ApiMakerEventUpdated extends ShapeComponent {\n static propTypes = propTypesExact({\n active: PropTypes.bool,\n debounce: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.number\n ]),\n model: PropTypes.object.isRequired,\n onConnected: PropTypes.func,\n onUpdated: PropTypes.func.isRequired\n })\n\n render() {\n const {model, onUpdated, ...restProps} = this.props\n\n useUpdatedEvent(model, onUpdated, restProps)\n\n return null\n }\n}))\n","import useInput from \"../use-input.mjs\"\n\nconst inputWrapper = (WrapperComponentClass, wrapperOptions = {}) => (props) => {\n const {inputProps, restProps, wrapperOpts} = useInput({props, wrapperOptions})\n\n return (\n \n )\n}\n\nexport default inputWrapper\n","import AutoSubmit from \"./auto-submit.mjs\"\nimport BaseComponent from \"../base-component\"\nimport {dig, digg, digs} from \"diggerize\"\nimport EventUpdated from \"../event-updated\"\nimport inputWrapper from \"./input-wrapper\"\nimport Money from \"./money\"\nimport PropTypes from \"prop-types\"\nimport {memo, useMemo, useRef} from \"react\"\nimport replaceall from \"replaceall\"\nimport {shapeComponent} from \"set-state-compare/src/shape-component.js\"\nimport strftime from \"strftime\"\nimport {useForm} from \"../form\"\n\nconst ApiMakerInputsInput = memo(shapeComponent(class ApiMakerInputsInput extends BaseComponent {\n static defaultProps = {\n autoRefresh: false,\n autoSubmit: false,\n localizedNumber: false\n }\n\n static propTypes = {\n attribute: PropTypes.string,\n autoRefresh: PropTypes.bool.isRequired,\n autoSubmit: PropTypes.bool.isRequired,\n className: PropTypes.string,\n formatValue: PropTypes.func,\n id: PropTypes.string,\n localizedNumber: PropTypes.bool.isRequired,\n model: PropTypes.object,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onMatchValidationError: PropTypes.func,\n type: PropTypes.string\n }\n\n setup() {\n const {inputProps} = this.p\n const {defaultValue, name} = inputProps\n\n this.form = useForm()\n this.visibleInputRef = useRef()\n\n this.useStates({\n blankInputName: digg(inputProps, \"type\") == \"file\"\n })\n useMemo(() => {\n if (name) {\n this.tt.form?.setValue(name, defaultValue)\n }\n }, [])\n }\n\n render () {\n const {\n attribute,\n autoRefresh,\n autoSubmit,\n defaultValue,\n formatValue,\n id,\n inputProps,\n inputRef,\n localizedNumber,\n model,\n name,\n onChange,\n onErrors,\n onMatchValidationError,\n type,\n wrapperOpts,\n ...restProps\n } = this.props\n\n const sharedProps = {\n id: localizedNumber ? null : inputProps.id,\n name: localizedNumber ? null : inputProps.name,\n }\n const ref = localizedNumber ? this.visibleInputRef : this.inputReference()\n const {ref: inputPropsRef, ...inputPropsWithoutRef} = inputProps\n\n return (\n <>\n {autoRefresh && model &&\n \n }\n {localizedNumber &&\n \n }\n {type == \"money\" &&\n \n }\n {type == \"textarea\" &&\n \n }\n {type != \"money\" && type != \"textarea\" &&\n \n }\n \n )\n }\n\n actualValue (visibleInput) {\n const {localizedNumber} = digs(this.props, \"localizedNumber\")\n const value = digg(visibleInput, \"value\")\n\n if (localizedNumber) {\n const decimal = I18n.t(\"number.currency.format.separator\")\n const integerSeparator = I18n.t(\"number.currency.format.delimiter\")\n\n let unformatted = replaceall(integerSeparator, \"\", value)\n\n unformatted = replaceall(decimal, \".\", unformatted)\n\n return unformatted\n }\n\n return value\n }\n\n autoSubmit = () => new AutoSubmit({component: this}).autoSubmit()\n\n formatValue (value) {\n const {formatValue, type} = this.props\n\n if (formatValue) {\n return formatValue(value)\n } else if (value instanceof Date && !isNaN(value.getTime())) {\n // We need to use a certain format for datetime-local\n if (type == \"datetime-local\") {\n return strftime(\"%Y-%m-%dT%H:%M:%S\", value)\n } else if (type == \"date\") {\n return strftime(\"%Y-%m-%d\", value)\n }\n }\n\n return value\n }\n\n inputDefaultValueLocalized () {\n const {defaultValue} = this.props\n const {localizedNumber} = digs(this.props, \"localizedNumber\")\n\n if (localizedNumber && defaultValue !== null && defaultValue !== undefined) {\n const separator = I18n.t(\"number.currency.format.separator\")\n const delimiter = I18n.t(\"number.currency.format.delimiter\")\n\n let formatted = `${defaultValue}`\n\n formatted = replaceall(\".\", \"{{separator}}\", formatted)\n formatted = replaceall(\",\", \"{{delimiter}}\", formatted)\n formatted = replaceall(\"{{separator}}\", separator, formatted)\n formatted = replaceall(\"{{delimiter}}\", delimiter, formatted)\n\n return formatted\n }\n\n return defaultValue\n }\n\n inputName () {\n if (this.state.blankInputName) return \"\"\n\n return this.props.inputProps.name\n }\n\n inputReference = () => digg(this, \"props\", \"inputProps\", \"ref\")\n\n onModelUpdated = (args) => {\n const inputRef = this.inputReference()\n\n if (!inputRef.current) {\n // This can happen if the component is being unmounted\n return\n }\n\n const {attribute} = digs(this.props, \"attribute\")\n const newModel = digg(args, \"model\")\n const currentValue = digg(inputRef, \"current\", \"value\")\n const newValue = newModel.readAttribute(attribute)\n const newFormattedValue = this.formatValue(newValue)\n\n if (currentValue != newFormattedValue) {\n inputRef.current.value = newFormattedValue\n }\n }\n\n onInputChanged = (e) => {\n const {form} = this.tt\n const {attribute, autoSubmit, inputProps, model, name, onChange} = this.props\n const {localizedNumber} = digs(this.props, \"localizedNumber\")\n\n if (localizedNumber) this.inputReference().current.value = this.actualValue(digg(e, \"target\"))\n\n if (attribute && autoSubmit && model) this.delayAutoSubmit()\n if (digg(inputProps, \"type\") == \"file\") this.setState({blankInputName: this.getBlankInputName()})\n if (form && name) form.setValue(name, e.target.value)\n if (onChange) onChange(e)\n }\n\n delayAutoSubmit () {\n if (this.delayAutoSubmitTimeout) {\n clearTimeout(this.delayAutoSubmitTimeout)\n }\n\n this.delayAutoSubmitTimeout = setTimeout(this.autoSubmit, 200)\n }\n\n // This fixes an issue in Firefox and ActiveStorage, where uploads would be a blank string if a file wasn't chosen\n getBlankInputName () {\n const value = dig(this.inputReference(), \"current\", \"value\")\n\n if (this.props.inputProps.type == \"file\" && value == \"\")\n return true\n }\n}))\n\nexport {ApiMakerInputsInput as Input}\nexport default inputWrapper(ApiMakerInputsInput)\n","import classNames from \"classnames\"\nimport Config from \"../config.mjs\"\nimport {digg} from \"diggerize\"\nimport idForComponent from \"./id-for-component.mjs\"\nimport * as inflection from \"inflection\"\nimport MoneyFormatter from \"../money-formatter\"\nimport PropTypes from \"prop-types\"\nimport PropTypesExact from \"prop-types-exact\"\nimport {memo, useRef} from \"react\"\nimport {shapeComponent, ShapeComponent} from \"set-state-compare/src/shape-component.js\"\n\nexport default memo(shapeComponent(class ApiMakerInputsMoney extends ShapeComponent {\n static defaultProps = {\n disabled: false,\n showCurrencyOptions: true\n }\n\n static propTypes = PropTypesExact({\n attribute: PropTypes.string,\n centsInputName: PropTypes.string,\n className: PropTypes.string,\n currenciesCollection: PropTypes.array,\n currencyName: PropTypes.string,\n currencyRef: PropTypes.object,\n defaultValue: PropTypes.object,\n disabled: PropTypes.bool.isRequired,\n id: PropTypes.string,\n inputRef: PropTypes.object,\n label: PropTypes.node,\n model: PropTypes.object,\n name: PropTypes.string,\n onChange: PropTypes.func,\n placeholder: PropTypes.node,\n showCurrencyOptions: PropTypes.bool,\n small: PropTypes.bool,\n type: PropTypes.string,\n wholeRef: PropTypes.object\n })\n\n setup() {\n this.inputRef = useRef()\n this.currencyRefBackup = useRef()\n this.currencyRef = this.props.currencyRef || this.currencyRefBackup\n this.wholeRefBackup = useRef()\n this.wholeRef = this.props.wholeRef || this.wholeRefBackup\n }\n\n getInputRef () {\n return this.props.inputRef || this.inputRef\n }\n\n render () {\n const {attribute, className, disabled, model, showCurrencyOptions} = this.props\n let {currenciesCollection} = this.props\n\n if (!currenciesCollection) currenciesCollection = Config.getCurrenciesCollection()\n\n return (\n
\n \n \n {showCurrencyOptions &&\n \n \n {currenciesCollection.map((option) => (\n \n ))}\n \n }\n
\n )\n }\n\n inputCurrencyId () {\n return `${this.inputId()}_currency`\n }\n\n inputCurrencyName () {\n if (\"currencyName\" in this.props)\n return this.props.currencyName\n\n return `${this.props.model.modelClassData().paramKey}[${inflection.underscore(this.props.attribute)}_currency]`\n }\n\n inputCurrencyValue () {\n const {defaultValue} = this.props\n\n if (defaultValue) {\n return MoneyFormatter.currencyFromMoney(defaultValue).code\n } else {\n return \"DKK\"\n }\n }\n\n inputDefaultValue () {\n const {defaultValue} = this.props\n\n if (defaultValue) {\n return MoneyFormatter.fromMoney({amount: defaultValue.amount, currency: this.inputCurrencyValue()}, {decimals: 2, excludeCurrency: true}).toString()\n } else {\n return \"\"\n }\n }\n\n inputDefaultCentsValue () {\n const {defaultValue} = this.props\n\n if (this.getInputRef().current) {\n return digg(this.getInputRef(), \"current\", \"value\")\n } else if (defaultValue) {\n return MoneyFormatter.amountFromMoney(defaultValue)\n }\n }\n\n inputCentsId () {\n return `${this.inputId()}_cents`\n }\n\n inputCentsName () {\n if (\"name\" in this.props)\n return this.props.name\n\n return `${this.props.model.modelClassData().paramKey}[${inflection.underscore(this.props.attribute)}_cents]`\n }\n\n inputId () {\n return idForComponent(this)\n }\n\n onCurrencyChanged = () => {\n if (this.props.onChange)\n this.props.onChange()\n }\n\n setAmount = () => {\n const inputElement = this.getInputRef().current\n\n if (!inputElement.value && inputElement.value == \"\") {\n this.wholeRef.current.value = \"\"\n } else {\n const cents = parseFloat(inputElement.value)\n const formatted = MoneyFormatter.fromMoney({amount: cents, currency: this.inputCurrencyValue()}, {decimals: 2, excludeCurrency: true}).toString()\n\n this.wholeRef.current.value = formatted\n }\n }\n\n setCents = () => {\n const inputElement = this.getInputRef().current\n\n let whole = MoneyFormatter.stringToFloat(this.wholeRef.current.value)\n let cents = parseInt(whole * 100, 10)\n let oldCents = parseInt(inputElement.value, 10)\n\n if (typeof cents == \"number\") {\n inputElement.value = cents\n } else {\n inputElement.value = ''\n }\n\n if (this.props.onChange && oldCents != cents)\n this.props.onChange()\n }\n}))\n","import {digg} from \"diggerize\"\nimport * as inflection from \"inflection\"\n\nexport default class ApiMakerInputsAutoSubmit {\n constructor ({component}) {\n this.component = component\n }\n\n autoSubmit () {\n const {attribute, model} = this.component.props\n const updateAttributeName = inflection.underscore(attribute)\n const updateParams = {}\n\n updateParams[updateAttributeName] = this.value()\n\n model.update(updateParams)\n }\n\n value () {\n const inputRef = this.component.props.inputRef || this.component.props.inputProps.ref || this.component.inputRef\n const input = digg(inputRef, \"current\")\n\n if (input.type == \"checkbox\") {\n if (input.checked) {\n if (input.value !== undefined) {\n return input.value\n } else {\n return 1\n }\n } else {\n return 0\n }\n }\n\n return digg(input, \"value\")\n }\n}\n","import {useCallback, useLayoutEffect, useMemo} from \"react\"\nimport debounceFunction from \"debounce\"\nimport ModelEvents from \"./model-events.mjs\"\nimport useShape from \"set-state-compare/src/use-shape.js\"\n\nconst apiMakerUseUpdatedEvent = (model, onUpdated, props = {}) => {\n const {active = true, debounce, onConnected, ...restProps} = props\n\n if (Object.keys(restProps).length > 0) {\n throw new Error(`Unknown props given to useUpdatedEvent: ${Object.keys(restProps).join(\", \")}`)\n }\n\n const s = useShape({active, debounce, model, onUpdated})\n\n const debounceCallback = useMemo(() => {\n if (typeof debounce == \"number\") {\n return debounceFunction(s.p.onUpdated, debounce)\n } else {\n return debounceFunction(s.p.onUpdated)\n }\n }, [debounce])\n\n s.updateMeta({debounceCallback})\n\n const onUpdatedCallback = useCallback((...args) => {\n if (!s.p.active) {\n return\n }\n\n if (s.p.debounce) {\n s.m.debounceCallback(...args)\n } else {\n s.p.onUpdated(...args)\n }\n }, [])\n\n useLayoutEffect(() => {\n let connectUpdated, onConnectedListener\n\n if (model) {\n connectUpdated = ModelEvents.connectUpdated(model, onUpdatedCallback)\n\n if (onConnected) {\n onConnectedListener = connectUpdated.events.addListener(\"connected\", onConnected)\n }\n }\n\n return () => {\n if (onConnectedListener) {\n connectUpdated.events.removeListener(\"connected\", onConnected)\n }\n\n if (connectUpdated) {\n connectUpdated.unsubscribe()\n }\n }\n }, [model?.id()])\n}\n\nexport default apiMakerUseUpdatedEvent\n"],"names":["memo","shapeComponent","_ApiMakerEventUpdated","_ShapeComponent","ApiMakerEventUpdated","_classCallCheck","_callSuper","arguments","_inherits","key","value","_this$props","this","props","model","onUpdated","restProps","_objectWithoutProperties","_excluded","useUpdatedEvent","ShapeComponent","propTypes","propTypesExact","active","PropTypes","debounce","isRequired","onConnected","WrapperComponentClass","wrapperOptions","length","undefined","_useInput","useInput","inputProps","wrapperOpts","React","createElement","Object","assign","ApiMakerInputsInput","_ApiMakerInputsInput","_BaseComponent","_this","_len","_args","Array","_key","concat","autoSubmit","AutoSubmit","component","inputReference","digg","onModelUpdated","args","inputRef","current","attribute","digs","newModel","currentValue","newValue","readAttribute","newFormattedValue","formatValue","onInputChanged","e","form","tt","name","onChange","localizedNumber","actualValue","delayAutoSubmit","setState","blankInputName","getBlankInputName","setValue","target","_this2","p","defaultValue","useForm","visibleInputRef","useRef","useStates","useMemo","_this2$tt$form","_this$props2","autoRefresh","id","type","onErrors","onMatchValidationError","sharedProps","ref","inputPropsWithoutRef","_excluded2","Fragment","EventUpdated","inputName","Money","inputDefaultValueLocalized","visibleInput","decimal","I18n","t","integerSeparator","unformatted","replaceall","_this$props3","Date","isNaN","getTime","strftime","separator","delimiter","formatted","state","delayAutoSubmitTimeout","clearTimeout","setTimeout","dig","BaseComponent","defaultProps","className","inputWrapper","_ApiMakerInputsMoney","ApiMakerInputsMoney","onCurrencyChanged","setAmount","inputElement","getInputRef","cents","parseFloat","MoneyFormatter","fromMoney","amount","currency","inputCurrencyValue","decimals","excludeCurrency","toString","wholeRef","setCents","whole","stringToFloat","parseInt","oldCents","currencyRefBackup","currencyRef","wholeRefBackup","disabled","showCurrencyOptions","currenciesCollection","Config","getCurrenciesCollection","inputDefaultCentsValue","inputCentsId","inputCentsName","classNames","inputDefaultValue","inputId","onBlur","onKeyUp","placeholder","inputCurrencyId","inputCurrencyName","map","option","small","currencyName","modelClassData","paramKey","inflection","currencyFromMoney","code","amountFromMoney","idForComponent","PropTypesExact","centsInputName","label","ApiMakerInputsAutoSubmit","constructor","updateParams","update","input","checked","keys","Error","join","s","debounceCallback","updateMeta","onUpdatedCallback","useCallback","m","useLayoutEffect","connectUpdated","onConnectedListener","events","addListener","removeListener","unsubscribe"],"sourceRoot":""}