@elliemae/ds-data-table 3.57.0-next.2 → 3.57.0-next.21

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 (113) hide show
  1. package/dist/cjs/addons/Columns/ColumnExpand/ColumnExpand.js +2 -2
  2. package/dist/cjs/addons/Columns/ColumnExpand/ColumnExpand.js.map +3 -3
  3. package/dist/cjs/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +2 -2
  4. package/dist/cjs/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js.map +3 -3
  5. package/dist/cjs/addons/Editables/TextEditableCell/TextEditableCell.js +2 -2
  6. package/dist/cjs/addons/Editables/TextEditableCell/TextEditableCell.js.map +2 -2
  7. package/dist/cjs/addons/Filters/Components/FreeTextSearchFilter/index.js +38 -25
  8. package/dist/cjs/addons/Filters/Components/FreeTextSearchFilter/index.js.map +3 -3
  9. package/dist/cjs/{DSDataTableDefinitions.js → constants/index.js} +43 -7
  10. package/dist/cjs/constants/index.js.map +7 -0
  11. package/dist/cjs/constants/legacyToBeDeprecated.js +75 -0
  12. package/dist/cjs/constants/legacyToBeDeprecated.js.map +7 -0
  13. package/dist/cjs/exported-related/FilterBar/FilterBarDropdownMenu.js +40 -26
  14. package/dist/cjs/exported-related/FilterBar/FilterBarDropdownMenu.js.map +2 -2
  15. package/dist/cjs/exported-related/FilterBar/FilterMenuButton.js +113 -0
  16. package/dist/cjs/exported-related/FilterBar/FilterMenuButton.js.map +7 -0
  17. package/dist/cjs/exported-related/FilterBar/index.js +3 -1
  18. package/dist/cjs/exported-related/FilterBar/index.js.map +2 -2
  19. package/dist/cjs/exported-related/FilterPopover/index.js +20 -8
  20. package/dist/cjs/exported-related/FilterPopover/index.js.map +3 -3
  21. package/dist/cjs/exported-related/Toolbar/Toolbar.js +7 -7
  22. package/dist/cjs/exported-related/Toolbar/Toolbar.js.map +3 -3
  23. package/dist/cjs/exported-related/index.js +1 -0
  24. package/dist/cjs/exported-related/index.js.map +2 -2
  25. package/dist/cjs/index.js +7 -2
  26. package/dist/cjs/index.js.map +2 -2
  27. package/dist/cjs/parts/DnDHandle.js +4 -4
  28. package/dist/cjs/parts/DnDHandle.js.map +3 -3
  29. package/dist/cjs/parts/DropIndicator.js +14 -14
  30. package/dist/cjs/parts/DropIndicator.js.map +3 -3
  31. package/dist/cjs/parts/EmptyContent.js +8 -8
  32. package/dist/cjs/parts/EmptyContent.js.map +2 -2
  33. package/dist/cjs/parts/FilterBar/styled.js +2 -2
  34. package/dist/cjs/parts/FilterBar/styled.js.map +2 -2
  35. package/dist/cjs/parts/Headers/EmptyChildrenGroup.js +2 -2
  36. package/dist/cjs/parts/Headers/EmptyChildrenGroup.js.map +2 -2
  37. package/dist/cjs/parts/Headers/HeaderCellGroup.js +2 -2
  38. package/dist/cjs/parts/Headers/HeaderCellGroup.js.map +2 -2
  39. package/dist/cjs/parts/Headers/useHeaderResizer.js +21 -19
  40. package/dist/cjs/parts/Headers/useHeaderResizer.js.map +3 -3
  41. package/dist/cjs/parts/Loader.js +2 -2
  42. package/dist/cjs/parts/Loader.js.map +2 -2
  43. package/dist/cjs/parts/Row.js +2 -2
  44. package/dist/cjs/parts/Row.js.map +2 -2
  45. package/dist/cjs/react-desc-prop-types.js +2 -2
  46. package/dist/cjs/react-desc-prop-types.js.map +3 -3
  47. package/dist/cjs/styled.js +43 -43
  48. package/dist/cjs/styled.js.map +3 -3
  49. package/dist/esm/addons/Columns/ColumnExpand/ColumnExpand.js +1 -1
  50. package/dist/esm/addons/Columns/ColumnExpand/ColumnExpand.js.map +1 -1
  51. package/dist/esm/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +1 -1
  52. package/dist/esm/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js.map +1 -1
  53. package/dist/esm/addons/Editables/TextEditableCell/TextEditableCell.js +1 -1
  54. package/dist/esm/addons/Editables/TextEditableCell/TextEditableCell.js.map +1 -1
  55. package/dist/esm/addons/Filters/Components/FreeTextSearchFilter/index.js +36 -23
  56. package/dist/esm/addons/Filters/Components/FreeTextSearchFilter/index.js.map +2 -2
  57. package/dist/esm/constants/index.js +91 -0
  58. package/dist/esm/constants/index.js.map +7 -0
  59. package/dist/esm/constants/legacyToBeDeprecated.js +45 -0
  60. package/dist/esm/constants/legacyToBeDeprecated.js.map +7 -0
  61. package/dist/esm/exported-related/FilterBar/FilterBarDropdownMenu.js +41 -27
  62. package/dist/esm/exported-related/FilterBar/FilterBarDropdownMenu.js.map +2 -2
  63. package/dist/esm/exported-related/FilterBar/FilterMenuButton.js +83 -0
  64. package/dist/esm/exported-related/FilterBar/FilterMenuButton.js.map +7 -0
  65. package/dist/esm/exported-related/FilterBar/index.js +3 -1
  66. package/dist/esm/exported-related/FilterBar/index.js.map +2 -2
  67. package/dist/esm/exported-related/FilterPopover/index.js +14 -2
  68. package/dist/esm/exported-related/FilterPopover/index.js.map +2 -2
  69. package/dist/esm/exported-related/Toolbar/Toolbar.js +1 -1
  70. package/dist/esm/exported-related/Toolbar/Toolbar.js.map +1 -1
  71. package/dist/esm/exported-related/index.js +2 -1
  72. package/dist/esm/exported-related/index.js.map +2 -2
  73. package/dist/esm/index.js +14 -1
  74. package/dist/esm/index.js.map +2 -2
  75. package/dist/esm/parts/DnDHandle.js +1 -1
  76. package/dist/esm/parts/DnDHandle.js.map +1 -1
  77. package/dist/esm/parts/DropIndicator.js +1 -1
  78. package/dist/esm/parts/DropIndicator.js.map +1 -1
  79. package/dist/esm/parts/EmptyContent.js +1 -1
  80. package/dist/esm/parts/EmptyContent.js.map +1 -1
  81. package/dist/esm/parts/FilterBar/styled.js +1 -1
  82. package/dist/esm/parts/FilterBar/styled.js.map +1 -1
  83. package/dist/esm/parts/Headers/EmptyChildrenGroup.js +1 -1
  84. package/dist/esm/parts/Headers/EmptyChildrenGroup.js.map +1 -1
  85. package/dist/esm/parts/Headers/HeaderCellGroup.js +1 -1
  86. package/dist/esm/parts/Headers/HeaderCellGroup.js.map +1 -1
  87. package/dist/esm/parts/Headers/useHeaderResizer.js +21 -19
  88. package/dist/esm/parts/Headers/useHeaderResizer.js.map +3 -3
  89. package/dist/esm/parts/Loader.js +1 -1
  90. package/dist/esm/parts/Loader.js.map +1 -1
  91. package/dist/esm/parts/Row.js +1 -1
  92. package/dist/esm/parts/Row.js.map +1 -1
  93. package/dist/esm/react-desc-prop-types.js +5 -2
  94. package/dist/esm/react-desc-prop-types.js.map +2 -2
  95. package/dist/esm/styled.js +1 -1
  96. package/dist/esm/styled.js.map +1 -1
  97. package/dist/types/constants/index.d.ts +273 -0
  98. package/dist/types/constants/legacyToBeDeprecated.d.ts +38 -0
  99. package/dist/types/exported-related/FilterBar/FilterMenuButton.d.ts +19 -0
  100. package/dist/types/exported-related/FilterBar/index.d.ts +1 -0
  101. package/dist/types/exported-related/index.d.ts +1 -1
  102. package/dist/types/index.d.ts +2 -2
  103. package/dist/types/parts/Headers/useHeaderResizer.d.ts +1 -0
  104. package/dist/types/react-desc-prop-types.d.ts +5 -59
  105. package/dist/types/tests/a11y/out-of-the-box-filters.A11y.test.d.ts +1 -0
  106. package/dist/types/tests/data-testid/DSDataTable.data-testid.test.d.ts +1 -0
  107. package/dist/types/tests/data-testid/Renderers.d.ts +36 -0
  108. package/package.json +30 -30
  109. package/dist/cjs/DSDataTableDefinitions.js.map +0 -7
  110. package/dist/esm/DSDataTableDefinitions.js +0 -55
  111. package/dist/esm/DSDataTableDefinitions.js.map +0 -7
  112. package/dist/types/DSDataTableDefinitions.d.ts +0 -91
  113. /package/dist/types/tests/{a11y/filter-bar-dropdown-menu.test.d.ts → DSDataTable.exports.test.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createRef, useCallback } from 'react';\nimport { DSControlledRadio } from '@elliemae/ds-form-radio';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSDataTableT } from '../../../react-desc-prop-types.js';\nimport { DATA_TESTID } from '../../../configs/constants.js';\nimport { ScreenReaderOnly } from '../../../styled.js';\nimport { usePropsStore } from '../../../configs/useStore/createInternalAndPropsContext.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../DSDataTableDefinitions.js';\n\nconst CenteredContent = styled('div', { name: DSDataTableName, slot: DSDataTableSlots.SINGLE_CELL_CONTAINER })`\n display: flex;\n height: 100%;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst stopThePropagation = (e: React.MouseEvent | React.KeyboardEvent) => e.stopPropagation();\n\nexport const singleSelectColumn: DSDataTableT.InternalColumn = {\n // Build our singleSelecter column\n id: 'singleSelecter', // Make sure it has an ID\n // The header doesn't need anything for single selection\n Header: () => <ScreenReaderOnly>Single Select Column</ScreenReaderOnly>,\n Cell: ({ cell, row, isRowSelected }) => {\n const onSelectionChange = usePropsStore((state) => state.onSelectionChange);\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const selection = usePropsStore((state) => state.selection);\n const disabledRows = usePropsStore((state) => state.disabledRows);\n const { uid } = row;\n const selectedState = !!selection?.[uid];\n\n const onChangeHandler = useCallback(\n (newValue: string, e: React.ChangeEvent) => {\n // in single select we only allow one item to be selected\n onSelectionChange({ [uid]: !selectedState }, uid, e);\n },\n [onSelectionChange, selectedState, uid],\n );\n\n return (\n <CenteredContent onClick={stopThePropagation} onKeyDown={stopThePropagation} getOwnerProps={getOwnerProps}>\n <DSControlledRadio\n aria-checked={selectedState}\n aria-disabled={disabledRows[row.uid]}\n title=\"Toggle row selected\"\n aria-label=\"Toggle row selected\"\n checked={selectedState}\n onChange={onChangeHandler}\n data-testid={DATA_TESTID.DATA_TABLE_RADIO}\n disabled={disabledRows[row.uid]}\n innerRef={cell.ref}\n value={uid}\n tabIndex={isRowSelected ? 0 : -1}\n />\n </CenteredContent>\n );\n },\n textWrap: 'wrap',\n width: 32,\n padding: 4,\n canResize: false,\n isFocuseable: false,\n disableDnD: true,\n parentId: null,\n depth: 0,\n ref: createRef(),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createRef, useCallback } from 'react';\nimport { DSControlledRadio } from '@elliemae/ds-form-radio';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSDataTableT } from '../../../react-desc-prop-types.js';\nimport { DATA_TESTID } from '../../../configs/constants.js';\nimport { ScreenReaderOnly } from '../../../styled.js';\nimport { usePropsStore } from '../../../configs/useStore/createInternalAndPropsContext.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../constants/index.js';\n\nconst CenteredContent = styled('div', { name: DSDataTableName, slot: DSDataTableSlots.SINGLE_CELL_CONTAINER })`\n display: flex;\n height: 100%;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst stopThePropagation = (e: React.MouseEvent | React.KeyboardEvent) => e.stopPropagation();\n\nexport const singleSelectColumn: DSDataTableT.InternalColumn = {\n // Build our singleSelecter column\n id: 'singleSelecter', // Make sure it has an ID\n // The header doesn't need anything for single selection\n Header: () => <ScreenReaderOnly>Single Select Column</ScreenReaderOnly>,\n Cell: ({ cell, row, isRowSelected }) => {\n const onSelectionChange = usePropsStore((state) => state.onSelectionChange);\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const selection = usePropsStore((state) => state.selection);\n const disabledRows = usePropsStore((state) => state.disabledRows);\n const { uid } = row;\n const selectedState = !!selection?.[uid];\n\n const onChangeHandler = useCallback(\n (newValue: string, e: React.ChangeEvent) => {\n // in single select we only allow one item to be selected\n onSelectionChange({ [uid]: !selectedState }, uid, e);\n },\n [onSelectionChange, selectedState, uid],\n );\n\n return (\n <CenteredContent onClick={stopThePropagation} onKeyDown={stopThePropagation} getOwnerProps={getOwnerProps}>\n <DSControlledRadio\n aria-checked={selectedState}\n aria-disabled={disabledRows[row.uid]}\n title=\"Toggle row selected\"\n aria-label=\"Toggle row selected\"\n checked={selectedState}\n onChange={onChangeHandler}\n data-testid={DATA_TESTID.DATA_TABLE_RADIO}\n disabled={disabledRows[row.uid]}\n innerRef={cell.ref}\n value={uid}\n tabIndex={isRowSelected ? 0 : -1}\n />\n </CenteredContent>\n );\n },\n textWrap: 'wrap',\n width: 32,\n padding: 4,\n canResize: false,\n isFocuseable: false,\n disableDnD: true,\n parentId: null,\n depth: 0,\n ref: createRef(),\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACuBP;AAvBhB,SAAgB,WAAW,mBAAmB;AAC9C,SAAS,yBAAyB;AAClC,SAAS,cAAc;AAEvB,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,sBAAsB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ7G,MAAM,qBAAqB,CAAC,MAA8C,EAAE,gBAAgB;AAErF,MAAM,qBAAkD;AAAA;AAAA,EAE7D,IAAI;AAAA;AAAA;AAAA,EAEJ,QAAQ,MAAM,oBAAC,oBAAiB,kCAAoB;AAAA,EACpD,MAAM,CAAC,EAAE,MAAM,KAAK,cAAc,MAAM;AACtC,UAAM,oBAAoB,cAAc,CAAC,UAAU,MAAM,iBAAiB;AAC1E,UAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AAExD,UAAM,YAAY,cAAc,CAAC,UAAU,MAAM,SAAS;AAC1D,UAAM,eAAe,cAAc,CAAC,UAAU,MAAM,YAAY;AAChE,UAAM,EAAE,IAAI,IAAI;AAChB,UAAM,gBAAgB,CAAC,CAAC,YAAY,GAAG;AAEvC,UAAM,kBAAkB;AAAA,MACtB,CAAC,UAAkB,MAAyB;AAE1C,0BAAkB,EAAE,CAAC,GAAG,GAAG,CAAC,cAAc,GAAG,KAAK,CAAC;AAAA,MACrD;AAAA,MACA,CAAC,mBAAmB,eAAe,GAAG;AAAA,IACxC;AAEA,WACE,oBAAC,mBAAgB,SAAS,oBAAoB,WAAW,oBAAoB,eAC3E;AAAA,MAAC;AAAA;AAAA,QACC,gBAAc;AAAA,QACd,iBAAe,aAAa,IAAI,GAAG;AAAA,QACnC,OAAM;AAAA,QACN,cAAW;AAAA,QACX,SAAS;AAAA,QACT,UAAU;AAAA,QACV,eAAa,YAAY;AAAA,QACzB,UAAU,aAAa,IAAI,GAAG;AAAA,QAC9B,UAAU,KAAK;AAAA,QACf,OAAO;AAAA,QACP,UAAU,gBAAgB,IAAI;AAAA;AAAA,IAChC,GACF;AAAA,EAEJ;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK,UAAU;AACjB;",
6
6
  "names": []
7
7
  }
