frontend-plus-react 0.2.0 → 0.3.0
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/README.md +24 -0
- package/dist/index.cjs +2061 -1608
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +63 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +95 -24
- package/dist/index.d.ts +95 -24
- package/dist/index.js +1662 -1177
- package/dist/index.js.map +1 -1
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
1
|
# frontend-plus-react
|
|
2
2
|
Librería React genérica para consumir backends implementados en backend-plus
|
|
3
|
+
|
|
4
|
+
Login, menú, grillas editables de cualquier tabla (con sus detalles desplegados dentro de la grilla, como en backend-plus),
|
|
5
|
+
formularios de procedimientos y editor vertical. Cada aplicación aporta solo lo propio:
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { App, GenericDataGrid, WScreenProps } from 'frontend-plus-react';
|
|
9
|
+
import 'frontend-plus-react/dist/index.css';
|
|
10
|
+
|
|
11
|
+
// Una wScreen: recibe como params los fixedFields del detalle (o la query string si se abre como página)
|
|
12
|
+
const Ticket = ({ params }: WScreenProps) => {
|
|
13
|
+
const fixedFields = [{ fieldName: 'proyecto', value: params?.proyecto }, { fieldName: 'ticket', value: params?.ticket }];
|
|
14
|
+
return <GenericDataGrid tableName="anotaciones" fixedFields={fixedFields} anidada />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default () => (
|
|
18
|
+
<App
|
|
19
|
+
myWScreens={{ ticket: Ticket }} // detalles {wScreen: 'ticket'} y /wScreens/ticket
|
|
20
|
+
myConditions={{ noCABA: fila => fila.provincia !== 'CABA' }} // la `condition` de un detalle
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Las variables de entorno `VITE_BACKEND_URL` (o `REACT_APP_BACKEND_URL`) indican dónde está el backend. Ver `CLAUDE.md` para
|
|
26
|
+
las decisiones de diseño y cómo probar con un backend real.
|