Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/09cd68b36d8b4e08db2dd9624415f3d4d81b9ac029efc2ea1fb0625f196502e7.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
4.4 KiB
JSON

{"ast":null,"code":"import * as React from 'react';\nimport { gridPaginationRowRangeSelector, gridPaginatedVisibleSortedGridRowEntriesSelector } from '../features/pagination/gridPaginationSelector';\nimport { gridVisibleSortedRowEntriesSelector } from '../features/filter/gridFilterSelector';\nexport const getVisibleRows = (apiRef, props) => {\n let rows;\n let range;\n if (props.pagination && props.paginationMode === 'client') {\n range = gridPaginationRowRangeSelector(apiRef);\n rows = gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef);\n } else {\n rows = gridVisibleSortedRowEntriesSelector(apiRef);\n if (rows.length === 0) {\n range = null;\n } else {\n range = {\n firstRowIndex: 0,\n lastRowIndex: rows.length - 1\n };\n }\n }\n return {\n rows,\n range\n };\n};\n/**\n * Computes the list of rows that are reachable by scroll.\n * Depending on whether pagination is enabled, it will return the rows in the current page.\n * - If the pagination is disabled or in server mode, it equals all the visible rows.\n * - If the row tree has several layers, it contains up to `state.pageSize` top level rows and all their descendants.\n * - If the row tree is flat, it only contains up to `state.pageSize` rows.\n */\n\nexport const useGridVisibleRows = (apiRef, props) => {\n const response = getVisibleRows(apiRef, props);\n return React.useMemo(() => ({\n rows: response.rows,\n range: response.range\n }), [response.rows, response.range]);\n};","map":{"version":3,"names":["React","gridPaginationRowRangeSelector","gridPaginatedVisibleSortedGridRowEntriesSelector","gridVisibleSortedRowEntriesSelector","getVisibleRows","apiRef","props","rows","range","pagination","paginationMode","length","firstRowIndex","lastRowIndex","useGridVisibleRows","response","useMemo"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/hooks/utils/useGridVisibleRows.js"],"sourcesContent":["import * as React from 'react';\nimport { gridPaginationRowRangeSelector, gridPaginatedVisibleSortedGridRowEntriesSelector } from '../features/pagination/gridPaginationSelector';\nimport { gridVisibleSortedRowEntriesSelector } from '../features/filter/gridFilterSelector';\nexport const getVisibleRows = (apiRef, props) => {\n let rows;\n let range;\n\n if (props.pagination && props.paginationMode === 'client') {\n range = gridPaginationRowRangeSelector(apiRef);\n rows = gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef);\n } else {\n rows = gridVisibleSortedRowEntriesSelector(apiRef);\n\n if (rows.length === 0) {\n range = null;\n } else {\n range = {\n firstRowIndex: 0,\n lastRowIndex: rows.length - 1\n };\n }\n }\n\n return {\n rows,\n range\n };\n};\n/**\n * Computes the list of rows that are reachable by scroll.\n * Depending on whether pagination is enabled, it will return the rows in the current page.\n * - If the pagination is disabled or in server mode, it equals all the visible rows.\n * - If the row tree has several layers, it contains up to `state.pageSize` top level rows and all their descendants.\n * - If the row tree is flat, it only contains up to `state.pageSize` rows.\n */\n\nexport const useGridVisibleRows = (apiRef, props) => {\n const response = getVisibleRows(apiRef, props);\n return React.useMemo(() => ({\n rows: response.rows,\n range: response.range\n }), [response.rows, response.range]);\n};"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,8BAA8B,EAAEC,gDAAgD,QAAQ,+CAA+C;AAChJ,SAASC,mCAAmC,QAAQ,uCAAuC;AAC3F,OAAO,MAAMC,cAAc,GAAGA,CAACC,MAAM,EAAEC,KAAK,KAAK;EAC/C,IAAIC,IAAI;EACR,IAAIC,KAAK;EAET,IAAIF,KAAK,CAACG,UAAU,IAAIH,KAAK,CAACI,cAAc,KAAK,QAAQ,EAAE;IACzDF,KAAK,GAAGP,8BAA8B,CAACI,MAAM,CAAC;IAC9CE,IAAI,GAAGL,gDAAgD,CAACG,MAAM,CAAC;EACjE,CAAC,MAAM;IACLE,IAAI,GAAGJ,mCAAmC,CAACE,MAAM,CAAC;IAElD,IAAIE,IAAI,CAACI,MAAM,KAAK,CAAC,EAAE;MACrBH,KAAK,GAAG,IAAI;IACd,CAAC,MAAM;MACLA,KAAK,GAAG;QACNI,aAAa,EAAE,CAAC;QAChBC,YAAY,EAAEN,IAAI,CAACI,MAAM,GAAG;MAC9B,CAAC;IACH;EACF;EAEA,OAAO;IACLJ,IAAI;IACJC;EACF,CAAC;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMM,kBAAkB,GAAGA,CAACT,MAAM,EAAEC,KAAK,KAAK;EACnD,MAAMS,QAAQ,GAAGX,cAAc,CAACC,MAAM,EAAEC,KAAK,CAAC;EAC9C,OAAON,KAAK,CAACgB,OAAO,CAAC,OAAO;IAC1BT,IAAI,EAAEQ,QAAQ,CAACR,IAAI;IACnBC,KAAK,EAAEO,QAAQ,CAACP;EAClB,CAAC,CAAC,EAAE,CAACO,QAAQ,CAACR,IAAI,EAAEQ,QAAQ,CAACP,KAAK,CAAC,CAAC;AACtC,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}