@dhis2-ui/file-input 10.16.2 → 10.16.3-alpha.1

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 (104) hide show
  1. package/package.json +10 -9
  2. package/src/file-input/__tests__/file-input.test.js +28 -0
  3. package/src/file-input/features/accepts_multiple_files/index.js +32 -0
  4. package/src/file-input/features/accepts_multiple_files.feature +8 -0
  5. package/src/file-input/features/can_be_blurred/index.js +23 -0
  6. package/src/file-input/features/can_be_blurred.feature +6 -0
  7. package/src/file-input/features/can_be_changed/index.js +26 -0
  8. package/src/file-input/features/can_be_changed.feature +8 -0
  9. package/src/file-input/features/can_be_focused/index.js +22 -0
  10. package/src/file-input/features/can_be_focused.feature +6 -0
  11. package/src/file-input/features/common/index.js +21 -0
  12. package/src/file-input/file-input.e2e.stories.js +46 -0
  13. package/src/file-input/file-input.js +159 -0
  14. package/src/file-input/file-input.prod.stories.js +82 -0
  15. package/src/file-input/index.js +1 -0
  16. package/src/file-input-field/__tests__/file-input-field.test.js +29 -0
  17. package/src/file-input-field/features/can_be_required/index.js +9 -0
  18. package/src/file-input-field/features/can_be_required.feature +5 -0
  19. package/src/file-input-field/features/has_default_button_label/index.js +9 -0
  20. package/src/file-input-field/features/has_default_button_label.feature +5 -0
  21. package/src/file-input-field/features/has_default_placeholder/index.js +9 -0
  22. package/src/file-input-field/features/has_default_placeholder.feature +5 -0
  23. package/src/file-input-field/file-input-field.e2e.stories.js +15 -0
  24. package/src/file-input-field/file-input-field.js +139 -0
  25. package/src/file-input-field/file-input-field.prod.stories.js +167 -0
  26. package/src/file-input-field/index.js +1 -0
  27. package/src/file-input-field-with-list/__tests__/file-input-field-with-list.test.js +30 -0
  28. package/src/file-input-field-with-list/features/common/index.js +18 -0
  29. package/src/file-input-field-with-list/features/deduplicates_the_file_list/index.js +43 -0
  30. package/src/file-input-field-with-list/features/deduplicates_the_file_list.feature +8 -0
  31. package/src/file-input-field-with-list/features/disables_button_when_full/index.js +13 -0
  32. package/src/file-input-field-with-list/features/disables_button_when_full.feature +6 -0
  33. package/src/file-input-field-with-list/features/displays_files_in_a_list/index.js +7 -0
  34. package/src/file-input-field-with-list/features/displays_files_in_a_list.feature +5 -0
  35. package/src/file-input-field-with-list/features/files_can_be_removed/index.js +24 -0
  36. package/src/file-input-field-with-list/features/files_can_be_removed.feature +7 -0
  37. package/src/file-input-field-with-list/features/has_default_button_label/index.js +9 -0
  38. package/src/file-input-field-with-list/features/has_default_button_label.feature +5 -0
  39. package/src/file-input-field-with-list/features/has_default_placeholder/index.js +9 -0
  40. package/src/file-input-field-with-list/features/has_default_placeholder.feature +5 -0
  41. package/src/file-input-field-with-list/features/has_default_remove_text/index.js +9 -0
  42. package/src/file-input-field-with-list/features/has_default_remove_text.feature +5 -0
  43. package/src/file-input-field-with-list/file-input-field-with-list.e2e.stories.js +73 -0
  44. package/src/file-input-field-with-list/file-input-field-with-list.js +188 -0
  45. package/src/file-input-field-with-list/file-input-field-with-list.prod.stories.js +67 -0
  46. package/src/file-input-field-with-list/file-list-item-with-remove.js +34 -0
  47. package/src/file-input-field-with-list/index.js +1 -0
  48. package/src/file-list/features/accepts_cancel_text/index.js +14 -0
  49. package/src/file-list/features/accepts_cancel_text.feature +5 -0
  50. package/src/file-list/features/accepts_label/index.js +11 -0
  51. package/src/file-list/features/accepts_label.feature +5 -0
  52. package/src/file-list/features/accepts_remove_text/index.js +11 -0
  53. package/src/file-list/features/accepts_remove_text.feature +5 -0
  54. package/src/file-list/features/can_be_removed/index.js +15 -0
  55. package/src/file-list/features/can_be_removed.feature +6 -0
  56. package/src/file-list/features/file-list-item-accepts_children/index.js +10 -0
  57. package/src/file-list/features/file-list-item-accepts_children.feature +5 -0
  58. package/src/file-list/features/file-list-placeholder-accepts_children/index.js +12 -0
  59. package/src/file-list/features/file-list-placeholder-accepts_children.feature +5 -0
  60. package/src/file-list/features/loading_can_be_cancelled/index.js +15 -0
  61. package/src/file-list/features/loading_can_be_cancelled.feature +6 -0
  62. package/src/file-list/file-list-item.e2e.stories.js +39 -0
  63. package/src/file-list/file-list-item.js +131 -0
  64. package/src/file-list/file-list-placeholder.e2e.stories.js +7 -0
  65. package/src/file-list/file-list-placeholder.js +27 -0
  66. package/src/file-list/file-list.e2e.stories.js +5 -0
  67. package/src/file-list/file-list.js +28 -0
  68. package/src/file-list/index.js +3 -0
  69. package/src/index.js +9 -0
  70. package/src/locales/ar/translations.json +5 -0
  71. package/src/locales/ar_IQ/translations.json +5 -0
  72. package/src/locales/ckb/translations.json +5 -0
  73. package/src/locales/cs/translations.json +5 -0
  74. package/src/locales/da/translations.json +5 -0
  75. package/src/locales/en/translations.json +5 -0
  76. package/src/locales/es/translations.json +5 -0
  77. package/src/locales/es_419/translations.json +5 -0
  78. package/src/locales/fr/translations.json +5 -0
  79. package/src/locales/hi_IN/translations.json +5 -0
  80. package/src/locales/id/translations.json +5 -0
  81. package/src/locales/index.js +82 -0
  82. package/src/locales/km/translations.json +5 -0
  83. package/src/locales/ko_KR/translations.json +5 -0
  84. package/src/locales/lo/translations.json +5 -0
  85. package/src/locales/my/translations.json +5 -0
  86. package/src/locales/nb/translations.json +5 -0
  87. package/src/locales/nl/translations.json +5 -0
  88. package/src/locales/prs/translations.json +5 -0
  89. package/src/locales/ps/translations.json +5 -0
  90. package/src/locales/pt/translations.json +5 -0
  91. package/src/locales/pt_BR/translations.json +5 -0
  92. package/src/locales/ru/translations.json +5 -0
  93. package/src/locales/si/translations.json +5 -0
  94. package/src/locales/sv/translations.json +5 -0
  95. package/src/locales/tet/translations.json +5 -0
  96. package/src/locales/tg/translations.json +5 -0
  97. package/src/locales/uk/translations.json +5 -0
  98. package/src/locales/ur/translations.json +5 -0
  99. package/src/locales/uz_Latn/translations.json +5 -0
  100. package/src/locales/uz_UZ_Cyrl/translations.json +5 -0
  101. package/src/locales/uz_UZ_Latn/translations.json +5 -0
  102. package/src/locales/vi/translations.json +5 -0
  103. package/src/locales/zh/translations.json +5 -0
  104. package/src/locales/zh_CN/translations.json +5 -0
