@elliemae/ds-data-table 3.17.0-next.9 → 3.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js +39 -48
  2. package/dist/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js.map +2 -2
  3. package/dist/cjs/addons/Filters/Components/DateRangeFilter/index.js +4 -4
  4. package/dist/cjs/addons/Filters/Components/DateRangeFilter/index.js.map +2 -2
  5. package/dist/cjs/addons/Filters/Components/DateSwitcherFilter/index.js +9 -7
  6. package/dist/cjs/addons/Filters/Components/DateSwitcherFilter/index.js.map +2 -2
  7. package/dist/cjs/addons/Filters/Components/NumberRangeFilter/index.js +49 -46
  8. package/dist/cjs/addons/Filters/Components/NumberRangeFilter/index.js.map +2 -2
  9. package/dist/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +70 -61
  10. package/dist/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js.map +2 -2
  11. package/dist/cjs/addons/Filters/Components/SelectFilter/MultiCreatableFilter.js +1 -1
  12. package/dist/cjs/addons/Filters/Components/SelectFilter/MultiCreatableFilter.js.map +2 -2
  13. package/dist/cjs/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +1 -1
  14. package/dist/cjs/addons/Filters/Components/SelectFilter/MultiSelectFilter.js.map +2 -2
  15. package/dist/cjs/addons/Filters/Components/SelectFilter/SingleCreatableFilter.js +1 -1
  16. package/dist/cjs/addons/Filters/Components/SelectFilter/SingleCreatableFilter.js.map +2 -2
  17. package/dist/cjs/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +1 -1
  18. package/dist/cjs/addons/Filters/Components/SelectFilter/SingleSelectFilter.js.map +2 -2
  19. package/dist/cjs/addons/Filters/Components/SingleDateFilter/index.js +4 -4
  20. package/dist/cjs/addons/Filters/Components/SingleDateFilter/index.js.map +2 -2
  21. package/dist/cjs/exported-related/FilterPopover/useGetFilterHandlers.js +2 -2
  22. package/dist/cjs/exported-related/FilterPopover/useGetFilterHandlers.js.map +2 -2
  23. package/dist/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +1 -1
  24. package/dist/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js.map +2 -2
  25. package/dist/cjs/helpers/cellPadding.js.map +2 -2
  26. package/dist/cjs/helpers/sizeToCss.js.map +2 -2
  27. package/dist/cjs/parts/FilterBar/FiltersBar.js +24 -17
  28. package/dist/cjs/parts/FilterBar/FiltersBar.js.map +2 -2
  29. package/dist/cjs/parts/FilterBar/components/MultiSelectPill.js +3 -2
  30. package/dist/cjs/parts/FilterBar/components/MultiSelectPill.js.map +2 -2
  31. package/dist/cjs/parts/FilterBar/components/SelectPill.js.map +2 -2
  32. package/dist/cjs/parts/FilterBar/types.js.map +1 -1
  33. package/dist/cjs/parts/Filters/index.js +11 -7
  34. package/dist/cjs/parts/Filters/index.js.map +2 -2
  35. package/dist/cjs/parts/Headers/HeaderCell.js +3 -3
  36. package/dist/cjs/parts/Headers/HeaderCell.js.map +2 -2
  37. package/dist/cjs/parts/Headers/useHeaderCellHandlers.js.map +1 -1
  38. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +1 -1
  39. package/dist/cjs/styled.js +2 -10
  40. package/dist/cjs/styled.js.map +2 -2
  41. package/dist/cjs/types/props.js.map +2 -2
  42. package/dist/esm/addons/Filters/Components/CurrencyRangeFilter/index.js +40 -49
  43. package/dist/esm/addons/Filters/Components/CurrencyRangeFilter/index.js.map +2 -2
  44. package/dist/esm/addons/Filters/Components/DateRangeFilter/index.js +2 -2
  45. package/dist/esm/addons/Filters/Components/DateRangeFilter/index.js.map +2 -2
  46. package/dist/esm/addons/Filters/Components/DateSwitcherFilter/index.js +4 -6
  47. package/dist/esm/addons/Filters/Components/DateSwitcherFilter/index.js.map +2 -2
  48. package/dist/esm/addons/Filters/Components/NumberRangeFilter/index.js +49 -46
  49. package/dist/esm/addons/Filters/Components/NumberRangeFilter/index.js.map +2 -2
  50. package/dist/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +70 -61
  51. package/dist/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js.map +2 -2
  52. package/dist/esm/addons/Filters/Components/SelectFilter/MultiCreatableFilter.js +1 -1
  53. package/dist/esm/addons/Filters/Components/SelectFilter/MultiCreatableFilter.js.map +2 -2
  54. package/dist/esm/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +1 -1
  55. package/dist/esm/addons/Filters/Components/SelectFilter/MultiSelectFilter.js.map +2 -2
  56. package/dist/esm/addons/Filters/Components/SelectFilter/SingleCreatableFilter.js +1 -1
  57. package/dist/esm/addons/Filters/Components/SelectFilter/SingleCreatableFilter.js.map +2 -2
  58. package/dist/esm/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +1 -1
  59. package/dist/esm/addons/Filters/Components/SelectFilter/SingleSelectFilter.js.map +2 -2
  60. package/dist/esm/addons/Filters/Components/SingleDateFilter/index.js +2 -2
  61. package/dist/esm/addons/Filters/Components/SingleDateFilter/index.js.map +2 -2
  62. package/dist/esm/exported-related/FilterPopover/useGetFilterHandlers.js +2 -2
  63. package/dist/esm/exported-related/FilterPopover/useGetFilterHandlers.js.map +2 -2
  64. package/dist/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +1 -1
  65. package/dist/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js.map +2 -2
  66. package/dist/esm/helpers/cellPadding.js.map +2 -2
  67. package/dist/esm/helpers/sizeToCss.js.map +2 -2
  68. package/dist/esm/parts/FilterBar/FiltersBar.js +24 -17
  69. package/dist/esm/parts/FilterBar/FiltersBar.js.map +2 -2
  70. package/dist/esm/parts/FilterBar/components/MultiSelectPill.js +3 -2
  71. package/dist/esm/parts/FilterBar/components/MultiSelectPill.js.map +2 -2
  72. package/dist/esm/parts/FilterBar/components/SelectPill.js.map +2 -2
  73. package/dist/esm/parts/Filters/index.js +12 -8
  74. package/dist/esm/parts/Filters/index.js.map +2 -2
  75. package/dist/esm/parts/Headers/HeaderCell.js +3 -3
  76. package/dist/esm/parts/Headers/HeaderCell.js.map +2 -2
  77. package/dist/esm/parts/Headers/useHeaderCellHandlers.js.map +1 -1
  78. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +1 -1
  79. package/dist/esm/styled.js +2 -10
  80. package/dist/esm/styled.js.map +2 -2
  81. package/dist/esm/types/props.js.map +2 -2
  82. package/dist/types/DataTable.d.ts +5 -0
  83. package/dist/types/addons/Editables/DateEditableCell/DateEditableCell.d.ts +1 -2
  84. package/dist/types/addons/Filters/Components/CurrencyRangeFilter/index.d.ts +6 -1
  85. package/dist/types/addons/Filters/Components/DateRangeFilter/index.d.ts +6 -1
  86. package/dist/types/addons/Filters/Components/DateSwitcherFilter/index.d.ts +7 -1
  87. package/dist/types/addons/Filters/Components/NumberRangeFilter/index.d.ts +6 -1
  88. package/dist/types/addons/Filters/Components/SelectFilter/BaseSelectFilter.d.ts +3 -8
  89. package/dist/types/addons/Filters/Components/SelectFilter/MultiCreatableFilter.d.ts +4 -1
  90. package/dist/types/addons/Filters/Components/SelectFilter/MultiSelectFilter.d.ts +4 -1
  91. package/dist/types/addons/Filters/Components/SelectFilter/SingleCreatableFilter.d.ts +4 -1
  92. package/dist/types/addons/Filters/Components/SelectFilter/SingleSelectFilter.d.ts +4 -1
  93. package/dist/types/addons/Filters/Components/SingleDateFilter/index.d.ts +3 -1
  94. package/dist/types/helpers/cellPadding.d.ts +7 -5
  95. package/dist/types/helpers/sizeToCss.d.ts +1 -1
  96. package/dist/types/parts/FilterBar/components/MultiSelectPill.d.ts +5 -2
  97. package/dist/types/parts/FilterBar/components/SelectPill.d.ts +3 -2
  98. package/dist/types/parts/FilterBar/types.d.ts +0 -12
  99. package/dist/types/parts/Filters/index.d.ts +2 -2
  100. package/dist/types/parts/Headers/useHeaderCellHandlers.d.ts +1 -1
  101. package/dist/types/parts/Loader.d.ts +1 -1
  102. package/dist/types/parts/Row.d.ts +1 -1
  103. package/dist/types/parts/TableContent.d.ts +1 -2
  104. package/dist/types/parts/VirtualRowsList.d.ts +1 -2
  105. package/dist/types/styled.d.ts +42 -22
  106. package/dist/types/types/props.d.ts +23 -15
  107. package/package.json +22 -19
