@akinon/akitable 0.3.12 → 0.5.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/dist/cjs/akitable.js +1 -1
- package/dist/cjs/components/EditableCell.d.ts.map +1 -1
- package/dist/cjs/components/actions.d.ts.map +1 -1
- package/dist/cjs/components/actions.js +2 -3
- package/dist/cjs/components/datatable.css +12 -14
- package/dist/cjs/components/datatable.d.ts.map +1 -1
- package/dist/cjs/components/datatable.js +1 -1
- package/dist/cjs/components/error.d.ts.map +1 -1
- package/dist/cjs/components/error.js +3 -3
- package/dist/cjs/i18n/index.d.ts +1 -1
- package/dist/cjs/i18n/index.d.ts.map +1 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/akitable.js +1 -1
- package/dist/esm/components/EditableCell.d.ts.map +1 -1
- package/dist/esm/components/actions.d.ts.map +1 -1
- package/dist/esm/components/actions.js +2 -3
- package/dist/esm/components/datatable.css +12 -14
- package/dist/esm/components/datatable.d.ts.map +1 -1
- package/dist/esm/components/datatable.js +1 -1
- package/dist/esm/components/error.d.ts.map +1 -1
- package/dist/esm/components/error.js +3 -3
- package/dist/esm/i18n/index.d.ts +1 -1
- package/dist/esm/i18n/index.d.ts.map +1 -1
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +20 -25
package/dist/cjs/akitable.js
CHANGED
|
@@ -19,7 +19,7 @@ const Akitable = (props) => {
|
|
|
19
19
|
let total;
|
|
20
20
|
// If there is a pagination object, table data should be accessed from type AkitablePaginatedData.
|
|
21
21
|
// If not, table data should be accessed from type AkitableData.
|
|
22
|
-
if (
|
|
22
|
+
if (pagination) {
|
|
23
23
|
const result = data;
|
|
24
24
|
total = (result === null || result === void 0 ? void 0 : result.count) || 0;
|
|
25
25
|
parsedData = (result === null || result === void 0 ? void 0 : result.results) || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableCell.d.ts","sourceRoot":"","sources":["../../../src/components/EditableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"EditableCell.d.ts","sourceRoot":"","sources":["../../../src/components/EditableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE7B,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAoCtE,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAIvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,eAAe,yBA0D3B,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AkitableActions = void 0;
|
|
4
4
|
require("./actions.css");
|
|
5
|
-
const icons_1 = require("@akinon/icons");
|
|
6
5
|
const ui_button_1 = require("@akinon/ui-button");
|
|
7
6
|
const ui_select_1 = require("@akinon/ui-select");
|
|
8
7
|
const react_1 = require("react");
|
|
@@ -27,9 +26,9 @@ const AkitableActions = () => {
|
|
|
27
26
|
action === null || action === void 0 ? void 0 : action.onSelect(selectedRowKeys);
|
|
28
27
|
};
|
|
29
28
|
return (react_1.default.createElement("div", { className: "akitable-actions" },
|
|
30
|
-
react_1.default.createElement(ui_select_1.Select, { placeholder: t('selectAction'), value: selectedAction, options: options, onChange: handleActionChange, disabled: isLoading || (pagination === null || pagination === void 0 ? void 0 : pagination.total) === 0, allowClear: true }),
|
|
29
|
+
react_1.default.createElement(ui_select_1.Select, { placeholder: t('selectAction'), value: selectedAction, options: options, onChange: value => handleActionChange(value), disabled: isLoading || (pagination === null || pagination === void 0 ? void 0 : pagination.total) === 0, allowClear: true }),
|
|
31
30
|
selectedAction && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
32
|
-
react_1.default.createElement(ui_button_1.Button, { type: "primary", icon:
|
|
31
|
+
react_1.default.createElement(ui_button_1.Button, { type: "primary", icon: "katalogkontrol", disabled: isLoading || !hasSelections, onClick: handleActionTrigger }, t('apply')),
|
|
33
32
|
hasSelections && (react_1.default.createElement("span", { className: "akitable-actions-info" }, t('selectedCount', { count: selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length })))))));
|
|
34
33
|
};
|
|
35
34
|
exports.AkitableActions = AkitableActions;
|
|
@@ -33,25 +33,23 @@
|
|
|
33
33
|
border: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
background-color: var(--color-neutral-100);
|
|
40
|
-
}
|
|
36
|
+
/* Add background for alternate rows. */
|
|
37
|
+
.akinon-table-row:nth-child(odd) td {
|
|
38
|
+
background-color: var(--color-neutral-100);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
.akinon-table-row.is-selectable {
|
|
44
42
|
cursor: pointer;
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
.akinon-table-row.is-selectable td {
|
|
46
|
+
transition: background-color 0.2s;
|
|
47
|
+
}
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
.akinon-table-row.is-selectable:hover td {
|
|
50
|
+
background-color: var(--color-blue-100) !important;
|
|
51
|
+
}
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
53
|
+
.akinon-table-row.is-selectable:hover td[class*='akinon-table-cell-fix-'] {
|
|
54
|
+
background-color: var(--color-blue-200) !important;
|
|
57
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datatable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAOzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,
|
|
1
|
+
{"version":3,"file":"datatable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAOzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,sBAsH9D,CAAC"}
|
|
@@ -51,7 +51,7 @@ const AkitableDataTable = (props) => {
|
|
|
51
51
|
render: (record) => {
|
|
52
52
|
const isRowEditing = record.id === editingKey;
|
|
53
53
|
return isRowEditing ? (react_1.default.createElement("span", null,
|
|
54
|
-
react_1.default.createElement(ui_button_1.Button, {
|
|
54
|
+
react_1.default.createElement(ui_button_1.Button, { size: "small", onClick: () => {
|
|
55
55
|
onRowEdit(record, form.getFieldsValue());
|
|
56
56
|
setEditingKey(null);
|
|
57
57
|
form.resetFields();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/components/error.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/components/error.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,eAAO,MAAM,cAAc,2BAA4B,aAAa,sBAqBnE,CAAC"}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fallbackRender = void 0;
|
|
4
4
|
require("./error.css");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const ui_result_1 = require("@akinon/ui-result");
|
|
7
5
|
const ui_button_1 = require("@akinon/ui-button");
|
|
6
|
+
const ui_result_1 = require("@akinon/ui-result");
|
|
7
|
+
const react_1 = require("react");
|
|
8
8
|
const i18n_1 = require("../i18n");
|
|
9
9
|
const fallbackRender = ({ resetErrorBoundary }) => {
|
|
10
10
|
const { t } = i18n_1.i18n;
|
|
11
11
|
return (react_1.default.createElement("div", { className: "akitable-error" },
|
|
12
12
|
react_1.default.createElement(ui_result_1.Result, { status: "error", title: t('errorTitle'), subTitle: t('errorDescription'), extra: [
|
|
13
|
-
react_1.default.createElement(ui_button_1.Button, { type: "primary", onClick: resetErrorBoundary }, t('errorButtonText'))
|
|
13
|
+
react_1.default.createElement(ui_button_1.Button, { type: "primary", onClick: resetErrorBoundary, key: "error-button" }, t('errorButtonText'))
|
|
14
14
|
] })));
|
|
15
15
|
};
|
|
16
16
|
exports.fallbackRender = fallbackRender;
|
package/dist/cjs/i18n/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;4BAQszB,CAAC;;CADt0B,CAAC"}
|
package/dist/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,KAAK,aAAa,GAAG,CACnB,MAAM,EAAE,YAAY,EACpB,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,KACd,IAAI,CAAC;AAEV,KAAK,eAAe,GAAG,CACrB,cAAc,EAAE,YAAY,EAC5B,OAAO,EAAE,YAAY,KAClB,IAAI,CAAC;AAEV,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzE,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,IAAI,EAAE,YAAY,EAAE,GAAG,qBAAqB,CAAC;IAC7C,MAAM,CAAC,EAAE,m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C;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC;CAClD"}
|
package/dist/esm/akitable.js
CHANGED
|
@@ -16,7 +16,7 @@ export const Akitable = (props) => {
|
|
|
16
16
|
let total;
|
|
17
17
|
// If there is a pagination object, table data should be accessed from type AkitablePaginatedData.
|
|
18
18
|
// If not, table data should be accessed from type AkitableData.
|
|
19
|
-
if (
|
|
19
|
+
if (pagination) {
|
|
20
20
|
const result = data;
|
|
21
21
|
total = (result === null || result === void 0 ? void 0 : result.count) || 0;
|
|
22
22
|
parsedData = (result === null || result === void 0 ? void 0 : result.results) || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableCell.d.ts","sourceRoot":"","sources":["../../../src/components/EditableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"EditableCell.d.ts","sourceRoot":"","sources":["../../../src/components/EditableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE7B,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAoCtE,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAIvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,eAAe,yBA0D3B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import './actions.css';
|
|
2
|
-
import { Icon } from '@akinon/icons';
|
|
3
2
|
import { Button } from '@akinon/ui-button';
|
|
4
3
|
import { Select } from '@akinon/ui-select';
|
|
5
4
|
import React from 'react';
|
|
@@ -24,8 +23,8 @@ export const AkitableActions = () => {
|
|
|
24
23
|
action === null || action === void 0 ? void 0 : action.onSelect(selectedRowKeys);
|
|
25
24
|
};
|
|
26
25
|
return (React.createElement("div", { className: "akitable-actions" },
|
|
27
|
-
React.createElement(Select, { placeholder: t('selectAction'), value: selectedAction, options: options, onChange: handleActionChange, disabled: isLoading || (pagination === null || pagination === void 0 ? void 0 : pagination.total) === 0, allowClear: true }),
|
|
26
|
+
React.createElement(Select, { placeholder: t('selectAction'), value: selectedAction, options: options, onChange: value => handleActionChange(value), disabled: isLoading || (pagination === null || pagination === void 0 ? void 0 : pagination.total) === 0, allowClear: true }),
|
|
28
27
|
selectedAction && (React.createElement(React.Fragment, null,
|
|
29
|
-
React.createElement(Button, { type: "primary", icon:
|
|
28
|
+
React.createElement(Button, { type: "primary", icon: "katalogkontrol", disabled: isLoading || !hasSelections, onClick: handleActionTrigger }, t('apply')),
|
|
30
29
|
hasSelections && (React.createElement("span", { className: "akitable-actions-info" }, t('selectedCount', { count: selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length })))))));
|
|
31
30
|
};
|
|
@@ -33,25 +33,23 @@
|
|
|
33
33
|
border: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
background-color: var(--color-neutral-100);
|
|
40
|
-
}
|
|
36
|
+
/* Add background for alternate rows. */
|
|
37
|
+
.akinon-table-row:nth-child(odd) td {
|
|
38
|
+
background-color: var(--color-neutral-100);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
.akinon-table-row.is-selectable {
|
|
44
42
|
cursor: pointer;
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
.akinon-table-row.is-selectable td {
|
|
46
|
+
transition: background-color 0.2s;
|
|
47
|
+
}
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
.akinon-table-row.is-selectable:hover td {
|
|
50
|
+
background-color: var(--color-blue-100) !important;
|
|
51
|
+
}
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
53
|
+
.akinon-table-row.is-selectable:hover td[class*='akinon-table-cell-fix-'] {
|
|
54
|
+
background-color: var(--color-blue-200) !important;
|
|
57
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datatable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAOzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,
|
|
1
|
+
{"version":3,"file":"datatable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAOzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,sBAsH9D,CAAC"}
|
|
@@ -48,7 +48,7 @@ export const AkitableDataTable = (props) => {
|
|
|
48
48
|
render: (record) => {
|
|
49
49
|
const isRowEditing = record.id === editingKey;
|
|
50
50
|
return isRowEditing ? (React.createElement("span", null,
|
|
51
|
-
React.createElement(Button, {
|
|
51
|
+
React.createElement(Button, { size: "small", onClick: () => {
|
|
52
52
|
onRowEdit(record, form.getFieldsValue());
|
|
53
53
|
setEditingKey(null);
|
|
54
54
|
form.resetFields();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/components/error.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/components/error.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,eAAO,MAAM,cAAc,2BAA4B,aAAa,sBAqBnE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './error.css';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Result } from '@akinon/ui-result';
|
|
4
2
|
import { Button } from '@akinon/ui-button';
|
|
3
|
+
import { Result } from '@akinon/ui-result';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import { i18n } from '../i18n';
|
|
6
6
|
export const fallbackRender = ({ resetErrorBoundary }) => {
|
|
7
7
|
const { t } = i18n;
|
|
8
8
|
return (React.createElement("div", { className: "akitable-error" },
|
|
9
9
|
React.createElement(Result, { status: "error", title: t('errorTitle'), subTitle: t('errorDescription'), extra: [
|
|
10
|
-
React.createElement(Button, { type: "primary", onClick: resetErrorBoundary }, t('errorButtonText'))
|
|
10
|
+
React.createElement(Button, { type: "primary", onClick: resetErrorBoundary, key: "error-button" }, t('errorButtonText'))
|
|
11
11
|
] })));
|
|
12
12
|
};
|
package/dist/esm/i18n/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;4BAQszB,CAAC;;CADt0B,CAAC"}
|
package/dist/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,KAAK,aAAa,GAAG,CACnB,MAAM,EAAE,YAAY,EACpB,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,KACd,IAAI,CAAC;AAEV,KAAK,eAAe,GAAG,CACrB,cAAc,EAAE,YAAY,EAC5B,OAAO,EAAE,YAAY,KAClB,IAAI,CAAC;AAEV,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzE,MAAM,WAAW,aAAa;IAC5B,OA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,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC;CAClD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/akitable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -12,30 +12,30 @@
|
|
|
12
12
|
"antd": "5.17.0",
|
|
13
13
|
"clsx": "^2.0.0",
|
|
14
14
|
"react-error-boundary": "^4.0.13",
|
|
15
|
-
"@akinon/
|
|
16
|
-
"@akinon/
|
|
17
|
-
"@akinon/
|
|
18
|
-
"@akinon/ui-
|
|
19
|
-
"@akinon/ui-
|
|
20
|
-
"@akinon/ui-select": "0.
|
|
21
|
-
"@akinon/ui-
|
|
22
|
-
"@akinon/
|
|
23
|
-
"@akinon/ui-
|
|
24
|
-
"@akinon/ui-
|
|
25
|
-
"@akinon/ui-
|
|
26
|
-
"@akinon/ui-
|
|
27
|
-
"@akinon/ui-
|
|
28
|
-
"@akinon/ui-typography": "0.
|
|
29
|
-
"@akinon/ui-
|
|
15
|
+
"@akinon/akiform": "0.9.0",
|
|
16
|
+
"@akinon/akilocale": "0.14.0",
|
|
17
|
+
"@akinon/icons": "0.6.0",
|
|
18
|
+
"@akinon/ui-card": "0.5.0",
|
|
19
|
+
"@akinon/ui-button": "0.7.0",
|
|
20
|
+
"@akinon/ui-select": "0.5.0",
|
|
21
|
+
"@akinon/ui-space": "0.5.0",
|
|
22
|
+
"@akinon/ui-progress": "0.5.0",
|
|
23
|
+
"@akinon/ui-result": "0.3.0",
|
|
24
|
+
"@akinon/ui-pagination": "0.5.0",
|
|
25
|
+
"@akinon/ui-skeleton": "0.5.0",
|
|
26
|
+
"@akinon/ui-theme": "0.7.0",
|
|
27
|
+
"@akinon/ui-input": "0.6.0",
|
|
28
|
+
"@akinon/ui-typography": "0.5.0",
|
|
29
|
+
"@akinon/ui-spin": "0.5.0",
|
|
30
|
+
"@akinon/ui-table": "0.5.0",
|
|
31
|
+
"@akinon/ui-steps": "0.5.0"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
34
|
"clean-package": "2.2.0",
|
|
33
35
|
"copyfiles": "^2.4.1",
|
|
34
36
|
"rimraf": "^5.0.5",
|
|
35
37
|
"typescript": "^5.2.2",
|
|
36
|
-
"@akinon/typescript-config": "0.
|
|
37
|
-
"@akinon/vite-config": "0.4.0",
|
|
38
|
-
"@akinon/eslint-config": "0.1.0"
|
|
38
|
+
"@akinon/typescript-config": "0.4.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=18",
|
|
@@ -55,13 +55,8 @@
|
|
|
55
55
|
"build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
|
|
56
56
|
"build:esm": "tsc --outDir dist/esm",
|
|
57
57
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
58
|
-
"copy:files": "copyfiles -u 1 src
|
|
58
|
+
"copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
|
|
59
59
|
"clean": "rimraf dist/",
|
|
60
|
-
"lint": "eslint *.ts*",
|
|
61
|
-
"test": "vitest run",
|
|
62
|
-
"test:ui": "vitest --ui",
|
|
63
|
-
"test:watch": "vitest watch",
|
|
64
|
-
"test:coverage": "vitest run --coverage",
|
|
65
60
|
"typecheck": "tsc --noEmit"
|
|
66
61
|
}
|
|
67
62
|
}
|