@kingteza/crud-component 1.12.0 → 1.13.1
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
CHANGED
|
@@ -16,6 +16,16 @@ This library has the following peer dependencies that need to be installed:
|
|
|
16
16
|
npm install antd@^5.22.6 react@^18.3.1 react-dom@^18.3.1 react-router-dom@^7.0.0
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## CSS Styles
|
|
20
|
+
|
|
21
|
+
**Important:** You need to import the CSS styles manually in your application entry point:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import '@kingteza/crud-component/styles';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This should be imported once at the root of your application (e.g., in your `main.tsx`, `index.tsx`, or `App.tsx` file).
|
|
28
|
+
|
|
19
29
|
## Setup
|
|
20
30
|
|
|
21
31
|
### Option 1: Using CrudComponentProvider (Recommended)
|
|
@@ -23,6 +33,7 @@ npm install antd@^5.22.6 react@^18.3.1 react-dom@^18.3.1 react-router-dom@^7.0.0
|
|
|
23
33
|
Wrap your app with `CrudComponentProvider` to automatically initialize the library:
|
|
24
34
|
|
|
25
35
|
```typescript
|
|
36
|
+
import '@kingteza/crud-component/styles';
|
|
26
37
|
import { CrudComponentProvider } from '@kingteza/crud-component';
|
|
27
38
|
|
|
28
39
|
function App() {
|
|
@@ -66,6 +77,7 @@ function App() {
|
|
|
66
77
|
If you prefer to initialize manually, you can still use `setupI18n()`:
|
|
67
78
|
|
|
68
79
|
```typescript
|
|
80
|
+
import '@kingteza/crud-component/styles';
|
|
69
81
|
import { setupI18n } from '@kingteza/crud-component';
|
|
70
82
|
|
|
71
83
|
// Basic setup with default English translations
|
|
@@ -88,6 +100,7 @@ setupI18n({
|
|
|
88
100
|
### Usage
|
|
89
101
|
|
|
90
102
|
```typescript
|
|
103
|
+
import '@kingteza/crud-component/styles';
|
|
91
104
|
import { CrudComponentProvider, CrudComponent } from '@kingteza/crud-component';
|
|
92
105
|
import { Button } from '@kingteza/crud-component/common';
|
|
93
106
|
|
|
@@ -115,6 +128,9 @@ function App() {
|
|
|
115
128
|
The library provides several entry points for importing components:
|
|
116
129
|
|
|
117
130
|
```typescript
|
|
131
|
+
// CSS styles (required - import once at your app entry point)
|
|
132
|
+
import '@kingteza/crud-component/styles';
|
|
133
|
+
|
|
118
134
|
// Main CRUD component
|
|
119
135
|
import { CrudComponent } from '@kingteza/crud-component';
|
|
120
136
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),e=require("react"),u=require("../locale/index.cjs.js"),s=e.createContext({}),t=({children:r,i18nOptions:o})=>(e.useEffect(()=>{u.setupI18n(o||{})},[]),n.jsx(s.Provider,{value:{},children:r}));exports.CrudComponentProvider=t;exports.default=t;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as e, createContext as
|
|
3
|
-
import { setupI18n as
|
|
4
|
-
|
|
5
|
-
const p = m({}), a = ({
|
|
2
|
+
import { useEffect as e, createContext as n } from "react";
|
|
3
|
+
import { setupI18n as m } from "../locale/index.es.js";
|
|
4
|
+
const f = n({}), i = ({
|
|
6
5
|
children: t,
|
|
7
6
|
i18nOptions: o
|
|
8
7
|
}) => (e(() => {
|
|
9
|
-
|
|
10
|
-
}, []), /* @__PURE__ */ r(
|
|
8
|
+
m(o || {});
|
|
9
|
+
}, []), /* @__PURE__ */ r(f.Provider, { value: {}, children: t }));
|
|
11
10
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
i as CrudComponentProvider,
|
|
12
|
+
i as default
|
|
14
13
|
};
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const t=require("./locale/hooks/translation-constants.cjs.js"),u=require("./locale/index.cjs.js"),C=require("./crud/CrudComponent.cjs.js"),r=require("./crud/CrudField.cjs.js"),n=require("./crud/CrudFormWizard.cjs.js"),i=require("./crud/CrudReportComponent.cjs.js"),l=require("./crud/CrudSearchComponent.cjs.js"),e=require("./crud/ImageCrudField.cjs.js"),o=require("./crud/FileCrudField.cjs.js"),a=require("./crud/CrudTextAreaComponent.cjs.js"),s=require("./crud/import/CrudImportComponent.cjs.js"),m=require("./crud/import/CrudImportButton.cjs.js"),p=require("./crud/actions/index.cjs.js"),c=require("./crud/view/CrudViewer.cjs.js"),F=require("./context/CrudComponentProvider.cjs.js"),d=require("./crud/CrudForm.cjs.js"),q=require("./crud/modal/index.cjs.js"),V=require("./crud/view/CrudDecListView.cjs.js"),I=require("./crud/view/CrudViewerUtil.cjs.js");exports.TRANSLATION_NAMESPACE=t.TRANSLATION_NAMESPACE;exports.setupI18n=u.setupI18n;exports.updateTranslations=u.updateTranslations;exports.CrudComponent=C;exports.ColorCrudFieldComponent=r.ColorCrudFieldComponent;exports.CrudField=r.default;exports.SelectCrudFieldComponent=r.SelectCrudFieldComponent;exports.CrudFormWizard=n;exports.CrudReportComponent=i;exports.CrudSearchComponent=l;exports.FileDownloadProvider=e.FileDownloadProvider;exports.FileUploadProvider=e.FileUploadProvider;exports.ImageCellValue=e.ImageCellValue;exports.ImageCrudCellValue=e.ImageCrudCellValue;exports.ImageCrudField=e.default;exports.FileCellValue=o.FileCellValue;exports.FileCrudCellValue=o.FileCrudCellValue;exports.FileCrudField=o.default;exports.CrudTextAreaComponent=a;exports.CrudImportComponent=s;exports.CrudImportButton=m;exports.CrudActions=p;exports.CrudViewer=c;exports.CrudComponentProvider=F.CrudComponentProvider;exports.CrudForm=d.CrudForm;exports.CrudFormFields=d.CrudFormFields;exports.CrudModal=q;exports.CrudDecListView=V.CrudDecListView;exports.getRendererValueCrudViewer=I.getRendererValueCrudViewer;
|
package/dist/index.es.js
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { TRANSLATION_NAMESPACE as t } from "./locale/hooks/translation-constants.es.js";
|
|
3
|
+
import { setupI18n as a, updateTranslations as l } from "./locale/index.es.js";
|
|
4
|
+
import { default as m } from "./crud/CrudComponent.es.js";
|
|
5
|
+
import { ColorCrudFieldComponent as p, default as f, SelectCrudFieldComponent as n } from "./crud/CrudField.es.js";
|
|
6
|
+
import { default as x } from "./crud/CrudFormWizard.es.js";
|
|
7
|
+
import { default as F } from "./crud/CrudReportComponent.es.js";
|
|
8
|
+
import { default as I } from "./crud/CrudSearchComponent.es.js";
|
|
9
|
+
import { FileDownloadProvider as c, FileUploadProvider as g, ImageCellValue as w, ImageCrudCellValue as P, default as S } from "./crud/ImageCrudField.es.js";
|
|
10
|
+
import { FileCellValue as v, FileCrudCellValue as N, default as R } from "./crud/FileCrudField.es.js";
|
|
11
|
+
import { default as E } from "./crud/CrudTextAreaComponent.es.js";
|
|
12
|
+
import { default as M } from "./crud/import/CrudImportComponent.es.js";
|
|
13
|
+
import { default as z } from "./crud/import/CrudImportButton.es.js";
|
|
14
|
+
import { default as O } from "./crud/actions/index.es.js";
|
|
15
|
+
import { default as W } from "./crud/view/CrudViewer.es.js";
|
|
16
|
+
import { CrudComponentProvider as b } from "./context/CrudComponentProvider.es.js";
|
|
17
|
+
import { CrudForm as k, CrudFormFields as q } from "./crud/CrudForm.es.js";
|
|
18
|
+
import { default as G } from "./crud/modal/index.es.js";
|
|
19
|
+
import { CrudDecListView as J } from "./crud/view/CrudDecListView.es.js";
|
|
20
|
+
import { getRendererValueCrudViewer as Q } from "./crud/view/CrudViewerUtil.es.js";
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
p as ColorCrudFieldComponent,
|
|
23
|
+
O as CrudActions,
|
|
24
|
+
m as CrudComponent,
|
|
25
|
+
b as CrudComponentProvider,
|
|
26
|
+
J as CrudDecListView,
|
|
27
|
+
f as CrudField,
|
|
28
|
+
k as CrudForm,
|
|
29
|
+
q as CrudFormFields,
|
|
30
|
+
x as CrudFormWizard,
|
|
31
|
+
z as CrudImportButton,
|
|
32
|
+
M as CrudImportComponent,
|
|
33
|
+
G as CrudModal,
|
|
34
|
+
F as CrudReportComponent,
|
|
35
|
+
I as CrudSearchComponent,
|
|
36
|
+
E as CrudTextAreaComponent,
|
|
37
|
+
W as CrudViewer,
|
|
38
|
+
v as FileCellValue,
|
|
39
|
+
N as FileCrudCellValue,
|
|
40
|
+
R as FileCrudField,
|
|
41
|
+
c as FileDownloadProvider,
|
|
42
|
+
g as FileUploadProvider,
|
|
43
|
+
w as ImageCellValue,
|
|
44
|
+
P as ImageCrudCellValue,
|
|
45
|
+
S as ImageCrudField,
|
|
46
|
+
n as SelectCrudFieldComponent,
|
|
47
|
+
t as TRANSLATION_NAMESPACE,
|
|
48
|
+
Q as getRendererValueCrudViewer,
|
|
49
|
+
a as setupI18n,
|
|
50
|
+
l as updateTranslations
|
|
50
51
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingteza/crud-component",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.13.1",
|
|
5
5
|
"description": "React CRUD component library with Ant Design",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
"package.json"
|
|
25
25
|
],
|
|
26
26
|
"type": "module",
|
|
27
|
-
"sideEffects":
|
|
27
|
+
"sideEffects": [
|
|
28
|
+
"**/*.css",
|
|
29
|
+
"**/*.scss"
|
|
30
|
+
],
|
|
31
|
+
"style": "./dist/style.css",
|
|
28
32
|
"exports": {
|
|
29
33
|
".": {
|
|
30
34
|
"types": "./dist/index.d.ts",
|
|
@@ -40,7 +44,9 @@
|
|
|
40
44
|
"types": "./dist/util/index.d.ts",
|
|
41
45
|
"import": "./dist/util/index.es.js",
|
|
42
46
|
"require": "./dist/util/index.cjs.js"
|
|
43
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"./style.css": "./dist/style.css",
|
|
49
|
+
"./styles": "./dist/style.css"
|
|
44
50
|
},
|
|
45
51
|
"publishConfig": {
|
|
46
52
|
"access": "public"
|
|
File without changes
|