@@ -35,44 +35,40 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_ds_grid = require("@elliemae/ds-grid");
38
- var import_ds_form = require("@elliemae/ds-form");
38
+ var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
39
39
  var import_ds_form_layout_blocks = require("@elliemae/ds-form-layout-blocks");
40
40
  var import_ds_icons = require("@elliemae/ds-icons");
41
41
  var import_exported_related = require("../../../../exported-related/index.js");
42
42
  var import_constants = require("../../../../configs/constants.js");
43
43
  const opts = {
44
- prefix: "",
45
- suffix: "",
46
- allowDecimal: true,
47
- decimalLimit: 2,
48
44
  includeThousandsSeparator: false,
49
- requireDecimal: true,
50
- allowNegative: true
45
+ decimalPlaces: 2,
46
+ decimalRequired: true
51
47
  };
48
+ const idPreffix = "datatable-currency-range";
52
49
  const CurrencyRangeFilter = (props) => {
53
50
  const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;
54
- const ref = (0, import_react.useRef)();
55
- const shouldFocus = (0, import_react.useRef)();
56
- const handleFromChange = (e) => {
57
- const nextValue = {
58
- ...filterValue,
59
- from: e.target.value
60
- };
61
- onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
62
- };
63
- const handleToChange = (e) => {
64
- const nextValue = {
65
- ...filterValue,
66
- to: e.target.value
67
- };
68
- onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
69
- };
70
- const closePopover = (e) => {
71
- if (e.code === "Escape") {
72
- patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });
73
- innerRef.current.focus();
74
- }
75
- };
51
+ const [from, setFrom] = (0, import_react.useState)((0, import_ds_controlled_form.getNumberMaskedValue)(filterValue.from ?? "", opts));
52
+ const [to, setTo] = (0, import_react.useState)((0, import_ds_controlled_form.getNumberMaskedValue)(filterValue.to ?? "", opts));
53
+ const ref = (0, import_react.useRef)(null);
54
+ const shouldFocus = (0, import_react.useRef)(true);
55
+ const fromInputProps = (0, import_ds_controlled_form.useNumberMask)({
56
+ valueSetter: setFrom,
57
+ ...opts
58
+ });
59
+ const toInputProps = (0, import_ds_controlled_form.useNumberMask)({
60
+ valueSetter: setTo,
61
+ ...opts
62
+ });
63
+ const handleOnKeyDown = (0, import_react.useCallback)(
64
+ (e) => {
65
+ if (e.code === "Escape") {
66
+ patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });
67
+ innerRef.current?.focus();
68
+ }
69
+ },
70
+ [column.id, innerRef, patchHeader]
71
+ );
76
72
  const handleRef = (0, import_react.useCallback)(
77
73
  (newRef) => {
78
74
  if (ref.current)
@@ -86,12 +82,14 @@ const CurrencyRangeFilter = (props) => {
86
82
  },
87
83
  [shouldFocus]
88
84
  );
85
+ (0, import_react.useEffect)(() => {
86
+ onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, { from, to });
87
+ }, [from, to]);
89
88
  (0, import_react.useEffect)(() => {
90
89
  if (reduxHeader?.hideFilterMenu) {
91
90
  shouldFocus.current = true;
92
91
  }
93
92
  }, [reduxHeader?.hideFilterMenu]);
94
- const idPreffix = "datatable-currency-range";
95
93
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
94
  import_exported_related.FilterPopover,
