@elliemae/ds-data-table 3.17.0-next.0 → 3.17.0-next.2
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.
- package/dist/cjs/DataTableSchema.js +3 -0
- package/dist/cjs/DataTableSchema.js.map +2 -2
- package/dist/cjs/configs/useDatatableConfig.js +2 -0
- package/dist/cjs/configs/useDatatableConfig.js.map +2 -2
- package/dist/cjs/configs/useTableResizeCb.js +49 -0
- package/dist/cjs/configs/useTableResizeCb.js.map +7 -0
- package/dist/cjs/exported-related/FilterBar/index.js +8 -2
- package/dist/cjs/exported-related/FilterBar/index.js.map +2 -2
- package/dist/cjs/exported-related/Filters/index.js +20 -8
- package/dist/cjs/exported-related/Filters/index.js.map +2 -2
- package/dist/cjs/exported-related/index.js +17 -6
- package/dist/cjs/exported-related/index.js.map +2 -2
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/DataTableSchema.js +3 -0
- package/dist/esm/DataTableSchema.js.map +2 -2
- package/dist/esm/configs/useDatatableConfig.js +2 -0
- package/dist/esm/configs/useDatatableConfig.js.map +2 -2
- package/dist/esm/configs/useTableResizeCb.js +19 -0
- package/dist/esm/configs/useTableResizeCb.js.map +7 -0
- package/dist/esm/exported-related/FilterBar/index.js +4 -1
- package/dist/esm/exported-related/FilterBar/index.js.map +2 -2
- package/dist/esm/exported-related/Filters/index.js +16 -7
- package/dist/esm/exported-related/Filters/index.js.map +2 -2
- package/dist/esm/exported-related/index.js +25 -5
- package/dist/esm/exported-related/index.js.map +2 -2
- package/dist/esm/types/props.js.map +1 -1
- package/dist/types/DataTable.d.ts +1 -0
- package/dist/types/configs/useTableResizeCb.d.ts +7 -0
- package/dist/types/exported-related/FilterBar/index.d.ts +1 -1
- package/dist/types/exported-related/Filters/index.d.ts +7 -7
- package/dist/types/exported-related/index.d.ts +4 -4
- package/dist/types/types/props.d.ts +1 -0
- package/package.json +20 -20
|
@@ -189,6 +189,9 @@ const DataTableSchema = {
|
|
|
189
189
|
onCellValueChange: import_ds_props_helpers.PropTypes.func.description("Function invoked when an editable cell's content is changed"),
|
|
190
190
|
onColumnSortChange: import_ds_props_helpers.PropTypes.func.description("Function invoked when a column is sorted").deprecated({ version: "4.x", message: "Use onColumnSort" }),
|
|
191
191
|
onColumnSort: import_ds_props_helpers.PropTypes.func.description("Function invoked when a column is sorted"),
|
|
192
|
+
onTableResize: import_ds_props_helpers.PropTypes.func.description(
|
|
193
|
+
"Function invoked when the size of the internal table changes, e.g. when a the browser window is resized"
|
|
194
|
+
),
|
|
192
195
|
actionRef: import_ds_props_helpers.PropTypes.object.description("Reference where all the exposed action callbacks will be exposed")
|
|
193
196
|
};
|
|
194
197
|
//# sourceMappingURL=DataTableSchema.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DataTableSchema.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { FILTER_TYPES } from './exported-related/index.js';\nimport type { WeakValidationMap } from 'react';\n\nconst outOfTheBoxFilterType = PropTypes.oneOf(Object.values(FILTER_TYPES));\n\nconst textWrappingType = PropTypes.oneOf(['wrap', 'wrap-all', 'truncate']);\n\nconst columnPropTypes = {\n Header: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'Header name or component',\n ).isRequired,\n accessor: PropTypes.string.description('The entry of the data that this column will display'),\n id: PropTypes.string.description('The id of the column, will default to the Header or accessor if not present'),\n filter: outOfTheBoxFilterType.description('out-of-the-box filters'),\n Filter: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'The custom component to render as a filter',\n ),\n Cell: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('The custom cell renderer component'),\n editable: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'The editable out-of-the-box or component to render',\n ),\n disableDnD: PropTypes.bool.description('Whereas this column should be draggable'),\n canResize: PropTypes.bool.description('Whereas this column should be resizable'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of this column'),\n minWidth: PropTypes.number.description('Minimum width of this column, useful when resizing'),\n maxWidth: PropTypes.number.description('Maximum width of this column, useful when resizing'),\n canSort: PropTypes.bool.description('Whereas this column is sortable'),\n isSortedDesc: PropTypes.bool.description('Whereas this column is sorted descendingly'),\n required: PropTypes.bool.description('Whereas this column is required'),\n alwaysDisplayEditIcon: PropTypes.bool.description(\n 'Whereas to always show the edit icon on this column if it is editable',\n ),\n textWrap: textWrappingType.description('How to wrap the text in the column'),\n};\n\nconst columnsPropTypes = PropTypes.shape(columnPropTypes).description('Columns props');\n\nconst rowPropTypes = {\n tableRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Component for row details'),\n dimsumHeaderValue: PropTypes.string.description('Header displayed on the header variant of the row'),\n};\n\nconst rowsPropTypes = PropTypes.shape(rowPropTypes).description('Rows props');\n\nexport const DataTableSchema = {\n columns: PropTypes.arrayOf(columnsPropTypes).description('Array of columns').isRequired,\n data: PropTypes.arrayOf(rowsPropTypes).description('Array of rows'),\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Height of the datatable component'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of the datatable component'),\n renderRowActions: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]).description(\n 'The renderer to use for the action toolbar',\n ),\n isExpandable: PropTypes.bool.description('Whether the datatable is expandable').defaultValue(false),\n uniqueRowAccessor: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.func,\n ]).description(\n 'Column / Combination of columns / Function to call to produce a unique identifier for each row.' +\n ' This is necessary for the selectable and drag and drop features',\n ),\n disabledRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is disabled or not',\n ),\n expandedRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is expanded or not',\n ),\n onRowExpand: PropTypes.func.description('Function invoked when a row is (un)expanded'),\n cellRendererProps: PropTypes.object.description(\n 'Object with all the props you want the cells to have available when rendering',\n ),\n selectSingle: PropTypes.bool.description('Whether the selectable feature is single').defaultValue(false),\n selection: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is selected or not',\n ),\n onSelectionChange: PropTypes.func.description('Function invoked when a row is selected'),\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).description(\n 'String | Function to call which will display in the row headers',\n ),\n isResizeable: PropTypes.bool.description(\"Whether the datatable's columns are resizeable\"),\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.any,\n }),\n ).description('Array of filter keys and values'),\n withFilterBar: PropTypes.bool.description('Whether to display the filter bar'),\n filterBarProps: PropTypes.shape({\n filterBarAddonRenderer: PropTypes.func.description('Render filterbar right addon component'),\n customPillRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'If you specify custom filters, you will need to render their pills here',\n ),\n isDropdownMenuOpen: PropTypes.bool.description('Wether the DropdownMenu is Open or not.'),\n onDropdownMenuToggle: PropTypes.func.description('Callback to toggle the DropdownMenu.'),\n onClearAllFiltersClick: PropTypes.func.description('Callback for Clear Al Filters option.'),\n onDropdownMenuClickOutside: PropTypes.func.description('Callback triggered when clicking outside DropdownMenu.'),\n onDropdownMenuTriggerClick: PropTypes.func.description('Callback triggered when clicking DropdownMenu ellipsis.'),\n extraOptions: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n }),\n ).description('Any extra option you want in the dropdownmenu of the filter bar'),\n }).description('Props for the filter bar'),\n onFiltersChange: PropTypes.func.description('Function invoked when filters change'),\n pagination: PropTypes.oneOfType([\n PropTypes.oneOf([false]),\n PropTypes.shape({\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading'),\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.shape({\n dsId: PropTypes.string,\n value: PropTypes.number,\n label: PropTypes.string,\n type: PropTypes.oneOf(['single']),\n }),\n ]),\n )\n .description('The available options for page size')\n .defaultValue([10]),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n minPerPage: PropTypes.number.description('Step for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Step for the per page options').defaultValue(100),\n onPageSizeChange: PropTypes.func\n .description('Function invoked when the page size changes')\n .defaultValue(() => null),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n dataIsPage: PropTypes.bool.description('Whether to treat data as a page').defaultValue(false),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n }),\n ]).description('Object containing the data for the pagination'),\n Pagination: PropTypes.func.description('Custom component to show in place of the pagination'),\n colsLayoutStyle: PropTypes.oneOf(['auto', 'fixed']).description('Whether the datatable fills its container or not'),\n hiddenColumns: PropTypes.arrayOf(PropTypes.string).description('IDs of columns not to render'),\n dragAndDropRows: PropTypes.bool.description('Whether to turn on the d&d feature for the rows').defaultValue(false),\n onRowsReorder: PropTypes.func.description('Function invoked when a row is reordered'),\n maxDragAndDropLevel: PropTypes.number.description('Which level is the maximum allowed to drop into'),\n dragAndDropColumns: PropTypes.bool.description('Whether to turn on the d&d feature for the columns'),\n onColumnsReorder: PropTypes.func.description('Function invoked when a column is reordered'),\n getIsDropValid: PropTypes.func.description('Function to determine if a drop is valid'),\n textWrap: textWrappingType.description('Global wrapping rule'),\n noResultsMessage: PropTypes.string.description('Message to show when no more data is available'),\n noResultsSecondaryMessage: PropTypes.string.description('Secondary message to show when no more data is available'),\n noResultsButtonLabel: PropTypes.string.description('Label of the button when no more data is available'),\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Custom content to show when dataset is empty',\n ),\n isLoading: PropTypes.bool.description('Whether to show a global loader in the datatable'),\n onColumnResize: PropTypes.func\n .description('Function invoked when a column is resized')\n .deprecated({ version: '4.x', message: 'Use onColumnSizeChange' }),\n onColumnSizeChange: PropTypes.func.description('Function invoked when a column is resized'),\n onRowClick: PropTypes.func.description('Function invoked when clicking a row'),\n onRowFocus: PropTypes.func.description('Function invoked when focusing a row'),\n onCellValueChange: PropTypes.func.description(\"Function invoked when an editable cell's content is changed\"),\n onColumnSortChange: PropTypes.func\n .description('Function invoked when a column is sorted')\n .deprecated({ version: '4.x', message: 'Use onColumnSort' }),\n onColumnSort: PropTypes.func.description('Function invoked when a column is sorted'),\n actionRef: PropTypes.object.description('Reference where all the exposed action callbacks will be exposed'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,8BAA6B;AAG7B,MAAM,wBAAwB,kCAAU,MAAM,OAAO,OAAO,oCAAY,CAAC;AAEzE,MAAM,mBAAmB,k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AA,EAC1F,YAAY,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EAC7E,YAAY,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EAC7E,mBAAmB,kCAAU,KAAK,YAAY,6DAA6D;AAAA,EAC3G,oBAAoB,kCAAU,KAC3B,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,OAAO,SAAS,mBAAmB,CAAC;AAAA,EAC7D,cAAc,kCAAU,KAAK,YAAY,0CAA0C;AAAA,EACnF,WAAW,kCAAU,OAAO,YAAY,kEAAkE;AAC5G;",
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { FILTER_TYPES } from './exported-related/index.js';\nimport type { WeakValidationMap } from 'react';\n\nconst outOfTheBoxFilterType = PropTypes.oneOf(Object.values(FILTER_TYPES));\n\nconst textWrappingType = PropTypes.oneOf(['wrap', 'wrap-all', 'truncate']);\n\nconst columnPropTypes = {\n Header: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'Header name or component',\n ).isRequired,\n accessor: PropTypes.string.description('The entry of the data that this column will display'),\n id: PropTypes.string.description('The id of the column, will default to the Header or accessor if not present'),\n filter: outOfTheBoxFilterType.description('out-of-the-box filters'),\n Filter: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'The custom component to render as a filter',\n ),\n Cell: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('The custom cell renderer component'),\n editable: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'The editable out-of-the-box or component to render',\n ),\n disableDnD: PropTypes.bool.description('Whereas this column should be draggable'),\n canResize: PropTypes.bool.description('Whereas this column should be resizable'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of this column'),\n minWidth: PropTypes.number.description('Minimum width of this column, useful when resizing'),\n maxWidth: PropTypes.number.description('Maximum width of this column, useful when resizing'),\n canSort: PropTypes.bool.description('Whereas this column is sortable'),\n isSortedDesc: PropTypes.bool.description('Whereas this column is sorted descendingly'),\n required: PropTypes.bool.description('Whereas this column is required'),\n alwaysDisplayEditIcon: PropTypes.bool.description(\n 'Whereas to always show the edit icon on this column if it is editable',\n ),\n textWrap: textWrappingType.description('How to wrap the text in the column'),\n};\n\nconst columnsPropTypes = PropTypes.shape(columnPropTypes).description('Columns props');\n\nconst rowPropTypes = {\n tableRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Component for row details'),\n dimsumHeaderValue: PropTypes.string.description('Header displayed on the header variant of the row'),\n};\n\nconst rowsPropTypes = PropTypes.shape(rowPropTypes).description('Rows props');\n\nexport const DataTableSchema = {\n columns: PropTypes.arrayOf(columnsPropTypes).description('Array of columns').isRequired,\n data: PropTypes.arrayOf(rowsPropTypes).description('Array of rows'),\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Height of the datatable component'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of the datatable component'),\n renderRowActions: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]).description(\n 'The renderer to use for the action toolbar',\n ),\n isExpandable: PropTypes.bool.description('Whether the datatable is expandable').defaultValue(false),\n uniqueRowAccessor: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.func,\n ]).description(\n 'Column / Combination of columns / Function to call to produce a unique identifier for each row.' +\n ' This is necessary for the selectable and drag and drop features',\n ),\n disabledRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is disabled or not',\n ),\n expandedRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is expanded or not',\n ),\n onRowExpand: PropTypes.func.description('Function invoked when a row is (un)expanded'),\n cellRendererProps: PropTypes.object.description(\n 'Object with all the props you want the cells to have available when rendering',\n ),\n selectSingle: PropTypes.bool.description('Whether the selectable feature is single').defaultValue(false),\n selection: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is selected or not',\n ),\n onSelectionChange: PropTypes.func.description('Function invoked when a row is selected'),\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).description(\n 'String | Function to call which will display in the row headers',\n ),\n isResizeable: PropTypes.bool.description(\"Whether the datatable's columns are resizeable\"),\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.any,\n }),\n ).description('Array of filter keys and values'),\n withFilterBar: PropTypes.bool.description('Whether to display the filter bar'),\n filterBarProps: PropTypes.shape({\n filterBarAddonRenderer: PropTypes.func.description('Render filterbar right addon component'),\n customPillRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'If you specify custom filters, you will need to render their pills here',\n ),\n isDropdownMenuOpen: PropTypes.bool.description('Wether the DropdownMenu is Open or not.'),\n onDropdownMenuToggle: PropTypes.func.description('Callback to toggle the DropdownMenu.'),\n onClearAllFiltersClick: PropTypes.func.description('Callback for Clear Al Filters option.'),\n onDropdownMenuClickOutside: PropTypes.func.description('Callback triggered when clicking outside DropdownMenu.'),\n onDropdownMenuTriggerClick: PropTypes.func.description('Callback triggered when clicking DropdownMenu ellipsis.'),\n extraOptions: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n }),\n ).description('Any extra option you want in the dropdownmenu of the filter bar'),\n }).description('Props for the filter bar'),\n onFiltersChange: PropTypes.func.description('Function invoked when filters change'),\n pagination: PropTypes.oneOfType([\n PropTypes.oneOf([false]),\n PropTypes.shape({\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading'),\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.shape({\n dsId: PropTypes.string,\n value: PropTypes.number,\n label: PropTypes.string,\n type: PropTypes.oneOf(['single']),\n }),\n ]),\n )\n .description('The available options for page size')\n .defaultValue([10]),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n minPerPage: PropTypes.number.description('Step for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Step for the per page options').defaultValue(100),\n onPageSizeChange: PropTypes.func\n .description('Function invoked when the page size changes')\n .defaultValue(() => null),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n dataIsPage: PropTypes.bool.description('Whether to treat data as a page').defaultValue(false),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n }),\n ]).description('Object containing the data for the pagination'),\n Pagination: PropTypes.func.description('Custom component to show in place of the pagination'),\n colsLayoutStyle: PropTypes.oneOf(['auto', 'fixed']).description('Whether the datatable fills its container or not'),\n hiddenColumns: PropTypes.arrayOf(PropTypes.string).description('IDs of columns not to render'),\n dragAndDropRows: PropTypes.bool.description('Whether to turn on the d&d feature for the rows').defaultValue(false),\n onRowsReorder: PropTypes.func.description('Function invoked when a row is reordered'),\n maxDragAndDropLevel: PropTypes.number.description('Which level is the maximum allowed to drop into'),\n dragAndDropColumns: PropTypes.bool.description('Whether to turn on the d&d feature for the columns'),\n onColumnsReorder: PropTypes.func.description('Function invoked when a column is reordered'),\n getIsDropValid: PropTypes.func.description('Function to determine if a drop is valid'),\n textWrap: textWrappingType.description('Global wrapping rule'),\n noResultsMessage: PropTypes.string.description('Message to show when no more data is available'),\n noResultsSecondaryMessage: PropTypes.string.description('Secondary message to show when no more data is available'),\n noResultsButtonLabel: PropTypes.string.description('Label of the button when no more data is available'),\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Custom content to show when dataset is empty',\n ),\n isLoading: PropTypes.bool.description('Whether to show a global loader in the datatable'),\n onColumnResize: PropTypes.func\n .description('Function invoked when a column is resized')\n .deprecated({ version: '4.x', message: 'Use onColumnSizeChange' }),\n onColumnSizeChange: PropTypes.func.description('Function invoked when a column is resized'),\n onRowClick: PropTypes.func.description('Function invoked when clicking a row'),\n onRowFocus: PropTypes.func.description('Function invoked when focusing a row'),\n onCellValueChange: PropTypes.func.description(\"Function invoked when an editable cell's content is changed\"),\n onColumnSortChange: PropTypes.func\n .description('Function invoked when a column is sorted')\n .deprecated({ version: '4.x', message: 'Use onColumnSort' }),\n onColumnSort: PropTypes.func.description('Function invoked when a column is sorted'),\n onTableResize: PropTypes.func.description(\n 'Function invoked when the size of the internal table changes, e.g. when a the browser window is resized',\n ),\n actionRef: PropTypes.object.description('Reference where all the exposed action callbacks will be exposed'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,8BAA6B;AAG7B,MAAM,wBAAwB,kCAAU,MAAM,OAAO,OAAO,oCAAY,CAAC;AAEzE,MAAM,mBAAmB,kCAAU,MAAM,CAAC,QAAQ,YAAY,UAAU,CAAC;AAEzE,MAAM,kBAAkB;AAAA,EACtB,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,kCAAU,OAAO,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EA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,0CAA0C,EACtD,WAAW,EAAE,SAAS,OAAO,SAAS,mBAAmB,CAAC;AAAA,EAC7D,cAAc,kCAAU,KAAK,YAAY,0CAA0C;AAAA,EACnF,eAAe,kCAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,WAAW,kCAAU,OAAO,YAAY,kEAAkE;AAC5G;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,6 +40,7 @@ var import_usePaginationConfig = require("./usePaginationConfig.js");
|
|
|
40
40
|
var import_useTableColsWithAddons = require("./useTableColsWithAddons.js");
|
|
41
41
|
var import_constants = require("./constants.js");
|
|
42
42
|
var import_useInternalStateConfig = require("./useInternalStateConfig.js");
|
|
43
|
+
var import_useTableResizeCb = require("./useTableResizeCb.js");
|
|
43
44
|
const estimateSize = () => 36;
|
|
44
45
|
const useDatatableConfig = (props) => {
|
|
45
46
|
const virtualListRef = (0, import_react.useRef)(null);
|
|
@@ -93,6 +94,7 @@ const useDatatableConfig = (props) => {
|
|
|
93
94
|
[gridLayout, totalColumnsWidth]
|
|
94
95
|
);
|
|
95
96
|
const internalState = (0, import_useInternalStateConfig.useInternalStateConfig)();
|
|
97
|
+
(0, import_useTableResizeCb.useTableResizeCb)({ virtualListRef, internalProps: props });
|
|
96
98
|
const ctx = (0, import_react.useMemo)(
|
|
97
99
|
() => ({
|
|
98
100
|
tableProps: props,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/configs/useDatatableConfig.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-statements */\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-statements */\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { columnsToGrid } from '../helpers/columnsToGrid.js';\nimport type { TypescriptColumn, TypescriptContext, TypescriptProps } from '../types/props.js';\nimport { useRowFlattenization } from './useRowFlattenization.js';\nimport { usePaginationConfig } from './usePaginationConfig.js';\nimport { useTableColsWithAddons } from './useTableColsWithAddons.js';\nimport { ColsLayoutStyle } from './constants.js';\nimport { useInternalStateConfig } from './useInternalStateConfig.js';\nimport { useTableResizeCb } from './useTableResizeCb.js';\n\nconst estimateSize = () => 36;\n\nexport const useDatatableConfig = (props: TypescriptProps): TypescriptContext => {\n const virtualListRef = useRef<HTMLDivElement>(null);\n const columnHeaderRef = useRef<HTMLDivElement>(null);\n const [isShiftPressed, setIsShiftPressed] = useState(false);\n const lastSelected = useRef<number>(-1);\n\n // ===========================================================================\n // Column config\n // ===========================================================================\n const tableColsWithAddons = useTableColsWithAddons(props);\n const visibleColumns = useMemo(\n () =>\n tableColsWithAddons\n .filter((col: TypescriptColumn) => !props.hiddenColumns?.includes(col.accessor))\n .map((col: TypescriptColumn) => {\n if (col.columns) {\n col.columns = col.columns.filter(\n (subCol: TypescriptColumn) => !props.hiddenColumns?.includes(subCol.accessor),\n );\n }\n return col;\n }),\n [props.hiddenColumns, tableColsWithAddons],\n );\n\n // ===========================================================================\n // Virtualization\n // ===========================================================================\n\n const [dataLength, setDataLength] = useState(1);\n\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n const virtualListHelpers = useVirtual({\n size: dataLength,\n parentRef: virtualListRef,\n overscan: 15,\n paddingStart: columnHeaderRef.current?.getBoundingClientRect()?.height ?? 24,\n estimateSize,\n });\n\n // ===========================================================================\n // Action ref setup\n // ===========================================================================\n useEffect(() => {\n if (props.actionRef) {\n props.actionRef.current.scrollToIndex = virtualListHelpers.scrollToIndex;\n props.actionRef.current.scrollToOffset = virtualListHelpers.scrollToOffset;\n }\n }, [props.actionRef, virtualListHelpers.scrollToIndex, virtualListHelpers.scrollToOffset]);\n\n // ===========================================================================\n // Data flattenization and pagination\n // ===========================================================================\n\n const [flattenedData, allDataFlattened] = useRowFlattenization(props);\n\n const [paginatedData, paginationHelpers] = usePaginationConfig(props, flattenedData);\n\n // Redo virtualization until we match the lengths\n if (dataLength !== (paginatedData || flattenedData).length) setDataLength((paginatedData || flattenedData).length);\n\n // ===========================================================================\n // Layout config\n // ===========================================================================\n\n const [gridLayout, setGridLayout] = useState(columnsToGrid(visibleColumns, props.colsLayoutStyle));\n\n // We need to listen and update the state based on this props\n useEffect(() => {\n setGridLayout(columnsToGrid(visibleColumns, props.colsLayoutStyle));\n }, [visibleColumns, props.colsLayoutStyle]);\n\n const totalColumnsWidth = useMemo(\n () =>\n props.colsLayoutStyle === ColsLayoutStyle.Fixed\n ? gridLayout.reduce((acc: number, cur: string) => acc + Number.parseInt(cur, 10), 0)\n : '100%',\n [props.colsLayoutStyle, gridLayout],\n );\n\n const layoutHelpers = useMemo(\n () => ({\n gridLayout,\n setGridLayout,\n totalColumnsWidth,\n }),\n [gridLayout, totalColumnsWidth],\n );\n\n // ===========================================================================\n // Internal state config\n // ===========================================================================\n\n const internalState = useInternalStateConfig();\n useTableResizeCb({ virtualListRef, internalProps: props });\n\n const ctx = useMemo(\n () => ({\n tableProps: props,\n layoutHelpers,\n paginationHelpers,\n visibleColumns,\n virtualListHelpers,\n flattenedData: paginatedData || flattenedData,\n allDataFlattened,\n virtualListRef,\n columnHeaderRef,\n ...internalState,\n isShiftPressed,\n setIsShiftPressed,\n lastSelected,\n }),\n [\n props,\n layoutHelpers,\n paginationHelpers,\n visibleColumns,\n virtualListHelpers,\n paginatedData,\n flattenedData,\n allDataFlattened,\n virtualListRef,\n columnHeaderRef,\n internalState,\n isShiftPressed,\n setIsShiftPressed,\n lastSelected,\n ],\n );\n\n return ctx;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,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Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useTableResizeCb_exports = {};
|
|
30
|
+
__export(useTableResizeCb_exports, {
|
|
31
|
+
useTableResizeCb: () => useTableResizeCb
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useTableResizeCb_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
+
const useTableResizeCb = (config) => {
|
|
38
|
+
const { virtualListRef, internalProps } = config;
|
|
39
|
+
const { onTableResize } = internalProps;
|
|
40
|
+
const handleResize = import_react.default.useCallback(
|
|
41
|
+
(entry) => {
|
|
42
|
+
if (onTableResize)
|
|
43
|
+
onTableResize(entry);
|
|
44
|
+
},
|
|
45
|
+
[onTableResize]
|
|
46
|
+
);
|
|
47
|
+
(0, import_ds_utilities.useNativeResizeObserver)(virtualListRef.current, handleResize);
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=useTableResizeCb.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/configs/useTableResizeCb.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { useNativeResizeObserver } from '@elliemae/ds-utilities';\nimport type { InternalTypescriptProps } from '../types/props.js';\n\n// type for the second parameter of useNativeResizeObserver\ntype NativeResizeObserverCB = Parameters<typeof useNativeResizeObserver>[1];\n\n// type declaration for the custom hook\nexport type UseTableResizeCb = (config: {\n virtualListRef: React.RefObject<HTMLElement>;\n internalProps: InternalTypescriptProps;\n}) => void;\n\nexport const useTableResizeCb: UseTableResizeCb = (config) => {\n const { virtualListRef, internalProps } = config;\n const { onTableResize } = internalProps;\n\n const handleResize: NativeResizeObserverCB = React.useCallback(\n (entry) => {\n if (onTableResize) onTableResize(entry);\n },\n [onTableResize],\n );\n\n useNativeResizeObserver(virtualListRef.current, handleResize);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAAwC;AAYjC,MAAM,mBAAqC,CAAC,WAAW;AAC5D,QAAM,EAAE,gBAAgB,cAAc,IAAI;AAC1C,QAAM,EAAE,cAAc,IAAI;AAE1B,QAAM,eAAuC,aAAAA,QAAM;AAAA,IACjD,CAAC,UAAU;AACT,UAAI;AAAe,sBAAc,KAAK;AAAA,IACxC;AAAA,IACA,CAAC,aAAa;AAAA,EAChB;AAEA,mDAAwB,eAAe,SAAS,YAAY;AAC9D;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
8
12
|
var __copyProps = (to, from, except, desc) => {
|
|
9
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
}
|
|
14
18
|
return to;
|
|
15
19
|
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -24,7 +27,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
27
|
));
|
|
25
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
29
|
var FilterBar_exports = {};
|
|
30
|
+
__export(FilterBar_exports, {
|
|
31
|
+
FilterBarDropdownMenu: () => import_FilterBarDropdownMenu.FilterBarDropdownMenu
|
|
32
|
+
});
|
|
27
33
|
module.exports = __toCommonJS(FilterBar_exports);
|
|
28
34
|
var React = __toESM(require("react"));
|
|
29
|
-
|
|
35
|
+
var import_FilterBarDropdownMenu = require("./FilterBarDropdownMenu.js");
|
|
30
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/exported-related/FilterBar/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export { FilterBarDropdownMenu } from './FilterBarDropdownMenu.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAsC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
8
12
|
var __copyProps = (to, from, except, desc) => {
|
|
9
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
}
|
|
14
18
|
return to;
|
|
15
19
|
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -24,13 +27,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
27
|
));
|
|
25
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
29
|
var Filters_exports = {};
|
|
30
|
+
__export(Filters_exports, {
|
|
31
|
+
applyOutOfTheBoxFilters: () => import_applyOutOfTheBoxFilters.applyOutOfTheBoxFilters,
|
|
32
|
+
currencyRangeFilterFn: () => import_currencyRangeFilterFn.currencyRangeFilterFn,
|
|
33
|
+
dateRangeFilterFn: () => import_dateRangeFilterFn.dateRangeFilterFn,
|
|
34
|
+
multiSelectFilterFn: () => import_multiSelectFilterFn.multiSelectFilterFn,
|
|
35
|
+
numberRangeFilterFn: () => import_numberRangeFilterFn.numberRangeFilterFn,
|
|
36
|
+
singleDateFilterFn: () => import_singleDateFilterFn.singleDateFilterFn,
|
|
37
|
+
singleSelectFilterFn: () => import_singleSelectFilterFn.singleSelectFilterFn
|
|
38
|
+
});
|
|
27
39
|
module.exports = __toCommonJS(Filters_exports);
|
|
28
40
|
var React = __toESM(require("react"));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
var import_applyOutOfTheBoxFilters = require("./applyOutOfTheBoxFilters.js");
|
|
42
|
+
var import_singleDateFilterFn = require("./singleDateFilterFn.js");
|
|
43
|
+
var import_singleSelectFilterFn = require("./singleSelectFilterFn.js");
|
|
44
|
+
var import_multiSelectFilterFn = require("./multiSelectFilterFn.js");
|
|
45
|
+
var import_numberRangeFilterFn = require("./numberRangeFilterFn.js");
|
|
46
|
+
var import_currencyRangeFilterFn = require("./currencyRangeFilterFn.js");
|
|
47
|
+
var import_dateRangeFilterFn = require("./dateRangeFilterFn.js");
|
|
36
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/exported-related/Filters/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export { applyOutOfTheBoxFilters } from './applyOutOfTheBoxFilters.js';\nexport { singleDateFilterFn } from './singleDateFilterFn.js';\nexport { singleSelectFilterFn } from './singleSelectFilterFn.js';\nexport { multiSelectFilterFn } from './multiSelectFilterFn.js';\nexport { numberRangeFilterFn } from './numberRangeFilterFn.js';\nexport { currencyRangeFilterFn } from './currencyRangeFilterFn.js';\nexport { dateRangeFilterFn } from './dateRangeFilterFn.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAwC;AACxC,gCAAmC;AACnC,kCAAqC;AACrC,iCAAoC;AACpC,iCAAoC;AACpC,mCAAsC;AACtC,+BAAkC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -30,9 +29,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
29
|
var exported_related_exports = {};
|
|
31
30
|
__export(exported_related_exports, {
|
|
32
31
|
EditableCell: () => import_EditableCell.EditableCell,
|
|
32
|
+
FILTER_TYPES: () => import_FilterTypes.FILTER_TYPES,
|
|
33
|
+
FilterBarDropdownMenu: () => import_FilterBar.FilterBarDropdownMenu,
|
|
33
34
|
FilterPopover: () => import_FilterPopover.FilterPopover,
|
|
35
|
+
ROW_VARIANTS: () => import_RowVariants.ROW_VARIANTS,
|
|
36
|
+
ROW_VARIANT_COMPACT_KEY: () => import_RowVariants.ROW_VARIANT_COMPACT_KEY,
|
|
37
|
+
ROW_VARIANT_KEY: () => import_RowVariants.ROW_VARIANT_KEY,
|
|
34
38
|
Toolbar: () => import_Toolbar.Toolbar,
|
|
35
|
-
|
|
39
|
+
applyOutOfTheBoxFilters: () => import_Filters.applyOutOfTheBoxFilters,
|
|
40
|
+
currencyRangeFilterFn: () => import_Filters.currencyRangeFilterFn,
|
|
41
|
+
dateRangeFilterFn: () => import_Filters.dateRangeFilterFn,
|
|
42
|
+
groupBy: () => import_groupBy.groupBy,
|
|
43
|
+
multiSelectFilterFn: () => import_Filters.multiSelectFilterFn,
|
|
44
|
+
numberRangeFilterFn: () => import_Filters.numberRangeFilterFn,
|
|
45
|
+
singleDateFilterFn: () => import_Filters.singleDateFilterFn,
|
|
46
|
+
singleSelectFilterFn: () => import_Filters.singleSelectFilterFn
|
|
36
47
|
});
|
|
37
48
|
module.exports = __toCommonJS(exported_related_exports);
|
|
38
49
|
var React = __toESM(require("react"));
|
|
@@ -40,8 +51,8 @@ var import_FilterPopover = require("./FilterPopover/index.js");
|
|
|
40
51
|
var import_EditableCell = require("./EditableCell.js");
|
|
41
52
|
var import_Toolbar = require("./Toolbar/index.js");
|
|
42
53
|
var import_groupBy = require("./groupBy.js");
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
var import_FilterTypes = require("./FilterTypes.js");
|
|
55
|
+
var import_RowVariants = require("./RowVariants.js");
|
|
56
|
+
var import_Filters = require("./Filters/index.js");
|
|
57
|
+
var import_FilterBar = require("./FilterBar/index.js");
|
|
47
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/exported-related/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { FilterPopover } from './FilterPopover/index.js';\nexport { EditableCell } from './EditableCell.js';\nexport { Toolbar } from './Toolbar/index.js';\nexport { groupBy } from './groupBy.js';\nexport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export { FilterPopover } from './FilterPopover/index.js';\nexport { EditableCell } from './EditableCell.js';\nexport { Toolbar } from './Toolbar/index.js';\nexport { groupBy } from './groupBy.js';\nexport { FILTER_TYPES } from './FilterTypes.js';\nexport { ROW_VARIANTS, ROW_VARIANT_KEY, ROW_VARIANT_COMPACT_KEY } from './RowVariants.js';\nexport {\n applyOutOfTheBoxFilters,\n singleDateFilterFn,\n singleSelectFilterFn,\n multiSelectFilterFn,\n numberRangeFilterFn,\n currencyRangeFilterFn,\n dateRangeFilterFn,\n} from './Filters/index.js';\nexport { FilterBarDropdownMenu } from './FilterBar/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;AAC9B,0BAA6B;AAC7B,qBAAwB;AACxB,qBAAwB;AACxB,yBAA6B;AAC7B,yBAAuE;AACvE,qBAQO;AACP,uBAAsC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { MutableRefObject } from 'react';\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual/types';\nimport type { useSortable } from '@elliemae/ds-drag-and-drop';\nimport type { CSSProperties } from 'styled-components';\nimport type { ColsLayoutStyle } from '../configs/constants.js';\n\nexport type TypescriptGenericFunc = (...args: unknown[]) => unknown;\ninterface FilterOptionT {\n dsId: string;\n type: string;\n value: string;\n label: string;\n}\n\ninterface HeaderComponentProps {\n ctx: TypescriptContext;\n}\n\nexport type DraggablePropsT =\n | false\n | (ReturnType<typeof useSortable> & {\n dropIndicatorPosition: DropIndicatorPosition;\n shouldShowDropIndicatorPosition: boolean;\n isDropValid: boolean;\n });\n\ninterface CellComponentProps<T = HTMLElement> {\n ctx: TypescriptContext;\n isRowSelected: boolean;\n row: InternalTypescriptRow;\n cell: TypescriptCell<T>;\n draggableProps: DraggablePropsT;\n isDragOverlay: boolean;\n}\n\nexport enum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n Inside = 3,\n}\n\nexport interface TypescriptColumn<T extends HTMLElement = HTMLElement> {\n id?: string;\n Header: string | React.ComponentType<HeaderComponentProps>;\n accessor?: string;\n filter?: string;\n filterOptions?: FilterOptionT[] | (() => FilterOptionT[]);\n filterMinWidth?: number | string;\n Filter?: React.ComponentType<FilterProps>;\n Cell?: React.ComponentType<CellComponentProps<T>>;\n editable?: string | TypescriptGenericFunc;\n disableDnD?: boolean;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n padding?: number;\n columns?: TypescriptColumn[];\n canSort?: boolean;\n isSortedDesc?: boolean;\n canResize?: boolean;\n isFocuseable?: boolean;\n textWrap?: 'wrap' | 'wrap-all' | 'truncate';\n ref?: React.MutableRefObject<HTMLTableColElement>;\n required?: boolean;\n cellStyle?: CSSProperties;\n alwaysDisplayEditIcon?: boolean;\n}\n\nexport interface InternalTypescriptColumn<T extends HTMLElement = HTMLElement> extends TypescriptColumn<T> {\n id: string;\n parentId: string | null;\n depth: number;\n columns?: InternalTypescriptColumn[];\n}\n\nexport interface TypescriptCell<T = HTMLElement> {\n column: TypescriptColumn;\n value: any;\n render: React.ComponentType<CellComponentProps>;\n row: InternalTypescriptRow;\n ref: React.RefObject<T>;\n id: string;\n}\n\nexport interface TypescriptRow {\n [key: string]: any;\n subRows?: TypescriptRow[];\n tableRowDetails?: React.ComponentType<any>;\n dimsumHeaderValue?: string;\n}\n\nexport interface InternalTypescriptRow {\n id: string;\n uid: string;\n index: number;\n realIndex: number;\n parent: InternalTypescriptRow | null;\n parentId: string | null;\n parentIndex: number | null;\n depth: number;\n isExpanded: boolean;\n subRows: TypescriptRow[];\n childrenCount: number;\n original: TypescriptRow;\n cells: TypescriptCell[];\n}\n\nexport type RowVariant = 'ds-header-group-row' | 'ds-primary-row' | 'ds-secondary-row';\n\nexport type TypescriptRenderRowActionsConfig = {\n columnWidth: number;\n renderer: (...args: any[]) => JSX.Element;\n};\n\nexport type TypescriptRenderRowActions = false | TypescriptRenderRowActionsConfig;\n\nexport type TypescriptAppliedFilter = {\n id: string;\n type: string;\n value: any;\n};\n\nexport type TypescriptPagination = {\n hasPagination: boolean;\n page?: any[];\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n dataIsPage?: boolean;\n showPerPageSelector?: boolean;\n perPageOptions?: number[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageCount?: number | string;\n isLoadingPageCount?: boolean;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n};\n\nexport type TypescriptSortBy = {\n id: string;\n desc: boolean;\n};\n\nexport type TypescriptSelectionItem = boolean | 'mixed';\n\nexport type TypescriptSelection = Record<string | number, TypescriptSelectionItem>;\n\nexport type UniqueRowAccessorType = string | string[] | ((row: TypescriptRow) => string) | undefined;\n\nexport interface ReduxHeader {\n hideFilterMenu?: boolean;\n hideFilterButton?: boolean;\n showDnDHandle?: boolean;\n withTabStops?: boolean;\n}\n\nexport interface DataTableFilter {\n id: string;\n type: string;\n value: any;\n}\n\ninterface PropsWithDefault {\n height: string;\n width: string;\n renderRowActions: boolean;\n getRowVariant: (\n row: TypescriptRow,\n defaultCellRenderer: React.ComponentType<any>,\n ) => RowVariant | React.ComponentType<any>;\n withFilterBar: boolean;\n isExpandable: boolean;\n expandedRows: Record<string, boolean>;\n disabledRows: Record<string, boolean>;\n isResizeable: boolean;\n isLoading: boolean;\n pagination: false | TypescriptPagination;\n filters: DataTableFilter[];\n colsLayoutStyle: ColsLayoutStyle;\n hiddenColumns: string[];\n noResultsMessage: string;\n dragAndDropRows: boolean;\n maxDragAndDropLevel: number;\n onRowsReorder: (\n newData: TypescriptRow[],\n indexes: { targetIndex: number; fromIndex: number },\n considerExpanding: string | null,\n extraData: { flattenedData: InternalTypescriptRow[]; allDataFlattened: InternalTypescriptRow[] },\n ) => void;\n dragAndDropColumns: boolean;\n onColumnsReorder: (newData: TypescriptColumn[], indexes: { targetIndex: number; fromIndex: number }) => void;\n getIsDropValid: (\n active: InternalTypescriptRow,\n over: InternalTypescriptRow,\n dropIndicatorPosition: DropIndicatorPosition,\n ) => boolean;\n onColumnResize: (headerId: string, width: number) => void;\n onColumnSizeChange: (newColumns: TypescriptColumn[], headerId: string, width: number) => void;\n onRowClick: TypescriptGenericFunc;\n onRowFocus: TypescriptGenericFunc;\n noSelectionColumn: boolean;\n selectSingle: boolean;\n onSelectionChange: (\n newSelection: TypescriptSelection,\n selectedControl: string,\n event: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent,\n ) => void;\n textWrap: 'wrap' | 'wrap-all' | 'truncate';\n onCellValueChange: (cellChange: { value: any; property: any; rowIndex: number }) => void;\n onFiltersChange: TypescriptGenericFunc;\n onPageChanged: TypescriptGenericFunc;\n onRowExpand: (expandedRows: Record<string, boolean>, toggledRow: string) => void;\n onColumnSortChange: (newSortRequest: { column: any; direction: any }) => void;\n onColumnSort: (newColumns: TypescriptColumn[], headerId: string, direction: 'ASC' | 'DESC') => void;\n}\n\ninterface PropsRequired {\n columns: TypescriptColumn[];\n data: TypescriptRow[];\n}\n\ninterface PropsOptional {\n uniqueRowAccessor?: UniqueRowAccessorType;\n cellRendererProps?: Record<string, any>;\n selection?: TypescriptSelection;\n groupedRowsRenderHeader?: TypescriptGenericFunc | string;\n filterBarProps?: {\n filterBarAddonRenderer?: React.ComponentType<any>;\n customPillRenderer?: React.ComponentType<any>;\n extraOptions?: { type: string; id: string; label: string; onClick?: TypescriptGenericFunc }[];\n };\n actionRef?: React.RefObject<any>;\n noResultsSecondaryMessage?: string;\n noResultsButtonLabel?: string;\n noResultsPlaceholder?: TypescriptGenericFunc;\n onNoResultsButtonClick?: TypescriptGenericFunc;\n Pagination?: React.ComponentType<Record<string, never>>;\n}\n\nexport interface TypescriptProps extends Partial<PropsWithDefault>, PropsRequired, PropsOptional {}\nexport interface InternalTypescriptProps extends PropsWithDefault, PropsRequired, PropsOptional {}\n\nexport interface FilterProps {\n column: TypescriptColumn;\n ctx: TypescriptContext;\n onFiltersChange?: (filters: DataTableFilter[]) => void;\n onValueChange: (type: string, value: any) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, newState: any) => void;\n patchHeader: (headerId: string, newHeader: any) => void;\n filterValue?: any;\n reduxHeader?: any;\n innerRef: MutableRefObject<HTMLDivElement | null>;\n}\n\nexport type TypescriptContext = {\n tableProps: InternalTypescriptProps;\n columnHeaderRef: React.RefObject<HTMLDivElement>;\n virtualListRef: React.RefObject<HTMLDivElement>;\n flattenedData: InternalTypescriptRow[];\n allDataFlattened: InternalTypescriptRow[];\n visibleColumns: InternalTypescriptColumn[];\n virtualListHelpers: ReturnType<typeof useVirtual>;\n layoutHelpers: {\n totalColumnsWidth: number | string;\n gridLayout: string[];\n setGridLayout: React.Dispatch<React.SetStateAction<string[]>>;\n };\n paginationHelpers: TypescriptPagination;\n drilldownRowId: string | null;\n setDrilldownRowId: React.Dispatch<React.SetStateAction<string | null>>;\n focusedRowId: string | null;\n setFocusedRowId: React.Dispatch<React.SetStateAction<string | null>>;\n reduxHeaders: Record<string, ReduxHeader>;\n patchHeader: (headerId: string, newHeader: ReduxHeader) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, value: boolean) => void;\n isShiftPressed: boolean;\n setIsShiftPressed: React.Dispatch<React.SetStateAction<boolean>>;\n lastSelected: React.MutableRefObject<number>;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { MutableRefObject } from 'react';\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual/types';\nimport type { useSortable } from '@elliemae/ds-drag-and-drop';\nimport type { CSSProperties } from 'styled-components';\nimport type { ColsLayoutStyle } from '../configs/constants.js';\n\nexport type TypescriptGenericFunc = (...args: unknown[]) => unknown;\ninterface FilterOptionT {\n dsId: string;\n type: string;\n value: string;\n label: string;\n}\n\ninterface HeaderComponentProps {\n ctx: TypescriptContext;\n}\n\nexport type DraggablePropsT =\n | false\n | (ReturnType<typeof useSortable> & {\n dropIndicatorPosition: DropIndicatorPosition;\n shouldShowDropIndicatorPosition: boolean;\n isDropValid: boolean;\n });\n\ninterface CellComponentProps<T = HTMLElement> {\n ctx: TypescriptContext;\n isRowSelected: boolean;\n row: InternalTypescriptRow;\n cell: TypescriptCell<T>;\n draggableProps: DraggablePropsT;\n isDragOverlay: boolean;\n}\n\nexport enum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n Inside = 3,\n}\n\nexport interface TypescriptColumn<T extends HTMLElement = HTMLElement> {\n id?: string;\n Header: string | React.ComponentType<HeaderComponentProps>;\n accessor?: string;\n filter?: string;\n filterOptions?: FilterOptionT[] | (() => FilterOptionT[]);\n filterMinWidth?: number | string;\n Filter?: React.ComponentType<FilterProps>;\n Cell?: React.ComponentType<CellComponentProps<T>>;\n editable?: string | TypescriptGenericFunc;\n disableDnD?: boolean;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n padding?: number;\n columns?: TypescriptColumn[];\n canSort?: boolean;\n isSortedDesc?: boolean;\n canResize?: boolean;\n isFocuseable?: boolean;\n textWrap?: 'wrap' | 'wrap-all' | 'truncate';\n ref?: React.MutableRefObject<HTMLTableColElement>;\n required?: boolean;\n cellStyle?: CSSProperties;\n alwaysDisplayEditIcon?: boolean;\n}\n\nexport interface InternalTypescriptColumn<T extends HTMLElement = HTMLElement> extends TypescriptColumn<T> {\n id: string;\n parentId: string | null;\n depth: number;\n columns?: InternalTypescriptColumn[];\n}\n\nexport interface TypescriptCell<T = HTMLElement> {\n column: TypescriptColumn;\n value: any;\n render: React.ComponentType<CellComponentProps>;\n row: InternalTypescriptRow;\n ref: React.RefObject<T>;\n id: string;\n}\n\nexport interface TypescriptRow {\n [key: string]: any;\n subRows?: TypescriptRow[];\n tableRowDetails?: React.ComponentType<any>;\n dimsumHeaderValue?: string;\n}\n\nexport interface InternalTypescriptRow {\n id: string;\n uid: string;\n index: number;\n realIndex: number;\n parent: InternalTypescriptRow | null;\n parentId: string | null;\n parentIndex: number | null;\n depth: number;\n isExpanded: boolean;\n subRows: TypescriptRow[];\n childrenCount: number;\n original: TypescriptRow;\n cells: TypescriptCell[];\n}\n\nexport type RowVariant = 'ds-header-group-row' | 'ds-primary-row' | 'ds-secondary-row';\n\nexport type TypescriptRenderRowActionsConfig = {\n columnWidth: number;\n renderer: (...args: any[]) => JSX.Element;\n};\n\nexport type TypescriptRenderRowActions = false | TypescriptRenderRowActionsConfig;\n\nexport type TypescriptAppliedFilter = {\n id: string;\n type: string;\n value: any;\n};\n\nexport type TypescriptPagination = {\n hasPagination: boolean;\n page?: any[];\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n dataIsPage?: boolean;\n showPerPageSelector?: boolean;\n perPageOptions?: number[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageCount?: number | string;\n isLoadingPageCount?: boolean;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n};\n\nexport type TypescriptSortBy = {\n id: string;\n desc: boolean;\n};\n\nexport type TypescriptSelectionItem = boolean | 'mixed';\n\nexport type TypescriptSelection = Record<string | number, TypescriptSelectionItem>;\n\nexport type UniqueRowAccessorType = string | string[] | ((row: TypescriptRow) => string) | undefined;\n\nexport interface ReduxHeader {\n hideFilterMenu?: boolean;\n hideFilterButton?: boolean;\n showDnDHandle?: boolean;\n withTabStops?: boolean;\n}\n\nexport interface DataTableFilter {\n id: string;\n type: string;\n value: any;\n}\n\ninterface PropsWithDefault {\n height: string;\n width: string;\n renderRowActions: boolean;\n getRowVariant: (\n row: TypescriptRow,\n defaultCellRenderer: React.ComponentType<any>,\n ) => RowVariant | React.ComponentType<any>;\n withFilterBar: boolean;\n isExpandable: boolean;\n expandedRows: Record<string, boolean>;\n disabledRows: Record<string, boolean>;\n isResizeable: boolean;\n isLoading: boolean;\n pagination: false | TypescriptPagination;\n filters: DataTableFilter[];\n colsLayoutStyle: ColsLayoutStyle;\n hiddenColumns: string[];\n noResultsMessage: string;\n dragAndDropRows: boolean;\n maxDragAndDropLevel: number;\n onRowsReorder: (\n newData: TypescriptRow[],\n indexes: { targetIndex: number; fromIndex: number },\n considerExpanding: string | null,\n extraData: { flattenedData: InternalTypescriptRow[]; allDataFlattened: InternalTypescriptRow[] },\n ) => void;\n dragAndDropColumns: boolean;\n onColumnsReorder: (newData: TypescriptColumn[], indexes: { targetIndex: number; fromIndex: number }) => void;\n getIsDropValid: (\n active: InternalTypescriptRow,\n over: InternalTypescriptRow,\n dropIndicatorPosition: DropIndicatorPosition,\n ) => boolean;\n onColumnResize: (headerId: string, width: number) => void;\n onColumnSizeChange: (newColumns: TypescriptColumn[], headerId: string, width: number) => void;\n onRowClick: TypescriptGenericFunc;\n onRowFocus: TypescriptGenericFunc;\n noSelectionColumn: boolean;\n selectSingle: boolean;\n onSelectionChange: (\n newSelection: TypescriptSelection,\n selectedControl: string,\n event: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent,\n ) => void;\n textWrap: 'wrap' | 'wrap-all' | 'truncate';\n onCellValueChange: (cellChange: { value: any; property: any; rowIndex: number }) => void;\n onFiltersChange: TypescriptGenericFunc;\n onPageChanged: TypescriptGenericFunc;\n onRowExpand: (expandedRows: Record<string, boolean>, toggledRow: string) => void;\n onColumnSortChange: (newSortRequest: { column: any; direction: any }) => void;\n onColumnSort: (newColumns: TypescriptColumn[], headerId: string, direction: 'ASC' | 'DESC') => void;\n}\n\ninterface PropsRequired {\n columns: TypescriptColumn[];\n data: TypescriptRow[];\n}\n\ninterface PropsOptional {\n uniqueRowAccessor?: UniqueRowAccessorType;\n cellRendererProps?: Record<string, any>;\n selection?: TypescriptSelection;\n groupedRowsRenderHeader?: TypescriptGenericFunc | string;\n filterBarProps?: {\n filterBarAddonRenderer?: React.ComponentType<any>;\n customPillRenderer?: React.ComponentType<any>;\n extraOptions?: { type: string; id: string; label: string; onClick?: TypescriptGenericFunc }[];\n };\n actionRef?: React.RefObject<any>;\n noResultsSecondaryMessage?: string;\n noResultsButtonLabel?: string;\n noResultsPlaceholder?: TypescriptGenericFunc;\n onNoResultsButtonClick?: TypescriptGenericFunc;\n onTableResize?: TypescriptGenericFunc;\n Pagination?: React.ComponentType<Record<string, never>>;\n}\n\nexport interface TypescriptProps extends Partial<PropsWithDefault>, PropsRequired, PropsOptional {}\nexport interface InternalTypescriptProps extends PropsWithDefault, PropsRequired, PropsOptional {}\n\nexport interface FilterProps {\n column: TypescriptColumn;\n ctx: TypescriptContext;\n onFiltersChange?: (filters: DataTableFilter[]) => void;\n onValueChange: (type: string, value: any) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, newState: any) => void;\n patchHeader: (headerId: string, newHeader: any) => void;\n filterValue?: any;\n reduxHeader?: any;\n innerRef: MutableRefObject<HTMLDivElement | null>;\n}\n\nexport type TypescriptContext = {\n tableProps: InternalTypescriptProps;\n columnHeaderRef: React.RefObject<HTMLDivElement>;\n virtualListRef: React.RefObject<HTMLDivElement>;\n flattenedData: InternalTypescriptRow[];\n allDataFlattened: InternalTypescriptRow[];\n visibleColumns: InternalTypescriptColumn[];\n virtualListHelpers: ReturnType<typeof useVirtual>;\n layoutHelpers: {\n totalColumnsWidth: number | string;\n gridLayout: string[];\n setGridLayout: React.Dispatch<React.SetStateAction<string[]>>;\n };\n paginationHelpers: TypescriptPagination;\n drilldownRowId: string | null;\n setDrilldownRowId: React.Dispatch<React.SetStateAction<string | null>>;\n focusedRowId: string | null;\n setFocusedRowId: React.Dispatch<React.SetStateAction<string | null>>;\n reduxHeaders: Record<string, ReduxHeader>;\n patchHeader: (headerId: string, newHeader: ReduxHeader) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, value: boolean) => void;\n isShiftPressed: boolean;\n setIsShiftPressed: React.Dispatch<React.SetStateAction<boolean>>;\n lastSelected: React.MutableRefObject<number>;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqChB,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,8CAAA,UAAO,KAAP;AACA,EAAAA,8CAAA,YAAS,KAAT;AACA,EAAAA,8CAAA,WAAQ,KAAR;AACA,EAAAA,8CAAA,YAAS,KAAT;AAJU,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["DropIndicatorPosition"]
|
|
7
7
|
}
|
|
@@ -156,6 +156,9 @@ const DataTableSchema = {
|
|
|
156
156
|
onCellValueChange: PropTypes.func.description("Function invoked when an editable cell's content is changed"),
|
|
157
157
|
onColumnSortChange: PropTypes.func.description("Function invoked when a column is sorted").deprecated({ version: "4.x", message: "Use onColumnSort" }),
|
|
158
158
|
onColumnSort: PropTypes.func.description("Function invoked when a column is sorted"),
|
|
159
|
+
onTableResize: PropTypes.func.description(
|
|
160
|
+
"Function invoked when the size of the internal table changes, e.g. when a the browser window is resized"
|
|
161
|
+
),
|
|
159
162
|
actionRef: PropTypes.object.description("Reference where all the exposed action callbacks will be exposed")
|
|
160
163
|
};
|
|
161
164
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DataTableSchema.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { FILTER_TYPES } from './exported-related/index.js';\nimport type { WeakValidationMap } from 'react';\n\nconst outOfTheBoxFilterType = PropTypes.oneOf(Object.values(FILTER_TYPES));\n\nconst textWrappingType = PropTypes.oneOf(['wrap', 'wrap-all', 'truncate']);\n\nconst columnPropTypes = {\n Header: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'Header name or component',\n ).isRequired,\n accessor: PropTypes.string.description('The entry of the data that this column will display'),\n id: PropTypes.string.description('The id of the column, will default to the Header or accessor if not present'),\n filter: outOfTheBoxFilterType.description('out-of-the-box filters'),\n Filter: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'The custom component to render as a filter',\n ),\n Cell: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('The custom cell renderer component'),\n editable: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'The editable out-of-the-box or component to render',\n ),\n disableDnD: PropTypes.bool.description('Whereas this column should be draggable'),\n canResize: PropTypes.bool.description('Whereas this column should be resizable'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of this column'),\n minWidth: PropTypes.number.description('Minimum width of this column, useful when resizing'),\n maxWidth: PropTypes.number.description('Maximum width of this column, useful when resizing'),\n canSort: PropTypes.bool.description('Whereas this column is sortable'),\n isSortedDesc: PropTypes.bool.description('Whereas this column is sorted descendingly'),\n required: PropTypes.bool.description('Whereas this column is required'),\n alwaysDisplayEditIcon: PropTypes.bool.description(\n 'Whereas to always show the edit icon on this column if it is editable',\n ),\n textWrap: textWrappingType.description('How to wrap the text in the column'),\n};\n\nconst columnsPropTypes = PropTypes.shape(columnPropTypes).description('Columns props');\n\nconst rowPropTypes = {\n tableRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Component for row details'),\n dimsumHeaderValue: PropTypes.string.description('Header displayed on the header variant of the row'),\n};\n\nconst rowsPropTypes = PropTypes.shape(rowPropTypes).description('Rows props');\n\nexport const DataTableSchema = {\n columns: PropTypes.arrayOf(columnsPropTypes).description('Array of columns').isRequired,\n data: PropTypes.arrayOf(rowsPropTypes).description('Array of rows'),\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Height of the datatable component'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of the datatable component'),\n renderRowActions: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]).description(\n 'The renderer to use for the action toolbar',\n ),\n isExpandable: PropTypes.bool.description('Whether the datatable is expandable').defaultValue(false),\n uniqueRowAccessor: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.func,\n ]).description(\n 'Column / Combination of columns / Function to call to produce a unique identifier for each row.' +\n ' This is necessary for the selectable and drag and drop features',\n ),\n disabledRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is disabled or not',\n ),\n expandedRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is expanded or not',\n ),\n onRowExpand: PropTypes.func.description('Function invoked when a row is (un)expanded'),\n cellRendererProps: PropTypes.object.description(\n 'Object with all the props you want the cells to have available when rendering',\n ),\n selectSingle: PropTypes.bool.description('Whether the selectable feature is single').defaultValue(false),\n selection: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is selected or not',\n ),\n onSelectionChange: PropTypes.func.description('Function invoked when a row is selected'),\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).description(\n 'String | Function to call which will display in the row headers',\n ),\n isResizeable: PropTypes.bool.description(\"Whether the datatable's columns are resizeable\"),\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.any,\n }),\n ).description('Array of filter keys and values'),\n withFilterBar: PropTypes.bool.description('Whether to display the filter bar'),\n filterBarProps: PropTypes.shape({\n filterBarAddonRenderer: PropTypes.func.description('Render filterbar right addon component'),\n customPillRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'If you specify custom filters, you will need to render their pills here',\n ),\n isDropdownMenuOpen: PropTypes.bool.description('Wether the DropdownMenu is Open or not.'),\n onDropdownMenuToggle: PropTypes.func.description('Callback to toggle the DropdownMenu.'),\n onClearAllFiltersClick: PropTypes.func.description('Callback for Clear Al Filters option.'),\n onDropdownMenuClickOutside: PropTypes.func.description('Callback triggered when clicking outside DropdownMenu.'),\n onDropdownMenuTriggerClick: PropTypes.func.description('Callback triggered when clicking DropdownMenu ellipsis.'),\n extraOptions: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n }),\n ).description('Any extra option you want in the dropdownmenu of the filter bar'),\n }).description('Props for the filter bar'),\n onFiltersChange: PropTypes.func.description('Function invoked when filters change'),\n pagination: PropTypes.oneOfType([\n PropTypes.oneOf([false]),\n PropTypes.shape({\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading'),\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.shape({\n dsId: PropTypes.string,\n value: PropTypes.number,\n label: PropTypes.string,\n type: PropTypes.oneOf(['single']),\n }),\n ]),\n )\n .description('The available options for page size')\n .defaultValue([10]),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n minPerPage: PropTypes.number.description('Step for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Step for the per page options').defaultValue(100),\n onPageSizeChange: PropTypes.func\n .description('Function invoked when the page size changes')\n .defaultValue(() => null),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n dataIsPage: PropTypes.bool.description('Whether to treat data as a page').defaultValue(false),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n }),\n ]).description('Object containing the data for the pagination'),\n Pagination: PropTypes.func.description('Custom component to show in place of the pagination'),\n colsLayoutStyle: PropTypes.oneOf(['auto', 'fixed']).description('Whether the datatable fills its container or not'),\n hiddenColumns: PropTypes.arrayOf(PropTypes.string).description('IDs of columns not to render'),\n dragAndDropRows: PropTypes.bool.description('Whether to turn on the d&d feature for the rows').defaultValue(false),\n onRowsReorder: PropTypes.func.description('Function invoked when a row is reordered'),\n maxDragAndDropLevel: PropTypes.number.description('Which level is the maximum allowed to drop into'),\n dragAndDropColumns: PropTypes.bool.description('Whether to turn on the d&d feature for the columns'),\n onColumnsReorder: PropTypes.func.description('Function invoked when a column is reordered'),\n getIsDropValid: PropTypes.func.description('Function to determine if a drop is valid'),\n textWrap: textWrappingType.description('Global wrapping rule'),\n noResultsMessage: PropTypes.string.description('Message to show when no more data is available'),\n noResultsSecondaryMessage: PropTypes.string.description('Secondary message to show when no more data is available'),\n noResultsButtonLabel: PropTypes.string.description('Label of the button when no more data is available'),\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Custom content to show when dataset is empty',\n ),\n isLoading: PropTypes.bool.description('Whether to show a global loader in the datatable'),\n onColumnResize: PropTypes.func\n .description('Function invoked when a column is resized')\n .deprecated({ version: '4.x', message: 'Use onColumnSizeChange' }),\n onColumnSizeChange: PropTypes.func.description('Function invoked when a column is resized'),\n onRowClick: PropTypes.func.description('Function invoked when clicking a row'),\n onRowFocus: PropTypes.func.description('Function invoked when focusing a row'),\n onCellValueChange: PropTypes.func.description(\"Function invoked when an editable cell's content is changed\"),\n onColumnSortChange: PropTypes.func\n .description('Function invoked when a column is sorted')\n .deprecated({ version: '4.x', message: 'Use onColumnSort' }),\n onColumnSort: PropTypes.func.description('Function invoked when a column is sorted'),\n actionRef: PropTypes.object.description('Reference where all the exposed action callbacks will be exposed'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAG7B,MAAM,wBAAwB,UAAU,MAAM,OAAO,OAAO,YAAY,CAAC;AAEzE,MAAM,mBAAmB,UAAU,MAAM,CAAC,QAAQ,YAAY,UAAU,CAAC;AAEzE,MAAM,kBAAkB;AAAA,EACtB,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,U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esContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { FILTER_TYPES } from './exported-related/index.js';\nimport type { WeakValidationMap } from 'react';\n\nconst outOfTheBoxFilterType = PropTypes.oneOf(Object.values(FILTER_TYPES));\n\nconst textWrappingType = PropTypes.oneOf(['wrap', 'wrap-all', 'truncate']);\n\nconst columnPropTypes = {\n Header: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'Header name or component',\n ).isRequired,\n accessor: PropTypes.string.description('The entry of the data that this column will display'),\n id: PropTypes.string.description('The id of the column, will default to the Header or accessor if not present'),\n filter: outOfTheBoxFilterType.description('out-of-the-box filters'),\n Filter: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'The custom component to render as a filter',\n ),\n Cell: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('The custom cell renderer component'),\n editable: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]).description(\n 'The editable out-of-the-box or component to render',\n ),\n disableDnD: PropTypes.bool.description('Whereas this column should be draggable'),\n canResize: PropTypes.bool.description('Whereas this column should be resizable'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of this column'),\n minWidth: PropTypes.number.description('Minimum width of this column, useful when resizing'),\n maxWidth: PropTypes.number.description('Maximum width of this column, useful when resizing'),\n canSort: PropTypes.bool.description('Whereas this column is sortable'),\n isSortedDesc: PropTypes.bool.description('Whereas this column is sorted descendingly'),\n required: PropTypes.bool.description('Whereas this column is required'),\n alwaysDisplayEditIcon: PropTypes.bool.description(\n 'Whereas to always show the edit icon on this column if it is editable',\n ),\n textWrap: textWrappingType.description('How to wrap the text in the column'),\n};\n\nconst columnsPropTypes = PropTypes.shape(columnPropTypes).description('Columns props');\n\nconst rowPropTypes = {\n tableRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Component for row details'),\n dimsumHeaderValue: PropTypes.string.description('Header displayed on the header variant of the row'),\n};\n\nconst rowsPropTypes = PropTypes.shape(rowPropTypes).description('Rows props');\n\nexport const DataTableSchema = {\n columns: PropTypes.arrayOf(columnsPropTypes).description('Array of columns').isRequired,\n data: PropTypes.arrayOf(rowsPropTypes).description('Array of rows'),\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Height of the datatable component'),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Width of the datatable component'),\n renderRowActions: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]).description(\n 'The renderer to use for the action toolbar',\n ),\n isExpandable: PropTypes.bool.description('Whether the datatable is expandable').defaultValue(false),\n uniqueRowAccessor: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.func,\n ]).description(\n 'Column / Combination of columns / Function to call to produce a unique identifier for each row.' +\n ' This is necessary for the selectable and drag and drop features',\n ),\n disabledRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is disabled or not',\n ),\n expandedRows: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is expanded or not',\n ),\n onRowExpand: PropTypes.func.description('Function invoked when a row is (un)expanded'),\n cellRendererProps: PropTypes.object.description(\n 'Object with all the props you want the cells to have available when rendering',\n ),\n selectSingle: PropTypes.bool.description('Whether the selectable feature is single').defaultValue(false),\n selection: PropTypes.object.description(\n 'Object with the identifiers of the rows as keys, and booleans as values. Specifies if a row is selected or not',\n ),\n onSelectionChange: PropTypes.func.description('Function invoked when a row is selected'),\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).description(\n 'String | Function to call which will display in the row headers',\n ),\n isResizeable: PropTypes.bool.description(\"Whether the datatable's columns are resizeable\"),\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.any,\n }),\n ).description('Array of filter keys and values'),\n withFilterBar: PropTypes.bool.description('Whether to display the filter bar'),\n filterBarProps: PropTypes.shape({\n filterBarAddonRenderer: PropTypes.func.description('Render filterbar right addon component'),\n customPillRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'If you specify custom filters, you will need to render their pills here',\n ),\n isDropdownMenuOpen: PropTypes.bool.description('Wether the DropdownMenu is Open or not.'),\n onDropdownMenuToggle: PropTypes.func.description('Callback to toggle the DropdownMenu.'),\n onClearAllFiltersClick: PropTypes.func.description('Callback for Clear Al Filters option.'),\n onDropdownMenuClickOutside: PropTypes.func.description('Callback triggered when clicking outside DropdownMenu.'),\n onDropdownMenuTriggerClick: PropTypes.func.description('Callback triggered when clicking DropdownMenu ellipsis.'),\n extraOptions: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n }),\n ).description('Any extra option you want in the dropdownmenu of the filter bar'),\n }).description('Props for the filter bar'),\n onFiltersChange: PropTypes.func.description('Function invoked when filters change'),\n pagination: PropTypes.oneOfType([\n PropTypes.oneOf([false]),\n PropTypes.shape({\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading'),\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.shape({\n dsId: PropTypes.string,\n value: PropTypes.number,\n label: PropTypes.string,\n type: PropTypes.oneOf(['single']),\n }),\n ]),\n )\n .description('The available options for page size')\n .defaultValue([10]),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n minPerPage: PropTypes.number.description('Step for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Step for the per page options').defaultValue(100),\n onPageSizeChange: PropTypes.func\n .description('Function invoked when the page size changes')\n .defaultValue(() => null),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n dataIsPage: PropTypes.bool.description('Whether to treat data as a page').defaultValue(false),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n }),\n ]).description('Object containing the data for the pagination'),\n Pagination: PropTypes.func.description('Custom component to show in place of the pagination'),\n colsLayoutStyle: PropTypes.oneOf(['auto', 'fixed']).description('Whether the datatable fills its container or not'),\n hiddenColumns: PropTypes.arrayOf(PropTypes.string).description('IDs of columns not to render'),\n dragAndDropRows: PropTypes.bool.description('Whether to turn on the d&d feature for the rows').defaultValue(false),\n onRowsReorder: PropTypes.func.description('Function invoked when a row is reordered'),\n maxDragAndDropLevel: PropTypes.number.description('Which level is the maximum allowed to drop into'),\n dragAndDropColumns: PropTypes.bool.description('Whether to turn on the d&d feature for the columns'),\n onColumnsReorder: PropTypes.func.description('Function invoked when a column is reordered'),\n getIsDropValid: PropTypes.func.description('Function to determine if a drop is valid'),\n textWrap: textWrappingType.description('Global wrapping rule'),\n noResultsMessage: PropTypes.string.description('Message to show when no more data is available'),\n noResultsSecondaryMessage: PropTypes.string.description('Secondary message to show when no more data is available'),\n noResultsButtonLabel: PropTypes.string.description('Label of the button when no more data is available'),\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Custom content to show when dataset is empty',\n ),\n isLoading: PropTypes.bool.description('Whether to show a global loader in the datatable'),\n onColumnResize: PropTypes.func\n .description('Function invoked when a column is resized')\n .deprecated({ version: '4.x', message: 'Use onColumnSizeChange' }),\n onColumnSizeChange: PropTypes.func.description('Function invoked when a column is resized'),\n onRowClick: PropTypes.func.description('Function invoked when clicking a row'),\n onRowFocus: PropTypes.func.description('Function invoked when focusing a row'),\n onCellValueChange: PropTypes.func.description(\"Function invoked when an editable cell's content is changed\"),\n onColumnSortChange: PropTypes.func\n .description('Function invoked when a column is sorted')\n .deprecated({ version: '4.x', message: 'Use onColumnSort' }),\n onColumnSort: PropTypes.func.description('Function invoked when a column is sorted'),\n onTableResize: PropTypes.func.description(\n 'Function invoked when the size of the internal table changes, e.g. when a the browser window is resized',\n ),\n actionRef: PropTypes.object.description('Reference where all the exposed action callbacks will be exposed'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAG7B,MAAM,wBAAwB,UAAU,MAAM,OAAO,OAAO,YAAY,CAAC;AAEzE,MAAM,mBAAmB,UAAU,MAAM,CAAC,QAAQ,YAAY,UAAU,CAAC;AAEzE,MAAM,kBAAkB;AAAA,EACtB,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,UAAU,UAAU,OAAO,YAAY,qDAAqD;AAAA,EAC5F,IAAI,UAAU,OAAO,YAAY,6EAA6E;AAAA,EAC9G,QAAQ,sBAAsB,YAAY,wBAAwB;AAAA,EAClE,QAAQ,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,oCAAoC;AAAA,EAC9G,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,IACn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A0C;AAAA,EACrF,UAAU,iBAAiB,YAAY,sBAAsB;AAAA,EAC7D,kBAAkB,UAAU,OAAO,YAAY,gDAAgD;AAAA,EAC/F,2BAA2B,UAAU,OAAO,YAAY,0DAA0D;AAAA,EAClH,sBAAsB,UAAU,OAAO,YAAY,oDAAoD;AAAA,EACvG,sBAAsB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,IAC7E;AAAA,EACF;AAAA,EACA,WAAW,UAAU,KAAK,YAAY,kDAAkD;AAAA,EACxF,gBAAgB,UAAU,KACvB,YAAY,2CAA2C,EACvD,WAAW,EAAE,SAAS,OAAO,SAAS,yBAAyB,CAAC;AAAA,EACnE,oBAAoB,UAAU,KAAK,YAAY,2CAA2C;AAAA,EAC1F,YAAY,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAC7E,YAAY,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAC7E,mBAAmB,UAAU,KAAK,YAAY,6DAA6D;AAAA,EAC3G,oBAAoB,UAAU,KAC3B,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,OAAO,SAAS,mBAAmB,CAAC;AAAA,EAC7D,cAAc,UAAU,KAAK,YAAY,0CAA0C;AAAA,EACnF,eAAe,UAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,kEAAkE;AAC5G;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,6 +7,7 @@ import { usePaginationConfig } from "./usePaginationConfig.js";
|
|
|
7
7
|
import { useTableColsWithAddons } from "./useTableColsWithAddons.js";
|
|
8
8
|
import { ColsLayoutStyle } from "./constants.js";
|
|
9
9
|
import { useInternalStateConfig } from "./useInternalStateConfig.js";
|
|
10
|
+
import { useTableResizeCb } from "./useTableResizeCb.js";
|
|
10
11
|
const estimateSize = () => 36;
|
|
11
12
|
const useDatatableConfig = (props) => {
|
|
12
13
|
const virtualListRef = useRef(null);
|
|
@@ -60,6 +61,7 @@ const useDatatableConfig = (props) => {
|
|
|
60
61
|
[gridLayout, totalColumnsWidth]
|
|
61
62
|
);
|
|
62
63
|
const internalState = useInternalStateConfig();
|
|
64
|
+
useTableResizeCb({ virtualListRef, internalProps: props });
|
|
63
65
|
const ctx = useMemo(
|
|
64
66
|
() => ({
|
|
65
67
|
tableProps: props,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/useDatatableConfig.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { columnsToGrid } from '../helpers/columnsToGrid.js';\nimport type { TypescriptColumn, TypescriptContext, TypescriptProps } from '../types/props.js';\nimport { useRowFlattenization } from './useRowFlattenization.js';\nimport { usePaginationConfig } from './usePaginationConfig.js';\nimport { useTableColsWithAddons } from './useTableColsWithAddons.js';\nimport { ColsLayoutStyle } from './constants.js';\nimport { useInternalStateConfig } from './useInternalStateConfig.js';\nimport { useTableResizeCb } from './useTableResizeCb.js';\n\nconst estimateSize = () => 36;\n\nexport const useDatatableConfig = (props: TypescriptProps): TypescriptContext => {\n const virtualListRef = useRef<HTMLDivElement>(null);\n const columnHeaderRef = useRef<HTMLDivElement>(null);\n const [isShiftPressed, setIsShiftPressed] = useState(false);\n const lastSelected = useRef<number>(-1);\n\n // ===========================================================================\n // Column config\n // ===========================================================================\n const tableColsWithAddons = useTableColsWithAddons(props);\n const visibleColumns = useMemo(\n () =>\n tableColsWithAddons\n .filter((col: TypescriptColumn) => !props.hiddenColumns?.includes(col.accessor))\n .map((col: TypescriptColumn) => {\n if (col.columns) {\n col.columns = col.columns.filter(\n (subCol: TypescriptColumn) => !props.hiddenColumns?.includes(subCol.accessor),\n );\n }\n return col;\n }),\n [props.hiddenColumns, tableColsWithAddons],\n );\n\n // ===========================================================================\n // Virtualization\n // ===========================================================================\n\n const [dataLength, setDataLength] = useState(1);\n\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n const virtualListHelpers = useVirtual({\n size: dataLength,\n parentRef: virtualListRef,\n overscan: 15,\n paddingStart: columnHeaderRef.current?.getBoundingClientRect()?.height ?? 24,\n estimateSize,\n });\n\n // ===========================================================================\n // Action ref setup\n // ===========================================================================\n useEffect(() => {\n if (props.actionRef) {\n props.actionRef.current.scrollToIndex = virtualListHelpers.scrollToIndex;\n props.actionRef.current.scrollToOffset = virtualListHelpers.scrollToOffset;\n }\n }, [props.actionRef, virtualListHelpers.scrollToIndex, virtualListHelpers.scrollToOffset]);\n\n // ===========================================================================\n // Data flattenization and pagination\n // ===========================================================================\n\n const [flattenedData, allDataFlattened] = useRowFlattenization(props);\n\n const [paginatedData, paginationHelpers] = usePaginationConfig(props, flattenedData);\n\n // Redo virtualization until we match the lengths\n if (dataLength !== (paginatedData || flattenedData).length) setDataLength((paginatedData || flattenedData).length);\n\n // ===========================================================================\n // Layout config\n // ===========================================================================\n\n const [gridLayout, setGridLayout] = useState(columnsToGrid(visibleColumns, props.colsLayoutStyle));\n\n // We need to listen and update the state based on this props\n useEffect(() => {\n setGridLayout(columnsToGrid(visibleColumns, props.colsLayoutStyle));\n }, [visibleColumns, props.colsLayoutStyle]);\n\n const totalColumnsWidth = useMemo(\n () =>\n props.colsLayoutStyle === ColsLayoutStyle.Fixed\n ? gridLayout.reduce((acc: number, cur: string) => acc + Number.parseInt(cur, 10), 0)\n : '100%',\n [props.colsLayoutStyle, gridLayout],\n );\n\n const layoutHelpers = useMemo(\n () => ({\n gridLayout,\n setGridLayout,\n totalColumnsWidth,\n }),\n [gridLayout, totalColumnsWidth],\n );\n\n // ===========================================================================\n // Internal state config\n // ===========================================================================\n\n const internalState = useInternalStateConfig();\n useTableResizeCb({ virtualListRef, internalProps: props });\n\n const ctx = useMemo(\n () => ({\n tableProps: props,\n layoutHelpers,\n paginationHelpers,\n visibleColumns,\n virtualListHelpers,\n flattenedData: paginatedData || flattenedData,\n allDataFlattened,\n virtualListRef,\n columnHeaderRef,\n ...internalState,\n isShiftPressed,\n setIsShiftPressed,\n lastSelected,\n }),\n [\n props,\n layoutHelpers,\n paginationHelpers,\n visibleColumns,\n virtualListHelpers,\n paginatedData,\n flattenedData,\n allDataFlattened,\n virtualListRef,\n columnHeaderRef,\n internalState,\n isShiftPressed,\n setIsShiftPressed,\n lastSelected,\n ],\n );\n\n return ctx;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,SAAS,QAAQ,gBAAgB;AACrD,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAEjC,MAAM,eAAe,MAAM;AAEpB,MAAM,qBAAqB,CAAC,UAA8C;AAC/E,QAAM,iBAAiB,OAAuB,IAAI;AAClD,QAAM,kBAAkB,OAAuB,IAAI;AACnD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAC1D,QAAM,eAAe,OAAe,EAAE;AAKtC,QAAM,sBAAsB,uBAAuB,KAAK;AACxD,QAAM,iBAAiB;AAAA,IACrB,MACE,oBACG,OAAO,CAAC,QAA0B,CAAC,MAAM,eAAe,SAAS,IAAI,QAAQ,CAAC,EAC9E,IAAI,CAAC,QAA0B;AAC9B,UAAI,IAAI,SAAS;AACf,YAAI,UAAU,IAAI,QAAQ;AAAA,UACxB,CAAC,WAA6B,CAAC,MAAM,eAAe,SAAS,OAAO,QAAQ;AAAA,QAC9E;A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AAC7C,mBAAiB,EAAE,gBAAgB,eAAe,MAAM,CAAC;AAEzD,QAAM,MAAM;AAAA,IACV,OAAO;AAAA,MACL,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe,iBAAiB;AAAA,MAChC;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { useNativeResizeObserver } from "@elliemae/ds-utilities";
|
|
4
|
+
const useTableResizeCb = (config) => {
|
|
5
|
+
const { virtualListRef, internalProps } = config;
|
|
6
|
+
const { onTableResize } = internalProps;
|
|
7
|
+
const handleResize = React2.useCallback(
|
|
8
|
+
(entry) => {
|
|
9
|
+
if (onTableResize)
|
|
10
|
+
onTableResize(entry);
|
|
11
|
+
},
|
|
12
|
+
[onTableResize]
|
|
13
|
+
);
|
|
14
|
+
useNativeResizeObserver(virtualListRef.current, handleResize);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useTableResizeCb
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useTableResizeCb.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/useTableResizeCb.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useNativeResizeObserver } from '@elliemae/ds-utilities';\nimport type { InternalTypescriptProps } from '../types/props.js';\n\n// type for the second parameter of useNativeResizeObserver\ntype NativeResizeObserverCB = Parameters<typeof useNativeResizeObserver>[1];\n\n// type declaration for the custom hook\nexport type UseTableResizeCb = (config: {\n virtualListRef: React.RefObject<HTMLElement>;\n internalProps: InternalTypescriptProps;\n}) => void;\n\nexport const useTableResizeCb: UseTableResizeCb = (config) => {\n const { virtualListRef, internalProps } = config;\n const { onTableResize } = internalProps;\n\n const handleResize: NativeResizeObserverCB = React.useCallback(\n (entry) => {\n if (onTableResize) onTableResize(entry);\n },\n [onTableResize],\n );\n\n useNativeResizeObserver(virtualListRef.current, handleResize);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,+BAA+B;AAYjC,MAAM,mBAAqC,CAAC,WAAW;AAC5D,QAAM,EAAE,gBAAgB,cAAc,IAAI;AAC1C,QAAM,EAAE,cAAc,IAAI;AAE1B,QAAM,eAAuCA,OAAM;AAAA,IACjD,CAAC,UAAU;AACT,UAAI;AAAe,sBAAc,KAAK;AAAA,IACxC;AAAA,IACA,CAAC,aAAa;AAAA,EAChB;AAEA,0BAAwB,eAAe,SAAS,YAAY;AAC9D;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterBarDropdownMenu } from './FilterBarDropdownMenu.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { applyOutOfTheBoxFilters } from "./applyOutOfTheBoxFilters.js";
|
|
3
|
+
import { singleDateFilterFn } from "./singleDateFilterFn.js";
|
|
4
|
+
import { singleSelectFilterFn } from "./singleSelectFilterFn.js";
|
|
5
|
+
import { multiSelectFilterFn } from "./multiSelectFilterFn.js";
|
|
6
|
+
import { numberRangeFilterFn } from "./numberRangeFilterFn.js";
|
|
7
|
+
import { currencyRangeFilterFn } from "./currencyRangeFilterFn.js";
|
|
8
|
+
import { dateRangeFilterFn } from "./dateRangeFilterFn.js";
|
|
9
|
+
export {
|
|
10
|
+
applyOutOfTheBoxFilters,
|
|
11
|
+
currencyRangeFilterFn,
|
|
12
|
+
dateRangeFilterFn,
|
|
13
|
+
multiSelectFilterFn,
|
|
14
|
+
numberRangeFilterFn,
|
|
15
|
+
singleDateFilterFn,
|
|
16
|
+
singleSelectFilterFn
|
|
17
|
+
};
|
|
9
18
|
//# 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/Filters/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { applyOutOfTheBoxFilters } from './applyOutOfTheBoxFilters.js';\nexport { singleDateFilterFn } from './singleDateFilterFn.js';\nexport { singleSelectFilterFn } from './singleSelectFilterFn.js';\nexport { multiSelectFilterFn } from './multiSelectFilterFn.js';\nexport { numberRangeFilterFn } from './numberRangeFilterFn.js';\nexport { currencyRangeFilterFn } from './currencyRangeFilterFn.js';\nexport { dateRangeFilterFn } from './dateRangeFilterFn.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,14 +3,34 @@ import { FilterPopover } from "./FilterPopover/index.js";
|
|
|
3
3
|
import { EditableCell } from "./EditableCell.js";
|
|
4
4
|
import { Toolbar } from "./Toolbar/index.js";
|
|
5
5
|
import { groupBy } from "./groupBy.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { FILTER_TYPES } from "./FilterTypes.js";
|
|
7
|
+
import { ROW_VARIANTS, ROW_VARIANT_KEY, ROW_VARIANT_COMPACT_KEY } from "./RowVariants.js";
|
|
8
|
+
import {
|
|
9
|
+
applyOutOfTheBoxFilters,
|
|
10
|
+
singleDateFilterFn,
|
|
11
|
+
singleSelectFilterFn,
|
|
12
|
+
multiSelectFilterFn,
|
|
13
|
+
numberRangeFilterFn,
|
|
14
|
+
currencyRangeFilterFn,
|
|
15
|
+
dateRangeFilterFn
|
|
16
|
+
} from "./Filters/index.js";
|
|
17
|
+
import { FilterBarDropdownMenu } from "./FilterBar/index.js";
|
|
10
18
|
export {
|
|
11
19
|
EditableCell,
|
|
20
|
+
FILTER_TYPES,
|
|
21
|
+
FilterBarDropdownMenu,
|
|
12
22
|
FilterPopover,
|
|
23
|
+
ROW_VARIANTS,
|
|
24
|
+
ROW_VARIANT_COMPACT_KEY,
|
|
25
|
+
ROW_VARIANT_KEY,
|
|
13
26
|
Toolbar,
|
|
14
|
-
|
|
27
|
+
applyOutOfTheBoxFilters,
|
|
28
|
+
currencyRangeFilterFn,
|
|
29
|
+
dateRangeFilterFn,
|
|
30
|
+
groupBy,
|
|
31
|
+
multiSelectFilterFn,
|
|
32
|
+
numberRangeFilterFn,
|
|
33
|
+
singleDateFilterFn,
|
|
34
|
+
singleSelectFilterFn
|
|
15
35
|
};
|
|
16
36
|
//# 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/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterPopover } from './FilterPopover/index.js';\nexport { EditableCell } from './EditableCell.js';\nexport { Toolbar } from './Toolbar/index.js';\nexport { groupBy } from './groupBy.js';\nexport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterPopover } from './FilterPopover/index.js';\nexport { EditableCell } from './EditableCell.js';\nexport { Toolbar } from './Toolbar/index.js';\nexport { groupBy } from './groupBy.js';\nexport { FILTER_TYPES } from './FilterTypes.js';\nexport { ROW_VARIANTS, ROW_VARIANT_KEY, ROW_VARIANT_COMPACT_KEY } from './RowVariants.js';\nexport {\n applyOutOfTheBoxFilters,\n singleDateFilterFn,\n singleSelectFilterFn,\n multiSelectFilterFn,\n numberRangeFilterFn,\n currencyRangeFilterFn,\n dateRangeFilterFn,\n} from './Filters/index.js';\nexport { FilterBarDropdownMenu } from './FilterBar/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,cAAc,iBAAiB,+BAA+B;AACvE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/types/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { MutableRefObject } from 'react';\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual/types';\nimport type { useSortable } from '@elliemae/ds-drag-and-drop';\nimport type { CSSProperties } from 'styled-components';\nimport type { ColsLayoutStyle } from '../configs/constants.js';\n\nexport type TypescriptGenericFunc = (...args: unknown[]) => unknown;\ninterface FilterOptionT {\n dsId: string;\n type: string;\n value: string;\n label: string;\n}\n\ninterface HeaderComponentProps {\n ctx: TypescriptContext;\n}\n\nexport type DraggablePropsT =\n | false\n | (ReturnType<typeof useSortable> & {\n dropIndicatorPosition: DropIndicatorPosition;\n shouldShowDropIndicatorPosition: boolean;\n isDropValid: boolean;\n });\n\ninterface CellComponentProps<T = HTMLElement> {\n ctx: TypescriptContext;\n isRowSelected: boolean;\n row: InternalTypescriptRow;\n cell: TypescriptCell<T>;\n draggableProps: DraggablePropsT;\n isDragOverlay: boolean;\n}\n\nexport enum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n Inside = 3,\n}\n\nexport interface TypescriptColumn<T extends HTMLElement = HTMLElement> {\n id?: string;\n Header: string | React.ComponentType<HeaderComponentProps>;\n accessor?: string;\n filter?: string;\n filterOptions?: FilterOptionT[] | (() => FilterOptionT[]);\n filterMinWidth?: number | string;\n Filter?: React.ComponentType<FilterProps>;\n Cell?: React.ComponentType<CellComponentProps<T>>;\n editable?: string | TypescriptGenericFunc;\n disableDnD?: boolean;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n padding?: number;\n columns?: TypescriptColumn[];\n canSort?: boolean;\n isSortedDesc?: boolean;\n canResize?: boolean;\n isFocuseable?: boolean;\n textWrap?: 'wrap' | 'wrap-all' | 'truncate';\n ref?: React.MutableRefObject<HTMLTableColElement>;\n required?: boolean;\n cellStyle?: CSSProperties;\n alwaysDisplayEditIcon?: boolean;\n}\n\nexport interface InternalTypescriptColumn<T extends HTMLElement = HTMLElement> extends TypescriptColumn<T> {\n id: string;\n parentId: string | null;\n depth: number;\n columns?: InternalTypescriptColumn[];\n}\n\nexport interface TypescriptCell<T = HTMLElement> {\n column: TypescriptColumn;\n value: any;\n render: React.ComponentType<CellComponentProps>;\n row: InternalTypescriptRow;\n ref: React.RefObject<T>;\n id: string;\n}\n\nexport interface TypescriptRow {\n [key: string]: any;\n subRows?: TypescriptRow[];\n tableRowDetails?: React.ComponentType<any>;\n dimsumHeaderValue?: string;\n}\n\nexport interface InternalTypescriptRow {\n id: string;\n uid: string;\n index: number;\n realIndex: number;\n parent: InternalTypescriptRow | null;\n parentId: string | null;\n parentIndex: number | null;\n depth: number;\n isExpanded: boolean;\n subRows: TypescriptRow[];\n childrenCount: number;\n original: TypescriptRow;\n cells: TypescriptCell[];\n}\n\nexport type RowVariant = 'ds-header-group-row' | 'ds-primary-row' | 'ds-secondary-row';\n\nexport type TypescriptRenderRowActionsConfig = {\n columnWidth: number;\n renderer: (...args: any[]) => JSX.Element;\n};\n\nexport type TypescriptRenderRowActions = false | TypescriptRenderRowActionsConfig;\n\nexport type TypescriptAppliedFilter = {\n id: string;\n type: string;\n value: any;\n};\n\nexport type TypescriptPagination = {\n hasPagination: boolean;\n page?: any[];\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n dataIsPage?: boolean;\n showPerPageSelector?: boolean;\n perPageOptions?: number[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageCount?: number | string;\n isLoadingPageCount?: boolean;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n};\n\nexport type TypescriptSortBy = {\n id: string;\n desc: boolean;\n};\n\nexport type TypescriptSelectionItem = boolean | 'mixed';\n\nexport type TypescriptSelection = Record<string | number, TypescriptSelectionItem>;\n\nexport type UniqueRowAccessorType = string | string[] | ((row: TypescriptRow) => string) | undefined;\n\nexport interface ReduxHeader {\n hideFilterMenu?: boolean;\n hideFilterButton?: boolean;\n showDnDHandle?: boolean;\n withTabStops?: boolean;\n}\n\nexport interface DataTableFilter {\n id: string;\n type: string;\n value: any;\n}\n\ninterface PropsWithDefault {\n height: string;\n width: string;\n renderRowActions: boolean;\n getRowVariant: (\n row: TypescriptRow,\n defaultCellRenderer: React.ComponentType<any>,\n ) => RowVariant | React.ComponentType<any>;\n withFilterBar: boolean;\n isExpandable: boolean;\n expandedRows: Record<string, boolean>;\n disabledRows: Record<string, boolean>;\n isResizeable: boolean;\n isLoading: boolean;\n pagination: false | TypescriptPagination;\n filters: DataTableFilter[];\n colsLayoutStyle: ColsLayoutStyle;\n hiddenColumns: string[];\n noResultsMessage: string;\n dragAndDropRows: boolean;\n maxDragAndDropLevel: number;\n onRowsReorder: (\n newData: TypescriptRow[],\n indexes: { targetIndex: number; fromIndex: number },\n considerExpanding: string | null,\n extraData: { flattenedData: InternalTypescriptRow[]; allDataFlattened: InternalTypescriptRow[] },\n ) => void;\n dragAndDropColumns: boolean;\n onColumnsReorder: (newData: TypescriptColumn[], indexes: { targetIndex: number; fromIndex: number }) => void;\n getIsDropValid: (\n active: InternalTypescriptRow,\n over: InternalTypescriptRow,\n dropIndicatorPosition: DropIndicatorPosition,\n ) => boolean;\n onColumnResize: (headerId: string, width: number) => void;\n onColumnSizeChange: (newColumns: TypescriptColumn[], headerId: string, width: number) => void;\n onRowClick: TypescriptGenericFunc;\n onRowFocus: TypescriptGenericFunc;\n noSelectionColumn: boolean;\n selectSingle: boolean;\n onSelectionChange: (\n newSelection: TypescriptSelection,\n selectedControl: string,\n event: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent,\n ) => void;\n textWrap: 'wrap' | 'wrap-all' | 'truncate';\n onCellValueChange: (cellChange: { value: any; property: any; rowIndex: number }) => void;\n onFiltersChange: TypescriptGenericFunc;\n onPageChanged: TypescriptGenericFunc;\n onRowExpand: (expandedRows: Record<string, boolean>, toggledRow: string) => void;\n onColumnSortChange: (newSortRequest: { column: any; direction: any }) => void;\n onColumnSort: (newColumns: TypescriptColumn[], headerId: string, direction: 'ASC' | 'DESC') => void;\n}\n\ninterface PropsRequired {\n columns: TypescriptColumn[];\n data: TypescriptRow[];\n}\n\ninterface PropsOptional {\n uniqueRowAccessor?: UniqueRowAccessorType;\n cellRendererProps?: Record<string, any>;\n selection?: TypescriptSelection;\n groupedRowsRenderHeader?: TypescriptGenericFunc | string;\n filterBarProps?: {\n filterBarAddonRenderer?: React.ComponentType<any>;\n customPillRenderer?: React.ComponentType<any>;\n extraOptions?: { type: string; id: string; label: string; onClick?: TypescriptGenericFunc }[];\n };\n actionRef?: React.RefObject<any>;\n noResultsSecondaryMessage?: string;\n noResultsButtonLabel?: string;\n noResultsPlaceholder?: TypescriptGenericFunc;\n onNoResultsButtonClick?: TypescriptGenericFunc;\n Pagination?: React.ComponentType<Record<string, never>>;\n}\n\nexport interface TypescriptProps extends Partial<PropsWithDefault>, PropsRequired, PropsOptional {}\nexport interface InternalTypescriptProps extends PropsWithDefault, PropsRequired, PropsOptional {}\n\nexport interface FilterProps {\n column: TypescriptColumn;\n ctx: TypescriptContext;\n onFiltersChange?: (filters: DataTableFilter[]) => void;\n onValueChange: (type: string, value: any) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, newState: any) => void;\n patchHeader: (headerId: string, newHeader: any) => void;\n filterValue?: any;\n reduxHeader?: any;\n innerRef: MutableRefObject<HTMLDivElement | null>;\n}\n\nexport type TypescriptContext = {\n tableProps: InternalTypescriptProps;\n columnHeaderRef: React.RefObject<HTMLDivElement>;\n virtualListRef: React.RefObject<HTMLDivElement>;\n flattenedData: InternalTypescriptRow[];\n allDataFlattened: InternalTypescriptRow[];\n visibleColumns: InternalTypescriptColumn[];\n virtualListHelpers: ReturnType<typeof useVirtual>;\n layoutHelpers: {\n totalColumnsWidth: number | string;\n gridLayout: string[];\n setGridLayout: React.Dispatch<React.SetStateAction<string[]>>;\n };\n paginationHelpers: TypescriptPagination;\n drilldownRowId: string | null;\n setDrilldownRowId: React.Dispatch<React.SetStateAction<string | null>>;\n focusedRowId: string | null;\n setFocusedRowId: React.Dispatch<React.SetStateAction<string | null>>;\n reduxHeaders: Record<string, ReduxHeader>;\n patchHeader: (headerId: string, newHeader: ReduxHeader) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, value: boolean) => void;\n isShiftPressed: boolean;\n setIsShiftPressed: React.Dispatch<React.SetStateAction<boolean>>;\n lastSelected: React.MutableRefObject<number>;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { MutableRefObject } from 'react';\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual/types';\nimport type { useSortable } from '@elliemae/ds-drag-and-drop';\nimport type { CSSProperties } from 'styled-components';\nimport type { ColsLayoutStyle } from '../configs/constants.js';\n\nexport type TypescriptGenericFunc = (...args: unknown[]) => unknown;\ninterface FilterOptionT {\n dsId: string;\n type: string;\n value: string;\n label: string;\n}\n\ninterface HeaderComponentProps {\n ctx: TypescriptContext;\n}\n\nexport type DraggablePropsT =\n | false\n | (ReturnType<typeof useSortable> & {\n dropIndicatorPosition: DropIndicatorPosition;\n shouldShowDropIndicatorPosition: boolean;\n isDropValid: boolean;\n });\n\ninterface CellComponentProps<T = HTMLElement> {\n ctx: TypescriptContext;\n isRowSelected: boolean;\n row: InternalTypescriptRow;\n cell: TypescriptCell<T>;\n draggableProps: DraggablePropsT;\n isDragOverlay: boolean;\n}\n\nexport enum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n Inside = 3,\n}\n\nexport interface TypescriptColumn<T extends HTMLElement = HTMLElement> {\n id?: string;\n Header: string | React.ComponentType<HeaderComponentProps>;\n accessor?: string;\n filter?: string;\n filterOptions?: FilterOptionT[] | (() => FilterOptionT[]);\n filterMinWidth?: number | string;\n Filter?: React.ComponentType<FilterProps>;\n Cell?: React.ComponentType<CellComponentProps<T>>;\n editable?: string | TypescriptGenericFunc;\n disableDnD?: boolean;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n padding?: number;\n columns?: TypescriptColumn[];\n canSort?: boolean;\n isSortedDesc?: boolean;\n canResize?: boolean;\n isFocuseable?: boolean;\n textWrap?: 'wrap' | 'wrap-all' | 'truncate';\n ref?: React.MutableRefObject<HTMLTableColElement>;\n required?: boolean;\n cellStyle?: CSSProperties;\n alwaysDisplayEditIcon?: boolean;\n}\n\nexport interface InternalTypescriptColumn<T extends HTMLElement = HTMLElement> extends TypescriptColumn<T> {\n id: string;\n parentId: string | null;\n depth: number;\n columns?: InternalTypescriptColumn[];\n}\n\nexport interface TypescriptCell<T = HTMLElement> {\n column: TypescriptColumn;\n value: any;\n render: React.ComponentType<CellComponentProps>;\n row: InternalTypescriptRow;\n ref: React.RefObject<T>;\n id: string;\n}\n\nexport interface TypescriptRow {\n [key: string]: any;\n subRows?: TypescriptRow[];\n tableRowDetails?: React.ComponentType<any>;\n dimsumHeaderValue?: string;\n}\n\nexport interface InternalTypescriptRow {\n id: string;\n uid: string;\n index: number;\n realIndex: number;\n parent: InternalTypescriptRow | null;\n parentId: string | null;\n parentIndex: number | null;\n depth: number;\n isExpanded: boolean;\n subRows: TypescriptRow[];\n childrenCount: number;\n original: TypescriptRow;\n cells: TypescriptCell[];\n}\n\nexport type RowVariant = 'ds-header-group-row' | 'ds-primary-row' | 'ds-secondary-row';\n\nexport type TypescriptRenderRowActionsConfig = {\n columnWidth: number;\n renderer: (...args: any[]) => JSX.Element;\n};\n\nexport type TypescriptRenderRowActions = false | TypescriptRenderRowActionsConfig;\n\nexport type TypescriptAppliedFilter = {\n id: string;\n type: string;\n value: any;\n};\n\nexport type TypescriptPagination = {\n hasPagination: boolean;\n page?: any[];\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n dataIsPage?: boolean;\n showPerPageSelector?: boolean;\n perPageOptions?: number[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageCount?: number | string;\n isLoadingPageCount?: boolean;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n};\n\nexport type TypescriptSortBy = {\n id: string;\n desc: boolean;\n};\n\nexport type TypescriptSelectionItem = boolean | 'mixed';\n\nexport type TypescriptSelection = Record<string | number, TypescriptSelectionItem>;\n\nexport type UniqueRowAccessorType = string | string[] | ((row: TypescriptRow) => string) | undefined;\n\nexport interface ReduxHeader {\n hideFilterMenu?: boolean;\n hideFilterButton?: boolean;\n showDnDHandle?: boolean;\n withTabStops?: boolean;\n}\n\nexport interface DataTableFilter {\n id: string;\n type: string;\n value: any;\n}\n\ninterface PropsWithDefault {\n height: string;\n width: string;\n renderRowActions: boolean;\n getRowVariant: (\n row: TypescriptRow,\n defaultCellRenderer: React.ComponentType<any>,\n ) => RowVariant | React.ComponentType<any>;\n withFilterBar: boolean;\n isExpandable: boolean;\n expandedRows: Record<string, boolean>;\n disabledRows: Record<string, boolean>;\n isResizeable: boolean;\n isLoading: boolean;\n pagination: false | TypescriptPagination;\n filters: DataTableFilter[];\n colsLayoutStyle: ColsLayoutStyle;\n hiddenColumns: string[];\n noResultsMessage: string;\n dragAndDropRows: boolean;\n maxDragAndDropLevel: number;\n onRowsReorder: (\n newData: TypescriptRow[],\n indexes: { targetIndex: number; fromIndex: number },\n considerExpanding: string | null,\n extraData: { flattenedData: InternalTypescriptRow[]; allDataFlattened: InternalTypescriptRow[] },\n ) => void;\n dragAndDropColumns: boolean;\n onColumnsReorder: (newData: TypescriptColumn[], indexes: { targetIndex: number; fromIndex: number }) => void;\n getIsDropValid: (\n active: InternalTypescriptRow,\n over: InternalTypescriptRow,\n dropIndicatorPosition: DropIndicatorPosition,\n ) => boolean;\n onColumnResize: (headerId: string, width: number) => void;\n onColumnSizeChange: (newColumns: TypescriptColumn[], headerId: string, width: number) => void;\n onRowClick: TypescriptGenericFunc;\n onRowFocus: TypescriptGenericFunc;\n noSelectionColumn: boolean;\n selectSingle: boolean;\n onSelectionChange: (\n newSelection: TypescriptSelection,\n selectedControl: string,\n event: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent,\n ) => void;\n textWrap: 'wrap' | 'wrap-all' | 'truncate';\n onCellValueChange: (cellChange: { value: any; property: any; rowIndex: number }) => void;\n onFiltersChange: TypescriptGenericFunc;\n onPageChanged: TypescriptGenericFunc;\n onRowExpand: (expandedRows: Record<string, boolean>, toggledRow: string) => void;\n onColumnSortChange: (newSortRequest: { column: any; direction: any }) => void;\n onColumnSort: (newColumns: TypescriptColumn[], headerId: string, direction: 'ASC' | 'DESC') => void;\n}\n\ninterface PropsRequired {\n columns: TypescriptColumn[];\n data: TypescriptRow[];\n}\n\ninterface PropsOptional {\n uniqueRowAccessor?: UniqueRowAccessorType;\n cellRendererProps?: Record<string, any>;\n selection?: TypescriptSelection;\n groupedRowsRenderHeader?: TypescriptGenericFunc | string;\n filterBarProps?: {\n filterBarAddonRenderer?: React.ComponentType<any>;\n customPillRenderer?: React.ComponentType<any>;\n extraOptions?: { type: string; id: string; label: string; onClick?: TypescriptGenericFunc }[];\n };\n actionRef?: React.RefObject<any>;\n noResultsSecondaryMessage?: string;\n noResultsButtonLabel?: string;\n noResultsPlaceholder?: TypescriptGenericFunc;\n onNoResultsButtonClick?: TypescriptGenericFunc;\n onTableResize?: TypescriptGenericFunc;\n Pagination?: React.ComponentType<Record<string, never>>;\n}\n\nexport interface TypescriptProps extends Partial<PropsWithDefault>, PropsRequired, PropsOptional {}\nexport interface InternalTypescriptProps extends PropsWithDefault, PropsRequired, PropsOptional {}\n\nexport interface FilterProps {\n column: TypescriptColumn;\n ctx: TypescriptContext;\n onFiltersChange?: (filters: DataTableFilter[]) => void;\n onValueChange: (type: string, value: any) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, newState: any) => void;\n patchHeader: (headerId: string, newHeader: any) => void;\n filterValue?: any;\n reduxHeader?: any;\n innerRef: MutableRefObject<HTMLDivElement | null>;\n}\n\nexport type TypescriptContext = {\n tableProps: InternalTypescriptProps;\n columnHeaderRef: React.RefObject<HTMLDivElement>;\n virtualListRef: React.RefObject<HTMLDivElement>;\n flattenedData: InternalTypescriptRow[];\n allDataFlattened: InternalTypescriptRow[];\n visibleColumns: InternalTypescriptColumn[];\n virtualListHelpers: ReturnType<typeof useVirtual>;\n layoutHelpers: {\n totalColumnsWidth: number | string;\n gridLayout: string[];\n setGridLayout: React.Dispatch<React.SetStateAction<string[]>>;\n };\n paginationHelpers: TypescriptPagination;\n drilldownRowId: string | null;\n setDrilldownRowId: React.Dispatch<React.SetStateAction<string | null>>;\n focusedRowId: string | null;\n setFocusedRowId: React.Dispatch<React.SetStateAction<string | null>>;\n reduxHeaders: Record<string, ReduxHeader>;\n patchHeader: (headerId: string, newHeader: ReduxHeader) => void;\n patchHeaderFilterButtonAndMenu: (headerId: string, value: boolean) => void;\n isShiftPressed: boolean;\n setIsShiftPressed: React.Dispatch<React.SetStateAction<boolean>>;\n lastSelected: React.MutableRefObject<number>;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACqChB,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,8CAAA,UAAO,KAAP;AACA,EAAAA,8CAAA,YAAS,KAAT;AACA,EAAAA,8CAAA,WAAQ,KAAR;AACA,EAAAA,8CAAA,YAAS,KAAT;AAJU,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["DropIndicatorPosition"]
|
|
7
7
|
}
|
|
@@ -76,6 +76,7 @@ export declare const DataTable: {
|
|
|
76
76
|
noResultsButtonLabel?: string | undefined;
|
|
77
77
|
noResultsPlaceholder?: import("./types/props.js").TypescriptGenericFunc | undefined;
|
|
78
78
|
onNoResultsButtonClick?: import("./types/props.js").TypescriptGenericFunc | undefined;
|
|
79
|
+
onTableResize?: import("./types/props.js").TypescriptGenericFunc | undefined;
|
|
79
80
|
Pagination?: React.ComponentType<Record<string, never>> | undefined;
|
|
80
81
|
};
|
|
81
82
|
displayName: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { InternalTypescriptProps } from '../types/props.js';
|
|
3
|
+
export type UseTableResizeCb = (config: {
|
|
4
|
+
virtualListRef: React.RefObject<HTMLElement>;
|
|
5
|
+
internalProps: InternalTypescriptProps;
|
|
6
|
+
}) => void;
|
|
7
|
+
export declare const useTableResizeCb: UseTableResizeCb;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { FilterBarDropdownMenu } from './FilterBarDropdownMenu.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export { applyOutOfTheBoxFilters } from './applyOutOfTheBoxFilters.js';
|
|
2
|
+
export { singleDateFilterFn } from './singleDateFilterFn.js';
|
|
3
|
+
export { singleSelectFilterFn } from './singleSelectFilterFn.js';
|
|
4
|
+
export { multiSelectFilterFn } from './multiSelectFilterFn.js';
|
|
5
|
+
export { numberRangeFilterFn } from './numberRangeFilterFn.js';
|
|
6
|
+
export { currencyRangeFilterFn } from './currencyRangeFilterFn.js';
|
|
7
|
+
export { dateRangeFilterFn } from './dateRangeFilterFn.js';
|
|
@@ -2,7 +2,7 @@ export { FilterPopover } from './FilterPopover/index.js';
|
|
|
2
2
|
export { EditableCell } from './EditableCell.js';
|
|
3
3
|
export { Toolbar } from './Toolbar/index.js';
|
|
4
4
|
export { groupBy } from './groupBy.js';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export { FILTER_TYPES } from './FilterTypes.js';
|
|
6
|
+
export { ROW_VARIANTS, ROW_VARIANT_KEY, ROW_VARIANT_COMPACT_KEY } from './RowVariants.js';
|
|
7
|
+
export { applyOutOfTheBoxFilters, singleDateFilterFn, singleSelectFilterFn, multiSelectFilterFn, numberRangeFilterFn, currencyRangeFilterFn, dateRangeFilterFn, } from './Filters/index.js';
|
|
8
|
+
export { FilterBarDropdownMenu } from './FilterBar/index.js';
|
|
@@ -222,6 +222,7 @@ interface PropsOptional {
|
|
|
222
222
|
noResultsButtonLabel?: string;
|
|
223
223
|
noResultsPlaceholder?: TypescriptGenericFunc;
|
|
224
224
|
onNoResultsButtonClick?: TypescriptGenericFunc;
|
|
225
|
+
onTableResize?: TypescriptGenericFunc;
|
|
225
226
|
Pagination?: React.ComponentType<Record<string, never>>;
|
|
226
227
|
}
|
|
227
228
|
export interface TypescriptProps extends Partial<PropsWithDefault>, PropsRequired, PropsOptional {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-data-table",
|
|
3
|
-
"version": "3.17.0-next.
|
|
3
|
+
"version": "3.17.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Data Table",
|
|
6
6
|
"files": [
|
|
@@ -571,26 +571,26 @@
|
|
|
571
571
|
"indent": 4
|
|
572
572
|
},
|
|
573
573
|
"dependencies": {
|
|
574
|
-
"@elliemae/ds-button": "3.17.0-next.0",
|
|
575
|
-
"@elliemae/ds-circular-progress-indicator": "3.17.0-next.0",
|
|
576
|
-
"@elliemae/ds-controlled-form": "3.17.0-next.0",
|
|
577
|
-
"@elliemae/ds-drag-and-drop": "3.17.0-next.0",
|
|
578
|
-
"@elliemae/ds-dropdownmenu": "3.17.0-next.0",
|
|
579
|
-
"@elliemae/ds-form": "3.17.0-next.0",
|
|
580
|
-
"@elliemae/ds-form-layout-blocks": "3.17.0-next.0",
|
|
581
|
-
"@elliemae/ds-grid": "3.17.0-next.0",
|
|
582
|
-
"@elliemae/ds-icons": "3.17.0-next.0",
|
|
583
|
-
"@elliemae/ds-pagination": "3.17.0-next.0",
|
|
584
|
-
"@elliemae/ds-pills": "3.17.0-next.0",
|
|
585
|
-
"@elliemae/ds-popperjs": "3.17.0-next.0",
|
|
586
|
-
"@elliemae/ds-props-helpers": "3.17.0-next.0",
|
|
587
|
-
"@elliemae/ds-skeleton": "3.17.0-next.0",
|
|
588
|
-
"@elliemae/ds-system": "3.17.0-next.0",
|
|
589
|
-
"@elliemae/ds-toolbar": "3.17.0-next.0",
|
|
590
|
-
"@elliemae/ds-truncated-tooltip-text": "3.17.0-next.0",
|
|
591
|
-
"@elliemae/ds-utilities": "3.17.0-next.0",
|
|
592
574
|
"react-virtual": "~2.10.4",
|
|
593
|
-
"uid": "~2.0.1"
|
|
575
|
+
"uid": "~2.0.1",
|
|
576
|
+
"@elliemae/ds-button": "3.17.0-next.2",
|
|
577
|
+
"@elliemae/ds-circular-progress-indicator": "3.17.0-next.2",
|
|
578
|
+
"@elliemae/ds-form": "3.17.0-next.2",
|
|
579
|
+
"@elliemae/ds-dropdownmenu": "3.17.0-next.2",
|
|
580
|
+
"@elliemae/ds-controlled-form": "3.17.0-next.2",
|
|
581
|
+
"@elliemae/ds-grid": "3.17.0-next.2",
|
|
582
|
+
"@elliemae/ds-icons": "3.17.0-next.2",
|
|
583
|
+
"@elliemae/ds-drag-and-drop": "3.17.0-next.2",
|
|
584
|
+
"@elliemae/ds-pagination": "3.17.0-next.2",
|
|
585
|
+
"@elliemae/ds-pills": "3.17.0-next.2",
|
|
586
|
+
"@elliemae/ds-popperjs": "3.17.0-next.2",
|
|
587
|
+
"@elliemae/ds-props-helpers": "3.17.0-next.2",
|
|
588
|
+
"@elliemae/ds-system": "3.17.0-next.2",
|
|
589
|
+
"@elliemae/ds-truncated-tooltip-text": "3.17.0-next.2",
|
|
590
|
+
"@elliemae/ds-utilities": "3.17.0-next.2",
|
|
591
|
+
"@elliemae/ds-form-layout-blocks": "3.17.0-next.2",
|
|
592
|
+
"@elliemae/ds-skeleton": "3.17.0-next.2",
|
|
593
|
+
"@elliemae/ds-toolbar": "3.17.0-next.2"
|
|
594
594
|
},
|
|
595
595
|
"devDependencies": {
|
|
596
596
|
"@testing-library/react": "~12.1.3",
|