drf-react-by-schema 0.24.2 → 0.24.3

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.
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { GridActionsCellItemProps } from '@mui/x-data-grid';
3
+ import { LinkComponentType } from '../../@types';
4
+ /**
5
+ * A type-safe wrapper for GridActionsCellItem that properly handles custom props
6
+ * for link components (like React Router's Link).
7
+ *
8
+ * This component solves the TypeScript issue where GridActionsCellItem doesn't
9
+ * natively accept custom props like 'to' and 'state' that are needed for routing.
10
+ */
11
+ interface GridActionsCellItemLinkProps extends Omit<GridActionsCellItemProps, 'component'> {
12
+ component: LinkComponentType;
13
+ to: string | object;
14
+ state?: object;
15
+ }
16
+ export declare const GridActionsCellItemLink: React.FC<GridActionsCellItemLinkProps>;
17
+ export {};
18
+ //# sourceMappingURL=GridActionsCellItemLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridActionsCellItemLink.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/GridActionsCellItemLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;GAMG;AAEH,UAAU,4BAA6B,SAAQ,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC;IACtF,SAAS,EAAE,iBAAiB,CAAC;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAa1E,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.GridActionsCellItemLink = void 0;
18
+ const react_1 = __importDefault(require("react"));
19
+ const x_data_grid_1 = require("@mui/x-data-grid");
20
+ const GridActionsCellItemLink = (_a) => {
21
+ var { component, to, state } = _a, rest = __rest(_a, ["component", "to", "state"]);
22
+ return (react_1.default.createElement(x_data_grid_1.GridActionsCellItem, Object.assign({}, rest, { component: component }, { to, state })));
23
+ };
24
+ exports.GridActionsCellItemLink = GridActionsCellItemLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drf-react-by-schema",
3
- "version": "0.24.2",
3
+ "version": "0.24.3",
4
4
  "description": "Components and Tools for building a React App having Django Rest Framework (DRF) as server",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",