@dhis2-ui/organisation-unit-tree 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.
Files changed (110) hide show
  1. package/build/cjs/__e2e__/children_as_child_nodes.js +8 -11
  2. package/build/cjs/__e2e__/common.js +19 -26
  3. package/build/cjs/__e2e__/controlled_expanded.js +7 -10
  4. package/build/cjs/__e2e__/displaying_loading_error.js +1 -4
  5. package/build/cjs/__e2e__/expanded.js +25 -34
  6. package/build/cjs/__e2e__/force_reload.js +15 -22
  7. package/build/cjs/__e2e__/get-organisation-unit-data.js +25 -29
  8. package/build/cjs/__e2e__/highlight.js +7 -10
  9. package/build/cjs/__e2e__/loading_state.js +7 -13
  10. package/build/cjs/__e2e__/multi_selection.js +8 -11
  11. package/build/cjs/__e2e__/no_selection.js +15 -21
  12. package/build/cjs/__e2e__/path_based_filtering.js +16 -22
  13. package/build/cjs/__e2e__/single_selection.js +10 -16
  14. package/build/cjs/__e2e__/sub_unit_as_root.js +5 -7
  15. package/build/cjs/__e2e__/tree_api.js +15 -21
  16. package/build/cjs/__stories__/custom-expanded-imperative-open.js +7 -10
  17. package/build/cjs/__stories__/custom-node-label.js +4 -5
  18. package/build/cjs/__stories__/development-stories.js +6 -8
  19. package/build/cjs/__stories__/force-reload-all.js +1 -2
  20. package/build/cjs/__stories__/loading-error-grandchild.js +1 -4
  21. package/build/cjs/__stories__/loading.js +1 -4
  22. package/build/cjs/__stories__/multiple-roots.js +9 -12
  23. package/build/cjs/__stories__/root-error.js +1 -4
  24. package/build/cjs/__stories__/root-loading.js +1 -4
  25. package/build/cjs/__stories__/shared.js +46 -79
  26. package/build/cjs/features/controlled_expanded/index.js +3 -6
  27. package/build/cjs/locales/index.js +49 -27
  28. package/build/cjs/organisation-unit-node/error-message.js +10 -13
  29. package/build/cjs/organisation-unit-node/label/disabled-selection-label.js +9 -12
  30. package/build/cjs/organisation-unit-node/label/icon-empty.js +19 -22
  31. package/build/cjs/organisation-unit-node/label/icon-folder-closed.js +25 -28
  32. package/build/cjs/organisation-unit-node/label/icon-folder-open.js +34 -37
  33. package/build/cjs/organisation-unit-node/label/icon-single.js +28 -31
  34. package/build/cjs/organisation-unit-node/label/icon.js +6 -7
  35. package/build/cjs/organisation-unit-node/label/iconized-checkbox.js +12 -13
  36. package/build/cjs/organisation-unit-node/label/label-container.js +13 -16
  37. package/build/cjs/organisation-unit-node/label/label.js +27 -30
  38. package/build/cjs/organisation-unit-node/label/single-selection-label.js +18 -21
  39. package/build/cjs/organisation-unit-node/organisation-unit-node-children.js +27 -29
  40. package/build/cjs/organisation-unit-node/organisation-unit-node.js +22 -23
  41. package/build/cjs/organisation-unit-node/use-open-state.js +8 -9
  42. package/build/cjs/organisation-unit-node/use-org-children.js +14 -21
  43. package/build/cjs/organisation-unit-node/use-org-children.test.js +40 -59
  44. package/build/cjs/organisation-unit-node/use-org-data/use-org-data.js +13 -20
  45. package/build/cjs/organisation-unit-node/use-org-data/use-org-data.test.js +17 -27
  46. package/build/cjs/organisation-unit-tree/default-render-node-label/default-render-node-label.js +3 -6
  47. package/build/cjs/organisation-unit-tree/organisation-unit-tree-root-error.js +9 -12
  48. package/build/cjs/organisation-unit-tree/organisation-unit-tree-root-loading.js +10 -13
  49. package/build/cjs/organisation-unit-tree/organisation-unit-tree.js +24 -26
  50. package/build/cjs/organisation-unit-tree/use-expanded/create-expand-handlers.js +14 -17
  51. package/build/cjs/organisation-unit-tree/use-expanded/use-expanded.js +8 -9
  52. package/build/cjs/organisation-unit-tree/use-root-org-data/patch-missing-display-name.js +1 -2
  53. package/build/cjs/organisation-unit-tree/use-root-org-data/use-root-org-data.js +10 -14
  54. package/build/cjs/organisation-unit-tree/use-root-org-data/use-root-org-unit.test.js +32 -46
  55. package/build/es/__e2e__/children_as_child_nodes.js +8 -11
  56. package/build/es/__e2e__/common.js +18 -24
  57. package/build/es/__e2e__/controlled_expanded.js +6 -8
  58. package/build/es/__e2e__/displaying_loading_error.js +1 -4
  59. package/build/es/__e2e__/expanded.js +25 -34
  60. package/build/es/__e2e__/force_reload.js +14 -20
  61. package/build/es/__e2e__/get-organisation-unit-data.js +25 -29
  62. package/build/es/__e2e__/highlight.js +7 -10
  63. package/build/es/__e2e__/loading_state.js +7 -13
  64. package/build/es/__e2e__/multi_selection.js +8 -11
  65. package/build/es/__e2e__/no_selection.js +15 -21
  66. package/build/es/__e2e__/path_based_filtering.js +16 -22
  67. package/build/es/__e2e__/single_selection.js +10 -16
  68. package/build/es/__e2e__/sub_unit_as_root.js +4 -5
  69. package/build/es/__e2e__/tree_api.js +15 -21
  70. package/build/es/__stories__/custom-expanded-imperative-open.js +6 -8
  71. package/build/es/__stories__/custom-node-label.js +4 -5
  72. package/build/es/__stories__/development-stories.js +5 -6
  73. package/build/es/__stories__/loading-error-grandchild.js +1 -4
  74. package/build/es/__stories__/loading.js +1 -4
  75. package/build/es/__stories__/multiple-roots.js +9 -12
  76. package/build/es/__stories__/root-error.js +1 -4
  77. package/build/es/__stories__/root-loading.js +1 -4
  78. package/build/es/__stories__/shared.js +45 -77
  79. package/build/es/features/controlled_expanded/index.js +3 -6
  80. package/build/es/locales/index.js +40 -18
  81. package/build/es/organisation-unit-node/error-message.js +10 -13
  82. package/build/es/organisation-unit-node/label/disabled-selection-label.js +9 -12
  83. package/build/es/organisation-unit-node/label/icon-empty.js +19 -22
  84. package/build/es/organisation-unit-node/label/icon-folder-closed.js +25 -28
  85. package/build/es/organisation-unit-node/label/icon-folder-open.js +34 -37
  86. package/build/es/organisation-unit-node/label/icon-single.js +28 -31
  87. package/build/es/organisation-unit-node/label/icon.js +6 -7
  88. package/build/es/organisation-unit-node/label/iconized-checkbox.js +12 -13
  89. package/build/es/organisation-unit-node/label/label-container.js +13 -16
  90. package/build/es/organisation-unit-node/label/label.js +27 -30
  91. package/build/es/organisation-unit-node/label/single-selection-label.js +18 -21
  92. package/build/es/organisation-unit-node/organisation-unit-node-children.js +27 -29
  93. package/build/es/organisation-unit-node/organisation-unit-node.js +22 -23
  94. package/build/es/organisation-unit-node/use-open-state.js +8 -9
  95. package/build/es/organisation-unit-node/use-org-children.js +14 -21
  96. package/build/es/organisation-unit-node/use-org-children.test.js +40 -59
  97. package/build/es/organisation-unit-node/use-org-data/use-org-data.js +13 -20
  98. package/build/es/organisation-unit-node/use-org-data/use-org-data.test.js +17 -27
  99. package/build/es/organisation-unit-tree/default-render-node-label/default-render-node-label.js +3 -6
  100. package/build/es/organisation-unit-tree/organisation-unit-tree-root-error.js +9 -12
  101. package/build/es/organisation-unit-tree/organisation-unit-tree-root-loading.js +10 -13
  102. package/build/es/organisation-unit-tree/organisation-unit-tree.js +23 -24
  103. package/build/es/organisation-unit-tree/use-expanded/create-expand-handlers.js +14 -17
  104. package/build/es/organisation-unit-tree/use-expanded/use-expanded.js +8 -9
  105. package/build/es/organisation-unit-tree/use-root-org-data/patch-missing-display-name.js +1 -2
  106. package/build/es/organisation-unit-tree/use-root-org-data/use-root-org-data.js +10 -14
  107. package/build/es/organisation-unit-tree/use-root-org-data/use-root-org-unit.test.js +32 -46
  108. package/package.json +6 -6
  109. package/src/locales/index.js +57 -18
  110. package/src/organisation-unit-tree/use-root-org-data/use-root-org-unit.test.js +14 -14
