From 111abefddd6b2fc148d32235548bece1b7f08498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 15:58:37 +0000 Subject: [PATCH 1/2] chore: bump the kendo-dependencies group across 1 directory with 20 updates Bumps the kendo-dependencies group with 20 updates in the /examples/coffee-warehouse-nextjs directory: | Package | From | To | | --- | --- | --- | | [@progress/kendo-react-buttons](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-charts](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-data-tools](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-dateinputs](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-dialogs](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-dropdowns](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-editor](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-excel-export](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-form](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-grid](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-indicators](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-inputs](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-intl](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-layout](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-pdf](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-progressbars](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-scheduler](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-treeview](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-react-upload](https://github.com/telerik/kendo-react) | `10.2.0` | `11.0.0` | | [@progress/kendo-theme-default](https://github.com/telerik/kendo-themes/tree/HEAD/packages/default) | `10.6.0` | `11.0.2` | Updates `@progress/kendo-react-buttons` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-charts` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-data-tools` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-dateinputs` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-dialogs` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-dropdowns` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-editor` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-excel-export` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-form` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-grid` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-indicators` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-inputs` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-intl` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-layout` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-pdf` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-progressbars` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-scheduler` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-treeview` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-react-upload` from 10.2.0 to 11.0.0 - [Commits](https://github.com/telerik/kendo-react/commits) Updates `@progress/kendo-theme-default` from 10.6.0 to 11.0.2 - [Release notes](https://github.com/telerik/kendo-themes/releases) - [Changelog](https://github.com/telerik/kendo-themes/blob/develop/packages/default/CHANGELOG.md) - [Commits](https://github.com/telerik/kendo-themes/commits/v11.0.2/packages/default) --- updated-dependencies: - dependency-name: "@progress/kendo-react-buttons" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-charts" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-data-tools" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-dateinputs" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-dialogs" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-dropdowns" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-editor" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-excel-export" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-form" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-grid" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-indicators" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-inputs" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-intl" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-layout" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-pdf" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-progressbars" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-scheduler" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-treeview" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-react-upload" dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies - dependency-name: "@progress/kendo-theme-default" dependency-version: 11.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: kendo-dependencies ... Signed-off-by: dependabot[bot] --- examples/coffee-warehouse-nextjs/package.json | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/coffee-warehouse-nextjs/package.json b/examples/coffee-warehouse-nextjs/package.json index f540eda2..0a155fef 100644 --- a/examples/coffee-warehouse-nextjs/package.json +++ b/examples/coffee-warehouse-nextjs/package.json @@ -16,26 +16,26 @@ "@progress/kendo-date-math": "^1.5.14", "@progress/kendo-drawing": "^1.21.2", "@progress/kendo-licensing": "^1.5.1", - "@progress/kendo-react-buttons": "^10.0.0", - "@progress/kendo-react-charts": "^10.0.0", - "@progress/kendo-react-data-tools": "^10.0.0", - "@progress/kendo-react-dateinputs": "^10.0.0", - "@progress/kendo-react-dialogs": "^10.0.0", - "@progress/kendo-react-dropdowns": "^10.0.0", - "@progress/kendo-react-editor": "^10.0.0", - "@progress/kendo-react-excel-export": "^10.0.0", - "@progress/kendo-react-form": "^10.0.0", - "@progress/kendo-react-grid": "^10.0.0", - "@progress/kendo-react-indicators": "^10.0.0", - "@progress/kendo-react-inputs": "^10.0.0", - "@progress/kendo-react-intl": "^10.0.0", - "@progress/kendo-react-layout": "^10.0.0", - "@progress/kendo-react-pdf": "^10.0.0", - "@progress/kendo-react-progressbars": "^10.0.0", - "@progress/kendo-react-scheduler": "^10.0.0", - "@progress/kendo-react-treeview": "^10.0.0", - "@progress/kendo-react-upload": "^10.0.0", - "@progress/kendo-theme-default": "^10.3.1", + "@progress/kendo-react-buttons": "^11.0.0", + "@progress/kendo-react-charts": "^11.0.0", + "@progress/kendo-react-data-tools": "^11.0.0", + "@progress/kendo-react-dateinputs": "^11.0.0", + "@progress/kendo-react-dialogs": "^11.0.0", + "@progress/kendo-react-dropdowns": "^11.0.0", + "@progress/kendo-react-editor": "^11.0.0", + "@progress/kendo-react-excel-export": "^11.0.0", + "@progress/kendo-react-form": "^11.0.0", + "@progress/kendo-react-grid": "^11.0.0", + "@progress/kendo-react-indicators": "^11.0.0", + "@progress/kendo-react-inputs": "^11.0.0", + "@progress/kendo-react-intl": "^11.0.0", + "@progress/kendo-react-layout": "^11.0.0", + "@progress/kendo-react-pdf": "^11.0.0", + "@progress/kendo-react-progressbars": "^11.0.0", + "@progress/kendo-react-scheduler": "^11.0.0", + "@progress/kendo-react-treeview": "^11.0.0", + "@progress/kendo-react-upload": "^11.0.0", + "@progress/kendo-theme-default": "^11.0.2", "cldr-core": "44.0.1", "cldr-dates-full": "44.0.1", "cldr-numbers-full": "44.0.1", From c95d5aa40c4994205d21f62607b8822703bf2ed0 Mon Sep 17 00:00:00 2001 From: Silviya Boteva Date: Tue, 3 Jun 2025 13:39:04 +0300 Subject: [PATCH 2/2] chore: update grid props --- .../app/components/Grid.jsx | 170 +++++------------- .../app/styles/_common.scss | 4 +- .../warehouse/dashboard/dashboard-page.jsx | 12 +- examples/coffee-warehouse-nextjs/package.json | 4 +- .../src/components/Grid.jsx | 1 - 5 files changed, 54 insertions(+), 137 deletions(-) diff --git a/examples/coffee-warehouse-nextjs/app/components/Grid.jsx b/examples/coffee-warehouse-nextjs/app/components/Grid.jsx index fd87ee8c..7bd81f7c 100644 --- a/examples/coffee-warehouse-nextjs/app/components/Grid.jsx +++ b/examples/coffee-warehouse-nextjs/app/components/Grid.jsx @@ -12,10 +12,10 @@ import { import { Button } from "@progress/kendo-react-buttons"; import { GridPDFExport } from "@progress/kendo-react-pdf"; import { ExcelExport } from "@progress/kendo-react-excel-export"; -import { process } from "@progress/kendo-data-query"; import { Input } from "@progress/kendo-react-inputs"; import { useLocalization } from "@progress/kendo-react-intl"; import { filePdfIcon, fileExcelIcon } from "@progress/kendo-svg-icons"; +import { filterBy } from '@progress/kendo-data-query'; const noMessage = "message not defined"; export const Column = GridColumn; @@ -30,40 +30,17 @@ export const ColumnMenu = (props) => { }; export const Grid = (props) => { - const { data, onDataChange, ...others } = props; + const { data, onDataChange, defaultFilter, ...others } = props; const excelExportRef = React.useRef(null); const pdfExportRef = React.useRef(null); const [isPdfExporting, setIsPdfExporting] = React.useState(false); - const [take, setTake] = React.useState(10); - const [skip, setSkip] = React.useState(0); - const [sort, setSort] = React.useState([]); - const [group, setGroup] = React.useState([]); - const [filter, setFilter] = React.useState(null); - const lastSelectedIndexRef = React.useRef(0); - const [allColumnFilter, setAllColumnFilter] = React.useState(""); + const [filter, setFilter] = React.useState(defaultFilter); + const filteredData = filterBy(data, filter); + const [select, setSelect] = React.useState({}); const localizationService = useLocalization(); - const dataState = { - take, - skip, - sort, - group, - filter, - }; - - const onDataStateChange = React.useCallback( - (event) => { - setTake(event.dataState.take); - setSkip(event.dataState.skip); - setSort(event.dataState.sort); - setGroup(event.dataState.group); - setFilter(event.dataState.filter); - }, - [setTake, setSkip, setSort, setGroup] - ); - const onExcelExport = React.useCallback(() => { if (excelExportRef.current) { excelExportRef.current.save(); @@ -74,116 +51,64 @@ export const Grid = (props) => { setIsPdfExporting(false); }, []); - const onAllColumnFilterChange = React.useCallback( - (event) => { - setAllColumnFilter(event.value); - }, - [setAllColumnFilter] - ); - - const onSelectionChange = React.useCallback( - (event) => { - let last = lastSelectedIndexRef.current; - const updatedData = data.map((dataItem) => { - return { ...dataItem }; - }); - const current = data.findIndex((dataItem) => dataItem === event.dataItem); - - if (!event.nativeEvent.shiftKey) { - lastSelectedIndexRef.current = last = current; - } - - if (!event.nativeEvent.ctrlKey) { - updatedData.forEach((item) => (item.selected = false)); - } - const select = !event.dataItem.selected; - for (let i = Math.min(last, current); i <= Math.max(last, current); i++) { - updatedData[i].selected = select; - } - - onDataChange(updatedData); - }, - [data, onDataChange] - ); + const onPdfExport = React.useCallback(() => { + if (pdfExportRef.current) { + setIsPdfExporting(true); + pdfExportRef.current.save(data, onPdfExportDone); + } + }, [data, onPdfExportDone]); - const onHeaderSelectionChange = React.useCallback( + const handleFilterChange = React.useCallback( (event) => { - const checked = event.syntheticEvent.target.checked; - const updatedData = data.map((item) => { - return { - ...item, - selected: checked, + let filter = { + logic: 'or', + filters: [ + { field: 'contactName', operator: 'contains', value: event.value }, + { field: 'jobTitle', operator: 'contains', value: event.value }, + { field: 'budget', operator: 'contains', value: event.value }, + { field: 'phone', operator: 'contains', value: event.value }, + { field: 'address', operator: 'contains', value: event.value } + ] }; - }); - - onDataChange(updatedData); + setFilter(filter); }, - [data, onDataChange] + [setFilter] ); - const textColumns = props.children - .map((col) => { - if (col.props.children) { - return col.props.children.map((child) => { - if (!child.props.filter || child.props.filter === "text") { - return child.props.field; - } - return null; - }); - } else if (col.props.field) { - if (!col.props.filter || col.props.filter === "text") { - return col.props.field; - } - } - return null; - }) - .flat() - .filter((field) => field); - - const allColumnsFilters = textColumns.map((column) => ({ - field: column, - operator: "contains", - value: allColumnFilter, - })); - - const allColumnFilteredData = allColumnFilter - ? process(data, { filter: { logic: "or", filters: allColumnsFilters } }) - .data - : data; - - const processedData = process(allColumnFilteredData, dataState); - - React.useEffect(() => { - if (!processedData.data.length) { - setSkip(0); - } - }, [processedData]); + const onSelectionChange = React.useCallback((event) => { + setSelect(event.select); + }, []); - const onPdfExport = React.useCallback(() => { - if (pdfExportRef.current) { - setIsPdfExporting(true); - pdfExportRef.current.save(processedData.data, onPdfExportDone); - } - }, [processedData, onPdfExportDone]); + const onHeaderSelectionChange = React.useCallback((event) => { + setSelect(event.select); + }, []); const GridElement = ( { {localizationService.toLanguageString("custom.exportPdf", noMessage)} - dataItem.selected === false) === -1 - } - /> + {props.children} ); diff --git a/examples/coffee-warehouse-nextjs/app/styles/_common.scss b/examples/coffee-warehouse-nextjs/app/styles/_common.scss index b265958c..6368b7ce 100644 --- a/examples/coffee-warehouse-nextjs/app/styles/_common.scss +++ b/examples/coffee-warehouse-nextjs/app/styles/_common.scss @@ -93,7 +93,7 @@ a { } .card-ranges { - text-align: right; + justify-self: flex-end; grid-column: 2 / 3; grid-row: 1; } @@ -122,7 +122,7 @@ a { } .card-ranges { - text-align: right; + justify-self: flex-end; grid-column: 3 / 4; } diff --git a/examples/coffee-warehouse-nextjs/app/warehouse/dashboard/dashboard-page.jsx b/examples/coffee-warehouse-nextjs/app/warehouse/dashboard/dashboard-page.jsx index 05b61fef..ff4e68b9 100644 --- a/examples/coffee-warehouse-nextjs/app/warehouse/dashboard/dashboard-page.jsx +++ b/examples/coffee-warehouse-nextjs/app/warehouse/dashboard/dashboard-page.jsx @@ -165,7 +165,7 @@ export default function DashBoard(props) { )} columnMenu={ColumnMenu} width={230} - cell={FullNameCell} + cells={{ data: FullNameCell }} /> @@ -213,7 +213,7 @@ export default function DashBoard(props) { )} columnMenu={ColumnMenu} width={110} - cell={RatingCell} + cells={{ data: RatingCell }} filter={"numeric"} /> diff --git a/examples/coffee-warehouse-nextjs/package.json b/examples/coffee-warehouse-nextjs/package.json index 0a155fef..505070be 100644 --- a/examples/coffee-warehouse-nextjs/package.json +++ b/examples/coffee-warehouse-nextjs/package.json @@ -12,10 +12,10 @@ "follow-redirects": ">=1.15.4" }, "dependencies": { - "@progress/kendo-data-query": "^1.7.0", + "@progress/kendo-data-query": "^1.7.1", "@progress/kendo-date-math": "^1.5.14", "@progress/kendo-drawing": "^1.21.2", - "@progress/kendo-licensing": "^1.5.1", + "@progress/kendo-licensing": "^1.6.0", "@progress/kendo-react-buttons": "^11.0.0", "@progress/kendo-react-charts": "^11.0.0", "@progress/kendo-react-data-tools": "^11.0.0", diff --git a/examples/react-coffee-warehouse/src/components/Grid.jsx b/examples/react-coffee-warehouse/src/components/Grid.jsx index e73a124f..e170df33 100644 --- a/examples/react-coffee-warehouse/src/components/Grid.jsx +++ b/examples/react-coffee-warehouse/src/components/Grid.jsx @@ -34,7 +34,6 @@ export const Grid = (props) => { const [select, setSelect] = React.useState({}); const localizationService = useLocalization(); - const onExcelExport = React.useCallback( () => { if (excelExportRef.current) {