@thx/controls 16.4.1 → 16.6.1-alpha.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.
@@ -1,6 +1,7 @@
1
- import React from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import { toDate, toLocalDate } from '@thx/date';
3
3
  import debug from 'debug';
4
+ import { Input, Icon } from 'semantic-ui-react';
4
5
  import DatePicker from 'react-datepicker';
5
6
  import '../DatePicker/styles.css.js';
6
7
  import { MaskedDateInput } from './MaskedDateInput.js';
@@ -20,7 +21,7 @@ function LocalDatePicker(props) {
20
21
  error,
21
22
  fluid,
22
23
  focus,
23
- icon,
24
+ icon = true,
24
25
  iconPosition,
25
26
  inverted,
26
27
  label,
@@ -29,19 +30,32 @@ function LocalDatePicker(props) {
29
30
  size,
30
31
  tabIndex,
31
32
  transparent,
33
+ openOnFocus = false,
32
34
  ...rest
33
35
  } = props;
34
- const selected = value ? toDate(value) : null;
35
36
  const inputProps = {
36
37
  as,
37
38
  action,
38
39
  actionPosition,
39
- className,
40
+ className: `${className || ""} icon`,
40
41
  error,
42
+ focus,
41
43
  fluid,
44
+ inverted,
45
+ label,
46
+ labelPosition,
47
+ loading,
48
+ size,
49
+ tabIndex,
50
+ transparent
51
+ };
52
+ const maskedInputProps = {
53
+ as,
54
+ action,
55
+ actionPosition,
56
+ className,
57
+ error,
42
58
  focus,
43
- icon,
44
- iconPosition,
45
59
  inverted,
46
60
  label,
47
61
  labelPosition,
@@ -50,20 +64,66 @@ function LocalDatePicker(props) {
50
64
  tabIndex,
51
65
  transparent
52
66
  };
67
+ const iconProps = {
68
+ className,
69
+ inverted,
70
+ loading,
71
+ size,
72
+ transparent,
73
+ iconPosition
74
+ };
75
+ const [isOpen, setIsOpen] = useState(false);
76
+ const [selected, setSelected] = useState(value ? toDate(value) : null);
77
+ useEffect(() => {
78
+ setSelected(value ? toDate(value) : null);
79
+ }, [value]);
80
+ const handleDateChange = (date) => {
81
+ setSelected(date);
82
+ onChange && onChange(date ? toLocalDate(date) : null);
83
+ setIsOpen(false);
84
+ };
85
+ const handleInputChange = (e) => {
86
+ const inputValue = e.target.value;
87
+ const date = inputValue ? toDate(inputValue) : null;
88
+ setSelected(date);
89
+ onChange && onChange(date ? toLocalDate(date) : null);
90
+ };
91
+ const handleDatePickerBlur = (e) => {
92
+ setIsOpen(false);
93
+ onBlur && onBlur(e);
94
+ };
95
+ const toggleDatePicker = () => {
96
+ setIsOpen(!isOpen);
97
+ };
98
+ const handleOnKeyDown = (e) => {
99
+ e?.key === "Enter" && toggleDatePicker();
100
+ e?.key === "Escape" && setIsOpen(false);
101
+ };
53
102
  return /* @__PURE__ */ React.createElement(DatePicker, {
54
103
  ...rest,
55
104
  selected,
56
- onChange: (date) => {
57
- if (onChange)
58
- onChange(date ? toLocalDate(date) : null);
59
- },
60
- onBlur,
61
- customInput: /* @__PURE__ */ React.createElement(MaskedDateInput, {
62
- ...inputProps,
63
- onBlur
64
- }),
105
+ onChange: handleDateChange,
106
+ customInput: /* @__PURE__ */ React.createElement(Input, {
107
+ ...inputProps
108
+ }, /* @__PURE__ */ React.createElement(MaskedDateInput, {
109
+ ...maskedInputProps,
110
+ value: selected ? toDate(selected) : "",
111
+ onChange: handleInputChange,
112
+ onClick: ({ target }) => openOnFocus ? setIsOpen(!isOpen) : target.select(),
113
+ onKeyDown: handleOnKeyDown
114
+ }), icon && /* @__PURE__ */ React.createElement(Icon, {
115
+ ...iconProps,
116
+ onClick: toggleDatePicker,
117
+ tabIndex: -1,
118
+ name: "calendar alternate",
119
+ link: true
120
+ })),
65
121
  minDate: minDate ? toDate(minDate) : null,
66
- maxDate: maxDate ? toDate(maxDate) : null
122
+ maxDate: maxDate ? toDate(maxDate) : null,
123
+ open: isOpen,
124
+ enableTabLoop: openOnFocus,
125
+ preventOpenOnFocus: openOnFocus,
126
+ onBlur: handleDatePickerBlur
67
127
  });
68
128
  }
69
129
 
@@ -1 +1 @@
1
- {"version":3,"file":"LocalDatePicker.js","sources":["../../../../src/date/LocalDatePicker/LocalDatePicker.tsx"],"sourcesContent":["import type {LocalDate} from '@js-joda/core';\nimport {toDate, toLocalDate} from '@thx/date';\nimport debug from 'debug';\nimport type {ReactDatePickerProps} from 'react-datepicker';\nimport type {InputProps} from 'semantic-ui-react';\nimport {DatePicker} from '../DatePicker/index';\nimport '../DatePicker/styles.css';\nimport {MaskedDateInput} from './MaskedDateInput';\n\nconst d = debug('thx.controls.date.LocalDatePicker');\n\ninterface ILocalDatePicker {\n\tvalue?: LocalDate | number | null;\n\tonChange?: (value: LocalDate | null) => void;\n\tonChangeRaw?: () => void;\n\tminDate?: LocalDate;\n\tmaxDate?: LocalDate;\n}\n\ntype InputPropsOmitted = Omit<InputProps, 'onChange'>;\ntype ReactDatePickerPropsOmitted = Omit<Omit<ReactDatePickerProps, 'value'>, 'onChange' | 'minDate' | 'maxDate'>;\nexport type LocalDatePickerProps = ILocalDatePicker & InputPropsOmitted & ReactDatePickerPropsOmitted;\n\nexport function LocalDatePicker(props: LocalDatePickerProps): JSX.Element {\n\tconst {\n\t\tminDate,\n\t\tmaxDate,\n\t\tvalue,\n\t\tonChange,\n\t\tonBlur,\n\t\tas,\n\t\taction,\n\t\tactionPosition,\n\t\tclassName,\n\t\terror,\n\t\tfluid,\n\t\tfocus,\n\t\ticon,\n\t\ticonPosition,\n\t\tinverted,\n\t\tlabel,\n\t\tlabelPosition,\n\t\tloading,\n\t\tsize,\n\t\ttabIndex,\n\t\ttransparent,\n\t\t...rest\n\t} = props;\n\n\tconst selected = value ? toDate(value) : null;\n\n\tconst inputProps = {\n\t\tas,\n\t\taction,\n\t\tactionPosition,\n\t\tclassName,\n\t\terror,\n\t\tfluid,\n\t\tfocus,\n\t\ticon,\n\t\ticonPosition,\n\t\tinverted,\n\t\tlabel,\n\t\tlabelPosition,\n\t\tloading,\n\t\tsize,\n\t\ttabIndex,\n\t\ttransparent,\n\t};\n\n\treturn (\n\t\t<DatePicker\n\t\t\t{...rest}\n\t\t\tselected={selected}\n\t\t\tonChange={date => {\n\t\t\t\tif (onChange) onChange(date ? toLocalDate(date) : null);\n\t\t\t}}\n\t\t\tonBlur={onBlur}\n\t\t\tcustomInput={<MaskedDateInput {...inputProps} onBlur={onBlur} />}\n\t\t\tminDate={minDate ? toDate(minDate) : null}\n\t\t\tmaxDate={maxDate ? toDate(maxDate) : null}\n\t\t/>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;AASU,MAAM,mCAAmC,EAAA;AAc5C,SAAA,eAAA,CAAyB,KAA0C,EAAA;AACzE,EAAM,MAAA;AAAA,IACL,OAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACG,GAAA,IAAA;AAAA,GACA,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,QAAW,GAAA,KAAA,GAAQ,MAAO,CAAA,KAAK,CAAI,GAAA,IAAA,CAAA;AAEzC,EAAA,MAAM,UAAa,GAAA;AAAA,IAClB,EAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,GACD,CAAA;AAEA,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IACI,GAAA,IAAA;AAAA,IACJ,QAAA;AAAA,IACA,UAAU,CAAQ,IAAA,KAAA;AACjB,MAAI,IAAA,QAAA;AAAU,QAAA,QAAA,CAAS,IAAO,GAAA,WAAA,CAAY,IAAI,CAAA,GAAI,IAAI,CAAA,CAAA;AAAA,KACvD;AAAA,IACA,MAAA;AAAA,IACA,6BAAc,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,MAAoB,GAAA,UAAA;AAAA,MAAY,MAAA;AAAA,KAAgB,CAAA;AAAA,IAC9D,OAAS,EAAA,OAAA,GAAU,MAAO,CAAA,OAAO,CAAI,GAAA,IAAA;AAAA,IACrC,OAAS,EAAA,OAAA,GAAU,MAAO,CAAA,OAAO,CAAI,GAAA,IAAA;AAAA,GACtC,CAAA,CAAA;AAEF;;;;"}
1
+ {"version":3,"file":"LocalDatePicker.js","sources":["../../../../src/date/LocalDatePicker/LocalDatePicker.tsx"],"sourcesContent":["import type {LocalDate} from '@js-joda/core';\nimport {toDate, toLocalDate} from '@thx/date';\nimport debug from 'debug';\nimport {useEffect, useState} from 'react';\nimport type {ReactDatePickerProps} from 'react-datepicker';\nimport {Icon, Input, InputProps} from 'semantic-ui-react';\nimport {DatePicker} from '../DatePicker/index';\nimport '../DatePicker/styles.css';\nimport {MaskedDateInput} from './MaskedDateInput';\n\nconst d = debug('thx.controls.date.LocalDatePicker');\n\ninterface ILocalDatePicker {\n\tvalue?: LocalDate | number | null;\n\tonChange?: (value: LocalDate | null) => void;\n\tonChangeRaw?: () => void;\n\tminDate?: LocalDate;\n\tmaxDate?: LocalDate;\n\ticon?: boolean;\n\topenOnFocus?: boolean;\n}\n\ntype InputPropsOmitted = Omit<InputProps, 'onChange'>;\ntype ReactDatePickerPropsOmitted = Omit<Omit<ReactDatePickerProps, 'value'>, 'onChange' | 'minDate' | 'maxDate'>;\nexport type LocalDatePickerProps = ILocalDatePicker & InputPropsOmitted & ReactDatePickerPropsOmitted;\n\nexport function LocalDatePicker(props: LocalDatePickerProps): JSX.Element {\n\tconst {\n\t\tminDate,\n\t\tmaxDate,\n\t\tvalue,\n\t\tonChange,\n\t\tonBlur,\n\t\tas,\n\t\taction,\n\t\tactionPosition,\n\t\tclassName,\n\t\terror,\n\t\tfluid,\n\t\tfocus,\n\t\ticon = true,\n\t\ticonPosition,\n\t\tinverted,\n\t\tlabel,\n\t\tlabelPosition,\n\t\tloading,\n\t\tsize,\n\t\ttabIndex,\n\t\ttransparent,\n\t\topenOnFocus = false,\n\t\t...rest\n\t} = props;\n\n\tconst inputProps = {\n\t\tas,\n\t\taction,\n\t\tactionPosition,\n\t\tclassName: `${className || ''} icon`,\n\t\terror,\n\t\tfocus,\n\t\tfluid,\n\t\tinverted,\n\t\tlabel,\n\t\tlabelPosition,\n\t\tloading,\n\t\tsize,\n\t\ttabIndex,\n\t\ttransparent,\n\t};\n\n\tconst maskedInputProps = {\n\t\tas,\n\t\taction,\n\t\tactionPosition,\n\t\tclassName,\n\t\terror,\n\t\tfocus,\n\t\tinverted,\n\t\tlabel,\n\t\tlabelPosition,\n\t\tloading,\n\t\tsize,\n\t\ttabIndex,\n\t\ttransparent,\n\t};\n\n\tconst iconProps = {\n\t\tclassName,\n\t\tinverted,\n\t\tloading,\n\t\tsize,\n\t\ttransparent,\n\t\ticonPosition,\n\t};\n\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [selected, setSelected] = useState(value ? toDate(value) : null);\n\n\tuseEffect(() => {\n\t\tsetSelected(value ? toDate(value) : null);\n\t}, [value]);\n\n\tconst handleDateChange = (date: Date) => {\n\t\tsetSelected(date);\n\t\tonChange && onChange(date ? toLocalDate(date) : null);\n\t\tsetIsOpen(false);\n\t};\n\n\tconst handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst inputValue = e.target.value;\n\t\tconst date = inputValue ? toDate(inputValue) : null;\n\t\tsetSelected(date);\n\t\tonChange && onChange(date ? toLocalDate(date) : null);\n\t};\n\n\tconst handleDatePickerBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n\t\tsetIsOpen(false);\n\t\tonBlur && onBlur(e);\n\t};\n\n\tconst toggleDatePicker = () => {\n\t\tsetIsOpen(!isOpen);\n\t};\n\n\tconst handleOnKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n\t\t// toggle on enter\n\t\te?.key === 'Enter' && toggleDatePicker();\n\t\t// hide on escape\n\t\te?.key === 'Escape' && setIsOpen(false);\n\t};\n\n\treturn (\n\t\t<DatePicker\n\t\t\t{...rest}\n\t\t\tselected={selected}\n\t\t\tonChange={handleDateChange}\n\t\t\tcustomInput={\n\t\t\t\t<Input {...inputProps}>\n\t\t\t\t\t<MaskedDateInput\n\t\t\t\t\t\t{...maskedInputProps}\n\t\t\t\t\t\tvalue={selected ? toDate(selected) : ''}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tonClick={({target}: {target: HTMLInputElement}) => (openOnFocus ? setIsOpen(!isOpen) : target.select())}\n\t\t\t\t\t\tonKeyDown={handleOnKeyDown}\n\t\t\t\t\t/>\n\t\t\t\t\t{icon && <Icon {...iconProps} onClick={toggleDatePicker} tabIndex={-1} name=\"calendar alternate\" link />}\n\t\t\t\t</Input>\n\t\t\t}\n\t\t\tminDate={minDate ? toDate(minDate) : null}\n\t\t\tmaxDate={maxDate ? toDate(maxDate) : null}\n\t\t\topen={isOpen}\n\t\t\tenableTabLoop={openOnFocus}\n\t\t\tpreventOpenOnFocus={openOnFocus}\n\t\t\tonBlur={handleDatePickerBlur}\n\t\t/>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;;AAUU,MAAM,mCAAmC,EAAA;AAgB5C,SAAA,eAAA,CAAyB,KAA0C,EAAA;AACzE,EAAM,MAAA;AAAA,IACL,OAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,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;AAEA,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IACI,GAAA,IAAA;AAAA,IACJ,QAAA;AAAA,IACA,QAAU,EAAA,gBAAA;AAAA,IACV,6BACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,MAAU,GAAA,UAAA;AAAA,KAAA,kBACT,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,MACI,GAAA,gBAAA;AAAA,MACJ,KAAO,EAAA,QAAA,GAAW,MAAO,CAAA,QAAQ,CAAI,GAAA,EAAA;AAAA,MACrC,QAAU,EAAA,iBAAA;AAAA,MACV,OAAA,EAAS,CAAC,EAAC,MAAyC,EAAA,KAAA,WAAA,GAAc,UAAU,CAAC,MAAM,CAAI,GAAA,MAAA,CAAO,MAAO,EAAA;AAAA,MACrG,SAAW,EAAA,eAAA;AAAA,KACZ,CAAA,EACC,wBAAS,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAS,GAAA,SAAA;AAAA,MAAW,OAAS,EAAA,gBAAA;AAAA,MAAkB,QAAU,EAAA,CAAA,CAAA;AAAA,MAAI,IAAK,EAAA,oBAAA;AAAA,MAAqB,IAAI,EAAA,IAAA;AAAA,KAAC,CACvG,CAAA;AAAA,IAED,OAAS,EAAA,OAAA,GAAU,MAAO,CAAA,OAAO,CAAI,GAAA,IAAA;AAAA,IACrC,OAAS,EAAA,OAAA,GAAU,MAAO,CAAA,OAAO,CAAI,GAAA,IAAA;AAAA,IACrC,IAAM,EAAA,MAAA;AAAA,IACN,aAAe,EAAA,WAAA;AAAA,IACf,kBAAoB,EAAA,WAAA;AAAA,IACpB,MAAQ,EAAA,oBAAA;AAAA,GACT,CAAA,CAAA;AAEF;;;;"}
@@ -9,7 +9,8 @@ function LocalDateEditCell() {
9
9
  value: initialValue,
10
10
  row: { index: rowIndex },
11
11
  column: { id },
12
- updateData
12
+ updateData,
13
+ hoverRow
13
14
  } = props;
14
15
  const [value, setValue] = useState(initialValue);
15
16
  return /* @__PURE__ */ React.createElement(LocalDatePicker, {
@@ -22,7 +23,8 @@ function LocalDateEditCell() {
22
23
  },
23
24
  onBlur: () => {
24
25
  updateData(rowIndex, id, value);
25
- }
26
+ },
27
+ icon: hoverRow.toString() === rowIndex.toString()
26
28
  });
27
29
  };
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LocalDateEditCell.js","sources":["../../../../src/inputs/TableInput/LocalDateEditCell.tsx"],"sourcesContent":["import type {LocalDate} from '@js-joda/core';\nimport debug from 'debug';\nimport {useState} from 'react';\nimport {LocalDatePicker} from '../../date/LocalDatePicker';\nimport type {TableCellProps} from './TableInput';\n\nconst d = debug('thx.controls.inputs.TableInput.LocalDateEditCell');\n\nexport function LocalDateEditCell<D extends Record<string, unknown>>() {\n\treturn function LocalDateEditCellFn(props: TableCellProps<D, LocalDate | null>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index: rowIndex},\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<LocalDatePicker\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={val => {\n\t\t\t\t\tsetValue(val);\n\t\t\t\t\tupdateData(rowIndex, id, val);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(rowIndex, id, value);\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;AAMU,MAAM,kDAAkD,EAAA;AAEK,SAAA,iBAAA,GAAA;AACtE,EAAA,OAAO,6BAA6B,KAA4C,EAAA;AAC/E,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,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,eAAA,EAAA;AAAA,MACA,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACX,KAAA;AAAA,MACA,UAAU,CAAO,GAAA,KAAA;AAChB,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AACZ,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,GAAG,CAAA,CAAA;AAAA,OAC7B;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,KAAK,CAAA,CAAA;AAAA,OAC/B;AAAA,KACD,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"LocalDateEditCell.js","sources":["../../../../src/inputs/TableInput/LocalDateEditCell.tsx"],"sourcesContent":["import type {LocalDate} from '@js-joda/core';\nimport debug from 'debug';\nimport {useState} from 'react';\nimport {LocalDatePicker} from '../../date/LocalDatePicker';\nimport type {TableCellProps} from './TableInput';\n\nconst d = debug('thx.controls.inputs.TableInput.LocalDateEditCell');\n\nexport function LocalDateEditCell<D extends Record<string, unknown>>() {\n\treturn function LocalDateEditCellFn(props: TableCellProps<D, LocalDate | null>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index: rowIndex},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t\thoverRow,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\n\t\treturn (\n\t\t\t<LocalDatePicker\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={val => {\n\t\t\t\t\tsetValue(val);\n\t\t\t\t\tupdateData(rowIndex, id, val);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(rowIndex, id, value);\n\t\t\t\t}}\n\t\t\t\ticon={hoverRow.toString() === rowIndex.toString()}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;AAMU,MAAM,kDAAkD,EAAA;AAEK,SAAA,iBAAA,GAAA;AACtE,EAAA,OAAO,6BAA6B,KAA4C,EAAA;AAC/E,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,QAAQ,EAAC,EAAA,EAAA;AAAA,MACT,UAAA;AAAA,MACA,QAAA;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,eAAA,EAAA;AAAA,MACA,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACX,KAAA;AAAA,MACA,UAAU,CAAO,GAAA,KAAA;AAChB,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AACZ,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,GAAG,CAAA,CAAA;AAAA,OAC7B;AAAA,MACA,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,KAAK,CAAA,CAAA;AAAA,OAC/B;AAAA,MACA,IAAM,EAAA,QAAA,CAAS,QAAS,EAAA,KAAM,SAAS,QAAS,EAAA;AAAA,KACjD,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
@@ -4,7 +4,7 @@ import { MoneyInput } from '../../money/MoneyInput/MoneyInput.js';
4
4
  import { addRowOnTab } from './addRowOnTab.js';
5
5
 
6
6
  debug("thx.controls.inputs.TableInput.MoneyEditCell");
7
- function MoneyEditCell(opts) {
7
+ function MoneyEditCell(moneyEditCellProps) {
8
8
  return function MoneyEditCellFn(props) {
9
9
  const {
10
10
  value: initialValue,
@@ -13,7 +13,9 @@ function MoneyEditCell(opts) {
13
13
  updateData
14
14
  } = props;
15
15
  const [value, setValue] = useState(initialValue);
16
+ const { addRowOnTabIf, ...rest } = moneyEditCellProps || {};
16
17
  return /* @__PURE__ */ React.createElement(MoneyInput, {
18
+ ...rest,
17
19
  fluid: true,
18
20
  transparent: true,
19
21
  value,
@@ -21,7 +23,7 @@ function MoneyEditCell(opts) {
21
23
  onBlur: () => {
22
24
  updateData(rowIndex, id, value);
23
25
  },
24
- onKeyDown: (event) => addRowOnTab(event, value, props, opts?.addRowOnTabIf)
26
+ onKeyDown: (event) => addRowOnTab(event, value, props, addRowOnTabIf)
25
27
  });
26
28
  };
27
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyEditCell.js","sources":["../../../../src/inputs/TableInput/MoneyEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport type Money from 'js-money';\nimport {useState} from 'react';\nimport {MoneyInput} from '../../money/MoneyInput';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.MoneyEditCell');\n\ninterface MoneyEditCellOptions<D extends Record<string, unknown>> {\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, Money>;\n}\n\nexport function MoneyEditCell<D extends Record<string, unknown>>(opts?: MoneyEditCellOptions<D>) {\n\treturn function MoneyEditCellFn(props: TableCellProps<D, Money>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index: rowIndex},\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<MoneyInput\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={setValue}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(rowIndex, id, value);\n\t\t\t\t}}\n\t\t\t\tonKeyDown={(event: KeyboardEvent) => addRowOnTab(event, value, props, opts?.addRowOnTabIf)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"],"names":[],"mappings":";;;;;AAQU,MAAM,8CAA8C,EAAA;AAOvD,SAAA,aAAA,CAA0D,IAAgC,EAAA;AAChG,EAAA,OAAO,yBAAyB,KAAiC,EAAA;AAChE,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,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,UAAA,EAAA;AAAA,MACA,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACX,KAAA;AAAA,MACA,QAAU,EAAA,QAAA;AAAA,MACV,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,KAAK,CAAA,CAAA;AAAA,OAC/B;AAAA,MACA,SAAA,EAAW,CAAC,KAAyB,KAAA,WAAA,CAAY,OAAO,KAAO,EAAA,KAAA,EAAO,MAAM,aAAa,CAAA;AAAA,KAC1F,CAAA,CAAA;AAAA,GAEF,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"MoneyEditCell.js","sources":["../../../../src/inputs/TableInput/MoneyEditCell.tsx"],"sourcesContent":["import debug from 'debug';\nimport type Money from 'js-money';\nimport {useState} from 'react';\nimport {MoneyInput} from '../../money/MoneyInput';\nimport type {TableCellProps} from './TableInput';\nimport type {AddRowOnTabIf} from './addRowOnTab';\nimport {addRowOnTab} from './addRowOnTab';\n\nconst d = debug('thx.controls.inputs.TableInput.MoneyEditCell');\n\ninterface MoneyEditCellOptions<D extends Record<string, unknown>> {\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, Money | undefined>;\n\ttabIndex?: number;\n}\n\nexport function MoneyEditCell<D extends Record<string, unknown>>(moneyEditCellProps?: MoneyEditCellOptions<D>) {\n\treturn function MoneyEditCellFn(props: TableCellProps<D, Money | undefined>) {\n\t\tconst {\n\t\t\tvalue: initialValue,\n\t\t\trow: {index: rowIndex},\n\t\t\tcolumn: {id},\n\t\t\tupdateData,\n\t\t} = props;\n\n\t\tconst [value, setValue] = useState(initialValue);\n\t\tconst {addRowOnTabIf, ...rest} = moneyEditCellProps || {};\n\n\t\treturn (\n\t\t\t<MoneyInput\n\t\t\t\t{...rest}\n\t\t\t\tfluid\n\t\t\t\ttransparent\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={setValue}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tupdateData(rowIndex, 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":";;;;;AAQU,MAAM,8CAA8C,EAAA;AAQvD,SAAA,aAAA,CAA0D,kBAA8C,EAAA;AAC9G,EAAA,OAAO,yBAAyB,KAA6C,EAAA;AAC5E,IAAM,MAAA;AAAA,MACL,KAAO,EAAA,YAAA;AAAA,MACP,GAAA,EAAK,EAAC,KAAO,EAAA,QAAA,EAAA;AAAA,MACb,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;AAC/C,IAAA,MAAM,EAAC,aAAA,EAAA,GAAkB,IAAQ,EAAA,GAAA,kBAAA,IAAsB,EAAC,CAAA;AAExD,IAAA,uBACE,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MACI,GAAA,IAAA;AAAA,MACJ,KAAK,EAAA,IAAA;AAAA,MACL,WAAW,EAAA,IAAA;AAAA,MACX,KAAA;AAAA,MACA,QAAU,EAAA,QAAA;AAAA,MACV,QAAQ,MAAM;AACb,QAAW,UAAA,CAAA,QAAA,EAAU,IAAI,KAAK,CAAA,CAAA;AAAA,OAC/B;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, 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}\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\tarrayHelpers.push(createRow());\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// eslint-disable-next-line react/jsx-key\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>\n\t\t\t\t\t\t\t{row.cells.map(cell => (\n\t\t\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t\t\t<Table.Cell {...{...cell.getCellProps(), ...cell.getCellProps(cellProps)}}>{cell.render('Cell', {hoverRow})}</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;AA8BhD,SAAA,eAAA,CAAqD,KAAgC,EAAA;AACpF,EAAM,MAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,GACG,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,OAAO,OAAQ,CAAA,MAAM,OAAS,EAAA,CAAC,OAAO,CAAC,CAAA,CAAA;AAC7C,EAAA,MAAM,OAAO,OAAQ,CAAA,MAAM,MAAQ,EAAA,CAAC,MAAM,CAAC,CAAA,CAAA;AAC3C,EAAA,MAAM,CAAC,QAAA,EAAU,WAAe,CAAA,GAAA,QAAA,CAAS,EAAE,CAAA,CAAA;AAG3C,EAAA,MAAM,EAAC,aAAe,EAAA,iBAAA,EAAmB,cAAc,UAAY,EAAA,IAAA,EAAM,iBAAgB,QAAY,CAAA;AAAA,IACpG,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,IAAA;AAAA,IAEN,UAAA,CAAW,QAAU,EAAA,QAAA,EAAU,KAAO,EAAA;AACrC,MAAA,aAAA,CAAc,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,QAAa,CAAA,EAAA,EAAA,QAAA,CAAA,CAAA,EAAY,KAAK,CAAA,CAAA;AAAA,KACxD;AAAA,IACA,MAAS,GAAA;AACR,MAAa,YAA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,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAW,MAAM,KAAM,CAAA,IAAA;AAAA,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
+ {"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\tarrayHelpers.push(createRow());\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// eslint-disable-next-line react/jsx-key\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>\n\t\t\t\t\t\t\t{row.cells.map(cell => (\n\t\t\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t\t\t<Table.Cell {...{...cell.getCellProps(), ...cell.getCellProps(cellProps)}}>{cell.render('Cell', {hoverRow})}</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,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,GACG,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,OAAO,OAAQ,CAAA,MAAM,OAAS,EAAA,CAAC,OAAO,CAAC,CAAA,CAAA;AAC7C,EAAA,MAAM,OAAO,OAAQ,CAAA,MAAM,MAAQ,EAAA,CAAC,MAAM,CAAC,CAAA,CAAA;AAC3C,EAAA,MAAM,CAAC,QAAA,EAAU,WAAe,CAAA,GAAA,QAAA,CAAS,EAAE,CAAA,CAAA;AAG3C,EAAA,MAAM,EAAC,aAAe,EAAA,iBAAA,EAAmB,cAAc,UAAY,EAAA,IAAA,EAAM,iBAAgB,QAAY,CAAA;AAAA,IACpG,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,IAAA;AAAA,IAEN,UAAA,CAAW,QAAU,EAAA,QAAA,EAAU,KAAO,EAAA;AACrC,MAAA,aAAA,CAAc,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,QAAa,CAAA,EAAA,EAAA,QAAA,CAAA,CAAA,EAAY,KAAK,CAAA,CAAA;AAAA,KACxD;AAAA,IACA,MAAS,GAAA;AACR,MAAa,YAAA,CAAA,IAAA,CAAK,WAAW,CAAA,CAAA;AAAA,KAC9B;AAAA,IACA,YAAA;AAAA,GACA,CAAA,CAAA;AAGD,EAAA,MAAM,SAAY,GA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A,aAAA,CAAA,eAAA,EAAA;AAAA,MAAgB,YAAA;AAAA,MAAgC,GAAA,KAAA;AAAA,KAAO,CAAA;AAAA,GAAI,CAAA,CAAA;AAC1H;;;;"}
@@ -13,12 +13,10 @@ function MoneyCurrencyInput(props) {
13
13
  { key: "USD", text: "USD", value: "USD" }
14
14
  ];
15
15
  const handleChange = useCallback((v) => {
16
- if (!v) {
17
- onChange && onChange(toMoney(0, defaultCurrency));
18
- } else {
16
+ if (v && onChange) {
19
17
  onChange && onChange(v);
20
18
  }
21
- }, [defaultCurrency, onChange]);
19
+ }, [onChange]);
22
20
  const val = !(value instanceof Money) && value !== void 0 ? toMoney(value) : value;
23
21
  const [inputElement] = useMoneyInput({ onChange: handleChange, prefix, showPrefix, value: val, wholeNumber });
24
22
  const handleDropdownChange = useCallback((e, v) => {
@@ -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, {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,EAA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E,EAAE,CAAA,CAAA,QAAA,EAAU,OAAO,YAAY,CAAA,CAAA;AAE/B,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,IAAM,aAAc,EAAA,OAAA;AAAA,GAAA,kBAC7B,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,IAAA;AAAA,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
+ {"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 && onChange) {\n\t\t\t\tonChange && onChange(v);\n\t\t\t}\n\t\t},\n\t\t[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,IAA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AAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,IAAA;AAAA,IAAM,aAAc,EAAA,OAAA;AAAA,GAAA,kBAC7B,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAM,IAAA;AAAA,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;;;;"}
@@ -9,12 +9,10 @@ debug("thx.controls.money.MoneyInput");
9
9
  function MoneyInput(props) {
10
10
  const { name, onBlur, locked, prefix, defaultCurrency, onChange, showPrefix, value, wholeNumber, ...rest } = props;
11
11
  const handleChange = useCallback((v) => {
12
- if (!v) {
13
- onChange && onChange(toMoney(0, defaultCurrency));
14
- } else {
15
- onChange && onChange(v);
12
+ if (v && onChange) {
13
+ onChange(v);
16
14
  }
17
- }, [defaultCurrency, onChange]);
15
+ }, [onChange]);
18
16
  const val = !(value instanceof Money) && value !== void 0 ? toMoney(value) : value;
19
17
  const [inputElement] = useMoneyInput({ onChange: handleChange, prefix, showPrefix, value: val, wholeNumber });
20
18
  return /* @__PURE__ */ React.createElement(Input, {
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.js","sources":["../../../../src/money/MoneyInput/MoneyInput.tsx"],"sourcesContent":["import {toMoney} from '@thx/money';\n/* eslint-disable jsx-a11y/no-static-element-interactions */\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":";;;;;;;AAQU,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';\n/* eslint-disable jsx-a11y/no-static-element-interactions */\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 | undefined;\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 && onChange) {\n\t\t\t\tonChange(v);\n\t\t\t}\n\t\t},\n\t\t[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":";;;;;;;AAQU,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,KAAK,QAAU,EAAA;AAClB,MAAA,QAAA,CAAS,CAAC,CAAA,CAAA;AAAA,KACX;AAAA,GACD,EACA,CAAC,QAAQ,CACV,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 {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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CAAC,CAAA,CAAA;AAAA,KACjB;AAAA,GACD,EACA,CAAC,KAAK,CACP,CAAA,CAAA;AAGA,EAAA,SAAA,CAAU,MAAM;AACf,IAAM,MAAA,wBAAA,GAA2B,YAAa,CAAA,OAAA,EAAS,KAAS,IAAA,EAAA,CAAA;AAChE,IAAA,MAAM,gBAAmB,GAAA,KAAA,GAAQ,KAAM,CAAA,QAAA,EAAa,GAAA,EAAA,CAAA;AAEpD,IAAA,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;;;;"}
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 {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 | undefined) => {\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,YAAA,GAAe,OAAkC,IAAI,CAAA,CAAA;AAM3D,EAAM,MAAA,YAAA,GAAe,OAAO,QAAY,IAAA,KAAA,CAAA;AAExC,EAAA,SAAA,CAAU,MAAM;AACf,IAAA,IAAI,CAAC,YAAa,CAAA,OAAA;AAAS,MAAM,MAAA,IAAI,MAAM,6BAA6B,CAAA,CAAA;AAExE,IAAA,CAAA,CAAE,8BAA8B,CAAA,CAAA;AAChC,IAAa,YAAA,CAAA,OAAA,GAAU,IAAI,cAAe,CAAA;AAAA,MACzC,KAAO,EAAA,SAAA;AAAA,MACP,cAAgB,EAAA,GAAA;AAAA,MAChB,QAAQ,WAAc,GAAA,GAAA,GAAM,KAAM,CAAA,YAAA,CAAA,CAAc,eAAe,QAAS,EAAA;AAAA,MACxE,cAAgB,EAAA,KAAA;AAAA,MAChB,MAAQ,EAAA,U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G,EAAA;AACN,QAAA,YAAA,CAAa,OAAQ,CAAA,KAAA,GAAQ,CAAE,CAAA,SAAA,GAAY,QAAS,EAAA,CAAA;AAAA,OAC9C,MAAA;AACN,QAAA,YAAA,CAAa,QAAQ,KAAQ,GAAA,EAAA,CAAA;AAAA,OAC9B;AACA,MAAA,KAAA,IAAS,MAAM,CAAC,CAAA,CAAA;AAAA,KACjB;AAAA,GACD,EACA,CAAC,KAAK,CACP,CAAA,CAAA;AAGA,EAAA,SAAA,CAAU,MAAM;AACf,IAAM,MAAA,wBAAA,GAA2B,YAAa,CAAA,OAAA,EAAS,KAAS,IAAA,EAAA,CAAA;AAChE,IAAA,MAAM,gBAAmB,GAAA,KAAA,GAAQ,KAAM,CAAA,QAAA,EAAa,GAAA,EAAA,CAAA;AAEpD,IAAA,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":"9c75-1"}]},{"name":"money/useMoneyInput.js","children":[{"name":"src/money/useMoneyInput.ts","uid":"9c75-3"}]},{"name":"step/useStep.js","children":[{"name":"src/step/useStep.ts","uid":"9c75-5"}]},{"name":"step/Step.js","children":[{"name":"src/step/Step.tsx","uid":"9c75-7"}]},{"name":"step/FormStep.js","children":[{"name":"src/step/FormStep.tsx","uid":"9c75-9"}]},{"name":"step/StepProvider.js","children":[{"name":"src/step/StepProvider.tsx","uid":"9c75-11"}]},{"name":"inputs/MaskedInput/useMaskedInput.js","children":[{"name":"src/inputs/MaskedInput/useMaskedInput.ts","uid":"9c75-13"}]},{"name":"inputs/TableInput/addRowOnTab.js","children":[{"name":"src/inputs/TableInput/addRowOnTab.ts","uid":"9c75-15"}]},{"name":"date/LocalDatePicker/LocalDatePicker.js","children":[{"name":"src/date/LocalDatePicker/LocalDatePicker.tsx","uid":"9c75-17"}]},{"name":"date/LocalMonthSelect/LocalMonthSelect.js","children":[{"name":"src/date/LocalMonthSelect/LocalMonthSelect.tsx","uid":"9c75-19"}]},{"name":"date/MonthDayPicker/MonthDayPicker.js","children":[{"name":"src/date/MonthDayPicker/MonthDayPicker.tsx","uid":"9c75-21"}]},{"name":"date/MonthYearPicker/MonthYearPicker.js","children":[{"name":"src/date/MonthYearPicker/MonthYearPicker.tsx","uid":"9c75-23"}]},{"name":"date/YearSelect/YearSelect.js","children":[{"name":"src/date/YearSelect/YearSelect.tsx","uid":"9c75-25"}]},{"name":"form/TForm/TForm.js","children":[{"name":"src/form/TForm/TForm.tsx","uid":"9c75-27"}]},{"name":"form/TForm/useTForm.js","children":[{"name":"src/form/TForm/useTForm.tsx","uid":"9c75-29"}]},{"name":"inputs/MaskedInput/MaskedInput.js","children":[{"name":"src/inputs/MaskedInput/MaskedInput.tsx","uid":"9c75-31"}]},{"name":"inputs/Scriptel/Scriptel.js","children":[{"name":"src/inputs/Scriptel/Scriptel.tsx","uid":"9c75-33"}]},{"name":"inputs/Scriptel/withScriptel.js","children":[{"name":"src/inputs/Scriptel/withScriptel.tsx","uid":"9c75-35"}]},{"name":"date/LocalTimePicker/LocalTimePicker.js","children":[{"name":"src/date/LocalTimePicker/LocalTimePicker.tsx","uid":"9c75-37"}]},{"name":"inputs/RadioGroup/RadioGroup.js","children":[{"name":"src/inputs/RadioGroup/RadioGroup.tsx","uid":"9c75-39"}]},{"name":"inputs/PhoneInput/PhoneInput.js","children":[{"name":"src/inputs/PhoneInput/PhoneInput.tsx","uid":"9c75-41"}]},{"name":"inputs/TableInput/TableInput.js","children":[{"name":"src/inputs/TableInput/TableInput.tsx","uid":"9c75-43"}]},{"name":"inputs/TableInput/MoneyCell.js","children":[{"name":"src/inputs/TableInput/MoneyCell.tsx","uid":"9c75-45"}]},{"name":"inputs/TableInput/MoneyEditCell.js","children":[{"name":"src/inputs/TableInput/MoneyEditCell.tsx","uid":"9c75-47"}]},{"name":"inputs/TableInput/LocalDateCell.js","children":[{"name":"src/inputs/TableInput/LocalDateCell.tsx","uid":"9c75-49"}]},{"name":"inputs/TableInput/CheckboxEditCell.js","children":[{"name":"src/inputs/TableInput/CheckboxEditCell.tsx","uid":"9c75-51"}]},{"name":"inputs/TableInput/LocalDateEditCell.js","children":[{"name":"src/inputs/TableInput/LocalDateEditCell.tsx","uid":"9c75-53"}]},{"name":"inputs/TableInput/MoneySumFooter.js","children":[{"name":"src/inputs/TableInput/MoneySumFooter.tsx","uid":"9c75-55"}]},{"name":"inputs/TableInput/StringEditCell.js","children":[{"name":"src/inputs/TableInput/StringEditCell.tsx","uid":"9c75-57"}]},{"name":"inputs/TableInput/DropdownCell.js","children":[{"name":"src/inputs/TableInput/DropdownCell.tsx","uid":"9c75-59"}]},{"name":"inputs/TableInput/HoverCell.js","children":[{"name":"src/inputs/TableInput/HoverCell.tsx","uid":"9c75-61"}]},{"name":"inputs/ScriptelInput/ScriptelInput.js","children":[{"name":"src/inputs/ScriptelInput/ScriptelInput.tsx","uid":"9c75-63"}]},{"name":"inputs/CreditCardInput/CreditCardInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardInput.tsx","uid":"9c75-65"}]},{"name":"money/MoneyCurrencyInput/MoneyCurrencyInput.js","children":[{"name":"src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","uid":"9c75-67"}]},{"name":"inputs/SinInput/SinInput.js","children":[{"name":"src/inputs/SinInput/SinInput.tsx","uid":"9c75-69"}]},{"name":"money/MoneyInput/MoneyInput.js","children":[{"name":"src/money/MoneyInput/MoneyInput.tsx","uid":"9c75-71"}]},{"name":"inputs/Scriptel/scriptel/enums.js","children":[{"name":"src/inputs/Scriptel/scriptel/enums.ts","uid":"9c75-73"}]},{"name":"step/stepContext.js","children":[{"name":"src/step/stepContext.ts","uid":"9c75-75"}]},{"name":"date/DatePicker/styles.css.js","children":[{"name":"src/date/DatePicker/styles.css","uid":"9c75-77"}]},{"name":"date/LocalDatePicker/MaskedDateInput.js","children":[{"name":"src/date/LocalDatePicker/MaskedDateInput.tsx","uid":"9c75-79"}]},{"name":"inputs/Scriptel/ScriptelContext.js","children":[{"name":"src/inputs/Scriptel/ScriptelContext.ts","uid":"9c75-81"}]},{"name":"date/LocalTimePicker/MaskedTimeInput.js","children":[{"name":"src/date/LocalTimePicker/MaskedTimeInput.tsx","uid":"9c75-83"}]},{"name":"inputs/CreditCardInput/styles.css.js","children":[{"name":"src/inputs/CreditCardInput/styles.css","uid":"9c75-85"}]},{"name":"inputs/CreditCardInput/CreditCardNumberInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardNumberInput.tsx","uid":"9c75-87"}]},{"name":"inputs/Scriptel/scriptel/index.js","children":[{"name":"src/inputs/Scriptel/scriptel/index.ts","uid":"9c75-89"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/mike/dev/thx/node_modules/style-inject/dist/style-inject.es.js","uid":"9c75-91"}]}],"isRoot":true},"nodeParts":{"9c75-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"9c75-0"},"9c75-3":{"renderedLength":2155,"gzipLength":770,"brotliLength":660,"mainUid":"9c75-2"},"9c75-5":{"renderedLength":113,"gzipLength":106,"brotliLength":82,"mainUid":"9c75-4"},"9c75-7":{"renderedLength":203,"gzipLength":157,"brotliLength":111,"mainUid":"9c75-6"},"9c75-9":{"renderedLength":440,"gzipLength":270,"brotliLength":214,"mainUid":"9c75-8"},"9c75-11":{"renderedLength":3529,"gzipLength":1021,"brotliLength":861,"mainUid":"9c75-10"},"9c75-13":{"renderedLength":1487,"gzipLength":502,"brotliLength":423,"mainUid":"9c75-12"},"9c75-15":{"renderedLength":312,"gzipLength":199,"brotliLength":173,"mainUid":"9c75-14"},"9c75-17":{"renderedLength":1096,"gzipLength":407,"brotliLength":339,"mainUid":"9c75-16"},"9c75-19":{"renderedLength":1135,"gzipLength":503,"brotliLength":415,"mainUid":"9c75-18"},"9c75-21":{"renderedLength":1965,"gzipLength":657,"brotliLength":544,"mainUid":"9c75-20"},"9c75-23":{"renderedLength":1229,"gzipLength":491,"brotliLength":424,"mainUid":"9c75-22"},"9c75-25":{"renderedLength":1553,"gzipLength":580,"brotliLength":461,"mainUid":"9c75-24"},"9c75-27":{"renderedLength":600,"gzipLength":307,"brotliLength":267,"mainUid":"9c75-26"},"9c75-29":{"renderedLength":2930,"gzipLength":959,"brotliLength":816,"mainUid":"9c75-28"},"9c75-31":{"renderedLength":390,"gzipLength":237,"brotliLength":203,"mainUid":"9c75-30"},"9c75-33":{"renderedLength":1275,"gzipLength":476,"brotliLength":406,"mainUid":"9c75-32"},"9c75-35":{"renderedLength":275,"gzipLength":163,"brotliLength":130,"mainUid":"9c75-34"},"9c75-37":{"renderedLength":1205,"gzipLength":488,"brotliLength":402,"mainUid":"9c75-36"},"9c75-39":{"renderedLength":561,"gzipLength":301,"brotliLength":259,"mainUid":"9c75-38"},"9c75-41":{"renderedLength":381,"gzipLength":248,"brotliLength":218,"mainUid":"9c75-40"},"9c75-43":{"renderedLength":2788,"gzipLength":828,"brotliLength":734,"mainUid":"9c75-42"},"9c75-45":{"renderedLength":257,"gzipLength":187,"brotliLength":149,"mainUid":"9c75-44"},"9c75-47":{"renderedLength":620,"gzipLength":346,"brotliLength":310,"mainUid":"9c75-46"},"9c75-49":{"renderedLength":264,"gzipLength":191,"brotliLength":154,"mainUid":"9c75-48"},"9c75-51":{"renderedLength":746,"gzipLength":384,"brotliLength":333,"mainUid":"9c75-50"},"9c75-53":{"renderedLength":622,"gzipLength":322,"brotliLength":263,"mainUid":"9c75-52"},"9c75-55":{"renderedLength":414,"gzipLength":261,"brotliLength":219,"mainUid":"9c75-54"},"9c75-57":{"renderedLength":717,"gzipLength":369,"brotliLength":319,"mainUid":"9c75-56"},"9c75-59":{"renderedLength":493,"gzipLength":255,"brotliLength":211,"mainUid":"9c75-58"},"9c75-61":{"renderedLength":403,"gzipLength":245,"brotliLength":195,"mainUid":"9c75-60"},"9c75-63":{"renderedLength":1963,"gzipLength":648,"brotliLength":547,"mainUid":"9c75-62"},"9c75-65":{"renderedLength":2324,"gzipLength":586,"brotliLength":495,"mainUid":"9c75-64"},"9c75-67":{"renderedLength":1575,"gzipLength":642,"brotliLength":536,"mainUid":"9c75-66"},"9c75-69":{"renderedLength":1144,"gzipLength":530,"brotliLength":462,"mainUid":"9c75-68"},"9c75-71":{"renderedLength":778,"gzipLength":392,"brotliLength":329,"mainUid":"9c75-70"},"9c75-73":{"renderedLength":937,"gzipLength":292,"brotliLength":231,"mainUid":"9c75-72"},"9c75-75":{"renderedLength":80,"gzipLength":90,"brotliLength":72,"mainUid":"9c75-74"},"9c75-77":{"renderedLength":538,"gzipLength":263,"brotliLength":211,"mainUid":"9c75-76"},"9c75-79":{"renderedLength":464,"gzipLength":299,"brotliLength":256,"mainUid":"9c75-78"},"9c75-81":{"renderedLength":46,"gzipLength":60,"brotliLength":45,"mainUid":"9c75-80"},"9c75-83":{"renderedLength":446,"gzipLength":290,"brotliLength":241,"mainUid":"9c75-82"},"9c75-85":{"renderedLength":78,"gzipLength":92,"brotliLength":79,"mainUid":"9c75-84"},"9c75-87":{"renderedLength":1713,"gzipLength":687,"brotliLength":585,"mainUid":"9c75-86"},"9c75-89":{"renderedLength":2530,"gzipLength":860,"brotliLength":739,"mainUid":"9c75-88"},"9c75-91":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"9c75-90"}},"nodeMetas":{"9c75-0":{"id":"/src/index.ts","moduleParts":{"index.js":"9c75-1"},"imported":[{"uid":"9c75-92"},{"uid":"9c75-93"},{"uid":"9c75-94"},{"uid":"9c75-95"},{"uid":"9c75-96"},{"uid":"9c75-97"},{"uid":"9c75-98"},{"uid":"9c75-99"},{"uid":"9c75-100"},{"uid":"9c75-101"},{"uid":"9c75-102"},{"uid":"9c75-103"},{"uid":"9c75-104"},{"uid":"9c75-105"},{"uid":"9c75-106"},{"uid":"9c75-2"},{"uid":"9c75-107"},{"uid":"9c75-108"},{"uid":"9c75-109"}],"importedBy":[],"isEntry":true},"9c75-2":{"id":"/src/money/useMoneyInput.ts","moduleParts":{"money/useMoneyInput.js":"9c75-3"},"imported":[{"uid":"9c75-110"},{"uid":"9c75-111"},{"uid":"9c75-112"},{"uid":"9c75-113"},{"uid":"9c75-114"}],"importedBy":[{"uid":"9c75-0"},{"uid":"9c75-70"},{"uid":"9c75-66"}]},"9c75-4":{"id":"/src/step/useStep.ts","moduleParts":{"step/useStep.js":"9c75-5"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-74"}],"importedBy":[{"uid":"9c75-109"},{"uid":"9c75-8"}]},"9c75-6":{"id":"/src/step/Step.tsx","moduleParts":{"step/Step.js":"9c75-7"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"}],"importedBy":[{"uid":"9c75-109"},{"uid":"9c75-10"}]},"9c75-8":{"id":"/src/step/FormStep.tsx","moduleParts":{"step/FormStep.js":"9c75-9"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-4"}],"importedBy":[{"uid":"9c75-109"},{"uid":"9c75-10"}]},"9c75-10":{"id":"/src/step/StepProvider.tsx","moduleParts":{"step/StepProvider.js":"9c75-11"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-127"},{"uid":"9c75-118"},{"uid":"9c75-8"},{"uid":"9c75-6"},{"uid":"9c75-74"}],"importedBy":[{"uid":"9c75-109"}]},"9c75-12":{"id":"/src/inputs/MaskedInput/useMaskedInput.ts","moduleParts":{"inputs/MaskedInput/useMaskedInput.js":"9c75-13"},"imported":[{"uid":"9c75-111"},{"uid":"9c75-112"},{"uid":"9c75-114"},{"uid":"9c75-122"}],"importedBy":[{"uid":"9c75-99"},{"uid":"9c75-30"},{"uid":"9c75-68"},{"uid":"9c75-86"}]},"9c75-14":{"id":"/src/inputs/TableInput/addRowOnTab.ts","moduleParts":{"inputs/TableInput/addRowOnTab.js":"9c75-15"},"imported":[],"importedBy":[{"uid":"9c75-106"},{"uid":"9c75-46"},{"uid":"9c75-50"},{"uid":"9c75-56"}]},"9c75-16":{"id":"/src/date/LocalDatePicker/LocalDatePicker.tsx","moduleParts":{"date/LocalDatePicker/LocalDatePicker.js":"9c75-17"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-115"},{"uid":"9c75-111"},{"uid":"9c75-116"},{"uid":"9c75-76"},{"uid":"9c75-78"}],"importedBy":[{"uid":"9c75-92"}]},"9c75-18":{"id":"/src/date/LocalMonthSelect/LocalMonthSelect.tsx","moduleParts":{"date/LocalMonthSelect/LocalMonthSelect.js":"9c75-19"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-117"},{"uid":"9c75-111"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-93"}]},"9c75-20":{"id":"/src/date/MonthDayPicker/MonthDayPicker.tsx","moduleParts":{"date/MonthDayPicker/MonthDayPicker.js":"9c75-21"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-115"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-116"}],"importedBy":[{"uid":"9c75-95"}]},"9c75-22":{"id":"/src/date/MonthYearPicker/MonthYearPicker.tsx","moduleParts":{"date/MonthYearPicker/MonthYearPicker.js":"9c75-23"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-117"},{"uid":"9c75-115"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-116"}],"importedBy":[{"uid":"9c75-96"}]},"9c75-24":{"id":"/src/date/YearSelect/YearSelect.tsx","moduleParts":{"date/YearSelect/YearSelect.js":"9c75-25"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-97"}]},"9c75-26":{"id":"/src/form/TForm/TForm.tsx","moduleParts":{"form/TForm/TForm.js":"9c75-27"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-119"},{"uid":"9c75-28"}],"importedBy":[{"uid":"9c75-98"}]},"9c75-28":{"id":"/src/form/TForm/useTForm.tsx","moduleParts":{"form/TForm/useTForm.js":"9c75-29"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-120"},{"uid":"9c75-119"},{"uid":"9c75-121"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-98"},{"uid":"9c75-26"}]},"9c75-30":{"id":"/src/inputs/MaskedInput/MaskedInput.tsx","moduleParts":{"inputs/MaskedInput/MaskedInput.js":"9c75-31"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-12"}],"importedBy":[{"uid":"9c75-99"}]},"9c75-32":{"id":"/src/inputs/Scriptel/Scriptel.tsx","moduleParts":{"inputs/Scriptel/Scriptel.js":"9c75-33"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-80"},{"uid":"9c75-88"}],"importedBy":[{"uid":"9c75-101"},{"uid":"9c75-34"}]},"9c75-34":{"id":"/src/inputs/Scriptel/withScriptel.tsx","moduleParts":{"inputs/Scriptel/withScriptel.js":"9c75-35"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-32"}],"importedBy":[{"uid":"9c75-101"}]},"9c75-36":{"id":"/src/date/LocalTimePicker/LocalTimePicker.tsx","moduleParts":{"date/LocalTimePicker/LocalTimePicker.js":"9c75-37"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-117"},{"uid":"9c75-115"},{"uid":"9c75-111"},{"uid":"9c75-116"},{"uid":"9c75-82"}],"importedBy":[{"uid":"9c75-94"}]},"9c75-38":{"id":"/src/inputs/RadioGroup/RadioGroup.tsx","moduleParts":{"inputs/RadioGroup/RadioGroup.js":"9c75-39"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-100"}]},"9c75-40":{"id":"/src/inputs/PhoneInput/PhoneInput.tsx","moduleParts":{"inputs/PhoneInput/PhoneInput.js":"9c75-41"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-99"}],"importedBy":[{"uid":"9c75-103"}]},"9c75-42":{"id":"/src/inputs/TableInput/TableInput.tsx","moduleParts":{"inputs/TableInput/TableInput.js":"9c75-43"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-119"},{"uid":"9c75-126"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-44":{"id":"/src/inputs/TableInput/MoneyCell.tsx","moduleParts":{"inputs/TableInput/MoneyCell.js":"9c75-45"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-110"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-46":{"id":"/src/inputs/TableInput/MoneyEditCell.tsx","moduleParts":{"inputs/TableInput/MoneyEditCell.js":"9c75-47"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-107"},{"uid":"9c75-14"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-48":{"id":"/src/inputs/TableInput/LocalDateCell.tsx","moduleParts":{"inputs/TableInput/LocalDateCell.js":"9c75-49"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-115"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-50":{"id":"/src/inputs/TableInput/CheckboxEditCell.tsx","moduleParts":{"inputs/TableInput/CheckboxEditCell.js":"9c75-51"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-14"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-52":{"id":"/src/inputs/TableInput/LocalDateEditCell.tsx","moduleParts":{"inputs/TableInput/LocalDateEditCell.js":"9c75-53"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-92"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-54":{"id":"/src/inputs/TableInput/MoneySumFooter.tsx","moduleParts":{"inputs/TableInput/MoneySumFooter.js":"9c75-55"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-110"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-56":{"id":"/src/inputs/TableInput/StringEditCell.tsx","moduleParts":{"inputs/TableInput/StringEditCell.js":"9c75-57"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-14"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-58":{"id":"/src/inputs/TableInput/DropdownCell.tsx","moduleParts":{"inputs/TableInput/DropdownCell.js":"9c75-59"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-118"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-60":{"id":"/src/inputs/TableInput/HoverCell.tsx","moduleParts":{"inputs/TableInput/HoverCell.js":"9c75-61"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"}],"importedBy":[{"uid":"9c75-106"}]},"9c75-62":{"id":"/src/inputs/ScriptelInput/ScriptelInput.tsx","moduleParts":{"inputs/ScriptelInput/ScriptelInput.js":"9c75-63"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-80"}],"importedBy":[{"uid":"9c75-102"}]},"9c75-64":{"id":"/src/inputs/CreditCardInput/CreditCardInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardInput.js":"9c75-65"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-115"},{"uid":"9c75-111"},{"uid":"9c75-123"},{"uid":"9c75-124"},{"uid":"9c75-118"},{"uid":"9c75-96"},{"uid":"9c75-86"},{"uid":"9c75-84"}],"importedBy":[{"uid":"9c75-104"}]},"9c75-66":{"id":"/src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","moduleParts":{"money/MoneyCurrencyInput/MoneyCurrencyInput.js":"9c75-67"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-110"},{"uid":"9c75-111"},{"uid":"9c75-113"},{"uid":"9c75-118"},{"uid":"9c75-2"}],"importedBy":[{"uid":"9c75-108"}]},"9c75-68":{"id":"/src/inputs/SinInput/SinInput.tsx","moduleParts":{"inputs/SinInput/SinInput.js":"9c75-69"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-118"},{"uid":"9c75-125"},{"uid":"9c75-12"}],"importedBy":[{"uid":"9c75-105"}]},"9c75-70":{"id":"/src/money/MoneyInput/MoneyInput.tsx","moduleParts":{"money/MoneyInput/MoneyInput.js":"9c75-71"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-110"},{"uid":"9c75-111"},{"uid":"9c75-113"},{"uid":"9c75-118"},{"uid":"9c75-2"}],"importedBy":[{"uid":"9c75-107"}]},"9c75-72":{"id":"/src/inputs/Scriptel/scriptel/enums.ts","moduleParts":{"inputs/Scriptel/scriptel/enums.js":"9c75-73"},"imported":[],"importedBy":[{"uid":"9c75-101"},{"uid":"9c75-88"}]},"9c75-74":{"id":"/src/step/stepContext.ts","moduleParts":{"step/stepContext.js":"9c75-75"},"imported":[{"uid":"9c75-114"}],"importedBy":[{"uid":"9c75-4"},{"uid":"9c75-10"}]},"9c75-76":{"id":"/src/date/DatePicker/styles.css","moduleParts":{"date/DatePicker/styles.css.js":"9c75-77"},"imported":[{"uid":"9c75-90"}],"importedBy":[{"uid":"9c75-16"},{"uid":"9c75-116"}]},"9c75-78":{"id":"/src/date/LocalDatePicker/MaskedDateInput.tsx","moduleParts":{"date/LocalDatePicker/MaskedDateInput.js":"9c75-79"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-99"}],"importedBy":[{"uid":"9c75-16"}]},"9c75-80":{"id":"/src/inputs/Scriptel/ScriptelContext.ts","moduleParts":{"inputs/Scriptel/ScriptelContext.js":"9c75-81"},"imported":[{"uid":"9c75-114"}],"importedBy":[{"uid":"9c75-32"},{"uid":"9c75-62"}]},"9c75-82":{"id":"/src/date/LocalTimePicker/MaskedTimeInput.tsx","moduleParts":{"date/LocalTimePicker/MaskedTimeInput.js":"9c75-83"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-111"},{"uid":"9c75-99"}],"importedBy":[{"uid":"9c75-36"}]},"9c75-84":{"id":"/src/inputs/CreditCardInput/styles.css","moduleParts":{"inputs/CreditCardInput/styles.css.js":"9c75-85"},"imported":[{"uid":"9c75-90"}],"importedBy":[{"uid":"9c75-64"}]},"9c75-86":{"id":"/src/inputs/CreditCardInput/CreditCardNumberInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardNumberInput.js":"9c75-87"},"imported":[{"uid":"9c75-114"},{"uid":"9c75-130"},{"uid":"9c75-111"},{"uid":"9c75-131"},{"uid":"9c75-118"},{"uid":"9c75-12"}],"importedBy":[{"uid":"9c75-64"}]},"9c75-88":{"id":"/src/inputs/Scriptel/scriptel/index.ts","moduleParts":{"inputs/Scriptel/scriptel/index.js":"9c75-89"},"imported":[{"uid":"9c75-111"},{"uid":"9c75-129"},{"uid":"9c75-72"}],"importedBy":[{"uid":"9c75-32"}]},"9c75-90":{"id":"/home/mike/dev/thx/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"9c75-91"},"imported":[],"importedBy":[{"uid":"9c75-76"},{"uid":"9c75-84"}]},"9c75-92":{"id":"/src/date/LocalDatePicker/index.ts","moduleParts":{},"imported":[{"uid":"9c75-16"}],"importedBy":[{"uid":"9c75-0"},{"uid":"9c75-52"}]},"9c75-93":{"id":"/src/date/LocalMonthSelect/index.ts","moduleParts":{},"imported":[{"uid":"9c75-18"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-94":{"id":"/src/date/LocalTimePicker/index.ts","moduleParts":{},"imported":[{"uid":"9c75-36"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-95":{"id":"/src/date/MonthDayPicker/index.ts","moduleParts":{},"imported":[{"uid":"9c75-20"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-96":{"id":"/src/date/MonthYearPicker/index.ts","moduleParts":{},"imported":[{"uid":"9c75-22"}],"importedBy":[{"uid":"9c75-0"},{"uid":"9c75-64"}]},"9c75-97":{"id":"/src/date/YearSelect/index.ts","moduleParts":{},"imported":[{"uid":"9c75-24"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-98":{"id":"/src/form/TForm/index.ts","moduleParts":{},"imported":[{"uid":"9c75-26"},{"uid":"9c75-28"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-99":{"id":"/src/inputs/MaskedInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-30"},{"uid":"9c75-12"}],"importedBy":[{"uid":"9c75-0"},{"uid":"9c75-40"},{"uid":"9c75-78"},{"uid":"9c75-82"}]},"9c75-100":{"id":"/src/inputs/RadioGroup/index.ts","moduleParts":{},"imported":[{"uid":"9c75-38"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-101":{"id":"/src/inputs/Scriptel/index.ts","moduleParts":{},"imported":[{"uid":"9c75-32"},{"uid":"9c75-34"},{"uid":"9c75-72"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-102":{"id":"/src/inputs/ScriptelInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-62"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-103":{"id":"/src/inputs/PhoneInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-40"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-104":{"id":"/src/inputs/CreditCardInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-64"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-105":{"id":"/src/inputs/SinInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-68"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-106":{"id":"/src/inputs/TableInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-42"},{"uid":"9c75-44"},{"uid":"9c75-46"},{"uid":"9c75-48"},{"uid":"9c75-50"},{"uid":"9c75-52"},{"uid":"9c75-54"},{"uid":"9c75-56"},{"uid":"9c75-58"},{"uid":"9c75-60"},{"uid":"9c75-14"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-107":{"id":"/src/money/MoneyInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-70"}],"importedBy":[{"uid":"9c75-0"},{"uid":"9c75-46"}]},"9c75-108":{"id":"/src/money/MoneyCurrencyInput/index.ts","moduleParts":{},"imported":[{"uid":"9c75-66"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-109":{"id":"/src/step/index.ts","moduleParts":{},"imported":[{"uid":"9c75-6"},{"uid":"9c75-4"},{"uid":"9c75-8"},{"uid":"9c75-10"}],"importedBy":[{"uid":"9c75-0"}]},"9c75-110":{"id":"@thx/money","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-2"},{"uid":"9c75-44"},{"uid":"9c75-54"},{"uid":"9c75-70"},{"uid":"9c75-66"}],"isExternal":true},"9c75-111":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-2"},{"uid":"9c75-16"},{"uid":"9c75-18"},{"uid":"9c75-36"},{"uid":"9c75-20"},{"uid":"9c75-22"},{"uid":"9c75-24"},{"uid":"9c75-26"},{"uid":"9c75-30"},{"uid":"9c75-12"},{"uid":"9c75-38"},{"uid":"9c75-32"},{"uid":"9c75-62"},{"uid":"9c75-40"},{"uid":"9c75-64"},{"uid":"9c75-68"},{"uid":"9c75-42"},{"uid":"9c75-46"},{"uid":"9c75-50"},{"uid":"9c75-52"},{"uid":"9c75-56"},{"uid":"9c75-60"},{"uid":"9c75-70"},{"uid":"9c75-66"},{"uid":"9c75-6"},{"uid":"9c75-8"},{"uid":"9c75-10"},{"uid":"9c75-78"},{"uid":"9c75-82"},{"uid":"9c75-88"},{"uid":"9c75-86"}],"isExternal":true},"9c75-112":{"id":"inputmask","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-2"},{"uid":"9c75-12"}],"isExternal":true},"9c75-113":{"id":"js-money","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-2"},{"uid":"9c75-70"},{"uid":"9c75-66"}],"isExternal":true},"9c75-114":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-2"},{"uid":"9c75-16"},{"uid":"9c75-18"},{"uid":"9c75-36"},{"uid":"9c75-20"},{"uid":"9c75-22"},{"uid":"9c75-24"},{"uid":"9c75-26"},{"uid":"9c75-28"},{"uid":"9c75-30"},{"uid":"9c75-12"},{"uid":"9c75-38"},{"uid":"9c75-32"},{"uid":"9c75-34"},{"uid":"9c75-62"},{"uid":"9c75-40"},{"uid":"9c75-64"},{"uid":"9c75-68"},{"uid":"9c75-42"},{"uid":"9c75-44"},{"uid":"9c75-46"},{"uid":"9c75-48"},{"uid":"9c75-50"},{"uid":"9c75-52"},{"uid":"9c75-54"},{"uid":"9c75-56"},{"uid":"9c75-58"},{"uid":"9c75-60"},{"uid":"9c75-70"},{"uid":"9c75-66"},{"uid":"9c75-6"},{"uid":"9c75-4"},{"uid":"9c75-8"},{"uid":"9c75-10"},{"uid":"9c75-78"},{"uid":"9c75-82"},{"uid":"9c75-80"},{"uid":"9c75-86"},{"uid":"9c75-74"}],"isExternal":true},"9c75-115":{"id":"@thx/date","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-16"},{"uid":"9c75-36"},{"uid":"9c75-20"},{"uid":"9c75-22"},{"uid":"9c75-64"},{"uid":"9c75-48"}],"isExternal":true},"9c75-116":{"id":"/src/date/DatePicker/index.ts","moduleParts":{},"imported":[{"uid":"9c75-128"},{"uid":"9c75-76"}],"importedBy":[{"uid":"9c75-16"},{"uid":"9c75-36"},{"uid":"9c75-20"},{"uid":"9c75-22"}]},"9c75-117":{"id":"@js-joda/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-18"},{"uid":"9c75-36"},{"uid":"9c75-22"}],"isExternal":true},"9c75-118":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-18"},{"uid":"9c75-20"},{"uid":"9c75-22"},{"uid":"9c75-24"},{"uid":"9c75-28"},{"uid":"9c75-30"},{"uid":"9c75-38"},{"uid":"9c75-62"},{"uid":"9c75-64"},{"uid":"9c75-68"},{"uid":"9c75-42"},{"uid":"9c75-50"},{"uid":"9c75-56"},{"uid":"9c75-58"},{"uid":"9c75-70"},{"uid":"9c75-66"},{"uid":"9c75-10"},{"uid":"9c75-86"}],"isExternal":true},"9c75-119":{"id":"formik","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-26"},{"uid":"9c75-28"},{"uid":"9c75-42"}],"isExternal":true},"9c75-120":{"id":"flat","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-28"}],"isExternal":true},"9c75-121":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-28"}],"isExternal":true},"9c75-122":{"id":"use-deep-compare-effect","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-12"}],"isExternal":true},"9c75-123":{"id":"react-credit-cards","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-64"}],"isExternal":true},"9c75-124":{"id":"react-credit-cards/es/styles-compiled.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-64"}],"isExternal":true},"9c75-125":{"id":"social-insurance-number","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-68"}],"isExternal":true},"9c75-126":{"id":"react-table","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-42"}],"isExternal":true},"9c75-127":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-10"}],"isExternal":true},"9c75-128":{"id":"react-datepicker","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-116"}],"isExternal":true},"9c75-129":{"id":"eventemitter3","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-88"}],"isExternal":true},"9c75-130":{"id":"credit-card-type","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-86"}],"isExternal":true},"9c75-131":{"id":"luhn","moduleParts":{},"imported":[],"importedBy":[{"uid":"9c75-86"}],"isExternal":true}},"env":{"rollup":"2.70.1"},"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":"3376-1"}]},{"name":"money/useMoneyInput.js","children":[{"name":"src/money/useMoneyInput.ts","uid":"3376-3"}]},{"name":"step/useStep.js","children":[{"name":"src/step/useStep.ts","uid":"3376-5"}]},{"name":"step/Step.js","children":[{"name":"src/step/Step.tsx","uid":"3376-7"}]},{"name":"step/FormStep.js","children":[{"name":"src/step/FormStep.tsx","uid":"3376-9"}]},{"name":"step/StepProvider.js","children":[{"name":"src/step/StepProvider.tsx","uid":"3376-11"}]},{"name":"inputs/MaskedInput/useMaskedInput.js","children":[{"name":"src/inputs/MaskedInput/useMaskedInput.ts","uid":"3376-13"}]},{"name":"inputs/TableInput/addRowOnTab.js","children":[{"name":"src/inputs/TableInput/addRowOnTab.ts","uid":"3376-15"}]},{"name":"date/LocalDatePicker/LocalDatePicker.js","children":[{"name":"src/date/LocalDatePicker/LocalDatePicker.tsx","uid":"3376-17"}]},{"name":"date/LocalMonthSelect/LocalMonthSelect.js","children":[{"name":"src/date/LocalMonthSelect/LocalMonthSelect.tsx","uid":"3376-19"}]},{"name":"date/LocalTimePicker/LocalTimePicker.js","children":[{"name":"src/date/LocalTimePicker/LocalTimePicker.tsx","uid":"3376-21"}]},{"name":"date/MonthDayPicker/MonthDayPicker.js","children":[{"name":"src/date/MonthDayPicker/MonthDayPicker.tsx","uid":"3376-23"}]},{"name":"date/MonthYearPicker/MonthYearPicker.js","children":[{"name":"src/date/MonthYearPicker/MonthYearPicker.tsx","uid":"3376-25"}]},{"name":"date/YearSelect/YearSelect.js","children":[{"name":"src/date/YearSelect/YearSelect.tsx","uid":"3376-27"}]},{"name":"form/TForm/TForm.js","children":[{"name":"src/form/TForm/TForm.tsx","uid":"3376-29"}]},{"name":"form/TForm/useTForm.js","children":[{"name":"src/form/TForm/useTForm.tsx","uid":"3376-31"}]},{"name":"inputs/MaskedInput/MaskedInput.js","children":[{"name":"src/inputs/MaskedInput/MaskedInput.tsx","uid":"3376-33"}]},{"name":"inputs/RadioGroup/RadioGroup.js","children":[{"name":"src/inputs/RadioGroup/RadioGroup.tsx","uid":"3376-35"}]},{"name":"inputs/Scriptel/Scriptel.js","children":[{"name":"src/inputs/Scriptel/Scriptel.tsx","uid":"3376-37"}]},{"name":"inputs/Scriptel/withScriptel.js","children":[{"name":"src/inputs/Scriptel/withScriptel.tsx","uid":"3376-39"}]},{"name":"inputs/ScriptelInput/ScriptelInput.js","children":[{"name":"src/inputs/ScriptelInput/ScriptelInput.tsx","uid":"3376-41"}]},{"name":"inputs/PhoneInput/PhoneInput.js","children":[{"name":"src/inputs/PhoneInput/PhoneInput.tsx","uid":"3376-43"}]},{"name":"inputs/CreditCardInput/CreditCardInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardInput.tsx","uid":"3376-45"}]},{"name":"inputs/SinInput/SinInput.js","children":[{"name":"src/inputs/SinInput/SinInput.tsx","uid":"3376-47"}]},{"name":"inputs/TableInput/TableInput.js","children":[{"name":"src/inputs/TableInput/TableInput.tsx","uid":"3376-49"}]},{"name":"inputs/TableInput/MoneyCell.js","children":[{"name":"src/inputs/TableInput/MoneyCell.tsx","uid":"3376-51"}]},{"name":"inputs/TableInput/MoneyEditCell.js","children":[{"name":"src/inputs/TableInput/MoneyEditCell.tsx","uid":"3376-53"}]},{"name":"inputs/TableInput/LocalDateCell.js","children":[{"name":"src/inputs/TableInput/LocalDateCell.tsx","uid":"3376-55"}]},{"name":"inputs/TableInput/CheckboxEditCell.js","children":[{"name":"src/inputs/TableInput/CheckboxEditCell.tsx","uid":"3376-57"}]},{"name":"inputs/TableInput/LocalDateEditCell.js","children":[{"name":"src/inputs/TableInput/LocalDateEditCell.tsx","uid":"3376-59"}]},{"name":"inputs/TableInput/MoneySumFooter.js","children":[{"name":"src/inputs/TableInput/MoneySumFooter.tsx","uid":"3376-61"}]},{"name":"inputs/TableInput/StringEditCell.js","children":[{"name":"src/inputs/TableInput/StringEditCell.tsx","uid":"3376-63"}]},{"name":"inputs/TableInput/DropdownCell.js","children":[{"name":"src/inputs/TableInput/DropdownCell.tsx","uid":"3376-65"}]},{"name":"inputs/TableInput/HoverCell.js","children":[{"name":"src/inputs/TableInput/HoverCell.tsx","uid":"3376-67"}]},{"name":"money/MoneyInput/MoneyInput.js","children":[{"name":"src/money/MoneyInput/MoneyInput.tsx","uid":"3376-69"}]},{"name":"money/MoneyCurrencyInput/MoneyCurrencyInput.js","children":[{"name":"src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","uid":"3376-71"}]},{"name":"inputs/Scriptel/scriptel/enums.js","children":[{"name":"src/inputs/Scriptel/scriptel/enums.ts","uid":"3376-73"}]},{"name":"step/stepContext.js","children":[{"name":"src/step/stepContext.ts","uid":"3376-75"}]},{"name":"date/DatePicker/styles.css.js","children":[{"name":"src/date/DatePicker/styles.css","uid":"3376-77"}]},{"name":"inputs/CreditCardInput/styles.css.js","children":[{"name":"src/inputs/CreditCardInput/styles.css","uid":"3376-79"}]},{"name":"date/LocalDatePicker/MaskedDateInput.js","children":[{"name":"src/date/LocalDatePicker/MaskedDateInput.tsx","uid":"3376-81"}]},{"name":"date/LocalTimePicker/MaskedTimeInput.js","children":[{"name":"src/date/LocalTimePicker/MaskedTimeInput.tsx","uid":"3376-83"}]},{"name":"inputs/Scriptel/ScriptelContext.js","children":[{"name":"src/inputs/Scriptel/ScriptelContext.ts","uid":"3376-85"}]},{"name":"inputs/CreditCardInput/CreditCardNumberInput.js","children":[{"name":"src/inputs/CreditCardInput/CreditCardNumberInput.tsx","uid":"3376-87"}]},{"name":"inputs/Scriptel/scriptel/index.js","children":[{"name":"src/inputs/Scriptel/scriptel/index.ts","uid":"3376-89"}]},{"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":"3376-91"}]}],"isRoot":true},"nodeParts":{"3376-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"3376-0"},"3376-3":{"renderedLength":2155,"gzipLength":770,"brotliLength":660,"mainUid":"3376-2"},"3376-5":{"renderedLength":113,"gzipLength":106,"brotliLength":82,"mainUid":"3376-4"},"3376-7":{"renderedLength":203,"gzipLength":157,"brotliLength":111,"mainUid":"3376-6"},"3376-9":{"renderedLength":440,"gzipLength":270,"brotliLength":214,"mainUid":"3376-8"},"3376-11":{"renderedLength":3529,"gzipLength":1021,"brotliLength":861,"mainUid":"3376-10"},"3376-13":{"renderedLength":1487,"gzipLength":502,"brotliLength":423,"mainUid":"3376-12"},"3376-15":{"renderedLength":312,"gzipLength":199,"brotliLength":173,"mainUid":"3376-14"},"3376-17":{"renderedLength":2742,"gzipLength":822,"brotliLength":721,"mainUid":"3376-16"},"3376-19":{"renderedLength":1135,"gzipLength":503,"brotliLength":415,"mainUid":"3376-18"},"3376-21":{"renderedLength":1205,"gzipLength":488,"brotliLength":402,"mainUid":"3376-20"},"3376-23":{"renderedLength":1965,"gzipLength":657,"brotliLength":544,"mainUid":"3376-22"},"3376-25":{"renderedLength":1229,"gzipLength":491,"brotliLength":424,"mainUid":"3376-24"},"3376-27":{"renderedLength":1553,"gzipLength":580,"brotliLength":461,"mainUid":"3376-26"},"3376-29":{"renderedLength":600,"gzipLength":307,"brotliLength":267,"mainUid":"3376-28"},"3376-31":{"renderedLength":2930,"gzipLength":959,"brotliLength":816,"mainUid":"3376-30"},"3376-33":{"renderedLength":390,"gzipLength":237,"brotliLength":203,"mainUid":"3376-32"},"3376-35":{"renderedLength":561,"gzipLength":301,"brotliLength":259,"mainUid":"3376-34"},"3376-37":{"renderedLength":1275,"gzipLength":476,"brotliLength":406,"mainUid":"3376-36"},"3376-39":{"renderedLength":275,"gzipLength":163,"brotliLength":130,"mainUid":"3376-38"},"3376-41":{"renderedLength":1963,"gzipLength":648,"brotliLength":547,"mainUid":"3376-40"},"3376-43":{"renderedLength":381,"gzipLength":248,"brotliLength":218,"mainUid":"3376-42"},"3376-45":{"renderedLength":2324,"gzipLength":586,"brotliLength":495,"mainUid":"3376-44"},"3376-47":{"renderedLength":1144,"gzipLength":530,"brotliLength":462,"mainUid":"3376-46"},"3376-49":{"renderedLength":2788,"gzipLength":828,"brotliLength":734,"mainUid":"3376-48"},"3376-51":{"renderedLength":257,"gzipLength":187,"brotliLength":149,"mainUid":"3376-50"},"3376-53":{"renderedLength":708,"gzipLength":368,"brotliLength":313,"mainUid":"3376-52"},"3376-55":{"renderedLength":264,"gzipLength":191,"brotliLength":154,"mainUid":"3376-54"},"3376-57":{"renderedLength":746,"gzipLength":384,"brotliLength":333,"mainUid":"3376-56"},"3376-59":{"renderedLength":695,"gzipLength":350,"brotliLength":295,"mainUid":"3376-58"},"3376-61":{"renderedLength":414,"gzipLength":261,"brotliLength":219,"mainUid":"3376-60"},"3376-63":{"renderedLength":717,"gzipLength":369,"brotliLength":319,"mainUid":"3376-62"},"3376-65":{"renderedLength":493,"gzipLength":255,"brotliLength":211,"mainUid":"3376-64"},"3376-67":{"renderedLength":403,"gzipLength":245,"brotliLength":195,"mainUid":"3376-66"},"3376-69":{"renderedLength":690,"gzipLength":375,"brotliLength":294,"mainUid":"3376-68"},"3376-71":{"renderedLength":1499,"gzipLength":621,"brotliLength":518,"mainUid":"3376-70"},"3376-73":{"renderedLength":937,"gzipLength":292,"brotliLength":231,"mainUid":"3376-72"},"3376-75":{"renderedLength":80,"gzipLength":90,"brotliLength":72,"mainUid":"3376-74"},"3376-77":{"renderedLength":538,"gzipLength":263,"brotliLength":211,"mainUid":"3376-76"},"3376-79":{"renderedLength":78,"gzipLength":92,"brotliLength":79,"mainUid":"3376-78"},"3376-81":{"renderedLength":464,"gzipLength":299,"brotliLength":256,"mainUid":"3376-80"},"3376-83":{"renderedLength":446,"gzipLength":290,"brotliLength":241,"mainUid":"3376-82"},"3376-85":{"renderedLength":46,"gzipLength":60,"brotliLength":45,"mainUid":"3376-84"},"3376-87":{"renderedLength":1713,"gzipLength":687,"brotliLength":585,"mainUid":"3376-86"},"3376-89":{"renderedLength":2530,"gzipLength":860,"brotliLength":739,"mainUid":"3376-88"},"3376-91":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"3376-90"}},"nodeMetas":{"3376-0":{"id":"/src/index.ts","moduleParts":{"index.js":"3376-1"},"imported":[{"uid":"3376-92"},{"uid":"3376-93"},{"uid":"3376-94"},{"uid":"3376-95"},{"uid":"3376-96"},{"uid":"3376-97"},{"uid":"3376-98"},{"uid":"3376-99"},{"uid":"3376-100"},{"uid":"3376-101"},{"uid":"3376-102"},{"uid":"3376-103"},{"uid":"3376-104"},{"uid":"3376-105"},{"uid":"3376-106"},{"uid":"3376-2"},{"uid":"3376-107"},{"uid":"3376-108"},{"uid":"3376-109"}],"importedBy":[],"isEntry":true},"3376-2":{"id":"/src/money/useMoneyInput.ts","moduleParts":{"money/useMoneyInput.js":"3376-3"},"imported":[{"uid":"3376-110"},{"uid":"3376-111"},{"uid":"3376-112"},{"uid":"3376-113"},{"uid":"3376-114"}],"importedBy":[{"uid":"3376-0"},{"uid":"3376-68"},{"uid":"3376-70"}]},"3376-4":{"id":"/src/step/useStep.ts","moduleParts":{"step/useStep.js":"3376-5"},"imported":[{"uid":"3376-114"},{"uid":"3376-74"}],"importedBy":[{"uid":"3376-109"},{"uid":"3376-8"}]},"3376-6":{"id":"/src/step/Step.tsx","moduleParts":{"step/Step.js":"3376-7"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"}],"importedBy":[{"uid":"3376-109"},{"uid":"3376-10"}]},"3376-8":{"id":"/src/step/FormStep.tsx","moduleParts":{"step/FormStep.js":"3376-9"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-4"}],"importedBy":[{"uid":"3376-109"},{"uid":"3376-10"}]},"3376-10":{"id":"/src/step/StepProvider.tsx","moduleParts":{"step/StepProvider.js":"3376-11"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-127"},{"uid":"3376-116"},{"uid":"3376-8"},{"uid":"3376-6"},{"uid":"3376-74"}],"importedBy":[{"uid":"3376-109"}]},"3376-12":{"id":"/src/inputs/MaskedInput/useMaskedInput.ts","moduleParts":{"inputs/MaskedInput/useMaskedInput.js":"3376-13"},"imported":[{"uid":"3376-111"},{"uid":"3376-112"},{"uid":"3376-114"},{"uid":"3376-122"}],"importedBy":[{"uid":"3376-99"},{"uid":"3376-32"},{"uid":"3376-46"},{"uid":"3376-86"}]},"3376-14":{"id":"/src/inputs/TableInput/addRowOnTab.ts","moduleParts":{"inputs/TableInput/addRowOnTab.js":"3376-15"},"imported":[],"importedBy":[{"uid":"3376-106"},{"uid":"3376-52"},{"uid":"3376-56"},{"uid":"3376-62"}]},"3376-16":{"id":"/src/date/LocalDatePicker/LocalDatePicker.tsx","moduleParts":{"date/LocalDatePicker/LocalDatePicker.js":"3376-17"},"imported":[{"uid":"3376-114"},{"uid":"3376-115"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-117"},{"uid":"3376-76"},{"uid":"3376-80"}],"importedBy":[{"uid":"3376-92"}]},"3376-18":{"id":"/src/date/LocalMonthSelect/LocalMonthSelect.tsx","moduleParts":{"date/LocalMonthSelect/LocalMonthSelect.js":"3376-19"},"imported":[{"uid":"3376-114"},{"uid":"3376-118"},{"uid":"3376-111"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-93"}]},"3376-20":{"id":"/src/date/LocalTimePicker/LocalTimePicker.tsx","moduleParts":{"date/LocalTimePicker/LocalTimePicker.js":"3376-21"},"imported":[{"uid":"3376-114"},{"uid":"3376-118"},{"uid":"3376-115"},{"uid":"3376-111"},{"uid":"3376-117"},{"uid":"3376-82"}],"importedBy":[{"uid":"3376-94"}]},"3376-22":{"id":"/src/date/MonthDayPicker/MonthDayPicker.tsx","moduleParts":{"date/MonthDayPicker/MonthDayPicker.js":"3376-23"},"imported":[{"uid":"3376-114"},{"uid":"3376-115"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-117"}],"importedBy":[{"uid":"3376-95"}]},"3376-24":{"id":"/src/date/MonthYearPicker/MonthYearPicker.tsx","moduleParts":{"date/MonthYearPicker/MonthYearPicker.js":"3376-25"},"imported":[{"uid":"3376-114"},{"uid":"3376-118"},{"uid":"3376-115"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-117"}],"importedBy":[{"uid":"3376-96"}]},"3376-26":{"id":"/src/date/YearSelect/YearSelect.tsx","moduleParts":{"date/YearSelect/YearSelect.js":"3376-27"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-97"}]},"3376-28":{"id":"/src/form/TForm/TForm.tsx","moduleParts":{"form/TForm/TForm.js":"3376-29"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-119"},{"uid":"3376-30"}],"importedBy":[{"uid":"3376-98"}]},"3376-30":{"id":"/src/form/TForm/useTForm.tsx","moduleParts":{"form/TForm/useTForm.js":"3376-31"},"imported":[{"uid":"3376-114"},{"uid":"3376-120"},{"uid":"3376-119"},{"uid":"3376-121"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-98"},{"uid":"3376-28"}]},"3376-32":{"id":"/src/inputs/MaskedInput/MaskedInput.tsx","moduleParts":{"inputs/MaskedInput/MaskedInput.js":"3376-33"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-12"}],"importedBy":[{"uid":"3376-99"}]},"3376-34":{"id":"/src/inputs/RadioGroup/RadioGroup.tsx","moduleParts":{"inputs/RadioGroup/RadioGroup.js":"3376-35"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-100"}]},"3376-36":{"id":"/src/inputs/Scriptel/Scriptel.tsx","moduleParts":{"inputs/Scriptel/Scriptel.js":"3376-37"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-84"},{"uid":"3376-88"}],"importedBy":[{"uid":"3376-101"},{"uid":"3376-38"}]},"3376-38":{"id":"/src/inputs/Scriptel/withScriptel.tsx","moduleParts":{"inputs/Scriptel/withScriptel.js":"3376-39"},"imported":[{"uid":"3376-114"},{"uid":"3376-36"}],"importedBy":[{"uid":"3376-101"}]},"3376-40":{"id":"/src/inputs/ScriptelInput/ScriptelInput.tsx","moduleParts":{"inputs/ScriptelInput/ScriptelInput.js":"3376-41"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-84"}],"importedBy":[{"uid":"3376-102"}]},"3376-42":{"id":"/src/inputs/PhoneInput/PhoneInput.tsx","moduleParts":{"inputs/PhoneInput/PhoneInput.js":"3376-43"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-99"}],"importedBy":[{"uid":"3376-103"}]},"3376-44":{"id":"/src/inputs/CreditCardInput/CreditCardInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardInput.js":"3376-45"},"imported":[{"uid":"3376-114"},{"uid":"3376-115"},{"uid":"3376-111"},{"uid":"3376-123"},{"uid":"3376-124"},{"uid":"3376-116"},{"uid":"3376-96"},{"uid":"3376-86"},{"uid":"3376-78"}],"importedBy":[{"uid":"3376-104"}]},"3376-46":{"id":"/src/inputs/SinInput/SinInput.tsx","moduleParts":{"inputs/SinInput/SinInput.js":"3376-47"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-125"},{"uid":"3376-12"}],"importedBy":[{"uid":"3376-105"}]},"3376-48":{"id":"/src/inputs/TableInput/TableInput.tsx","moduleParts":{"inputs/TableInput/TableInput.js":"3376-49"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-119"},{"uid":"3376-126"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-106"}]},"3376-50":{"id":"/src/inputs/TableInput/MoneyCell.tsx","moduleParts":{"inputs/TableInput/MoneyCell.js":"3376-51"},"imported":[{"uid":"3376-114"},{"uid":"3376-110"}],"importedBy":[{"uid":"3376-106"}]},"3376-52":{"id":"/src/inputs/TableInput/MoneyEditCell.tsx","moduleParts":{"inputs/TableInput/MoneyEditCell.js":"3376-53"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-107"},{"uid":"3376-14"}],"importedBy":[{"uid":"3376-106"}]},"3376-54":{"id":"/src/inputs/TableInput/LocalDateCell.tsx","moduleParts":{"inputs/TableInput/LocalDateCell.js":"3376-55"},"imported":[{"uid":"3376-114"},{"uid":"3376-115"}],"importedBy":[{"uid":"3376-106"}]},"3376-56":{"id":"/src/inputs/TableInput/CheckboxEditCell.tsx","moduleParts":{"inputs/TableInput/CheckboxEditCell.js":"3376-57"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-14"}],"importedBy":[{"uid":"3376-106"}]},"3376-58":{"id":"/src/inputs/TableInput/LocalDateEditCell.tsx","moduleParts":{"inputs/TableInput/LocalDateEditCell.js":"3376-59"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-92"}],"importedBy":[{"uid":"3376-106"}]},"3376-60":{"id":"/src/inputs/TableInput/MoneySumFooter.tsx","moduleParts":{"inputs/TableInput/MoneySumFooter.js":"3376-61"},"imported":[{"uid":"3376-114"},{"uid":"3376-110"}],"importedBy":[{"uid":"3376-106"}]},"3376-62":{"id":"/src/inputs/TableInput/StringEditCell.tsx","moduleParts":{"inputs/TableInput/StringEditCell.js":"3376-63"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-116"},{"uid":"3376-14"}],"importedBy":[{"uid":"3376-106"}]},"3376-64":{"id":"/src/inputs/TableInput/DropdownCell.tsx","moduleParts":{"inputs/TableInput/DropdownCell.js":"3376-65"},"imported":[{"uid":"3376-114"},{"uid":"3376-116"}],"importedBy":[{"uid":"3376-106"}]},"3376-66":{"id":"/src/inputs/TableInput/HoverCell.tsx","moduleParts":{"inputs/TableInput/HoverCell.js":"3376-67"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"}],"importedBy":[{"uid":"3376-106"}]},"3376-68":{"id":"/src/money/MoneyInput/MoneyInput.tsx","moduleParts":{"money/MoneyInput/MoneyInput.js":"3376-69"},"imported":[{"uid":"3376-114"},{"uid":"3376-110"},{"uid":"3376-111"},{"uid":"3376-113"},{"uid":"3376-116"},{"uid":"3376-2"}],"importedBy":[{"uid":"3376-107"}]},"3376-70":{"id":"/src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx","moduleParts":{"money/MoneyCurrencyInput/MoneyCurrencyInput.js":"3376-71"},"imported":[{"uid":"3376-114"},{"uid":"3376-110"},{"uid":"3376-111"},{"uid":"3376-113"},{"uid":"3376-116"},{"uid":"3376-2"}],"importedBy":[{"uid":"3376-108"}]},"3376-72":{"id":"/src/inputs/Scriptel/scriptel/enums.ts","moduleParts":{"inputs/Scriptel/scriptel/enums.js":"3376-73"},"imported":[],"importedBy":[{"uid":"3376-101"},{"uid":"3376-88"}]},"3376-74":{"id":"/src/step/stepContext.ts","moduleParts":{"step/stepContext.js":"3376-75"},"imported":[{"uid":"3376-114"}],"importedBy":[{"uid":"3376-4"},{"uid":"3376-10"}]},"3376-76":{"id":"/src/date/DatePicker/styles.css","moduleParts":{"date/DatePicker/styles.css.js":"3376-77"},"imported":[{"uid":"3376-90"}],"importedBy":[{"uid":"3376-16"},{"uid":"3376-117"}]},"3376-78":{"id":"/src/inputs/CreditCardInput/styles.css","moduleParts":{"inputs/CreditCardInput/styles.css.js":"3376-79"},"imported":[{"uid":"3376-90"}],"importedBy":[{"uid":"3376-44"}]},"3376-80":{"id":"/src/date/LocalDatePicker/MaskedDateInput.tsx","moduleParts":{"date/LocalDatePicker/MaskedDateInput.js":"3376-81"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-99"}],"importedBy":[{"uid":"3376-16"}]},"3376-82":{"id":"/src/date/LocalTimePicker/MaskedTimeInput.tsx","moduleParts":{"date/LocalTimePicker/MaskedTimeInput.js":"3376-83"},"imported":[{"uid":"3376-114"},{"uid":"3376-111"},{"uid":"3376-99"}],"importedBy":[{"uid":"3376-20"}]},"3376-84":{"id":"/src/inputs/Scriptel/ScriptelContext.ts","moduleParts":{"inputs/Scriptel/ScriptelContext.js":"3376-85"},"imported":[{"uid":"3376-114"}],"importedBy":[{"uid":"3376-36"},{"uid":"3376-40"}]},"3376-86":{"id":"/src/inputs/CreditCardInput/CreditCardNumberInput.tsx","moduleParts":{"inputs/CreditCardInput/CreditCardNumberInput.js":"3376-87"},"imported":[{"uid":"3376-114"},{"uid":"3376-130"},{"uid":"3376-111"},{"uid":"3376-131"},{"uid":"3376-116"},{"uid":"3376-12"}],"importedBy":[{"uid":"3376-44"}]},"3376-88":{"id":"/src/inputs/Scriptel/scriptel/index.ts","moduleParts":{"inputs/Scriptel/scriptel/index.js":"3376-89"},"imported":[{"uid":"3376-111"},{"uid":"3376-129"},{"uid":"3376-72"}],"importedBy":[{"uid":"3376-36"}]},"3376-90":{"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":"3376-91"},"imported":[],"importedBy":[{"uid":"3376-76"},{"uid":"3376-78"}]},"3376-92":{"id":"/src/date/LocalDatePicker/index.ts","moduleParts":{},"imported":[{"uid":"3376-16"}],"importedBy":[{"uid":"3376-0"},{"uid":"3376-58"}]},"3376-93":{"id":"/src/date/LocalMonthSelect/index.ts","moduleParts":{},"imported":[{"uid":"3376-18"}],"importedBy":[{"uid":"3376-0"}]},"3376-94":{"id":"/src/date/LocalTimePicker/index.ts","moduleParts":{},"imported":[{"uid":"3376-20"}],"importedBy":[{"uid":"3376-0"}]},"3376-95":{"id":"/src/date/MonthDayPicker/index.ts","moduleParts":{},"imported":[{"uid":"3376-22"}],"importedBy":[{"uid":"3376-0"}]},"3376-96":{"id":"/src/date/MonthYearPicker/index.ts","moduleParts":{},"imported":[{"uid":"3376-24"}],"importedBy":[{"uid":"3376-0"},{"uid":"3376-44"}]},"3376-97":{"id":"/src/date/YearSelect/index.ts","moduleParts":{},"imported":[{"uid":"3376-26"}],"importedBy":[{"uid":"3376-0"}]},"3376-98":{"id":"/src/form/TForm/index.ts","moduleParts":{},"imported":[{"uid":"3376-28"},{"uid":"3376-30"}],"importedBy":[{"uid":"3376-0"}]},"3376-99":{"id":"/src/inputs/MaskedInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-32"},{"uid":"3376-12"}],"importedBy":[{"uid":"3376-0"},{"uid":"3376-42"},{"uid":"3376-80"},{"uid":"3376-82"}]},"3376-100":{"id":"/src/inputs/RadioGroup/index.ts","moduleParts":{},"imported":[{"uid":"3376-34"}],"importedBy":[{"uid":"3376-0"}]},"3376-101":{"id":"/src/inputs/Scriptel/index.ts","moduleParts":{},"imported":[{"uid":"3376-36"},{"uid":"3376-38"},{"uid":"3376-72"}],"importedBy":[{"uid":"3376-0"}]},"3376-102":{"id":"/src/inputs/ScriptelInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-40"}],"importedBy":[{"uid":"3376-0"}]},"3376-103":{"id":"/src/inputs/PhoneInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-42"}],"importedBy":[{"uid":"3376-0"}]},"3376-104":{"id":"/src/inputs/CreditCardInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-44"}],"importedBy":[{"uid":"3376-0"}]},"3376-105":{"id":"/src/inputs/SinInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-46"}],"importedBy":[{"uid":"3376-0"}]},"3376-106":{"id":"/src/inputs/TableInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-48"},{"uid":"3376-50"},{"uid":"3376-52"},{"uid":"3376-54"},{"uid":"3376-56"},{"uid":"3376-58"},{"uid":"3376-60"},{"uid":"3376-62"},{"uid":"3376-64"},{"uid":"3376-66"},{"uid":"3376-14"}],"importedBy":[{"uid":"3376-0"}]},"3376-107":{"id":"/src/money/MoneyInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-68"}],"importedBy":[{"uid":"3376-0"},{"uid":"3376-52"}]},"3376-108":{"id":"/src/money/MoneyCurrencyInput/index.ts","moduleParts":{},"imported":[{"uid":"3376-70"}],"importedBy":[{"uid":"3376-0"}]},"3376-109":{"id":"/src/step/index.ts","moduleParts":{},"imported":[{"uid":"3376-6"},{"uid":"3376-4"},{"uid":"3376-8"},{"uid":"3376-10"}],"importedBy":[{"uid":"3376-0"}]},"3376-110":{"id":"@thx/money","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-2"},{"uid":"3376-50"},{"uid":"3376-60"},{"uid":"3376-68"},{"uid":"3376-70"}],"isExternal":true},"3376-111":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-2"},{"uid":"3376-16"},{"uid":"3376-18"},{"uid":"3376-20"},{"uid":"3376-22"},{"uid":"3376-24"},{"uid":"3376-26"},{"uid":"3376-28"},{"uid":"3376-32"},{"uid":"3376-12"},{"uid":"3376-34"},{"uid":"3376-36"},{"uid":"3376-40"},{"uid":"3376-42"},{"uid":"3376-44"},{"uid":"3376-46"},{"uid":"3376-48"},{"uid":"3376-52"},{"uid":"3376-56"},{"uid":"3376-58"},{"uid":"3376-62"},{"uid":"3376-66"},{"uid":"3376-68"},{"uid":"3376-70"},{"uid":"3376-6"},{"uid":"3376-8"},{"uid":"3376-10"},{"uid":"3376-80"},{"uid":"3376-82"},{"uid":"3376-88"},{"uid":"3376-86"}],"isExternal":true},"3376-112":{"id":"inputmask","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-2"},{"uid":"3376-12"}],"isExternal":true},"3376-113":{"id":"js-money","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-2"},{"uid":"3376-68"},{"uid":"3376-70"}],"isExternal":true},"3376-114":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-2"},{"uid":"3376-16"},{"uid":"3376-18"},{"uid":"3376-20"},{"uid":"3376-22"},{"uid":"3376-24"},{"uid":"3376-26"},{"uid":"3376-28"},{"uid":"3376-30"},{"uid":"3376-32"},{"uid":"3376-12"},{"uid":"3376-34"},{"uid":"3376-36"},{"uid":"3376-38"},{"uid":"3376-40"},{"uid":"3376-42"},{"uid":"3376-44"},{"uid":"3376-46"},{"uid":"3376-48"},{"uid":"3376-50"},{"uid":"3376-52"},{"uid":"3376-54"},{"uid":"3376-56"},{"uid":"3376-58"},{"uid":"3376-60"},{"uid":"3376-62"},{"uid":"3376-64"},{"uid":"3376-66"},{"uid":"3376-68"},{"uid":"3376-70"},{"uid":"3376-6"},{"uid":"3376-4"},{"uid":"3376-8"},{"uid":"3376-10"},{"uid":"3376-80"},{"uid":"3376-82"},{"uid":"3376-84"},{"uid":"3376-86"},{"uid":"3376-74"}],"isExternal":true},"3376-115":{"id":"@thx/date","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-16"},{"uid":"3376-20"},{"uid":"3376-22"},{"uid":"3376-24"},{"uid":"3376-44"},{"uid":"3376-54"}],"isExternal":true},"3376-116":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-16"},{"uid":"3376-18"},{"uid":"3376-22"},{"uid":"3376-24"},{"uid":"3376-26"},{"uid":"3376-30"},{"uid":"3376-32"},{"uid":"3376-34"},{"uid":"3376-40"},{"uid":"3376-44"},{"uid":"3376-46"},{"uid":"3376-48"},{"uid":"3376-56"},{"uid":"3376-62"},{"uid":"3376-64"},{"uid":"3376-68"},{"uid":"3376-70"},{"uid":"3376-10"},{"uid":"3376-86"}],"isExternal":true},"3376-117":{"id":"/src/date/DatePicker/index.ts","moduleParts":{},"imported":[{"uid":"3376-128"},{"uid":"3376-76"}],"importedBy":[{"uid":"3376-16"},{"uid":"3376-20"},{"uid":"3376-22"},{"uid":"3376-24"}]},"3376-118":{"id":"@js-joda/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-18"},{"uid":"3376-20"},{"uid":"3376-24"}],"isExternal":true},"3376-119":{"id":"formik","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-28"},{"uid":"3376-30"},{"uid":"3376-48"}],"isExternal":true},"3376-120":{"id":"flat","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-30"}],"isExternal":true},"3376-121":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-30"}],"isExternal":true},"3376-122":{"id":"use-deep-compare-effect","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-12"}],"isExternal":true},"3376-123":{"id":"react-credit-cards","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-44"}],"isExternal":true},"3376-124":{"id":"react-credit-cards/es/styles-compiled.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-44"}],"isExternal":true},"3376-125":{"id":"social-insurance-number","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-46"}],"isExternal":true},"3376-126":{"id":"react-table","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-48"}],"isExternal":true},"3376-127":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-10"}],"isExternal":true},"3376-128":{"id":"react-datepicker","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-117"}],"isExternal":true},"3376-129":{"id":"eventemitter3","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-88"}],"isExternal":true},"3376-130":{"id":"credit-card-type","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-86"}],"isExternal":true},"3376-131":{"id":"luhn","moduleParts":{},"imported":[],"importedBy":[{"uid":"3376-86"}],"isExternal":true}},"env":{"rollup":"2.70.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
2673
2673
 
