@thx/controls 17.3.1-alpha.0 → 17.3.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.
Files changed (72) hide show
  1. package/dist/esm/date/LocalDatePicker/LocalDatePicker.js.map +1 -1
  2. package/dist/esm/date/LocalDatePicker/MaskedDateInput.js.map +1 -1
  3. package/dist/esm/date/LocalMonthSelect/LocalMonthSelect.js.map +1 -1
  4. package/dist/esm/date/LocalTimePicker/MaskedTimeInput.js.map +1 -1
  5. package/dist/esm/date/MonthDayPicker/MonthDayPicker.js.map +1 -1
  6. package/dist/esm/date/MonthYearPicker/MonthYearPicker.js.map +1 -1
  7. package/dist/esm/date/YearSelect/YearSelect.js.map +1 -1
  8. package/dist/esm/form/TForm/TForm.js.map +1 -1
  9. package/dist/esm/form/TForm/useTForm.js.map +1 -1
  10. package/dist/esm/index.js +3 -0
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/inputs/CreditCardInput/CreditCardInput.js.map +1 -1
  13. package/dist/esm/inputs/CreditCardInput/CreditCardNumberInput.js.map +1 -1
  14. package/dist/esm/inputs/MaskedInput/MaskedInput.js.map +1 -1
  15. package/dist/esm/inputs/PhoneInput/PhoneInput.js.map +1 -1
  16. package/dist/esm/inputs/RadioGroup/RadioGroup.js.map +1 -1
  17. package/dist/esm/inputs/Scriptel/Scriptel.js +52 -0
  18. package/dist/esm/inputs/Scriptel/Scriptel.js.map +1 -0
  19. package/dist/esm/inputs/Scriptel/ScriptelContext.js +6 -0
  20. package/dist/esm/inputs/Scriptel/ScriptelContext.js.map +1 -0
  21. package/dist/esm/inputs/Scriptel/scriptel/enums.js +21 -0
  22. package/dist/esm/inputs/Scriptel/scriptel/enums.js.map +1 -0
  23. package/dist/esm/inputs/Scriptel/scriptel/index.js +93 -0
  24. package/dist/esm/inputs/Scriptel/scriptel/index.js.map +1 -0
  25. package/dist/esm/inputs/Scriptel/withScriptel.js +15 -0
  26. package/dist/esm/inputs/Scriptel/withScriptel.js.map +1 -0
  27. package/dist/esm/inputs/ScriptelInput/ScriptelInput.js +67 -0
  28. package/dist/esm/inputs/ScriptelInput/ScriptelInput.js.map +1 -0
  29. package/dist/esm/inputs/SinInput/SinInput.js.map +1 -1
  30. package/dist/esm/inputs/TableInput/CheckboxEditCell.js.map +1 -1
  31. package/dist/esm/inputs/TableInput/DropdownCell.js +1 -1
  32. package/dist/esm/inputs/TableInput/DropdownCell.js.map +1 -1
  33. package/dist/esm/inputs/TableInput/NumberEditCell.js.map +1 -1
  34. package/dist/esm/inputs/TableInput/StringEditCell.js.map +1 -1
  35. package/dist/esm/inputs/TableInput/TableInput.js.map +1 -1
  36. package/dist/esm/money/MoneyCurrencyInput/MoneyCurrencyInput.js.map +1 -1
  37. package/dist/esm/money/MoneyInput/MoneyInput.js.map +1 -1
  38. package/dist/esm/money/useMoneyInput.js.map +1 -1
  39. package/dist/stats.html +1 -1
  40. package/dist/stats.txt +104 -0
  41. package/dist/types/date/LocalDatePicker/LocalDatePicker.d.ts +1 -1
  42. package/dist/types/date/LocalDatePicker/MaskedDateInput.d.ts +1 -1
  43. package/dist/types/date/LocalMonthSelect/LocalMonthSelect.d.ts +1 -1
  44. package/dist/types/date/LocalTimePicker/MaskedTimeInput.d.ts +1 -1
  45. package/dist/types/date/MonthDayPicker/MonthDayPicker.d.ts +1 -1
  46. package/dist/types/date/MonthYearPicker/MonthYearPicker.d.ts +1 -1
  47. package/dist/types/date/YearSelect/YearSelect.d.ts +1 -1
  48. package/dist/types/form/TForm/TForm.d.ts +1 -1
  49. package/dist/types/form/TForm/useTForm.d.ts +2 -2
  50. package/dist/types/inputs/CreditCardInput/CreditCardInput.d.ts +1 -1
  51. package/dist/types/inputs/CreditCardInput/CreditCardNumberInput.d.ts +1 -1
  52. package/dist/types/inputs/MaskedInput/MaskedInput.d.ts +1 -1
  53. package/dist/types/inputs/PhoneInput/PhoneInput.d.ts +1 -1
  54. package/dist/types/inputs/RadioGroup/RadioGroup.d.ts +1 -1
  55. package/dist/types/inputs/Scriptel/Scriptel.d.ts +10 -0
  56. package/dist/types/inputs/Scriptel/ScriptelContext.d.ts +9 -0
  57. package/dist/types/inputs/Scriptel/index.d.ts +4 -0
  58. package/dist/types/inputs/Scriptel/scriptel/classes.d.ts +144 -0
  59. package/dist/types/inputs/Scriptel/scriptel/enums.d.ts +16 -0
  60. package/dist/types/inputs/Scriptel/scriptel/index.d.ts +17 -0
  61. package/dist/types/inputs/Scriptel/scriptel/messages.d.ts +52 -0
  62. package/dist/types/inputs/Scriptel/withScriptel.d.ts +8 -0
  63. package/dist/types/inputs/ScriptelInput/ScriptelInput.d.ts +7 -0
  64. package/dist/types/inputs/ScriptelInput/index.d.ts +2 -0
  65. package/dist/types/inputs/TableInput/CheckboxEditCell.d.ts +1 -1
  66. package/dist/types/inputs/TableInput/NumberEditCell.d.ts +1 -1
  67. package/dist/types/inputs/TableInput/StringEditCell.d.ts +1 -1
  68. package/dist/types/inputs/TableInput/TableInput.d.ts +3 -3
  69. package/dist/types/money/MoneyCurrencyInput/MoneyCurrencyInput.d.ts +1 -1
  70. package/dist/types/money/MoneyInput/MoneyInput.d.ts +2 -2
  71. package/dist/types/money/useMoneyInput.d.ts +1 -1
  72. package/package.json +3 -3