@@ -0,0 +1,28 @@
1
+ import PropTypes from 'prop-types'
2
+ import React from 'react'
3
+
4
+ const FileList = ({
5
+ children,
6
+ className,
7
+ dataTest = 'dhis2-uicore-filelist',
8
+ }) => (
9
+ <div className={className} data-test={dataTest}>
10
+ {children}
11
+ <style jsx>{`
12
+ div {
13
+ padding-top: 4px;
14
+ }
15
+ :global(.file-input) + div {
16
+ padding-top: 0;
17
+ }
18
+ `}</style>
19
+ </div>
20
+ )
21
+
22
+ FileList.propTypes = {
23
+ children: PropTypes.node,
24
+ className: PropTypes.string,
25
+ dataTest: PropTypes.string,
26
+ }
27
+
28
+ export { FileList }
@@ -0,0 +1,3 @@
1
+ export { FileList } from './file-list.js'
2
+ export { FileListItem } from './file-list-item.js'
3
+ export { FileListPlaceholder } from './file-list-placeholder.js'
package/src/index.js ADDED
@@ -0,0 +1,9 @@
1
+ export { FileInput } from './file-input/index.js'
2
+ export {
3
+ FileList,
4
+ FileListItem,
5
+ FileListPlaceholder,
6
+ } from './file-list/index.js'
7
+
8
+ export { FileInputField } from './file-input-field/index.js'
9
+ export { FileInputFieldWithList } from './file-input-field-with-list/index.js'
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "قم بتحميل ملف",
3
+ "No file uploaded yet": "لم يتم تحميل أي ملف حتى الآن",
4
+ "Remove": "إزلة"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "إزالة"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "لابردن"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Nahrát soubor",
3
+ "No file uploaded yet": "Zatím nebyl nahrán žádný soubor",
4
+ "Remove": "Odebrat"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Remove"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Upload a file",
3
+ "No file uploaded yet": "No file uploaded yet",
4
+ "Remove": "Remove"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Subir un archivo",
3
+ "No file uploaded yet": "Aún no se ha subido ningún archivo",
4
+ "Remove": "Eliminar"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Cargar un archivo",
3
+ "No file uploaded yet": "Aún no se ha cargado ningún archivo",
4
+ "Remove": "Eliminar"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Télécharger un fichier",
3
+ "No file uploaded yet": "Aucun fichier n'a encore été téléchargé",
4
+ "Remove": "Supprimer"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "फ़ाइल अपलोड करें",
3
+ "No file uploaded yet": "अभी तक कोई फ़ाइल अपलोड नहीं की गई है",
4
+ "Remove": "हटाएं"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "mengungah file",
3
+ "No file uploaded yet": "belum ada file yang diungah",
4
+ "Remove": "Hapus"
5
+ }
@@ -0,0 +1,82 @@
1
+ //------------------------------------------------------------------------------
2
+ // <auto-generated>
3
+ // This code was generated by d2-i18n-generate.
4
+ //
5
+ // Changes to this file may cause incorrect behavior and will be lost if
6
+ // the code is regenerated.
7
+ // </auto-generated>
8
+ //------------------------------------------------------------------------------
9
+ import i18n from '@dhis2/d2-i18n'
10
+
11
+ import arTranslations from './ar/translations.json'
12
+ import ar_IQTranslations from './ar_IQ/translations.json'
13
+ import ckbTranslations from './ckb/translations.json'
14
+ import csTranslations from './cs/translations.json'
15
+ import daTranslations from './da/translations.json'
16
+ import enTranslations from './en/translations.json'
17
+ import esTranslations from './es/translations.json'
18
+ import es_419Translations from './es_419/translations.json'
19
+ import frTranslations from './fr/translations.json'
20
+ import hi_INTranslations from './hi_IN/translations.json'
21
+ import idTranslations from './id/translations.json'
22
+ import kmTranslations from './km/translations.json'
23
+ import ko_KRTranslations from './ko_KR/translations.json'
24
+ import loTranslations from './lo/translations.json'
25
+ import myTranslations from './my/translations.json'
26
+ import nbTranslations from './nb/translations.json'
27
+ import nlTranslations from './nl/translations.json'
28
+ import prsTranslations from './prs/translations.json'
29
+ import psTranslations from './ps/translations.json'
30
+ import ptTranslations from './pt/translations.json'
31
+ import pt_BRTranslations from './pt_BR/translations.json'
32
+ import ruTranslations from './ru/translations.json'
33
+ import siTranslations from './si/translations.json'
34
+ import svTranslations from './sv/translations.json'
35
+ import tetTranslations from './tet/translations.json'
36
+ import tgTranslations from './tg/translations.json'
37
+ import ukTranslations from './uk/translations.json'
38
+ import urTranslations from './ur/translations.json'
39
+ import uz_LatnTranslations from './uz_Latn/translations.json'
40
+ import uz_UZ_CyrlTranslations from './uz_UZ_Cyrl/translations.json'
41
+ import uz_UZ_LatnTranslations from './uz_UZ_Latn/translations.json'
42
+ import viTranslations from './vi/translations.json'
43
+ import zhTranslations from './zh/translations.json'
44
+ import zh_CNTranslations from './zh_CN/translations.json'
45
+
46
+ const namespace = 'default'
47
+ i18n.addResources('ar', namespace, arTranslations)
48
+ i18n.addResources('ar_IQ', namespace, ar_IQTranslations)
49
+ i18n.addResources('ckb', namespace, ckbTranslations)
50
+ i18n.addResources('cs', namespace, csTranslations)
51
+ i18n.addResources('da', namespace, daTranslations)
52
+ i18n.addResources('en', namespace, enTranslations)
53
+ i18n.addResources('es', namespace, esTranslations)
54
+ i18n.addResources('es_419', namespace, es_419Translations)
55
+ i18n.addResources('fr', namespace, frTranslations)
56
+ i18n.addResources('hi_IN', namespace, hi_INTranslations)
57
+ i18n.addResources('id', namespace, idTranslations)
58
+ i18n.addResources('km', namespace, kmTranslations)
59
+ i18n.addResources('ko_KR', namespace, ko_KRTranslations)
60
+ i18n.addResources('lo', namespace, loTranslations)
61
+ i18n.addResources('my', namespace, myTranslations)
62
+ i18n.addResources('nb', namespace, nbTranslations)
63
+ i18n.addResources('nl', namespace, nlTranslations)
64
+ i18n.addResources('prs', namespace, prsTranslations)
65
+ i18n.addResources('ps', namespace, psTranslations)
66
+ i18n.addResources('pt', namespace, ptTranslations)
67
+ i18n.addResources('pt_BR', namespace, pt_BRTranslations)
68
+ i18n.addResources('ru', namespace, ruTranslations)
69
+ i18n.addResources('si', namespace, siTranslations)
70
+ i18n.addResources('sv', namespace, svTranslations)
71
+ i18n.addResources('tet', namespace, tetTranslations)
72
+ i18n.addResources('tg', namespace, tgTranslations)
73
+ i18n.addResources('uk', namespace, ukTranslations)
74
+ i18n.addResources('ur', namespace, urTranslations)
75
+ i18n.addResources('uz_Latn', namespace, uz_LatnTranslations)
76
+ i18n.addResources('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations)
77
+ i18n.addResources('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations)
78
+ i18n.addResources('vi', namespace, viTranslations)
79
+ i18n.addResources('zh', namespace, zhTranslations)
80
+ i18n.addResources('zh_CN', namespace, zh_CNTranslations)
81
+
82
+ export default i18n
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "ផ្ញើឯកសារ",
3
+ "No file uploaded yet": "",
4
+ "Remove": "យកចេញ"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "파일 업로드",
3
+ "No file uploaded yet": "아직 파일이 업로드 되지않았습니다.",
4
+ "Remove": "제거"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "ອັບໂຫຼດເອກະສານ",
3
+ "No file uploaded yet": "ຍັງບໍ່ມີເອກະສານອັບໂຫຼດເທື່ອ",
4
+ "Remove": "ລົບອອກ"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "ဖယ်ရှားခြင်း"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Last opp en fil",
3
+ "No file uploaded yet": "Ingen fil lastet opp ennå",
4
+ "Remove": "Fjern"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Een bestand uploaden",
3
+ "No file uploaded yet": "Er is nog geen bestand geüpload",
4
+ "Remove": "Verwijderen"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "حذف"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "لرې کول"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Carregar um ficheiro",
3
+ "No file uploaded yet": "Nenhum ficheiro carregado",
4
+ "Remove": "Remover"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Remover"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Загрузить файл",
3
+ "No file uploaded yet": "Файл еще не загружен",
4
+ "Remove": "Убрать"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "ඉවත් කරන්න"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Avlägsna"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Hasai"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Тоза кардан"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Вивантажити файл",
3
+ "No file uploaded yet": "Файл ще не вивантажено",
4
+ "Remove": "Видалити"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "حذف"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Олиб ташлаш"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Олиб ташлаш"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Олиб ташлаш"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "Tải lên một tệp",
3
+ "No file uploaded yet": "",
4
+ "Remove": "Tháo ra"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "上传一个文件",
3
+ "No file uploaded yet": "还没有上传文件",
4
+ "Remove": "移除"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Upload a file": "上传文件",
3
+ "No file uploaded yet": "尚未上传文件",
4
+ "Remove": "移除"
5
+ }