From 36d5b5e7d88137f94d838f4393eb404bac98ba6e Mon Sep 17 00:00:00 2001 From: James Tattersall <10601770+jamerst@users.noreply.github.com> Date: Mon, 14 Feb 2022 20:41:06 +0000 Subject: [PATCH] Optimise bundle size - remove odata and ramda Add requestOptions prop --- README.md | 3 +- packages/.eslintrc.json | 5 ++ packages/base/components/ODataGridBase.tsx | 47 +++++------ packages/base/hooks.ts | 12 +-- packages/base/types.ts | 3 +- packages/o-data-grid-pro/README.md | 3 +- packages/o-data-grid-pro/dev/App.tsx | 6 +- packages/o-data-grid-pro/package.json | 5 +- packages/o-data-grid-pro/pnpm-lock.yaml | 82 ++++++++++++++++++ packages/o-data-grid/README.md | 3 +- packages/o-data-grid/dev/App.tsx | 4 +- packages/o-data-grid/package.json | 5 +- packages/o-data-grid/pnpm-lock.yaml | 98 ---------------------- packages/package.json | 2 - packages/pnpm-lock.yaml | 89 -------------------- packages/webpack.o-data-grid-pro.config.js | 6 +- 16 files changed, 135 insertions(+), 238 deletions(-) create mode 100644 packages/o-data-grid-pro/pnpm-lock.yaml diff --git a/README.md b/README.md index edce075..8af74ed 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ODataGrid ODataGrid is an extension to the [MUI DataGrid](https://github.com/mui-org/material-ui-x) React component which implements features such as sorting, pagination, column selection, and filtering using the [OData Standard](https://www.odata.org/). This allows you to quickly create a powerful interface for browsing data with minimal back-end code. -![ODataGrid in action](images/o-data-grid.png) +![ODataGrid in action](https://raw.githubusercontent.com/jamerst/o-data-grid/main/images/o-data-grid.png) ## Features - Supports DataGrid and DataGridPro @@ -81,6 +81,7 @@ _* = required property_ | `disableHistory` | `boolean` | | Disable the browser history integration for sorting and pagination if set to `true`.
**Note: this does not disable history integration for the filter builder.** | | `$filter` | `string` | | Static value to use for the `$filter` clause of the query.

**Note: this also has the effect of setting `disableFilterBuilder` to `true`**. | | `filterBuilderProps` | [`FilterBuilderProps`](#FilterBuilderProps) | | Props to be passed to the FilterBuilder. | +| `requestOptions` | `RequestInit` | | Options to use in `fetch()` call to OData endpoint. | ### ODataGridColDef The column definition is again similar to the standard [GridColDef](https://mui.com/components/data-grid/columns/). diff --git a/packages/.eslintrc.json b/packages/.eslintrc.json index 8c3d04b..99e9b76 100644 --- a/packages/.eslintrc.json +++ b/packages/.eslintrc.json @@ -28,5 +28,10 @@ "react/prop-types": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off" + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/packages/base/components/ODataGridBase.tsx b/packages/base/components/ODataGridBase.tsx index 55f6e93..f44bbc0 100644 --- a/packages/base/components/ODataGridBase.tsx +++ b/packages/base/components/ODataGridBase.tsx @@ -1,6 +1,5 @@ import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react" import { Box } from "@mui/system"; -import { o, OdataQuery } from "odata" import { ResponsiveValues, useResponsive } from "../hooks"; @@ -86,40 +85,37 @@ const ODataGridBase = ExpandToQuery(e)).join(","); - const $top = pageSize; - const $skip = pageNumber * pageSize; - - const query: OdataQuery = { - $select, - $expand, - $top, - $skip, - $count: fetchCount.current, - ...queryString + const query = new URLSearchParams(); + query.append("$select", Array.from(fields).join(",")); + query.append("$expand", expands.map(e => ExpandToQuery(e)).join(",")); + query.append("$top", pageSize.toString()); + query.append("$skip", (pageNumber * pageSize).toString()); + + if (fetchCount.current) { + query.append("$count", "true"); + } + + if (queryString) { + for (const key in queryString) { + query.append(key, queryString[key]); + } } if (filter) { - query.$filter = filter; + query.append("$filter", filter); } else if (props.$filter) { - query.$filter = props.$filter; + query.append("$filter", props.$filter); } if (sortModel && sortModel.length > 0) { - query.$orderby = sortModel.map(s => { + query.append("$orderby", sortModel.map(s => { const sortCol = props.columns.find(c => c.field === s.field); return `${sortCol!.sortField ?? sortCol!.field}${s.sort === "desc" ? " desc" : ""}`; - }).join(","); + }).join(",")); } - const rawResponse = await o(props.url) - .get() - .fetch(query); - - const response = rawResponse as Response; - - if (response?.ok ?? false) { + const response = await fetch(props.url + "?" + query.toString(), props.requestOptions); + if (response.ok) { const data = await response.json() as ODataResponse; // flatten object so that the DataGrid can access all the properties @@ -151,7 +147,8 @@ const ODataGridBase = = Partial> @@ -10,11 +9,12 @@ export const useResponsive = () => { const matches = useBreakpoints(); return function

(responsiveValues: ResponsiveValues

) { - const match = findLast( - (breakpoint) => - matches[breakpoint]! && responsiveValues[breakpoint] != null, - theme.breakpoints.keys - ) + let match: Breakpoint | undefined; + theme.breakpoints.keys.forEach((breakpoint) => { + if (matches[breakpoint] && responsiveValues[breakpoint] != null) { + match = breakpoint; + } + }) return match && responsiveValues[match] } diff --git a/packages/base/types.ts b/packages/base/types.ts index 7822daa..a3e133d 100644 --- a/packages/base/types.ts +++ b/packages/base/types.ts @@ -21,7 +21,8 @@ export type ODataGridBaseProps< disableFilterBuilder?: boolean, disableHistory?: boolean, $filter?: string, - filterBuilderProps?: ExternalBuilderProps + filterBuilderProps?: ExternalBuilderProps, + requestOptions?: RequestInit }; // remove properties which should not be used - these are handled internally or overridden diff --git a/packages/o-data-grid-pro/README.md b/packages/o-data-grid-pro/README.md index 8a96e99..0d8bfdd 100644 --- a/packages/o-data-grid-pro/README.md +++ b/packages/o-data-grid-pro/README.md @@ -1,7 +1,7 @@ # ODataGridPro ODataGrid is an extension to the [MUI DataGrid](https://github.com/mui-org/material-ui-x) React component which implements features such as sorting, pagination, column selection, and filtering using the [OData Standard](https://www.odata.org/). This allows you to quickly create a powerful interface for browsing data with minimal back-end code. -![ODataGrid in action](../../images/o-data-grid.png) +![ODataGrid in action](https://raw.githubusercontent.com/jamerst/o-data-grid/main/images/o-data-grid.png) ## Features - Supports DataGrid and DataGridPro @@ -81,6 +81,7 @@ _* = required property_ | `disableHistory` | `boolean` | | Disable the browser history integration for sorting and pagination if set to `true`.
**Note: this does not disable history integration for the filter builder.** | | `$filter` | `string` | | Static value to use for the `$filter` clause of the query.

**Note: this also has the effect of setting `disableFilterBuilder` to `true`**. | | `filterBuilderProps` | [`FilterBuilderProps`](#FilterBuilderProps) | | Props to be passed to the FilterBuilder. | +| `requestOptions` | `RequestInit` | | Options to use in `fetch()` call to OData endpoint. | ### ODataGridColDef The column definition is again similar to the standard [GridColDef](https://mui.com/components/data-grid/columns/). diff --git a/packages/o-data-grid-pro/dev/App.tsx b/packages/o-data-grid-pro/dev/App.tsx index ba89c92..3d558a5 100644 --- a/packages/o-data-grid-pro/dev/App.tsx +++ b/packages/o-data-grid-pro/dev/App.tsx @@ -24,7 +24,7 @@ const App = () => { row.Id} @@ -87,7 +87,7 @@ const columns: ODataGridColDef[] = [ ), getCustomQueryString: (_, v) => { const filter = v as LocationFilter; - let result: QueryStringCollection = {}; + const result: QueryStringCollection = {}; if (filter.location) { result["location"] = filter.location!; result["distance"] = (filter.distance ?? 15).toString(); @@ -210,7 +210,7 @@ const columns: ODataGridColDef[] = [ const columnVisibility: ODataColumnVisibilityModel = { "Company/Name": { xs: false, md: true }, "Salary": { xs: false, lg: true }, - "Status": true, + "Status": false, "JobCategories": { xs: false, xl: true }, "Source/DisplayName": true, "Posted": { xs: false, sm: true }, diff --git a/packages/o-data-grid-pro/package.json b/packages/o-data-grid-pro/package.json index 8fd3774..d7e9f80 100644 --- a/packages/o-data-grid-pro/package.json +++ b/packages/o-data-grid-pro/package.json @@ -1,10 +1,11 @@ { "name": "o-data-grid-pro", - "version": "1.0.0", + "version": "1.0.1", "description": "A React Data Grid and Query Builder for OData APIs. Based on the Material-UI DataGridPro.", "main": "build/o-data-grid-pro-cjs.js", "module": "build/o-data-grid-pro-esm.js", "types": "build/o-data-grid-pro.d.ts", + "sideEffects": false, "scripts": { "build": "cd ../ && node_modules/.bin/rollup -c ./rollup.o-data-grid-pro.config.js", "start": "cd ../ && node_modules/.bin/webpack-dev-server --mode development --open --hot -c ./webpack.o-data-grid-pro.config.js", @@ -45,8 +46,6 @@ }, "dependencies": { "immutable": "^4.0.0", - "odata": "^1.3.1", - "ramda": "^0.27.1", "recoil": "^0.5.2", "tss-react": "^3.2.4", "uuid": "^8.3.2" diff --git a/packages/o-data-grid-pro/pnpm-lock.yaml b/packages/o-data-grid-pro/pnpm-lock.yaml new file mode 100644 index 0000000..ea37d00 --- /dev/null +++ b/packages/o-data-grid-pro/pnpm-lock.yaml @@ -0,0 +1,82 @@ +lockfileVersion: 5.3 + +specifiers: + immutable: ^4.0.0 + recoil: ^0.5.2 + tss-react: ^3.2.4 + uuid: ^8.3.2 + +dependencies: + immutable: 4.0.0 + recoil: 0.5.2 + tss-react: 3.4.1 + uuid: 8.3.2 + +packages: + + /@emotion/hash/0.8.0: + resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} + dev: false + + /@emotion/memoize/0.7.5: + resolution: {integrity: sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==} + dev: false + + /@emotion/serialize/1.0.2: + resolution: {integrity: sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==} + dependencies: + '@emotion/hash': 0.8.0 + '@emotion/memoize': 0.7.5 + '@emotion/unitless': 0.7.5 + '@emotion/utils': 1.0.0 + csstype: 3.0.10 + dev: false + + /@emotion/unitless/0.7.5: + resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} + dev: false + + /@emotion/utils/1.0.0: + resolution: {integrity: sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==} + dev: false + + /csstype/3.0.10: + resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} + dev: false + + /hamt_plus/1.0.2: + resolution: {integrity: sha1-4hwlKWjH4zsg9qGwlM2FeHomVgE=} + dev: false + + /immutable/4.0.0: + resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==} + dev: false + + /recoil/0.5.2: + resolution: {integrity: sha512-Edibzpu3dbUMLy6QRg73WL8dvMl9Xqhp+kU+f2sJtXxsaXvAlxU/GcnDE8HXPkprXrhHF2e6SZozptNvjNF5fw==} + peerDependencies: + react: '>=16.13.1' + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + hamt_plus: 1.0.2 + dev: false + + /tss-react/3.4.1: + resolution: {integrity: sha512-S/OA9+8wBatj5B7JoWaz3K07dVY7UjPDwong0IZwOtqLUjTgJuT4GTrs7hxurq/cvF6DzPLv9HI754Aw1p3lqA==} + peerDependencies: + '@emotion/react': ^11.4.1 + dependencies: + '@emotion/serialize': 1.0.2 + '@emotion/utils': 1.0.0 + dev: false + + /uuid/8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + dev: false diff --git a/packages/o-data-grid/README.md b/packages/o-data-grid/README.md index 94a922f..8af74ed 100644 --- a/packages/o-data-grid/README.md +++ b/packages/o-data-grid/README.md @@ -1,7 +1,7 @@ # ODataGrid ODataGrid is an extension to the [MUI DataGrid](https://github.com/mui-org/material-ui-x) React component which implements features such as sorting, pagination, column selection, and filtering using the [OData Standard](https://www.odata.org/). This allows you to quickly create a powerful interface for browsing data with minimal back-end code. -![ODataGrid in action](../../images/o-data-grid.png) +![ODataGrid in action](https://raw.githubusercontent.com/jamerst/o-data-grid/main/images/o-data-grid.png) ## Features - Supports DataGrid and DataGridPro @@ -81,6 +81,7 @@ _* = required property_ | `disableHistory` | `boolean` | | Disable the browser history integration for sorting and pagination if set to `true`.
**Note: this does not disable history integration for the filter builder.** | | `$filter` | `string` | | Static value to use for the `$filter` clause of the query.

**Note: this also has the effect of setting `disableFilterBuilder` to `true`**. | | `filterBuilderProps` | [`FilterBuilderProps`](#FilterBuilderProps) | | Props to be passed to the FilterBuilder. | +| `requestOptions` | `RequestInit` | | Options to use in `fetch()` call to OData endpoint. | ### ODataGridColDef The column definition is again similar to the standard [GridColDef](https://mui.com/components/data-grid/columns/). diff --git a/packages/o-data-grid/dev/App.tsx b/packages/o-data-grid/dev/App.tsx index 98c1c13..a7f0f03 100644 --- a/packages/o-data-grid/dev/App.tsx +++ b/packages/o-data-grid/dev/App.tsx @@ -1,7 +1,7 @@ import React from "react" import { CssBaseline, Typography, Grid, TextField, Slider, Chip } from "@mui/material"; import { createTheme, ThemeProvider } from "@mui/material/styles"; -import { GridSortModel, GridOverlay } from "@mui/x-data-grid" +import { GridSortModel } from "@mui/x-data-grid" import { ODataGridColDef, QueryStringCollection, ODataColumnVisibilityModel } from "../src/index"; import ODataGrid from "../src/ODataGrid"; import { CacheProvider } from "@emotion/react"; @@ -87,7 +87,7 @@ const columns: ODataGridColDef[] = [ ), getCustomQueryString: (_, v) => { const filter = v as LocationFilter; - let result: QueryStringCollection = {}; + const result: QueryStringCollection = {}; if (filter.location) { result["location"] = filter.location!; result["distance"] = (filter.distance ?? 15).toString(); diff --git a/packages/o-data-grid/package.json b/packages/o-data-grid/package.json index e5ae675..f314245 100644 --- a/packages/o-data-grid/package.json +++ b/packages/o-data-grid/package.json @@ -1,10 +1,11 @@ { "name": "o-data-grid", - "version": "1.0.0", + "version": "1.0.1", "description": "A React Data Grid and Query Builder for OData APIs. Based on the Material-UI DataGrid.", "main": "build/o-data-grid-cjs.js", "module": "build/o-data-grid-esm.js", "types": "build/o-data-grid.d.ts", + "sideEffects": false, "scripts": { "build": "cd ../ && node_modules/.bin/rollup -c ./rollup.o-data-grid.config.js", "start": "cd ../ && node_modules/.bin/webpack-dev-server --mode development --open --hot -c ./webpack.o-data-grid.config.js", @@ -45,8 +46,6 @@ }, "dependencies": { "immutable": "^4.0.0", - "odata": "^1.3.1", - "ramda": "^0.27.1", "recoil": "^0.5.2", "tss-react": "^3.2.4", "uuid": "^8.3.2" diff --git a/packages/o-data-grid/pnpm-lock.yaml b/packages/o-data-grid/pnpm-lock.yaml index fae1bf6..ea37d00 100644 --- a/packages/o-data-grid/pnpm-lock.yaml +++ b/packages/o-data-grid/pnpm-lock.yaml @@ -2,16 +2,12 @@ lockfileVersion: 5.3 specifiers: immutable: ^4.0.0 - odata: ^1.3.1 - ramda: ^0.27.1 recoil: ^0.5.2 tss-react: ^3.2.4 uuid: ^8.3.2 dependencies: immutable: 4.0.0 - odata: 1.3.1 - ramda: 0.27.2 recoil: 0.5.2 tss-react: 3.4.1 uuid: 8.3.2 @@ -44,14 +40,6 @@ packages: resolution: {integrity: sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==} dev: false - /cross-fetch/3.1.5: - resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} - dependencies: - node-fetch: 2.6.7 - transitivePeerDependencies: - - encoding - dev: false - /csstype/3.0.10: resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} dev: false @@ -60,51 +48,10 @@ packages: resolution: {integrity: sha1-4hwlKWjH4zsg9qGwlM2FeHomVgE=} dev: false - /hasurl/1.0.0: - resolution: {integrity: sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ==} - engines: {node: '>= 4'} - dev: false - /immutable/4.0.0: resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==} dev: false - /lodash.sortby/4.7.0: - resolution: {integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=} - dev: false - - /node-fetch/2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - - /odata/1.3.1: - resolution: {integrity: sha512-cLhLk4FGPmXtTgjaW79I+VlpBM2+8m3FILwRZyadw6vlJDs5RvujPV2c6iyx5otC/1+SjncqscuZfPKAqKCEmA==} - engines: {node: '>=10.14.2'} - dependencies: - cross-fetch: 3.1.5 - tslib: 1.14.1 - universal-url: 2.0.0 - transitivePeerDependencies: - - encoding - dev: false - - /punycode/2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} - engines: {node: '>=6'} - dev: false - - /ramda/0.27.2: - resolution: {integrity: sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==} - dev: false - /recoil/0.5.2: resolution: {integrity: sha512-Edibzpu3dbUMLy6QRg73WL8dvMl9Xqhp+kU+f2sJtXxsaXvAlxU/GcnDE8HXPkprXrhHF2e6SZozptNvjNF5fw==} peerDependencies: @@ -120,20 +67,6 @@ packages: hamt_plus: 1.0.2 dev: false - /tr46/0.0.3: - resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} - dev: false - - /tr46/1.0.1: - resolution: {integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=} - dependencies: - punycode: 2.1.1 - dev: false - - /tslib/1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: false - /tss-react/3.4.1: resolution: {integrity: sha512-S/OA9+8wBatj5B7JoWaz3K07dVY7UjPDwong0IZwOtqLUjTgJuT4GTrs7hxurq/cvF6DzPLv9HI754Aw1p3lqA==} peerDependencies: @@ -143,38 +76,7 @@ packages: '@emotion/utils': 1.0.0 dev: false - /universal-url/2.0.0: - resolution: {integrity: sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg==} - engines: {node: '>= 6'} - dependencies: - hasurl: 1.0.0 - whatwg-url: 7.1.0 - dev: false - /uuid/8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true dev: false - - /webidl-conversions/3.0.1: - resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} - dev: false - - /webidl-conversions/4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - dev: false - - /whatwg-url/5.0.0: - resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: false - - /whatwg-url/7.1.0: - resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - dev: false diff --git a/packages/package.json b/packages/package.json index 234910e..f92595e 100644 --- a/packages/package.json +++ b/packages/package.json @@ -28,8 +28,6 @@ "eslint-webpack-plugin": "^3.1.1", "html-webpack-plugin": "^5.5.0", "immutable": "^4.0.0", - "odata": "^1.3.1", - "ramda": "^0.28.0", "react": "^17.0.2", "react-dom": "^17.0.2", "recoil": "^0.6.1", diff --git a/packages/pnpm-lock.yaml b/packages/pnpm-lock.yaml index 5cdda1a..dddec36 100644 --- a/packages/pnpm-lock.yaml +++ b/packages/pnpm-lock.yaml @@ -23,8 +23,6 @@ specifiers: eslint-webpack-plugin: ^3.1.1 html-webpack-plugin: ^5.5.0 immutable: ^4.0.0 - odata: ^1.3.1 - ramda: ^0.28.0 react: ^17.0.2 react-dom: ^17.0.2 recoil: ^0.6.1 @@ -64,8 +62,6 @@ devDependencies: eslint-webpack-plugin: 3.1.1_eslint@8.8.0+webpack@5.68.0 html-webpack-plugin: 5.5.0_webpack@5.68.0 immutable: 4.0.0 - odata: 1.3.1 - ramda: 0.28.0 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 recoil: 0.6.1_react-dom@17.0.2+react@17.0.2 @@ -1590,14 +1586,6 @@ packages: yaml: 1.10.2 dev: true - /cross-fetch/3.1.5: - resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} - dependencies: - node-fetch: 2.6.7 - transitivePeerDependencies: - - encoding - dev: true - /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2440,11 +2428,6 @@ packages: function-bind: 1.1.1 dev: true - /hasurl/1.0.0: - resolution: {integrity: sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ==} - engines: {node: '>= 4'} - dev: true - /he/1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -2941,10 +2924,6 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /lodash.sortby/4.7.0: - resolution: {integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=} - dev: true - /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true @@ -3108,18 +3087,6 @@ packages: tslib: 2.3.1 dev: true - /node-fetch/2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: true - /node-forge/1.2.1: resolution: {integrity: sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==} engines: {node: '>= 6.13.0'} @@ -3217,17 +3184,6 @@ packages: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true - /odata/1.3.1: - resolution: {integrity: sha512-cLhLk4FGPmXtTgjaW79I+VlpBM2+8m3FILwRZyadw6vlJDs5RvujPV2c6iyx5otC/1+SjncqscuZfPKAqKCEmA==} - engines: {node: '>=10.14.2'} - dependencies: - cross-fetch: 3.1.5 - tslib: 1.14.1 - universal-url: 2.0.0 - transitivePeerDependencies: - - encoding - dev: true - /on-finished/2.3.0: resolution: {integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=} engines: {node: '>= 0.8'} @@ -3484,10 +3440,6 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /ramda/0.28.0: - resolution: {integrity: sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==} - dev: true - /randombytes/2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -4200,16 +4152,6 @@ packages: engines: {node: '>=0.6'} dev: true - /tr46/0.0.3: - resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} - dev: true - - /tr46/1.0.1: - resolution: {integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=} - dependencies: - punycode: 2.1.1 - dev: true - /ts-loader/9.2.6_typescript@4.5.5+webpack@5.68.0: resolution: {integrity: sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==} engines: {node: '>=12.0.0'} @@ -4307,14 +4249,6 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /universal-url/2.0.0: - resolution: {integrity: sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg==} - engines: {node: '>= 6'} - dependencies: - hasurl: 1.0.0 - whatwg-url: 7.1.0 - dev: true - /universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -4382,14 +4316,6 @@ packages: minimalistic-assert: 1.0.1 dev: true - /webidl-conversions/3.0.1: - resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} - dev: true - - /webidl-conversions/4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - dev: true - /webpack-cli/4.9.2_19108610e47e80b101fe97b50133aa84: resolution: {integrity: sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==} engines: {node: '>=10.13.0'} @@ -4558,21 +4484,6 @@ packages: engines: {node: '>=0.8.0'} dev: true - /whatwg-url/5.0.0: - resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: true - - /whatwg-url/7.1.0: - resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - dev: true - /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: diff --git a/packages/webpack.o-data-grid-pro.config.js b/packages/webpack.o-data-grid-pro.config.js index 2263086..7af429a 100644 --- a/packages/webpack.o-data-grid-pro.config.js +++ b/packages/webpack.o-data-grid-pro.config.js @@ -2,9 +2,9 @@ const HtmlWebPackPlugin = require("html-webpack-plugin"); module.exports = { mode: "development", - entry: "./o-data-grid/dev/index.tsx", + entry: "./o-data-grid-pro/dev/index.tsx", output: { - path: __dirname + "/o-data-grid/dev-build", + path: __dirname + "/o-data-grid-pro/dev-build", filename: "bundle.js" }, module: { @@ -20,7 +20,7 @@ module.exports = { }, plugins: [ new HtmlWebPackPlugin({ - template: "./o-data-grid/dev/index.html" + template: "./o-data-grid-pro/dev/index.html" }) ] } \ No newline at end of file