@@ -0,0 +1,67 @@
1
+ import React, { useContext, useState, useEffect } from 'react';
2
+ import debug from 'debug';
3
+ import { Button, Image } from 'semantic-ui-react';
4
+ import { ScriptelContext } from '../Scriptel/ScriptelContext.js';
5
+
6
+ debug("thx.controls.inputs.ScriptelInput");
7
+ function ScriptelInput(props) {
8
+ const { value, onChange, buttonText = "Enter Signature" } = props;
9
+ const ctx = useContext(ScriptelContext);
10
+ const [enterSignature, setEnterSignature] = useState(false);
11
+ useEffect(() => {
12
+ if (enterSignature) {
13
+ if (onChange && ctx?.renderImage) {
14
+ setEnterSignature(false);
15
+ if (ctx.renderImage.type === "image/svg+xml" || ctx.renderImage.type === "image/png") {
16
+ onChange({
17
+ type: ctx.renderImage.type,
18
+ width: ctx.renderImage.width,
19
+ height: ctx.renderImage.height,
20
+ timestamp: new Date(),
21
+ data: ctx.renderImage.data
22
+ });
23
+ }
24
+ }
25
+ if (onChange && !ctx) {
26
+ onChange();
27
+ }
28
+ }
29
+ }, [ctx]);
30
+ if (enterSignature) {
31
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, ctx?.isSigning ? "signing..." : "Enter a signature and click OK."), /* @__PURE__ */ React.createElement(Button, {
32
+ onClick: () => {
33
+ setEnterSignature(false);
34
+ },
35
+ color: "black",
36
+ loading: ctx?.loading,
37
+ disabled: ctx?.loading
38
+ }, "Cancel"), /* @__PURE__ */ React.createElement(Button, {
39
+ size: "mini",
40
+ as: "a",
41
+ basic: true,
42
+ onClick: () => ctx?.socket.current?.calibrate(),
43
+ disabled: ctx?.loading
44
+ }, "Calibrate"));
45
+ }
46
+ if (value && value.data) {
47
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Image, {
48
+ size: "medium",
49
+ src: value.data,
50
+ bordered: true
51
+ }), /* @__PURE__ */ React.createElement(Button, {
52
+ size: "mini",
53
+ compact: true,
54
+ onClick: () => {
55
+ setEnterSignature(false);
56
+ if (onChange)
57
+ onChange();
58
+ }
59
+ }, "Reset"));
60
+ }
61
+ return /* @__PURE__ */ React.createElement(Button, {
62
+ onClick: () => setEnterSignature(true)
63
+ }, buttonText);
64
+ }
65
+
66
+ export { ScriptelInput };
67
+ //# sourceMappingURL=ScriptelInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptelInput.js","sources":["../../../../src/inputs/ScriptelInput/ScriptelInput.tsx"],"sourcesContent":["import type {ScriptelSchemaType} from '@thx/yup-types';\nimport debug from 'debug';\nimport {useContext, useEffect, useState} from 'react';\nimport {Button, Image} from 'semantic-ui-react';\nimport {ScriptelContext} from '../Scriptel/ScriptelContext';\n\nconst d = debug('thx.controls.inputs.ScriptelInput');\n\nexport interface ScriptelInputProps {\n\tvalue?: ScriptelSchemaType;\n\tonChange?: (value?: ScriptelSchemaType) => void;\n\tbuttonText?: string;\n}\n\nexport function ScriptelInput(props: ScriptelInputProps) {\n\tconst {value, onChange, buttonText = 'Enter Signature'} = props;\n\tconst ctx = useContext(ScriptelContext);\n\n\tconst [enterSignature, setEnterSignature] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (enterSignature) {\n\t\t\tif (onChange && ctx?.renderImage) {\n\t\t\t\tsetEnterSignature(false);\n\t\t\t\tif (ctx.renderImage.type === 'image/svg+xml' || ctx.renderImage.type === 'image/png') {\n\t\t\t\t\tonChange({\n\t\t\t\t\t\ttype: ctx.renderImage.type,\n\t\t\t\t\t\twidth: ctx.renderImage.width,\n\t\t\t\t\t\theight: ctx.renderImage.height,\n\t\t\t\t\t\ttimestamp: new Date(),\n\t\t\t\t\t\tdata: ctx.renderImage.data,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (onChange && !ctx) {\n\t\t\t\tonChange();\n\t\t\t}\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ctx]);\n\n\tif (enterSignature) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div>{ctx?.isSigning ? 'signing...' : 'Enter a signature and click OK.'}</div>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetEnterSignature(false);\n\t\t\t\t\t}}\n\t\t\t\t\tcolor=\"black\"\n\t\t\t\t\tloading={ctx?.loading}\n\t\t\t\t\tdisabled={ctx?.loading}\n\t\t\t\t>\n\t\t\t\t\tCancel\n\t\t\t\t</Button>\n\t\t\t\t<Button size=\"mini\" as=\"a\" basic onClick={() => ctx?.socket.current?.calibrate()} disabled={ctx?.loading}>\n\t\t\t\t\tCalibrate\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (value && value.data) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<Image size=\"medium\" src={value.data} bordered />\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"mini\"\n\t\t\t\t\tcompact\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetEnterSignature(false);\n\t\t\t\t\t\tif (onChange) onChange();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tReset\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn <Button onClick={() => setEnterSignature(true)}>{buttonText}</Button>;\n}\n"],"names":[],"mappings":";;;;;AAMU,MAAM,mCAAmC,EAAA;AAQ5C,SAAA,aAAA,CAAuB,KAA2B,EAAA;AACxD,EAAA,MAAM,EAAC,KAAA,EAAO,QAAU,EAAA,UAAA,GAAa,iBAAqB,EAAA,GAAA,KAAA,CAAA;AAC1D,EAAM,MAAA,GAAA,GAAM,WAAW,eAAe,CAAA,CAAA;AAEtC,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAqB,CAAA,GAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAE1D,EAAA,SAAA,CAAU,MAAM;AACf,IAAA,IAAI,cAAgB,EAAA;AACnB,MAAI,IAAA,QAAA,IAAY,KAAK,WAAa,EAAA;AACjC,QAAA,iBAAA,CAAkB,KAAK,CAAA,CAAA;AACvB,QAAA,IAAI,IAAI,WAAY,CAAA,IAAA,KAAS,mBAAmB,GAAI,CAAA,WAAA,CAAY,SAAS,WAAa,EAAA;AACrF,UAAS,QAAA,CAAA;AAAA,YACR,IAAA,EAAM,IAAI,WAAY,CAAA,IAAA;AAAA,YACtB,KAAA,EAAO,IAAI,WAAY,CAAA,KAAA;AAAA,YACvB,MAAA,EAAQ,IAAI,WAAY,CAAA,MAAA;AAAA,YACxB,SAAA,EAAW,IAAI,IAAK,EAAA;AAAA,YACpB,IAAA,EAAM,IAAI,WAAY,CAAA,IAAA;AAAA,WACtB,CAAA,CAAA;AAAA,SACF;AAAA,OACD;AACA,MAAI,IAAA,QAAA,IAAY,CAAC,GAAK,EAAA;AACrB,QAA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AAU,UAAS,QAAA,EAAA,CAAA;AAAA,OACxB;AAAA,KAAA,EACA,OAED,CACD,CAAA,CAAA;AAAA,GAEF;AAEA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAO,OAAA,EAAS,MAAM,iBAAA,CAAkB,IAAI,CAAA;AAAA,GAAA,EAAI,UAAW,CAAA,CAAA;AACpE;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SinInput.js","sources":["../../../../src/inputs/SinInput/SinInput.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useCallback, useMemo, useState} from 'react';\nimport {Icon, Input, type SemanticCOLORS} from 'semantic-ui-react';\nimport SIN from 'social-insurance-number';\nimport type {MaskedInputProps} from '../MaskedInput';\nimport {useMaskedInput} from '../MaskedInput/useMaskedInput';\n\nconst d = debug('thx.controls.inputs.SinInput');\n\nexport interface SinInputProps extends Omit<MaskedInputProps, 'mask'> {\n\tvalue?: string;\n\tonChange(value?: string): void;\n}\n\nexport function SinInput(props: SinInputProps) {\n\tconst {value, onChange, ...rest} = props;\n\tconst [color, setColor] = useState<SemanticCOLORS>('black');\n\n\tconst checkValidation = useCallback((valueArray: string[]) => {\n\t\tconst num = valueArray.join('').replaceAll(/(_|\\s|-)/g, '');\n\t\tconst validate = new SIN(num);\n\t\tif (num.length > 0) {\n\t\t\tif (validate.isValid()) {\n\t\t\t\tsetColor('green');\n\t\t\t} else {\n\t\t\t\tsetColor('red');\n\t\t\t}\n\t\t} else {\n\t\t\tsetColor('black');\n\t\t}\n\t\treturn validate.isValid();\n\t}, []);\n\n\tconst mask: MaskedInputProps['mask'] = useMemo(\n\t\t() => ({\n\t\t\tmask: '999-999-999',\n\t\t\tisComplete: checkValidation,\n\t\t\tgreedy: false,\n\t\t\tautoUnmask: true,\n\t\t}),\n\t\t[checkValidation],\n\t);\n\n\tconst cardNumberRef = useMaskedInput({\n\t\tmask,\n\t\tvalue,\n\t\tonChange: v => {\n\t\t\tonChange && onChange(v);\n\t\t},\n\t\tonSet: v => {\n\t\t\tcheckValidation([v || '']);\n\t\t},\n\t});\n\n\treturn (\n\t\t<Input {...rest} icon>\n\t\t\t<input ref={cardNumberRef} />\n\t\t\t<Icon name=\"id badge\" color={color} size=\"large\" />\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;AAOU,MAAM,8BAA8B,EAAA;AAOvC,SAAA,QAAA,CAAkB,KAAsB,EAAA;AAC9C,EAAM,MAAA,EAAC,KAAO,EAAA,QAAA,EAAA,GAAa,IAAQ,EAAA,GAAA,KAAA,CAAA;AACnC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAyB,OAAO,CAAA,CAAA;AAE1D,EAAM,MAAA,eAAA,GAAkB,WAAY,CAAA,CAAC,UAAyB,KAAA;AAC7D,IAAA,MAAM,MAAM,UAAW,CAAA,IAAA,CAAK,EAAE,CAAE,CAAA,UAAA,CAAW,aAAa,EAAE,CAAA,CAAA;AAC1D,IAAM,MAAA,QAAA,GAAW,IAAI,GAAA,CAAI,GAAG,CAAA,CAAA;AAC5B,IAAI,IAAA,GAAA,CAAI,SAAS,CAAG,EAAA;AACnB,MAAI,IAAA,QAAA,CAAS,SAAW,EAAA;AACvB,QAAA,QAAA,CAAS,OAAO,CAAA,CAAA;AAAA,OACV,MAAA;AACN,QAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAAA,OACf;AAAA,KACM,MAAA;AACN,MAAA,QAAA,CAAS,OAAO,CAAA,CAAA;AAAA,KACjB;AACA,IAAA,OAAO,SAAS,OAAQ,EAAA,CAAA;AAAA,GACzB,EAAG,EAAE,CAAA,CAAA;AAEL,EAAM,MAAA,IAAA,GAAiC,QACtC,OAAO;AAAA,IACN,IAAM,EAAA,aAAA;AAAA,IACN,UAAY,EAAA,eAAA;AAAA,IACZ,MAAQ,EAAA,KAAA;AAAA,IACR,UAAY,EAAA,IAAA;AAAA,GACb,CAAA,EACA,CAAC,eAAe,CACjB,CAAA,CAAA;AAEA,EAAA,MAAM,gBAAgB,cAAe,CAAA;AAAA,IACpC,IAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAU,CAAK,CAAA,KAAA;AACd,MAAA,QAAA,IAAY,SAAS,CAAC,CAAA,CAAA;AAAA,KACvB;AAAA,IACA,OAAO,CAAK,CAAA,KAAA;AACX,MAAgB,eAAA,CAAA,CAAC,CAAK,IAAA,EAAE,CAAC,CAAA,CAAA;AAAA,KAC1B;AAAA,GACA,CAAA,CAAA;AAED,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,IAAM,IAAI,EAAA,IAAA;AAAA,GAAA,kBACnB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,GAAK,EAAA,aAAA;AAAA,GAAe,mBAC1B,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAK,EAAA,UAAA;AAAA,IAAW,KAAA;AAAA,IAAc,IAAK,EAAA,OAAA;AAAA,GAAQ,CAClD,CAAA,CAAA;AAEF;;;;"}
1
+ {"version":3,"file":"SinInput.js","sources":["../../../../src/inputs/SinInput/SinInput.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useCallback, useMemo, useState} from 'react';\nimport {Icon, Input, SemanticCOLORS} from 'semantic-ui-react';\nimport SIN from 'social-insurance-number';\nimport type {MaskedInputProps} from '../MaskedInput';\nimport {useMaskedInput} from '../MaskedInput/useMaskedInput';\n\nconst d = debug('thx.controls.inputs.SinInput');\n\nexport interface SinInputProps extends Omit<MaskedInputProps, 'mask'> {\n\tvalue?: string;\n\tonChange(value?: string): void;\n}\n\nexport function SinInput(props: SinInputProps) {\n\tconst {value, onChange, ...rest} = props;\n\tconst [color, setColor] = useState<SemanticCOLORS>('black');\n\n\tconst checkValidation = useCallback((valueArray: string[]) => {\n\t\tconst num = valueArray.join('').replaceAll(/(_|\\s|-)/g, '');\n\t\tconst validate = new SIN(num);\n\t\tif (num.length > 0) {\n\t\t\tif (validate.isValid()) {\n\t\t\t\tsetColor('green');\n\t\t\t} else {\n\t\t\t\tsetColor('red');\n\t\t\t}\n\t\t} else {\n\t\t\tsetColor('black');\n\t\t}\n\t\treturn validate.isValid();\n\t}, []);\n\n\tconst mask: MaskedInputProps['mask'] = useMemo(\n\t\t() => ({\n\t\t\tmask: '999-999-999',\n\t\t\tisComplete: checkValidation,\n\t\t\tgreedy: false,\n\t\t\tautoUnmask: true,\n\t\t}),\n\t\t[checkValidation],\n\t);\n\n\tconst cardNumberRef = useMaskedInput({\n\t\tmask,\n\t\tvalue,\n\t\tonChange: v => {\n\t\t\tonChange && onChange(v);\n\t\t},\n\t\tonSet: v => {\n\t\t\tcheckValidation([v || '']);\n\t\t},\n\t});\n\n\treturn (\n\t\t<Input {...rest} icon>\n\t\t\t<input ref={cardNumberRef} />\n\t\t\t<Icon name=\"id badge\" color={color} size=\"large\" />\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;AAOU,MAAM,8BAA8B,EAAA;AAOvC,SAAA,QAAA,CAAkB,KAAsB,EAAA;AAC9C,EAAM,MAAA,EAAC,KAAO,EAAA,QAAA,EAAA,GAAa,IAAQ,EAAA,GAAA,KAAA,CAAA;AACnC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAyB,OAAO,CAAA,CAAA;AAE1D,EAAM,MAAA,eAAA,GAAkB,WAAY,CAAA,CAAC,UAAyB,KAAA;AAC7D,IAAA,MAAM,MAAM,UAAW,CAAA,IAAA,CAAK,EAAE,CAAE,CAAA,UAAA,CAAW,aAAa,EAAE,CAAA,CAAA;AAC1D,IAAM,MAAA,QAAA,GAAW,IAAI,GAAA,CAAI,GAAG,CAAA,CAAA;AAC5B,IAAI,IAAA,GAAA,CAAI,SAAS,CAAG,EAAA;AACnB,MAAI,IAAA,QAAA,CAAS,SAAW,EAAA;AACvB,QAAA,QAAA,CAAS,OAAO,CAAA,CAAA;AAAA,OACV,MAAA;AACN,QAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAAA,OACf;AAAA,KACM,MAAA;AACN,MAAA,QAAA,CAAS,OAAO,CAAA,CAAA;AAAA,KACjB;AACA,IAAA,OAAO,SAAS,OAAQ,EAAA,CAAA;AAAA,GACzB,EAAG,EAAE,CAAA,CAAA;AAEL,EAAM,MAAA,IAAA,GAAiC,QACtC,OAAO;AAAA,IACN,IAAM,EAAA,aAAA;AAAA,IACN,UAAY,EAAA,eAAA;AAAA,IACZ,MAAQ,EAAA,KAAA;AAAA,IACR,UAAY,EAAA,IAAA;AAAA,GACb,CAAA,EACA,CAAC,eAAe,CACjB,CAAA,CAAA;AAEA,EAAA,MAAM,gBAAgB,cAAe,CAAA;AAAA,IACpC,IAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAU,CAAK,CAAA,KAAA;AACd,MAAA,QAAA,IAAY,SAAS,CAAC,CAAA,CAAA;AAAA,KACvB;AAAA,IACA,OAAO,CAAK,CAAA,KAAA;AACX,MAAgB,eAAA,CAAA,CAAC,CAAK,IAAA,EAAE,CAAC,CAAA,CAAA;AAAA,KAC1B;AAAA,GACA,CAAA,CAAA;AAED,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,IAAM,IAAI,EAAA,IAAA;AAAA,GAAA,kBACnB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,GAAK,EAAA,aAAA;AAAA,GAAe,mBAC1B,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAK,EAAA,UAAA;AAAA,IAAW,KAAA;AAAA,IAAc,IAAK,EAAA,OAAA;AAAA,GAAQ,CAClD,CAAA,CAAA;AAEF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxEditCell.js","sources":["../../../../src/inputs/TableInput/CheckboxEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Checkbox, type CheckboxProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.CheckboxEditCell');\n\ninterface CheckboxEditCellOptions<D extends Record<string, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: CheckboxProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, boolean>;\n}\n\nexport function CheckboxEditCell<D extends Record<string, unknown>>(options?: CheckboxEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function CheckboxEditCellFn(props: TableCellProps<D, boolean>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\n\t\treturn (\n\t\t\t<Checkbox\n\t\t\t\t{...inputProps}\n\t\t\t\tchecked={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.checked || false);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, value);\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, value, props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,iDAAiD,EAAA;AAS1D,SAAA,gBAAA,CAA6D,OAAsC,EAAA;AACzG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,4BAA4B,KAAmC,EAAA;AACrE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAS,YAAY,CAAA,CAAA;AAE/C,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACI,GAAA,UAAA;AAAA,MACJ,OAAS,EAAA,KAAA;AAAA,MACT,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAS,QAAA,CAAA,CAAA,CAAE,WAAW,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,KAAA,EAAO,IAAI,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,WAAW,CAAC,KAAA,KAAyB,YAAY,KAAO,EAAA,KAAA,EAAO,OAAO,aAAa,CAAA;AAAA,KACpF,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"CheckboxEditCell.js","sources":["../../../../src/inputs/TableInput/CheckboxEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Checkbox, CheckboxProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.CheckboxEditCell');\n\ninterface CheckboxEditCellOptions<D extends Record<string, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: CheckboxProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, boolean>;\n}\n\nexport function CheckboxEditCell<D extends Record<string, unknown>>(options?: CheckboxEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function CheckboxEditCellFn(props: TableCellProps<D, boolean>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\n\t\treturn (\n\t\t\t<Checkbox\n\t\t\t\t{...inputProps}\n\t\t\t\tchecked={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.checked || false);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, value);\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, value, props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,iDAAiD,EAAA;AAS1D,SAAA,gBAAA,CAA6D,OAAsC,EAAA;AACzG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,4BAA4B,KAAmC,EAAA;AACrE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAS,YAAY,CAAA,CAAA;AAE/C,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACI,GAAA,UAAA;AAAA,MACJ,OAAS,EAAA,KAAA;AAAA,MACT,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAS,QAAA,CAAA,CAAA,CAAE,WAAW,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,KAAA,EAAO,IAAI,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,WAAW,CAAC,KAAA,KAAyB,YAAY,KAAO,EAAA,KAAA,EAAO,OAAO,aAAa,CAAA;AAAA,KACpF,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
@@ -9,7 +9,7 @@ function DropdownCell(dropdownProps) {
9
9
  column: { id },
10
10
  updateData
11
11
  } = props;
12
- const { onChange, ...rest } = dropdownProps;
12
+ const { value: v, onChange, ...rest } = dropdownProps;
13
13
  return /* @__PURE__ */ React.createElement(Dropdown, {
14
14
  ...rest,
15
15
  value,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownCell.js","sources":["../../../../src/inputs/TableInput/DropdownCell.tsx"],"sourcesContent":["import {Dropdown} from 'semantic-ui-react';\nimport type {DropdownProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\n\nexport function DropdownCell<D extends Record<string, unknown>>(dropdownProps: DropdownProps) {\n\treturn function DropdownCellFn(props: TableCellProps<D>) {\n\t\tconst {\n\t\t\tvalue,\n\t\t\trow: {index: rowIndex},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst {onChange, ...rest} = dropdownProps;\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\t{...rest}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(event, val) => {\n\t\t\t\t\tupdateData(rowIndex, id, val.value);\n\t\t\t\t\tif (onChange) onChange(event, val);\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;AAIO,SAAA,YAAA,CAAyD,aAA8B,EAAA;AAC7F,EAAA,OAAO,wBAAwB,KAA0B,EAAA;AACxD,IAAM,MAAA;AAAA,MACL,KAAA;AAAA,MACA,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAM,MAAA,EAAC,aAAa,IAAQ,EAAA,GAAA,aAAA,CAAA;AAE5B,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACI,GAAA,IAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,KAAA,EAAO,GAAQ,KAAA;AACzB,QAAW,UAAA,CAAA,QAAA,EAAU,EAAI,EAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AAClC,QAAI,IAAA,QAAA;AAAU,UAAA,QAAA,CAAS,OAAO,GAAG,CAAA,CAAA;AAAA,OAClC;AAAA,KACD,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"DropdownCell.js","sources":["../../../../src/inputs/TableInput/DropdownCell.tsx"],"sourcesContent":["import {Dropdown} from 'semantic-ui-react';\nimport type {DropdownProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\n\nexport function DropdownCell<D extends Record<string, unknown>>(dropdownProps: DropdownProps) {\n\treturn function DropdownCellFn(props: TableCellProps<D>) {\n\t\tconst {\n\t\t\tvalue,\n\t\t\trow: {index: rowIndex},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\t// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars\n\t\tconst {value: v, onChange, ...rest} = dropdownProps;\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\t{...rest}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(event, val) => {\n\t\t\t\t\tupdateData(rowIndex, id, val.value);\n\t\t\t\t\tif (onChange) onChange(event, val);\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;AAIO,SAAA,YAAA,CAAyD,aAA8B,EAAA;AAC7F,EAAA,OAAO,wBAAwB,KAA0B,EAAA;AACxD,IAAM,MAAA;AAAA,MACL,KAAA;AAAA,MACA,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAGJ,IAAA,MAAM,EAAC,KAAA,EAAO,CAAG,EAAA,QAAA,EAAA,GAAa,IAAQ,EAAA,GAAA,aAAA,CAAA;AAEtC,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACI,GAAA,IAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,KAAA,EAAO,GAAQ,KAAA;AACzB,QAAW,UAAA,CAAA,QAAA,EAAU,EAAI,EAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AAClC,QAAI,IAAA,QAAA;AAAU,UAAA,QAAA,CAAS,OAAO,GAAG,CAAA,CAAA;AAAA,OAClC;AAAA,KACD,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberEditCell.js","sources":["../../../../src/inputs/TableInput/NumberEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Input, type InputProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.NumberEditCell');\n\ninterface NumberEditCellOptions<D extends Record<number, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: InputProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, number>;\n}\n\nexport function NumberEditCell<D extends Record<number, unknown>>(options?: NumberEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function NumberEditCellFn(props: TableCellProps<D, number>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue?.toString());\n\n\t\treturn (\n\t\t\t<Input\n\t\t\t\ttype=\"number\"\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\t{...inputProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.value);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, parseFloat(value || '0'));\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, parseFloat(value), props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,+CAA+C,EAAA;AASxD,SAAA,cAAA,CAA2D,OAAoC,EAAA;AACrG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,0BAA0B,KAAkC,EAAA;AAClE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAO,EAAA,QAAA,CAAA,GAAY,QAAS,CAAA,YAAA,EAAc,UAAU,CAAA,CAAA;AAE3D,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,MACA,IAAK,EAAA,QAAA;AAAA,MACL,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACP,GAAA,UAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAA,QAAA,CAAS,EAAE,KAAK,CAAA,CAAA;AAAA,OACjB;AAAA,MACA,QAAQ,MAAM;AACb,QAAA,UAAA,CAAW,KAAO,EAAA,EAAA,EAAI,UAAW,CAAA,KAAA,IAAS,GAAG,CAAC,CAAA,CAAA;AAAA,OAC/C;AAAA,MACA,SAAA,EAAW,CAAC,KAAyB,KAAA,WAAA,CAAY,OAAO,UAAW,CAAA,KAAK,CAAG,EAAA,KAAA,EAAO,aAAa,CAAA;AAAA,KAChG,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"NumberEditCell.js","sources":["../../../../src/inputs/TableInput/NumberEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Input, InputProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.NumberEditCell');\n\ninterface NumberEditCellOptions<D extends Record<number, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: InputProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, number>;\n}\n\nexport function NumberEditCell<D extends Record<number, unknown>>(options?: NumberEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function NumberEditCellFn(props: TableCellProps<D, number>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue?.toString());\n\n\t\treturn (\n\t\t\t<Input\n\t\t\t\ttype=\"number\"\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\t{...inputProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.value);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, parseFloat(value || '0'));\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, parseFloat(value), props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,+CAA+C,EAAA;AASxD,SAAA,cAAA,CAA2D,OAAoC,EAAA;AACrG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,0BAA0B,KAAkC,EAAA;AAClE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAO,EAAA,QAAA,CAAA,GAAY,QAAS,CAAA,YAAA,EAAc,UAAU,CAAA,CAAA;AAE3D,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,MACA,IAAK,EAAA,QAAA;AAAA,MACL,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACP,GAAA,UAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAA,QAAA,CAAS,EAAE,KAAK,CAAA,CAAA;AAAA,OACjB;AAAA,MACA,QAAQ,MAAM;AACb,QAAA,UAAA,CAAW,KAAO,EAAA,EAAA,EAAI,UAAW,CAAA,KAAA,IAAS,GAAG,CAAC,CAAA,CAAA;AAAA,OAC/C;AAAA,MACA,SAAA,EAAW,CAAC,KAAyB,KAAA,WAAA,CAAY,OAAO,UAAW,CAAA,KAAK,CAAG,EAAA,KAAA,EAAO,aAAa,CAAA;AAAA,KAChG,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StringEditCell.js","sources":["../../../../src/inputs/TableInput/StringEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Input, type InputProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.StringEditCell');\n\ninterface StringEditCellOptions<D extends Record<string, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: InputProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, string>;\n}\n\nexport function StringEditCell<D extends Record<string, unknown>>(options?: StringEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function StringEditCellFn(props: TableCellProps<D, string>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\t{...inputProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.value);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, value);\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, value, props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,+CAA+C,EAAA;AASxD,SAAA,cAAA,CAA2D,OAAoC,EAAA;AACrG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,0BAA0B,KAAkC,EAAA;AAClE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAS,YAAY,CAAA,CAAA;AAE/C,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,MACA,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACP,GAAA,UAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAA,QAAA,CAAS,EAAE,KAAK,CAAA,CAAA;AAAA,OACjB;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,KAAA,EAAO,IAAI,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,WAAW,CAAC,KAAA,KAAyB,YAAY,KAAO,EAAA,KAAA,EAAO,OAAO,aAAa,CAAA;AAAA,KACpF,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"StringEditCell.js","sources":["../../../../src/inputs/TableInput/StringEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport {useState} from 'react';\nimport {Input, InputProps} from 'semantic-ui-react';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.StringEditCell');\n\ninterface StringEditCellOptions<D extends Record<string, unknown>> {\n\t/** Override SemanticUI Input props */\n\tinputProps?: InputProps;\n\t/** If function is present, and returns true, will add a new row if tab is pressed on the last row */\n\taddRowOnTabIf?: AddRowOnTabIf<D, string>;\n}\n\nexport function StringEditCell<D extends Record<string, unknown>>(options?: StringEditCellOptions<D>) {\n\tconst {inputProps, addRowOnTabIf} = options || {};\n\n\treturn function StringEditCellFn(props: TableCellProps<D, string>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\t{...inputProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(ev, v) => {\n\t\t\t\t\tsetValue(v.value);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(index, id, value);\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, value, props, addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAOU,MAAM,+CAA+C,EAAA;AASxD,SAAA,cAAA,CAA2D,OAAoC,EAAA;AACrG,EAAA,MAAM,EAAC,UAAA,EAAY,aAAiB,EAAA,GAAA,OAAA,IAAW,EAAC,CAAA;AAEhD,EAAA,OAAO,0BAA0B,KAAkC,EAAA;AAClE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,KAAK,EAAC,KAAA,EAAA;AAAA,MACN,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,KACG,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,CAAC,KAAA,EAAO,QAAY,CAAA,GAAA,QAAA,CAAS,YAAY,CAAA,CAAA;AAE/C,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,MACA,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACP,GAAA,UAAA;AAAA,MACJ,KAAA;AAAA,MACA,QAAA,EAAU,CAAC,EAAA,EAAI,CAAM,KAAA;AACpB,QAAA,QAAA,CAAS,EAAE,KAAK,CAAA,CAAA;AAAA,OACjB;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,KAAA,EAAO,IAAI,KAAK,CAAA,CAAA;AAAA,OAC5B;AAAA,MACA,WAAW,CAAC,KAAA,KAAyB,YAAY,KAAO,EAAA,KAAA,EAAO,OAAO,aAAa,CAAA;AAAA,KACpF,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableInput.js","sources":["../../../../src/inputs/TableInput/TableInput.tsx"],"sourcesContent":["import debug from 'debug';\nimport {FieldArray, type FieldArrayRenderProps} from 'formik';\nimport {useMemo, useState} from 'react';\nimport {\n\ttype CellPropGetter,\n\ttype CellProps,\n\ttype Column,\n\ttype FooterGroupPropGetter,\n\ttype FooterPropGetter,\n\ttype HeaderGroupPropGetter,\n\ttype HeaderPropGetter,\n\ttype RowPropGetter,\n\ttype TableBodyPropGetter,\n\tuseTable,\n} from 'react-table';\nimport {Table, type TableProps} from 'semantic-ui-react';\n\nconst d = debug('thx.controls.inputs.TableInput');\n\ntype DefaultTableType = Record<string, unknown>;\n\ninterface TableInputProps<A extends DefaultTableType> {\n\tname: string;\n\tvalues: A[];\n\tcolumns: Column<A>[];\n\tsetFieldValue: (field: string, value: any, shouldValidate?: boolean | undefined) => void;\n\tcreateRow?: () => A;\n\ttableProps?: TableProps;\n\theaderRowProps?: HeaderGroupPropGetter<A>;\n\theaderCellProps?: HeaderPropGetter<A>;\n\tfooterRowProps?: FooterGroupPropGetter<A>;\n\tfooterCellProps?: FooterPropGetter<A>;\n\tbodyProps?: TableBodyPropGetter<A>;\n\trowProps?: RowPropGetter<A>;\n\tcellProps?: CellPropGetter<A>;\n}\n\ninterface TableInputTableProps<A extends DefaultTableType> extends TableInputProps<A> {\n\tarrayHelpers: FieldArrayRenderProps;\n}\n\nexport interface TableCellProps<D extends DefaultTableType, V = any> extends CellProps<D, V> {\n\tarrayHelpers: FieldArrayRenderProps;\n\taddRow: () => void;\n\tupdateData: (index: number, id: string, value: V) => void;\n\thoverRow: string | number;\n}\n\nfunction TableInputTable<A extends DefaultTableType>(props: TableInputTableProps<A>) {\n\tconst {\n\t\tname,\n\t\tcolumns,\n\t\tvalues,\n\t\tarrayHelpers,\n\t\tsetFieldValue,\n\t\tcreateRow,\n\t\ttableProps,\n\t\theaderRowProps,\n\t\theaderCellProps,\n\t\tbodyProps,\n\t\trowProps,\n\t\tcellProps,\n\t\tfooterCellProps,\n\t\tfooterRowProps,\n\t} = props;\n\tconst cols = useMemo(() => columns, [columns]);\n\tconst vals = useMemo(() => values, [values]);\n\tconst [hoverRow, setHoverRow] = useState('');\n\n\t// React-Table hook\n\tconst {getTableProps, getTableBodyProps, headerGroups, prepareRow, rows, footerGroups} = useTable<A>({\n\t\tcolumns: cols,\n\t\tdata: vals,\n\t\t// @ts-ignore\n\t\tupdateData(rowIndex, columnId, value) {\n\t\t\tsetFieldValue(`${name}[${rowIndex}].${columnId}`, value);\n\t\t},\n\t\taddRow() {\n\t\t\tif (createRow) {\n\t\t\t\tarrayHelpers.push(createRow());\n\t\t\t}\n\t\t},\n\t\tarrayHelpers,\n\t});\n\n\t// @ts-ignore Check for the existence of a Footer that is not the default emptyRenderer()\n\tconst hasFooter = footerGroups.some(fg => fg.headers.some(fgh => fgh.Footer.name !== 'emptyRenderer'));\n\n\t// Build Footer if any footer renderers exist\n\tconst footer = hasFooter ? (\n\t\t<Table.Footer>\n\t\t\t{footerGroups.map(group => (\n\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t<Table.Row {...{...group.getFooterGroupProps(), ...group.getFooterGroupProps(footerRowProps)}}>\n\t\t\t\t\t{group.headers.map(column => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<Table.HeaderCell {...{...column.getFooterProps(), ...column.getFooterProps(footerCellProps)}}>\n\t\t\t\t\t\t\t{column.render('Footer')}\n\t\t\t\t\t\t</Table.HeaderCell>\n\t\t\t\t\t))}\n\t\t\t\t</Table.Row>\n\t\t\t))}\n\t\t</Table.Footer>\n\t) : null;\n\n\treturn (\n\t\t<Table {...{...getTableProps(), ...getTableProps(tableProps)}}>\n\t\t\t<Table.Header>\n\t\t\t\t{headerGroups.map(headerGroup => (\n\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t<Table.Row {...{...headerGroup.getHeaderGroupProps(), ...headerGroup.getHeaderGroupProps(headerRowProps)}}>\n\t\t\t\t\t\t{headerGroup.headers.map(column => (\n\t\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t\t<Table.HeaderCell {...{...column.getHeaderProps(), ...column.getHeaderProps(headerCellProps)}}>\n\t\t\t\t\t\t\t\t{column.render('Header')}\n\t\t\t\t\t\t\t</Table.HeaderCell>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Table.Row>\n\t\t\t\t))}\n\t\t\t</Table.Header>\n\t\t\t<Table.Body {...{...getTableBodyProps(), ...getTableBodyProps(bodyProps)}}>\n\t\t\t\t{rows.map(row => {\n\t\t\t\t\tprepareRow(row);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Table.Row\n\t\t\t\t\t\t\t{...{...row.getRowProps(), ...row.getRowProps(rowProps)}}\n\t\t\t\t\t\t\tonMouseEnter={() => setHoverRow(row.id)}\n\t\t\t\t\t\t\tonMouseLeave={() => setHoverRow('')}\n\t\t\t\t\t\t\tkey={row.getRowProps().key}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{row.cells.map(cell => (\n\t\t\t\t\t\t\t\t<Table.Cell {...{...cell.getCellProps(), ...cell.getCellProps(cellProps)}} key={cell.getCellProps().key}>\n\t\t\t\t\t\t\t\t\t{cell.render('Cell', {hoverRow})}\n\t\t\t\t\t\t\t\t</Table.Cell>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Table.Row>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Table.Body>\n\t\t\t{footer}\n\t\t</Table>\n\t);\n}\n\n/**\n * Can be used in a TForm as a Table Input.\n * @param props\n * @constructor\n */\nexport function TableInput<A extends DefaultTableType>(props: TableInputProps<A>) {\n\treturn <FieldArray name={props.name} render={arrayHelpers => <TableInputTable arrayHelpers={arrayHelpers} {...props} />} />;\n}\n"],"names":[],"mappings":";;;;;;AAiBU,MAAM,gCAAgC,EAAA;AA+BhD,SAAA,eAAA,CAAqD,KAAgC,EAAA;AACpF,EAAM,MAAA;AAAA,I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;AAAA,MAAgC,GAAA,KAAA;AAAA,KAAO,CAAA;AAAA,GAAI,CAAA,CAAA;AAC1H;;;;"}
1
+ {"version":3,"file":"TableInput.js","sources":["../../../../src/inputs/TableInput/TableInput.tsx"],"sourcesContent":["import debug from 'debug';\nimport {FieldArray, FieldArrayRenderProps} from 'formik';\nimport {useMemo, useState} from 'react';\nimport {\n\tCellPropGetter,\n\tCellProps,\n\tColumn,\n\tFooterGroupPropGetter,\n\tFooterPropGetter,\n\tHeaderGroupPropGetter,\n\tHeaderPropGetter,\n\tRowPropGetter,\n\tTableBodyPropGetter,\n\tuseTable,\n} from 'react-table';\nimport {Table, TableProps} from 'semantic-ui-react';\n\nconst d = debug('thx.controls.inputs.TableInput');\n\ntype DefaultTableType = Record<string, unknown>;\n\ninterface TableInputProps<A extends DefaultTableType> {\n\tname: string;\n\tvalues: A[];\n\tcolumns: Column<A>[];\n\tsetFieldValue: (field: string, value: any, shouldValidate?: boolean | undefined) => void;\n\tcreateRow?: () => A;\n\ttableProps?: TableProps;\n\theaderRowProps?: HeaderGroupPropGetter<A>;\n\theaderCellProps?: HeaderPropGetter<A>;\n\tfooterRowProps?: FooterGroupPropGetter<A>;\n\tfooterCellProps?: FooterPropGetter<A>;\n\tbodyProps?: TableBodyPropGetter<A>;\n\trowProps?: RowPropGetter<A>;\n\tcellProps?: CellPropGetter<A>;\n}\n\ninterface TableInputTableProps<A extends DefaultTableType> extends TableInputProps<A> {\n\tarrayHelpers: FieldArrayRenderProps;\n}\n\nexport interface TableCellProps<D extends DefaultTableType, V = any> extends CellProps<D, V> {\n\tarrayHelpers: FieldArrayRenderProps;\n\taddRow: () => void;\n\tupdateData: (index: number, id: string, value: V) => void;\n\thoverRow: string | number;\n}\n\nfunction TableInputTable<A extends DefaultTableType>(props: TableInputTableProps<A>) {\n\tconst {\n\t\tname,\n\t\tcolumns,\n\t\tvalues,\n\t\tarrayHelpers,\n\t\tsetFieldValue,\n\t\tcreateRow,\n\t\ttableProps,\n\t\theaderRowProps,\n\t\theaderCellProps,\n\t\tbodyProps,\n\t\trowProps,\n\t\tcellProps,\n\t\tfooterCellProps,\n\t\tfooterRowProps,\n\t} = props;\n\tconst cols = useMemo(() => columns, [columns]);\n\tconst vals = useMemo(() => values, [values]);\n\tconst [hoverRow, setHoverRow] = useState('');\n\n\t// React-Table hook\n\tconst {getTableProps, getTableBodyProps, headerGroups, prepareRow, rows, footerGroups} = useTable<A>({\n\t\tcolumns: cols,\n\t\tdata: vals,\n\t\t// @ts-ignore\n\t\tupdateData(rowIndex, columnId, value) {\n\t\t\tsetFieldValue(`${name}[${rowIndex}].${columnId}`, value);\n\t\t},\n\t\taddRow() {\n\t\t\tif (createRow) {\n\t\t\t\tarrayHelpers.push(createRow());\n\t\t\t}\n\t\t},\n\t\tarrayHelpers,\n\t});\n\n\t// @ts-ignore Check for the existence of a Footer that is not the default emptyRenderer()\n\tconst hasFooter = footerGroups.some(fg => fg.headers.some(fgh => fgh.Footer.name !== 'emptyRenderer'));\n\n\t// Build Footer if any footer renderers exist\n\tconst footer = hasFooter ? (\n\t\t<Table.Footer>\n\t\t\t{footerGroups.map(group => (\n\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t<Table.Row {...{...group.getFooterGroupProps(), ...group.getFooterGroupProps(footerRowProps)}}>\n\t\t\t\t\t{group.headers.map(column => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<Table.HeaderCell {...{...column.getFooterProps(), ...column.getFooterProps(footerCellProps)}}>\n\t\t\t\t\t\t\t{column.render('Footer')}\n\t\t\t\t\t\t</Table.HeaderCell>\n\t\t\t\t\t))}\n\t\t\t\t</Table.Row>\n\t\t\t))}\n\t\t</Table.Footer>\n\t) : null;\n\n\treturn (\n\t\t<Table {...{...getTableProps(), ...getTableProps(tableProps)}}>\n\t\t\t<Table.Header>\n\t\t\t\t{headerGroups.map(headerGroup => (\n\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t<Table.Row {...{...headerGroup.getHeaderGroupProps(), ...headerGroup.getHeaderGroupProps(headerRowProps)}}>\n\t\t\t\t\t\t{headerGroup.headers.map(column => (\n\t\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t\t<Table.HeaderCell {...{...column.getHeaderProps(), ...column.getHeaderProps(headerCellProps)}}>\n\t\t\t\t\t\t\t\t{column.render('Header')}\n\t\t\t\t\t\t\t</Table.HeaderCell>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Table.Row>\n\t\t\t\t))}\n\t\t\t</Table.Header>\n\t\t\t<Table.Body {...{...getTableBodyProps(), ...getTableBodyProps(bodyProps)}}>\n\t\t\t\t{rows.map(row => {\n\t\t\t\t\tprepareRow(row);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Table.Row\n\t\t\t\t\t\t\t{...{...row.getRowProps(), ...row.getRowProps(rowProps)}}\n\t\t\t\t\t\t\tonMouseEnter={() => setHoverRow(row.id)}\n\t\t\t\t\t\t\tonMouseLeave={() => setHoverRow('')}\n\t\t\t\t\t\t\tkey={row.getRowProps().key}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{row.cells.map(cell => (\n\t\t\t\t\t\t\t\t<Table.Cell {...{...cell.getCellProps(), ...cell.getCellProps(cellProps)}} key={cell.getCellProps().key}>\n\t\t\t\t\t\t\t\t\t{cell.render('Cell', {hoverRow})}\n\t\t\t\t\t\t\t\t</Table.Cell>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Table.Row>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Table.Body>\n\t\t\t{footer}\n\t\t</Table>\n\t);\n}\n\n/**\n * Can be used in a TForm as a Table Input.\n * @param props\n * @constructor\n */\nexport function TableInput<A extends DefaultTableType>(props: TableInputProps<A>) {\n\treturn <FieldArray name={props.name} render={arrayHelpers => <TableInputTable arrayHelpers={arrayHelpers} {...props} />} />;\n}\n"],"names":[],"mappings":";;;;;;AAiBU,MA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A,IAAM,MAAA,EAAQ,kCAAiB,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,MAAgB,YAAA;AAAA,MAAgC,GAAA,KAAA;AAAA,KAAO,CAAA;AAAA,GAAI,CAAA,CAAA;AAC1H;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyCurrencyInput.js","sources":["../../../../src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx"],"sourcesContent":["import {toMoney} from '@thx/money';\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport debug from 'debug';\nimport Money, {type CurrencyString} from 'js-money';\nimport {type SyntheticEvent, useCallback} from 'react';\nimport {Dropdown, type DropdownProps, Input, type InputProps, Label} from 'semantic-ui-react';\nimport type {MoneyInputProps} from '../MoneyInput';\nimport {useMoneyInput} from '../useMoneyInput';\n\nconst d = debug('thx.controls.money.MoneyCurrencyInput');\n\nexport interface MoneyCurrencyInputProps extends MoneyInputProps {\n\tcurrencies?: {key: string; value: string; text: string}[];\n}\n\nexport function MoneyCurrencyInput(props: MoneyCurrencyInputProps & Omit<InputProps, 'onChange'>) {\n\tconst {name, onBlur, prefix, defaultCurrency, onChange, showPrefix, value, wholeNumber, currencies, locked, ...rest} = props;\n\n\tconst options = currencies || [\n\t\t{key: 'CAD', text: 'CAD', value: 'CAD'},\n\t\t{key: 'USD', text: 'USD', value: 'USD'},\n\t];\n\n\tconst handleChange = useCallback(\n\t\t(v?: Money) => {\n\t\t\tif (!v) {\n\t\t\t\tonChange && onChange(toMoney(0, defaultCurrency));\n\t\t\t} else {\n\t\t\t\tonChange && onChange(v);\n\t\t\t}\n\t\t},\n\t\t[defaultCurrency, onChange],\n\t);\n\n\tconst val = !(value instanceof Money) && value !== undefined ? toMoney(value) : value;\n\n\tconst [inputElement] = useMoneyInput({onChange: handleChange, prefix, showPrefix, value: val, wholeNumber});\n\n\tconst handleDropdownChange = useCallback(\n\t\t(e: SyntheticEvent<HTMLElement, Event>, v: DropdownProps) => {\n\t\t\tconst newCurrencyCode = v.value as CurrencyString;\n\t\t\tconst newMoney = new Money(value?.amount || 0, newCurrencyCode);\n\n\t\t\td('Change', value, newCurrencyCode, newMoney);\n\t\t\t// setInputValue(newMoney);\n\t\t\tonChange && onChange(newMoney);\n\t\t\t// forceUpdate();\n\t\t},\n\t\t[onChange, value],\n\t);\n\n\tconst currencyCode = value?.currency || defaultCurrency?.code || 'CAD';\n\td('Render', value, currencyCode);\n\n\treturn (\n\t\t<Input {...rest} labelPosition=\"right\">\n\t\t\t<input name={name} ref={inputElement} onBlur={onBlur} readOnly={locked} />\n\t\t\t<Label basic>\n\t\t\t\t<Dropdown disabled={locked} options={options} value={currencyCode} onChange={handleDropdownChange} />\n\t\t\t</Label>\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;AASA,MAAM,CAAA,GAAI,MAAM,uCAAuC,CAAA,CAAA;AAMhD,SAAA,kBAAA,CAA4B,KAA+D,EAAA;AACjG,EAAM,MAAA,EAAC,IAAM,EAAA,MAAA,EAAQ,MAAQ,EAAA,eAAA,EAAiB,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,WAAA,EAAa,UAAY,EAAA,MAAA,EAAA,GAAW,IAAQ,EAAA,GAAA,KAAA,CAAA;AAEvH,EAAA,MAAM,UAAU,UAAc,IAAA;AAAA,IAC7B,EAAC,GAAK,EAAA,KAAA,EAAO,IAAM,EAAA,KAAA,EAAO,OAAO,KAAK,EAAA;AAAA,IACtC,EAAC,GAAK,EAAA,KAAA,EAAO,IAAM,EAAA,KAAA,EAAO,OAAO,KAAK,EAAA;AAAA,GACvC,CAAA;AAEA,EAAM,MAAA,YAAA,GAAe,WACpB,CAAA,CAAC,CAAc,KAAA;AACd,IAAA,IAAI,CAAC,CAAG,EAAA;AACP,MAAA,QAAA,IAAY,QAAS,CAAA,OAAA,CAAQ,CAAG,EAAA,eAAe,CAAC,CAAA,CAAA;AAAA,KAC1C,MAAA;AACN,MAAA,QAAA,IAAY,SAAS,CAAC,CAA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AAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,KAAK,EAAA,IAAA;AAAA,GAAA,kBACV,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAS,QAAU,EAAA,MAAA;AAAA,IAAQ,OAAA;AAAA,IAAkB,KAAO,EAAA,YAAA;AAAA,IAAc,QAAU,EAAA,oBAAA;AAAA,GAAsB,CACpG,CACD,CAAA,CAAA;AAEF;;;;"}
1
+ {"version":3,"file":"MoneyCurrencyInput.js","sources":["../../../../src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx"],"sourcesContent":["import {toMoney} from '@thx/money';\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport debug from 'debug';\nimport Money, {CurrencyString} from 'js-money';\nimport {SyntheticEvent, useCallback} from 'react';\nimport {Dropdown, DropdownProps, Input, InputProps, Label} from 'semantic-ui-react';\nimport type {MoneyInputProps} from '../MoneyInput';\nimport {useMoneyInput} from '../useMoneyInput';\n\nconst d = debug('thx.controls.money.MoneyCurrencyInput');\n\nexport interface MoneyCurrencyInputProps extends MoneyInputProps {\n\tcurrencies?: {key: string; value: string; text: string}[];\n}\n\nexport function MoneyCurrencyInput(props: MoneyCurrencyInputProps & Omit<InputProps, 'onChange'>) {\n\tconst {name, onBlur, prefix, defaultCurrency, onChange, showPrefix, value, wholeNumber, currencies, locked, ...rest} = props;\n\n\tconst options = currencies || [\n\t\t{key: 'CAD', text: 'CAD', value: 'CAD'},\n\t\t{key: 'USD', text: 'USD', value: 'USD'},\n\t];\n\n\tconst handleChange = useCallback(\n\t\t(v?: Money) => {\n\t\t\tif (!v) {\n\t\t\t\tonChange && onChange(toMoney(0, defaultCurrency));\n\t\t\t} else {\n\t\t\t\tonChange && onChange(v);\n\t\t\t}\n\t\t},\n\t\t[defaultCurrency, onChange],\n\t);\n\n\tconst val = !(value instanceof Money) && value !== undefined ? toMoney(value) : value;\n\n\tconst [inputElement] = useMoneyInput({onChange: handleChange, prefix, showPrefix, value: val, wholeNumber});\n\n\tconst handleDropdownChange = useCallback(\n\t\t(e: SyntheticEvent<HTMLElement, Event>, v: DropdownProps) => {\n\t\t\tconst newCurrencyCode = v.value as CurrencyString;\n\t\t\tconst newMoney = new Money(value?.amount || 0, newCurrencyCode);\n\n\t\t\td('Change', value, newCurrencyCode, newMoney);\n\t\t\t// setInputValue(newMoney);\n\t\t\tonChange && onChange(newMoney);\n\t\t\t// forceUpdate();\n\t\t},\n\t\t[onChange, value],\n\t);\n\n\tconst currencyCode = value?.currency || defaultCurrency?.code || 'CAD';\n\td('Render', value, currencyCode);\n\n\treturn (\n\t\t<Input {...rest} labelPosition=\"right\">\n\t\t\t<input name={name} ref={inputElement} onBlur={onBlur} readOnly={locked} />\n\t\t\t<Label basic>\n\t\t\t\t<Dropdown disabled={locked} options={options} value={currencyCode} onChange={handleDropdownChange} />\n\t\t\t</Label>\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;AASA,MAAM,CAAA,GAAI,MAAM,uCAAuC,CAAA,CAAA;AAMhD,SAAA,kBAAA,CAA4B,KAA+D,EAAA;AACjG,EAAM,MAAA,EAAC,IAAM,EAAA,MAAA,EAAQ,MAAQ,EAAA,eAAA,EAAiB,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,WAAA,EAAa,UAAY,EAAA,MAAA,EAAA,GAAW,IAAQ,EAAA,GAAA,KAAA,CAAA;AAEvH,EAAA,MAAM,UAAU,UAAc,IAAA;AAAA,IAC7B,EAAC,GAAK,EAAA,KAAA,EAAO,IAAM,EAAA,KAAA,EAAO,OAAO,KAAK,EAAA;AAAA,IACtC,EAAC,GAAK,EAAA,KAAA,EAAO,IAAM,EAAA,KAAA,EAAO,OAAO,KAAK,EAAA;AAAA,GACvC,CAAA;AAEA,EAAM,MAAA,YAAA,GAAe,WACpB,CAAA,CAAC,CAAc,KAAA;AACd,IAAA,IAAI,CAAC,CAAG,EAAA;AACP,MAAA,QAAA,IAAY,QAAS,CAAA,OAAA,CAAQ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IAAY,GAAK,EAAA,YAAA;AAAA,IAAc,MAAA;AAAA,IAAgB,QAAU,EAAA,MAAA;AAAA,GAAQ,mBACvE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,KAAK,EAAA,IAAA;AAAA,GAAA,kBACV,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAS,QAAU,EAAA,MAAA;AAAA,IAAQ,OAAA;AAAA,IAAkB,KAAO,EAAA,YAAA;AAAA,IAAc,QAAU,EAAA,oBAAA;AAAA,GAAsB,CACpG,CACD,CAAA,CAAA;AAEF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.js","sources":["../../../../src/money/MoneyInput/MoneyInput.tsx"],"sourcesContent":["import {toMoney} from '@thx/money';\nimport debug from 'debug';\nimport Money, {type Currency, type MoneyObject} from 'js-money';\nimport {useCallback} from 'react';\nimport {Input, type InputProps} from 'semantic-ui-react';\nimport {useMoneyInput} from '../useMoneyInput';\n\nconst d = debug('thx.controls.money.MoneyInput');\n\nexport interface MoneyInputProps {\n\tname?: string;\n\tonChange?: (value: Money) => void;\n\tvalue?: Money | MoneyObject;\n\tdefaultCurrency?: Currency; // Defaults to Money.CAD\n\tonBlur?: (ev: any) => void;\n\tprefix?: string; // Defaults to currency symbol\n\tshowPrefix?: boolean; // Defaults to false\n\tlocked?: boolean; // Defaults to false\n\twholeNumber?: boolean; // Defaults to false\n}\n\nexport function MoneyInput(props: MoneyInputProps & Omit<InputProps, 'onChange'>) {\n\tconst {name, onBlur, locked, prefix, defaultCurrency, onChange, showPrefix, value, wholeNumber, ...rest} = props;\n\n\tconst handleChange = useCallback(\n\t\t(v?: Money) => {\n\t\t\tif (!v) {\n\t\t\t\tonChange && onChange(toMoney(0, defaultCurrency));\n\t\t\t} else {\n\t\t\t\tonChange && onChange(v);\n\t\t\t}\n\t\t},\n\t\t[defaultCurrency, onChange],\n\t);\n\n\tconst val = !(value instanceof Money) && value !== undefined ? toMoney(value) : value;\n\n\tconst [inputElement] = useMoneyInput({onChange: handleChange, prefix, showPrefix, value: val, wholeNumber});\n\n\treturn (\n\t\t<Input {...rest}>\n\t\t\t<input name={name} ref={inputElement} onBlur={onBlur} readOnly={locked} />\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;AAOU,MAAM,+BAA+B,EAAA;AAcxC,SAAA,UAAA,CAAoB,KAAuD,EAAA;AACjF,EAAM,MAAA,EAAC,IAAM,EAAA,MAAA,EAAQ,MAAQ,EAAA,MAAA,EAAQ,iBAAiB,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,WAAA,EAAA,GAAgB,IAAQ,EAAA,GAAA,KAAA,CAAA;AAE3G,EAAM,MAAA,YAAA,GAAe,WACpB,CAAA,CAAC,CAAc,KAAA;AACd,IAAA,IAAI,CAAC,CAAG,EAAA;AACP,MAAA,QAAA,IAAY,QAAS,CAAA,OAAA,CAAQ,CAAG,EAAA,eAAe,CAAC,CAAA,CAAA;AAAA,KAC1C,MAAA;AACN,MAAA,QAAA,IAAY,SAAS,CAAC,CAAA,CAAA;AAAA,KACvB;AAAA,GAED,EAAA,CAAC,eAAiB,EAAA,QAAQ,CAC3B,CAAA,CAAA;AAEA,EAAM,MAAA,GAAA,GAAM,EAAmB,KAAA,YAAA,KAAA,CAAA,IAAU,UAAU,KAAY,CAAA,GAAA,OAAA,CAAQ,KAAK,CAAI,GAAA,KAAA,CAAA;AAEhF,EAAM,MAAA,CAAC,YAAgB,CAAA,GAAA,aAAA,CAAc,EAAC,QAAA,EAAU,YAAc,EAAA,MAAA,EAAQ,UAAY,EAAA,KAAA,EAAO,GAAK,EAAA,WAAA,EAAY,CAAA,CAAA;AAE1G,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,GAAA,kBACT,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,IAAA;AAAA,IAAY,GAAK,EAAA,YAAA;AAAA,IAAc,MAAA;AAAA,IAAgB,QAAU,EAAA,MAAA;AAAA,GAAQ,CACzE,CAAA,CAAA;AAEF;;;;"}
1
+ {"version":3,"file":"MoneyInput.js","sources":["../../../../src/money/MoneyInput/MoneyInput.tsx"],"sourcesContent":["import {toMoney} from '@thx/money';\nimport debug from 'debug';\nimport Money, {Currency, MoneyObject} from 'js-money';\nimport {useCallback} from 'react';\nimport {Input, InputProps} from 'semantic-ui-react';\nimport {useMoneyInput} from '../useMoneyInput';\n\nconst d = debug('thx.controls.money.MoneyInput');\n\nexport interface MoneyInputProps {\n\tname?: string;\n\tonChange?: (value: Money) => void;\n\tvalue?: Money | MoneyObject;\n\tdefaultCurrency?: Currency; // Defaults to Money.CAD\n\tonBlur?: (ev: any) => void;\n\tprefix?: string; // Defaults to currency symbol\n\tshowPrefix?: boolean; // Defaults to false\n\tlocked?: boolean; // Defaults to false\n\twholeNumber?: boolean; // Defaults to false\n}\n\nexport function MoneyInput(props: MoneyInputProps & Omit<InputProps, 'onChange'>) {\n\tconst {name, onBlur, locked, prefix, defaultCurrency, onChange, showPrefix, value, wholeNumber, ...rest} = props;\n\n\tconst handleChange = useCallback(\n\t\t(v?: Money) => {\n\t\t\tif (!v) {\n\t\t\t\tonChange && onChange(toMoney(0, defaultCurrency));\n\t\t\t} else {\n\t\t\t\tonChange && onChange(v);\n\t\t\t}\n\t\t},\n\t\t[defaultCurrency, onChange],\n\t);\n\n\tconst val = !(value instanceof Money) && value !== undefined ? toMoney(value) : value;\n\n\tconst [inputElement] = useMoneyInput({onChange: handleChange, prefix, showPrefix, value: val, wholeNumber});\n\n\treturn (\n\t\t<Input {...rest}>\n\t\t\t<input name={name} ref={inputElement} onBlur={onBlur} readOnly={locked} />\n\t\t</Input>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;AAOU,MAAM,+BAA+B,EAAA;AAcxC,SAAA,UAAA,CAAoB,KAAuD,EAAA;AACjF,EAAM,MAAA,EAAC,IAAM,EAAA,MAAA,EAAQ,MAAQ,EAAA,MAAA,EAAQ,iBAAiB,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,WAAA,EAAA,GAAgB,IAAQ,EAAA,GAAA,KAAA,CAAA;AAE3G,EAAM,MAAA,YAAA,GAAe,WACpB,CAAA,CAAC,CAAc,KAAA;AACd,IAAA,IAAI,CAAC,CAAG,EAAA;AACP,MAAA,QAAA,IAAY,QAAS,CAAA,OAAA,CAAQ,CAAG,EAAA,eAAe,CAAC,CAAA,CAAA;AAAA,KAC1C,MAAA;AACN,MAAA,QAAA,IAAY,SAAS,CAAC,CAAA,CAAA;AAAA,KACvB;AAAA,GAED,EAAA,CAAC,eAAiB,EAAA,QAAQ,CAC3B,CAAA,CAAA;AAEA,EAAM,MAAA,GAAA,GAAM,EAAmB,KAAA,YAAA,KAAA,CAAA,IAAU,UAAU,KAAY,CAAA,GAAA,OAAA,CAAQ,KAAK,CAAI,GAAA,KAAA,CAAA;AAEhF,EAAM,MAAA,CAAC,YAAgB,CAAA,GAAA,aAAA,CAAc,EAAC,QAAA,EAAU,YAAc,EAAA,MAAA,EAAQ,UAAY,EAAA,KAAA,EAAO,GAAK,EAAA,WAAA,EAAY,CAAA,CAAA;AAE1G,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,GAAA,kBACT,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,IAAA;AAAA,IAAY,GAAK,EAAA,YAAA;AAAA,IAAc,MAAA;AAAA,IAAgB,QAAU,EAAA,MAAA;AAAA,GAAQ,CACzE,CAAA,CAAA;AAEF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMoneyInput.js","sources":["../../../src/money/useMoneyInput.ts"],"sourcesContent":["import {toMoney} from '@thx/money';\nimport debug from 'debug';\nimport Inputmask from 'inputmask';\nimport Money from 'js-money';\nimport {type MutableRefObject, useCallback, useEffect, useRef} from 'react';\n\nconst d = debug('thx.controls.money.useMoneyInput');\n\n// @ts-ignore inputmask .d.ts file is correct, but ESM causes some difficulty. -mk\nconst InputmaskClass = Inputmask.default || Inputmask;\n\ninterface UseMoneyInputProps {\n\tvalue?: Money;\n\tonChange?: (value?: Money) => void;\n\tonSet?: (value?: Money) => void;\n\t// defaultCurrency?: Currency; // Defaults to Money.CAD\n\tprefix?: string; // Defaults to currency symbol\n\tshowPrefix?: boolean; // Defaults to false\n\twholeNumber?: boolean; // Defaults to false\n}\n\ntype SetValueFn = (value?: Money) => void;\n\nexport function useMoneyInput(props: UseMoneyInputProps): [MutableRefObject<HTMLInputElement | null>, SetValueFn] {\n\tconst {value, onChange, onSet, showPrefix, prefix, wholeNumber} = props;\n\n\tconst inputElement = useRef<HTMLInputElement | null>(null);\n\tconst maskInstance = useRef<Inputmask.Instance | null>(null);\n\n\t// set the adjCurrency\n\t// let adjCurrency = Money.CAD;\n\t// if (value?.currency && Money[value?.currency]) adjCurrency = Money[value?.currency];\n\t// if (defaultCurrency) adjCurrency = defaultCurrency;\n\tconst currencyCode = value?.currency || 'CAD';\n\n\tuseEffect(() => {\n\t\tif (!inputElement.current) throw new Error('Could not get input element');\n\n\t\td('Creating input mask instance');\n\t\tmaskInstance.current = new InputmaskClass({\n\t\t\talias: 'numeric',\n\t\t\tgroupSeparator: ',',\n\t\t\tdigits: wholeNumber ? '0' : Money[currencyCode].decimal_digits.toString(),\n\t\t\tdigitsOptional: false,\n\t\t\tprefix: showPrefix ? prefix || Money[currencyCode].symbol : undefined,\n\t\t\tplaceholder: '0',\n\t\t\tautoUnmask: true,\n\t\t\toncomplete() {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tif (inputElement.current?.value) {\n\t\t\t\t\t\tonChange(toMoney(inputElement.current?.value, currencyCode));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tonChange();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\toncleared() {\n\t\t\t\tif (onChange) onChange();\n\t\t\t},\n\t\t\tonincomplete() {\n\t\t\t\tif (onChange) onChange(toMoney(inputElement.current?.value, currencyCode));\n\t\t\t},\n\t\t});\n\t\t// @ts-ignore We just created the instance but typescript can't figure it out. -mk\n\t\tmaskInstance.current.mask(inputElement.current);\n\n\t\treturn () => {\n\t\t\tif (maskInstance.current) {\n\t\t\t\td('Cleaning up input mask instance');\n\t\t\t\tmaskInstance.current.remove();\n\t\t\t\tmaskInstance.current = null;\n\t\t\t}\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [currencyCode, prefix, showPrefix, wholeNumber]);\n\n\tconst setVal = useCallback<SetValueFn>(\n\t\t(v?: Money) => {\n\t\t\tif (inputElement.current) {\n\t\t\t\td('Value is being set:', v);\n\t\t\t\tif (v) {\n\t\t\t\t\tinputElement.current.value = v.toDecimal().toString();\n\t\t\t\t} else {\n\t\t\t\t\tinputElement.current.value = '';\n\t\t\t\t}\n\t\t\t\tonSet && onSet(v);\n\t\t\t}\n\t\t},\n\t\t[onSet],\n\t);\n\n\t// If we change the value prop we need to sync the DOM value to display the new value\n\tuseEffect(() => {\n\t\tconst whatCurrentlyIsDisplayed = inputElement.current?.value || ''; // string | undef\n\t\tconst whatWeAreSetting = value ? value.toString() : ''; // money | undef\n\n\t\tif (whatCurrentlyIsDisplayed !== whatWeAreSetting) {\n\t\t\tsetVal(value);\n\t\t}\n\t}, [setVal, value]);\n\n\treturn [inputElement, setVal];\n}\n"],"names":["Inputmask"],"mappings":";;;;;;AAMA,MAAM,CAAA,GAAI,MAAM,kCAAkC,CAAA,CAAA;AAGlD,MAAM,cAAA,GAAiBA,gBAAU,OAAW,IAAAA,eAAA,CAAA;AAcrC,SAAA,aAAA,CAAuB,KAAoF,EAAA;AACjH,EAAA,MAAM,EAAC,KAAO,EAAA,QAAA,EAAU,KAAO,EAAA,UAAA,EAAY,QAAQ,WAAe,EAAA,GAAA,KAAA,CAAA;AAElE,EAAM,MAAA,YAAA,GAAe,OAAgC,IAAI,CAAA,CAAA;AACzD,EAAM,MAAA,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
+ {"version":3,"file":"useMoneyInput.js","sources":["../../../src/money/useMoneyInput.ts"],"sourcesContent":["import {toMoney} from '@thx/money';\nimport debug from 'debug';\nimport Inputmask from 'inputmask';\nimport Money from 'js-money';\nimport {MutableRefObject, useCallback, useEffect, useRef} from 'react';\n\nconst d = debug('thx.controls.money.useMoneyInput');\n\n// @ts-ignore inputmask .d.ts file is correct, but ESM causes some difficulty. -mk\nconst InputmaskClass = Inputmask.default || Inputmask;\n\ninterface UseMoneyInputProps {\n\tvalue?: Money;\n\tonChange?: (value?: Money) => void;\n\tonSet?: (value?: Money) => void;\n\t// defaultCurrency?: Currency; // Defaults to Money.CAD\n\tprefix?: string; // Defaults to currency symbol\n\tshowPrefix?: boolean; // Defaults to false\n\twholeNumber?: boolean; // Defaults to false\n}\n\ntype SetValueFn = (value?: Money) => void;\n\nexport function useMoneyInput(props: UseMoneyInputProps): [MutableRefObject<HTMLInputElement | null>, SetValueFn] {\n\tconst {value, onChange, onSet, showPrefix, prefix, wholeNumber} = props;\n\n\tconst inputElement = useRef<HTMLInputElement | null>(null);\n\tconst maskInstance = useRef<Inputmask.Instance | null>(null);\n\n\t// set the adjCurrency\n\t// let adjCurrency = Money.CAD;\n\t// if (value?.currency && Money[value?.currency]) adjCurrency = Money[value?.currency];\n\t// if (defaultCurrency) adjCurrency = defaultCurrency;\n\tconst currencyCode = value?.currency || 'CAD';\n\n\tuseEffect(() => {\n\t\tif (!inputElement.current) throw new Error('Could not get input element');\n\n\t\td('Creating input mask instance');\n\t\tmaskInstance.current = new InputmaskClass({\n\t\t\talias: 'numeric',\n\t\t\tgroupSeparator: ',',\n\t\t\tdigits: wholeNumber ? '0' : Money[currencyCode].decimal_digits.toString(),\n\t\t\tdigitsOptional: false,\n\t\t\tprefix: showPrefix ? prefix || Money[currencyCode].symbol : undefined,\n\t\t\tplaceholder: '0',\n\t\t\tautoUnmask: true,\n\t\t\toncomplete() {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tif (inputElement.current?.value) {\n\t\t\t\t\t\tonChange(toMoney(inputElement.current?.value, currencyCode));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tonChange();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\toncleared() {\n\t\t\t\tif (onChange) onChange();\n\t\t\t},\n\t\t\tonincomplete() {\n\t\t\t\tif (onChange) onChange(toMoney(inputElement.current?.value, currencyCode));\n\t\t\t},\n\t\t});\n\t\t// @ts-ignore We just created the instance but typescript can't figure it out. -mk\n\t\tmaskInstance.current.mask(inputElement.current);\n\n\t\treturn () => {\n\t\t\tif (maskInstance.current) {\n\t\t\t\td('Cleaning up input mask instance');\n\t\t\t\tmaskInstance.current.remove();\n\t\t\t\tmaskInstance.current = null;\n\t\t\t}\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [currencyCode, prefix, showPrefix, wholeNumber]);\n\n\tconst setVal = useCallback<SetValueFn>(\n\t\t(v?: Money) => {\n\t\t\tif (inputElement.current) {\n\t\t\t\td('Value is being set:', v);\n\t\t\t\tif (v) {\n\t\t\t\t\tinputElement.current.value = v.toDecimal().toString();\n\t\t\t\t} else {\n\t\t\t\t\tinputElement.current.value = '';\n\t\t\t\t}\n\t\t\t\tonSet && onSet(v);\n\t\t\t}\n\t\t},\n\t\t[onSet],\n\t);\n\n\t// If we change the value prop we need to sync the DOM value to display the new value\n\tuseEffect(() => {\n\t\tconst whatCurrentlyIsDisplayed = inputElement.current?.value || ''; // string | undef\n\t\tconst whatWeAreSetting = value ? value.toString() : ''; // money | undef\n\n\t\tif (whatCurrentlyIsDisplayed !== whatWeAreSetting) {\n\t\t\tsetVal(value);\n\t\t}\n\t}, [setVal, value]);\n\n\treturn [inputElement, setVal];\n}\n"],"names":["Inputmask"],"mappings":";;;;;;AAMA,MAAM,CAAA,GAAI,MAAM,kCAAkC,CAAA,CAAA;AAGlD,MAAM,cAAA,GAAiBA,gBAAU,OAAW,IAAAA,eAAA,CAAA;AAcrC,SAAA,a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A,IAAI,6BAA6B,gBAAkB,EAAA;AAClD,MAAA,MAAA,CAAO,KAAK,CAAA,CAAA;AAAA,KACb;AAAA,GACE,EAAA,CAAC,MAAQ,EAAA,KAAK,CAAC,CAAA,CAAA;AAElB,EAAO,OAAA,CAAC,cAAc,MAAM,CAAA,CAAA;AAC7B;;;;"}
package/dist/stats.html CHANGED
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
2669
2669
  </script>
2670
2670
  <script>
2671
2671
  /*<!--*/
2672
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src/index.ts","uid":"a569-1"}]},{"name":"step/useStep.js","children":[{"name":"src/step/useStep.ts","uid":"a569-3"}]},{"name":"step/Step.js","children":[{"name":"src/step/Step.tsx","uid":"a569-5"}]},{"name":"step/FormStep.js","children":[{"name":"src/step/FormStep.tsx","uid":"a569-7"}]},{"name":"step/StepProvider.js","children":[{"name":"src/step/StepProvider.tsx","uid":"a569-9"}]},{"name":"inputs/MaskedInput/useMaskedInput.js","children":[{"name":"src/inputs/MaskedInput/useMaskedInput.ts","uid":"a569-11"}]},{"name":"date/LocalDatePicker/LocalDatePicker.js","children":[{"name":"src/date/LocalDatePicker/LocalDatePicker.tsx","uid":"a569-13"}]},{"name":"date/MonthDayPicker/MonthDayPicker.js","children":[{"name":"src/date/MonthDayPicker/MonthDayPicker.tsx","uid":"a569-15"}]},{"name":"date/LocalTimePicker/LocalTimePicker.js","children":[{"name":"src/date/LocalTimePicker/LocalTimePicker.tsx","uid":"a569-17"}]},{"name":"date/YearSelect/YearSelect.js","children":[{"name":"src/date/YearSelect/YearSelect.tsx","uid":"a569-19"}]},{"name":"date/MonthYearPicker/MonthYearPicker.js","children":[{"name":"src/date/MonthYearPicker/MonthYearPicker.tsx","uid":"a569-21"}]},{"name":"form/TForm/TForm.js","children":[{"name":"src/form/TForm/TForm.tsx","uid":"a569-23"}]},{"name":"form/TForm/useTForm.js","children":[{"name":"src/form/TForm/useTForm.tsx","uid":"a569-25"}]},{"name":"inputs/RadioGroup/RadioGroup.js","children":[{"name":"src/inputs/RadioGroup/RadioGroup.tsx","uid":"a569-27"}]},{"name":"inputs/MaskedInput/MaskedInput.js","children":[{"name":"src/inputs/MaskedInput/MaskedInput.tsx","uid":"a569-29"}]},{"name":"inputs/CreditCardInput/CreditCardInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardInput.tsx","uid":"a569-31"}]},{"name":"inputs/TableInput/addRowOnTab.js","children":[{"name":"src/inputs/TableInput/addRowOnTab.ts","uid":"a569-33"}]},{"name":"inputs/PhoneInput/PhoneInput.js","children":[{"name":"src/inputs/PhoneInput/PhoneInput.tsx","uid":"a569-35"}]},{"name":"money/MoneyCurrencyInput/MoneyCurrencyInput.js","children":[{"name":"src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","uid":"a569-37"}]},{"name":"money/MoneyInput/MoneyInput.js","children":[{"name":"src/money/MoneyInput/MoneyInput.tsx","uid":"a569-39"}]},{"name":"inputs/TableInput/TableInput.js","children":[{"name":"src/inputs/TableInput/TableInput.tsx","uid":"a569-41"}]},{"name":"inputs/TableInput/MoneyEditCell.js","children":[{"name":"src/inputs/TableInput/MoneyEditCell.tsx","uid":"a569-43"}]},{"name":"inputs/TableInput/MoneyCell.js","children":[{"name":"src/inputs/TableInput/MoneyCell.tsx","uid":"a569-45"}]},{"name":"inputs/TableInput/LocalDateCell.js","children":[{"name":"src/inputs/TableInput/LocalDateCell.tsx","uid":"a569-47"}]},{"name":"inputs/TableInput/LocalDateEditCell.js","children":[{"name":"src/inputs/TableInput/LocalDateEditCell.tsx","uid":"a569-49"}]},{"name":"inputs/TableInput/LocalTimeEditCell.js","children":[{"name":"src/inputs/TableInput/LocalTimeEditCell.tsx","uid":"a569-51"}]},{"name":"inputs/TableInput/MoneySumFooter.js","children":[{"name":"src/inputs/TableInput/MoneySumFooter.tsx","uid":"a569-53"}]},{"name":"inputs/TableInput/CheckboxEditCell.js","children":[{"name":"src/inputs/TableInput/CheckboxEditCell.tsx","uid":"a569-55"}]},{"name":"inputs/TableInput/NumberEditCell.js","children":[{"name":"src/inputs/TableInput/NumberEditCell.tsx","uid":"a569-57"}]},{"name":"inputs/TableInput/StringEditCell.js","children":[{"name":"src/inputs/TableInput/StringEditCell.tsx","uid":"a569-59"}]},{"name":"inputs/TableInput/HoverCell.js","children":[{"name":"src/inputs/TableInput/HoverCell.tsx","uid":"a569-61"}]},{"name":"inputs/TableInput/DropdownCell.js","children":[{"name":"src/inputs/TableInput/DropdownCell.tsx","uid":"a569-63"}]},{"name":"inputs/SinInput/SinInput.js","children":[{"name":"src/inputs/SinInput/SinInput.tsx","uid":"a569-65"}]},{"name":"date/LocalMonthSelect/LocalMonthSelect.js","children":[{"name":"src/date/LocalMonthSelect/LocalMonthSelect.tsx","uid":"a569-67"}]},{"name":"step/stepContext.js","children":[{"name":"src/step/stepContext.ts","uid":"a569-69"}]},{"name":"money/useMoneyInput.js","children":[{"name":"src/money/useMoneyInput.ts","uid":"a569-71"}]},{"name":"date/DatePicker/styles.css.js","children":[{"name":"src/date/DatePicker/styles.css","uid":"a569-73"}]},{"name":"inputs/CreditCardInput/styles.css.js","children":[{"name":"src/inputs/CreditCardInput/styles.css","uid":"a569-75"}]},{"name":"date/LocalDatePicker/MaskedDateInput.js","children":[{"name":"src/date/LocalDatePicker/MaskedDateInput.tsx","uid":"a569-77"}]},{"name":"date/LocalTimePicker/MaskedTimeInput.js","children":[{"name":"src/date/LocalTimePicker/MaskedTimeInput.tsx","uid":"a569-79"}]},{"name":"inputs/CreditCardInput/CreditCardNumberInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardNumberInput.tsx","uid":"a569-81"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/runner/work/thr-addons/thr-addons/node_modules/style-inject/dist/style-inject.es.js","uid":"a569-83"}]}],"isRoot":true},"nodeParts":{"a569-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"a569-0"},"a569-3":{"renderedLength":113,"gzipLength":107,"brotliLength":82,"mainUid":"a569-2"},"a569-5":{"renderedLength":203,"gzipLength":155,"brotliLength":111,"mainUid":"a569-4"},"a569-7":{"renderedLength":440,"gzipLength":270,"brotliLength":214,"mainUid":"a569-6"},"a569-9":{"renderedLength":3529,"gzipLength":1015,"brotliLength":861,"mainUid":"a569-8"},"a569-11":{"renderedLength":1487,"gzipLength":501,"brotliLength":423,"mainUid":"a569-10"},"a569-13":{"renderedLength":3161,"gzipLength":952,"brotliLength":853,"mainUid":"a569-12"},"a569-15":{"renderedLength":1965,"gzipLength":655,"brotliLength":544,"mainUid":"a569-14"},"a569-17":{"renderedLength":1624,"gzipLength":580,"brotliLength":482,"mainUid":"a569-16"},"a569-19":{"renderedLength":1553,"gzipLength":579,"brotliLength":461,"mainUid":"a569-18"},"a569-21":{"renderedLength":1229,"gzipLength":496,"brotliLength":424,"mainUid":"a569-20"},"a569-23":{"renderedLength":600,"gzipLength":308,"brotliLength":267,"mainUid":"a569-22"},"a569-25":{"renderedLength":2930,"gzipLength":953,"brotliLength":816,"mainUid":"a569-24"},"a569-27":{"renderedLength":561,"gzipLength":301,"brotliLength":259,"mainUid":"a569-26"},"a569-29":{"renderedLength":513,"gzipLength":301,"brotliLength":257,"mainUid":"a569-28"},"a569-31":{"renderedLength":2324,"gzipLength":584,"brotliLength":495,"mainUid":"a569-30"},"a569-33":{"renderedLength":312,"gzipLength":199,"brotliLength":173,"mainUid":"a569-32"},"a569-35":{"renderedLength":908,"gzipLength":382,"brotliLength":319,"mainUid":"a569-34"},"a569-37":{"renderedLength":1575,"gzipLength":640,"brotliLength":536,"mainUid":"a569-36"},"a569-39":{"renderedLength":778,"gzipLength":391,"brotliLength":329,"mainUid":"a569-38"},"a569-41":{"renderedLength":2891,"gzipLength":854,"brotliLength":780,"mainUid":"a569-40"},"a569-43":{"renderedLength":820,"gzipLength":397,"brotliLength":349,"mainUid":"a569-42"},"a569-45":{"renderedLength":257,"gzipLength":185,"brotliLength":149,"mainUid":"a569-44"},"a569-47":{"renderedLength":285,"gzipLength":198,"brotliLength":170,"mainUid":"a569-46"},"a569-49":{"renderedLength":695,"gzipLength":349,"brotliLength":295,"mainUid":"a569-48"},"a569-51":{"renderedLength":622,"gzipLength":322,"brotliLength":269,"mainUid":"a569-50"},"a569-53":{"renderedLength":414,"gzipLength":259,"brotliLength":219,"mainUid":"a569-52"},"a569-55":{"renderedLength":702,"gzipLength":369,"brotliLength":330,"mainUid":"a569-54"},"a569-57":{"renderedLength":782,"gzipLength":409,"brotliLength":345,"mainUid":"a569-56"},"a569-59":{"renderedLength":717,"gzipLength":372,"brotliLength":319,"mainUid":"a569-58"},"a569-61":{"renderedLength":403,"gzipLength":244,"brotliLength":195,"mainUid":"a569-60"},"a569-63":{"renderedLength":483,"gzipLength":251,"brotliLength":208,"mainUid":"a569-62"},"a569-65":{"renderedLength":1144,"gzipLength":532,"brotliLength":462,"mainUid":"a569-64"},"a569-67":{"renderedLength":1135,"gzipLength":505,"brotliLength":415,"mainUid":"a569-66"},"a569-69":{"renderedLength":80,"gzipLength":92,"brotliLength":72,"mainUid":"a569-68"},"a569-71":{"renderedLength":2155,"gzipLength":764,"brotliLength":660,"mainUid":"a569-70"},"a569-73":{"renderedLength":538,"gzipLength":261,"brotliLength":211,"mainUid":"a569-72"},"a569-75":{"renderedLength":78,"gzipLength":92,"brotliLength":79,"mainUid":"a569-74"},"a569-77":{"renderedLength":426,"gzipLength":286,"brotliLength":244,"mainUid":"a569-76"},"a569-79":{"renderedLength":424,"gzipLength":285,"brotliLength":257,"mainUid":"a569-78"},"a569-81":{"renderedLength":1713,"gzipLength":689,"brotliLength":585,"mainUid":"a569-80"},"a569-83":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"a569-82"}},"nodeMetas":{"a569-0":{"id":"/src/index.ts","moduleParts":{"index.js":"a569-1"},"imported":[{"uid":"a569-84"},{"uid":"a569-85"},{"uid":"a569-86"},{"uid":"a569-87"},{"uid":"a569-88"},{"uid":"a569-89"},{"uid":"a569-90"},{"uid":"a569-91"},{"uid":"a569-92"},{"uid":"a569-93"},{"uid":"a569-94"},{"uid":"a569-95"},{"uid":"a569-96"},{"uid":"a569-97"},{"uid":"a569-98"},{"uid":"a569-99"}],"importedBy":[],"isEntry":true},"a569-2":{"id":"/src/step/useStep.ts","moduleParts":{"step/useStep.js":"a569-3"},"imported":[{"uid":"a569-100"},{"uid":"a569-68"}],"importedBy":[{"uid":"a569-99"},{"uid":"a569-6"}]},"a569-4":{"id":"/src/step/Step.tsx","moduleParts":{"step/Step.js":"a569-5"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"}],"importedBy":[{"uid":"a569-99"},{"uid":"a569-8"}]},"a569-6":{"id":"/src/step/FormStep.tsx","moduleParts":{"step/FormStep.js":"a569-7"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-2"}],"importedBy":[{"uid":"a569-99"},{"uid":"a569-8"}]},"a569-8":{"id":"/src/step/StepProvider.tsx","moduleParts":{"step/StepProvider.js":"a569-9"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-117"},{"uid":"a569-103"},{"uid":"a569-6"},{"uid":"a569-4"},{"uid":"a569-68"}],"importedBy":[{"uid":"a569-99"}]},"a569-10":{"id":"/src/inputs/MaskedInput/useMaskedInput.ts","moduleParts":{"inputs/MaskedInput/useMaskedInput.js":"a569-11"},"imported":[{"uid":"a569-102"},{"uid":"a569-109"},{"uid":"a569-100"},{"uid":"a569-110"}],"importedBy":[{"uid":"a569-91"},{"uid":"a569-28"},{"uid":"a569-64"},{"uid":"a569-80"}]},"a569-12":{"id":"/src/date/LocalDatePicker/LocalDatePicker.tsx","moduleParts":{"date/LocalDatePicker/LocalDatePicker.js":"a569-13"},"imported":[{"uid":"a569-100"},{"uid":"a569-101"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-104"},{"uid":"a569-72"},{"uid":"a569-76"}],"importedBy":[{"uid":"a569-84"}]},"a569-14":{"id":"/src/date/MonthDayPicker/MonthDayPicker.tsx","moduleParts":{"date/MonthDayPicker/MonthDayPicker.js":"a569-15"},"imported":[{"uid":"a569-100"},{"uid":"a569-101"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-104"}],"importedBy":[{"uid":"a569-87"}]},"a569-16":{"id":"/src/date/LocalTimePicker/LocalTimePicker.tsx","moduleParts":{"date/LocalTimePicker/LocalTimePicker.js":"a569-17"},"imported":[{"uid":"a569-100"},{"uid":"a569-105"},{"uid":"a569-101"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-104"},{"uid":"a569-78"}],"importedBy":[{"uid":"a569-86"}]},"a569-18":{"id":"/src/date/YearSelect/YearSelect.tsx","moduleParts":{"date/YearSelect/YearSelect.js":"a569-19"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-89"}]},"a569-20":{"id":"/src/date/MonthYearPicker/MonthYearPicker.tsx","moduleParts":{"date/MonthYearPicker/MonthYearPicker.js":"a569-21"},"imported":[{"uid":"a569-100"},{"uid":"a569-105"},{"uid":"a569-101"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-104"}],"importedBy":[{"uid":"a569-88"}]},"a569-22":{"id":"/src/form/TForm/TForm.tsx","moduleParts":{"form/TForm/TForm.js":"a569-23"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-106"},{"uid":"a569-24"}],"importedBy":[{"uid":"a569-90"}]},"a569-24":{"id":"/src/form/TForm/useTForm.tsx","moduleParts":{"form/TForm/useTForm.js":"a569-25"},"imported":[{"uid":"a569-100"},{"uid":"a569-107"},{"uid":"a569-106"},{"uid":"a569-108"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-90"},{"uid":"a569-22"}]},"a569-26":{"id":"/src/inputs/RadioGroup/RadioGroup.tsx","moduleParts":{"inputs/RadioGroup/RadioGroup.js":"a569-27"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-92"}]},"a569-28":{"id":"/src/inputs/MaskedInput/MaskedInput.tsx","moduleParts":{"inputs/MaskedInput/MaskedInput.js":"a569-29"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-10"}],"importedBy":[{"uid":"a569-91"}]},"a569-30":{"id":"/src/inputs/CreditCardInput/CreditCardInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardInput.js":"a569-31"},"imported":[{"uid":"a569-100"},{"uid":"a569-101"},{"uid":"a569-102"},{"uid":"a569-111"},{"uid":"a569-112"},{"uid":"a569-103"},{"uid":"a569-88"},{"uid":"a569-80"},{"uid":"a569-74"}],"importedBy":[{"uid":"a569-94"}]},"a569-32":{"id":"/src/inputs/TableInput/addRowOnTab.ts","moduleParts":{"inputs/TableInput/addRowOnTab.js":"a569-33"},"imported":[],"importedBy":[{"uid":"a569-96"},{"uid":"a569-42"},{"uid":"a569-54"},{"uid":"a569-56"},{"uid":"a569-58"}]},"a569-34":{"id":"/src/inputs/PhoneInput/PhoneInput.tsx","moduleParts":{"inputs/PhoneInput/PhoneInput.js":"a569-35"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-91"}],"importedBy":[{"uid":"a569-93"}]},"a569-36":{"id":"/src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","moduleParts":{"money/MoneyCurrencyInput/MoneyCurrencyInput.js":"a569-37"},"imported":[{"uid":"a569-100"},{"uid":"a569-115"},{"uid":"a569-102"},{"uid":"a569-116"},{"uid":"a569-103"},{"uid":"a569-70"}],"importedBy":[{"uid":"a569-98"}]},"a569-38":{"id":"/src/money/MoneyInput/MoneyInput.tsx","moduleParts":{"money/MoneyInput/MoneyInput.js":"a569-39"},"imported":[{"uid":"a569-100"},{"uid":"a569-115"},{"uid":"a569-102"},{"uid":"a569-116"},{"uid":"a569-103"},{"uid":"a569-70"}],"importedBy":[{"uid":"a569-97"}]},"a569-40":{"id":"/src/inputs/TableInput/TableInput.tsx","moduleParts":{"inputs/TableInput/TableInput.js":"a569-41"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-106"},{"uid":"a569-114"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-96"}]},"a569-42":{"id":"/src/inputs/TableInput/MoneyEditCell.tsx","moduleParts":{"inputs/TableInput/MoneyEditCell.js":"a569-43"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-97"},{"uid":"a569-32"}],"importedBy":[{"uid":"a569-96"}]},"a569-44":{"id":"/src/inputs/TableInput/MoneyCell.tsx","moduleParts":{"inputs/TableInput/MoneyCell.js":"a569-45"},"imported":[{"uid":"a569-100"},{"uid":"a569-115"}],"importedBy":[{"uid":"a569-96"}]},"a569-46":{"id":"/src/inputs/TableInput/LocalDateCell.tsx","moduleParts":{"inputs/TableInput/LocalDateCell.js":"a569-47"},"imported":[{"uid":"a569-100"},{"uid":"a569-101"}],"importedBy":[{"uid":"a569-96"}]},"a569-48":{"id":"/src/inputs/TableInput/LocalDateEditCell.tsx","moduleParts":{"inputs/TableInput/LocalDateEditCell.js":"a569-49"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-84"}],"importedBy":[{"uid":"a569-96"}]},"a569-50":{"id":"/src/inputs/TableInput/LocalTimeEditCell.tsx","moduleParts":{"inputs/TableInput/LocalTimeEditCell.js":"a569-51"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-86"}],"importedBy":[{"uid":"a569-96"}]},"a569-52":{"id":"/src/inputs/TableInput/MoneySumFooter.tsx","moduleParts":{"inputs/TableInput/MoneySumFooter.js":"a569-53"},"imported":[{"uid":"a569-100"},{"uid":"a569-115"}],"importedBy":[{"uid":"a569-96"}]},"a569-54":{"id":"/src/inputs/TableInput/CheckboxEditCell.tsx","moduleParts":{"inputs/TableInput/CheckboxEditCell.js":"a569-55"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-32"}],"importedBy":[{"uid":"a569-96"}]},"a569-56":{"id":"/src/inputs/TableInput/NumberEditCell.tsx","moduleParts":{"inputs/TableInput/NumberEditCell.js":"a569-57"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-32"}],"importedBy":[{"uid":"a569-96"}]},"a569-58":{"id":"/src/inputs/TableInput/StringEditCell.tsx","moduleParts":{"inputs/TableInput/StringEditCell.js":"a569-59"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-32"}],"importedBy":[{"uid":"a569-96"}]},"a569-60":{"id":"/src/inputs/TableInput/HoverCell.tsx","moduleParts":{"inputs/TableInput/HoverCell.js":"a569-61"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"}],"importedBy":[{"uid":"a569-96"}]},"a569-62":{"id":"/src/inputs/TableInput/DropdownCell.tsx","moduleParts":{"inputs/TableInput/DropdownCell.js":"a569-63"},"imported":[{"uid":"a569-100"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-96"}]},"a569-64":{"id":"/src/inputs/SinInput/SinInput.tsx","moduleParts":{"inputs/SinInput/SinInput.js":"a569-65"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-103"},{"uid":"a569-113"},{"uid":"a569-10"}],"importedBy":[{"uid":"a569-95"}]},"a569-66":{"id":"/src/date/LocalMonthSelect/LocalMonthSelect.tsx","moduleParts":{"date/LocalMonthSelect/LocalMonthSelect.js":"a569-67"},"imported":[{"uid":"a569-100"},{"uid":"a569-105"},{"uid":"a569-102"},{"uid":"a569-103"}],"importedBy":[{"uid":"a569-85"}]},"a569-68":{"id":"/src/step/stepContext.ts","moduleParts":{"step/stepContext.js":"a569-69"},"imported":[{"uid":"a569-100"}],"importedBy":[{"uid":"a569-2"},{"uid":"a569-8"}]},"a569-70":{"id":"/src/money/useMoneyInput.ts","moduleParts":{"money/useMoneyInput.js":"a569-71"},"imported":[{"uid":"a569-115"},{"uid":"a569-102"},{"uid":"a569-109"},{"uid":"a569-116"},{"uid":"a569-100"}],"importedBy":[{"uid":"a569-38"},{"uid":"a569-36"}]},"a569-72":{"id":"/src/date/DatePicker/styles.css","moduleParts":{"date/DatePicker/styles.css.js":"a569-73"},"imported":[{"uid":"a569-82"}],"importedBy":[{"uid":"a569-12"},{"uid":"a569-104"}]},"a569-74":{"id":"/src/inputs/CreditCardInput/styles.css","moduleParts":{"inputs/CreditCardInput/styles.css.js":"a569-75"},"imported":[{"uid":"a569-82"}],"importedBy":[{"uid":"a569-30"}]},"a569-76":{"id":"/src/date/LocalDatePicker/MaskedDateInput.tsx","moduleParts":{"date/LocalDatePicker/MaskedDateInput.js":"a569-77"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-91"}],"importedBy":[{"uid":"a569-12"}]},"a569-78":{"id":"/src/date/LocalTimePicker/MaskedTimeInput.tsx","moduleParts":{"date/LocalTimePicker/MaskedTimeInput.js":"a569-79"},"imported":[{"uid":"a569-100"},{"uid":"a569-102"},{"uid":"a569-91"}],"importedBy":[{"uid":"a569-16"}]},"a569-80":{"id":"/src/inputs/CreditCardInput/CreditCardNumberInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardNumberInput.js":"a569-81"},"imported":[{"uid":"a569-100"},{"uid":"a569-119"},{"uid":"a569-102"},{"uid":"a569-120"},{"uid":"a569-103"},{"uid":"a569-10"}],"importedBy":[{"uid":"a569-30"}]},"a569-82":{"id":"/home/runner/work/thr-addons/thr-addons/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"a569-83"},"imported":[],"importedBy":[{"uid":"a569-72"},{"uid":"a569-74"}]},"a569-84":{"id":"/src/date/LocalDatePicker/index.ts","moduleParts":{},"imported":[{"uid":"a569-12"}],"importedBy":[{"uid":"a569-0"},{"uid":"a569-48"}]},"a569-85":{"id":"/src/date/LocalMonthSelect/index.ts","moduleParts":{},"imported":[{"uid":"a569-66"}],"importedBy":[{"uid":"a569-0"}]},"a569-86":{"id":"/src/date/LocalTimePicker/index.ts","moduleParts":{},"imported":[{"uid":"a569-16"}],"importedBy":[{"uid":"a569-0"},{"uid":"a569-50"}]},"a569-87":{"id":"/src/date/MonthDayPicker/index.ts","moduleParts":{},"imported":[{"uid":"a569-14"}],"importedBy":[{"uid":"a569-0"}]},"a569-88":{"id":"/src/date/MonthYearPicker/index.ts","moduleParts":{},"imported":[{"uid":"a569-20"}],"importedBy":[{"uid":"a569-0"},{"uid":"a569-30"}]},"a569-89":{"id":"/src/date/YearSelect/index.ts","moduleParts":{},"imported":[{"uid":"a569-18"}],"importedBy":[{"uid":"a569-0"}]},"a569-90":{"id":"/src/form/TForm/index.ts","moduleParts":{},"imported":[{"uid":"a569-22"},{"uid":"a569-24"}],"importedBy":[{"uid":"a569-0"}]},"a569-91":{"id":"/src/inputs/MaskedInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-28"},{"uid":"a569-10"}],"importedBy":[{"uid":"a569-0"},{"uid":"a569-34"},{"uid":"a569-76"},{"uid":"a569-78"}]},"a569-92":{"id":"/src/inputs/RadioGroup/index.ts","moduleParts":{},"imported":[{"uid":"a569-26"}],"importedBy":[{"uid":"a569-0"}]},"a569-93":{"id":"/src/inputs/PhoneInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-34"}],"importedBy":[{"uid":"a569-0"}]},"a569-94":{"id":"/src/inputs/CreditCardInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-30"}],"importedBy":[{"uid":"a569-0"}]},"a569-95":{"id":"/src/inputs/SinInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-64"}],"importedBy":[{"uid":"a569-0"}]},"a569-96":{"id":"/src/inputs/TableInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-40"},{"uid":"a569-44"},{"uid":"a569-42"},{"uid":"a569-46"},{"uid":"a569-54"},{"uid":"a569-48"},{"uid":"a569-50"},{"uid":"a569-52"},{"uid":"a569-56"},{"uid":"a569-58"},{"uid":"a569-62"},{"uid":"a569-60"},{"uid":"a569-32"}],"importedBy":[{"uid":"a569-0"}]},"a569-97":{"id":"/src/money/MoneyInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-38"}],"importedBy":[{"uid":"a569-0"},{"uid":"a569-42"}]},"a569-98":{"id":"/src/money/MoneyCurrencyInput/index.ts","moduleParts":{},"imported":[{"uid":"a569-36"}],"importedBy":[{"uid":"a569-0"}]},"a569-99":{"id":"/src/step/index.ts","moduleParts":{},"imported":[{"uid":"a569-4"},{"uid":"a569-2"},{"uid":"a569-6"},{"uid":"a569-8"}],"importedBy":[{"uid":"a569-0"}]},"a569-100":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-12"},{"uid":"a569-66"},{"uid":"a569-16"},{"uid":"a569-14"},{"uid":"a569-20"},{"uid":"a569-18"},{"uid":"a569-22"},{"uid":"a569-24"},{"uid":"a569-28"},{"uid":"a569-10"},{"uid":"a569-26"},{"uid":"a569-34"},{"uid":"a569-30"},{"uid":"a569-64"},{"uid":"a569-40"},{"uid":"a569-44"},{"uid":"a569-42"},{"uid":"a569-46"},{"uid":"a569-54"},{"uid":"a569-48"},{"uid":"a569-50"},{"uid":"a569-52"},{"uid":"a569-56"},{"uid":"a569-58"},{"uid":"a569-62"},{"uid":"a569-60"},{"uid":"a569-38"},{"uid":"a569-36"},{"uid":"a569-4"},{"uid":"a569-2"},{"uid":"a569-6"},{"uid":"a569-8"},{"uid":"a569-76"},{"uid":"a569-78"},{"uid":"a569-80"},{"uid":"a569-70"},{"uid":"a569-68"}],"isExternal":true},"a569-101":{"id":"@thx/date","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-12"},{"uid":"a569-16"},{"uid":"a569-14"},{"uid":"a569-20"},{"uid":"a569-30"},{"uid":"a569-46"}],"isExternal":true},"a569-102":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-12"},{"uid":"a569-66"},{"uid":"a569-16"},{"uid":"a569-14"},{"uid":"a569-20"},{"uid":"a569-18"},{"uid":"a569-22"},{"uid":"a569-28"},{"uid":"a569-10"},{"uid":"a569-26"},{"uid":"a569-34"},{"uid":"a569-30"},{"uid":"a569-64"},{"uid":"a569-40"},{"uid":"a569-42"},{"uid":"a569-54"},{"uid":"a569-48"},{"uid":"a569-50"},{"uid":"a569-56"},{"uid":"a569-58"},{"uid":"a569-60"},{"uid":"a569-38"},{"uid":"a569-36"},{"uid":"a569-4"},{"uid":"a569-6"},{"uid":"a569-8"},{"uid":"a569-76"},{"uid":"a569-78"},{"uid":"a569-80"},{"uid":"a569-70"}],"isExternal":true},"a569-103":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-12"},{"uid":"a569-66"},{"uid":"a569-16"},{"uid":"a569-14"},{"uid":"a569-20"},{"uid":"a569-18"},{"uid":"a569-24"},{"uid":"a569-26"},{"uid":"a569-34"},{"uid":"a569-30"},{"uid":"a569-64"},{"uid":"a569-40"},{"uid":"a569-54"},{"uid":"a569-56"},{"uid":"a569-58"},{"uid":"a569-62"},{"uid":"a569-38"},{"uid":"a569-36"},{"uid":"a569-8"},{"uid":"a569-80"}],"isExternal":true},"a569-104":{"id":"/src/date/DatePicker/index.ts","moduleParts":{},"imported":[{"uid":"a569-118"},{"uid":"a569-72"}],"importedBy":[{"uid":"a569-12"},{"uid":"a569-16"},{"uid":"a569-14"},{"uid":"a569-20"}]},"a569-105":{"id":"@js-joda/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-66"},{"uid":"a569-16"},{"uid":"a569-20"}],"isExternal":true},"a569-106":{"id":"formik","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-22"},{"uid":"a569-24"},{"uid":"a569-40"}],"isExternal":true},"a569-107":{"id":"flat","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-24"}],"isExternal":true},"a569-108":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-24"}],"isExternal":true},"a569-109":{"id":"inputmask","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-10"},{"uid":"a569-70"}],"isExternal":true},"a569-110":{"id":"use-deep-compare-effect","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-10"}],"isExternal":true},"a569-111":{"id":"react-credit-cards","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-30"}],"isExternal":true},"a569-112":{"id":"react-credit-cards/es/styles-compiled.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-30"}],"isExternal":true},"a569-113":{"id":"social-insurance-number","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-64"}],"isExternal":true},"a569-114":{"id":"react-table","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-40"}],"isExternal":true},"a569-115":{"id":"@thx/money","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-44"},{"uid":"a569-52"},{"uid":"a569-38"},{"uid":"a569-36"},{"uid":"a569-70"}],"isExternal":true},"a569-116":{"id":"js-money","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-38"},{"uid":"a569-36"},{"uid":"a569-70"}],"isExternal":true},"a569-117":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-8"}],"isExternal":true},"a569-118":{"id":"react-datepicker","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-104"}],"isExternal":true},"a569-119":{"id":"credit-card-type","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-80"}],"isExternal":true},"a569-120":{"id":"luhn","moduleParts":{},"imported":[],"importedBy":[{"uid":"a569-80"}],"isExternal":true}},"env":{"rollup":"2.79.2"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
2672
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src/index.ts","uid":"82a0-1"}]},{"name":"step/useStep.js","children":[{"name":"src/step/useStep.ts","uid":"82a0-3"}]},{"name":"step/Step.js","children":[{"name":"src/step/Step.tsx","uid":"82a0-5"}]},{"name":"step/FormStep.js","children":[{"name":"src/step/FormStep.tsx","uid":"82a0-7"}]},{"name":"step/StepProvider.js","children":[{"name":"src/step/StepProvider.tsx","uid":"82a0-9"}]},{"name":"inputs/MaskedInput/useMaskedInput.js","children":[{"name":"src/inputs/MaskedInput/useMaskedInput.ts","uid":"82a0-11"}]},{"name":"date/LocalDatePicker/LocalDatePicker.js","children":[{"name":"src/date/LocalDatePicker/LocalDatePicker.tsx","uid":"82a0-13"}]},{"name":"date/LocalMonthSelect/LocalMonthSelect.js","children":[{"name":"src/date/LocalMonthSelect/LocalMonthSelect.tsx","uid":"82a0-15"}]},{"name":"date/LocalTimePicker/LocalTimePicker.js","children":[{"name":"src/date/LocalTimePicker/LocalTimePicker.tsx","uid":"82a0-17"}]},{"name":"date/MonthYearPicker/MonthYearPicker.js","children":[{"name":"src/date/MonthYearPicker/MonthYearPicker.tsx","uid":"82a0-19"}]},{"name":"date/MonthDayPicker/MonthDayPicker.js","children":[{"name":"src/date/MonthDayPicker/MonthDayPicker.tsx","uid":"82a0-21"}]},{"name":"form/TForm/useTForm.js","children":[{"name":"src/form/TForm/useTForm.tsx","uid":"82a0-23"}]},{"name":"form/TForm/TForm.js","children":[{"name":"src/form/TForm/TForm.tsx","uid":"82a0-25"}]},{"name":"inputs/Scriptel/Scriptel.js","children":[{"name":"src/inputs/Scriptel/Scriptel.tsx","uid":"82a0-27"}]},{"name":"inputs/Scriptel/withScriptel.js","children":[{"name":"src/inputs/Scriptel/withScriptel.tsx","uid":"82a0-29"}]},{"name":"date/YearSelect/YearSelect.js","children":[{"name":"src/date/YearSelect/YearSelect.tsx","uid":"82a0-31"}]},{"name":"inputs/MaskedInput/MaskedInput.js","children":[{"name":"src/inputs/MaskedInput/MaskedInput.tsx","uid":"82a0-33"}]},{"name":"inputs/RadioGroup/RadioGroup.js","children":[{"name":"src/inputs/RadioGroup/RadioGroup.tsx","uid":"82a0-35"}]},{"name":"inputs/ScriptelInput/ScriptelInput.js","children":[{"name":"src/inputs/ScriptelInput/ScriptelInput.tsx","uid":"82a0-37"}]},{"name":"inputs/PhoneInput/PhoneInput.js","children":[{"name":"src/inputs/PhoneInput/PhoneInput.tsx","uid":"82a0-39"}]},{"name":"inputs/SinInput/SinInput.js","children":[{"name":"src/inputs/SinInput/SinInput.tsx","uid":"82a0-41"}]},{"name":"inputs/TableInput/addRowOnTab.js","children":[{"name":"src/inputs/TableInput/addRowOnTab.ts","uid":"82a0-43"}]},{"name":"inputs/CreditCardInput/CreditCardInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardInput.tsx","uid":"82a0-45"}]},{"name":"inputs/TableInput/TableInput.js","children":[{"name":"src/inputs/TableInput/TableInput.tsx","uid":"82a0-47"}]},{"name":"inputs/TableInput/MoneyCell.js","children":[{"name":"src/inputs/TableInput/MoneyCell.tsx","uid":"82a0-49"}]},{"name":"inputs/TableInput/MoneyEditCell.js","children":[{"name":"src/inputs/TableInput/MoneyEditCell.tsx","uid":"82a0-51"}]},{"name":"inputs/TableInput/LocalDateCell.js","children":[{"name":"src/inputs/TableInput/LocalDateCell.tsx","uid":"82a0-53"}]},{"name":"inputs/TableInput/CheckboxEditCell.js","children":[{"name":"src/inputs/TableInput/CheckboxEditCell.tsx","uid":"82a0-55"}]},{"name":"inputs/TableInput/LocalDateEditCell.js","children":[{"name":"src/inputs/TableInput/LocalDateEditCell.tsx","uid":"82a0-57"}]},{"name":"inputs/TableInput/LocalTimeEditCell.js","children":[{"name":"src/inputs/TableInput/LocalTimeEditCell.tsx","uid":"82a0-59"}]},{"name":"inputs/TableInput/MoneySumFooter.js","children":[{"name":"src/inputs/TableInput/MoneySumFooter.tsx","uid":"82a0-61"}]},{"name":"inputs/TableInput/NumberEditCell.js","children":[{"name":"src/inputs/TableInput/NumberEditCell.tsx","uid":"82a0-63"}]},{"name":"inputs/TableInput/StringEditCell.js","children":[{"name":"src/inputs/TableInput/StringEditCell.tsx","uid":"82a0-65"}]},{"name":"inputs/TableInput/HoverCell.js","children":[{"name":"src/inputs/TableInput/HoverCell.tsx","uid":"82a0-67"}]},{"name":"inputs/TableInput/DropdownCell.js","children":[{"name":"src/inputs/TableInput/DropdownCell.tsx","uid":"82a0-69"}]},{"name":"money/MoneyCurrencyInput/MoneyCurrencyInput.js","children":[{"name":"src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","uid":"82a0-71"}]},{"name":"money/MoneyInput/MoneyInput.js","children":[{"name":"src/money/MoneyInput/MoneyInput.tsx","uid":"82a0-73"}]},{"name":"inputs/Scriptel/scriptel/enums.js","children":[{"name":"src/inputs/Scriptel/scriptel/enums.ts","uid":"82a0-75"}]},{"name":"step/stepContext.js","children":[{"name":"src/step/stepContext.ts","uid":"82a0-77"}]},{"name":"date/DatePicker/styles.css.js","children":[{"name":"src/date/DatePicker/styles.css","uid":"82a0-79"}]},{"name":"inputs/CreditCardInput/styles.css.js","children":[{"name":"src/inputs/CreditCardInput/styles.css","uid":"82a0-81"}]},{"name":"inputs/Scriptel/ScriptelContext.js","children":[{"name":"src/inputs/Scriptel/ScriptelContext.ts","uid":"82a0-83"}]},{"name":"date/LocalTimePicker/MaskedTimeInput.js","children":[{"name":"src/date/LocalTimePicker/MaskedTimeInput.tsx","uid":"82a0-85"}]},{"name":"money/useMoneyInput.js","children":[{"name":"src/money/useMoneyInput.ts","uid":"82a0-87"}]},{"name":"date/LocalDatePicker/MaskedDateInput.js","children":[{"name":"src/date/LocalDatePicker/MaskedDateInput.tsx","uid":"82a0-89"}]},{"name":"inputs/CreditCardInput/CreditCardNumberInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardNumberInput.tsx","uid":"82a0-91"}]},{"name":"inputs/Scriptel/scriptel/index.js","children":[{"name":"src/inputs/Scriptel/scriptel/index.ts","uid":"82a0-93"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/artemis/GitHub/thr-addons/node_modules/style-inject/dist/style-inject.es.js","uid":"82a0-95"}]}],"isRoot":true},"nodeParts":{"82a0-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"82a0-0"},"82a0-3":{"renderedLength":113,"gzipLength":107,"brotliLength":82,"mainUid":"82a0-2"},"82a0-5":{"renderedLength":203,"gzipLength":155,"brotliLength":111,"mainUid":"82a0-4"},"82a0-7":{"renderedLength":440,"gzipLength":270,"brotliLength":214,"mainUid":"82a0-6"},"82a0-9":{"renderedLength":3529,"gzipLength":1015,"brotliLength":861,"mainUid":"82a0-8"},"82a0-11":{"renderedLength":1487,"gzipLength":501,"brotliLength":423,"mainUid":"82a0-10"},"82a0-13":{"renderedLength":3161,"gzipLength":952,"brotliLength":853,"mainUid":"82a0-12"},"82a0-15":{"renderedLength":1135,"gzipLength":505,"brotliLength":415,"mainUid":"82a0-14"},"82a0-17":{"renderedLength":1624,"gzipLength":580,"brotliLength":482,"mainUid":"82a0-16"},"82a0-19":{"renderedLength":1229,"gzipLength":496,"brotliLength":424,"mainUid":"82a0-18"},"82a0-21":{"renderedLength":1965,"gzipLength":655,"brotliLength":544,"mainUid":"82a0-20"},"82a0-23":{"renderedLength":2930,"gzipLength":953,"brotliLength":816,"mainUid":"82a0-22"},"82a0-25":{"renderedLength":600,"gzipLength":308,"brotliLength":267,"mainUid":"82a0-24"},"82a0-27":{"renderedLength":1275,"gzipLength":474,"brotliLength":406,"mainUid":"82a0-26"},"82a0-29":{"renderedLength":275,"gzipLength":163,"brotliLength":130,"mainUid":"82a0-28"},"82a0-31":{"renderedLength":1553,"gzipLength":579,"brotliLength":461,"mainUid":"82a0-30"},"82a0-33":{"renderedLength":513,"gzipLength":301,"brotliLength":257,"mainUid":"82a0-32"},"82a0-35":{"renderedLength":561,"gzipLength":301,"brotliLength":259,"mainUid":"82a0-34"},"82a0-37":{"renderedLength":1963,"gzipLength":647,"brotliLength":547,"mainUid":"82a0-36"},"82a0-39":{"renderedLength":908,"gzipLength":382,"brotliLength":319,"mainUid":"82a0-38"},"82a0-41":{"renderedLength":1144,"gzipLength":532,"brotliLength":462,"mainUid":"82a0-40"},"82a0-43":{"renderedLength":312,"gzipLength":199,"brotliLength":173,"mainUid":"82a0-42"},"82a0-45":{"renderedLength":2324,"gzipLength":584,"brotliLength":495,"mainUid":"82a0-44"},"82a0-47":{"renderedLength":2891,"gzipLength":854,"brotliLength":780,"mainUid":"82a0-46"},"82a0-49":{"renderedLength":257,"gzipLength":185,"brotliLength":149,"mainUid":"82a0-48"},"82a0-51":{"renderedLength":820,"gzipLength":397,"brotliLength":349,"mainUid":"82a0-50"},"82a0-53":{"renderedLength":285,"gzipLength":198,"brotliLength":170,"mainUid":"82a0-52"},"82a0-55":{"renderedLength":702,"gzipLength":369,"brotliLength":330,"mainUid":"82a0-54"},"82a0-57":{"renderedLength":695,"gzipLength":349,"brotliLength":295,"mainUid":"82a0-56"},"82a0-59":{"renderedLength":622,"gzipLength":322,"brotliLength":269,"mainUid":"82a0-58"},"82a0-61":{"renderedLength":414,"gzipLength":259,"brotliLength":219,"mainUid":"82a0-60"},"82a0-63":{"renderedLength":782,"gzipLength":409,"brotliLength":345,"mainUid":"82a0-62"},"82a0-65":{"renderedLength":717,"gzipLength":372,"brotliLength":319,"mainUid":"82a0-64"},"82a0-67":{"renderedLength":403,"gzipLength":244,"brotliLength":195,"mainUid":"82a0-66"},"82a0-69":{"renderedLength":493,"gzipLength":255,"brotliLength":211,"mainUid":"82a0-68"},"82a0-71":{"renderedLength":1575,"gzipLength":640,"brotliLength":536,"mainUid":"82a0-70"},"82a0-73":{"renderedLength":778,"gzipLength":391,"brotliLength":329,"mainUid":"82a0-72"},"82a0-75":{"renderedLength":937,"gzipLength":292,"brotliLength":231,"mainUid":"82a0-74"},"82a0-77":{"renderedLength":80,"gzipLength":92,"brotliLength":72,"mainUid":"82a0-76"},"82a0-79":{"renderedLength":538,"gzipLength":261,"brotliLength":211,"mainUid":"82a0-78"},"82a0-81":{"renderedLength":78,"gzipLength":92,"brotliLength":79,"mainUid":"82a0-80"},"82a0-83":{"renderedLength":46,"gzipLength":60,"brotliLength":45,"mainUid":"82a0-82"},"82a0-85":{"renderedLength":424,"gzipLength":285,"brotliLength":257,"mainUid":"82a0-84"},"82a0-87":{"renderedLength":2155,"gzipLength":764,"brotliLength":660,"mainUid":"82a0-86"},"82a0-89":{"renderedLength":426,"gzipLength":286,"brotliLength":244,"mainUid":"82a0-88"},"82a0-91":{"renderedLength":1713,"gzipLength":689,"brotliLength":585,"mainUid":"82a0-90"},"82a0-93":{"renderedLength":2530,"gzipLength":860,"brotliLength":739,"mainUid":"82a0-92"},"82a0-95":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"82a0-94"}},"nodeMetas":{"82a0-0":{"id":"/src/index.ts","moduleParts":{"index.js":"82a0-1"},"imported":[{"uid":"82a0-96"},{"uid":"82a0-97"},{"uid":"82a0-98"},{"uid":"82a0-99"},{"uid":"82a0-100"},{"uid":"82a0-101"},{"uid":"82a0-102"},{"uid":"82a0-103"},{"uid":"82a0-104"},{"uid":"82a0-105"},{"uid":"82a0-106"},{"uid":"82a0-107"},{"uid":"82a0-108"},{"uid":"82a0-109"},{"uid":"82a0-110"},{"uid":"82a0-111"},{"uid":"82a0-112"},{"uid":"82a0-113"}],"importedBy":[],"isEntry":true},"82a0-2":{"id":"/src/step/useStep.ts","moduleParts":{"step/useStep.js":"82a0-3"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-76"}],"importedBy":[{"uid":"82a0-113"},{"uid":"82a0-6"}]},"82a0-4":{"id":"/src/step/Step.tsx","moduleParts":{"step/Step.js":"82a0-5"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"}],"importedBy":[{"uid":"82a0-113"},{"uid":"82a0-8"}]},"82a0-6":{"id":"/src/step/FormStep.tsx","moduleParts":{"step/FormStep.js":"82a0-7"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-2"}],"importedBy":[{"uid":"82a0-113"},{"uid":"82a0-8"}]},"82a0-8":{"id":"/src/step/StepProvider.tsx","moduleParts":{"step/StepProvider.js":"82a0-9"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-131"},{"uid":"82a0-117"},{"uid":"82a0-6"},{"uid":"82a0-4"},{"uid":"82a0-76"}],"importedBy":[{"uid":"82a0-113"}]},"82a0-10":{"id":"/src/inputs/MaskedInput/useMaskedInput.ts","moduleParts":{"inputs/MaskedInput/useMaskedInput.js":"82a0-11"},"imported":[{"uid":"82a0-116"},{"uid":"82a0-123"},{"uid":"82a0-114"},{"uid":"82a0-124"}],"importedBy":[{"uid":"82a0-103"},{"uid":"82a0-32"},{"uid":"82a0-40"},{"uid":"82a0-90"}]},"82a0-12":{"id":"/src/date/LocalDatePicker/LocalDatePicker.tsx","moduleParts":{"date/LocalDatePicker/LocalDatePicker.js":"82a0-13"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-115"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-118"},{"uid":"82a0-78"},{"uid":"82a0-88"}],"importedBy":[{"uid":"82a0-96"}]},"82a0-14":{"id":"/src/date/LocalMonthSelect/LocalMonthSelect.tsx","moduleParts":{"date/LocalMonthSelect/LocalMonthSelect.js":"82a0-15"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-119"},{"uid":"82a0-116"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-97"}]},"82a0-16":{"id":"/src/date/LocalTimePicker/LocalTimePicker.tsx","moduleParts":{"date/LocalTimePicker/LocalTimePicker.js":"82a0-17"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-119"},{"uid":"82a0-115"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-118"},{"uid":"82a0-84"}],"importedBy":[{"uid":"82a0-98"}]},"82a0-18":{"id":"/src/date/MonthYearPicker/MonthYearPicker.tsx","moduleParts":{"date/MonthYearPicker/MonthYearPicker.js":"82a0-19"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-119"},{"uid":"82a0-115"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-118"}],"importedBy":[{"uid":"82a0-100"}]},"82a0-20":{"id":"/src/date/MonthDayPicker/MonthDayPicker.tsx","moduleParts":{"date/MonthDayPicker/MonthDayPicker.js":"82a0-21"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-115"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-118"}],"importedBy":[{"uid":"82a0-99"}]},"82a0-22":{"id":"/src/form/TForm/useTForm.tsx","moduleParts":{"form/TForm/useTForm.js":"82a0-23"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-121"},{"uid":"82a0-120"},{"uid":"82a0-122"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-102"},{"uid":"82a0-24"}]},"82a0-24":{"id":"/src/form/TForm/TForm.tsx","moduleParts":{"form/TForm/TForm.js":"82a0-25"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-120"},{"uid":"82a0-22"}],"importedBy":[{"uid":"82a0-102"}]},"82a0-26":{"id":"/src/inputs/Scriptel/Scriptel.tsx","moduleParts":{"inputs/Scriptel/Scriptel.js":"82a0-27"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-82"},{"uid":"82a0-92"}],"importedBy":[{"uid":"82a0-105"},{"uid":"82a0-28"}]},"82a0-28":{"id":"/src/inputs/Scriptel/withScriptel.tsx","moduleParts":{"inputs/Scriptel/withScriptel.js":"82a0-29"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-26"}],"importedBy":[{"uid":"82a0-105"}]},"82a0-30":{"id":"/src/date/YearSelect/YearSelect.tsx","moduleParts":{"date/YearSelect/YearSelect.js":"82a0-31"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-101"}]},"82a0-32":{"id":"/src/inputs/MaskedInput/MaskedInput.tsx","moduleParts":{"inputs/MaskedInput/MaskedInput.js":"82a0-33"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-10"}],"importedBy":[{"uid":"82a0-103"}]},"82a0-34":{"id":"/src/inputs/RadioGroup/RadioGroup.tsx","moduleParts":{"inputs/RadioGroup/RadioGroup.js":"82a0-35"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-104"}]},"82a0-36":{"id":"/src/inputs/ScriptelInput/ScriptelInput.tsx","moduleParts":{"inputs/ScriptelInput/ScriptelInput.js":"82a0-37"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-82"}],"importedBy":[{"uid":"82a0-106"}]},"82a0-38":{"id":"/src/inputs/PhoneInput/PhoneInput.tsx","moduleParts":{"inputs/PhoneInput/PhoneInput.js":"82a0-39"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-103"}],"importedBy":[{"uid":"82a0-107"}]},"82a0-40":{"id":"/src/inputs/SinInput/SinInput.tsx","moduleParts":{"inputs/SinInput/SinInput.js":"82a0-41"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-127"},{"uid":"82a0-10"}],"importedBy":[{"uid":"82a0-109"}]},"82a0-42":{"id":"/src/inputs/TableInput/addRowOnTab.ts","moduleParts":{"inputs/TableInput/addRowOnTab.js":"82a0-43"},"imported":[],"importedBy":[{"uid":"82a0-110"},{"uid":"82a0-50"},{"uid":"82a0-54"},{"uid":"82a0-62"},{"uid":"82a0-64"}]},"82a0-44":{"id":"/src/inputs/CreditCardInput/CreditCardInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardInput.js":"82a0-45"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-115"},{"uid":"82a0-116"},{"uid":"82a0-125"},{"uid":"82a0-126"},{"uid":"82a0-117"},{"uid":"82a0-100"},{"uid":"82a0-90"},{"uid":"82a0-80"}],"importedBy":[{"uid":"82a0-108"}]},"82a0-46":{"id":"/src/inputs/TableInput/TableInput.tsx","moduleParts":{"inputs/TableInput/TableInput.js":"82a0-47"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-120"},{"uid":"82a0-128"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-48":{"id":"/src/inputs/TableInput/MoneyCell.tsx","moduleParts":{"inputs/TableInput/MoneyCell.js":"82a0-49"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-129"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-50":{"id":"/src/inputs/TableInput/MoneyEditCell.tsx","moduleParts":{"inputs/TableInput/MoneyEditCell.js":"82a0-51"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-111"},{"uid":"82a0-42"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-52":{"id":"/src/inputs/TableInput/LocalDateCell.tsx","moduleParts":{"inputs/TableInput/LocalDateCell.js":"82a0-53"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-115"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-54":{"id":"/src/inputs/TableInput/CheckboxEditCell.tsx","moduleParts":{"inputs/TableInput/CheckboxEditCell.js":"82a0-55"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-42"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-56":{"id":"/src/inputs/TableInput/LocalDateEditCell.tsx","moduleParts":{"inputs/TableInput/LocalDateEditCell.js":"82a0-57"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-96"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-58":{"id":"/src/inputs/TableInput/LocalTimeEditCell.tsx","moduleParts":{"inputs/TableInput/LocalTimeEditCell.js":"82a0-59"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-98"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-60":{"id":"/src/inputs/TableInput/MoneySumFooter.tsx","moduleParts":{"inputs/TableInput/MoneySumFooter.js":"82a0-61"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-129"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-62":{"id":"/src/inputs/TableInput/NumberEditCell.tsx","moduleParts":{"inputs/TableInput/NumberEditCell.js":"82a0-63"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-42"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-64":{"id":"/src/inputs/TableInput/StringEditCell.tsx","moduleParts":{"inputs/TableInput/StringEditCell.js":"82a0-65"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-117"},{"uid":"82a0-42"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-66":{"id":"/src/inputs/TableInput/HoverCell.tsx","moduleParts":{"inputs/TableInput/HoverCell.js":"82a0-67"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-68":{"id":"/src/inputs/TableInput/DropdownCell.tsx","moduleParts":{"inputs/TableInput/DropdownCell.js":"82a0-69"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-117"}],"importedBy":[{"uid":"82a0-110"}]},"82a0-70":{"id":"/src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","moduleParts":{"money/MoneyCurrencyInput/MoneyCurrencyInput.js":"82a0-71"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-129"},{"uid":"82a0-116"},{"uid":"82a0-130"},{"uid":"82a0-117"},{"uid":"82a0-86"}],"importedBy":[{"uid":"82a0-112"}]},"82a0-72":{"id":"/src/money/MoneyInput/MoneyInput.tsx","moduleParts":{"money/MoneyInput/MoneyInput.js":"82a0-73"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-129"},{"uid":"82a0-116"},{"uid":"82a0-130"},{"uid":"82a0-117"},{"uid":"82a0-86"}],"importedBy":[{"uid":"82a0-111"}]},"82a0-74":{"id":"/src/inputs/Scriptel/scriptel/enums.ts","moduleParts":{"inputs/Scriptel/scriptel/enums.js":"82a0-75"},"imported":[],"importedBy":[{"uid":"82a0-105"},{"uid":"82a0-92"}]},"82a0-76":{"id":"/src/step/stepContext.ts","moduleParts":{"step/stepContext.js":"82a0-77"},"imported":[{"uid":"82a0-114"}],"importedBy":[{"uid":"82a0-2"},{"uid":"82a0-8"}]},"82a0-78":{"id":"/src/date/DatePicker/styles.css","moduleParts":{"date/DatePicker/styles.css.js":"82a0-79"},"imported":[{"uid":"82a0-94"}],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-118"}]},"82a0-80":{"id":"/src/inputs/CreditCardInput/styles.css","moduleParts":{"inputs/CreditCardInput/styles.css.js":"82a0-81"},"imported":[{"uid":"82a0-94"}],"importedBy":[{"uid":"82a0-44"}]},"82a0-82":{"id":"/src/inputs/Scriptel/ScriptelContext.ts","moduleParts":{"inputs/Scriptel/ScriptelContext.js":"82a0-83"},"imported":[{"uid":"82a0-114"}],"importedBy":[{"uid":"82a0-26"},{"uid":"82a0-36"}]},"82a0-84":{"id":"/src/date/LocalTimePicker/MaskedTimeInput.tsx","moduleParts":{"date/LocalTimePicker/MaskedTimeInput.js":"82a0-85"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-103"}],"importedBy":[{"uid":"82a0-16"}]},"82a0-86":{"id":"/src/money/useMoneyInput.ts","moduleParts":{"money/useMoneyInput.js":"82a0-87"},"imported":[{"uid":"82a0-129"},{"uid":"82a0-116"},{"uid":"82a0-123"},{"uid":"82a0-130"},{"uid":"82a0-114"}],"importedBy":[{"uid":"82a0-72"},{"uid":"82a0-70"}]},"82a0-88":{"id":"/src/date/LocalDatePicker/MaskedDateInput.tsx","moduleParts":{"date/LocalDatePicker/MaskedDateInput.js":"82a0-89"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-116"},{"uid":"82a0-103"}],"importedBy":[{"uid":"82a0-12"}]},"82a0-90":{"id":"/src/inputs/CreditCardInput/CreditCardNumberInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardNumberInput.js":"82a0-91"},"imported":[{"uid":"82a0-114"},{"uid":"82a0-134"},{"uid":"82a0-116"},{"uid":"82a0-135"},{"uid":"82a0-117"},{"uid":"82a0-10"}],"importedBy":[{"uid":"82a0-44"}]},"82a0-92":{"id":"/src/inputs/Scriptel/scriptel/index.ts","moduleParts":{"inputs/Scriptel/scriptel/index.js":"82a0-93"},"imported":[{"uid":"82a0-116"},{"uid":"82a0-133"},{"uid":"82a0-74"}],"importedBy":[{"uid":"82a0-26"}]},"82a0-94":{"id":"/home/artemis/GitHub/thr-addons/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"82a0-95"},"imported":[],"importedBy":[{"uid":"82a0-78"},{"uid":"82a0-80"}]},"82a0-96":{"id":"/src/date/LocalDatePicker/index.ts","moduleParts":{},"imported":[{"uid":"82a0-12"}],"importedBy":[{"uid":"82a0-0"},{"uid":"82a0-56"}]},"82a0-97":{"id":"/src/date/LocalMonthSelect/index.ts","moduleParts":{},"imported":[{"uid":"82a0-14"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-98":{"id":"/src/date/LocalTimePicker/index.ts","moduleParts":{},"imported":[{"uid":"82a0-16"}],"importedBy":[{"uid":"82a0-0"},{"uid":"82a0-58"}]},"82a0-99":{"id":"/src/date/MonthDayPicker/index.ts","moduleParts":{},"imported":[{"uid":"82a0-20"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-100":{"id":"/src/date/MonthYearPicker/index.ts","moduleParts":{},"imported":[{"uid":"82a0-18"}],"importedBy":[{"uid":"82a0-0"},{"uid":"82a0-44"}]},"82a0-101":{"id":"/src/date/YearSelect/index.ts","moduleParts":{},"imported":[{"uid":"82a0-30"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-102":{"id":"/src/form/TForm/index.ts","moduleParts":{},"imported":[{"uid":"82a0-24"},{"uid":"82a0-22"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-103":{"id":"/src/inputs/MaskedInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-32"},{"uid":"82a0-10"}],"importedBy":[{"uid":"82a0-0"},{"uid":"82a0-38"},{"uid":"82a0-88"},{"uid":"82a0-84"}]},"82a0-104":{"id":"/src/inputs/RadioGroup/index.ts","moduleParts":{},"imported":[{"uid":"82a0-34"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-105":{"id":"/src/inputs/Scriptel/index.ts","moduleParts":{},"imported":[{"uid":"82a0-26"},{"uid":"82a0-28"},{"uid":"82a0-74"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-106":{"id":"/src/inputs/ScriptelInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-36"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-107":{"id":"/src/inputs/PhoneInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-38"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-108":{"id":"/src/inputs/CreditCardInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-44"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-109":{"id":"/src/inputs/SinInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-40"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-110":{"id":"/src/inputs/TableInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-46"},{"uid":"82a0-48"},{"uid":"82a0-50"},{"uid":"82a0-52"},{"uid":"82a0-54"},{"uid":"82a0-56"},{"uid":"82a0-58"},{"uid":"82a0-60"},{"uid":"82a0-62"},{"uid":"82a0-64"},{"uid":"82a0-68"},{"uid":"82a0-66"},{"uid":"82a0-42"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-111":{"id":"/src/money/MoneyInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-72"}],"importedBy":[{"uid":"82a0-0"},{"uid":"82a0-50"}]},"82a0-112":{"id":"/src/money/MoneyCurrencyInput/index.ts","moduleParts":{},"imported":[{"uid":"82a0-70"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-113":{"id":"/src/step/index.ts","moduleParts":{},"imported":[{"uid":"82a0-4"},{"uid":"82a0-2"},{"uid":"82a0-6"},{"uid":"82a0-8"}],"importedBy":[{"uid":"82a0-0"}]},"82a0-114":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-14"},{"uid":"82a0-16"},{"uid":"82a0-20"},{"uid":"82a0-18"},{"uid":"82a0-30"},{"uid":"82a0-24"},{"uid":"82a0-22"},{"uid":"82a0-32"},{"uid":"82a0-10"},{"uid":"82a0-34"},{"uid":"82a0-26"},{"uid":"82a0-28"},{"uid":"82a0-36"},{"uid":"82a0-38"},{"uid":"82a0-44"},{"uid":"82a0-40"},{"uid":"82a0-46"},{"uid":"82a0-48"},{"uid":"82a0-50"},{"uid":"82a0-52"},{"uid":"82a0-54"},{"uid":"82a0-56"},{"uid":"82a0-58"},{"uid":"82a0-60"},{"uid":"82a0-62"},{"uid":"82a0-64"},{"uid":"82a0-68"},{"uid":"82a0-66"},{"uid":"82a0-72"},{"uid":"82a0-70"},{"uid":"82a0-4"},{"uid":"82a0-2"},{"uid":"82a0-6"},{"uid":"82a0-8"},{"uid":"82a0-88"},{"uid":"82a0-84"},{"uid":"82a0-82"},{"uid":"82a0-90"},{"uid":"82a0-86"},{"uid":"82a0-76"}],"isExternal":true},"82a0-115":{"id":"@thx/date","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-16"},{"uid":"82a0-20"},{"uid":"82a0-18"},{"uid":"82a0-44"},{"uid":"82a0-52"}],"isExternal":true},"82a0-116":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-14"},{"uid":"82a0-16"},{"uid":"82a0-20"},{"uid":"82a0-18"},{"uid":"82a0-30"},{"uid":"82a0-24"},{"uid":"82a0-32"},{"uid":"82a0-10"},{"uid":"82a0-34"},{"uid":"82a0-26"},{"uid":"82a0-36"},{"uid":"82a0-38"},{"uid":"82a0-44"},{"uid":"82a0-40"},{"uid":"82a0-46"},{"uid":"82a0-50"},{"uid":"82a0-54"},{"uid":"82a0-56"},{"uid":"82a0-58"},{"uid":"82a0-62"},{"uid":"82a0-64"},{"uid":"82a0-66"},{"uid":"82a0-72"},{"uid":"82a0-70"},{"uid":"82a0-4"},{"uid":"82a0-6"},{"uid":"82a0-8"},{"uid":"82a0-88"},{"uid":"82a0-84"},{"uid":"82a0-92"},{"uid":"82a0-90"},{"uid":"82a0-86"}],"isExternal":true},"82a0-117":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-14"},{"uid":"82a0-16"},{"uid":"82a0-20"},{"uid":"82a0-18"},{"uid":"82a0-30"},{"uid":"82a0-22"},{"uid":"82a0-34"},{"uid":"82a0-36"},{"uid":"82a0-38"},{"uid":"82a0-44"},{"uid":"82a0-40"},{"uid":"82a0-46"},{"uid":"82a0-54"},{"uid":"82a0-62"},{"uid":"82a0-64"},{"uid":"82a0-68"},{"uid":"82a0-72"},{"uid":"82a0-70"},{"uid":"82a0-8"},{"uid":"82a0-90"}],"isExternal":true},"82a0-118":{"id":"/src/date/DatePicker/index.ts","moduleParts":{},"imported":[{"uid":"82a0-132"},{"uid":"82a0-78"}],"importedBy":[{"uid":"82a0-12"},{"uid":"82a0-16"},{"uid":"82a0-20"},{"uid":"82a0-18"}]},"82a0-119":{"id":"@js-joda/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-14"},{"uid":"82a0-16"},{"uid":"82a0-18"}],"isExternal":true},"82a0-120":{"id":"formik","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-24"},{"uid":"82a0-22"},{"uid":"82a0-46"}],"isExternal":true},"82a0-121":{"id":"flat","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-22"}],"isExternal":true},"82a0-122":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-22"}],"isExternal":true},"82a0-123":{"id":"inputmask","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-10"},{"uid":"82a0-86"}],"isExternal":true},"82a0-124":{"id":"use-deep-compare-effect","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-10"}],"isExternal":true},"82a0-125":{"id":"react-credit-cards","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-44"}],"isExternal":true},"82a0-126":{"id":"react-credit-cards/es/styles-compiled.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-44"}],"isExternal":true},"82a0-127":{"id":"social-insurance-number","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-40"}],"isExternal":true},"82a0-128":{"id":"react-table","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-46"}],"isExternal":true},"82a0-129":{"id":"@thx/money","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-48"},{"uid":"82a0-60"},{"uid":"82a0-72"},{"uid":"82a0-70"},{"uid":"82a0-86"}],"isExternal":true},"82a0-130":{"id":"js-money","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-72"},{"uid":"82a0-70"},{"uid":"82a0-86"}],"isExternal":true},"82a0-131":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-8"}],"isExternal":true},"82a0-132":{"id":"react-datepicker","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-118"}],"isExternal":true},"82a0-133":{"id":"eventemitter3","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-92"}],"isExternal":true},"82a0-134":{"id":"credit-card-type","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-90"}],"isExternal":true},"82a0-135":{"id":"luhn","moduleParts":{},"imported":[],"importedBy":[{"uid":"82a0-90"}],"isExternal":true}},"env":{"rollup":"2.79.2"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
2673
2673
 
2674
2674
  const run = () => {
2675
2675
  const width = window.innerWidth;