2674
2674
  const run = () => {
2675
2675
  const width = window.innerWidth;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { LocalDate } from '@js-joda/core';
3
3
  import type { ReactDatePickerProps } from 'react-datepicker';
4
- import type { InputProps } from 'semantic-ui-react';
4
+ import { InputProps } from 'semantic-ui-react';
5
5
  import '../DatePicker/styles.css';
6
6
  interface ILocalDatePicker {
7
7
  value?: LocalDate | number | null;
@@ -9,6 +9,8 @@ interface ILocalDatePicker {
9
9
  onChangeRaw?: () => void;
10
10
  minDate?: LocalDate;
11
11
  maxDate?: LocalDate;
12
+ icon?: boolean;
13
+ openOnFocus?: boolean;
12
14
  }
13
15
  declare type InputPropsOmitted = Omit<InputProps, 'onChange'>;
14
16
  declare type ReactDatePickerPropsOmitted = Omit<Omit<ReactDatePickerProps, 'value'>, 'onChange' | 'minDate' | 'maxDate'>;
@@ -4,7 +4,8 @@ import type { TableCellProps } from './TableInput';
4
4
  import type { AddRowOnTabIf } from './addRowOnTab';
5
5
  interface MoneyEditCellOptions<D extends Record<string, unknown>> {
6
6
  /** If function is present, and returns true, will add a new row if tab is pressed on the last row */
7
- addRowOnTabIf?: AddRowOnTabIf<D, Money>;
7
+ addRowOnTabIf?: AddRowOnTabIf<D, Money | undefined>;
8
+ tabIndex?: number;
8
9
  }
9
- export declare function MoneyEditCell<D extends Record<string, unknown>>(opts?: MoneyEditCellOptions<D>): (props: TableCellProps<D, Money>) => JSX.Element;
10
+ export declare function MoneyEditCell<D extends Record<string, unknown>>(moneyEditCellProps?: MoneyEditCellOptions<D>): (props: TableCellProps<D, Money | undefined>) => JSX.Element;
10
11
  export {};
@@ -22,6 +22,7 @@ export interface TableCellProps<D extends DefaultTableType, V = any> extends Cel
22
22
  arrayHelpers: FieldArrayRenderProps;
23
23
  addRow: () => void;
24
24
  updateData: (index: number, id: string, value: V) => void;
25
+ hoverRow: string | number;
25
26
  }
26
27
  /**
27
28
  * Can be used in a TForm as a Table Input.
@@ -3,8 +3,8 @@ import Money, { Currency, MoneyObject } from 'js-money';
3
3
  import { InputProps } from 'semantic-ui-react';
4
4
  export interface MoneyInputProps {
5
5
  name?: string;
6
- onChange?: (value: Money) => void;
7
- value?: Money | MoneyObject;
6
+ onChange?: (value?: Money) => void;
7
+ value?: Money | MoneyObject | undefined;
8
8
  defaultCurrency?: Currency;
9
9
  onBlur?: (ev: any) => void;
10
10
  prefix?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thx/controls",
3
- "version": "16.4.1",
3
+ "version": "16.6.1-alpha.1+6616f41",
4
4
  "description": "A collection of components designed with SemanticUI.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/thr-consulting/thr-addons/issues"
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "a9d73b1d02c593b42d10a3f16d25ddd88f8e9d54"
67
+ "gitHead": "6616f413c56f7024fc52b8220afbe7ac90869fdd"
68
68
  }
package/dist/stats.txt DELETED
@@ -1,100 +0,0 @@
1
- -----------------------------
2
- Rollup File Analysis
3
- -----------------------------
4
- bundle size: 45.41 KB
5
- original size: 66.397 KB
6
- code reduction: 31.61 %
7
- module count: 46
8
-
9
- /src/step/StepProvider.tsx
10
- ███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 7.77 % (3.529 KB)
11
- /src/form/TForm/useTForm.tsx
12
- ███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 6.45 % (2.93 KB)
13
- /src/inputs/TableInput/TableInput.tsx
14
- ███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 6.14 % (2.788 KB)
15
- /src/inputs/Scriptel/scriptel/index.ts
16
- ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.57 % (2.53 KB)
17
- /src/inputs/CreditCardInput/CreditCardInput.tsx
18
- ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.12 % (2.324 KB)
19
- /src/money/useMoneyInput.ts
20
- ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.75 % (2.155 KB)
21
- /src/date/MonthDayPicker/MonthDayPicker.tsx
22
- ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.33 % (1.965 KB)
23
- /src/inputs/ScriptelInput/ScriptelInput.tsx
24
- ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.32 % (1.963 KB)
25
- /src/inputs/CreditCardInput/CreditCardNumberInput.tsx
26
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.77 % (1.713 KB)
27
- /src/money/MoneyCurrencyInput/MoneyCurrencyInput.tsx
28
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.47 % (1.575 KB)
29
- /src/date/YearSelect/YearSelect.tsx
30
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.42 % (1.553 KB)
31
- /src/inputs/MaskedInput/useMaskedInput.ts
32
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.27 % (1.487 KB)
33
- /src/inputs/Scriptel/Scriptel.tsx
34
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.81 % (1.275 KB)
35
- /src/date/MonthYearPicker/MonthYearPicker.tsx
36
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.71 % (1.229 KB)
37
- /src/date/LocalTimePicker/LocalTimePicker.tsx
38
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.65 % (1.205 KB)
39
- /src/inputs/SinInput/SinInput.tsx
40
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.52 % (1.144 KB)
41
- /src/date/LocalMonthSelect/LocalMonthSelect.tsx
42
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.5 % (1.135 KB)
43
- /src/date/LocalDatePicker/LocalDatePicker.tsx
44
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.41 % (1.096 KB)
45
- /src/inputs/Scriptel/scriptel/enums.ts
46
- █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.06 % (937 Bytes)
47
- /src/money/MoneyInput/MoneyInput.tsx
48
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.71 % (778 Bytes)
49
- /src/inputs/TableInput/CheckboxEditCell.tsx
50
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.64 % (746 Bytes)
51
- /src/inputs/TableInput/StringEditCell.tsx
52
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.58 % (717 Bytes)
53
- /home/mike/dev/thx/node_modules/style-inject/dist/style-inject.es.js
54
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.4 % (636 Bytes)
55
- /src/inputs/TableInput/LocalDateEditCell.tsx
56
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.37 % (622 Bytes)
57
- /src/inputs/TableInput/MoneyEditCell.tsx
58
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.37 % (620 Bytes)
59
- /src/form/TForm/TForm.tsx
60
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.32 % (600 Bytes)
61
- /src/inputs/RadioGroup/RadioGroup.tsx
62
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.24 % (561 Bytes)
63
- /src/date/DatePicker/styles.css
64
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.18 % (538 Bytes)
65
- /src/inputs/TableInput/DropdownCell.tsx
66
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.09 % (493 Bytes)
67
- /src/date/LocalDatePicker/MaskedDateInput.tsx
68
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.02 % (464 Bytes)
69
- /src/date/LocalTimePicker/MaskedTimeInput.tsx
70
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.98 % (446 Bytes)
71
- /src/step/FormStep.tsx
72
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.97 % (440 Bytes)
73
- /src/inputs/TableInput/MoneySumFooter.tsx
74
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.91 % (414 Bytes)
75
- /src/inputs/TableInput/HoverCell.tsx
76
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.89 % (403 Bytes)
77
- /src/inputs/MaskedInput/MaskedInput.tsx
78
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.86 % (390 Bytes)
79
- /src/inputs/PhoneInput/PhoneInput.tsx
80
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.84 % (381 Bytes)
81
- /src/inputs/TableInput/addRowOnTab.ts
82
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.69 % (312 Bytes)
83
- /src/inputs/Scriptel/withScriptel.tsx
84
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.61 % (275 Bytes)
85
- /src/inputs/TableInput/LocalDateCell.tsx
86
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.58 % (264 Bytes)
87
- /src/inputs/TableInput/MoneyCell.tsx
88
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.57 % (257 Bytes)
89
- /src/step/Step.tsx
90
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.45 % (203 Bytes)
91
- /src/step/useStep.ts
92
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.25 % (113 Bytes)
93
- /src/step/stepContext.ts
94
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.18 % (80 Bytes)
95
- /src/inputs/CreditCardInput/styles.css
96
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.17 % (78 Bytes)
97
- /src/inputs/Scriptel/ScriptelContext.ts
98
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.1 % (46 Bytes)
99
- /src/index.ts
100
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0 % (0 Byte)