@variocube/app-ui 1.14.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.
Files changed (644) hide show
  1. package/README.md +65 -0
  2. package/esm/AppShell/AppShell.d.ts +12 -0
  3. package/esm/AppShell/AppShell.js +92 -0
  4. package/esm/AppShell/AppShell.js.map +1 -0
  5. package/esm/AppShell/index.d.ts +1 -0
  6. package/esm/AppShell/index.js +2 -0
  7. package/esm/AppShell/index.js.map +1 -0
  8. package/esm/ErrorAlert.d.ts +12 -0
  9. package/esm/ErrorAlert.js +61 -0
  10. package/esm/ErrorAlert.js.map +1 -0
  11. package/esm/Input/ActionsMenu.d.ts +9 -0
  12. package/esm/Input/ActionsMenu.js +29 -0
  13. package/esm/Input/ActionsMenu.js.map +1 -0
  14. package/esm/Input/Checkbox.d.ts +9 -0
  15. package/esm/Input/Checkbox.js +23 -0
  16. package/esm/Input/Checkbox.js.map +1 -0
  17. package/esm/Input/EmailSenderField.d.ts +8 -0
  18. package/esm/Input/EmailSenderField.js +71 -0
  19. package/esm/Input/EmailSenderField.js.map +1 -0
  20. package/esm/Input/NumberField.d.ts +10 -0
  21. package/esm/Input/NumberField.js +94 -0
  22. package/esm/Input/NumberField.js.map +1 -0
  23. package/esm/Input/RadioGroup.d.ts +12 -0
  24. package/esm/Input/RadioGroup.js +20 -0
  25. package/esm/Input/RadioGroup.js.map +1 -0
  26. package/esm/Input/Select.d.ts +11 -0
  27. package/esm/Input/Select.js +19 -0
  28. package/esm/Input/Select.js.map +1 -0
  29. package/esm/Input/Selector.d.ts +10 -0
  30. package/esm/Input/Selector.js +19 -0
  31. package/esm/Input/Selector.js.map +1 -0
  32. package/esm/Input/Switch.d.ts +9 -0
  33. package/esm/Input/Switch.js +23 -0
  34. package/esm/Input/Switch.js.map +1 -0
  35. package/esm/Input/TextField.d.ts +7 -0
  36. package/esm/Input/TextField.js +58 -0
  37. package/esm/Input/TextField.js.map +1 -0
  38. package/esm/Input/UrlUploadField.d.ts +9 -0
  39. package/esm/Input/UrlUploadField.js +43 -0
  40. package/esm/Input/UrlUploadField.js.map +1 -0
  41. package/esm/Input/index.d.ts +9 -0
  42. package/esm/Input/index.js +10 -0
  43. package/esm/Input/index.js.map +1 -0
  44. package/esm/LanguageSwitcher/LanguageSwitcher.d.ts +14 -0
  45. package/esm/LanguageSwitcher/LanguageSwitcher.js +20 -0
  46. package/esm/LanguageSwitcher/LanguageSwitcher.js.map +1 -0
  47. package/esm/LanguageSwitcher/index.d.ts +1 -0
  48. package/esm/LanguageSwitcher/index.js +2 -0
  49. package/esm/LanguageSwitcher/index.js.map +1 -0
  50. package/esm/Paging/Paging.d.ts +40 -0
  51. package/esm/Paging/Paging.js +43 -0
  52. package/esm/Paging/Paging.js.map +1 -0
  53. package/esm/Paging/index.d.ts +1 -0
  54. package/esm/Paging/index.js +2 -0
  55. package/esm/Paging/index.js.map +1 -0
  56. package/esm/VCThemeProvider/JetbrainsMonoFont.d.ts +5 -0
  57. package/esm/VCThemeProvider/JetbrainsMonoFont.js +52 -0
  58. package/esm/VCThemeProvider/JetbrainsMonoFont.js.map +1 -0
  59. package/esm/VCThemeProvider/RobotoFont.d.ts +7 -0
  60. package/esm/VCThemeProvider/RobotoFont.js +49 -0
  61. package/esm/VCThemeProvider/RobotoFont.js.map +1 -0
  62. package/esm/VCThemeProvider/ThemeModeSwitcher.d.ts +2 -0
  63. package/esm/VCThemeProvider/ThemeModeSwitcher.js +14 -0
  64. package/esm/VCThemeProvider/ThemeModeSwitcher.js.map +1 -0
  65. package/esm/VCThemeProvider/VCThemeProvider.d.ts +25 -0
  66. package/esm/VCThemeProvider/VCThemeProvider.js +173 -0
  67. package/esm/VCThemeProvider/VCThemeProvider.js.map +1 -0
  68. package/esm/VCThemeProvider/code-colors.d.ts +108 -0
  69. package/esm/VCThemeProvider/code-colors.js +26 -0
  70. package/esm/VCThemeProvider/code-colors.js.map +1 -0
  71. package/esm/VCThemeProvider/index.d.ts +5 -0
  72. package/esm/VCThemeProvider/index.js +6 -0
  73. package/esm/VCThemeProvider/index.js.map +1 -0
  74. package/esm/audit/AuditChanges.d.ts +9 -0
  75. package/esm/audit/AuditChanges.js +43 -0
  76. package/esm/audit/AuditChanges.js.map +1 -0
  77. package/esm/audit/AuditTimeline.d.ts +6 -0
  78. package/esm/audit/AuditTimeline.js +13 -0
  79. package/esm/audit/AuditTimeline.js.map +1 -0
  80. package/esm/audit/AuditTimelineItem.d.ts +10 -0
  81. package/esm/audit/AuditTimelineItem.js +27 -0
  82. package/esm/audit/AuditTimelineItem.js.map +1 -0
  83. package/esm/audit/index.d.ts +4 -0
  84. package/esm/audit/index.js +5 -0
  85. package/esm/audit/index.js.map +1 -0
  86. package/esm/audit/types.d.ts +42 -0
  87. package/esm/audit/types.js +2 -0
  88. package/esm/audit/types.js.map +1 -0
  89. package/esm/breadcrumbs.d.ts +6 -0
  90. package/esm/breadcrumbs.js +13 -0
  91. package/esm/breadcrumbs.js.map +1 -0
  92. package/esm/code/Code.d.ts +10 -0
  93. package/esm/code/Code.js +19 -0
  94. package/esm/code/Code.js.map +1 -0
  95. package/esm/code/CodeBlock.d.ts +4 -0
  96. package/esm/code/CodeBlock.js +6 -0
  97. package/esm/code/CodeBlock.js.map +1 -0
  98. package/esm/code/Json.d.ts +4 -0
  99. package/esm/code/Json.js +60 -0
  100. package/esm/code/Json.js.map +1 -0
  101. package/esm/code/index.d.ts +3 -0
  102. package/esm/code/index.js +4 -0
  103. package/esm/code/index.js.map +1 -0
  104. package/esm/confirm/ConfirmButton.d.ts +16 -0
  105. package/esm/confirm/ConfirmButton.js +29 -0
  106. package/esm/confirm/ConfirmButton.js.map +1 -0
  107. package/esm/confirm/ConfirmDialog.d.ts +16 -0
  108. package/esm/confirm/ConfirmDialog.js +35 -0
  109. package/esm/confirm/ConfirmDialog.js.map +1 -0
  110. package/esm/confirm/ConfirmIconButton.d.ts +14 -0
  111. package/esm/confirm/ConfirmIconButton.js +29 -0
  112. package/esm/confirm/ConfirmIconButton.js.map +1 -0
  113. package/esm/confirm/ConfirmMenuItem.d.ts +15 -0
  114. package/esm/confirm/ConfirmMenuItem.js +31 -0
  115. package/esm/confirm/ConfirmMenuItem.js.map +1 -0
  116. package/esm/confirm/index.d.ts +4 -0
  117. package/esm/confirm/index.js +5 -0
  118. package/esm/confirm/index.js.map +1 -0
  119. package/esm/container/ContainerLayout.d.ts +8 -0
  120. package/esm/container/ContainerLayout.js +20 -0
  121. package/esm/container/ContainerLayout.js.map +1 -0
  122. package/esm/container/ContainerSettingsContext.d.ts +12 -0
  123. package/esm/container/ContainerSettingsContext.js +46 -0
  124. package/esm/container/ContainerSettingsContext.js.map +1 -0
  125. package/esm/container/ContainerWidthControl.d.ts +6 -0
  126. package/esm/container/ContainerWidthControl.js +12 -0
  127. package/esm/container/ContainerWidthControl.js.map +1 -0
  128. package/esm/container/index.d.ts +3 -0
  129. package/esm/container/index.js +4 -0
  130. package/esm/container/index.js.map +1 -0
  131. package/esm/content-table/ContentTable.d.ts +25 -0
  132. package/esm/content-table/ContentTable.js +87 -0
  133. package/esm/content-table/ContentTable.js.map +1 -0
  134. package/esm/content-table/UndrawEmpty.d.ts +2 -0
  135. package/esm/content-table/UndrawEmpty.js +71 -0
  136. package/esm/content-table/UndrawEmpty.js.map +1 -0
  137. package/esm/content-table/index.d.ts +1 -0
  138. package/esm/content-table/index.js +2 -0
  139. package/esm/content-table/index.js.map +1 -0
  140. package/esm/country/countries.d.ts +34 -0
  141. package/esm/country/countries.js +266 -0
  142. package/esm/country/countries.js.map +1 -0
  143. package/esm/country/country-select.d.ts +8 -0
  144. package/esm/country/country-select.js +18 -0
  145. package/esm/country/country-select.js.map +1 -0
  146. package/esm/country/index.d.ts +5 -0
  147. package/esm/country/index.js +6 -0
  148. package/esm/country/index.js.map +1 -0
  149. package/esm/country/locale-select.d.ts +9 -0
  150. package/esm/country/locale-select.js +15 -0
  151. package/esm/country/locale-select.js.map +1 -0
  152. package/esm/country/locales.d.ts +10 -0
  153. package/esm/country/locales.js +190 -0
  154. package/esm/country/locales.js.map +1 -0
  155. package/esm/country/phone-prefix-select.d.ts +9 -0
  156. package/esm/country/phone-prefix-select.js +18 -0
  157. package/esm/country/phone-prefix-select.js.map +1 -0
  158. package/esm/cube/BoxFeatures.d.ts +11 -0
  159. package/esm/cube/BoxFeatures.js +40 -0
  160. package/esm/cube/BoxFeatures.js.map +1 -0
  161. package/esm/cube/BoxMaintenanceChip.d.ts +9 -0
  162. package/esm/cube/BoxMaintenanceChip.js +15 -0
  163. package/esm/cube/BoxMaintenanceChip.js.map +1 -0
  164. package/esm/cube/BoxNumber.d.ts +6 -0
  165. package/esm/cube/BoxNumber.js +6 -0
  166. package/esm/cube/BoxNumber.js.map +1 -0
  167. package/esm/cube/BoxType.d.ts +7 -0
  168. package/esm/cube/BoxType.js +21 -0
  169. package/esm/cube/BoxType.js.map +1 -0
  170. package/esm/cube/CubeConnectedChip.d.ts +9 -0
  171. package/esm/cube/CubeConnectedChip.js +22 -0
  172. package/esm/cube/CubeConnectedChip.js.map +1 -0
  173. package/esm/cube/LockStatusChip.d.ts +11 -0
  174. package/esm/cube/LockStatusChip.js +40 -0
  175. package/esm/cube/LockStatusChip.js.map +1 -0
  176. package/esm/cube/UtilizationBar.d.ts +11 -0
  177. package/esm/cube/UtilizationBar.js +38 -0
  178. package/esm/cube/UtilizationBar.js.map +1 -0
  179. package/esm/cube/accessibility.d.ts +48 -0
  180. package/esm/cube/accessibility.js +242 -0
  181. package/esm/cube/accessibility.js.map +1 -0
  182. package/esm/cube/index.d.ts +8 -0
  183. package/esm/cube/index.js +9 -0
  184. package/esm/cube/index.js.map +1 -0
  185. package/esm/data-table/DataTable.d.ts +63 -0
  186. package/esm/data-table/DataTable.js +124 -0
  187. package/esm/data-table/DataTable.js.map +1 -0
  188. package/esm/data-table/DataTableColumnSettings.d.ts +10 -0
  189. package/esm/data-table/DataTableColumnSettings.js +98 -0
  190. package/esm/data-table/DataTableColumnSettings.js.map +1 -0
  191. package/esm/data-table/DataTableHeader.d.ts +2 -0
  192. package/esm/data-table/DataTableHeader.js +6 -0
  193. package/esm/data-table/DataTableHeader.js.map +1 -0
  194. package/esm/data-table/DataTableToolbar.d.ts +2 -0
  195. package/esm/data-table/DataTableToolbar.js +6 -0
  196. package/esm/data-table/DataTableToolbar.js.map +1 -0
  197. package/esm/data-table/index.d.ts +8 -0
  198. package/esm/data-table/index.js +9 -0
  199. package/esm/data-table/index.js.map +1 -0
  200. package/esm/data-table/useDataTableColumnStorage.d.ts +5 -0
  201. package/esm/data-table/useDataTableColumnStorage.js +20 -0
  202. package/esm/data-table/useDataTableColumnStorage.js.map +1 -0
  203. package/esm/data-table/useDataTableStorage.d.ts +16 -0
  204. package/esm/data-table/useDataTableStorage.js +19 -0
  205. package/esm/data-table/useDataTableStorage.js.map +1 -0
  206. package/esm/data-table/useSpringPage.d.ts +6 -0
  207. package/esm/data-table/useSpringPage.js +18 -0
  208. package/esm/data-table/useSpringPage.js.map +1 -0
  209. package/esm/data-table/useSpringPageable.d.ts +9 -0
  210. package/esm/data-table/useSpringPageable.js +10 -0
  211. package/esm/data-table/useSpringPageable.js.map +1 -0
  212. package/esm/date-pickers/PlainAdapterCommon.d.ts +31 -0
  213. package/esm/date-pickers/PlainAdapterCommon.js +97 -0
  214. package/esm/date-pickers/PlainAdapterCommon.js.map +1 -0
  215. package/esm/date-pickers/PlainDateAdapter.d.ts +30 -0
  216. package/esm/date-pickers/PlainDateAdapter.js +114 -0
  217. package/esm/date-pickers/PlainDateAdapter.js.map +1 -0
  218. package/esm/date-pickers/PlainDatePicker.d.ts +21 -0
  219. package/esm/date-pickers/PlainDatePicker.js +26 -0
  220. package/esm/date-pickers/PlainDatePicker.js.map +1 -0
  221. package/esm/date-pickers/PlainDatePicker.spec.d.ts +1 -0
  222. package/esm/date-pickers/PlainDatePicker.spec.js +15 -0
  223. package/esm/date-pickers/PlainDatePicker.spec.js.map +1 -0
  224. package/esm/date-pickers/PlainDateTimeAdapter.d.ts +30 -0
  225. package/esm/date-pickers/PlainDateTimeAdapter.js +114 -0
  226. package/esm/date-pickers/PlainDateTimeAdapter.js.map +1 -0
  227. package/esm/date-pickers/PlainDateTimePicker.d.ts +20 -0
  228. package/esm/date-pickers/PlainDateTimePicker.js +26 -0
  229. package/esm/date-pickers/PlainDateTimePicker.js.map +1 -0
  230. package/esm/date-pickers/PlainDateTimePicker.spec.d.ts +1 -0
  231. package/esm/date-pickers/PlainDateTimePicker.spec.js +15 -0
  232. package/esm/date-pickers/PlainDateTimePicker.spec.js.map +1 -0
  233. package/esm/date-pickers/PlainTimeAdapter.d.ts +58 -0
  234. package/esm/date-pickers/PlainTimeAdapter.js +194 -0
  235. package/esm/date-pickers/PlainTimeAdapter.js.map +1 -0
  236. package/esm/date-pickers/PlainTimePicker.d.ts +16 -0
  237. package/esm/date-pickers/PlainTimePicker.js +24 -0
  238. package/esm/date-pickers/PlainTimePicker.js.map +1 -0
  239. package/esm/date-pickers/PlainTimePicker.spec.d.ts +1 -0
  240. package/esm/date-pickers/PlainTimePicker.spec.js +15 -0
  241. package/esm/date-pickers/PlainTimePicker.spec.js.map +1 -0
  242. package/esm/date-pickers/TemporalAdapter.d.ts +18 -0
  243. package/esm/date-pickers/TemporalAdapter.js +109 -0
  244. package/esm/date-pickers/TemporalAdapter.js.map +1 -0
  245. package/esm/date-pickers/TimezoneSelect.d.ts +9 -0
  246. package/esm/date-pickers/TimezoneSelect.js +357 -0
  247. package/esm/date-pickers/TimezoneSelect.js.map +1 -0
  248. package/esm/date-pickers/getFormatString.d.ts +11 -0
  249. package/esm/date-pickers/getFormatString.js +26 -0
  250. package/esm/date-pickers/getFormatString.js.map +1 -0
  251. package/esm/date-pickers/index.d.ts +5 -0
  252. package/esm/date-pickers/index.js +6 -0
  253. package/esm/date-pickers/index.js.map +1 -0
  254. package/esm/date-pickers/parse.d.ts +4 -0
  255. package/esm/date-pickers/parse.js +66 -0
  256. package/esm/date-pickers/parse.js.map +1 -0
  257. package/esm/date-pickers/timeframe-picker.d.ts +46 -0
  258. package/esm/date-pickers/timeframe-picker.js +120 -0
  259. package/esm/date-pickers/timeframe-picker.js.map +1 -0
  260. package/esm/date-pickers/useLocale.d.ts +1 -0
  261. package/esm/date-pickers/useLocale.js +6 -0
  262. package/esm/date-pickers/useLocale.js.map +1 -0
  263. package/esm/date-pickers/useRenderInput.d.ts +4 -0
  264. package/esm/date-pickers/useRenderInput.js +8 -0
  265. package/esm/date-pickers/useRenderInput.js.map +1 -0
  266. package/esm/fetch.d.ts +51 -0
  267. package/esm/fetch.js +138 -0
  268. package/esm/fetch.js.map +1 -0
  269. package/esm/filter/Filter.d.ts +38 -0
  270. package/esm/filter/Filter.js +72 -0
  271. package/esm/filter/Filter.js.map +1 -0
  272. package/esm/filter/index.d.ts +1 -0
  273. package/esm/filter/index.js +2 -0
  274. package/esm/filter/index.js.map +1 -0
  275. package/esm/formats/CompactFormat.d.ts +22 -0
  276. package/esm/formats/CompactFormat.js +21 -0
  277. package/esm/formats/CompactFormat.js.map +1 -0
  278. package/esm/formats/CompactFormat.spec.d.ts +1 -0
  279. package/esm/formats/CompactFormat.spec.js +22 -0
  280. package/esm/formats/CompactFormat.spec.js.map +1 -0
  281. package/esm/formats/CurrencyFormat.d.ts +39 -0
  282. package/esm/formats/CurrencyFormat.js +25 -0
  283. package/esm/formats/CurrencyFormat.js.map +1 -0
  284. package/esm/formats/CurrencyFormat.spec.d.ts +1 -0
  285. package/esm/formats/CurrencyFormat.spec.js +22 -0
  286. package/esm/formats/CurrencyFormat.spec.js.map +1 -0
  287. package/esm/formats/DecimalFormat.d.ts +29 -0
  288. package/esm/formats/DecimalFormat.js +22 -0
  289. package/esm/formats/DecimalFormat.js.map +1 -0
  290. package/esm/formats/DecimalFormat.spec.d.ts +1 -0
  291. package/esm/formats/DecimalFormat.spec.js +22 -0
  292. package/esm/formats/DecimalFormat.spec.js.map +1 -0
  293. package/esm/formats/DurationFormat.d.ts +23 -0
  294. package/esm/formats/DurationFormat.js +35 -0
  295. package/esm/formats/DurationFormat.js.map +1 -0
  296. package/esm/formats/DurationFormat.spec.d.ts +1 -0
  297. package/esm/formats/DurationFormat.spec.js +52 -0
  298. package/esm/formats/DurationFormat.spec.js.map +1 -0
  299. package/esm/formats/RelativeTemporalFormat.d.ts +22 -0
  300. package/esm/formats/RelativeTemporalFormat.js +57 -0
  301. package/esm/formats/RelativeTemporalFormat.js.map +1 -0
  302. package/esm/formats/RelativeTemporalFormat.spec.d.ts +1 -0
  303. package/esm/formats/RelativeTemporalFormat.spec.js +77 -0
  304. package/esm/formats/RelativeTemporalFormat.spec.js.map +1 -0
  305. package/esm/formats/SwitchableTemporalFormat.d.ts +5 -0
  306. package/esm/formats/SwitchableTemporalFormat.js +11 -0
  307. package/esm/formats/SwitchableTemporalFormat.js.map +1 -0
  308. package/esm/formats/TemporalFormat.d.ts +27 -0
  309. package/esm/formats/TemporalFormat.js +19 -0
  310. package/esm/formats/TemporalFormat.js.map +1 -0
  311. package/esm/formats/TemporalFormat.spec.d.ts +1 -0
  312. package/esm/formats/TemporalFormat.spec.js +87 -0
  313. package/esm/formats/TemporalFormat.spec.js.map +1 -0
  314. package/esm/formats/TemporalRangeFormat.d.ts +30 -0
  315. package/esm/formats/TemporalRangeFormat.js +17 -0
  316. package/esm/formats/TemporalRangeFormat.js.map +1 -0
  317. package/esm/formats/TemporalRangeFormat.spec.d.ts +1 -0
  318. package/esm/formats/TemporalRangeFormat.spec.js +87 -0
  319. package/esm/formats/TemporalRangeFormat.spec.js.map +1 -0
  320. package/esm/formats/index.d.ts +8 -0
  321. package/esm/formats/index.js +9 -0
  322. package/esm/formats/index.js.map +1 -0
  323. package/esm/formats/types.d.ts +2 -0
  324. package/esm/formats/types.js +2 -0
  325. package/esm/formats/types.js.map +1 -0
  326. package/esm/formats/useDateTimeFormat.d.ts +2 -0
  327. package/esm/formats/useDateTimeFormat.js +7 -0
  328. package/esm/formats/useDateTimeFormat.js.map +1 -0
  329. package/esm/formats/useNumberFormat.d.ts +1 -0
  330. package/esm/formats/useNumberFormat.js +6 -0
  331. package/esm/formats/useNumberFormat.js.map +1 -0
  332. package/esm/formats/useRelativeTimeFormat.d.ts +1 -0
  333. package/esm/formats/useRelativeTimeFormat.js +6 -0
  334. package/esm/formats/useRelativeTimeFormat.js.map +1 -0
  335. package/esm/forms/EditForm.d.ts +13 -0
  336. package/esm/forms/EditForm.js +22 -0
  337. package/esm/forms/EditForm.js.map +1 -0
  338. package/esm/forms/SearchForm.d.ts +7 -0
  339. package/esm/forms/SearchForm.js +36 -0
  340. package/esm/forms/SearchForm.js.map +1 -0
  341. package/esm/forms/SubmitButton.d.ts +9 -0
  342. package/esm/forms/SubmitButton.js +28 -0
  343. package/esm/forms/SubmitButton.js.map +1 -0
  344. package/esm/forms/index.d.ts +4 -0
  345. package/esm/forms/index.js +5 -0
  346. package/esm/forms/index.js.map +1 -0
  347. package/esm/forms/useFormSubmit.d.ts +12 -0
  348. package/esm/forms/useFormSubmit.js +28 -0
  349. package/esm/forms/useFormSubmit.js.map +1 -0
  350. package/esm/getNavigatorLanguages.d.ts +5 -0
  351. package/esm/getNavigatorLanguages.js +11 -0
  352. package/esm/getNavigatorLanguages.js.map +1 -0
  353. package/esm/getSupportedFormatLocale.d.ts +19 -0
  354. package/esm/getSupportedFormatLocale.js +21 -0
  355. package/esm/getSupportedFormatLocale.js.map +1 -0
  356. package/esm/help/HelpButton.d.ts +12 -0
  357. package/esm/help/HelpButton.js +74 -0
  358. package/esm/help/HelpButton.js.map +1 -0
  359. package/esm/help/HelpDrawer.d.ts +3 -0
  360. package/esm/help/HelpDrawer.js +48 -0
  361. package/esm/help/HelpDrawer.js.map +1 -0
  362. package/esm/help/HelpSettingsContext.d.ts +26 -0
  363. package/esm/help/HelpSettingsContext.js +94 -0
  364. package/esm/help/HelpSettingsContext.js.map +1 -0
  365. package/esm/help/index.d.ts +3 -0
  366. package/esm/help/index.js +4 -0
  367. package/esm/help/index.js.map +1 -0
  368. package/esm/icons.d.ts +21 -0
  369. package/esm/icons.js +22 -0
  370. package/esm/icons.js.map +1 -0
  371. package/esm/index.d.ts +34 -0
  372. package/esm/index.js +35 -0
  373. package/esm/index.js.map +1 -0
  374. package/esm/layout/ErrorBoundary.d.ts +46 -0
  375. package/esm/layout/ErrorBoundary.js +186 -0
  376. package/esm/layout/ErrorBoundary.js.map +1 -0
  377. package/esm/layout/NotFound.d.ts +9 -0
  378. package/esm/layout/NotFound.js +26 -0
  379. package/esm/layout/NotFound.js.map +1 -0
  380. package/esm/layout/NotFoundSvg.d.ts +2 -0
  381. package/esm/layout/NotFoundSvg.js +37 -0
  382. package/esm/layout/NotFoundSvg.js.map +1 -0
  383. package/esm/layout/UserNav.d.ts +15 -0
  384. package/esm/layout/UserNav.js +50 -0
  385. package/esm/layout/UserNav.js.map +1 -0
  386. package/esm/layout/index.d.ts +5 -0
  387. package/esm/layout/index.js +6 -0
  388. package/esm/layout/index.js.map +1 -0
  389. package/esm/layout/layout-context.d.ts +9 -0
  390. package/esm/layout/layout-context.js +23 -0
  391. package/esm/layout/layout-context.js.map +1 -0
  392. package/esm/layout/page-title.d.ts +7 -0
  393. package/esm/layout/page-title.js +41 -0
  394. package/esm/layout/page-title.js.map +1 -0
  395. package/esm/list/List.d.ts +14 -0
  396. package/esm/list/List.js +25 -0
  397. package/esm/list/List.js.map +1 -0
  398. package/esm/list/SkeletonListItem.d.ts +14 -0
  399. package/esm/list/SkeletonListItem.js +11 -0
  400. package/esm/list/SkeletonListItem.js.map +1 -0
  401. package/esm/list/index.d.ts +1 -0
  402. package/esm/list/index.js +2 -0
  403. package/esm/list/index.js.map +1 -0
  404. package/esm/localization.d.ts +140 -0
  405. package/esm/localization.js +200 -0
  406. package/esm/localization.js.map +1 -0
  407. package/esm/logo/Logo.d.ts +7 -0
  408. package/esm/logo/Logo.js +29 -0
  409. package/esm/logo/Logo.js.map +1 -0
  410. package/esm/logo/VCAppLogo.d.ts +7 -0
  411. package/esm/logo/VCAppLogo.js +28 -0
  412. package/esm/logo/VCAppLogo.js.map +1 -0
  413. package/esm/logo/VCLogo.d.ts +4 -0
  414. package/esm/logo/VCLogo.js +33 -0
  415. package/esm/logo/VCLogo.js.map +1 -0
  416. package/esm/logo/VCLogoIcon.d.ts +4 -0
  417. package/esm/logo/VCLogoIcon.js +36 -0
  418. package/esm/logo/VCLogoIcon.js.map +1 -0
  419. package/esm/logo/index.d.ts +4 -0
  420. package/esm/logo/index.js +5 -0
  421. package/esm/logo/index.js.map +1 -0
  422. package/esm/splash/index.d.ts +3 -0
  423. package/esm/splash/index.js +37 -0
  424. package/esm/splash/index.js.map +1 -0
  425. package/esm/spring.d.ts +14 -0
  426. package/esm/spring.js +2 -0
  427. package/esm/spring.js.map +1 -0
  428. package/esm/storage/MemoryStorage.d.ts +7 -0
  429. package/esm/storage/MemoryStorage.js +18 -0
  430. package/esm/storage/MemoryStorage.js.map +1 -0
  431. package/esm/storage/index.d.ts +2 -0
  432. package/esm/storage/index.js +3 -0
  433. package/esm/storage/index.js.map +1 -0
  434. package/esm/storage/storage.d.ts +16 -0
  435. package/esm/storage/storage.js +87 -0
  436. package/esm/storage/storage.js.map +1 -0
  437. package/esm/storage/useStorage.d.ts +1 -0
  438. package/esm/storage/useStorage.js +29 -0
  439. package/esm/storage/useStorage.js.map +1 -0
  440. package/esm/tabs/Tabs.d.ts +10 -0
  441. package/esm/tabs/Tabs.js +95 -0
  442. package/esm/tabs/Tabs.js.map +1 -0
  443. package/esm/tabs/index.d.ts +1 -0
  444. package/esm/tabs/index.js +2 -0
  445. package/esm/tabs/index.js.map +1 -0
  446. package/esm/temporal/index.d.ts +2 -0
  447. package/esm/temporal/index.js +3 -0
  448. package/esm/temporal/index.js.map +1 -0
  449. package/esm/temporal/parse.d.ts +4 -0
  450. package/esm/temporal/parse.js +25 -0
  451. package/esm/temporal/parse.js.map +1 -0
  452. package/esm/temporal/polyfill.d.ts +34 -0
  453. package/esm/temporal/polyfill.js +10 -0
  454. package/esm/temporal/polyfill.js.map +1 -0
  455. package/esm/utils/defined.d.ts +1 -0
  456. package/esm/utils/defined.js +4 -0
  457. package/esm/utils/defined.js.map +1 -0
  458. package/esm/utils/index.d.ts +3 -0
  459. package/esm/utils/index.js +4 -0
  460. package/esm/utils/index.js.map +1 -0
  461. package/esm/utils/useFlag.d.ts +1 -0
  462. package/esm/utils/useFlag.js +9 -0
  463. package/esm/utils/useFlag.js.map +1 -0
  464. package/esm/utils/useIsMounted.d.ts +1 -0
  465. package/esm/utils/useIsMounted.js +12 -0
  466. package/esm/utils/useIsMounted.js.map +1 -0
  467. package/esm/view/View.d.ts +9 -0
  468. package/esm/view/View.js +22 -0
  469. package/esm/view/View.js.map +1 -0
  470. package/esm/view/ViewHeader.d.ts +10 -0
  471. package/esm/view/ViewHeader.js +15 -0
  472. package/esm/view/ViewHeader.js.map +1 -0
  473. package/esm/view/index.d.ts +2 -0
  474. package/esm/view/index.js +3 -0
  475. package/esm/view/index.js.map +1 -0
  476. package/package.json +72 -0
  477. package/src/AppShell/AppShell.tsx +165 -0
  478. package/src/AppShell/index.tsx +1 -0
  479. package/src/ErrorAlert.tsx +71 -0
  480. package/src/Input/ActionsMenu.tsx +102 -0
  481. package/src/Input/Checkbox.tsx +33 -0
  482. package/src/Input/EmailSenderField.tsx +64 -0
  483. package/src/Input/NumberField.tsx +127 -0
  484. package/src/Input/RadioGroup.tsx +37 -0
  485. package/src/Input/Select.tsx +33 -0
  486. package/src/Input/Selector.tsx +21 -0
  487. package/src/Input/Switch.tsx +33 -0
  488. package/src/Input/TextField.tsx +69 -0
  489. package/src/Input/UrlUploadField.tsx +84 -0
  490. package/src/Input/index.ts +9 -0
  491. package/src/LanguageSwitcher/LanguageSwitcher.tsx +63 -0
  492. package/src/LanguageSwitcher/index.ts +1 -0
  493. package/src/Paging/Paging.ts +77 -0
  494. package/src/Paging/index.ts +1 -0
  495. package/src/VCThemeProvider/JetbrainsMonoFont.tsx +55 -0
  496. package/src/VCThemeProvider/RobotoFont.tsx +52 -0
  497. package/src/VCThemeProvider/ThemeModeSwitcher.tsx +23 -0
  498. package/src/VCThemeProvider/VCThemeProvider.tsx +232 -0
  499. package/src/VCThemeProvider/code-colors.ts +34 -0
  500. package/src/VCThemeProvider/files.d.ts +2 -0
  501. package/src/VCThemeProvider/index.ts +5 -0
  502. package/src/audit/AuditChanges.tsx +82 -0
  503. package/src/audit/AuditTimeline.tsx +25 -0
  504. package/src/audit/AuditTimelineItem.tsx +75 -0
  505. package/src/audit/index.ts +4 -0
  506. package/src/audit/types.ts +46 -0
  507. package/src/breadcrumbs.tsx +27 -0
  508. package/src/code/Code.tsx +53 -0
  509. package/src/code/CodeBlock.tsx +15 -0
  510. package/src/code/Json.tsx +73 -0
  511. package/src/code/index.ts +3 -0
  512. package/src/confirm/ConfirmButton.tsx +69 -0
  513. package/src/confirm/ConfirmDialog.tsx +68 -0
  514. package/src/confirm/ConfirmIconButton.tsx +62 -0
  515. package/src/confirm/ConfirmMenuItem.tsx +66 -0
  516. package/src/confirm/index.ts +4 -0
  517. package/src/container/ContainerLayout.tsx +40 -0
  518. package/src/container/ContainerSettingsContext.tsx +77 -0
  519. package/src/container/ContainerWidthControl.tsx +20 -0
  520. package/src/container/index.ts +3 -0
  521. package/src/content-table/ContentTable.tsx +214 -0
  522. package/src/content-table/UndrawEmpty.tsx +285 -0
  523. package/src/content-table/index.ts +1 -0
  524. package/src/country/countries.ts +268 -0
  525. package/src/country/country-select.tsx +48 -0
  526. package/src/country/index.ts +5 -0
  527. package/src/country/locale-select.tsx +43 -0
  528. package/src/country/locales.ts +192 -0
  529. package/src/country/phone-prefix-select.tsx +50 -0
  530. package/src/cube/BoxFeatures.tsx +91 -0
  531. package/src/cube/BoxMaintenanceChip.tsx +33 -0
  532. package/src/cube/BoxNumber.tsx +10 -0
  533. package/src/cube/BoxType.tsx +22 -0
  534. package/src/cube/CubeConnectedChip.tsx +16 -0
  535. package/src/cube/LockStatusChip.tsx +54 -0
  536. package/src/cube/UtilizationBar.tsx +94 -0
  537. package/src/cube/accessibility.tsx +422 -0
  538. package/src/cube/index.tsx +8 -0
  539. package/src/data-table/DataTable.tsx +338 -0
  540. package/src/data-table/DataTableColumnSettings.tsx +204 -0
  541. package/src/data-table/DataTableHeader.tsx +10 -0
  542. package/src/data-table/DataTableToolbar.tsx +10 -0
  543. package/src/data-table/index.tsx +8 -0
  544. package/src/data-table/useDataTableColumnStorage.ts +26 -0
  545. package/src/data-table/useDataTableStorage.ts +43 -0
  546. package/src/data-table/useSpringPage.ts +21 -0
  547. package/src/data-table/useSpringPageable.ts +25 -0
  548. package/src/date-pickers/PlainAdapterCommon.ts +125 -0
  549. package/src/date-pickers/PlainDateAdapter.spec.ts +50 -0
  550. package/src/date-pickers/PlainDateAdapter.ts +139 -0
  551. package/src/date-pickers/PlainDatePicker.spec.tsx +22 -0
  552. package/src/date-pickers/PlainDatePicker.tsx +73 -0
  553. package/src/date-pickers/PlainDateTimeAdapter.spec.ts +50 -0
  554. package/src/date-pickers/PlainDateTimeAdapter.ts +140 -0
  555. package/src/date-pickers/PlainDateTimePicker.spec.tsx +22 -0
  556. package/src/date-pickers/PlainDateTimePicker.tsx +65 -0
  557. package/src/date-pickers/PlainTimeAdapter.ts +247 -0
  558. package/src/date-pickers/PlainTimePicker.spec.tsx +22 -0
  559. package/src/date-pickers/PlainTimePicker.tsx +45 -0
  560. package/src/date-pickers/TemporalAdapter.ts +150 -0
  561. package/src/date-pickers/TimezoneSelect.tsx +387 -0
  562. package/src/date-pickers/getFormatString.ts +38 -0
  563. package/src/date-pickers/index.ts +5 -0
  564. package/src/date-pickers/parse.spec.ts +43 -0
  565. package/src/date-pickers/parse.ts +72 -0
  566. package/src/date-pickers/timeframe-picker.tsx +202 -0
  567. package/src/date-pickers/useLocale.ts +6 -0
  568. package/src/date-pickers/useRenderInput.tsx +20 -0
  569. package/src/fetch.spec.ts +85 -0
  570. package/src/fetch.ts +165 -0
  571. package/src/filter/Filter.tsx +194 -0
  572. package/src/filter/index.ts +1 -0
  573. package/src/formats/CompactFormat.spec.tsx +25 -0
  574. package/src/formats/CompactFormat.tsx +48 -0
  575. package/src/formats/CurrencyFormat.spec.tsx +25 -0
  576. package/src/formats/CurrencyFormat.tsx +77 -0
  577. package/src/formats/DecimalFormat.spec.tsx +25 -0
  578. package/src/formats/DecimalFormat.tsx +59 -0
  579. package/src/formats/DurationFormat.spec.tsx +57 -0
  580. package/src/formats/DurationFormat.tsx +72 -0
  581. package/src/formats/RelativeTemporalFormat.spec.tsx +84 -0
  582. package/src/formats/RelativeTemporalFormat.tsx +86 -0
  583. package/src/formats/SwitchableTemporalFormat.tsx +17 -0
  584. package/src/formats/TemporalFormat.spec.tsx +110 -0
  585. package/src/formats/TemporalFormat.tsx +58 -0
  586. package/src/formats/TemporalRangeFormat.spec.tsx +159 -0
  587. package/src/formats/TemporalRangeFormat.tsx +62 -0
  588. package/src/formats/index.ts +8 -0
  589. package/src/formats/types.ts +4 -0
  590. package/src/formats/useDateTimeFormat.ts +7 -0
  591. package/src/formats/useNumberFormat.ts +6 -0
  592. package/src/formats/useRelativeTimeFormat.ts +6 -0
  593. package/src/forms/EditForm.tsx +69 -0
  594. package/src/forms/SearchForm.tsx +51 -0
  595. package/src/forms/SubmitButton.tsx +34 -0
  596. package/src/forms/index.ts +4 -0
  597. package/src/forms/useFormSubmit.tsx +28 -0
  598. package/src/getNavigatorLanguages.ts +11 -0
  599. package/src/getSupportedFormatLocale.ts +24 -0
  600. package/src/help/HelpButton.tsx +134 -0
  601. package/src/help/HelpDrawer.tsx +65 -0
  602. package/src/help/HelpSettingsContext.tsx +178 -0
  603. package/src/help/index.ts +3 -0
  604. package/src/icons.ts +23 -0
  605. package/src/index.ts +34 -0
  606. package/src/layout/ErrorBoundary.tsx +232 -0
  607. package/src/layout/NotFound.tsx +51 -0
  608. package/src/layout/NotFoundSvg.tsx +172 -0
  609. package/src/layout/UserNav.tsx +107 -0
  610. package/src/layout/index.ts +5 -0
  611. package/src/layout/layout-context.tsx +40 -0
  612. package/src/layout/page-title.tsx +33 -0
  613. package/src/list/List.tsx +40 -0
  614. package/src/list/SkeletonListItem.tsx +50 -0
  615. package/src/list/index.tsx +1 -0
  616. package/src/localization.tsx +404 -0
  617. package/src/logo/Logo.tsx +35 -0
  618. package/src/logo/VCAppLogo.tsx +28 -0
  619. package/src/logo/VCLogo.tsx +56 -0
  620. package/src/logo/VCLogoIcon.tsx +55 -0
  621. package/src/logo/V_C_LOGO.svg +1 -0
  622. package/src/logo/V_C_LOGO_ICON.svg +1 -0
  623. package/src/logo/V_C_LOGO_ICON_WHITE.svg +1 -0
  624. package/src/logo/V_C_LOGO_WHITE.svg +1 -0
  625. package/src/logo/index.tsx +4 -0
  626. package/src/splash/index.tsx +34 -0
  627. package/src/splash/template.html +86 -0
  628. package/src/spring.ts +15 -0
  629. package/src/storage/MemoryStorage.ts +21 -0
  630. package/src/storage/index.ts +2 -0
  631. package/src/storage/storage.ts +97 -0
  632. package/src/storage/useStorage.ts +35 -0
  633. package/src/tabs/Tabs.tsx +187 -0
  634. package/src/tabs/index.ts +1 -0
  635. package/src/temporal/index.ts +2 -0
  636. package/src/temporal/parse.ts +29 -0
  637. package/src/temporal/polyfill.ts +36 -0
  638. package/src/utils/defined.ts +4 -0
  639. package/src/utils/index.ts +3 -0
  640. package/src/utils/useFlag.ts +9 -0
  641. package/src/utils/useIsMounted.ts +12 -0
  642. package/src/view/View.tsx +22 -0
  643. package/src/view/ViewHeader.tsx +35 -0
  644. package/src/view/index.ts +2 -0
