xladmin-import-export 0.1.2 → 0.2.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 +7 -2
- package/dist/index.js +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="https://img.shields.io/badge/English-blue?style=for-the-badge" alt="English">
|
|
4
4
|
</a>
|
|
5
5
|
<a href="./docs/README.ru.md">
|
|
6
|
-
<img src="https://img.shields.io/badge/%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9-red?style=for-the-badge" alt="
|
|
6
|
+
<img src="https://img.shields.io/badge/%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9-red?style=for-the-badge" alt="Russian">
|
|
7
7
|
</a>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ Optional frontend extension for `xladmin` that adds import/export actions to mod
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm
|
|
24
|
+
npm install xladmin xladmin-import-export
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Minimal Example
|
|
@@ -53,3 +53,8 @@ npm run test --workspace ./packages/xladmin-import-export
|
|
|
53
53
|
npm run check --workspace ./packages/xladmin-import-export
|
|
54
54
|
npm run build --workspace ./packages/xladmin-import-export
|
|
55
55
|
```
|
|
56
|
+
|
|
57
|
+
## Docs
|
|
58
|
+
|
|
59
|
+
- [npm package](https://www.npmjs.com/package/xladmin-import-export)
|
|
60
|
+
- [Monorepo README](../../../README.md)
|
package/dist/index.js
CHANGED
|
@@ -267,7 +267,7 @@ function ModelImportExportActions({ client, context }) {
|
|
|
267
267
|
}
|
|
268
268
|
const exportCount = context.selectionCount > 0 ? context.selectionCount : context.total;
|
|
269
269
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
270
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [
|
|
270
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, sx: { alignItems: "center" }, children: [
|
|
271
271
|
/* @__PURE__ */ jsx(Tooltip, { title: messages.exportButton, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setExportOpen(true), disabled: Boolean(error), children: /* @__PURE__ */ jsx(DownloadIcon, { fontSize: "small" }) }) }) }),
|
|
272
272
|
/* @__PURE__ */ jsx(Tooltip, { title: messages.importButton, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setImportOpen(true), disabled: Boolean(error), children: /* @__PURE__ */ jsx(UploadIcon, { fontSize: "small" }) }) }) })
|
|
273
273
|
] }),
|
|
@@ -413,7 +413,7 @@ function ModelImportExportActions({ client, context }) {
|
|
|
413
413
|
noneLabel: messages.clearFields
|
|
414
414
|
}
|
|
415
415
|
),
|
|
416
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
416
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, sx: { alignItems: "center" }, children: [
|
|
417
417
|
/* @__PURE__ */ jsx(
|
|
418
418
|
Button,
|
|
419
419
|
{
|
|
@@ -486,7 +486,7 @@ function FieldsSelector({
|
|
|
486
486
|
noneLabel
|
|
487
487
|
}) {
|
|
488
488
|
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
489
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
489
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", sx: { justifyContent: "space-between", alignItems: "center" }, children: [
|
|
490
490
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: title }),
|
|
491
491
|
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
492
492
|
/* @__PURE__ */ jsx(Button, { size: "small", onClick: () => onChange(fields.map((field) => field.name)), children: allLabel }),
|
|
@@ -520,7 +520,7 @@ function FieldsSelector({
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
|
-
label: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.75,
|
|
523
|
+
label: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.75, sx: { minHeight: 24, alignItems: "center" }, children: [
|
|
524
524
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { lineHeight: 1.35 }, children: field.label }),
|
|
525
525
|
field.label !== field.name ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", sx: { lineHeight: 1.2 }, children: field.name }) : null
|
|
526
526
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xladmin-import-export",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Optional import/export extension for xladmin.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@emotion/react": ">=11.14.0 <12.0.0",
|
|
40
40
|
"@emotion/styled": ">=11.14.0 <12.0.0",
|
|
41
|
-
"@mui/icons-material": ">=
|
|
42
|
-
"@mui/material": ">=
|
|
41
|
+
"@mui/icons-material": ">=9.0.0 <10.0.0",
|
|
42
|
+
"@mui/material": ">=9.0.0 <10.0.0",
|
|
43
43
|
"axios": ">=1.0.0 <2.0.0",
|
|
44
44
|
"react": ">=19.0.0 <20.0.0",
|
|
45
45
|
"react-dom": ">=19.0.0 <20.0.0",
|