@@ -5,10 +5,7 @@ import { customData, onChange } from './shared.js';
5
5
  export const Loading = () => /*#__PURE__*/React.createElement(CustomDataProvider, {
6
6
  data: {
7
7
  ...customData,
8
- organisationUnits: function () {
9
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10
- args[_key] = arguments[_key];
11
- }
8
+ organisationUnits: (...args) => {
12
9
  const [, {
13
10
  id
14
11
  }] = args;
@@ -1,16 +1,13 @@
1
1
  import React from 'react';
2
2
  import { OrganisationUnitTree } from '../index.js';
3
3
  import { createDecoratorCustomDataProvider, createDecoratorStatefulMultiSelection } from './shared.js';
4
- export const MultipleRoots = (_, _ref) => {
5
- let {
6
- onChange,
7
- selected
8
- } = _ref;
9
- return /*#__PURE__*/React.createElement(OrganisationUnitTree, {
10
- selected: selected,
11
- onChange: onChange,
12
- roots: ['A0000000000', 'A0000000001'],
13
- initiallyExpanded: ['/A0000000000/A0000000001']
14
- });
15
- };
4
+ export const MultipleRoots = (_, {
5
+ onChange,
6
+ selected
7
+ }) => /*#__PURE__*/React.createElement(OrganisationUnitTree, {
8
+ selected: selected,
9
+ onChange: onChange,
10
+ roots: ['A0000000000', 'A0000000001'],
11
+ initiallyExpanded: ['/A0000000000/A0000000001']
12
+ });
16
13
  MultipleRoots.decorators = [createDecoratorStatefulMultiSelection(), createDecoratorCustomDataProvider()];
@@ -5,10 +5,7 @@ import { customData, onChange } from './shared.js';
5
5
  export const RootError = () => /*#__PURE__*/React.createElement(CustomDataProvider, {
6
6
  data: {
7
7
  ...customData,
8
- organisationUnits: function () {
9
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10
- args[_key] = arguments[_key];
11
- }
8
+ organisationUnits: (...args) => {
12
9
  const [, {
13
10
  id
14
11
  }] = args;
@@ -5,10 +5,7 @@ import { customData, onChange } from './shared.js';
5
5
  export const RootLoading = () => /*#__PURE__*/React.createElement(CustomDataProvider, {
6
6
  data: {
7
7
  ...customData,
8
- organisationUnits: function () {
9
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10
- args[_key] = arguments[_key];
11
- }
8
+ organisationUnits: (...args) => {
12
9
  const [, {
13
10
  id
14
11
  }] = args;
@@ -2,60 +2,36 @@ import { CustomDataProvider } from '@dhis2/app-runtime';
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { useState } from 'react';
4
4
  export const log = true;
5
- export const onChange = function () {
6
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7
- args[_key] = arguments[_key];
8
- }
9
- return log && console.log('onChange', ...args);
10
- };
11
- export const onExpand = function () {
12
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
13
- args[_key2] = arguments[_key2];
14
- }
15
- return log && console.log('onExpand', ...args);
16
- };
17
- export const onCollapse = function () {
18
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
19
- args[_key3] = arguments[_key3];
20
- }
21
- return log && console.log('onCollapse', ...args);
22
- };
23
- export const onChildrenLoaded = function () {
24
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
25
- args[_key4] = arguments[_key4];
26
- }
27
- return log && console.log('onChildrenLoaded', ...args);
28
- };
29
- const createResponse = _ref => {
30
- let {
31
- fields,
32
- id,
33
- path,
34
- displayName,
5
+ export const onChange = (...args) => log && console.log('onChange', ...args);
6
+ export const onExpand = (...args) => log && console.log('onExpand', ...args);
7
+ export const onCollapse = (...args) => log && console.log('onCollapse', ...args);
8
+ export const onChildrenLoaded = (...args) => log && console.log('onChildrenLoaded', ...args);
9
+ const createResponse = ({
10
+ fields,
11
+ id,
12
+ path,
13
+ displayName,
14
+ children
15
+ }) => ({
16
+ ...(fields.includes('id') ? {
17
+ id
18
+ } : {}),
19
+ ...(fields.includes('path') ? {
20
+ path
21
+ } : {}),
22
+ ...(fields.includes('displayName') ? {
23
+ displayName
24
+ } : {}),
25
+ ...(fields.includes('children::size') ? {
26
+ children: children.length
27
+ } : {}),
28
+ ...(fields.includes('children[id,path,displayName]') ? {
35
29
  children
36
- } = _ref;
37
- return {
38
- ...(fields.includes('id') ? {
39
- id
40
- } : {}),
41
- ...(fields.includes('path') ? {
42
- path
43
- } : {}),
44
- ...(fields.includes('displayName') ? {
45
- displayName
46
- } : {}),
47
- ...(fields.includes('children::size') ? {
48
- children: children.length
49
- } : {}),
50
- ...(fields.includes('children[id,path,displayName]') ? {
51
- children
52
- } : {})
53
- };
54
- };
55
- export const getOrganisationUnitData = (id, _ref2) => {
56
- let {
57
- fields
58
- } = _ref2;
30
+ } : {})
31
+ });
32
+ export const getOrganisationUnitData = (id, {
33
+ fields
34
+ }) => {
59
35
  let data;
60
36
  if (id === 'A0000000000') {
61
37
  data = createResponse({
@@ -157,11 +133,10 @@ export const getOrganisationUnitData = (id, _ref2) => {
157
133
  return data;
158
134
  };
159
135
  export const customData = {
160
- organisationUnits: (_, _ref3) => {
161
- let {
162
- id,
163
- params = {}
164
- } = _ref3;
136
+ organisationUnits: (_, {
137
+ id,
138
+ params = {}
139
+ }) => {
165
140
  const data = getOrganisationUnitData(id, params);
166
141
  if (!data) {
167
142
  return Promise.reject(new Error('404 - Org unit not found'));
@@ -169,18 +144,14 @@ export const customData = {
169
144
  return Promise.resolve(data);
170
145
  }
171
146
  };
172
- export const StatefulMultiSelectionWrapper = _ref4 => {
173
- let {
174
- children,
175
- onSelectionChange = () => null
176
- } = _ref4;
147
+ export const StatefulMultiSelectionWrapper = ({
148
+ children,
149
+ onSelectionChange = () => null
150
+ }) => {
177
151
  const [selected, setSelected] = useState([]);
178
152
  return children({
179
153
  selected,
180
- onChange: function () {
181
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
182
- args[_key5] = arguments[_key5];
183
- }
154
+ onChange: (...args) => {
184
155
  onChange(...args);
185
156
  const [{
186
157
  selected: newSelected
@@ -197,16 +168,13 @@ StatefulMultiSelectionWrapper.propTypes = {
197
168
  export const createDecoratorStatefulMultiSelection = args => {
198
169
  return Story => /*#__PURE__*/React.createElement(StatefulMultiSelectionWrapper, {
199
170
  onSelectionChange: args === null || args === void 0 ? void 0 : args.onSelectionChange
200
- }, _ref5 => {
201
- let {
202
- selected,
203
- onChange
204
- } = _ref5;
205
- return /*#__PURE__*/React.createElement(Story, {
206
- selected: selected,
207
- onChange: onChange
208
- });
209
- });
171
+ }, ({
172
+ selected,
173
+ onChange
174
+ }) => /*#__PURE__*/React.createElement(Story, {
175
+ selected: selected,
176
+ onChange: onChange
177
+ }));
210
178
  };
211
179
  export const createDecoratorCustomDataProvider = args => {
212
180
  const data = (args === null || args === void 0 ? void 0 : args.data) || customData;
@@ -56,12 +56,9 @@ Then('the path should close', () => {
56
56
  const curData = getOrganisationUnitData(cur, {
57
57
  fields: ['children[id,path,displayName]']
58
58
  });
59
- const childrenIds = curData.children.map(_ref => {
60
- let {
61
- id
62
- } = _ref;
63
- return id;
64
- });
59
+ const childrenIds = curData.children.map(({
60
+ id
61
+ }) => id);
65
62
  return [...acc, ...childrenIds];
66
63
  }, []);
67
64
  expectOrgUnitsToNotBeDisplayed(hiddenChildrenIds);
@@ -26,22 +26,44 @@ import viTranslations from './vi/translations.json';
26
26
  import zhTranslations from './zh/translations.json';
27
27
  import zh_CNTranslations from './zh_CN/translations.json';
28
28
  const namespace = 'default';
29
- i18n.addResources('ar', namespace, arTranslations);
30
- i18n.addResources('cs', namespace, csTranslations);
31
- i18n.addResources('en', namespace, enTranslations);
32
- i18n.addResources('es', namespace, esTranslations);
33
- i18n.addResources('es_419', namespace, es_419Translations);
34
- i18n.addResources('fr', namespace, frTranslations);
35
- i18n.addResources('lo', namespace, loTranslations);
36
- i18n.addResources('nb', namespace, nbTranslations);
37
- i18n.addResources('nl', namespace, nlTranslations);
38
- i18n.addResources('pt', namespace, ptTranslations);
39
- i18n.addResources('ru', namespace, ruTranslations);
40
- i18n.addResources('uk', namespace, ukTranslations);
41
- i18n.addResources('uz_Latn', namespace, uz_LatnTranslations);
42
- i18n.addResources('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations);
43
- i18n.addResources('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations);
44
- i18n.addResources('vi', namespace, viTranslations);
45
- i18n.addResources('zh', namespace, zhTranslations);
46
- i18n.addResources('zh_CN', namespace, zh_CNTranslations);
29
+
30
+ // Use 'deep' = true and 'overwrite' = false to add to, but not overwrite,
31
+ // custom translations from the datastore (added by the app adapter)
32
+
33
+ i18n.addResourceBundle('ar', namespace, arTranslations, true, false);
34
+ i18n.addResourceBundle('ar', namespace, arTranslations, true, false);
35
+ i18n.addResourceBundle('cs', namespace, csTranslations, true, false);
36
+ i18n.addResourceBundle('cs', namespace, csTranslations, true, false);
37
+ i18n.addResourceBundle('en', namespace, enTranslations, true, false);
38
+ i18n.addResourceBundle('en', namespace, enTranslations, true, false);
39
+ i18n.addResourceBundle('es', namespace, esTranslations, true, false);
40
+ i18n.addResourceBundle('es', namespace, esTranslations, true, false);
41
+ i18n.addResourceBundle('es_419', namespace, es_419Translations, true, false);
42
+ i18n.addResourceBundle('es-419', namespace, es_419Translations, true, false);
43
+ i18n.addResourceBundle('fr', namespace, frTranslations, true, false);
44
+ i18n.addResourceBundle('fr', namespace, frTranslations, true, false);
45
+ i18n.addResourceBundle('lo', namespace, loTranslations, true, false);
46
+ i18n.addResourceBundle('lo', namespace, loTranslations, true, false);
47
+ i18n.addResourceBundle('nb', namespace, nbTranslations, true, false);
48
+ i18n.addResourceBundle('nb', namespace, nbTranslations, true, false);
49
+ i18n.addResourceBundle('nl', namespace, nlTranslations, true, false);
50
+ i18n.addResourceBundle('nl', namespace, nlTranslations, true, false);
51
+ i18n.addResourceBundle('pt', namespace, ptTranslations, true, false);
52
+ i18n.addResourceBundle('pt', namespace, ptTranslations, true, false);
53
+ i18n.addResourceBundle('ru', namespace, ruTranslations, true, false);
54
+ i18n.addResourceBundle('ru', namespace, ruTranslations, true, false);
55
+ i18n.addResourceBundle('uk', namespace, ukTranslations, true, false);
56
+ i18n.addResourceBundle('uk', namespace, ukTranslations, true, false);
57
+ i18n.addResourceBundle('uz_Latn', namespace, uz_LatnTranslations, true, false);
58
+ i18n.addResourceBundle('uz-Latn', namespace, uz_LatnTranslations, true, false);
59
+ i18n.addResourceBundle('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations, true, false);
60
+ i18n.addResourceBundle('uz-Cyrl-UZ', namespace, uz_UZ_CyrlTranslations, true, false);
61
+ i18n.addResourceBundle('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations, true, false);
62
+ i18n.addResourceBundle('uz-Latn-UZ', namespace, uz_UZ_LatnTranslations, true, false);
63
+ i18n.addResourceBundle('vi', namespace, viTranslations, true, false);
64
+ i18n.addResourceBundle('vi', namespace, viTranslations, true, false);
65
+ i18n.addResourceBundle('zh', namespace, zhTranslations, true, false);
66
+ i18n.addResourceBundle('zh', namespace, zhTranslations, true, false);
67
+ i18n.addResourceBundle('zh_CN', namespace, zh_CNTranslations, true, false);
68
+ i18n.addResourceBundle('zh-CN', namespace, zh_CNTranslations, true, false);
47
69
  export default i18n;
@@ -2,19 +2,16 @@ import _JSXStyle from "styled-jsx/style";
2
2
  import { colors, spacers, theme } from '@dhis2/ui-constants';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
- export const ErrorMessage = _ref => {
6
- let {
7
- children,
8
- dataTest
9
- } = _ref;
10
- return /*#__PURE__*/React.createElement("span", {
11
- "data-test": `${dataTest}-error`,
12
- className: _JSXStyle.dynamic([["3198585030", [colors.grey800, spacers.dp4, theme.error]]])
13
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
14
- id: "3198585030",
15
- dynamic: [colors.grey800, spacers.dp4, theme.error]
16
- }, [`span.__jsx-style-dynamic-selector{font-size:14px;color:${colors.grey800};margin:${spacers.dp4};color:${theme.error};}`]));
17
- };
5
+ export const ErrorMessage = ({
6
+ children,
7
+ dataTest
8
+ }) => /*#__PURE__*/React.createElement("span", {
9
+ "data-test": `${dataTest}-error`,
10
+ className: _JSXStyle.dynamic([["3198585030", [colors.grey800, spacers.dp4, theme.error]]])
11
+ }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
12
+ id: "3198585030",
13
+ dynamic: [colors.grey800, spacers.dp4, theme.error]
14
+ }, [`span.__jsx-style-dynamic-selector{font-size:14px;color:${colors.grey800};margin:${spacers.dp4};color:${theme.error};}`]));
18
15
  ErrorMessage.propTypes = {
19
16
  children: PropTypes.any.isRequired,
20
17
  dataTest: PropTypes.string.isRequired
@@ -9,18 +9,15 @@ import { SingleSelectionLabel } from './single-selection-label.js';
9
9
  * @param {bool} [props.loading]
10
10
  * @returns {React.Component}
11
11
  */
12
- export const DisabledSelectionLabel = _ref => {
13
- let {
14
- children,
15
- loading,
16
- onToggleOpen
17
- } = _ref;
18
- return /*#__PURE__*/React.createElement(SingleSelectionLabel, {
19
- checked: false,
20
- loading: loading,
21
- onChange: onToggleOpen
22
- }, children);
23
- };
12
+ export const DisabledSelectionLabel = ({
13
+ children,
14
+ loading,
15
+ onToggleOpen
16
+ }) => /*#__PURE__*/React.createElement(SingleSelectionLabel, {
17
+ checked: false,
18
+ loading: loading,
19
+ onChange: onToggleOpen
20
+ }, children);
24
21
  DisabledSelectionLabel.propTypes = {
25
22
  children: PropTypes.any.isRequired,
26
23
  onToggleOpen: PropTypes.func.isRequired,
@@ -1,28 +1,25 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
- export const IconEmpty = _ref => {
5
- let {
6
- dataTest
7
- } = _ref;
8
- return /*#__PURE__*/React.createElement("svg", {
9
- height: "18px",
10
- version: "1.1",
11
- viewBox: "0 0 18 18",
12
- width: "18px",
13
- "data-test": `${dataTest}-iconempty`,
14
- className: "jsx-3201893673"
15
- }, /*#__PURE__*/React.createElement("g", {
16
- fill: "none",
17
- fillRule: "evenodd",
18
- id: "icon/empty",
19
- stroke: "none",
20
- strokeWidth: "1",
21
- className: "jsx-3201893673"
22
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
23
- id: "3201893673"
24
- }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
25
- };
4
+ export const IconEmpty = ({
5
+ dataTest
6
+ }) => /*#__PURE__*/React.createElement("svg", {
7
+ height: "18px",
8
+ version: "1.1",
9
+ viewBox: "0 0 18 18",
10
+ width: "18px",
11
+ "data-test": `${dataTest}-iconempty`,
12
+ className: "jsx-3201893673"
13
+ }, /*#__PURE__*/React.createElement("g", {
14
+ fill: "none",
15
+ fillRule: "evenodd",
16
+ id: "icon/empty",
17
+ stroke: "none",
18
+ strokeWidth: "1",
19
+ className: "jsx-3201893673"
20
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
21
+ id: "3201893673"
22
+ }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
26
23
  IconEmpty.propTypes = {
27
24
  dataTest: PropTypes.string.isRequired
28
25
  };
@@ -1,34 +1,31 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
- export const IconFolderClosed = _ref => {
5
- let {
6
- dataTest
7
- } = _ref;
8
- return /*#__PURE__*/React.createElement("svg", {
9
- width: "18px",
10
- height: "18px",
11
- viewBox: "0 0 18 18",
12
- version: "1.1",
13
- "data-test": `${dataTest}-iconfolderclosed`,
14
- className: "jsx-3201893673"
15
- }, /*#__PURE__*/React.createElement("g", {
16
- id: "icon/folder/closed",
17
- stroke: "none",
18
- strokeWidth: "1",
19
- fill: "none",
20
- fillRule: "evenodd",
21
- className: "jsx-3201893673"
22
- }, /*#__PURE__*/React.createElement("path", {
23
- d: "M2,3.5 C1.17157288,3.5 0.5,4.17157288 0.5,5 L0.5,13 C0.5,13.8284271 1.17157288,14.5 2,14.5 L12,14.5 C12.8284271,14.5 13.5,13.8284271 13.5,13 L13.5,7 C13.5,6.17157288 12.8284271,5.5 12,5.5 L6.69098301,5.5 L5.82917961,3.7763932 C5.7444836,3.60700119 5.57135204,3.5 5.38196601,3.5 L2,3.5 Z",
24
- id: "Path-2",
25
- stroke: "#6C7787",
26
- fill: "#D5DDE5",
27
- className: "jsx-3201893673"
28
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
29
- id: "3201893673"
30
- }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
31
- };
4
+ export const IconFolderClosed = ({
5
+ dataTest
6
+ }) => /*#__PURE__*/React.createElement("svg", {
7
+ width: "18px",
8
+ height: "18px",
9
+ viewBox: "0 0 18 18",
10
+ version: "1.1",
11
+ "data-test": `${dataTest}-iconfolderclosed`,
12
+ className: "jsx-3201893673"
13
+ }, /*#__PURE__*/React.createElement("g", {
14
+ id: "icon/folder/closed",
15
+ stroke: "none",
16
+ strokeWidth: "1",
17
+ fill: "none",
18
+ fillRule: "evenodd",
19
+ className: "jsx-3201893673"
20
+ }, /*#__PURE__*/React.createElement("path", {
21
+ d: "M2,3.5 C1.17157288,3.5 0.5,4.17157288 0.5,5 L0.5,13 C0.5,13.8284271 1.17157288,14.5 2,14.5 L12,14.5 C12.8284271,14.5 13.5,13.8284271 13.5,13 L13.5,7 C13.5,6.17157288 12.8284271,5.5 12,5.5 L6.69098301,5.5 L5.82917961,3.7763932 C5.7444836,3.60700119 5.57135204,3.5 5.38196601,3.5 L2,3.5 Z",
22
+ id: "Path-2",
23
+ stroke: "#6C7787",
24
+ fill: "#D5DDE5",
25
+ className: "jsx-3201893673"
26
+ })), /*#__PURE__*/React.createElement(_JSXStyle, {
27
+ id: "3201893673"
28
+ }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
32
29
  IconFolderClosed.propTypes = {
33
30
  dataTest: PropTypes.string.isRequired
34
31
  };
@@ -1,43 +1,40 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
- export const IconFolderOpen = _ref => {
5
- let {
6
- dataTest
7
- } = _ref;
8
- return /*#__PURE__*/React.createElement("svg", {
9
- width: "18px",
10
- height: "18px",
11
- viewBox: "0 0 18 18",
12
- version: "1.1",
13
- "data-test": `${dataTest}-iconfolderopen`,
14
- className: "jsx-2091325045"
15
- }, /*#__PURE__*/React.createElement("g", {
16
- id: "icon/folder/open",
17
- stroke: "none",
18
- strokeWidth: "1",
19
- fill: "none",
20
- fillRule: "evenodd",
21
- className: "jsx-2091325045"
22
- }, /*#__PURE__*/React.createElement("g", {
23
- id: "Group",
24
- transform: "translate(0.000000, 3.000000)",
25
- stroke: "#6C7787",
26
- className: "jsx-2091325045"
27
- }, /*#__PURE__*/React.createElement("path", {
28
- d: "M2,0.5 C1.17157288,0.5 0.5,1.17157288 0.5,2 L0.5,10 C0.5,10.8284271 1.17157288,11.5 2,11.5 L12,11.5 C12.8284271,11.5 13.5,10.8284271 13.5,10 L13.5,4 C13.5,3.17157288 12.8284271,2.5 12,2.5 L6.69098301,2.5 L5.82917961,0.776393202 C5.7444836,0.607001188 5.57135204,0.5 5.38196601,0.5 L2,0.5 Z",
29
- id: "Path-2",
30
- fill: "#A0ADBA",
31
- className: "jsx-2091325045"
32
- }), /*#__PURE__*/React.createElement("path", {
33
- d: "M1.53632259,10.7093809 C1.47575089,10.7941813 1.44318932,10.8957885 1.44318932,11 C1.44318932,11.2761424 1.66704695,11.5 1.94318932,11.5 L12.4853821,11.5 C12.6468577,11.5 12.7983931,11.4220172 12.8922488,11.2906191 L16.4636774,6.2906191 C16.5242491,6.20581872 16.5568107,6.10421149 16.5568107,6 C16.5568107,5.72385763 16.3329531,5.5 16.0568107,5.5 L5.5146179,5.5 C5.35314234,5.5 5.20160692,5.57798284 5.10775116,5.7093809 L1.53632259,10.7093809 Z",
34
- id: "Path-3",
35
- fill: "#FBFCFD",
36
- className: "jsx-2091325045"
37
- }))), /*#__PURE__*/React.createElement(_JSXStyle, {
38
- id: "2091325045"
39
- }, ["svg.jsx-2091325045{margin:3px 0;display:block;}"]));
40
- };
4
+ export const IconFolderOpen = ({
5
+ dataTest
6
+ }) => /*#__PURE__*/React.createElement("svg", {
7
+ width: "18px",
8
+ height: "18px",
9
+ viewBox: "0 0 18 18",
10
+ version: "1.1",
11
+ "data-test": `${dataTest}-iconfolderopen`,
12
+ className: "jsx-2091325045"
13
+ }, /*#__PURE__*/React.createElement("g", {
14
+ id: "icon/folder/open",
15
+ stroke: "none",
16
+ strokeWidth: "1",
17
+ fill: "none",
18
+ fillRule: "evenodd",
19
+ className: "jsx-2091325045"
20
+ }, /*#__PURE__*/React.createElement("g", {
21
+ id: "Group",
22
+ transform: "translate(0.000000, 3.000000)",
23
+ stroke: "#6C7787",
24
+ className: "jsx-2091325045"
25
+ }, /*#__PURE__*/React.createElement("path", {
26
+ d: "M2,0.5 C1.17157288,0.5 0.5,1.17157288 0.5,2 L0.5,10 C0.5,10.8284271 1.17157288,11.5 2,11.5 L12,11.5 C12.8284271,11.5 13.5,10.8284271 13.5,10 L13.5,4 C13.5,3.17157288 12.8284271,2.5 12,2.5 L6.69098301,2.5 L5.82917961,0.776393202 C5.7444836,0.607001188 5.57135204,0.5 5.38196601,0.5 L2,0.5 Z",
27
+ id: "Path-2",
28
+ fill: "#A0ADBA",
29
+ className: "jsx-2091325045"
30
+ }), /*#__PURE__*/React.createElement("path", {
31
+ d: "M1.53632259,10.7093809 C1.47575089,10.7941813 1.44318932,10.8957885 1.44318932,11 C1.44318932,11.2761424 1.66704695,11.5 1.94318932,11.5 L12.4853821,11.5 C12.6468577,11.5 12.7983931,11.4220172 12.8922488,11.2906191 L16.4636774,6.2906191 C16.5242491,6.20581872 16.5568107,6.10421149 16.5568107,6 C16.5568107,5.72385763 16.3329531,5.5 16.0568107,5.5 L5.5146179,5.5 C5.35314234,5.5 5.20160692,5.57798284 5.10775116,5.7093809 L1.53632259,10.7093809 Z",
32
+ id: "Path-3",
33
+ fill: "#FBFCFD",
34
+ className: "jsx-2091325045"
35
+ }))), /*#__PURE__*/React.createElement(_JSXStyle, {
36
+ id: "2091325045"
37
+ }, ["svg.jsx-2091325045{margin:3px 0;display:block;}"]));
41
38
  IconFolderOpen.propTypes = {
42
39
  dataTest: PropTypes.string.isRequired
43
40
  };
@@ -1,37 +1,34 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
- export const IconSingle = _ref => {
5
- let {
6
- dataTest
7
- } = _ref;
8
- return /*#__PURE__*/React.createElement("svg", {
9
- height: "18px",
10
- version: "1.1",
11
- viewBox: "0 0 18 18",
12
- width: "18px",
13
- "data-test": `${dataTest}-iconsingle`,
14
- className: "jsx-3201893673"
15
- }, /*#__PURE__*/React.createElement("g", {
16
- fill: "none",
17
- fillRule: "evenodd",
18
- id: "icon/single",
19
- stroke: "none",
20
- strokeWidth: "1",
21
- className: "jsx-3201893673"
22
- }, /*#__PURE__*/React.createElement("rect", {
23
- fill: "#A0ADBA",
24
- height: "4",
25
- id: "Rectangle",
26
- rx: "1",
27
- width: "4",
28
- x: "7",
29
- y: "7",
30
- className: "jsx-3201893673"
31
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
32
- id: "3201893673"
33
- }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
34
- };
4
+ export const IconSingle = ({
5
+ dataTest
6
+ }) => /*#__PURE__*/React.createElement("svg", {
7
+ height: "18px",
8
+ version: "1.1",
9
+ viewBox: "0 0 18 18",
10
+ width: "18px",
11
+ "data-test": `${dataTest}-iconsingle`,
12
+ className: "jsx-3201893673"
13
+ }, /*#__PURE__*/React.createElement("g", {
14
+ fill: "none",
15
+ fillRule: "evenodd",
16
+ id: "icon/single",
17
+ stroke: "none",
18
+ strokeWidth: "1",
19
+ className: "jsx-3201893673"
20
+ }, /*#__PURE__*/React.createElement("rect", {
21
+ fill: "#A0ADBA",
22
+ height: "4",
23
+ id: "Rectangle",
24
+ rx: "1",
25
+ width: "4",
26
+ x: "7",
27
+ y: "7",
28
+ className: "jsx-3201893673"
29
+ })), /*#__PURE__*/React.createElement(_JSXStyle, {
30
+ id: "3201893673"
31
+ }, ["svg.jsx-3201893673{display:block;margin:3px 0;}"]));
35
32
  IconSingle.propTypes = {
36
33
  dataTest: PropTypes.string.isRequired
37
34
  };
@@ -11,13 +11,12 @@ import { IconSingle } from './icon-single.js';
11
11
  * @param {bool} props.open
12
12
  * @returns {React.Component}
13
13
  */
14
- export const Icon = _ref => {
15
- let {
16
- loading,
17
- hasChildren,
18
- open,
19
- dataTest
20
- } = _ref;
14
+ export const Icon = ({
15
+ loading,
16
+ hasChildren,
17
+ open,
18
+ dataTest
19
+ }) => {
21
20
  if (loading) {
22
21
  return /*#__PURE__*/React.createElement(IconEmpty, {
23
22
  dataTest: dataTest