@dhis2-ui/table 10.16.3-alpha.1 → 10.16.4
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/build/cjs/data-table/data-table-cell.js +25 -27
- package/build/cjs/data-table/data-table-column-header/data-table-column-header.js +58 -62
- package/build/cjs/data-table/data-table-column-header/filter-handle.js +5 -6
- package/build/cjs/data-table/data-table-column-header/sorter.js +6 -7
- package/build/cjs/data-table/data-table-row/data-table-row.js +13 -15
- package/build/cjs/data-table/data-table-row/expand-handle-cell.js +12 -15
- package/build/cjs/data-table/data-table-row/expanded-row.js +19 -22
- package/build/cjs/data-table/data-table.js +11 -13
- package/build/cjs/data-table/data-table.prod.stories.js +128 -146
- package/build/cjs/data-table/table-elements/table-body.js +19 -23
- package/build/cjs/data-table/table-elements/table-data-cell/table-data-cell.js +23 -25
- package/build/cjs/data-table/table-elements/table-foot.js +13 -17
- package/build/cjs/data-table/table-elements/table-head.js +13 -17
- package/build/cjs/data-table/table-elements/table-header-cell/table-header-cell.js +42 -46
- package/build/cjs/data-table/table-elements/table-header-cell-action.js +18 -22
- package/build/cjs/data-table/table-elements/table-row.js +19 -23
- package/build/cjs/data-table/table-elements/table-scroll-box.js +16 -20
- package/build/cjs/data-table/table-elements/table-toolbar.js +15 -19
- package/build/cjs/data-table/table-elements/table.js +21 -25
- package/build/cjs/data-table/table-elements/table.stories.internal.js +111 -120
- package/build/cjs/locales/index.js +40 -21
- package/build/cjs/stacked-table/content-with-title.js +12 -16
- package/build/cjs/stacked-table/stacked-table-body.js +10 -13
- package/build/cjs/stacked-table/stacked-table-cell-head.js +17 -20
- package/build/cjs/stacked-table/stacked-table-cell.js +11 -12
- package/build/cjs/stacked-table/stacked-table-foot.js +10 -13
- package/build/cjs/stacked-table/stacked-table-head.js +10 -13
- package/build/cjs/stacked-table/stacked-table-row-head.js +8 -11
- package/build/cjs/stacked-table/stacked-table-row.js +13 -19
- package/build/cjs/stacked-table/stacked-table.js +6 -7
- package/build/cjs/stacked-table/stacked-table.test.js +14 -23
- package/build/cjs/stacked-table/table.js +11 -14
- package/build/cjs/table/table-body.js +10 -13
- package/build/cjs/table/table-cell-head.js +19 -22
- package/build/cjs/table/table-cell.js +19 -22
- package/build/cjs/table/table-foot.js +10 -13
- package/build/cjs/table/table-head.js +10 -13
- package/build/cjs/table/table-row-head.js +12 -15
- package/build/cjs/table/table-row.js +9 -11
- package/build/cjs/table/table.js +16 -19
- package/build/es/data-table/data-table-cell.js +24 -25
- package/build/es/data-table/data-table-column-header/data-table-column-header.js +57 -60
- package/build/es/data-table/data-table-column-header/filter-handle.js +5 -6
- package/build/es/data-table/data-table-column-header/sorter.js +6 -7
- package/build/es/data-table/data-table-row/data-table-row.js +12 -13
- package/build/es/data-table/data-table-row/expand-handle-cell.js +12 -15
- package/build/es/data-table/data-table-row/expanded-row.js +19 -22
- package/build/es/data-table/data-table.js +10 -11
- package/build/es/data-table/data-table.prod.stories.js +127 -144
- package/build/es/data-table/table-elements/table-body.js +18 -21
- package/build/es/data-table/table-elements/table-data-cell/table-data-cell.js +22 -23
- package/build/es/data-table/table-elements/table-foot.js +12 -15
- package/build/es/data-table/table-elements/table-head.js +12 -15
- package/build/es/data-table/table-elements/table-header-cell/table-header-cell.js +41 -44
- package/build/es/data-table/table-elements/table-header-cell-action.js +17 -20
- package/build/es/data-table/table-elements/table-row.js +18 -21
- package/build/es/data-table/table-elements/table-scroll-box.js +15 -18
- package/build/es/data-table/table-elements/table-toolbar.js +14 -17
- package/build/es/data-table/table-elements/table.js +20 -23
- package/build/es/data-table/table-elements/table.stories.internal.js +110 -118
- package/build/es/locales/index.js +34 -15
- package/build/es/stacked-table/content-with-title.js +11 -14
- package/build/es/stacked-table/stacked-table-body.js +10 -13
- package/build/es/stacked-table/stacked-table-cell-head.js +17 -20
- package/build/es/stacked-table/stacked-table-cell.js +11 -12
- package/build/es/stacked-table/stacked-table-foot.js +10 -13
- package/build/es/stacked-table/stacked-table-head.js +10 -13
- package/build/es/stacked-table/stacked-table-row-head.js +8 -11
- package/build/es/stacked-table/stacked-table-row.js +13 -19
- package/build/es/stacked-table/stacked-table.js +6 -7
- package/build/es/stacked-table/stacked-table.test.js +14 -23
- package/build/es/stacked-table/table.js +11 -14
- package/build/es/table/table-body.js +10 -13
- package/build/es/table/table-cell-head.js +19 -22
- package/build/es/table/table-cell.js +19 -22
- package/build/es/table/table-foot.js +10 -13
- package/build/es/table/table-head.js +10 -13
- package/build/es/table/table-row-head.js +12 -15
- package/build/es/table/table-row.js +8 -9
- package/build/es/table/table.js +16 -19
- package/package.json +3 -3
- package/src/locales/index.js +48 -15
|
@@ -3,13 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { extractHeaderLabels } from './extract-header-labels.js';
|
|
4
4
|
import { Provider } from './table-context.js';
|
|
5
5
|
import { Table } from './table.js';
|
|
6
|
-
export const StackedTable =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = _ref;
|
|
6
|
+
export const StackedTable = ({
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
dataTest = 'dhis2-uicore-stackedtable',
|
|
10
|
+
headerLabels
|
|
11
|
+
}) => {
|
|
13
12
|
const contextHeaderLabels = extractHeaderLabels(children);
|
|
14
13
|
const context = {
|
|
15
14
|
headerLabels: headerLabels || contextHeaderLabels
|
|
@@ -9,29 +9,20 @@ import { StackedTableHead } from './stacked-table-head.js';
|
|
|
9
9
|
import { StackedTableRowHead } from './stacked-table-row-head.js';
|
|
10
10
|
import { StackedTableRow } from './stacked-table-row.js';
|
|
11
11
|
import { StackedTable } from './stacked-table.js';
|
|
12
|
-
const Table =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let {
|
|
27
|
-
label,
|
|
28
|
-
...props
|
|
29
|
-
} = _ref3;
|
|
30
|
-
return /*#__PURE__*/React.createElement(StackedTableCell, _extends({}, props, {
|
|
31
|
-
key: label
|
|
32
|
-
}), label);
|
|
33
|
-
}))));
|
|
34
|
-
};
|
|
12
|
+
const Table = ({
|
|
13
|
+
headerLabels,
|
|
14
|
+
bodyLabels
|
|
15
|
+
}) => /*#__PURE__*/React.createElement(StackedTable, null, /*#__PURE__*/React.createElement(StackedTableHead, null, /*#__PURE__*/React.createElement(StackedTableRowHead, null, headerLabels.map(({
|
|
16
|
+
label,
|
|
17
|
+
...props
|
|
18
|
+
}, index) => /*#__PURE__*/React.createElement(StackedTableCellHead, _extends({}, props, {
|
|
19
|
+
key: label + index
|
|
20
|
+
}), label)))), /*#__PURE__*/React.createElement(StackedTableBody, null, /*#__PURE__*/React.createElement(StackedTableRow, null, bodyLabels.map(({
|
|
21
|
+
label,
|
|
22
|
+
...props
|
|
23
|
+
}) => /*#__PURE__*/React.createElement(StackedTableCell, _extends({}, props, {
|
|
24
|
+
key: label
|
|
25
|
+
}), label)))));
|
|
35
26
|
describe('StackedTable', () => {
|
|
36
27
|
const headerLabels = [{
|
|
37
28
|
label: 'First name',
|
|
@@ -2,20 +2,17 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const Table =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
dynamic: [colors.white, colors.grey900]
|
|
17
|
-
}, [`table.__jsx-style-dynamic-selector{display:block;border:0;background-color:${colors.white};min-width:100%;text-align:left;border-collapse:collapse;vertical-align:top;color:${colors.grey900};}`]));
|
|
18
|
-
};
|
|
5
|
+
export const Table = ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest
|
|
9
|
+
}) => /*#__PURE__*/React.createElement("table", {
|
|
10
|
+
"data-test": dataTest,
|
|
11
|
+
className: _JSXStyle.dynamic([["4278890465", [colors.white, colors.grey900]]]) + " " + (className || "")
|
|
12
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
13
|
+
id: "4278890465",
|
|
14
|
+
dynamic: [colors.white, colors.grey900]
|
|
15
|
+
}, [`table.__jsx-style-dynamic-selector{display:block;border:0;background-color:${colors.white};min-width:100%;text-align:left;border-collapse:collapse;vertical-align:top;color:${colors.grey900};}`]));
|
|
19
16
|
Table.propTypes = {
|
|
20
17
|
children: PropTypes.node.isRequired,
|
|
21
18
|
className: PropTypes.string,
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export const TableBody =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
role: role
|
|
14
|
-
}, children);
|
|
15
|
-
};
|
|
3
|
+
export const TableBody = ({
|
|
4
|
+
children,
|
|
5
|
+
className,
|
|
6
|
+
dataTest = 'dhis2-uicore-tablebody',
|
|
7
|
+
role
|
|
8
|
+
}) => /*#__PURE__*/React.createElement("tbody", {
|
|
9
|
+
className: className,
|
|
10
|
+
"data-test": dataTest,
|
|
11
|
+
role: role
|
|
12
|
+
}, children);
|
|
16
13
|
TableBody.propTypes = {
|
|
17
14
|
/** Should be `<TableRow>` components */
|
|
18
15
|
children: PropTypes.node,
|
|
@@ -4,28 +4,25 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
const tableCellHeadStyles = ["th.jsx-3181834369{border-bottom:1px solid #e8edf2;font-size:14px;line-height:18px;padding:13px 12px;height:45px;}", "th.jsx-3181834369:dir(rtl){text-align:right;}", ".dense.jsx-3181834369{padding:9px 12px;height:36px;}"];
|
|
6
6
|
tableCellHeadStyles.__hash = "3181834369";
|
|
7
|
-
export const TableCellHead =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
id: tableCellHeadStyles.__hash
|
|
27
|
-
}, tableCellHeadStyles));
|
|
28
|
-
};
|
|
7
|
+
export const TableCellHead = ({
|
|
8
|
+
role,
|
|
9
|
+
colSpan,
|
|
10
|
+
rowSpan,
|
|
11
|
+
dense,
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
dataTest = 'dhis2-uicore-tablecellhead'
|
|
15
|
+
}) => /*#__PURE__*/React.createElement("th", {
|
|
16
|
+
colSpan: colSpan,
|
|
17
|
+
rowSpan: rowSpan,
|
|
18
|
+
"data-test": dataTest,
|
|
19
|
+
role: role,
|
|
20
|
+
className: `jsx-${tableCellHeadStyles.__hash}` + " " + (cx({
|
|
21
|
+
dense
|
|
22
|
+
}, className) || "")
|
|
23
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
24
|
+
id: tableCellHeadStyles.__hash
|
|
25
|
+
}, tableCellHeadStyles));
|
|
29
26
|
TableCellHead.propTypes = {
|
|
30
27
|
children: PropTypes.node,
|
|
31
28
|
className: PropTypes.string,
|
|
@@ -4,28 +4,25 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
const tableCellStyles = ["td.jsx-2229340108{border-bottom:1px solid #e8edf2;font-size:14px;line-height:18px;padding:13px 12px;height:45px;}", "td.jsx-2229340108:dir(rtl){text-align:right;}", ".dense.jsx-2229340108{padding:9px 12px;height:36px;}"];
|
|
6
6
|
tableCellStyles.__hash = "2229340108";
|
|
7
|
-
export const TableCell =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
id: tableCellStyles.__hash
|
|
27
|
-
}, tableCellStyles));
|
|
28
|
-
};
|
|
7
|
+
export const TableCell = ({
|
|
8
|
+
role,
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
colSpan,
|
|
12
|
+
rowSpan,
|
|
13
|
+
dense,
|
|
14
|
+
dataTest = 'dhis2-uicore-tablecell'
|
|
15
|
+
}) => /*#__PURE__*/React.createElement("td", {
|
|
16
|
+
colSpan: colSpan,
|
|
17
|
+
rowSpan: rowSpan,
|
|
18
|
+
"data-test": dataTest,
|
|
19
|
+
role: role,
|
|
20
|
+
className: `jsx-${tableCellStyles.__hash}` + " " + (cx({
|
|
21
|
+
dense
|
|
22
|
+
}, className) || "")
|
|
23
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
24
|
+
id: tableCellStyles.__hash
|
|
25
|
+
}, tableCellStyles));
|
|
29
26
|
TableCell.propTypes = {
|
|
30
27
|
children: PropTypes.node,
|
|
31
28
|
className: PropTypes.string,
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export const TableFoot =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
role: role
|
|
14
|
-
}, children);
|
|
15
|
-
};
|
|
3
|
+
export const TableFoot = ({
|
|
4
|
+
children,
|
|
5
|
+
className,
|
|
6
|
+
dataTest = 'dhis2-uicore-tablefoot',
|
|
7
|
+
role
|
|
8
|
+
}) => /*#__PURE__*/React.createElement("tfoot", {
|
|
9
|
+
className: className,
|
|
10
|
+
"data-test": dataTest,
|
|
11
|
+
role: role
|
|
12
|
+
}, children);
|
|
16
13
|
TableFoot.propTypes = {
|
|
17
14
|
/** Should be `<TableRow>` components */
|
|
18
15
|
children: PropTypes.node,
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export const TableHead =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
role: role
|
|
14
|
-
}, children);
|
|
15
|
-
};
|
|
3
|
+
export const TableHead = ({
|
|
4
|
+
children,
|
|
5
|
+
className,
|
|
6
|
+
dataTest = 'dhis2-uicore-tablehead',
|
|
7
|
+
role
|
|
8
|
+
}) => /*#__PURE__*/React.createElement("thead", {
|
|
9
|
+
className: className,
|
|
10
|
+
"data-test": dataTest,
|
|
11
|
+
role: role
|
|
12
|
+
}, children);
|
|
16
13
|
TableHead.propTypes = {
|
|
17
14
|
/** Should be `<TableRowHead>` components */
|
|
18
15
|
children: PropTypes.node,
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TableRow } from './table-row.js';
|
|
4
|
-
export const TableRowHead =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
role: role
|
|
17
|
-
}, children);
|
|
18
|
-
};
|
|
4
|
+
export const TableRowHead = ({
|
|
5
|
+
role,
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest = 'dhis2-uicore-tablerowhead',
|
|
9
|
+
suppressZebraStriping
|
|
10
|
+
}) => /*#__PURE__*/React.createElement(TableRow, {
|
|
11
|
+
className: className,
|
|
12
|
+
dataTest: dataTest,
|
|
13
|
+
suppressZebraStriping: suppressZebraStriping,
|
|
14
|
+
role: role
|
|
15
|
+
}, children);
|
|
19
16
|
TableRowHead.propTypes = {
|
|
20
17
|
/** Should be `<TableCellHead>` components */
|
|
21
18
|
children: PropTypes.node,
|
|
@@ -6,15 +6,14 @@ import React, { useContext } from 'react';
|
|
|
6
6
|
import { TableContext } from './table-context.js';
|
|
7
7
|
const tableRowStyles = [".zebraStriping.jsx-3124144591:nth-child(even){background:#fbfcfd;}"];
|
|
8
8
|
tableRowStyles.__hash = "3124144591";
|
|
9
|
-
export const TableRow =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
9
|
+
export const TableRow = ({
|
|
10
|
+
role,
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
dataTest = 'dhis2-uicore-tablerow',
|
|
14
|
+
suppressZebraStriping,
|
|
15
|
+
...rest
|
|
16
|
+
}) => {
|
|
18
17
|
const {
|
|
19
18
|
suppressZebraStriping: suppressZebraStripingFromContext
|
|
20
19
|
} = useContext(TableContext);
|
package/build/es/table/table.js
CHANGED
|
@@ -4,26 +4,23 @@ import React from 'react';
|
|
|
4
4
|
import { Provider } from './table-context.js';
|
|
5
5
|
const tableStyles = ["table.jsx-2430604489{border:1px solid #e8edf2;background-color:#ffffff;min-width:100%;text-align:left;border-collapse:collapse;vertical-align:top;}"];
|
|
6
6
|
tableStyles.__hash = "2430604489";
|
|
7
|
-
export const Table =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export const Table = ({
|
|
8
|
+
role,
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
dataTest = 'dhis2-uicore-table',
|
|
12
|
+
suppressZebraStriping
|
|
13
|
+
}) => /*#__PURE__*/React.createElement(Provider, {
|
|
14
|
+
value: {
|
|
13
15
|
suppressZebraStriping
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
className: `jsx-${tableStyles.__hash}` + " " + (className || "")
|
|
23
|
-
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
24
|
-
id: tableStyles.__hash
|
|
25
|
-
}, tableStyles)));
|
|
26
|
-
};
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
18
|
+
"data-test": dataTest,
|
|
19
|
+
role: role,
|
|
20
|
+
className: `jsx-${tableStyles.__hash}` + " " + (className || "")
|
|
21
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22
|
+
id: tableStyles.__hash
|
|
23
|
+
}, tableStyles)));
|
|
27
24
|
Table.propTypes = {
|
|
28
25
|
/** Should be `<TableHead>`, `<TableBody>`, and `<TableFoot>` components */
|
|
29
26
|
children: PropTypes.node,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/table",
|
|
3
|
-
"version": "10.16.
|
|
3
|
+
"version": "10.16.4",
|
|
4
4
|
"description": "UI Table",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@dhis2/prop-types": "^3.1.2",
|
|
37
|
-
"@dhis2/ui-constants": "10.16.
|
|
38
|
-
"@dhis2/ui-icons": "10.16.
|
|
37
|
+
"@dhis2/ui-constants": "10.16.4",
|
|
38
|
+
"@dhis2/ui-icons": "10.16.4",
|
|
39
39
|
"classnames": "^2.3.1",
|
|
40
40
|
"prop-types": "^15.7.2"
|
|
41
41
|
},
|
package/src/locales/index.js
CHANGED
|
@@ -25,20 +25,53 @@ import uz_UZ_CyrlTranslations from './uz_UZ_Cyrl/translations.json'
|
|
|
25
25
|
import zhTranslations from './zh/translations.json'
|
|
26
26
|
|
|
27
27
|
const namespace = 'default'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
i18n.
|
|
33
|
-
i18n.
|
|
34
|
-
|
|
35
|
-
i18n.
|
|
36
|
-
i18n.
|
|
37
|
-
|
|
38
|
-
i18n.
|
|
39
|
-
i18n.
|
|
40
|
-
|
|
41
|
-
i18n.
|
|
42
|
-
i18n.
|
|
28
|
+
|
|
29
|
+
// Use 'deep' = true and 'overwrite' = false to add to, but not overwrite,
|
|
30
|
+
// custom translations from the datastore (added by the app adapter)
|
|
31
|
+
|
|
32
|
+
i18n.addResourceBundle('ar', namespace, arTranslations, true, false)
|
|
33
|
+
i18n.addResourceBundle('ar', namespace, arTranslations, true, false)
|
|
34
|
+
|
|
35
|
+
i18n.addResourceBundle('cs', namespace, csTranslations, true, false)
|
|
36
|
+
i18n.addResourceBundle('cs', namespace, csTranslations, true, false)
|
|
37
|
+
|
|
38
|
+
i18n.addResourceBundle('en', namespace, enTranslations, true, false)
|
|
39
|
+
i18n.addResourceBundle('en', namespace, enTranslations, true, false)
|
|
40
|
+
|
|
41
|
+
i18n.addResourceBundle('es', namespace, esTranslations, true, false)
|
|
42
|
+
i18n.addResourceBundle('es', namespace, esTranslations, true, false)
|
|
43
|
+
|
|
44
|
+
i18n.addResourceBundle('es_419', namespace, es_419Translations, true, false)
|
|
45
|
+
i18n.addResourceBundle('es-419', namespace, es_419Translations, true, false)
|
|
46
|
+
|
|
47
|
+
i18n.addResourceBundle('fr', namespace, frTranslations, true, false)
|
|
48
|
+
i18n.addResourceBundle('fr', namespace, frTranslations, true, false)
|
|
49
|
+
|
|
50
|
+
i18n.addResourceBundle('km', namespace, kmTranslations, true, false)
|
|
51
|
+
i18n.addResourceBundle('km', namespace, kmTranslations, true, false)
|
|
52
|
+
|
|
53
|
+
i18n.addResourceBundle('lo', namespace, loTranslations, true, false)
|
|
54
|
+
i18n.addResourceBundle('lo', namespace, loTranslations, true, false)
|
|
55
|
+
|
|
56
|
+
i18n.addResourceBundle('nb', namespace, nbTranslations, true, false)
|
|
57
|
+
i18n.addResourceBundle('nb', namespace, nbTranslations, true, false)
|
|
58
|
+
|
|
59
|
+
i18n.addResourceBundle('nl', namespace, nlTranslations, true, false)
|
|
60
|
+
i18n.addResourceBundle('nl', namespace, nlTranslations, true, false)
|
|
61
|
+
|
|
62
|
+
i18n.addResourceBundle('pt', namespace, ptTranslations, true, false)
|
|
63
|
+
i18n.addResourceBundle('pt', namespace, ptTranslations, true, false)
|
|
64
|
+
|
|
65
|
+
i18n.addResourceBundle('ru', namespace, ruTranslations, true, false)
|
|
66
|
+
i18n.addResourceBundle('ru', namespace, ruTranslations, true, false)
|
|
67
|
+
|
|
68
|
+
i18n.addResourceBundle('uk', namespace, ukTranslations, true, false)
|
|
69
|
+
i18n.addResourceBundle('uk', namespace, ukTranslations, true, false)
|
|
70
|
+
|
|
71
|
+
i18n.addResourceBundle('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations, true, false)
|
|
72
|
+
i18n.addResourceBundle('uz-Cyrl-UZ', namespace, uz_UZ_CyrlTranslations, true, false)
|
|
73
|
+
|
|
74
|
+
i18n.addResourceBundle('zh', namespace, zhTranslations, true, false)
|
|
75
|
+
i18n.addResourceBundle('zh', namespace, zhTranslations, true, false)
|
|
43
76
|
|
|
44
77
|
export default i18n
|