@@ -0,0 +1,46 @@
1
+ /// <reference types="react" />
2
+ import { PlainDate } from "../temporal";
3
+ export declare enum TimeFrameType {
4
+ All = "All",
5
+ Today = "Today",
6
+ Yesterday = "Yesterday",
7
+ Last7Days = "Last7Days",
8
+ LastWeek = "LastWeek",
9
+ ThisMonth = "ThisMonth",
10
+ LastMonth = "LastMonth",
11
+ Last3Months = "Last3Months",
12
+ LastYear = "LastYear",
13
+ Custom = "Custom"
14
+ }
15
+ export interface FilterTimeFrame {
16
+ type: TimeFrameType;
17
+ from?: string | null;
18
+ until?: string | null;
19
+ }
20
+ interface TimeFrameSelectProps {
21
+ value: FilterTimeFrame;
22
+ onChange: (value: FilterTimeFrame) => void;
23
+ i18n?: {
24
+ timeframeTitle?: string;
25
+ from?: string;
26
+ until?: string;
27
+ types?: {
28
+ All?: string;
29
+ Today?: string;
30
+ Yesterday?: string;
31
+ Last7Days?: string;
32
+ LastWeek?: string;
33
+ ThisMonth?: string;
34
+ LastMonth?: string;
35
+ Last3Months?: string;
36
+ LastYear?: string;
37
+ Custom?: string;
38
+ };
39
+ };
40
+ }
41
+ export declare function TimeframePicker({ value, onChange, i18n }: TimeFrameSelectProps): JSX.Element;
42
+ export declare function computeFromUntil(type: TimeFrameType, from?: PlainDate | null, until?: PlainDate | null): {
43
+ from: import("@js-temporal/polyfill").Temporal.PlainDate | null | undefined;
44
+ until: import("@js-temporal/polyfill").Temporal.PlainDate | null | undefined;
45
+ };
46
+ export {};
@@ -0,0 +1,120 @@
1
+ import { Now, tryParsePlainDate } from "../temporal";
2
+ import React, { useEffect } from "react";
3
+ import { Box, Grid, MenuItem, TextField } from "@mui/material";
4
+ import { PlainDatePicker } from "./PlainDatePicker";
5
+ export var TimeFrameType;
6
+ (function (TimeFrameType) {
7
+ TimeFrameType["All"] = "All";
8
+ TimeFrameType["Today"] = "Today";
9
+ TimeFrameType["Yesterday"] = "Yesterday";
10
+ TimeFrameType["Last7Days"] = "Last7Days";
11
+ TimeFrameType["LastWeek"] = "LastWeek";
12
+ TimeFrameType["ThisMonth"] = "ThisMonth";
13
+ TimeFrameType["LastMonth"] = "LastMonth";
14
+ TimeFrameType["Last3Months"] = "Last3Months";
15
+ TimeFrameType["LastYear"] = "LastYear";
16
+ TimeFrameType["Custom"] = "Custom";
17
+ })(TimeFrameType || (TimeFrameType = {}));
18
+ export function TimeframePicker({ value, onChange, i18n }) {
19
+ var _a, _b;
20
+ const { type, from, until } = value;
21
+ const fromPlainDate = (_a = tryParsePlainDate(from)) !== null && _a !== void 0 ? _a : null;
22
+ const untilPlainDate = (_b = tryParsePlainDate(until)) !== null && _b !== void 0 ? _b : null;
23
+ useEffect(() => {
24
+ const { from, until } = computeFromUntil(type, fromPlainDate, untilPlainDate);
25
+ onChange({
26
+ type,
27
+ from: from === null || from === void 0 ? void 0 : from.toString(),
28
+ until: until === null || until === void 0 ? void 0 : until.toString(),
29
+ });
30
+ }, [type, from, until]);
31
+ function handleTypeChange(event) {
32
+ const type = event.target.value;
33
+ const { from, until } = computeFromUntil(type, fromPlainDate, untilPlainDate);
34
+ onChange({
35
+ type,
36
+ from: from === null || from === void 0 ? void 0 : from.toString(),
37
+ until: until === null || until === void 0 ? void 0 : until.toString(),
38
+ });
39
+ }
40
+ function handleFromChange(value) {
41
+ onChange({
42
+ type,
43
+ from: value === null || value === void 0 ? void 0 : value.toString(),
44
+ until,
45
+ });
46
+ }
47
+ function handleUntilChange(value) {
48
+ onChange({
49
+ type,
50
+ from,
51
+ until: value === null || value === void 0 ? void 0 : value.toString(),
52
+ });
53
+ }
54
+ const { timeframeTitle: tTimeframeTitle, from: tFrom, until: tUntil, types: tTypes = {} } = i18n !== null && i18n !== void 0 ? i18n : {};
55
+ return (React.createElement(Box, null,
56
+ React.createElement(Grid, { container: true, spacing: 2 },
57
+ React.createElement(Grid, { item: true, md: 4, xs: 12 },
58
+ React.createElement(TextField, { fullWidth: true, select: true, variant: "outlined", label: tTimeframeTitle !== null && tTimeframeTitle !== void 0 ? tTimeframeTitle : 'Timeframe', value: type, onChange: handleTypeChange }, Object.values(TimeFrameType).map(tf => {
59
+ var _a;
60
+ return (React.createElement(MenuItem, { key: tf, value: tf }, (_a = tTypes[tf]) !== null && _a !== void 0 ? _a : tf));
61
+ }))),
62
+ React.createElement(Grid, { item: true, md: 4, xs: 12 },
63
+ React.createElement(PlainDatePicker, { label: tFrom !== null && tFrom !== void 0 ? tFrom : 'From', value: fromPlainDate, onChange: handleFromChange, disabled: type != TimeFrameType.Custom, fullWidth: true })),
64
+ React.createElement(Grid, { item: true, md: 4, xs: 12 },
65
+ React.createElement(PlainDatePicker, { label: tUntil !== null && tUntil !== void 0 ? tUntil : 'Until', value: untilPlainDate, onChange: handleUntilChange, disabled: type != TimeFrameType.Custom, fullWidth: true })))));
66
+ }
67
+ export function computeFromUntil(type, from, until) {
68
+ const today = Now.plainDateISO();
69
+ const yesterday = today.subtract({ days: 1 });
70
+ const lastMonth = today.subtract({ months: 1 });
71
+ const lastWeek = today.subtract({ weeks: 1 });
72
+ const lastYear = today.subtract({ years: 1 });
73
+ switch (type) {
74
+ case TimeFrameType.All:
75
+ return { from: undefined, until: undefined };
76
+ case TimeFrameType.Custom:
77
+ return { from, until };
78
+ case TimeFrameType.Today:
79
+ return {
80
+ from: today,
81
+ until: today,
82
+ };
83
+ case TimeFrameType.Yesterday:
84
+ return {
85
+ from: yesterday,
86
+ until: yesterday,
87
+ };
88
+ case TimeFrameType.Last7Days:
89
+ return {
90
+ from: yesterday.subtract({ days: 7 }),
91
+ until: yesterday,
92
+ };
93
+ case TimeFrameType.LastWeek:
94
+ return {
95
+ from: lastWeek.subtract({ days: lastWeek.dayOfWeek - 1 }),
96
+ until: lastWeek.add({ days: 7 - lastWeek.dayOfWeek }),
97
+ };
98
+ case TimeFrameType.ThisMonth:
99
+ return {
100
+ from: today.with({ day: 1 }),
101
+ until: today.with({ day: lastMonth.daysInMonth }),
102
+ };
103
+ case TimeFrameType.LastMonth:
104
+ return {
105
+ from: lastMonth.with({ day: 1 }),
106
+ until: lastMonth.with({ day: lastMonth.daysInMonth }),
107
+ };
108
+ case TimeFrameType.Last3Months:
109
+ return {
110
+ from: lastMonth.subtract({ months: 3 }).with({ day: 1 }),
111
+ until: lastMonth.with({ day: lastMonth.daysInMonth }),
112
+ };
113
+ case TimeFrameType.LastYear:
114
+ return {
115
+ from: lastYear.with({ day: 1, month: 1 }),
116
+ until: lastYear.with({ day: 31, month: 12 }),
117
+ };
118
+ }
119
+ }
120
+ //# sourceMappingURL=timeframe-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeframe-picker.js","sourceRoot":"","sources":["../../src/date-pickers/timeframe-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAa,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAc,SAAS,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAN,IAAY,aAWX;AAXD,WAAY,aAAa;IACxB,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,4CAA2B,CAAA;IAC3B,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AAClB,CAAC,EAXW,aAAa,KAAb,aAAa,QAWxB;AA8BD,MAAM,UAAU,eAAe,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAuB;;IAC5E,MAAM,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,MAAA,iBAAiB,CAAC,IAAI,CAAC,mCAAI,IAAI,CAAC;IACtD,MAAM,cAAc,GAAG,MAAA,iBAAiB,CAAC,KAAK,CAAC,mCAAI,IAAI,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QAC5E,QAAQ,CAAC;YACR,IAAI;YACJ,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,EAAE;YACtB,KAAK,EAA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AE,CAAC,EAAC,CAAC;gBAC1B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,WAAW,EAAC,CAAC;aAC/C,CAAA;QAEF,KAAK,aAAa,CAAC,SAAS;YAC3B,OAAO;gBACN,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC;gBAC9B,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,WAAW,EAAC,CAAC;aACnD,CAAC;QAEH,KAAK,aAAa,CAAC,WAAW;YAC7B,OAAO;gBACN,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC;gBACpD,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,WAAW,EAAC,CAAC;aACnD,CAAA;QAEF,KAAK,aAAa,CAAC,QAAQ;YAC1B,OAAO;gBACN,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;gBACvC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAC,CAAC;aAC1C,CAAA;IAEH,CAAC;AACF,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function useLocale(suppliedLocale: string | undefined): string;
@@ -0,0 +1,6 @@
1
+ import { useMemo } from "react";
2
+ import { getSupportedFormatLocale } from "../getSupportedFormatLocale";
3
+ export function useLocale(suppliedLocale) {
4
+ return useMemo(() => suppliedLocale || getSupportedFormatLocale("dateTime"), [suppliedLocale]);
5
+ }
6
+ //# sourceMappingURL=useLocale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocale.js","sourceRoot":"","sources":["../../src/date-pickers/useLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AAErE,MAAM,UAAU,SAAS,CAAC,cAAkC;IACxD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,IAAI,wBAAwB,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;AACnG,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from "@mui/material/TextField/TextField";
3
+ export type UseRenderInputProps = Pick<TextFieldProps, "fullWidth" | "helperText" | "size" | "required">;
4
+ export declare function useRenderInput(props: UseRenderInputProps): (props: TextFieldProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { useCallback } from "react";
3
+ import { TextField } from "@mui/material";
4
+ export function useRenderInput(props) {
5
+ const { fullWidth, helperText, size, required } = props;
6
+ return useCallback((props) => (React.createElement(TextField, Object.assign({ variant: "outlined", fullWidth: fullWidth, helperText: helperText, size: size, required: required }, props))), [fullWidth, helperText, size]);
7
+ }
8
+ //# sourceMappingURL=useRenderInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRenderInput.js","sourceRoot":"","sources":["../../src/date-pickers/useRenderInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AAElC,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAIxC,MAAM,UAAU,cAAc,CAAC,KAA0B;IACrD,MAAM,EAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAC,GAAG,KAAK,CAAC;IACtD,OAAO,WAAW,CAAC,CAAC,KAAqB,EAAE,EAAE,CAAC,CAC1C,oBAAC,SAAS,kBACN,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,IACd,KAAK,EACX,CACL,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AACtC,CAAC"}
package/esm/fetch.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ export interface ProblemJson {
2
+ title: string;
3
+ status: number;
4
+ type?: string;
5
+ instance?: string;
6
+ detail?: string;
7
+ [key: string]: any;
8
+ }
9
+ /** An error from the REST API. */
10
+ export declare class ApiError extends Error implements ProblemJson {
11
+ constructor(problemJson: ProblemJson);
12
+ title: string;
13
+ status: number;
14
+ type?: string;
15
+ instance?: string;
16
+ detail?: string;
17
+ [key: string]: any;
18
+ }
19
+ /**
20
+ * Creates a wrapper around window.fetch for most common REST API requests.
21
+ * @param baseUrl The base URL of the API, i.e. https://api.cubeadmin.center
22
+ * @param baseHeaders The base headers of each request, i.e. {Authorization: "Bearer XXXX"}
23
+ */
24
+ export declare function createApiFetcher(baseUrl: string, baseHeaders?: HeadersInit): {
25
+ fetch: (path: string, options?: RequestInit) => Promise<Response>;
26
+ fetchJson: <T>(path: string, options?: RequestInit) => Promise<T>;
27
+ get: <T>(path: string, options?: RequestInit) => Promise<T>;
28
+ del: (path: string, body?: any) => Promise<Response>;
29
+ put: (path: string, body?: any) => Promise<Response>;
30
+ post: (path: string, body?: any) => Promise<Response>;
31
+ patch: (path: string, body?: any) => Promise<Response>;
32
+ };
33
+ export type ApiFetcher = ReturnType<typeof createApiFetcher>;
34
+ export declare function createApiError(response: Response): Promise<ApiError>;
35
+ /**
36
+ * Creates a query string from one or more objects containing key value pairs.
37
+ * @param args
38
+ */
39
+ export declare function createQueryString(...args: Record<string, any>[]): string;
40
+ export declare function createJsonRequest(method: string, body?: any): RequestInit;
41
+ interface UploadFileRequest {
42
+ uploadUrl: string;
43
+ uploadHeaders: Record<string, string>;
44
+ }
45
+ /**
46
+ * Uploads a file to the specified upload URL that is compatible with an Amazon S3 pre-signed PUT URL.
47
+ * @param file The file to upload
48
+ * @param request The upload file request
49
+ */
50
+ export declare function uploadFile(file: File, request: UploadFileRequest): Promise<void>;
51
+ export {};
package/esm/fetch.js ADDED
@@ -0,0 +1,138 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /** An error from the REST API. */
11
+ export class ApiError extends Error {
12
+ constructor(problemJson) {
13
+ super(problemJson.title);
14
+ this.title = problemJson.title;
15
+ this.status = problemJson.status;
16
+ Object.assign(this, problemJson);
17
+ }
18
+ }
19
+ /**
20
+ * Creates a wrapper around window.fetch for most common REST API requests.
21
+ * @param baseUrl The base URL of the API, i.e. https://api.cubeadmin.center
22
+ * @param baseHeaders The base headers of each request, i.e. {Authorization: "Bearer XXXX"}
23
+ */
24
+ export function createApiFetcher(baseUrl, baseHeaders) {
25
+ function fetch(path, options) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ options = options || {};
28
+ options.headers = Object.assign(Object.assign({}, baseHeaders), options.headers);
29
+ const response = yield window.fetch(`${baseUrl}${path}`, options);
30
+ yield checkOkay(response);
31
+ return response;
32
+ });
33
+ }
34
+ function fetchJson(path, options) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const response = yield fetch(path, options);
37
+ return yield response.json();
38
+ });
39
+ }
40
+ return {
41
+ fetch,
42
+ fetchJson,
43
+ get: fetchJson,
44
+ del: (path, body) => fetch(path, createJsonRequest("delete", body)),
45
+ put: (path, body) => fetch(path, createJsonRequest("put", body)),
46
+ post: (path, body) => fetch(path, createJsonRequest("post", body)),
47
+ patch: (path, body) => fetch(path, createJsonRequest("PATCH", body)),
48
+ };
49
+ }
50
+ function checkOkay(response) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ if (!response.ok) {
53
+ throw yield createApiError(response);
54
+ }
55
+ });
56
+ }
57
+ function isProblemJson(error) {
58
+ return typeof error.title == "string" && typeof error.status == "number";
59
+ }
60
+ function isLegacySpringError(error) {
61
+ return typeof error.error == "string" && typeof error.message == "string";
62
+ }
63
+ export function createApiError(response) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const statusText = response.statusText || "Error";
66
+ try {
67
+ const error = yield response.json();
68
+ if (isProblemJson(error)) {
69
+ return new ApiError(error);
70
+ }
71
+ if (isLegacySpringError(error)) {
72
+ return new ApiError({
73
+ title: error.error,
74
+ status: response.status,
75
+ detail: error.message,
76
+ });
77
+ }
78
+ // As a fallback, just copy the response body to the error and use title and status
79
+ // from the response
80
+ return new ApiError(Object.assign(Object.assign({}, error), { title: statusText, status: response.status }));
81
+ }
82
+ catch (parseError) {
83
+ // If parsing fails, fallback to generic error based on HTTP status
84
+ return new ApiError({
85
+ title: statusText,
86
+ status: response.status,
87
+ });
88
+ }
89
+ });
90
+ }
91
+ /**
92
+ * Creates a query string from one or more objects containing key value pairs.
93
+ * @param args
94
+ */
95
+ export function createQueryString(...args) {
96
+ const allArgs = args.reduce((acc, curr) => {
97
+ const currArgs = Object.entries(curr)
98
+ .filter(([_, value]) => typeof value != "undefined" && value !== null)
99
+ .flatMap(([key, value]) => (Array.isArray(value) ? value : [value])
100
+ .map(value => [key, `${value}`]));
101
+ return acc.concat(currArgs);
102
+ }, []);
103
+ return new URLSearchParams(allArgs).toString();
104
+ }
105
+ export function createJsonRequest(method, body) {
106
+ return Object.assign({ method: method }, getBodyRequestInit(body));
107
+ }
108
+ function getBodyRequestInit(body) {
109
+ if (typeof body !== "undefined") {
110
+ return {
111
+ body: JSON.stringify(body),
112
+ headers: {
113
+ "content-type": "application/json",
114
+ },
115
+ };
116
+ }
117
+ else {
118
+ return {
119
+ body: null,
120
+ };
121
+ }
122
+ }
123
+ /**
124
+ * Uploads a file to the specified upload URL that is compatible with an Amazon S3 pre-signed PUT URL.
125
+ * @param file The file to upload
126
+ * @param request The upload file request
127
+ */
128
+ export function uploadFile(file, request) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ const response = yield fetch(request.uploadUrl, {
131
+ method: "put",
132
+ headers: Object.assign({ "content-type": file.type }, request.uploadHeaders),
133
+ body: file,
134
+ });
135
+ yield checkOkay(response);
136
+ });
137
+ }
138
+ //# sourceMappingURL=fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":";;;;;;;;;AASA,kCAAkC;AAClC,MAAM,OAAO,QAAS,SAAQ,KAAK;IAClC,YAAY,WAAwB;QACnC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAClC,CAAC;CAQD;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,WAAyB;IAC1E,SAAe,KAAK,CAAC,IAAY,EAAE,OAAqB;;YACvD,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;YACxB,OAAO,CAAC,OAAO,mCACX,WAAW,GACX,OAAO,CAAC,OAAO,CAClB,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;YAClE,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC1B,OAA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Children, ReactNode } from "react";
2
+ import { TextFieldProps } from "../Input";
3
+ import { Labels } from "../localization";
4
+ export interface FilterProps {
5
+ label?: string;
6
+ active?: ReactNode[];
7
+ enableSearch?: boolean;
8
+ onSearch?: (search: string) => any;
9
+ onClear?: () => any;
10
+ variant?: TextFieldProps["variant"];
11
+ labels: Labels<"none" | "search" | "reset">;
12
+ /**
13
+ * Whether the filter input takes up the full width of the container. This is now always true.
14
+ * If you need a smaller width, place this control in a smaller container.
15
+ *
16
+ * @deprecated This is now ignored and always true. Remove this property.
17
+ */
18
+ fullWidth?: boolean;
19
+ /**
20
+ * Whether the `children` are placed in a paper (default: true).
21
+ */
22
+ paper?: boolean;
23
+ /**
24
+ * Called when the filter is opened.
25
+ *
26
+ * @deprecated use `onChangeOpen` instead.
27
+ */
28
+ onFilterClick?: () => void;
29
+ /**
30
+ * Called when the open state of the filter changes.
31
+ * @param open Whether the filter is opened.
32
+ */
33
+ onChangeOpen?: (open: boolean) => void;
34
+ }
35
+ export declare const OutlinedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
36
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
37
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
38
+ export declare function Filter(props: PropsWithChildren<FilterProps>): JSX.Element;
@@ -0,0 +1,72 @@
1
+ import { Clear, ExpandLess, ExpandMore, FilterList } from "@mui/icons-material";
2
+ import { Box, Chip, Collapse, FormControl, IconButton, InputLabel, Paper, Stack, styled } from "@mui/material";
3
+ import React, { useEffect, useState } from "react";
4
+ import { TextField } from "../Input";
5
+ import { useFlag } from "../utils";
6
+ export const OutlinedContainer = styled(Box)(({ theme }) => ({
7
+ display: "flex",
8
+ alignItems: "center",
9
+ padding: theme.spacing(1),
10
+ borderRadius: theme.shape.borderRadius,
11
+ border: `1px solid ${theme.palette.divider}`,
12
+ }));
13
+ export function Filter(props) {
14
+ const { label, active, enableSearch, onSearch, onClear, variant, labels, paper = true, onFilterClick, onChangeOpen, children, } = props;
15
+ const [open, setOpen, , toggleOpen] = useFlag(false);
16
+ const [value, setValue] = useState("");
17
+ function handleKeyDown(e) {
18
+ if (onSearch) {
19
+ if (e.key == "Enter") {
20
+ onSearch(value);
21
+ setValue("");
22
+ }
23
+ }
24
+ }
25
+ useEffect(() => {
26
+ if (open && onFilterClick) {
27
+ onFilterClick();
28
+ }
29
+ }, [onFilterClick, open]);
30
+ useEffect(() => {
31
+ if (onChangeOpen) {
32
+ onChangeOpen(open);
33
+ }
34
+ }, [onChangeOpen, open]);
35
+ const hasActiveFilter = Boolean(active === null || active === void 0 ? void 0 : active.filter(node => Boolean(node)).length);
36
+ return (React.createElement(Box, null,
37
+ React.createElement(FormControl, { variant: variant, fullWidth: true, onClick: enableSearch ? undefined : toggleOpen },
38
+ label && (React.createElement(InputLabel, { shrink: true }, label)),
39
+ React.createElement(OutlinedContainer, null,
40
+ React.createElement(Stack, { sx: {
41
+ flexDirection: {
42
+ xs: "column",
43
+ sm: "row",
44
+ },
45
+ alignItems: "center",
46
+ width: "100%",
47
+ }, spacing: 1, useFlexGap: true },
48
+ children && (React.createElement(IconButton, { onClick: enableSearch ? toggleOpen : undefined, sx: {
49
+ display: {
50
+ xs: "none",
51
+ sm: "inline-flex",
52
+ },
53
+ } },
54
+ React.createElement(FilterList, null))),
55
+ React.createElement(Stack, { direction: "row", alignItems: "center", sx: {
56
+ justifyContent: {
57
+ xs: "center",
58
+ sm: "flex-start",
59
+ },
60
+ }, flexWrap: "wrap", spacing: 1, useFlexGap: true, flex: 1 },
61
+ active,
62
+ enableSearch && (React.createElement(TextField, { value: value, onChange: setValue, onKeyDown: handleKeyDown, variant: "standard", placeholder: enableSearch ? labels("search") : undefined }))),
63
+ React.createElement(Stack, { direction: "row", spacing: 1, alignItems: "center" },
64
+ !hasActiveFilter && (React.createElement(Chip, { variant: "outlined", label: labels("none"), clickable: true, onClick: enableSearch ? setOpen : undefined })),
65
+ hasActiveFilter && onClear && (React.createElement(IconButton, { onClick: onClear, title: labels("reset") },
66
+ React.createElement(Clear, null))),
67
+ children && (React.createElement(IconButton, { onClick: enableSearch ? toggleOpen : undefined, edge: "end" }, open ? React.createElement(ExpandLess, null) : React.createElement(ExpandMore, null))))))),
68
+ children && (React.createElement(Collapse, { in: open, mountOnEnter: true, unmountOnExit: true }, paper
69
+ ? (React.createElement(Paper, { elevation: 2 }, children))
70
+ : children))));
71
+ }
72
+ //# sourceMappingURL=Filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Filter.js","sourceRoot":"","sources":["../../src/filter/Filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7G,OAAO,KAAK,EAAE,EAA8C,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAiB,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAuCjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACzB,YAAY,EAAE,KAAK,CAAC,KAA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AAE,CAAC,EAAE,UAAU,EAAC,QAAQ;wBACpD,CAAC,eAAe,IAAI,CACpB,oBAAC,IAAI,IACJ,OAAO,EAAC,UAAU,EAClB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EACrB,SAAS,QACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAC1C,CACF;wBACA,eAAe,IAAI,OAAO,IAAI,CAC9B,oBAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;4BACnD,oBAAC,KAAK,OAAG,CACG,CACb;wBACA,QAAQ,IAAI,CACZ,oBAAC,UAAU,IAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAC,KAAK,IACpE,IAAI,CAAC,CAAC,CAAC,oBAAC,UAAU,OAAG,CAAC,CAAC,CAAC,oBAAC,UAAU,OAAG,CAC3B,CACb,CACM,CACD,CACW,CACP;QAEb,QAAQ,IAAI,CACZ,oBAAC,QAAQ,IAAC,EAAE,EAAE,IAAI,EAAE,YAAY,QAAC,aAAa,UAC5C,KAAK;YACL,CAAC,CAAC,CACD,oBAAC,KAAK,IAAC,SAAS,EAAE,CAAC,IACjB,QAAQ,CACF,CACR;YACD,CAAC,CAAC,QAAQ,CACD,CACX,CACI,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./Filter";
@@ -0,0 +1,2 @@
1
+ export * from "./Filter";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filter/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ export type CompactDisplay = "long" | "short";
3
+ export interface CompactFormatProps {
4
+ /**
5
+ * The numeric amount of currency.
6
+ */
7
+ value: number | bigint | null | undefined;
8
+ /**
9
+ * Compact display.
10
+ */
11
+ compactDisplay?: CompactDisplay;
12
+ /**
13
+ * Overrides the user's locale. Use for testing only.
14
+ */
15
+ locale?: string;
16
+ }
17
+ /**
18
+ * Returns a compact string representing the large number `value` formatted according to the user's locale.
19
+ * @param props
20
+ * @constructor
21
+ */
22
+ export declare function CompactFormat(props: CompactFormatProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { useNumberFormat } from "./useNumberFormat";
2
+ import { Fragment, useMemo } from "react";
3
+ import * as React from "react";
4
+ /**
5
+ * Returns a compact string representing the large number `value` formatted according to the user's locale.
6
+ * @param props
7
+ * @constructor
8
+ */
9
+ export function CompactFormat(props) {
10
+ const { value, compactDisplay, locale, } = props;
11
+ const options = useMemo(() => ({
12
+ notation: "compact",
13
+ compactDisplay,
14
+ }), [compactDisplay]);
15
+ const numberFormat = useNumberFormat(options, locale);
16
+ const str = useMemo(() => {
17
+ return (typeof value == "number" || typeof value == "bigint") ? numberFormat.format(value) : "";
18
+ }, [numberFormat, value]);
19
+ return React.createElement(Fragment, null, str);
20
+ }
21
+ //# sourceMappingURL=CompactFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactFormat.js","sourceRoot":"","sources":["../../src/formats/CompactFormat.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACnD,MAAM,EACF,KAAK,EACL,cAAc,EACd,MAAM,GACT,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3B,QAAQ,EAAE,SAAS;QACnB,cAAc;KACP,CAAA,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;IAE/B,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEtD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpG,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAE1B,OAAO,oBAAC,QAAQ,QAAE,GAAG,CAAY,CAAC;AACtC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import { act, create } from "react-test-renderer";
2
+ import * as React from "react";
3
+ import { CompactFormat } from "./CompactFormat";
4
+ describe("CompactFormat", () => {
5
+ test("render de-AT", () => {
6
+ let element;
7
+ act(() => {
8
+ element = create(React.createElement(CompactFormat, { value: 99000000, locale: "de-AT" }));
9
+ });
10
+ const value = element.root.children[0];
11
+ expect(value).toBe("99\u00a0Mio.");
12
+ });
13
+ test("render en-US", () => {
14
+ let element;
15
+ act(() => {
16
+ element = create(React.createElement(CompactFormat, { value: 99000000, locale: "en-US" }));
17
+ });
18
+ const value = element.root.children[0];
19
+ expect(value).toBe("99M");
20
+ });
21
+ });
22
+ //# sourceMappingURL=CompactFormat.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactFormat.spec.js","sourceRoot":"","sources":["../../src/formats/CompactFormat.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAE3B,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE;QACtB,IAAI,OAA0B,CAAC;QAC/B,GAAG,CAAC,GAAG,EAAE;YACL,OAAO,GAAG,MAAM,CAAC,oBAAC,aAAa,IAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,OAAO,GAAG,CAAC,CAAC;QACxE,CAAC,CAAC,CAAA;QACF,MAAM,KAAK,GAAG,OAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE;QACtB,IAAI,OAA0B,CAAC;QAC/B,GAAG,CAAC,GAAG,EAAE;YACL,OAAO,GAAG,MAAM,CAAC,oBAAC,aAAa,IAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,OAAO,GAAG,CAAC,CAAC;QACxE,CAAC,CAAC,CAAA;QACF,MAAM,KAAK,GAAG,OAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}