97
95
  {
@@ -106,34 +104,27 @@ const CurrencyRangeFilter = (props) => {
106
104
  padding: "xxs",
107
105
  cols: ["auto", "auto"],
108
106
  style: { background: "white" },
107
+ onKeyDown: handleOnKeyDown,
109
108
  children: [
110
109
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_layout_blocks.DSFormLayoutBlockItem, { label: "Min", inputID: `${idPreffix}-min-${column.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
111
- import_ds_form.DSInputMask,
110
+ import_ds_controlled_form.DSInputText,
112
111
  {
113
- containerProps: { style: { textAlign: "right" } },
112
+ value: from,
113
+ ...fromInputProps,
114
114
  id: `${idPreffix}-min-${column.id}`,
115
- value: `${filterValue?.from ?? ""}`,
116
- onChange: handleFromChange,
115
+ style: { textAlign: "right" },
117
116
  placeholder: "0.00",
118
- mask: (number) => import_ds_form.MASK_TYPES.NUMBER(opts)(number),
119
- innerRef: handleRef,
120
- onKeyDown: (e) => {
121
- closePopover(e);
122
- }
117
+ innerRef: handleRef
123
118
  }
124
119
  ) }),
125
120
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_layout_blocks.DSFormLayoutBlockItem, { label: "Max", inputID: `${idPreffix}-max-${column.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
- import_ds_form.DSInputMask,
121
+ import_ds_controlled_form.DSInputText,
127
122
  {
128
- containerProps: { style: { textAlign: "right" } },
123
+ value: to,
124
+ ...toInputProps,
129
125
  id: `${idPreffix}-max-${column.id}`,
130
- value: `${filterValue?.to ?? ""}`,
131
- onChange: handleToChange,
132
- placeholder: "0.00",
133
- mask: (number) => import_ds_form.MASK_TYPES.NUMBER(opts)(number),
134
- onKeyDown: (e) => {
135
- closePopover(e);
136
- }
126
+ style: { textAlign: "right" },
127
+ placeholder: "0.00"
137
128
  }
138
129
  ) })
139
130
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/addons/Filters/Components/CurrencyRangeFilter/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useRef, useEffect, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSInputMask, MASK_TYPES } from '@elliemae/ds-form';\nimport { DSFormLayoutBlockItem } from '@elliemae/ds-form-layout-blocks';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst opts = {\n prefix: '',\n suffix: '',\n allowDecimal: true,\n decimalLimit: 2,\n includeThousandsSeparator: false,\n requireDecimal: true,\n allowNegative: true,\n};\n\nexport const CurrencyRangeFilter: React.ComponentType<FilterProps> = (props) => {\n const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;\n\n const ref = useRef();\n const shouldFocus = useRef();\n const handleFromChange = (e) => {\n const nextValue = {\n ...filterValue,\n from: e.target.value,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n };\n const handleToChange = (e) => {\n const nextValue = {\n ...filterValue,\n to: e.target.value,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n };\n\n // workaround to close menu with esc key since DSInputMask has stoppropagation on key down\n const closePopover = (e) => {\n if (e.code === 'Escape') {\n patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });\n innerRef.current.focus();\n }\n };\n\n const handleRef = useCallback(\n (newRef) => {\n if (ref.current) ref.current = newRef;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n },\n [shouldFocus],\n );\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n const idPreffix = 'datatable-currency-range';\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={column.id}\n menuContent={\n <Grid\n data-testid={DATA_TESTID.DATA_TABLE_CURRENCY_RANGE_CONTROLLER}\n gutter=\"xxxs\"\n padding=\"xxs\"\n cols={['auto', 'auto']}\n style={{ background: 'white' }}\n >\n <DSFormLayoutBlockItem label=\"Min\" inputID={`${idPreffix}-min-${column.id}`}>\n <DSInputMask\n containerProps={{ style: { textAlign: 'right' } }}\n id={`${idPreffix}-min-${column.id}`}\n value={`${filterValue?.from ?? ''}`}\n onChange={handleFromChange}\n placeholder=\"0.00\"\n mask={(number) => MASK_TYPES.NUMBER(opts)(number)}\n innerRef={handleRef}\n onKeyDown={(e) => {\n closePopover(e);\n }}\n />\n </DSFormLayoutBlockItem>\n <DSFormLayoutBlockItem label=\"Max\" inputID={`${idPreffix}-max-${column.id}`}>\n <DSInputMask\n containerProps={{ style: { textAlign: 'right' } }}\n id={`${idPreffix}-max-${column.id}`}\n value={`${filterValue?.to ?? ''}`}\n onChange={handleToChange}\n placeholder=\"0.00\"\n mask={(number) => MASK_TYPES.NUMBER(opts)(number)}\n onKeyDown={(e) => {\n closePopover(e);\n }}\n />\n </DSFormLayoutBlockItem>\n </Grid>\n }\n triggerIcon={<SearchXsmall />}\n customStyles={{ width: column.ref?.current?.offsetWidth ?? '0px' }}\n innerRef={innerRef}\n ariaLabel=\"Open Currency Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyEf;AAzER,mBAAsD;AACtD,qBAAqB;AACrB,qBAAwC;AACxC,mCAAsC;AACtC,sBAA6B;AAC7B,8BAA4C;AAE5C,uBAA4B;AAE5B,MAAM,OAAO;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,cAAc;AAAA,EACd,2BAA2B;AAAA,EAC3B,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAEO,MAAM,sBAAwD,CAAC,UAAU;AAC9E,QAAM,EAAE,QAAQ,cAAc,EAAE,MAAM,MAAM,IAAI,KAAK,GAAG,aAAa,aAAa,eAAe,SAAS,IAAI;AAE9G,QAAM,UAAM,qBAAO;AACnB,QAAM,kBAAc,qBAAO;AAC3B,QAAM,mBAAmB,CAAC,MAAM;AAC9B,UAAM,YAAY;AAAA,MAChB,GAAG;AAAA,MACH,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,GAAG,aAAa,QAAQ;AAAA,gBAC/B,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,MAAM,CAAC,WAAW,0BAAW,OAAO,IAAI,EAAE,MAAM;AAAA,gBAChD,UAAU;AAAA,gBACV,WAAW,CAAC,MAAM;AAChB,+BAAa,CAAC;AAAA,gBAChB;AAAA;AAAA,YACF,GACF;AAAA,YACA,4CAAC,sDAAsB,OAAM,OAAM,SAAS,GAAG,iBAAiB,OAAO,MACrE;AAAA,cAAC;AAAA;AAAA,gBACC,gBAAgB,EAAE,OAAO,EAAE,WAAW,QAAQ,EAAE;AAAA,gBAChD,IAAI,GAAG,iBAAiB,OAAO;AAAA,gBAC/B,OAAO,GAAG,aAAa,MAAM;AAAA,gBAC7B,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,MAAM,CAAC,WAAW,0BAAW,OAAO,IAAI,EAAE,MAAM;AAAA,gBAChD,WAAW,CAAC,MAAM;AAChB,+BAAa,CAAC;AAAA,gBAChB;AAAA;AAAA,YACF,GACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEF,aAAa,4CAAC,gCAAa;AAAA,MAC3B,cAAc,EAAE,OAAO,OAAO,KAAK,SAAS,eAAe,MAAM;AAAA,MACjE;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
4
+ "sourcesContent": ["import React, { useRef, useEffect, useCallback, useState } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSInputText, getNumberMaskedValue, useNumberMask } from '@elliemae/ds-controlled-form';\nimport { DSFormLayoutBlockItem } from '@elliemae/ds-form-layout-blocks';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst opts = {\n includeThousandsSeparator: false,\n decimalPlaces: 2,\n decimalRequired: true,\n};\n\nconst idPreffix = 'datatable-currency-range';\n\ninterface CurrentRangeFilterValue {\n from: string | null;\n to: string | null;\n}\n\nexport const CurrencyRangeFilter: React.ComponentType<FilterProps<CurrentRangeFilterValue>> = (props) => {\n const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;\n\n const [from, setFrom] = useState(getNumberMaskedValue(filterValue.from ?? '', opts));\n const [to, setTo] = useState(getNumberMaskedValue(filterValue.to ?? '', opts));\n\n const ref = useRef<HTMLInputElement | null>(null);\n const shouldFocus = useRef(true);\n\n const fromInputProps = useNumberMask({\n valueSetter: setFrom,\n ...opts,\n });\n\n const toInputProps = useNumberMask({\n valueSetter: setTo,\n ...opts,\n });\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.code === 'Escape') {\n patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });\n innerRef.current?.focus();\n }\n },\n [column.id, innerRef, patchHeader],\n );\n\n const handleRef = useCallback(\n (newRef: HTMLInputElement | null) => {\n if (ref.current) ref.current = newRef;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n },\n [shouldFocus],\n );\n\n useEffect(() => {\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, { from, to });\n // We are missing onValueChange on purpose, this is an internal function and won't cause any problems\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [from, to]);\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={column.id}\n menuContent={\n <Grid\n data-testid={DATA_TESTID.DATA_TABLE_CURRENCY_RANGE_CONTROLLER}\n gutter=\"xxxs\"\n padding=\"xxs\"\n cols={['auto', 'auto']}\n style={{ background: 'white' }}\n onKeyDown={handleOnKeyDown}\n >\n <DSFormLayoutBlockItem label=\"Min\" inputID={`${idPreffix}-min-${column.id}`}>\n <DSInputText\n value={from}\n {...fromInputProps}\n id={`${idPreffix}-min-${column.id}`}\n style={{ textAlign: 'right' }}\n placeholder=\"0.00\"\n innerRef={handleRef}\n />\n </DSFormLayoutBlockItem>\n <DSFormLayoutBlockItem label=\"Max\" inputID={`${idPreffix}-max-${column.id}`}>\n <DSInputText\n value={to}\n {...toInputProps}\n id={`${idPreffix}-max-${column.id}`}\n style={{ textAlign: 'right' }}\n placeholder=\"0.00\"\n />\n </DSFormLayoutBlockItem>\n </Grid>\n }\n triggerIcon={<SearchXsmall />}\n customStyles={{ width: column.ref?.current?.offsetWidth ?? '0px' }}\n innerRef={innerRef}\n ariaLabel=\"Open Currency Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFf;AAlFR,mBAAgE;AAChE,qBAAqB;AACrB,gCAAiE;AACjE,mCAAsC;AACtC,sBAA6B;AAC7B,8BAA4C;AAE5C,uBAA4B;AAE5B,MAAM,OAAO;AAAA,EACX,2BAA2B;AAAA,EAC3B,eAAe;AAAA,EACf,iBAAiB;AACnB;AAEA,MAAM,YAAY;AAOX,MAAM,sBAAiF,CAAC,UAAU;AACvG,QAAM,EAAE,QAAQ,cAAc,EAAE,MAAM,MAAM,IAAI,KAAK,GAAG,aAAa,aAAa,eAAe,SAAS,IAAI;AAE9G,QAAM,CAAC,MAAM,OAAO,QAAI,2BAAS,gDAAqB,YAAY,QAAQ,IAAI,IAAI,CAAC;AACnF,QAAM,CAAC,IAAI,KAAK,QAAI,2BAAS,gDAAqB,YAAY,MAAM,IAAI,IAAI,CAAC;AAE7E,QAAM,UAAM,qBAAgC,IAAI;AAChD,QAAM,kBAAc,qBAAO,IAAI;AAE/B,QAAM,qBAAiB,yCAAc;AAAA,IACnC,aAAa;AAAA,IACb,GAAG;AAAA,EACL,CAAC;AAED,QAAM,mBAAe,yCAAc;AAAA,IACjC,a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BAC5B,aAAY;AAAA,gBACZ,UAAU;AAAA;AAAA,YACZ,GACF;AAAA,YACA,4CAAC,sDAAsB,OAAM,OAAM,SAAS,GAAG,iBAAiB,OAAO,MACrE;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACN,GAAG;AAAA,gBACJ,IAAI,GAAG,iBAAiB,OAAO;AAAA,gBAC/B,OAAO,EAAE,WAAW,QAAQ;AAAA,gBAC5B,aAAY;AAAA;AAAA,YACd,GACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEF,aAAa,4CAAC,gCAAa;AAAA,MAC3B,cAAc,EAAE,OAAO,OAAO,KAAK,SAAS,eAAe,MAAM;AAAA,MACjE;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -36,7 +36,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_ds_icons = require("@elliemae/ds-icons");
38
38
  var import_ds_grid = require("@elliemae/ds-grid");
39
- var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
39
+ var import_ds_form_date_range_picker = require("@elliemae/ds-form-date-range-picker");
40
40
  var import_exported_related = require("../../../../exported-related/index.js");
41
41
  var import_constants = require("../../../../configs/constants.js");
42
42
  const emptyFilterValue = { startDate: null, endDate: null };
@@ -62,7 +62,7 @@ const DateRangeFilter = (props) => {
62
62
  onValueChange(import_exported_related.FILTER_TYPES.DATE_RANGE, { startDate, endDate });
63
63
  }
64
64
  }, [startDate, endDate]);
65
- const ref = (0, import_react.useRef)();
65
+ const ref = (0, import_react.useRef)(null);
66
66
  const shouldFocus = (0, import_react.useRef)(true);
67
67
  const handleRef = (0, import_react.useCallback)((newRef) => {
68
68
  if (ref.current)
@@ -87,7 +87,7 @@ const DateRangeFilter = (props) => {
87
87
  columnId: id,
88
88
  menuContent: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { width: "260px", "data-testid": import_constants.DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER, children: [
89
89
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { p: "xxs", style: { background: "white" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
- import_ds_controlled_form.DSControlledDateRangePicker,
90
+ import_ds_form_date_range_picker.DSControlledDateRangePicker,
91
91
  {
92
92
  fromDate: startDate,
93
93
  onFromDateChange: setStartDate,
@@ -102,7 +102,7 @@ const DateRangeFilter = (props) => {
102
102
  {
103
103
  onKeyDown: (e) => e.code === "Enter" && setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0),
104
104
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
- import_ds_controlled_form.DSControlledDateRangePicker,
105
+ import_ds_form_date_range_picker.DSControlledDateRangePicker,
106
106
  {
107
107
  fromDate: startDate,
108
108
  onFromDateChange: setStartDate,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/addons/Filters/Components/DateRangeFilter/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useEffect, useCallback, useRef, useState } from 'react';\nimport { DatePicker2 } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSControlledDateRangePicker } from '@elliemae/ds-controlled-form';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst emptyFilterValue = { startDate: null, endDate: null };\n\nexport const DateRangeFilter: React.ComponentType<FilterProps> = (props) => {\n const {\n column,\n column: { id },\n filterValue = emptyFilterValue,\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n } = props;\n\n const dateRange = filterValue;\n\n const [startDate, setStartDate] = useState(dateRange.startDate || '');\n const [endDate, setEndDate] = useState(dateRange.endDate || '');\n\n useEffect(() => {\n setStartDate(dateRange.startDate || '');\n setEndDate(dateRange.endDate || '');\n }, [dateRange]);\n\n useEffect(() => {\n if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {\n onValueChange(FILTER_TYPES.DATE_RANGE, { startDate, endDate });\n }\n // We are missing onValueChange on purpose, this is an internal function and won't cause any problems\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate]);\n\n const ref = useRef();\n const shouldFocus = useRef(true);\n const handleRef = useCallback((newRef) => {\n if (ref.current) ref.current = newRef;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n }, []);\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n menuContent={\n <Grid width=\"260px\" data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER}>\n <Grid p=\"xxs\" style={{ background: 'white' }}>\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-inputs\"\n innerRef={handleRef}\n />\n </Grid>\n <Grid\n onKeyDown={(e) =>\n e.code === 'Enter' &&\n setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0)\n }\n >\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-picker-controller-only\"\n />\n </Grid>\n </Grid>\n }\n triggerIcon={<DatePicker2 />}\n innerRef={innerRef}\n ariaLabel=\"Open Date Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Df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ACA,UAAU;AAAA,MACV,aACE,6CAAC,uBAAK,OAAM,SAAQ,eAAa,6BAAY,kCAC3C;AAAA,oDAAC,uBAAK,GAAE,OAAM,OAAO,EAAE,YAAY,QAAQ,GACzC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,kBAAkB;AAAA,YAClB,QAAQ;AAAA,YACR,gBAAgB;AAAA,YAChB,MAAK;AAAA,YACL,UAAU;AAAA;AAAA,QACZ,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,CAAC,MACV,EAAE,SAAS,WACX,WAAW,MAAM,+BAA+B,IAAI,CAAC,EAAE,UAAU,aAAa,UAAU,QAAQ,GAAG,CAAC;AAAA,YAGtG;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,kBAAkB;AAAA,gBAClB,QAAQ;AAAA,gBACR,gBAAgB;AAAA,gBAChB,MAAK;AAAA;AAAA,YACP;AAAA;AAAA,QACF;AAAA,SACF;AAAA,MAEF,aAAa,4CAAC,+BAAY;AAAA,MAC1B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
4
+ "sourcesContent": ["import React, { useEffect, useCallback, useRef, useState } from 'react';\nimport { DatePicker2 } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSControlledDateRangePicker } from '@elliemae/ds-form-date-range-picker';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst emptyFilterValue = { startDate: null, endDate: null };\n\ninterface DateRangeFilterValue {\n startDate: string | null;\n endDate: string | null;\n}\n\nexport const DateRangeFilter: React.ComponentType<FilterProps<DateRangeFilterValue>> = (props) => {\n const {\n column,\n column: { id },\n filterValue = emptyFilterValue,\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n } = props;\n\n const dateRange = filterValue;\n\n const [startDate, setStartDate] = useState(dateRange.startDate || '');\n const [endDate, setEndDate] = useState(dateRange.endDate || '');\n\n useEffect(() => {\n setStartDate(dateRange.startDate || '');\n setEndDate(dateRange.endDate || '');\n }, [dateRange]);\n\n useEffect(() => {\n if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {\n onValueChange(FILTER_TYPES.DATE_RANGE, { startDate, endDate });\n }\n // We are missing onValueChange on purpose, this is an internal function and won't cause any problems\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate]);\n\n const ref = useRef<HTMLInputElement | null>(null);\n const shouldFocus = useRef(true);\n const handleRef = useCallback((newRef: HTMLInputElement | HTMLButtonElement | null) => {\n if (ref.current) ref.current = newRef as HTMLInputElement | null;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n }, []);\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n menuContent={\n <Grid width=\"260px\" data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER}>\n <Grid p=\"xxs\" style={{ background: 'white' }}>\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-inputs\"\n innerRef={handleRef}\n />\n </Grid>\n <Grid\n onKeyDown={(e) =>\n e.code === 'Enter' &&\n setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0)\n }\n >\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-picker-controller-only\"\n />\n </Grid>\n </Grid>\n }\n triggerIcon={<DatePicker2 />}\n innerRef={innerRef}\n ariaLabel=\"Open Date Range Filter\"\n />\n );\n};\n", "import * as React from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,UAAU;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,aAAa,cAAc,CAAC;AAEhC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,aACE,6CAAC,uBAAK,OAAM,SAAQ,eAAa,6BAAY,kCAC3C;AAAA,oDAAC,uBAAK,GAAE,OAAM,OAAO,EAAE,YAAY,QAAQ,GACzC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,kBAAkB;AAAA,YAClB,QAAQ;AAAA,YACR,gBAAgB;AAAA,YAChB,MAAK;AAAA,YACL,UAAU;AAAA;AAAA,QACZ,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,CAAC,MACV,EAAE,SAAS,WACX,WAAW,MAAM,+BAA+B,IAAI,CAAC,EAAE,UAAU,aAAa,UAAU,QAAQ,GAAG,CAAC;AAAA,YAGtG;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,kBAAkB;AAAA,gBAClB,QAAQ;AAAA,gBACR,gBAAgB;AAAA,gBAChB,MAAK;AAAA;AAAA,YACP;AAAA;AAAA,QACF;AAAA,SACF;AAAA,MAEF,aAAa,4CAAC,+BAAY;AAAA,MAC1B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -36,7 +36,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_ds_icons = require("@elliemae/ds-icons");
38
38
  var import_ds_grid = require("@elliemae/ds-grid");
39
- var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
39
+ var import_ds_form_date_range_picker = require("@elliemae/ds-form-date-range-picker");
40
+ var import_ds_form_date_time_picker = require("@elliemae/ds-form-date-time-picker");
41
+ var import_ds_form_checkbox = require("@elliemae/ds-form-checkbox");
40
42
  var import_exported_related = require("../../../../exported-related/index.js");
41
43
  var import_constants = require("../../../../configs/constants.js");
42
44
  const emptyFilterValue = { startDate: null, endDate: null };
@@ -50,7 +52,7 @@ const DateSwitcherFilter = (props) => {
50
52
  reduxHeader,
51
53
  innerRef
52
54
  } = props;
53
- const ref = (0, import_react.useRef)();
55
+ const ref = (0, import_react.useRef)(null);
54
56
  const dateRange = filterValue;
55
57
  const [startDate, setStartDate] = (0, import_react.useState)(dateRange.startDate || "");
56
58
  const [endDate, setEndDate] = (0, import_react.useState)(dateRange.endDate || "");
@@ -83,7 +85,7 @@ const DateSwitcherFilter = (props) => {
83
85
  menuContent: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { width: "260px", "data-testid": import_constants.DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER, children: [
84
86
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { p: "xxs", gutter: "xxs", style: { background: "white" }, children: [
85
87
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-testid": import_constants.DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
- import_ds_controlled_form.DSControlledCheckbox,
88
+ import_ds_form_checkbox.DSControlledCheckbox,
87
89
  {
88
90
  checked: isDateRange,
89
91
  name: "Date range",
@@ -98,7 +100,7 @@ const DateSwitcherFilter = (props) => {
98
100
  }
99
101
  ) }),
100
102
  isDateRange ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
101
- import_ds_controlled_form.DSControlledDateRangePicker,
103
+ import_ds_form_date_range_picker.DSControlledDateRangePicker,
102
104
  {
103
105
  fromDate: startDate,
104
106
  onFromDateChange: setStartDate,
@@ -107,7 +109,7 @@ const DateSwitcherFilter = (props) => {
107
109
  type: "date-range-inputs"
108
110
  }
109
111
  ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
- import_ds_controlled_form.DSControlledDateTimePicker,
112
+ import_ds_form_date_time_picker.DSControlledDateTimePicker,
111
113
  {
112
114
  date: startDate,
113
115
  onDateChange: (_date) => {
@@ -123,7 +125,7 @@ const DateSwitcherFilter = (props) => {
123
125
  {
124
126
  onKeyDown: (e) => e.code === "Enter" && setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0),
125
127
  children: isDateRange ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
- import_ds_controlled_form.DSControlledDateRangePicker,
128
+ import_ds_form_date_range_picker.DSControlledDateRangePicker,
127
129
  {
128
130
  fromDate: startDate,
129
131
  onFromDateChange: setStartDate,
@@ -132,7 +134,7 @@ const DateSwitcherFilter = (props) => {
132
134
  type: "date-range-picker-controller-only"
133
135
  }
134
136
  ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
- import_ds_controlled_form.DSControlledDateTimePicker,
137
+ import_ds_form_date_time_picker.DSControlledDateTimePicker,
136
138
  {
137
139
  date: startDate,
138
140
  onDateChange: (_date) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/addons/Filters/Components/DateSwitcherFilter/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useEffect, useRef, useCallback, useState } from 'react';\nimport { DatePicker2 } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport {\n DSControlledDateRangePicker,\n DSControlledDateTimePicker,\n DSControlledCheckbox,\n} from '@elliemae/ds-controlled-form';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst emptyFilterValue = { startDate: null, endDate: null };\n\nexport const DateSwitcherFilter: React.ComponentType<FilterProps> = (props) => {\n const {\n column,\n column: { id },\n filterValue = emptyFilterValue,\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n } = props;\n\n const ref = useRef();\n const dateRange = filterValue;\n\n const [startDate, setStartDate] = useState(dateRange.startDate || '');\n const [endDate, setEndDate] = useState(dateRange.endDate || '');\n const [isDateRange, setIsDateRange] = useState(false);\n\n useEffect(() => {\n setStartDate(dateRange.startDate || '');\n setEndDate(dateRange.endDate || '');\n }, [dateRange]);\n\n useEffect(() => {\n if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {\n onValueChange(FILTER_TYPES.DATE_SWITCHER, { startDate, endDate, isDateRange });\n }\n // We are missing onValueChange on purpose, this is an internal function and won't cause any problems\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, isDateRange]);\n\n const handleRef = useCallback(\n (newRef) => {\n if (ref.current) ref.current = newRef;\n if (!reduxHeader?.hideFilterMenu) {\n setTimeout(() => newRef?.focus());\n }\n },\n [reduxHeader?.hideFilterMenu],\n );\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n menuContent={\n <Grid width=\"260px\" data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER}>\n <Grid p=\"xxs\" gutter=\"xxs\" style={{ background: 'white' }}>\n <div data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER}>\n <DSControlledCheckbox\n checked={isDateRange}\n name=\"Date range\"\n label=\"Date Range\"\n id=\"date-range-switcher-id-internal\"\n onChange={() => {\n setIsDateRange(!isDateRange);\n setStartDate('');\n setEndDate('');\n }}\n innerRef={handleRef}\n />\n </div>\n {isDateRange ? (\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-inputs\"\n />\n ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-inputs\"\n />\n )}\n </Grid>\n <Grid\n onKeyDown={(e) =>\n e.code === 'Enter' &&\n setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0)\n }\n >\n {isDateRange ? (\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-picker-controller-only\"\n />\n ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-picker-controller-only\"\n />\n )}\n </Grid>\n </Grid>\n }\n triggerIcon={<DatePicker2 />}\n innerRef={innerRef}\n ariaLabel=\"Open Date Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Db;AA9DV,mBAAgE;AAChE,sBAA4B;AAC5B,qBAAqB;AACrB,gCAIO;AACP,8BAA4C;AAE5C,uBAA4B;AAE5B,MAAM,mBAAmB,EAAE,WAAW,MAAM,SAAS,KAAK;AAEnD,MAAM,qBAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA,QAAQ,EAAE,GAAG;AAAA,IACb,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,UAAM,qBAAO;AACnB,QAAM,YAAY;AAElB,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,UAAU,aAAa,EAAE;AACpE,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,UAAU,WAAW,EAAE;AAC9D,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,8BAAU,MAAM;AACd,iBAAa,UAAU,aAAa,EAAE;AACtC,eAAW,UAAU,WAAW,EAAE;AAAA,EACpC,GAAG,CAAC,SAAS,CAAC;AAEd,8BAAU,MAAM;AACd,QAAI,aAAa,WAAW,CAAC,UAAU,SAAS,GAAG,KAAK,CAAC,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+B,IAAI,CAAC,EAAE,UAAU,aAAa,UAAU,QAAQ,GAAG,CAAC;AAAA,YAGrG,wBACC;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,kBAAkB;AAAA,gBAClB,QAAQ;AAAA,gBACR,gBAAgB;AAAA,gBAChB,MAAK;AAAA;AAAA,YACP,IAEA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,cAAc,CAAC,UAAU;AACvB,+BAAa,KAAK;AAClB,6BAAW,KAAK;AAAA,gBAClB;AAAA,gBACA,MAAK;AAAA;AAAA,YACP;AAAA;AAAA,QAEJ;AAAA,SACF;AAAA,MAEF,aAAa,4CAAC,+BAAY;AAAA,MAC1B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
4
+ "sourcesContent": ["import React, { useEffect, useRef, useCallback, useState } from 'react';\nimport { DatePicker2 } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSControlledDateRangePicker } from '@elliemae/ds-form-date-range-picker';\nimport { DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { DSControlledCheckbox } from '@elliemae/ds-form-checkbox';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst emptyFilterValue = { startDate: null, endDate: null };\n\ninterface DateSwitcherFilterValue {\n startDate: string | null;\n endDate: string | null;\n isDateRange: boolean;\n}\n\nexport const DateSwitcherFilter: React.ComponentType<FilterProps<DateSwitcherFilterValue>> = (props) => {\n const {\n column,\n column: { id },\n filterValue = emptyFilterValue,\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n } = props;\n\n const ref = useRef<HTMLInputElement | null>(null);\n const dateRange = filterValue;\n\n const [startDate, setStartDate] = useState(dateRange.startDate || '');\n const [endDate, setEndDate] = useState(dateRange.endDate || '');\n const [isDateRange, setIsDateRange] = useState(false);\n\n useEffect(() => {\n setStartDate(dateRange.startDate || '');\n setEndDate(dateRange.endDate || '');\n }, [dateRange]);\n\n useEffect(() => {\n if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {\n onValueChange(FILTER_TYPES.DATE_SWITCHER, { startDate, endDate, isDateRange });\n }\n // We are missing onValueChange on purpose, this is an internal function and won't cause any problems\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, isDateRange]);\n\n const handleRef = useCallback(\n (newRef: HTMLInputElement | HTMLButtonElement | null) => {\n if (ref.current) ref.current = newRef as HTMLInputElement | null;\n if (!reduxHeader?.hideFilterMenu) {\n setTimeout(() => newRef?.focus());\n }\n },\n [reduxHeader?.hideFilterMenu],\n );\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n menuContent={\n <Grid width=\"260px\" data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER}>\n <Grid p=\"xxs\" gutter=\"xxs\" style={{ background: 'white' }}>\n <div data-testid={DATA_TESTID.DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER}>\n <DSControlledCheckbox\n checked={isDateRange}\n name=\"Date range\"\n label=\"Date Range\"\n id=\"date-range-switcher-id-internal\"\n onChange={() => {\n setIsDateRange(!isDateRange);\n setStartDate('');\n setEndDate('');\n }}\n innerRef={handleRef}\n />\n </div>\n {isDateRange ? (\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-inputs\"\n />\n ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-inputs\"\n />\n )}\n </Grid>\n <Grid\n onKeyDown={(e) =>\n e.code === 'Enter' &&\n setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0)\n }\n >\n {isDateRange ? (\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={setStartDate}\n toDate={endDate}\n onToDateChange={setEndDate}\n type=\"date-range-picker-controller-only\"\n />\n ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-picker-controller-only\"\n />\n )}\n </Grid>\n </Grid>\n }\n triggerIcon={<DatePicker2 />}\n innerRef={innerRef}\n ariaLabel=\"Open Date Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkEb;AAlEV,mBAAgE;AAChE,sBAA4B;AAC5B,qBAAqB;AACrB,uCAA4C;AAC5C,sCAA2C;AAC3C,8BAAqC;AACrC,8BAA4C;AAE5C,uBAA4B;AAE5B,MAAM,mBAAmB,EAAE,WAAW,MAAM,SAAS,KAAK;AAQnD,MAAM,qBAAgF,CAAC,UAAU;AACtG,QAAM;AAAA,IACJ;AAAA,IACA,QAAQ,EAAE,GAAG;AAAA,IACb,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,UAAM,qBAAgC,IAAI;AAChD,QAAM,YAAY;AAElB,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,UAAU,aAAa,EAAE;AACpE,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,UAAU,WAAW,EAAE;AAC9D,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,8BAAU,MAAM;AACd,iBAAa,UAAU,aAAa,EAAE;AACtC,eAAW,UAAU,WAAW,EAAE;AAAA,EACpC,GAAG,CAAC,SAAS,CAAC;AAEd,8BAAU,MAAM;AACd,QAAI,aAAa,WAAW,CAAC,UAAU,SAAS,GAAG,KAAK,CAAC,QAAQ,SAAS,GAAG,GAAG;AAC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,aAAa,UAAU,QAAQ,GAAG,CAAC;AAAA,YAGrG,wBACC;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,kBAAkB;AAAA,gBAClB,QAAQ;AAAA,gBACR,gBAAgB;AAAA,gBAChB,MAAK;AAAA;AAAA,YACP,IAEA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,cAAc,CAAC,UAAU;AACvB,+BAAa,KAAK;AAClB,6BAAW,KAAK;AAAA,gBAClB;AAAA,gBACA,MAAK;AAAA;AAAA,YACP;AAAA;AAAA,QAEJ;AAAA,SACF;AAAA,MAEF,aAAa,4CAAC,+BAAY;AAAA,MAC1B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -35,45 +35,54 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_ds_grid = require("@elliemae/ds-grid");
38
- var import_ds_form = require("@elliemae/ds-form");
38
+ var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
39
39
  var import_ds_form_layout_blocks = require("@elliemae/ds-form-layout-blocks");
40
40
  var import_ds_icons = require("@elliemae/ds-icons");
41
41
  var import_exported_related = require("../../../../exported-related/index.js");
42
42
  var import_constants = require("../../../../configs/constants.js");
43
43
  const opts = {
44
- prefix: "",
45
- suffix: "",
46
- allowDecimal: false,
47
44
  includeThousandsSeparator: false,
48
- requireDecimal: false,
49
- allowNegative: true
45
+ decimalPlaces: 0
46
+ };
47
+ const idPreffix = "datatable-number-range";
48
+ const conform = (value) => {
49
+ const valueAsString = value?.toString() ?? "";
50
+ return (0, import_ds_controlled_form.getNumberMaskedValue)(valueAsString, opts);
50
51
  };
51
52
  const NumberRangeFilter = (props) => {
52
53
  const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;
53
- const handleFromChange = (e) => {
54
- const from = e.target.value !== "" ? parseInt(e.target.value, 10) : "";
55
- const nextValue = {
56
- ...filterValue,
57
- from
58
- };
59
- onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
60
- };
61
- const handleToChange = (e) => {
62
- const to = e.target.value !== "" ? parseInt(e.target.value, 10) : "";
63
- const nextValue = {
64
- ...filterValue,
65
- to
66
- };
67
- onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
68
- };
69
- const closePopover = (e) => {
70
- if (e.code === "Escape") {
71
- patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });
72
- innerRef.current.focus();
73
- }
74
- };
75
- const idPreffix = "datatable-number-range";
76
- const ref = (0, import_react.useRef)();
54
+ const handleFromChange = (0, import_react.useCallback)(
55
+ (e) => {
56
+ const from = e.target.value !== "" ? parseInt(e.target.value, 10) : "";
57
+ const nextValue = {
58
+ ...filterValue,
59
+ from
60
+ };
61
+ onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
62
+ },
63
+ [filterValue, onValueChange]
64
+ );
65
+ const handleToChange = (0, import_react.useCallback)(
66
+ (e) => {
67
+ const to = e.target.value !== "" ? parseInt(e.target.value, 10) : "";
68
+ const nextValue = {
69
+ ...filterValue,
70
+ to
71
+ };
72
+ onValueChange(import_exported_related.FILTER_TYPES.CURRENCY_RANGE, nextValue);
73
+ },
74
+ [filterValue, onValueChange]
75
+ );
76
+ const onKeyDownHandler = (0, import_react.useCallback)(
77
+ (e) => {
78
+ if (e.code === "Escape") {
79
+ patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });
80
+ innerRef.current?.focus();
81
+ }
82
+ },
83
+ [column.id, innerRef, patchHeader]
84
+ );
85
+ const ref = (0, import_react.useRef)(null);
77
86
  const shouldFocus = (0, import_react.useRef)(true);
78
87
  const handleRef = (0, import_react.useCallback)(
79
88
  (newRef) => {
@@ -109,32 +118,26 @@ const NumberRangeFilter = (props) => {
109
118
  style: { background: "white" },
110
119
  children: [
111
120
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_layout_blocks.DSFormLayoutBlockItem, { label: "Low", inputID: `${idPreffix}-low-${column.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
- import_ds_form.DSInputMask,
121
+ import_ds_controlled_form.DSInputText,
113
122
  {
114
- containerProps: { style: { textAlign: "right" } },
115
- id: `${idPreffix}-low-${column.id}`,
116
- value: `${filterValue?.from ?? ""}`,
123
+ value: conform(filterValue.from),
117
124
  onChange: handleFromChange,
125
+ id: `${idPreffix}-low-${column.id}`,
126
+ style: { textAlign: "right" },
118
127
  placeholder: "0",
119
- mask: (number) => import_ds_form.MASK_TYPES.NUMBER(opts)(number),
120
128
  innerRef: handleRef,
121
- onKeyDown: (e) => {
122
- closePopover(e);
123
- }
129
+ onKeyDown: onKeyDownHandler
124
130
  }
125
131
  ) }),
126
132
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_layout_blocks.DSFormLayoutBlockItem, { label: "High", inputID: `${idPreffix}-high-${column.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
- import_ds_form.DSInputMask,
133
+ import_ds_controlled_form.DSInputText,
128
134
  {
129
- containerProps: { style: { textAlign: "right" } },
130
- id: `${idPreffix}-high-${column.id}`,
131
- value: `${filterValue?.to ?? ""}`,
135
+ value: conform(filterValue.to),
132
136
  onChange: handleToChange,
137
+ id: `${idPreffix}-high-${column.id}`,
138
+ style: { textAlign: "right" },
133
139
  placeholder: "0",
134
- mask: (number) => import_ds_form.MASK_TYPES.NUMBER(opts)(number),
135
- onKeyDown: (e) => {
136
- closePopover(e);
137
- }
140
+ onKeyDown: onKeyDownHandler
138
141
  }
139
142
  ) })
140
143
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/addons/Filters/Components/NumberRangeFilter/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useRef, useEffect, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSInputMask, MASK_TYPES } from '@elliemae/ds-form';\nimport { DSFormLayoutBlockItem } from '@elliemae/ds-form-layout-blocks';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\nconst opts = {\n prefix: '',\n suffix: '',\n allowDecimal: false,\n includeThousandsSeparator: false,\n requireDecimal: false,\n allowNegative: true,\n};\n\nexport const NumberRangeFilter: React.ComponentType<FilterProps> = (props) => {\n const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;\n\n const handleFromChange = (e) => {\n const from = e.target.value !== '' ? parseInt(e.target.value, 10) : '';\n const nextValue = {\n ...filterValue,\n from,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n };\n const handleToChange = (e) => {\n const to = e.target.value !== '' ? parseInt(e.target.value, 10) : '';\n const nextValue = {\n ...filterValue,\n to,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n };\n\n // workaround to close menu with esc key since DSInputMask has stoppropagation on key down\n const closePopover = (e) => {\n if (e.code === 'Escape') {\n patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });\n innerRef.current.focus();\n }\n };\n const idPreffix = 'datatable-number-range';\n\n const ref = useRef();\n const shouldFocus = useRef(true);\n const handleRef = useCallback(\n (newRef) => {\n if (ref.current) ref.current = newRef;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n },\n [shouldFocus],\n );\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={column.id}\n menuContent={\n <Grid\n data-testid={DATA_TESTID.DATA_TABLE_NUMBER_RANGE_CONTROLLER}\n gutter=\"xxxs\"\n padding=\"xxs\"\n cols={['auto', 'auto']}\n style={{ background: 'white' }}\n >\n <DSFormLayoutBlockItem label=\"Low\" inputID={`${idPreffix}-low-${column.id}`}>\n <DSInputMask\n containerProps={{ style: { textAlign: 'right' } }}\n id={`${idPreffix}-low-${column.id}`}\n value={`${filterValue?.from ?? ''}`}\n onChange={handleFromChange}\n placeholder=\"0\"\n mask={(number) => MASK_TYPES.NUMBER(opts)(number)}\n innerRef={handleRef}\n onKeyDown={(e) => {\n closePopover(e);\n }}\n />\n </DSFormLayoutBlockItem>\n <DSFormLayoutBlockItem label=\"High\" inputID={`${idPreffix}-high-${column.id}`}>\n <DSInputMask\n containerProps={{ style: { textAlign: 'right' } }}\n id={`${idPreffix}-high-${column.id}`}\n value={`${filterValue?.to ?? ''}`}\n onChange={handleToChange}\n placeholder=\"0\"\n mask={(number) => MASK_TYPES.NUMBER(opts)(number)}\n onKeyDown={(e) => {\n closePopover(e);\n }}\n />\n </DSFormLayoutBlockItem>\n </Grid>\n }\n triggerIcon={<SearchXsmall />}\n customStyles={{ width: column.ref?.current?.offsetWidth ?? '0px' }}\n innerRef={innerRef}\n ariaLabel=\"Open Number Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Ef;AA1ER,mBAAsD;AACtD,qBAAqB;AACrB,qBAAwC;AACxC,mCAAsC;AACtC,sBAA6B;AAC7B,8BAA4C;AAE5C,uBAA4B;AAE5B,MAAM,OAAO;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,2BAA2B;AAAA,EAC3B,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAEO,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,QAAQ,cAAc,EAAE,MAAM,MAAM,I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AAAA,UACP,SAAQ;AAAA,UACR,MAAM,CAAC,QAAQ,MAAM;AAAA,UACrB,OAAO,EAAE,YAAY,QAAQ;AAAA,UAE7B;AAAA,wDAAC,sDAAsB,OAAM,OAAM,SAAS,GAAG,iBAAiB,OAAO,MACrE;AAAA,cAAC;AAAA;AAAA,gBACC,gBAAgB,EAAE,OAAO,EAAE,WAAW,QAAQ,EAAE;AAAA,gBAChD,IAAI,GAAG,iBAAiB,OAAO;AAAA,gBAC/B,OAAO,GAAG,aAAa,QAAQ;AAAA,gBAC/B,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,MAAM,CAAC,WAAW,0BAAW,OAAO,IAAI,EAAE,MAAM;AAAA,gBAChD,UAAU;AAAA,gBACV,WAAW,CAAC,MAAM;AAChB,+BAAa,CAAC;AAAA,gBAChB;AAAA;AAAA,YACF,GACF;AAAA,YACA,4CAAC,sDAAsB,OAAM,QAAO,SAAS,GAAG,kBAAkB,OAAO,MACvE;AAAA,cAAC;AAAA;AAAA,gBACC,gBAAgB,EAAE,OAAO,EAAE,WAAW,QAAQ,EAAE;AAAA,gBAChD,IAAI,GAAG,kBAAkB,OAAO;AAAA,gBAChC,OAAO,GAAG,aAAa,MAAM;AAAA,gBAC7B,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,MAAM,CAAC,WAAW,0BAAW,OAAO,IAAI,EAAE,MAAM;AAAA,gBAChD,WAAW,CAAC,MAAM;AAChB,+BAAa,CAAC;AAAA,gBAChB;AAAA;AAAA,YACF,GACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEF,aAAa,4CAAC,gCAAa;AAAA,MAC3B,cAAc,EAAE,OAAO,OAAO,KAAK,SAAS,eAAe,MAAM;AAAA,MACjE;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
4
+ "sourcesContent": ["import React, { useRef, useEffect, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSInputText, getNumberMaskedValue } from '@elliemae/ds-controlled-form';\nimport { DSFormLayoutBlockItem } from '@elliemae/ds-form-layout-blocks';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { FilterProps } from '../../../../types/props.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\n\ninterface NumberRangeFilterValue {\n from: number | '' | null;\n to: number | '' | null;\n}\n\nconst opts = {\n includeThousandsSeparator: false,\n decimalPlaces: 0,\n};\n\nconst idPreffix = 'datatable-number-range';\n\nconst conform = (value: number | string | null) => {\n const valueAsString = value?.toString() ?? '';\n return getNumberMaskedValue(valueAsString, opts);\n};\n\nexport const NumberRangeFilter: React.ComponentType<FilterProps<NumberRangeFilterValue>> = (props) => {\n const { column, filterValue = { from: null, to: null }, reduxHeader, patchHeader, onValueChange, innerRef } = props;\n\n const handleFromChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const from: NumberRangeFilterValue['from'] = e.target.value !== '' ? parseInt(e.target.value, 10) : '';\n const nextValue = {\n ...filterValue,\n from,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n },\n [filterValue, onValueChange],\n );\n\n const handleToChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const to: NumberRangeFilterValue['to'] = e.target.value !== '' ? parseInt(e.target.value, 10) : '';\n const nextValue = {\n ...filterValue,\n to,\n };\n onValueChange(FILTER_TYPES.CURRENCY_RANGE, nextValue);\n },\n [filterValue, onValueChange],\n );\n\n // workaround to close menu with esc key since DSInputMask has stoppropagation on key down\n const onKeyDownHandler = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.code === 'Escape') {\n patchHeader(column.id, { hideFilterMenu: true, hideFilterButton: false });\n innerRef.current?.focus();\n }\n },\n [column.id, innerRef, patchHeader],\n );\n\n const ref = useRef<HTMLInputElement | null>(null);\n const shouldFocus = useRef(true);\n const handleRef = useCallback(\n (newRef: HTMLInputElement | null) => {\n if (ref.current) ref.current = newRef;\n if (shouldFocus.current) {\n setTimeout(() => {\n newRef?.focus();\n shouldFocus.current = false;\n });\n }\n },\n [shouldFocus],\n );\n\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={column.id}\n menuContent={\n <Grid\n data-testid={DATA_TESTID.DATA_TABLE_NUMBER_RANGE_CONTROLLER}\n gutter=\"xxxs\"\n padding=\"xxs\"\n cols={['auto', 'auto']}\n style={{ background: 'white' }}\n >\n <DSFormLayoutBlockItem label=\"Low\" inputID={`${idPreffix}-low-${column.id}`}>\n <DSInputText\n value={conform(filterValue.from)}\n onChange={handleFromChange}\n id={`${idPreffix}-low-${column.id}`}\n style={{ textAlign: 'right' }}\n placeholder=\"0\"\n innerRef={handleRef}\n onKeyDown={onKeyDownHandler}\n />\n </DSFormLayoutBlockItem>\n <DSFormLayoutBlockItem label=\"High\" inputID={`${idPreffix}-high-${column.id}`}>\n <DSInputText\n value={conform(filterValue.to)}\n onChange={handleToChange}\n id={`${idPreffix}-high-${column.id}`}\n style={{ textAlign: 'right' }}\n placeholder=\"0\"\n onKeyDown={onKeyDownHandler}\n />\n </DSFormLayoutBlockItem>\n </Grid>\n }\n triggerIcon={<SearchXsmall />}\n customStyles={{ width: column.ref?.current?.offsetWidth ?? '0px' }}\n innerRef={innerRef}\n ariaLabel=\"Open Number Range Filter\"\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2Ff;AA3FR,mBAAsD;AACtD,qBAAqB;AACrB,gCAAkD;AAClD,mCAAsC;AACtC,sBAA6B;AAC7B,8BAA4C;AAE5C,uBAA4B;AAO5B,MAAM,OAAO;AAAA,EACX,2BAA2B;AAAA,EAC3B,eAAe;AACjB;A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