@dhis2-ui/selector-bar 8.15.0-alpha.2 → 8.15.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/build/cjs/locales/ar/translations.json +3 -0
- package/build/cjs/locales/cs/translations.json +3 -0
- package/build/cjs/locales/es/translations.json +3 -0
- package/build/cjs/locales/fr/translations.json +3 -0
- package/build/cjs/locales/id/translations.json +3 -0
- package/build/cjs/locales/index.js +46 -2
- package/build/cjs/locales/nb/translations.json +3 -0
- package/build/cjs/locales/uz_UZ_Cyrl/translations.json +3 -0
- package/build/cjs/locales/uz_UZ_Latn/translations.json +3 -0
- package/build/cjs/locales/vi/translations.json +3 -0
- package/build/cjs/locales/zh/translations.json +3 -0
- package/build/cjs/locales/zh_CN/translations.json +3 -0
- package/build/es/locales/ar/translations.json +3 -0
- package/build/es/locales/cs/translations.json +3 -0
- package/build/es/locales/es/translations.json +3 -0
- package/build/es/locales/fr/translations.json +3 -0
- package/build/es/locales/id/translations.json +3 -0
- package/build/es/locales/index.js +22 -0
- package/build/es/locales/nb/translations.json +3 -0
- package/build/es/locales/uz_UZ_Cyrl/translations.json +3 -0
- package/build/es/locales/uz_UZ_Latn/translations.json +3 -0
- package/build/es/locales/vi/translations.json +3 -0
- package/build/es/locales/zh/translations.json +3 -0
- package/build/es/locales/zh_CN/translations.json +3 -0
- package/package.json +13 -15
- package/types/index.d.ts +0 -27
|
@@ -7,7 +7,29 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
9
9
|
|
|
10
|
-
var _translations = _interopRequireDefault(require("./
|
|
10
|
+
var _translations = _interopRequireDefault(require("./ar/translations.json"));
|
|
11
|
+
|
|
12
|
+
var _translations2 = _interopRequireDefault(require("./cs/translations.json"));
|
|
13
|
+
|
|
14
|
+
var _translations3 = _interopRequireDefault(require("./en/translations.json"));
|
|
15
|
+
|
|
16
|
+
var _translations4 = _interopRequireDefault(require("./es/translations.json"));
|
|
17
|
+
|
|
18
|
+
var _translations5 = _interopRequireDefault(require("./fr/translations.json"));
|
|
19
|
+
|
|
20
|
+
var _translations6 = _interopRequireDefault(require("./id/translations.json"));
|
|
21
|
+
|
|
22
|
+
var _translations7 = _interopRequireDefault(require("./nb/translations.json"));
|
|
23
|
+
|
|
24
|
+
var _translations8 = _interopRequireDefault(require("./uz_UZ_Cyrl/translations.json"));
|
|
25
|
+
|
|
26
|
+
var _translations9 = _interopRequireDefault(require("./uz_UZ_Latn/translations.json"));
|
|
27
|
+
|
|
28
|
+
var _translations10 = _interopRequireDefault(require("./vi/translations.json"));
|
|
29
|
+
|
|
30
|
+
var _translations11 = _interopRequireDefault(require("./zh/translations.json"));
|
|
31
|
+
|
|
32
|
+
var _translations12 = _interopRequireDefault(require("./zh_CN/translations.json"));
|
|
11
33
|
|
|
12
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
35
|
|
|
@@ -21,7 +43,29 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
43
|
//------------------------------------------------------------------------------
|
|
22
44
|
const namespace = 'default';
|
|
23
45
|
|
|
24
|
-
_d2I18n.default.addResources('
|
|
46
|
+
_d2I18n.default.addResources('ar', namespace, _translations.default);
|
|
47
|
+
|
|
48
|
+
_d2I18n.default.addResources('cs', namespace, _translations2.default);
|
|
49
|
+
|
|
50
|
+
_d2I18n.default.addResources('en', namespace, _translations3.default);
|
|
51
|
+
|
|
52
|
+
_d2I18n.default.addResources('es', namespace, _translations4.default);
|
|
53
|
+
|
|
54
|
+
_d2I18n.default.addResources('fr', namespace, _translations5.default);
|
|
55
|
+
|
|
56
|
+
_d2I18n.default.addResources('id', namespace, _translations6.default);
|
|
57
|
+
|
|
58
|
+
_d2I18n.default.addResources('nb', namespace, _translations7.default);
|
|
59
|
+
|
|
60
|
+
_d2I18n.default.addResources('uz_UZ_Cyrl', namespace, _translations8.default);
|
|
61
|
+
|
|
62
|
+
_d2I18n.default.addResources('uz_UZ_Latn', namespace, _translations9.default);
|
|
63
|
+
|
|
64
|
+
_d2I18n.default.addResources('vi', namespace, _translations10.default);
|
|
65
|
+
|
|
66
|
+
_d2I18n.default.addResources('zh', namespace, _translations11.default);
|
|
67
|
+
|
|
68
|
+
_d2I18n.default.addResources('zh_CN', namespace, _translations12.default);
|
|
25
69
|
|
|
26
70
|
var _default = _d2I18n.default;
|
|
27
71
|
exports.default = _default;
|
|
@@ -7,7 +7,29 @@
|
|
|
7
7
|
// </auto-generated>
|
|
8
8
|
//------------------------------------------------------------------------------
|
|
9
9
|
import i18n from '@dhis2/d2-i18n';
|
|
10
|
+
import arTranslations from './ar/translations.json';
|
|
11
|
+
import csTranslations from './cs/translations.json';
|
|
10
12
|
import enTranslations from './en/translations.json';
|
|
13
|
+
import esTranslations from './es/translations.json';
|
|
14
|
+
import frTranslations from './fr/translations.json';
|
|
15
|
+
import idTranslations from './id/translations.json';
|
|
16
|
+
import nbTranslations from './nb/translations.json';
|
|
17
|
+
import uz_UZ_CyrlTranslations from './uz_UZ_Cyrl/translations.json';
|
|
18
|
+
import uz_UZ_LatnTranslations from './uz_UZ_Latn/translations.json';
|
|
19
|
+
import viTranslations from './vi/translations.json';
|
|
20
|
+
import zhTranslations from './zh/translations.json';
|
|
21
|
+
import zh_CNTranslations from './zh_CN/translations.json';
|
|
11
22
|
const namespace = 'default';
|
|
23
|
+
i18n.addResources('ar', namespace, arTranslations);
|
|
24
|
+
i18n.addResources('cs', namespace, csTranslations);
|
|
12
25
|
i18n.addResources('en', namespace, enTranslations);
|
|
26
|
+
i18n.addResources('es', namespace, esTranslations);
|
|
27
|
+
i18n.addResources('fr', namespace, frTranslations);
|
|
28
|
+
i18n.addResources('id', namespace, idTranslations);
|
|
29
|
+
i18n.addResources('nb', namespace, nbTranslations);
|
|
30
|
+
i18n.addResources('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations);
|
|
31
|
+
i18n.addResources('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations);
|
|
32
|
+
i18n.addResources('vi', namespace, viTranslations);
|
|
33
|
+
i18n.addResources('zh', namespace, zhTranslations);
|
|
34
|
+
i18n.addResources('zh_CN', namespace, zh_CNTranslations);
|
|
13
35
|
export default i18n;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/selector-bar",
|
|
3
|
-
"version": "8.15.0
|
|
3
|
+
"version": "8.15.0",
|
|
4
4
|
"description": "UI Select",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
"styled-jsx": "^4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dhis2-ui/button": "8.15.0
|
|
36
|
-
"@dhis2-ui/card": "8.15.0
|
|
37
|
-
"@dhis2-ui/popper": "8.15.0
|
|
38
|
-
"@dhis2-ui/layer": "8.15.0
|
|
39
|
-
"@dhis2/ui-constants": "8.15.0
|
|
40
|
-
"@dhis2/ui-icons": "8.15.0
|
|
35
|
+
"@dhis2-ui/button": "8.15.0",
|
|
36
|
+
"@dhis2-ui/card": "8.15.0",
|
|
37
|
+
"@dhis2-ui/popper": "8.15.0",
|
|
38
|
+
"@dhis2-ui/layer": "8.15.0",
|
|
39
|
+
"@dhis2/ui-constants": "8.15.0",
|
|
40
|
+
"@dhis2/ui-icons": "8.15.0",
|
|
41
41
|
"@testing-library/react": "^12.1.2",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"prop-types": "^15.7.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@dhis2-ui/css": "8.15.0
|
|
47
|
-
"@dhis2-ui/menu": "8.15.0
|
|
48
|
-
"@dhis2-ui/organisation-unit-tree": "8.15.0
|
|
49
|
-
"@dhis2-ui/select": "8.15.0
|
|
46
|
+
"@dhis2-ui/css": "8.15.0",
|
|
47
|
+
"@dhis2-ui/menu": "8.15.0",
|
|
48
|
+
"@dhis2-ui/organisation-unit-tree": "8.15.0",
|
|
49
|
+
"@dhis2-ui/select": "8.15.0",
|
|
50
50
|
"@dhis2/d2-i18n": "^1.1.0",
|
|
51
51
|
"@testing-library/jest-dom": "^5.16.1",
|
|
52
52
|
"react": "16.13",
|
|
@@ -54,8 +54,6 @@
|
|
|
54
54
|
"styled-jsx": "^4.0.1"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
|
-
"build"
|
|
58
|
-
|
|
59
|
-
],
|
|
60
|
-
"types": "types"
|
|
57
|
+
"build"
|
|
58
|
+
]
|
|
61
59
|
}
|
package/types/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { ButtonProps } from '@dhis2-ui/button'
|
|
3
|
-
|
|
4
|
-
export interface SelectorBarProps {
|
|
5
|
-
children: React.ReactNode
|
|
6
|
-
additionalContent?: React.ReactNode
|
|
7
|
-
className?: string
|
|
8
|
-
dataTest?: string
|
|
9
|
-
disableClearSelections?: boolean
|
|
10
|
-
onClearSelectionClick?: ButtonProps['onClick']
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const SelectorBar: React.FC<SelectorBarProps>
|
|
14
|
-
|
|
15
|
-
export interface SelectorBarItemProps {
|
|
16
|
-
label: string
|
|
17
|
-
children: React.ReactNode
|
|
18
|
-
className?: string
|
|
19
|
-
dataTest?: string
|
|
20
|
-
disabled: boolean
|
|
21
|
-
displayOnly?: boolean
|
|
22
|
-
noValueMessage?: string
|
|
23
|
-
open?: boolean
|
|
24
|
-
setOpen?: (open: boolean) => void
|
|
25
|
-
value?: string
|
|
26
|
-
onClearSelectionClick: () => void
|
|
27
|
-
}
|