@@ -4,7 +4,7 @@ import React2, { useState, useCallback } from "react";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { EditableCell } from "../../../exported-related/index.js";
6
6
  import { usePropsStore } from "../../../configs/useStore/createInternalAndPropsContext.js";
7
- import { DSDataTableName, DSDataTableSlots } from "../../../DSDataTableDefinitions.js";
7
+ import { DSDataTableName, DSDataTableSlots } from "../../../constants/index.js";
8
8
  const StyledInput = styled("input", { name: DSDataTableName, slot: DSDataTableSlots.TEXT_EDITABLE_CELL_INPUT })`
9
9
  outline: none;
10
10
  :focus {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/addons/Editables/TextEditableCell/TextEditableCell.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jsx-a11y/no-autofocus */\nimport React, { useState, useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { EditableCell } from '../../../exported-related/index.js';\nimport type { DSDataTableT } from '../../../react-desc-prop-types.js';\nimport { usePropsStore } from '../../../configs/useStore/createInternalAndPropsContext.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../DSDataTableDefinitions.js';\n\nconst StyledInput = styled('input', { name: DSDataTableName, slot: DSDataTableSlots.TEXT_EDITABLE_CELL_INPUT })`\n outline: none;\n :focus {\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n }\n max-width: 100%;\n`;\n\nexport const TextEditableCell: React.ComponentType<DSDataTableT.EditableCellProps<HTMLDivElement>> = (props) => {\n const { cell, DefaultCellRender, isRowSelected } = props;\n\n const onCellValueChange = usePropsStore((state) => state.onCellValueChange);\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => cell, [cell]);\n\n const [value, setValue] = useState<string>(cell.value as string);\n\n const handleOnChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n const {\n target: { value: tValue },\n } = e;\n setValue(tValue);\n }, []);\n\n const handleOnBlur = useCallback(() => {\n const property = cell.column.id;\n const rowIndex = cell.row.index;\n onCellValueChange({ value, property, rowIndex });\n }, [value, onCellValueChange, cell.column.id, cell.row.index]);\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'Enter') {\n cell.ref.current?.focus();\n // will exec on blur callback from input and save new value\n }\n if (e.code === 'Escape') {\n setValue(cell.value as string);\n const auxRef = cell.ref.current;\n // this prevent the on blur\n setTimeout(() => {\n auxRef?.focus();\n });\n }\n },\n [cell],\n );\n return (\n <EditableCell\n StandardRender={DefaultCellRender}\n EditableRenderer={\n <StyledInput\n value={value}\n onKeyDown={handleOnKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n autoFocus\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n }\n cell={cell}\n isRowSelected={isRowSelected}\n />\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jsx-a11y/no-autofocus */\nimport React, { useState, useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { EditableCell } from '../../../exported-related/index.js';\nimport type { DSDataTableT } from '../../../react-desc-prop-types.js';\nimport { usePropsStore } from '../../../configs/useStore/createInternalAndPropsContext.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../constants/index.js';\n\nconst StyledInput = styled('input', { name: DSDataTableName, slot: DSDataTableSlots.TEXT_EDITABLE_CELL_INPUT })`\n outline: none;\n :focus {\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n }\n max-width: 100%;\n`;\n\nexport const TextEditableCell: React.ComponentType<DSDataTableT.EditableCellProps<HTMLDivElement>> = (props) => {\n const { cell, DefaultCellRender, isRowSelected } = props;\n\n const onCellValueChange = usePropsStore((state) => state.onCellValueChange);\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => cell, [cell]);\n\n const [value, setValue] = useState<string>(cell.value as string);\n\n const handleOnChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n const {\n target: { value: tValue },\n } = e;\n setValue(tValue);\n }, []);\n\n const handleOnBlur = useCallback(() => {\n const property = cell.column.id;\n const rowIndex = cell.row.index;\n onCellValueChange({ value, property, rowIndex });\n }, [value, onCellValueChange, cell.column.id, cell.row.index]);\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'Enter') {\n cell.ref.current?.focus();\n // will exec on blur callback from input and save new value\n }\n if (e.code === 'Escape') {\n setValue(cell.value as string);\n const auxRef = cell.ref.current;\n // this prevent the on blur\n setTimeout(() => {\n auxRef?.focus();\n });\n }\n },\n [cell],\n );\n return (\n <EditableCell\n StandardRender={DefaultCellRender}\n EditableRenderer={\n <StyledInput\n value={value}\n onKeyDown={handleOnKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n autoFocus\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n }\n cell={cell}\n isRowSelected={isRowSelected}\n />\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC2Df;AA1DR,OAAOA,UAAS,UAAU,mBAAmB;AAC7C,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAE7B,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,cAAc,OAAO,SAAS,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,yBAAyB,CAAC;AAAA;AAAA;AAAA,wBAGtF,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAKzD,MAAM,mBAAwF,CAAC,UAAU;AAC9G,QAAM,EAAE,MAAM,mBAAmB,cAAc,IAAI;AAEnD,QAAM,oBAAoB,cAAc,CAAC,UAAU,MAAM,iBAAiB;AAC1E,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,MAAM,CAAC,IAAI,CAAC;AAEnE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAiB,KAAK,KAAe;AAE/D,QAAM,iBAAiB,YAAY,CAAC,MAA2C;AAC7E,UAAM;AAAA,MACJ,QAAQ,EAAE,OAAO,OAAO;AAAA,IAC1B,IAAI;AACJ,aAAS,MAAM;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,QAAM,eAAe,YAAY,MAAM;AACrC,UAAM,WAAW,KAAK,OAAO;AAC7B,UAAM,WAAW,KAAK,IAAI;AAC1B,sBAAkB,EAAE,OAAO,UAAU,SAAS,CAAC;AAAA,EACjD,GAAG,CAAC,OAAO,mBAAmB,KAAK,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC;AAE7D,QAAM,kBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,SAAS;AACtB,aAAK,IAAI,SAAS,MAAM;AAAA,MAE1B;AACA,UAAI,EAAE,SAAS,UAAU;AACvB,iBAAS,KAAK,KAAe;AAC7B,cAAM,SAAS,KAAK,IAAI;AAExB,mBAAW,MAAM;AACf,kBAAQ,MAAM;AAAA,QAChB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB;AAAA,MAChB,kBACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW;AAAA,UACX,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,WAAS;AAAA,UACT;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -9,12 +9,16 @@ import { uid } from "uid";
9
9
  import { FilterPopover, FILTER_TYPES } from "../../../../exported-related/index.js";
10
10
  import { DATA_TESTID } from "../../../../configs/constants.js";
11
11
  import { ScreenReaderOnly } from "../../../../styled.js";
12
- import { DSDataTableName, DSDataTableSlots } from "../../../../DSDataTableDefinitions.js";
12
+ import { DSDataTableName, DSDataTableSlots } from "../../../../constants/index.js";
13
13
  import { usePropsStore } from "../../../../configs/useStore/createInternalAndPropsContext.js";
14
14
  const StyledInputFreeTextSearch = styled(DSInputText, {
15
15
  name: DSDataTableName,
16
16
  slot: DSDataTableSlots.FREE_TEXT_SEARCH_FILTER
17
17
  })``;
18
+ const StyledInputFreeTextSearchWrapper = styled(Grid, {
19
+ name: DSDataTableName,
20
+ slot: DSDataTableSlots.FREE_TEXT_SEARCH_WRAPPER
21
+ })``;
18
22
  const FreeTextSearchFilter = (props) => {
19
23
  const {
20
24
  column,
@@ -52,7 +56,7 @@ const FreeTextSearchFilter = (props) => {
52
56
  const [value, setValue] = useState("");
53
57
  const onKeyDown = useCallback(
54
58
  (event) => {
55
- if (event.key === "Enter") {
59
+ if (event.key === "Enter" && value.trim() !== "") {
56
60
  onValueChange(FILTER_TYPES.FREE_TEXT_SEARCH, value || void 0);
57
61
  if (!persistFilterInputAfterSubmit) {
58
62
  setValue("");
@@ -76,27 +80,36 @@ const FreeTextSearchFilter = (props) => {
76
80
  width: referenceColumn?.offsetWidth,
77
81
  minWidth: "80px"
78
82
  },
79
- menuContent: /* @__PURE__ */ jsxs(Grid, { p: "xxs", gutter: "xxs", style: { background: "white" }, children: [
80
- /* @__PURE__ */ jsx(ScreenReaderOnly, { id: "filter-input-instructions", children: "Press Enter to apply the filter and close the dialog. Focus will return to the button that opened this dialog." }),
81
- /* @__PURE__ */ jsx(
82
- StyledInputFreeTextSearch,
83
- {
84
- id: `ds-data-table-free-text-search-${id}-${domIdAffix}`,
85
- placeholder: "",
86
- value,
87
- onValueChange: (newValue) => {
88
- setValue(newValue);
89
- },
90
- innerRef: handleRef,
91
- onKeyDown,
92
- "data-testid": DATA_TESTID.DATA_TABLE_FILTER_FREE_TEXT_SEARCH,
93
- "aria-label": "Free Text Search Filter",
94
- "aria-describedby": "filter-input-instructions",
95
- getOwnerProps,
96
- getOwnerPropsArguments
97
- }
98
- )
99
- ] }),
83
+ menuContent: /* @__PURE__ */ jsxs(
84
+ StyledInputFreeTextSearchWrapper,
85
+ {
86
+ p: "xxs",
87
+ gutter: "xxs",
88
+ getOwnerProps,
89
+ getOwnerPropsArguments,
90
+ children: [
91
+ /* @__PURE__ */ jsx(ScreenReaderOnly, { id: "filter-input-instructions", children: "Press Enter to apply the filter and close the dialog. Focus will return to the button that opened this dialog." }),
92
+ /* @__PURE__ */ jsx(
93
+ StyledInputFreeTextSearch,
94
+ {
95
+ id: `ds-data-table-free-text-search-${id}-${domIdAffix}`,
96
+ placeholder: "",
97
+ value,
98
+ onValueChange: (newValue) => {
99
+ setValue(newValue);
100
+ },
101
+ innerRef: handleRef,
102
+ onKeyDown,
103
+ "data-testid": DATA_TESTID.DATA_TABLE_FILTER_FREE_TEXT_SEARCH,
104
+ "aria-label": "Free Text Search Filter",
105
+ "aria-describedby": "filter-input-instructions",
106
+ getOwnerProps,
107
+ getOwnerPropsArguments
108
+ }
109
+ )
110
+ ]
111
+ }
112
+ ),
100
113
  triggerIcon: /* @__PURE__ */ jsx(SearchXsmall, {}),
101
114
  innerRef,
102
115
  ariaLabel: "Open Free Text Search Filter"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/addons/Filters/Components/FreeTextSearchFilter/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useCallback, useState, useEffect } from 'react';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { DSDataTableT } from '../../../../react-desc-prop-types.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\nimport { ScreenReaderOnly } from '../../../../styled.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../../DSDataTableDefinitions.js';\nimport { usePropsStore } from '../../../../configs/useStore/createInternalAndPropsContext.js';\n\nconst StyledInputFreeTextSearch = styled(DSInputText, {\n name: DSDataTableName,\n slot: DSDataTableSlots.FREE_TEXT_SEARCH_FILTER,\n})``;\n\nexport const FreeTextSearchFilter: React.ComponentType<DSDataTableT.FilterProps<string>> = (props) => {\n const {\n column,\n referenceColumn,\n column: { id, persistFilterInputAfterSubmit = false },\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n domIdAffix = uid(4),\n } = props;\n\n const ref = useRef<HTMLInputElement | null>(null);\n const shouldFocus = useRef(true);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: id,\n }),\n [id],\n );\n\n const handleRef = useCallback((newRef: HTMLInputElement | null) => {\n ref.current = newRef;\n if (shouldFocus.current) {\n requestAnimationFrame(() => {\n ref.current?.focus();\n shouldFocus.current = false;\n });\n }\n }, []);\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n const [value, setValue] = useState<string>('');\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n // || undefined to clear the filter when empty\n onValueChange(FILTER_TYPES.FREE_TEXT_SEARCH, value || undefined);\n if (!persistFilterInputAfterSubmit) {\n setValue('');\n }\n setTimeout(() => {\n patchHeaderFilterButtonAndMenu(id, true);\n innerRef?.current?.focus();\n }, 0);\n }\n },\n [id, innerRef, onValueChange, patchHeaderFilterButtonAndMenu, persistFilterInputAfterSubmit, value],\n );\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n customStyles={{\n backgroundColor: '#fff',\n width: referenceColumn?.offsetWidth,\n minWidth: '80px',\n }}\n menuContent={\n <Grid p=\"xxs\" gutter=\"xxs\" style={{ background: 'white' }}>\n <ScreenReaderOnly id=\"filter-input-instructions\">\n Press Enter to apply the filter and close the dialog. Focus will return to the button that opened this\n dialog.\n </ScreenReaderOnly>\n <StyledInputFreeTextSearch\n id={`ds-data-table-free-text-search-${id}-${domIdAffix}`}\n placeholder=\"\"\n value={value}\n onValueChange={(newValue) => {\n setValue(newValue);\n }}\n innerRef={handleRef}\n onKeyDown={onKeyDown}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_FREE_TEXT_SEARCH}\n aria-label=\"Free Text Search Filter\"\n aria-describedby=\"filter-input-instructions\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </Grid>\n }\n triggerIcon={<SearchXsmall />}\n innerRef={innerRef}\n ariaLabel=\"Open Free Text Search Filter\"\n />\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACqFf,SACE,KADF;AArFR,SAAgB,QAAQ,aAAa,UAAU,iBAAiB;AAChE,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,eAAe,oBAAoB;AAE5C,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,qBAAqB;AAE9B,MAAM,4BAA4B,OAAO,aAAa;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAEM,MAAM,uBAA8E,CAAC,UAAU;AACpG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,QAAQ,EAAE,IAAI,gCAAgC,MAAM;AAAA,IACpD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,IAAI,CAAC;AAAA,EACpB,IAAI;AAEJ,QAAM,MAAM,OAAgC,IAAI;AAChD,QAAM,cAAc,OAAO,IAAI;AAE/B,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB;AAAA,IAC7B,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,CAAC,EAAE;AAAA,EACL;AAEA,QAAM,YAAY,YAAY,CAAC,WAAoC;AACjE,QAAI,UAAU;AACd,QAAI,YAAY,SAAS;AACvB,4BAAsB,MAAM;AAC1B,YAAI,SAAS,MAAM;AACnB,oBAAY,UAAU;AAAA,MACxB,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,CAAC;AACL,YAAU,MAAM;AACd,QAAI,aAAa,gBAAgB;AAC/B,kBAAY,UAAU;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,aAAa,cAAc,CAAC;AAEhC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAiB,EAAE;AAE7C,QAAM,YAAY;AAAA,IAChB,CAAC,UAAiD;AAChD,UAAI,MAAM,QAAQ,SAAS;AAEzB,sBAAc,aAAa,kBAAkB,SAAS,MAAS;AAC/D,YAAI,CAAC,+BAA+B;AAClC,mBAAS,EAAE;AAAA,QACb;AACA,mBAAW,MAAM;AACf,yCAA+B,IAAI,IAAI;AACvC,oBAAU,SAAS,MAAM;AAAA,QAC3B,GAAG,CAAC;AAAA,MACN;AAAA,IACF;AAAA,IACA,CAAC,IAAI,UAAU,eAAe,gCAAgC,+BAA+B,KAAK;AAAA,EACpG;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,cAAc;AAAA,QACZ,iBAAiB;AAAA,QACjB,OAAO,iBAAiB;AAAA,QACxB,UAAU;AAAA,MACZ;AAAA,MACA,aACE,qBAAC,QAAK,GAAE,OAAM,QAAO,OAAM,OAAO,EAAE,YAAY,QAAQ,GACtD;AAAA,4BAAC,oBAAiB,IAAG,6BAA4B,4HAGjD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,kCAAkC,EAAE,IAAI,UAAU;AAAA,YACtD,aAAY;AAAA,YACZ;AAAA,YACA,eAAe,CAAC,aAAa;AAC3B,uBAAS,QAAQ;AAAA,YACnB;AAAA,YACA,UAAU;AAAA,YACV;AAAA,YACA,eAAa,YAAY;AAAA,YACzB,cAAW;AAAA,YACX,oBAAiB;AAAA,YACjB;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACF;AAAA,MAEF,aAAa,oBAAC,gBAAa;AAAA,MAC3B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useCallback, useState, useEffect } from 'react';\nimport { SearchXsmall } from '@elliemae/ds-icons';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport { FilterPopover, FILTER_TYPES } from '../../../../exported-related/index.js';\nimport type { DSDataTableT } from '../../../../react-desc-prop-types.js';\nimport { DATA_TESTID } from '../../../../configs/constants.js';\nimport { ScreenReaderOnly } from '../../../../styled.js';\nimport { DSDataTableName, DSDataTableSlots } from '../../../../constants/index.js';\nimport { usePropsStore } from '../../../../configs/useStore/createInternalAndPropsContext.js';\n\nconst StyledInputFreeTextSearch = styled(DSInputText, {\n name: DSDataTableName,\n slot: DSDataTableSlots.FREE_TEXT_SEARCH_FILTER,\n})``;\n\nconst StyledInputFreeTextSearchWrapper = styled(Grid, {\n name: DSDataTableName,\n slot: DSDataTableSlots.FREE_TEXT_SEARCH_WRAPPER,\n})``;\n\nexport const FreeTextSearchFilter: React.ComponentType<DSDataTableT.FilterProps<string>> = (props) => {\n const {\n column,\n referenceColumn,\n column: { id, persistFilterInputAfterSubmit = false },\n onValueChange,\n patchHeaderFilterButtonAndMenu,\n reduxHeader,\n innerRef,\n domIdAffix = uid(4),\n } = props;\n\n const ref = useRef<HTMLInputElement | null>(null);\n const shouldFocus = useRef(true);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(\n () => ({\n columnId: id,\n }),\n [id],\n );\n\n const handleRef = useCallback((newRef: HTMLInputElement | null) => {\n ref.current = newRef;\n if (shouldFocus.current) {\n requestAnimationFrame(() => {\n ref.current?.focus();\n shouldFocus.current = false;\n });\n }\n }, []);\n useEffect(() => {\n if (reduxHeader?.hideFilterMenu) {\n shouldFocus.current = true;\n }\n }, [reduxHeader?.hideFilterMenu]);\n\n const [value, setValue] = useState<string>('');\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter' && value.trim() !== '') {\n // || undefined to clear the filter when empty\n onValueChange(FILTER_TYPES.FREE_TEXT_SEARCH, value || undefined);\n if (!persistFilterInputAfterSubmit) {\n setValue('');\n }\n setTimeout(() => {\n patchHeaderFilterButtonAndMenu(id, true);\n innerRef?.current?.focus();\n }, 0);\n }\n },\n [id, innerRef, onValueChange, patchHeaderFilterButtonAndMenu, persistFilterInputAfterSubmit, value],\n );\n return (\n <FilterPopover\n reduxHeader={reduxHeader}\n column={column}\n columnId={id}\n customStyles={{\n backgroundColor: '#fff',\n width: referenceColumn?.offsetWidth,\n minWidth: '80px',\n }}\n menuContent={\n <StyledInputFreeTextSearchWrapper\n p=\"xxs\"\n gutter=\"xxs\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ScreenReaderOnly id=\"filter-input-instructions\">\n Press Enter to apply the filter and close the dialog. Focus will return to the button that opened this\n dialog.\n </ScreenReaderOnly>\n <StyledInputFreeTextSearch\n id={`ds-data-table-free-text-search-${id}-${domIdAffix}`}\n placeholder=\"\"\n value={value}\n onValueChange={(newValue) => {\n setValue(newValue);\n }}\n innerRef={handleRef}\n onKeyDown={onKeyDown}\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_FREE_TEXT_SEARCH}\n aria-label=\"Free Text Search Filter\"\n aria-describedby=\"filter-input-instructions\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </StyledInputFreeTextSearchWrapper>\n }\n triggerIcon={<SearchXsmall />}\n innerRef={innerRef}\n ariaLabel=\"Open Free Text Search Filter\"\n />\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0Ff,SAME,KANF;AA1FR,SAAgB,QAAQ,aAAa,UAAU,iBAAiB;AAChE,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,eAAe,oBAAoB;AAE5C,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,qBAAqB;AAE9B,MAAM,4BAA4B,OAAO,aAAa;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAED,MAAM,mCAAmC,OAAO,MAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAEM,MAAM,uBAA8E,CAAC,UAAU;AACpG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,QAAQ,EAAE,IAAI,gCAAgC,MAAM;AAAA,IACpD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,IAAI,CAAC;AAAA,EACpB,IAAI;AAEJ,QAAM,MAAM,OAAgC,IAAI;AAChD,QAAM,cAAc,OAAO,IAAI;AAE/B,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB;AAAA,IAC7B,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,CAAC,EAAE;AAAA,EACL;AAEA,QAAM,YAAY,YAAY,CAAC,WAAoC;AACjE,QAAI,UAAU;AACd,QAAI,YAAY,SAAS;AACvB,4BAAsB,MAAM;AAC1B,YAAI,SAAS,MAAM;AACnB,oBAAY,UAAU;AAAA,MACxB,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,CAAC;AACL,YAAU,MAAM;AACd,QAAI,aAAa,gBAAgB;AAC/B,kBAAY,UAAU;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,aAAa,cAAc,CAAC;AAEhC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAiB,EAAE;AAE7C,QAAM,YAAY;AAAA,IAChB,CAAC,UAAiD;AAChD,UAAI,MAAM,QAAQ,WAAW,MAAM,KAAK,MAAM,IAAI;AAEhD,sBAAc,aAAa,kBAAkB,SAAS,MAAS;AAC/D,YAAI,CAAC,+BAA+B;AAClC,mBAAS,EAAE;AAAA,QACb;AACA,mBAAW,MAAM;AACf,yCAA+B,IAAI,IAAI;AACvC,oBAAU,SAAS,MAAM;AAAA,QAC3B,GAAG,CAAC;AAAA,MACN;AAAA,IACF;AAAA,IACA,CAAC,IAAI,UAAU,eAAe,gCAAgC,+BAA+B,KAAK;AAAA,EACpG;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,cAAc;AAAA,QACZ,iBAAiB;AAAA,QACjB,OAAO,iBAAiB;AAAA,QACxB,UAAU;AAAA,MACZ;AAAA,MACA,aACE;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,QAAO;AAAA,UACP;AAAA,UACA;AAAA,UAEA;AAAA,gCAAC,oBAAiB,IAAG,6BAA4B,4HAGjD;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI,kCAAkC,EAAE,IAAI,UAAU;AAAA,gBACtD,aAAY;AAAA,gBACZ;AAAA,gBACA,eAAe,CAAC,aAAa;AAC3B,2BAAS,QAAQ;AAAA,gBACnB;AAAA,gBACA,UAAU;AAAA,gBACV;AAAA,gBACA,eAAa,YAAY;AAAA,gBACzB,cAAW;AAAA,gBACX,oBAAiB;AAAA,gBACjB;AAAA,gBACA;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEF,aAAa,oBAAC,gBAAa;AAAA,MAC3B;AAAA,MACA,WAAU;AAAA;AAAA,EACZ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,91 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ import { legacyDataTestIds } from "./legacyToBeDeprecated.js";
4
+ const DSDataTableName = "DSDatatable";
5
+ const DATA_TABLE_SLOTS = {
6
+ ROOT: "root",
7
+ CONTENT_WRAPPER: "content-wrapper",
8
+ TABLE_WRAPPER: "table-wrapper",
9
+ PAGINATION_WRAPPER: "pagination-wrapper",
10
+ TABLE_CONTENT_WRAPPER: "table-content-wrapper",
11
+ VIRTUAL_LIST_WRAPPER: "virtual-list-wrapper",
12
+ HEAD_WRAPPER: "head-wrapper",
13
+ HEAD_TR: "head-tr",
14
+ HEAD_TH: "head-th",
15
+ HEAD_RIGHT_ICONS_WRAPPER: "head-right-icons-wrapper",
16
+ HEADER_CELL_WRAPPER: "header-cell-wrapper",
17
+ EMPTY_HEADER: "empty-header",
18
+ RESIZER: "resizer",
19
+ ACTION_CELL: "action-cell",
20
+ EXPAND_CELL_CONTAINER: "expand-cell-container",
21
+ SINGLE_CELL_CONTAINER: "single-cell-container",
22
+ DRAG_AND_DROP_GRIPPER: "drag-and-drop-gripper",
23
+ TEXT_EDITABLE_CELL_INPUT: "text-editable-cell-input",
24
+ FILTER_POPOVER_BUTTON: "filter-popover-button",
25
+ FILTER_POPOVER_CONTENT: "filter-popover-content",
26
+ DROP_INDICATOR: "drop-indicator",
27
+ CELL: "cell",
28
+ CELL_CONTENT: "cell-content",
29
+ PENCIL_ICON: "pencil-icon",
30
+ EDITABLE_CONTAINER: "editable-container",
31
+ FULLSIZE_GRID: "fullsize-grid",
32
+ ROW: "row",
33
+ GROUP_HEADER_CONTAINER: "group-header-container",
34
+ GROUP_HEADER_TITLE: "header-title",
35
+ CELL_CONTAINER: "cells-container",
36
+ TOOLBAR_WRAPPER: "toolbar-wrapper",
37
+ TOOLBAR_BUTTONS_WRAPPER: "toolbar-buttons-wrapper",
38
+ TOOLBAR_BUTTON: "toolbar-button",
39
+ TOOLBAR_POSITION: "toolbar-position",
40
+ EMPTY_STATE_WRAPPER: "empty-state-wrapper",
41
+ WARNING_ICON: "warning-icon",
42
+ EMPTY_PRIMARY_MESSAGE: "empty-primary-message",
43
+ EMPTY_SECONDARY_MESSAGE: "empty-secondary-message",
44
+ EMPTY_BUTTON: "empty-button",
45
+ CENTER_CONTENT_FLEX_WRAPPER: "center-content-flex-wrapper",
46
+ LOADER_WRAPPER: "loader-wrapper",
47
+ FILTER_BAR_WRAPPER: "filter-bar-wrapper",
48
+ FREE_TEXT_SEARCH_FILTER: "free-text-search-filter",
49
+ FREE_TEXT_SEARCH_WRAPPER: "free-text-search-wrapper",
50
+ FILTER_POPOVER: "filter-popover",
51
+ FILTER_BAR_MENU_BUTTON: "filter-bar-menu-button"
52
+ };
53
+ const DATA_TABLE_DATA_TESTID = {
54
+ ...slotObjectToDataTestIds(DSDataTableName, DATA_TABLE_SLOTS),
55
+ /**
56
+ * These data-testid were defined in src/configs/constants.tsx
57
+ * but they were never exposed to consumers in the index.ts file.
58
+ * We are exposing them here for backward compatibility, as they are the ones used in the component implementation.
59
+ *
60
+ */
61
+ ...legacyDataTestIds,
62
+ /**
63
+ * As there is a mix of hardcoded data-testid and the ones auto generated by slot definitions
64
+ * we are overriding the auto generated ones with the hardcoded values for consistency.
65
+ */
66
+ CONTENT_WRAPPER: legacyDataTestIds.DATA_TABLE_CONTENT_WRAPPER,
67
+ TABLE_WRAPPER: legacyDataTestIds.DATA_TABLE_TABLE,
68
+ CELL_CONTAINER: legacyDataTestIds.DATA_TABLE_ROW_CONTENT,
69
+ DRAG_AND_DROP_GRIPPER: legacyDataTestIds.DATA_TABLE_DRAG_HANDLE,
70
+ FREE_TEXT_SEARCH_FILTER: legacyDataTestIds.DATA_TABLE_FILTER_FREE_TEXT_SEARCH,
71
+ FILTER_POPOVER_BUTTON: legacyDataTestIds.DATA_TABLE_FILTER_BUTTON,
72
+ HEAD_TH: legacyDataTestIds.DATA_TABLE_HEADER,
73
+ CELL: legacyDataTestIds.DATA_TABLE_CELL,
74
+ FULLSIZE_GRID: legacyDataTestIds.DATA_TABLE_ROW,
75
+ ROOT: legacyDataTestIds.DATA_TABLE_WRAPPER,
76
+ VIRTUAL_LIST_WRAPPER: legacyDataTestIds.DATA_TABLE_SCROLLABLE_CONTAINER,
77
+ GROUP_HEADER_CONTAINER: legacyDataTestIds.DATA_TABLE_ROW_GROUP_HEADER,
78
+ FILTER_BAR_MENU_BUTTON: legacyDataTestIds.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON,
79
+ // This one does not exist in the legacy list, but it was hardcoded in the component definition
80
+ EXPAND_CELL_CONTAINER: "data-table-row-expand-cell"
81
+ };
82
+ const DSDataTableSlots = DATA_TABLE_SLOTS;
83
+ const DSDataTableDataTestIds = DATA_TABLE_DATA_TESTID;
84
+ export {
85
+ DATA_TABLE_DATA_TESTID,
86
+ DATA_TABLE_SLOTS,
87
+ DSDataTableDataTestIds,
88
+ DSDataTableName,
89
+ DSDataTableSlots
90
+ };
91
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { legacyDataTestIds } from './legacyToBeDeprecated.js';\n\nexport const DSDataTableName = 'DSDatatable';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATA_TABLE_SLOTS = {\n ROOT: 'root',\n CONTENT_WRAPPER: 'content-wrapper',\n TABLE_WRAPPER: 'table-wrapper',\n PAGINATION_WRAPPER: 'pagination-wrapper',\n TABLE_CONTENT_WRAPPER: 'table-content-wrapper',\n VIRTUAL_LIST_WRAPPER: 'virtual-list-wrapper',\n HEAD_WRAPPER: 'head-wrapper',\n HEAD_TR: 'head-tr',\n HEAD_TH: 'head-th',\n HEAD_RIGHT_ICONS_WRAPPER: 'head-right-icons-wrapper',\n HEADER_CELL_WRAPPER: 'header-cell-wrapper',\n EMPTY_HEADER: 'empty-header',\n RESIZER: 'resizer',\n ACTION_CELL: 'action-cell',\n EXPAND_CELL_CONTAINER: 'expand-cell-container',\n SINGLE_CELL_CONTAINER: 'single-cell-container',\n DRAG_AND_DROP_GRIPPER: 'drag-and-drop-gripper',\n TEXT_EDITABLE_CELL_INPUT: 'text-editable-cell-input',\n FILTER_POPOVER_BUTTON: 'filter-popover-button',\n FILTER_POPOVER_CONTENT: 'filter-popover-content',\n DROP_INDICATOR: 'drop-indicator',\n CELL: 'cell',\n CELL_CONTENT: 'cell-content',\n PENCIL_ICON: 'pencil-icon',\n EDITABLE_CONTAINER: 'editable-container',\n FULLSIZE_GRID: 'fullsize-grid',\n ROW: 'row',\n GROUP_HEADER_CONTAINER: 'group-header-container',\n GROUP_HEADER_TITLE: 'header-title',\n CELL_CONTAINER: 'cells-container',\n TOOLBAR_WRAPPER: 'toolbar-wrapper',\n TOOLBAR_BUTTONS_WRAPPER: 'toolbar-buttons-wrapper',\n TOOLBAR_BUTTON: 'toolbar-button',\n TOOLBAR_POSITION: 'toolbar-position',\n EMPTY_STATE_WRAPPER: 'empty-state-wrapper',\n WARNING_ICON: 'warning-icon',\n EMPTY_PRIMARY_MESSAGE: 'empty-primary-message',\n EMPTY_SECONDARY_MESSAGE: 'empty-secondary-message',\n EMPTY_BUTTON: 'empty-button',\n CENTER_CONTENT_FLEX_WRAPPER: 'center-content-flex-wrapper',\n LOADER_WRAPPER: 'loader-wrapper',\n FILTER_BAR_WRAPPER: 'filter-bar-wrapper',\n FREE_TEXT_SEARCH_FILTER: 'free-text-search-filter',\n FREE_TEXT_SEARCH_WRAPPER: 'free-text-search-wrapper',\n FILTER_POPOVER: 'filter-popover',\n FILTER_BAR_MENU_BUTTON: 'filter-bar-menu-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATA_TABLE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSDataTableName, DATA_TABLE_SLOTS),\n /**\n * These data-testid were defined in src/configs/constants.tsx\n * but they were never exposed to consumers in the index.ts file.\n * We are exposing them here for backward compatibility, as they are the ones used in the component implementation.\n *\n */\n ...legacyDataTestIds,\n /**\n * As there is a mix of hardcoded data-testid and the ones auto generated by slot definitions\n * we are overriding the auto generated ones with the hardcoded values for consistency.\n */\n CONTENT_WRAPPER: legacyDataTestIds.DATA_TABLE_CONTENT_WRAPPER,\n TABLE_WRAPPER: legacyDataTestIds.DATA_TABLE_TABLE,\n CELL_CONTAINER: legacyDataTestIds.DATA_TABLE_ROW_CONTENT,\n DRAG_AND_DROP_GRIPPER: legacyDataTestIds.DATA_TABLE_DRAG_HANDLE,\n FREE_TEXT_SEARCH_FILTER: legacyDataTestIds.DATA_TABLE_FILTER_FREE_TEXT_SEARCH,\n FILTER_POPOVER_BUTTON: legacyDataTestIds.DATA_TABLE_FILTER_BUTTON,\n HEAD_TH: legacyDataTestIds.DATA_TABLE_HEADER,\n CELL: legacyDataTestIds.DATA_TABLE_CELL,\n FULLSIZE_GRID: legacyDataTestIds.DATA_TABLE_ROW,\n ROOT: legacyDataTestIds.DATA_TABLE_WRAPPER,\n VIRTUAL_LIST_WRAPPER: legacyDataTestIds.DATA_TABLE_SCROLLABLE_CONTAINER,\n GROUP_HEADER_CONTAINER: legacyDataTestIds.DATA_TABLE_ROW_GROUP_HEADER,\n FILTER_BAR_MENU_BUTTON: legacyDataTestIds.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON,\n // This one does not exist in the legacy list, but it was hardcoded in the component definition\n EXPAND_CELL_CONTAINER: 'data-table-row-expand-cell',\n};\n\n// Legacy exports before Dimsum Compliance Task\nexport const DSDataTableSlots = DATA_TABLE_SLOTS;\nexport const DSDataTableDataTestIds = DATA_TABLE_DATA_TESTID;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAE3B,MAAM,kBAAkB;AAGxB,MAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,SAAS;AAAA,EACT,0BAA0B;AAAA,EAC1B,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,aAAa;AAAA,EACb,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,cAAc;AAAA,EACd,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,KAAK;AAAA,EACL,wBAAwB;AAAA,EACxB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,cAAc;AAAA,EACd,6BAA6B;AAAA,EAC7B,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,gBAAgB;AAAA,EAChB,wBAAwB;AAC1B;AAGO,MAAM,yBAAyB;AAAA,EACpC,GAAG,wBAAwB,iBAAiB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5D,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,EAKH,iBAAiB,kBAAkB;AAAA,EACnC,eAAe,kBAAkB;AAAA,EACjC,gBAAgB,kBAAkB;AAAA,EAClC,uBAAuB,kBAAkB;AAAA,EACzC,yBAAyB,kBAAkB;AAAA,EAC3C,uBAAuB,kBAAkB;AAAA,EACzC,SAAS,kBAAkB;AAAA,EAC3B,MAAM,kBAAkB;AAAA,EACxB,eAAe,kBAAkB;AAAA,EACjC,MAAM,kBAAkB;AAAA,EACxB,sBAAsB,kBAAkB;AAAA,EACxC,wBAAwB,kBAAkB;AAAA,EAC1C,wBAAwB,kBAAkB;AAAA;AAAA,EAE1C,uBAAuB;AACzB;AAGO,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ const legacyDataTestIds = {
3
+ // DEFINED IN configs/constants.tsx
4
+ DATA_TABLE_WRAPPER: "data-table-wrapper",
5
+ DATA_TABLE_GLOBAL_EXPAND_CELL: "data-table-global-expand-cell",
6
+ DATA_TABLE_ICON_ARROW_DOWN: "ic-arrow-head-down",
7
+ DATA_TABLE_ICON_ARROW_RIGHT: "ic-arrow-head-right",
8
+ DATA_TABLE_ICON_ARROW_MIXED: "ic-arrow-head-mixed",
9
+ DATA_TABLE_ICON_CHILD: "ic-arrow-child",
10
+ DATA_TABLE_GLOBAL_CHECKBOX: "data-table-global-checkbox",
11
+ DATA_TABLE_CHECKBOX: "data-table-checkbox",
12
+ DATA_TABLE_RADIO: "data-table-radio",
13
+ DATA_TABLE_DATE_RANGE_CONTROLLER: "data-table-date-range",
14
+ DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER: "data-table-date-range-checkbox-switcher-container",
15
+ DATA_TABLE_SINGLE_DATE_CONTROLLER: "data-table-single-date",
16
+ DATA_TABLE_NUMBER_RANGE_CONTROLLER: "data-table-number-range",
17
+ DATA_TABLE_CURRENCY_RANGE_CONTROLLER: "data-table-currency-range",
18
+ DATA_TABLE_SELECT_MENU_ITEM: "data-table-filter-menu-list-item",
19
+ DATA_TABLE_MULTISELECT_CONTROLLER: "data-table-multi-select",
20
+ DATA_TABLE_SINGLESELECT_CONTROLLER: "data-table-single-select",
21
+ DATA_TABLE_FILTER_BUTTON: "data-table-filter-menu-button",
22
+ DATA_TABLE_FILTER_BUTTON_ELEMENT: "ds-button",
23
+ // TODO 'data-table-filter-menu-button-element',
24
+ DATA_TABLE_FILTER_MENU_CONTENT: "data-table-filter-menu-content",
25
+ DATA_TABLE_FILTER_FREE_TEXT_SEARCH: "data-table-filter-free-text-search",
26
+ DATA_TABLE_ROW_CONTENT: "data-table-row-content",
27
+ DATA_TABLE_ROW: "data-table-row",
28
+ DATA_TABLE_TOOLBAR_TRIGGER: "data-table-toolbar-trigger",
29
+ DATA_TABLE_CELL: "data-table-cell",
30
+ DATA_TABLE_DRAG_HANDLE: "data-table-drag-handle",
31
+ DATA_TABLE_CONTENT_WRAPPER: "data-table-content-wrapper",
32
+ DATA_TABLE_TABLE: "data-table-table",
33
+ DATA_TABLE_SCROLLABLE_CONTAINER: "data-table-scrollable-container",
34
+ DATA_TABLE_HEADER: "data-table-header",
35
+ DATA_TABLE_ROW_HEADER_CONTENT: "data-table-row-header-content",
36
+ DATA_TABLE_ROW_GROUP_HEADER: "data-table-row-group-header",
37
+ DATA_TABLE_COLUMN_DRAG_OVERLAY: "data-table-drag-column-drag-overlay",
38
+ DATA_TABLE_HEADER_CELL_TITLE: "header-cell-title",
39
+ DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON: "filter-bar-ddmenu-button",
40
+ DATA_TABLE_SORT_BUTTON: "data-table-sort-button"
41
+ };
42
+ export {
43
+ legacyDataTestIds
44
+ };
45
+ //# sourceMappingURL=legacyToBeDeprecated.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/legacyToBeDeprecated.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const legacyDataTestIds = {\n // DEFINED IN configs/constants.tsx\n DATA_TABLE_WRAPPER: 'data-table-wrapper',\n DATA_TABLE_GLOBAL_EXPAND_CELL: 'data-table-global-expand-cell',\n DATA_TABLE_ICON_ARROW_DOWN: 'ic-arrow-head-down',\n DATA_TABLE_ICON_ARROW_RIGHT: 'ic-arrow-head-right',\n DATA_TABLE_ICON_ARROW_MIXED: 'ic-arrow-head-mixed',\n DATA_TABLE_ICON_CHILD: 'ic-arrow-child',\n DATA_TABLE_GLOBAL_CHECKBOX: 'data-table-global-checkbox',\n DATA_TABLE_CHECKBOX: 'data-table-checkbox',\n DATA_TABLE_RADIO: 'data-table-radio',\n DATA_TABLE_DATE_RANGE_CONTROLLER: 'data-table-date-range',\n DATA_TABLE_DATE_RANGE_CONTROLLER_CHECKBOX_SWITCHER: 'data-table-date-range-checkbox-switcher-container',\n DATA_TABLE_SINGLE_DATE_CONTROLLER: 'data-table-single-date',\n DATA_TABLE_NUMBER_RANGE_CONTROLLER: 'data-table-number-range',\n DATA_TABLE_CURRENCY_RANGE_CONTROLLER: 'data-table-currency-range',\n DATA_TABLE_SELECT_MENU_ITEM: 'data-table-filter-menu-list-item',\n DATA_TABLE_MULTISELECT_CONTROLLER: 'data-table-multi-select',\n DATA_TABLE_SINGLESELECT_CONTROLLER: 'data-table-single-select',\n DATA_TABLE_FILTER_BUTTON: 'data-table-filter-menu-button',\n DATA_TABLE_FILTER_BUTTON_ELEMENT: 'ds-button', // TODO 'data-table-filter-menu-button-element',\n DATA_TABLE_FILTER_MENU_CONTENT: 'data-table-filter-menu-content',\n DATA_TABLE_FILTER_FREE_TEXT_SEARCH: 'data-table-filter-free-text-search',\n DATA_TABLE_ROW_CONTENT: 'data-table-row-content',\n DATA_TABLE_ROW: 'data-table-row',\n DATA_TABLE_TOOLBAR_TRIGGER: 'data-table-toolbar-trigger',\n DATA_TABLE_CELL: 'data-table-cell',\n DATA_TABLE_DRAG_HANDLE: 'data-table-drag-handle',\n DATA_TABLE_CONTENT_WRAPPER: 'data-table-content-wrapper',\n DATA_TABLE_TABLE: 'data-table-table',\n DATA_TABLE_SCROLLABLE_CONTAINER: 'data-table-scrollable-container',\n DATA_TABLE_HEADER: 'data-table-header',\n DATA_TABLE_ROW_HEADER_CONTENT: 'data-table-row-header-content',\n DATA_TABLE_ROW_GROUP_HEADER: 'data-table-row-group-header',\n DATA_TABLE_COLUMN_DRAG_OVERLAY: 'data-table-drag-column-drag-overlay',\n DATA_TABLE_HEADER_CELL_TITLE: 'header-cell-title',\n DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON: 'filter-bar-ddmenu-button',\n DATA_TABLE_SORT_BUTTON: 'data-table-sort-button',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,oBAAoB;AAAA;AAAA,EAE/B,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,6BAA6B;AAAA,EAC7B,uBAAuB;AAAA,EACvB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,kCAAkC;AAAA,EAClC,oDAAoD;AAAA,EACpD,mCAAmC;AAAA,EACnC,oCAAoC;AAAA,EACpC,sCAAsC;AAAA,EACtC,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,oCAAoC;AAAA,EACpC,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA;AAAA,EAClC,gCAAgC;AAAA,EAChC,oCAAoC;AAAA,EACpC,wBAAwB;AAAA,EACxB,gBAAgB;AAAA,EAChB,4BAA4B;AAAA,EAC5B,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,kBAAkB;AAAA,EAClB,iCAAiC;AAAA,EACjC,mBAAmB;AAAA,EACnB,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,wBAAwB;AAC1B;",
6
+ "names": []
7
+ }
@@ -1,11 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useState, useCallback, useMemo } from "react";
4
- import { DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu-v2";
4
+ import { checkAndConvertOptions, DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu-v2";
5
5
  import { DSButtonV2, BUTTON_TYPES } from "@elliemae/ds-button-v2";
6
6
  import { MoreOptionsVert } from "@elliemae/ds-icons";
7
7
  import { DATA_TESTID } from "../../configs/index.js";
8
8
  import { usePropsStore } from "../../configs/useStore/createInternalAndPropsContext.js";
9
+ import { FilterMenuButton } from "./FilterMenuButton.js";
9
10
  const FilterBarDropdownMenu = (props) => {
10
11
  const onFiltersChange = usePropsStore((state) => state.onFiltersChange);
11
12
  const [isOpened, setIsOpened] = useState(false);
@@ -15,6 +16,9 @@ const FilterBarDropdownMenu = (props) => {
15
16
  setIsOpened(false);
16
17
  innerRef?.current?.focus?.();
17
18
  }, [innerRef, onFiltersChange]);
19
+ const onClearFilters = useCallback(() => {
20
+ onFiltersChange([]);
21
+ }, [onFiltersChange]);
18
22
  const options = useMemo(
19
23
  () => [
20
24
  {
@@ -31,32 +35,42 @@ const FilterBarDropdownMenu = (props) => {
31
35
  ],
32
36
  [extraOptions, removeFilters]
33
37
  );
34
- return /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(
35
- DSDropdownMenuV2,
36
- {
37
- isOpened,
38
- startPlacementPreference: "bottom-end",
39
- options,
40
- onClickOutside: () => {
41
- setIsOpened(false);
42
- },
43
- onKeyDown: (e) => {
44
- if (e.code === "Escape") innerRef?.current?.focus?.();
45
- },
46
- children: /* @__PURE__ */ jsx(
47
- DSButtonV2,
48
- {
49
- buttonType: BUTTON_TYPES.ICON,
50
- onClick: () => setIsOpened((prevOpened) => !prevOpened),
51
- innerRef,
52
- "aria-label": "Filter bar addon",
53
- "data-testid": DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON,
54
- ...restProps,
55
- children: /* @__PURE__ */ jsx(MoreOptionsVert, {})
56
- }
57
- )
58
- }
59
- ) });
38
+ try {
39
+ const { convertedOptions, report } = checkAndConvertOptions(extraOptions);
40
+ report.humanReadableWarnings.forEach((warning) => console.warn(warning));
41
+ return /* @__PURE__ */ jsx(FilterMenuButton, { options: convertedOptions, onClearFilters, innerRef });
42
+ } catch {
43
+ console.error(`
44
+ In upcoming releases, DSDropdownMenuV2 will be deprecated as it is not accessible.
45
+ In effort to have compliant components we are enforcing MenuButton usage, by converting options.
46
+ If you find this error it is because the provided options are not possible to be made A11y accessible, and we are displaying the DSDropdownMenuV2 as fallback.`);
47
+ return /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(
48
+ DSDropdownMenuV2,
49
+ {
50
+ isOpened,
51
+ startPlacementPreference: "bottom-end",
52
+ options,
53
+ onClickOutside: () => {
54
+ setIsOpened(false);
55
+ },
56
+ onKeyDown: (e) => {
57
+ if (e.code === "Escape") innerRef?.current?.focus?.();
58
+ },
59
+ children: /* @__PURE__ */ jsx(
60
+ DSButtonV2,
61
+ {
62
+ buttonType: BUTTON_TYPES.ICON,
63
+ onClick: () => setIsOpened((prevOpened) => !prevOpened),
64
+ innerRef,
65
+ "aria-label": "Filter bar addon",
66
+ "data-testid": DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON,
67
+ ...restProps,
68
+ children: /* @__PURE__ */ jsx(MoreOptionsVert, {})
69
+ }
70
+ )
71
+ }
72
+ ) });
73
+ }
60
74
  };
61
75
  export {
62
76
  FilterBarDropdownMenu
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/FilterBar/FilterBarDropdownMenu.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useCallback, useMemo } from 'react';\nimport { DSDropdownMenuV2, type DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSButtonV2, BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../configs/index.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\n\ninterface FilterBarDropdownMenuProps {\n options?: DSDropdownMenuT.Props['options'];\n innerRef?: React.RefObject<HTMLButtonElement>;\n}\n\nexport const FilterBarDropdownMenu: React.ComponentType<FilterBarDropdownMenuProps> = (props) => {\n const onFiltersChange = usePropsStore((state) => state.onFiltersChange);\n const [isOpened, setIsOpened] = useState(false);\n\n const { options: extraOptions = [], innerRef, ...restProps } = props;\n const removeFilters: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(() => {\n onFiltersChange([]);\n setIsOpened(false);\n innerRef?.current?.focus?.();\n }, [innerRef, onFiltersChange]);\n\n const options: DSDropdownMenuT.Item[] = useMemo(\n () => [\n {\n dsId: '__internal__option__clear__filters',\n label: 'Clear Filters',\n value: 'clear',\n type: 'action',\n onClick: removeFilters,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) removeFilters(e);\n },\n } as unknown as DSDropdownMenuT.Item,\n ...extraOptions,\n ],\n [extraOptions, removeFilters],\n );\n\n return (\n <div style={{ marginLeft: 'auto' }}>\n <DSDropdownMenuV2\n isOpened={isOpened}\n startPlacementPreference=\"bottom-end\"\n options={options}\n onClickOutside={() => {\n setIsOpened(false);\n }}\n onKeyDown={(e: React.KeyboardEvent) => {\n if (e.code === 'Escape') innerRef?.current?.focus?.();\n }}\n >\n <DSButtonV2\n buttonType={BUTTON_TYPES.ICON}\n onClick={() => setIsOpened((prevOpened) => !prevOpened)}\n innerRef={innerRef}\n aria-label=\"Filter bar addon\"\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON}\n {...restProps}\n >\n <MoreOptionsVert />\n </DSButtonV2>\n </DSDropdownMenuV2>\n </div>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6Db;AA7DV,SAAgB,UAAU,aAAa,eAAe;AACtD,SAAS,wBAA8C;AACvD,SAAS,YAAY,oBAAoB;AACzC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAOvB,MAAM,wBAAyE,CAAC,UAAU;AAC/F,QAAM,kBAAkB,cAAc,CAAC,UAAU,MAAM,eAAe;AACtE,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,EAAE,SAAS,eAAe,CAAC,GAAG,UAAU,GAAG,UAAU,IAAI;AAC/D,QAAM,gBAAsE,YAAY,MAAM;AAC5F,oBAAgB,CAAC,CAAC;AAClB,gBAAY,KAAK;AACjB,cAAU,SAAS,QAAQ;AAAA,EAC7B,GAAG,CAAC,UAAU,eAAe,CAAC;AAE9B,QAAM,UAAkC;AAAA,IACtC,MAAM;AAAA,MACJ;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW,CAAC,MAA2B;AACrC,cAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,EAAG,eAAc,CAAC;AAAA,QAC1D;AAAA,MACF;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA,CAAC,cAAc,aAAa;AAAA,EAC9B;AAEA,SACE,oBAAC,SAAI,OAAO,EAAE,YAAY,OAAO,GAC/B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,0BAAyB;AAAA,MACzB;AAAA,MACA,gBAAgB,MAAM;AACpB,oBAAY,KAAK;AAAA,MACnB;AAAA,MACA,WAAW,CAAC,MAA2B;AACrC,YAAI,EAAE,SAAS,SAAU,WAAU,SAAS,QAAQ;AAAA,MACtD;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,YAAY,aAAa;AAAA,UACzB,SAAS,MAAM,YAAY,CAAC,eAAe,CAAC,UAAU;AAAA,UACtD;AAAA,UACA,cAAW;AAAA,UACX,eAAa,YAAY;AAAA,UACxB,GAAG;AAAA,UAEJ,8BAAC,mBAAgB;AAAA;AAAA,MACnB;AAAA;AAAA,EACF,GACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useCallback, useMemo } from 'react';\nimport { checkAndConvertOptions, DSDropdownMenuV2, type DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSButtonV2, BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../configs/index.js';\nimport { usePropsStore } from '../../configs/useStore/createInternalAndPropsContext.js';\nimport { FilterMenuButton } from './FilterMenuButton.js';\n\ninterface FilterBarDropdownMenuProps {\n options?: DSDropdownMenuT.Props['options'];\n innerRef?: React.RefObject<HTMLButtonElement>;\n}\n\nexport const FilterBarDropdownMenu: React.ComponentType<FilterBarDropdownMenuProps> = (props) => {\n const onFiltersChange = usePropsStore((state) => state.onFiltersChange);\n const [isOpened, setIsOpened] = useState(false);\n\n const { options: extraOptions = [], innerRef, ...restProps } = props;\n const removeFilters: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(() => {\n onFiltersChange([]);\n setIsOpened(false);\n innerRef?.current?.focus?.();\n }, [innerRef, onFiltersChange]);\n const onClearFilters = useCallback(() => {\n onFiltersChange([]);\n }, [onFiltersChange]);\n\n const options: DSDropdownMenuT.Item[] = useMemo(\n () => [\n {\n dsId: '__internal__option__clear__filters',\n label: 'Clear Filters',\n value: 'clear',\n type: 'action',\n onClick: removeFilters,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) removeFilters(e);\n },\n } as unknown as DSDropdownMenuT.Item,\n ...extraOptions,\n ],\n [extraOptions, removeFilters],\n );\n\n /** PUI-15557 (https://jira.elliemae.io/browse/PUI-15557)\n * On behalf of this ticket, we are promoting the usage of withFilterBar always in combination with filterAddonRenderer, and never alone.\n * On Storybook, we were using this component (FilterBarDropdownMenu) as the addon, which was using DSDropdownMenuV2.\n * As DSDropdownMenuV2 is not accessible, we are enforcing the usage of DSMenuButton instead, by converting options from DSDropdownMenuV2 to DSMenuButton.\n * If the conversion fails, we fallback to rendering the DSDropdownMenuV2 directly.\n */\n\n try {\n const { convertedOptions, report } = checkAndConvertOptions(extraOptions);\n // eslint-disable-next-line no-console\n report.humanReadableWarnings.forEach((warning) => console.warn(warning));\n return <FilterMenuButton options={convertedOptions} onClearFilters={onClearFilters} innerRef={innerRef} />;\n } catch {\n // eslint-disable-next-line no-console\n console.error(`\n In upcoming releases, DSDropdownMenuV2 will be deprecated as it is not accessible. \n In effort to have compliant components we are enforcing MenuButton usage, by converting options.\n If you find this error it is because the provided options are not possible to be made A11y accessible, and we are displaying the DSDropdownMenuV2 as fallback.`);\n return (\n <div style={{ marginLeft: 'auto' }}>\n <DSDropdownMenuV2\n isOpened={isOpened}\n startPlacementPreference=\"bottom-end\"\n options={options}\n onClickOutside={() => {\n setIsOpened(false);\n }}\n onKeyDown={(e: React.KeyboardEvent) => {\n if (e.code === 'Escape') innerRef?.current?.focus?.();\n }}\n >\n <DSButtonV2\n buttonType={BUTTON_TYPES.ICON}\n onClick={() => setIsOpened((prevOpened) => !prevOpened)}\n innerRef={innerRef}\n aria-label=\"Filter bar addon\"\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON}\n {...restProps}\n >\n <MoreOptionsVert />\n </DSButtonV2>\n </DSDropdownMenuV2>\n </div>\n );\n }\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACuDZ;AAvDX,SAAgB,UAAU,aAAa,eAAe;AACtD,SAAS,wBAAwB,wBAA8C;AAC/E,SAAS,YAAY,oBAAoB;AACzC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AAO1B,MAAM,wBAAyE,CAAC,UAAU;AAC/F,QAAM,kBAAkB,cAAc,CAAC,UAAU,MAAM,eAAe;AACtE,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,EAAE,SAAS,eAAe,CAAC,GAAG,UAAU,GAAG,UAAU,IAAI;AAC/D,QAAM,gBAAsE,YAAY,MAAM;AAC5F,oBAAgB,CAAC,CAAC;AAClB,gBAAY,KAAK;AACjB,cAAU,SAAS,QAAQ;AAAA,EAC7B,GAAG,CAAC,UAAU,eAAe,CAAC;AAC9B,QAAM,iBAAiB,YAAY,MAAM;AACvC,oBAAgB,CAAC,CAAC;AAAA,EACpB,GAAG,CAAC,eAAe,CAAC;AAEpB,QAAM,UAAkC;AAAA,IACtC,MAAM;AAAA,MACJ;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW,CAAC,MAA2B;AACrC,cAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,EAAG,eAAc,CAAC;AAAA,QAC1D;AAAA,MACF;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA,CAAC,cAAc,aAAa;AAAA,EAC9B;AASA,MAAI;AACF,UAAM,EAAE,kBAAkB,OAAO,IAAI,uBAAuB,YAAY;AAExE,WAAO,sBAAsB,QAAQ,CAAC,YAAY,QAAQ,KAAK,OAAO,CAAC;AACvE,WAAO,oBAAC,oBAAiB,SAAS,kBAAkB,gBAAgC,UAAoB;AAAA,EAC1G,QAAQ;AAEN,YAAQ,MAAM;AAAA;AAAA;AAAA,qKAGmJ;AACjK,WACE,oBAAC,SAAI,OAAO,EAAE,YAAY,OAAO,GAC/B;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,0BAAyB;AAAA,QACzB;AAAA,QACA,gBAAgB,MAAM;AACpB,sBAAY,KAAK;AAAA,QACnB;AAAA,QACA,WAAW,CAAC,MAA2B;AACrC,cAAI,EAAE,SAAS,SAAU,WAAU,SAAS,QAAQ;AAAA,QACtD;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,YAAY,aAAa;AAAA,YACzB,SAAS,MAAM,YAAY,CAAC,eAAe,CAAC,UAAU;AAAA,YACtD;AAAA,YACA,cAAW;AAAA,YACX,eAAa,YAAY;AAAA,YACxB,GAAG;AAAA,YAEJ,8BAAC,mBAAgB;AAAA;AAAA,QACnB;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,83 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { BUTTON_TYPES } from "@elliemae/ds-button-v2";
4
+ import { MoreOptionsVert } from "@elliemae/ds-icons";
5
+ import { DSMenuButton, MENU_ITEMS_TYPES } from "@elliemae/ds-menu-button";
6
+ import { styled } from "@elliemae/ds-system";
7
+ import { useMemo } from "react";
8
+ import { DATA_TESTID } from "../../configs/index.js";
9
+ import { DATA_TABLE_SLOTS, DSDataTableName } from "../../constants/index.js";
10
+ const StyledDSMenuButton = styled(DSMenuButton, {
11
+ name: DSDataTableName,
12
+ slot: DATA_TABLE_SLOTS.FILTER_BAR_MENU_BUTTON
13
+ })``;
14
+ const FilterMenuButton = ({
15
+ options = [],
16
+ innerRef,
17
+ onClearFilters,
18
+ onItemSelected,
19
+ onActivateItem,
20
+ selectedItems,
21
+ ...restProps
22
+ }) => {
23
+ const menuButtonOptions = useMemo(
24
+ () => [
25
+ {
26
+ type: MENU_ITEMS_TYPES.ACTIVABLE_ITEM,
27
+ dsId: "__internal__option__clear__filters",
28
+ label: "Clear Filters",
29
+ value: "clear",
30
+ onClick: onClearFilters,
31
+ onKeyDown: (e) => {
32
+ if (["Enter", "Space"].includes(e.code)) {
33
+ e.preventDefault();
34
+ onClearFilters();
35
+ }
36
+ return null;
37
+ }
38
+ },
39
+ ...options.map((option) => {
40
+ if (option.type !== MENU_ITEMS_TYPES.SEPARATOR && option.type !== MENU_ITEMS_TYPES.GROUP && option.type !== MENU_ITEMS_TYPES.SKELETON_ITEM) {
41
+ return {
42
+ ...option,
43
+ onKeyDown: (e) => {
44
+ if (["Enter", "Space"].includes(e.code)) {
45
+ e.preventDefault();
46
+ if (typeof option?.onClick === "function") {
47
+ option.onClick(e);
48
+ }
49
+ }
50
+ return null;
51
+ }
52
+ };
53
+ }
54
+ return option;
55
+ })
56
+ ],
57
+ [options, onClearFilters]
58
+ );
59
+ return /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(
60
+ StyledDSMenuButton,
61
+ {
62
+ buttonType: BUTTON_TYPES.ICON,
63
+ options: menuButtonOptions,
64
+ innerRef,
65
+ "aria-label": "Filter bar addon",
66
+ "data-testid": DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON,
67
+ onClose: () => {
68
+ innerRef?.current?.focus?.();
69
+ },
70
+ onItemSelected: onItemSelected ?? (() => {
71
+ }),
72
+ onActivateItem: onActivateItem ?? (() => {
73
+ }),
74
+ selectedItems: selectedItems ?? [],
75
+ ...restProps,
76
+ children: /* @__PURE__ */ jsx(MoreOptionsVert, {})
77
+ }
78
+ ) });
79
+ };
80
+ export {
81
+ FilterMenuButton
82
+ };
83
+ //# sourceMappingURL=FilterMenuButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/FilterBar/FilterMenuButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { DSMenuButton, MENU_ITEMS_TYPES, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport { styled } from '@elliemae/ds-system';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { useMemo } from 'react';\nimport { DATA_TESTID } from '../../configs/index.js';\nimport { DATA_TABLE_SLOTS, DSDataTableName } from '../../constants/index.js';\n\ninterface FilterMenuButtonProps {\n options?: DSMenuButtonT.MenuItemInterface[];\n innerRef?: React.RefObject<HTMLButtonElement>;\n onClearFilters: TypescriptHelpersT.GenericFunc;\n onItemSelected?: (\n newSelection: DSMenuButtonT.SelectionableMenuNodes[],\n metainfo: { itemNode: DSMenuButtonT.SelectionableMenuNodes; event?: React.SyntheticEvent },\n ) => void | TypescriptHelpersT.StateSetter<DSMenuButtonT.SelectionableMenuNodes[]>;\n onActivateItem?: (\n itemNode: DSMenuButtonT.PseudoFocusableMenuNodes,\n metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },\n ) => void;\n [key: string]: unknown;\n selectedItems?: DSMenuButtonT.SelectionableMenuNodes[] | DSMenuButtonT.SelectionableMenuItemInterface[];\n}\n\nconst StyledDSMenuButton = styled(DSMenuButton, {\n name: DSDataTableName,\n slot: DATA_TABLE_SLOTS.FILTER_BAR_MENU_BUTTON,\n})``;\n\nexport const FilterMenuButton: React.ComponentType<FilterMenuButtonProps> = ({\n options = [],\n innerRef,\n onClearFilters,\n onItemSelected,\n onActivateItem,\n selectedItems,\n ...restProps\n}) => {\n const menuButtonOptions: DSMenuButtonT.MenuItemInterface[] = useMemo(\n () => [\n {\n type: MENU_ITEMS_TYPES.ACTIVABLE_ITEM,\n dsId: '__internal__option__clear__filters',\n label: 'Clear Filters',\n value: 'clear',\n onClick: onClearFilters,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n onClearFilters();\n }\n return null;\n },\n },\n ...options.map((option) => {\n if (\n option.type !== MENU_ITEMS_TYPES.SEPARATOR &&\n option.type !== MENU_ITEMS_TYPES.GROUP &&\n option.type !== MENU_ITEMS_TYPES.SKELETON_ITEM\n ) {\n return {\n ...option,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n if (typeof option?.onClick === 'function') {\n option.onClick(e);\n }\n }\n return null;\n },\n };\n }\n return option;\n }),\n ],\n [options, onClearFilters],\n );\n\n return (\n <div style={{ marginLeft: 'auto' }}>\n <StyledDSMenuButton\n buttonType={BUTTON_TYPES.ICON}\n options={menuButtonOptions}\n innerRef={innerRef}\n aria-label=\"Filter bar addon\"\n data-testid={DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON}\n onClose={() => {\n innerRef?.current?.focus?.();\n }}\n /** PUI-15557 (https://jira.elliemae.io/browse/PUI-15557)\n * On behalf of this ticket, we are converting options from DSDropdownMenuV2 to DSMenuButton.\n * As DSMenuButton handles selection differently than DSDropdownMenuV2, we are providing\n * empty functions as onItemSelected and onActivateItem to avoid breaking changes for now.\n * As those props are required if any of the options are selectionable/activable.\n * In future releases, we should properly enforce user to provide these props as needed.\n */\n onItemSelected={onItemSelected ?? (() => {})}\n onActivateItem={onActivateItem ?? (() => {})}\n selectedItems={selectedItems ?? []}\n {...restProps}\n >\n <MoreOptionsVert />\n </StyledDSMenuButton>\n </div>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACuGf;AAvGR,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,cAAc,wBAA4C;AACnE,SAAS,cAAc;AAEvB,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB,uBAAuB;AAkBlD,MAAM,qBAAqB,OAAO,cAAc;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAEM,MAAM,mBAA+D,CAAC;AAAA,EAC3E,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAuD;AAAA,IAC3D,MAAM;AAAA,MACJ;AAAA,QACE,MAAM,iBAAiB;AAAA,QACvB,MAAM;AAAA,QACN,OAAO;AAAA,QACP,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAW,CAAC,MAA2B;AACrC,cAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AACvC,cAAE,eAAe;AACjB,2BAAe;AAAA,UACjB;AACA,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,MACA,GAAG,QAAQ,IAAI,CAAC,WAAW;AACzB,YACE,OAAO,SAAS,iBAAiB,aACjC,OAAO,SAAS,iBAAiB,SACjC,OAAO,SAAS,iBAAiB,eACjC;AACA,iBAAO;AAAA,YACL,GAAG;AAAA,YACH,WAAW,CAAC,MAA2B;AACrC,kBAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AACvC,kBAAE,eAAe;AACjB,oBAAI,OAAO,QAAQ,YAAY,YAAY;AACzC,yBAAO,QAAQ,CAAC;AAAA,gBAClB;AAAA,cACF;AACA,qBAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AACA,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAC,SAAS,cAAc;AAAA,EAC1B;AAEA,SACE,oBAAC,SAAI,OAAO,EAAE,YAAY,OAAO,GAC/B;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,aAAa;AAAA,MACzB,SAAS;AAAA,MACT;AAAA,MACA,cAAW;AAAA,MACX,eAAa,YAAY;AAAA,MACzB,SAAS,MAAM;AACb,kBAAU,SAAS,QAAQ;AAAA,MAC7B;AAAA,MAQA,gBAAgB,mBAAmB,MAAM;AAAA,MAAC;AAAA,MAC1C,gBAAgB,mBAAmB,MAAM;AAAA,MAAC;AAAA,MAC1C,eAAe,iBAAiB,CAAC;AAAA,MAChC,GAAG;AAAA,MAEJ,8BAAC,mBAAgB;AAAA;AAAA,EACnB,GACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { FilterBarDropdownMenu } from "./FilterBarDropdownMenu.js";
3
+ import { FilterMenuButton } from "./FilterMenuButton.js";
3
4
  export {
4
- FilterBarDropdownMenu
5
+ FilterBarDropdownMenu,
6
+ FilterMenuButton
5
7
  };
6
8
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/FilterBar/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterBarDropdownMenu } from './FilterBarDropdownMenu.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,6BAA6B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterBarDropdownMenu } from './FilterBarDropdownMenu.js';\nexport { FilterMenuButton } from './FilterMenuButton.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;",
6
6
  "names": []
7
7
  }