@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.
- package/README.md +65 -0
- package/esm/AppShell/AppShell.d.ts +12 -0
- package/esm/AppShell/AppShell.js +92 -0
- package/esm/AppShell/AppShell.js.map +1 -0
- package/esm/AppShell/index.d.ts +1 -0
- package/esm/AppShell/index.js +2 -0
- package/esm/AppShell/index.js.map +1 -0
- package/esm/ErrorAlert.d.ts +12 -0
- package/esm/ErrorAlert.js +61 -0
- package/esm/ErrorAlert.js.map +1 -0
- package/esm/Input/ActionsMenu.d.ts +9 -0
- package/esm/Input/ActionsMenu.js +29 -0
- package/esm/Input/ActionsMenu.js.map +1 -0
- package/esm/Input/Checkbox.d.ts +9 -0
- package/esm/Input/Checkbox.js +23 -0
- package/esm/Input/Checkbox.js.map +1 -0
- package/esm/Input/EmailSenderField.d.ts +8 -0
- package/esm/Input/EmailSenderField.js +71 -0
- package/esm/Input/EmailSenderField.js.map +1 -0
- package/esm/Input/NumberField.d.ts +10 -0
- package/esm/Input/NumberField.js +94 -0
- package/esm/Input/NumberField.js.map +1 -0
- package/esm/Input/RadioGroup.d.ts +12 -0
- package/esm/Input/RadioGroup.js +20 -0
- package/esm/Input/RadioGroup.js.map +1 -0
- package/esm/Input/Select.d.ts +11 -0
- package/esm/Input/Select.js +19 -0
- package/esm/Input/Select.js.map +1 -0
- package/esm/Input/Selector.d.ts +10 -0
- package/esm/Input/Selector.js +19 -0
- package/esm/Input/Selector.js.map +1 -0
- package/esm/Input/Switch.d.ts +9 -0
- package/esm/Input/Switch.js +23 -0
- package/esm/Input/Switch.js.map +1 -0
- package/esm/Input/TextField.d.ts +7 -0
- package/esm/Input/TextField.js +58 -0
- package/esm/Input/TextField.js.map +1 -0
- package/esm/Input/UrlUploadField.d.ts +9 -0
- package/esm/Input/UrlUploadField.js +43 -0
- package/esm/Input/UrlUploadField.js.map +1 -0
- package/esm/Input/index.d.ts +9 -0
- package/esm/Input/index.js +10 -0
- package/esm/Input/index.js.map +1 -0
- package/esm/LanguageSwitcher/LanguageSwitcher.d.ts +14 -0
- package/esm/LanguageSwitcher/LanguageSwitcher.js +20 -0
- package/esm/LanguageSwitcher/LanguageSwitcher.js.map +1 -0
- package/esm/LanguageSwitcher/index.d.ts +1 -0
- package/esm/LanguageSwitcher/index.js +2 -0
- package/esm/LanguageSwitcher/index.js.map +1 -0
- package/esm/Paging/Paging.d.ts +40 -0
- package/esm/Paging/Paging.js +43 -0
- package/esm/Paging/Paging.js.map +1 -0
- package/esm/Paging/index.d.ts +1 -0
- package/esm/Paging/index.js +2 -0
- package/esm/Paging/index.js.map +1 -0
- package/esm/VCThemeProvider/JetbrainsMonoFont.d.ts +5 -0
- package/esm/VCThemeProvider/JetbrainsMonoFont.js +52 -0
- package/esm/VCThemeProvider/JetbrainsMonoFont.js.map +1 -0
- package/esm/VCThemeProvider/RobotoFont.d.ts +7 -0
- package/esm/VCThemeProvider/RobotoFont.js +49 -0
- package/esm/VCThemeProvider/RobotoFont.js.map +1 -0
- package/esm/VCThemeProvider/ThemeModeSwitcher.d.ts +2 -0
- package/esm/VCThemeProvider/ThemeModeSwitcher.js +14 -0
- package/esm/VCThemeProvider/ThemeModeSwitcher.js.map +1 -0
- package/esm/VCThemeProvider/VCThemeProvider.d.ts +25 -0
- package/esm/VCThemeProvider/VCThemeProvider.js +173 -0
- package/esm/VCThemeProvider/VCThemeProvider.js.map +1 -0
- package/esm/VCThemeProvider/code-colors.d.ts +108 -0
- package/esm/VCThemeProvider/code-colors.js +26 -0
- package/esm/VCThemeProvider/code-colors.js.map +1 -0
- package/esm/VCThemeProvider/index.d.ts +5 -0
- package/esm/VCThemeProvider/index.js +6 -0
- package/esm/VCThemeProvider/index.js.map +1 -0
- package/esm/audit/AuditChanges.d.ts +9 -0
- package/esm/audit/AuditChanges.js +43 -0
- package/esm/audit/AuditChanges.js.map +1 -0
- package/esm/audit/AuditTimeline.d.ts +6 -0
- package/esm/audit/AuditTimeline.js +13 -0
- package/esm/audit/AuditTimeline.js.map +1 -0
- package/esm/audit/AuditTimelineItem.d.ts +10 -0
- package/esm/audit/AuditTimelineItem.js +27 -0
- package/esm/audit/AuditTimelineItem.js.map +1 -0
- package/esm/audit/index.d.ts +4 -0
- package/esm/audit/index.js +5 -0
- package/esm/audit/index.js.map +1 -0
- package/esm/audit/types.d.ts +42 -0
- package/esm/audit/types.js +2 -0
- package/esm/audit/types.js.map +1 -0
- package/esm/breadcrumbs.d.ts +6 -0
- package/esm/breadcrumbs.js +13 -0
- package/esm/breadcrumbs.js.map +1 -0
- package/esm/code/Code.d.ts +10 -0
- package/esm/code/Code.js +19 -0
- package/esm/code/Code.js.map +1 -0
- package/esm/code/CodeBlock.d.ts +4 -0
- package/esm/code/CodeBlock.js +6 -0
- package/esm/code/CodeBlock.js.map +1 -0
- package/esm/code/Json.d.ts +4 -0
- package/esm/code/Json.js +60 -0
- package/esm/code/Json.js.map +1 -0
- package/esm/code/index.d.ts +3 -0
- package/esm/code/index.js +4 -0
- package/esm/code/index.js.map +1 -0
- package/esm/confirm/ConfirmButton.d.ts +16 -0
- package/esm/confirm/ConfirmButton.js +29 -0
- package/esm/confirm/ConfirmButton.js.map +1 -0
- package/esm/confirm/ConfirmDialog.d.ts +16 -0
- package/esm/confirm/ConfirmDialog.js +35 -0
- package/esm/confirm/ConfirmDialog.js.map +1 -0
- package/esm/confirm/ConfirmIconButton.d.ts +14 -0
- package/esm/confirm/ConfirmIconButton.js +29 -0
- package/esm/confirm/ConfirmIconButton.js.map +1 -0
- package/esm/confirm/ConfirmMenuItem.d.ts +15 -0
- package/esm/confirm/ConfirmMenuItem.js +31 -0
- package/esm/confirm/ConfirmMenuItem.js.map +1 -0
- package/esm/confirm/index.d.ts +4 -0
- package/esm/confirm/index.js +5 -0
- package/esm/confirm/index.js.map +1 -0
- package/esm/container/ContainerLayout.d.ts +8 -0
- package/esm/container/ContainerLayout.js +20 -0
- package/esm/container/ContainerLayout.js.map +1 -0
- package/esm/container/ContainerSettingsContext.d.ts +12 -0
- package/esm/container/ContainerSettingsContext.js +46 -0
- package/esm/container/ContainerSettingsContext.js.map +1 -0
- package/esm/container/ContainerWidthControl.d.ts +6 -0
- package/esm/container/ContainerWidthControl.js +12 -0
- package/esm/container/ContainerWidthControl.js.map +1 -0
- package/esm/container/index.d.ts +3 -0
- package/esm/container/index.js +4 -0
- package/esm/container/index.js.map +1 -0
- package/esm/content-table/ContentTable.d.ts +25 -0
- package/esm/content-table/ContentTable.js +87 -0
- package/esm/content-table/ContentTable.js.map +1 -0
- package/esm/content-table/UndrawEmpty.d.ts +2 -0
- package/esm/content-table/UndrawEmpty.js +71 -0
- package/esm/content-table/UndrawEmpty.js.map +1 -0
- package/esm/content-table/index.d.ts +1 -0
- package/esm/content-table/index.js +2 -0
- package/esm/content-table/index.js.map +1 -0
- package/esm/country/countries.d.ts +34 -0
- package/esm/country/countries.js +266 -0
- package/esm/country/countries.js.map +1 -0
- package/esm/country/country-select.d.ts +8 -0
- package/esm/country/country-select.js +18 -0
- package/esm/country/country-select.js.map +1 -0
- package/esm/country/index.d.ts +5 -0
- package/esm/country/index.js +6 -0
- package/esm/country/index.js.map +1 -0
- package/esm/country/locale-select.d.ts +9 -0
- package/esm/country/locale-select.js +15 -0
- package/esm/country/locale-select.js.map +1 -0
- package/esm/country/locales.d.ts +10 -0
- package/esm/country/locales.js +190 -0
- package/esm/country/locales.js.map +1 -0
- package/esm/country/phone-prefix-select.d.ts +9 -0
- package/esm/country/phone-prefix-select.js +18 -0
- package/esm/country/phone-prefix-select.js.map +1 -0
- package/esm/cube/BoxFeatures.d.ts +11 -0
- package/esm/cube/BoxFeatures.js +40 -0
- package/esm/cube/BoxFeatures.js.map +1 -0
- package/esm/cube/BoxMaintenanceChip.d.ts +9 -0
- package/esm/cube/BoxMaintenanceChip.js +15 -0
- package/esm/cube/BoxMaintenanceChip.js.map +1 -0
- package/esm/cube/BoxNumber.d.ts +6 -0
- package/esm/cube/BoxNumber.js +6 -0
- package/esm/cube/BoxNumber.js.map +1 -0
- package/esm/cube/BoxType.d.ts +7 -0
- package/esm/cube/BoxType.js +21 -0
- package/esm/cube/BoxType.js.map +1 -0
- package/esm/cube/CubeConnectedChip.d.ts +9 -0
- package/esm/cube/CubeConnectedChip.js +22 -0
- package/esm/cube/CubeConnectedChip.js.map +1 -0
- package/esm/cube/LockStatusChip.d.ts +11 -0
- package/esm/cube/LockStatusChip.js +40 -0
- package/esm/cube/LockStatusChip.js.map +1 -0
- package/esm/cube/UtilizationBar.d.ts +11 -0
- package/esm/cube/UtilizationBar.js +38 -0
- package/esm/cube/UtilizationBar.js.map +1 -0
- package/esm/cube/accessibility.d.ts +48 -0
- package/esm/cube/accessibility.js +242 -0
- package/esm/cube/accessibility.js.map +1 -0
- package/esm/cube/index.d.ts +8 -0
- package/esm/cube/index.js +9 -0
- package/esm/cube/index.js.map +1 -0
- package/esm/data-table/DataTable.d.ts +63 -0
- package/esm/data-table/DataTable.js +124 -0
- package/esm/data-table/DataTable.js.map +1 -0
- package/esm/data-table/DataTableColumnSettings.d.ts +10 -0
- package/esm/data-table/DataTableColumnSettings.js +98 -0
- package/esm/data-table/DataTableColumnSettings.js.map +1 -0
- package/esm/data-table/DataTableHeader.d.ts +2 -0
- package/esm/data-table/DataTableHeader.js +6 -0
- package/esm/data-table/DataTableHeader.js.map +1 -0
- package/esm/data-table/DataTableToolbar.d.ts +2 -0
- package/esm/data-table/DataTableToolbar.js +6 -0
- package/esm/data-table/DataTableToolbar.js.map +1 -0
- package/esm/data-table/index.d.ts +8 -0
- package/esm/data-table/index.js +9 -0
- package/esm/data-table/index.js.map +1 -0
- package/esm/data-table/useDataTableColumnStorage.d.ts +5 -0
- package/esm/data-table/useDataTableColumnStorage.js +20 -0
- package/esm/data-table/useDataTableColumnStorage.js.map +1 -0
- package/esm/data-table/useDataTableStorage.d.ts +16 -0
- package/esm/data-table/useDataTableStorage.js +19 -0
- package/esm/data-table/useDataTableStorage.js.map +1 -0
- package/esm/data-table/useSpringPage.d.ts +6 -0
- package/esm/data-table/useSpringPage.js +18 -0
- package/esm/data-table/useSpringPage.js.map +1 -0
- package/esm/data-table/useSpringPageable.d.ts +9 -0
- package/esm/data-table/useSpringPageable.js +10 -0
- package/esm/data-table/useSpringPageable.js.map +1 -0
- package/esm/date-pickers/PlainAdapterCommon.d.ts +31 -0
- package/esm/date-pickers/PlainAdapterCommon.js +97 -0
- package/esm/date-pickers/PlainAdapterCommon.js.map +1 -0
- package/esm/date-pickers/PlainDateAdapter.d.ts +30 -0
- package/esm/date-pickers/PlainDateAdapter.js +114 -0
- package/esm/date-pickers/PlainDateAdapter.js.map +1 -0
- package/esm/date-pickers/PlainDatePicker.d.ts +21 -0
- package/esm/date-pickers/PlainDatePicker.js +26 -0
- package/esm/date-pickers/PlainDatePicker.js.map +1 -0
- package/esm/date-pickers/PlainDatePicker.spec.d.ts +1 -0
- package/esm/date-pickers/PlainDatePicker.spec.js +15 -0
- package/esm/date-pickers/PlainDatePicker.spec.js.map +1 -0
- package/esm/date-pickers/PlainDateTimeAdapter.d.ts +30 -0
- package/esm/date-pickers/PlainDateTimeAdapter.js +114 -0
- package/esm/date-pickers/PlainDateTimeAdapter.js.map +1 -0
- package/esm/date-pickers/PlainDateTimePicker.d.ts +20 -0
- package/esm/date-pickers/PlainDateTimePicker.js +26 -0
- package/esm/date-pickers/PlainDateTimePicker.js.map +1 -0
- package/esm/date-pickers/PlainDateTimePicker.spec.d.ts +1 -0
- package/esm/date-pickers/PlainDateTimePicker.spec.js +15 -0
- package/esm/date-pickers/PlainDateTimePicker.spec.js.map +1 -0
- package/esm/date-pickers/PlainTimeAdapter.d.ts +58 -0
- package/esm/date-pickers/PlainTimeAdapter.js +194 -0
- package/esm/date-pickers/PlainTimeAdapter.js.map +1 -0
- package/esm/date-pickers/PlainTimePicker.d.ts +16 -0
- package/esm/date-pickers/PlainTimePicker.js +24 -0
- package/esm/date-pickers/PlainTimePicker.js.map +1 -0
- package/esm/date-pickers/PlainTimePicker.spec.d.ts +1 -0
- package/esm/date-pickers/PlainTimePicker.spec.js +15 -0
- package/esm/date-pickers/PlainTimePicker.spec.js.map +1 -0
- package/esm/date-pickers/TemporalAdapter.d.ts +18 -0
- package/esm/date-pickers/TemporalAdapter.js +109 -0
- package/esm/date-pickers/TemporalAdapter.js.map +1 -0
- package/esm/date-pickers/TimezoneSelect.d.ts +9 -0
- package/esm/date-pickers/TimezoneSelect.js +357 -0
- package/esm/date-pickers/TimezoneSelect.js.map +1 -0
- package/esm/date-pickers/getFormatString.d.ts +11 -0
- package/esm/date-pickers/getFormatString.js +26 -0
- package/esm/date-pickers/getFormatString.js.map +1 -0
- package/esm/date-pickers/index.d.ts +5 -0
- package/esm/date-pickers/index.js +6 -0
- package/esm/date-pickers/index.js.map +1 -0
- package/esm/date-pickers/parse.d.ts +4 -0
- package/esm/date-pickers/parse.js +66 -0
- package/esm/date-pickers/parse.js.map +1 -0
- package/esm/date-pickers/timeframe-picker.d.ts +46 -0
- package/esm/date-pickers/timeframe-picker.js +120 -0
- package/esm/date-pickers/timeframe-picker.js.map +1 -0
- package/esm/date-pickers/useLocale.d.ts +1 -0
- package/esm/date-pickers/useLocale.js +6 -0
- package/esm/date-pickers/useLocale.js.map +1 -0
- package/esm/date-pickers/useRenderInput.d.ts +4 -0
- package/esm/date-pickers/useRenderInput.js +8 -0
- package/esm/date-pickers/useRenderInput.js.map +1 -0
- package/esm/fetch.d.ts +51 -0
- package/esm/fetch.js +138 -0
- package/esm/fetch.js.map +1 -0
- package/esm/filter/Filter.d.ts +38 -0
- package/esm/filter/Filter.js +72 -0
- package/esm/filter/Filter.js.map +1 -0
- package/esm/filter/index.d.ts +1 -0
- package/esm/filter/index.js +2 -0
- package/esm/filter/index.js.map +1 -0
- package/esm/formats/CompactFormat.d.ts +22 -0
- package/esm/formats/CompactFormat.js +21 -0
- package/esm/formats/CompactFormat.js.map +1 -0
- package/esm/formats/CompactFormat.spec.d.ts +1 -0
- package/esm/formats/CompactFormat.spec.js +22 -0
- package/esm/formats/CompactFormat.spec.js.map +1 -0
- package/esm/formats/CurrencyFormat.d.ts +39 -0
- package/esm/formats/CurrencyFormat.js +25 -0
- package/esm/formats/CurrencyFormat.js.map +1 -0
- package/esm/formats/CurrencyFormat.spec.d.ts +1 -0
- package/esm/formats/CurrencyFormat.spec.js +22 -0
- package/esm/formats/CurrencyFormat.spec.js.map +1 -0
- package/esm/formats/DecimalFormat.d.ts +29 -0
- package/esm/formats/DecimalFormat.js +22 -0
- package/esm/formats/DecimalFormat.js.map +1 -0
- package/esm/formats/DecimalFormat.spec.d.ts +1 -0
- package/esm/formats/DecimalFormat.spec.js +22 -0
- package/esm/formats/DecimalFormat.spec.js.map +1 -0
- package/esm/formats/DurationFormat.d.ts +23 -0
- package/esm/formats/DurationFormat.js +35 -0
- package/esm/formats/DurationFormat.js.map +1 -0
- package/esm/formats/DurationFormat.spec.d.ts +1 -0
- package/esm/formats/DurationFormat.spec.js +52 -0
- package/esm/formats/DurationFormat.spec.js.map +1 -0
- package/esm/formats/RelativeTemporalFormat.d.ts +22 -0
- package/esm/formats/RelativeTemporalFormat.js +57 -0
- package/esm/formats/RelativeTemporalFormat.js.map +1 -0
- package/esm/formats/RelativeTemporalFormat.spec.d.ts +1 -0
- package/esm/formats/RelativeTemporalFormat.spec.js +77 -0
- package/esm/formats/RelativeTemporalFormat.spec.js.map +1 -0
- package/esm/formats/SwitchableTemporalFormat.d.ts +5 -0
- package/esm/formats/SwitchableTemporalFormat.js +11 -0
- package/esm/formats/SwitchableTemporalFormat.js.map +1 -0
- package/esm/formats/TemporalFormat.d.ts +27 -0
- package/esm/formats/TemporalFormat.js +19 -0
- package/esm/formats/TemporalFormat.js.map +1 -0
- package/esm/formats/TemporalFormat.spec.d.ts +1 -0
- package/esm/formats/TemporalFormat.spec.js +87 -0
- package/esm/formats/TemporalFormat.spec.js.map +1 -0
- package/esm/formats/TemporalRangeFormat.d.ts +30 -0
- package/esm/formats/TemporalRangeFormat.js +17 -0
- package/esm/formats/TemporalRangeFormat.js.map +1 -0
- package/esm/formats/TemporalRangeFormat.spec.d.ts +1 -0
- package/esm/formats/TemporalRangeFormat.spec.js +87 -0
- package/esm/formats/TemporalRangeFormat.spec.js.map +1 -0
- package/esm/formats/index.d.ts +8 -0
- package/esm/formats/index.js +9 -0
- package/esm/formats/index.js.map +1 -0
- package/esm/formats/types.d.ts +2 -0
- package/esm/formats/types.js +2 -0
- package/esm/formats/types.js.map +1 -0
- package/esm/formats/useDateTimeFormat.d.ts +2 -0
- package/esm/formats/useDateTimeFormat.js +7 -0
- package/esm/formats/useDateTimeFormat.js.map +1 -0
- package/esm/formats/useNumberFormat.d.ts +1 -0
- package/esm/formats/useNumberFormat.js +6 -0
- package/esm/formats/useNumberFormat.js.map +1 -0
- package/esm/formats/useRelativeTimeFormat.d.ts +1 -0
- package/esm/formats/useRelativeTimeFormat.js +6 -0
- package/esm/formats/useRelativeTimeFormat.js.map +1 -0
- package/esm/forms/EditForm.d.ts +13 -0
- package/esm/forms/EditForm.js +22 -0
- package/esm/forms/EditForm.js.map +1 -0
- package/esm/forms/SearchForm.d.ts +7 -0
- package/esm/forms/SearchForm.js +36 -0
- package/esm/forms/SearchForm.js.map +1 -0
- package/esm/forms/SubmitButton.d.ts +9 -0
- package/esm/forms/SubmitButton.js +28 -0
- package/esm/forms/SubmitButton.js.map +1 -0
- package/esm/forms/index.d.ts +4 -0
- package/esm/forms/index.js +5 -0
- package/esm/forms/index.js.map +1 -0
- package/esm/forms/useFormSubmit.d.ts +12 -0
- package/esm/forms/useFormSubmit.js +28 -0
- package/esm/forms/useFormSubmit.js.map +1 -0
- package/esm/getNavigatorLanguages.d.ts +5 -0
- package/esm/getNavigatorLanguages.js +11 -0
- package/esm/getNavigatorLanguages.js.map +1 -0
- package/esm/getSupportedFormatLocale.d.ts +19 -0
- package/esm/getSupportedFormatLocale.js +21 -0
- package/esm/getSupportedFormatLocale.js.map +1 -0
- package/esm/help/HelpButton.d.ts +12 -0
- package/esm/help/HelpButton.js +74 -0
- package/esm/help/HelpButton.js.map +1 -0
- package/esm/help/HelpDrawer.d.ts +3 -0
- package/esm/help/HelpDrawer.js +48 -0
- package/esm/help/HelpDrawer.js.map +1 -0
- package/esm/help/HelpSettingsContext.d.ts +26 -0
- package/esm/help/HelpSettingsContext.js +94 -0
- package/esm/help/HelpSettingsContext.js.map +1 -0
- package/esm/help/index.d.ts +3 -0
- package/esm/help/index.js +4 -0
- package/esm/help/index.js.map +1 -0
- package/esm/icons.d.ts +21 -0
- package/esm/icons.js +22 -0
- package/esm/icons.js.map +1 -0
- package/esm/index.d.ts +34 -0
- package/esm/index.js +35 -0
- package/esm/index.js.map +1 -0
- package/esm/layout/ErrorBoundary.d.ts +46 -0
- package/esm/layout/ErrorBoundary.js +186 -0
- package/esm/layout/ErrorBoundary.js.map +1 -0
- package/esm/layout/NotFound.d.ts +9 -0
- package/esm/layout/NotFound.js +26 -0
- package/esm/layout/NotFound.js.map +1 -0
- package/esm/layout/NotFoundSvg.d.ts +2 -0
- package/esm/layout/NotFoundSvg.js +37 -0
- package/esm/layout/NotFoundSvg.js.map +1 -0
- package/esm/layout/UserNav.d.ts +15 -0
- package/esm/layout/UserNav.js +50 -0
- package/esm/layout/UserNav.js.map +1 -0
- package/esm/layout/index.d.ts +5 -0
- package/esm/layout/index.js +6 -0
- package/esm/layout/index.js.map +1 -0
- package/esm/layout/layout-context.d.ts +9 -0
- package/esm/layout/layout-context.js +23 -0
- package/esm/layout/layout-context.js.map +1 -0
- package/esm/layout/page-title.d.ts +7 -0
- package/esm/layout/page-title.js +41 -0
- package/esm/layout/page-title.js.map +1 -0
- package/esm/list/List.d.ts +14 -0
- package/esm/list/List.js +25 -0
- package/esm/list/List.js.map +1 -0
- package/esm/list/SkeletonListItem.d.ts +14 -0
- package/esm/list/SkeletonListItem.js +11 -0
- package/esm/list/SkeletonListItem.js.map +1 -0
- package/esm/list/index.d.ts +1 -0
- package/esm/list/index.js +2 -0
- package/esm/list/index.js.map +1 -0
- package/esm/localization.d.ts +140 -0
- package/esm/localization.js +200 -0
- package/esm/localization.js.map +1 -0
- package/esm/logo/Logo.d.ts +7 -0
- package/esm/logo/Logo.js +29 -0
- package/esm/logo/Logo.js.map +1 -0
- package/esm/logo/VCAppLogo.d.ts +7 -0
- package/esm/logo/VCAppLogo.js +28 -0
- package/esm/logo/VCAppLogo.js.map +1 -0
- package/esm/logo/VCLogo.d.ts +4 -0
- package/esm/logo/VCLogo.js +33 -0
- package/esm/logo/VCLogo.js.map +1 -0
- package/esm/logo/VCLogoIcon.d.ts +4 -0
- package/esm/logo/VCLogoIcon.js +36 -0
- package/esm/logo/VCLogoIcon.js.map +1 -0
- package/esm/logo/index.d.ts +4 -0
- package/esm/logo/index.js +5 -0
- package/esm/logo/index.js.map +1 -0
- package/esm/splash/index.d.ts +3 -0
- package/esm/splash/index.js +37 -0
- package/esm/splash/index.js.map +1 -0
- package/esm/spring.d.ts +14 -0
- package/esm/spring.js +2 -0
- package/esm/spring.js.map +1 -0
- package/esm/storage/MemoryStorage.d.ts +7 -0
- package/esm/storage/MemoryStorage.js +18 -0
- package/esm/storage/MemoryStorage.js.map +1 -0
- package/esm/storage/index.d.ts +2 -0
- package/esm/storage/index.js +3 -0
- package/esm/storage/index.js.map +1 -0
- package/esm/storage/storage.d.ts +16 -0
- package/esm/storage/storage.js +87 -0
- package/esm/storage/storage.js.map +1 -0
- package/esm/storage/useStorage.d.ts +1 -0
- package/esm/storage/useStorage.js +29 -0
- package/esm/storage/useStorage.js.map +1 -0
- package/esm/tabs/Tabs.d.ts +10 -0
- package/esm/tabs/Tabs.js +95 -0
- package/esm/tabs/Tabs.js.map +1 -0
- package/esm/tabs/index.d.ts +1 -0
- package/esm/tabs/index.js +2 -0
- package/esm/tabs/index.js.map +1 -0
- package/esm/temporal/index.d.ts +2 -0
- package/esm/temporal/index.js +3 -0
- package/esm/temporal/index.js.map +1 -0
- package/esm/temporal/parse.d.ts +4 -0
- package/esm/temporal/parse.js +25 -0
- package/esm/temporal/parse.js.map +1 -0
- package/esm/temporal/polyfill.d.ts +34 -0
- package/esm/temporal/polyfill.js +10 -0
- package/esm/temporal/polyfill.js.map +1 -0
- package/esm/utils/defined.d.ts +1 -0
- package/esm/utils/defined.js +4 -0
- package/esm/utils/defined.js.map +1 -0
- package/esm/utils/index.d.ts +3 -0
- package/esm/utils/index.js +4 -0
- package/esm/utils/index.js.map +1 -0
- package/esm/utils/useFlag.d.ts +1 -0
- package/esm/utils/useFlag.js +9 -0
- package/esm/utils/useFlag.js.map +1 -0
- package/esm/utils/useIsMounted.d.ts +1 -0
- package/esm/utils/useIsMounted.js +12 -0
- package/esm/utils/useIsMounted.js.map +1 -0
- package/esm/view/View.d.ts +9 -0
- package/esm/view/View.js +22 -0
- package/esm/view/View.js.map +1 -0
- package/esm/view/ViewHeader.d.ts +10 -0
- package/esm/view/ViewHeader.js +15 -0
- package/esm/view/ViewHeader.js.map +1 -0
- package/esm/view/index.d.ts +2 -0
- package/esm/view/index.js +3 -0
- package/esm/view/index.js.map +1 -0
- package/package.json +72 -0
- package/src/AppShell/AppShell.tsx +165 -0
- package/src/AppShell/index.tsx +1 -0
- package/src/ErrorAlert.tsx +71 -0
- package/src/Input/ActionsMenu.tsx +102 -0
- package/src/Input/Checkbox.tsx +33 -0
- package/src/Input/EmailSenderField.tsx +64 -0
- package/src/Input/NumberField.tsx +127 -0
- package/src/Input/RadioGroup.tsx +37 -0
- package/src/Input/Select.tsx +33 -0
- package/src/Input/Selector.tsx +21 -0
- package/src/Input/Switch.tsx +33 -0
- package/src/Input/TextField.tsx +69 -0
- package/src/Input/UrlUploadField.tsx +84 -0
- package/src/Input/index.ts +9 -0
- package/src/LanguageSwitcher/LanguageSwitcher.tsx +63 -0
- package/src/LanguageSwitcher/index.ts +1 -0
- package/src/Paging/Paging.ts +77 -0
- package/src/Paging/index.ts +1 -0
- package/src/VCThemeProvider/JetbrainsMonoFont.tsx +55 -0
- package/src/VCThemeProvider/RobotoFont.tsx +52 -0
- package/src/VCThemeProvider/ThemeModeSwitcher.tsx +23 -0
- package/src/VCThemeProvider/VCThemeProvider.tsx +232 -0
- package/src/VCThemeProvider/code-colors.ts +34 -0
- package/src/VCThemeProvider/files.d.ts +2 -0
- package/src/VCThemeProvider/index.ts +5 -0
- package/src/audit/AuditChanges.tsx +82 -0
- package/src/audit/AuditTimeline.tsx +25 -0
- package/src/audit/AuditTimelineItem.tsx +75 -0
- package/src/audit/index.ts +4 -0
- package/src/audit/types.ts +46 -0
- package/src/breadcrumbs.tsx +27 -0
- package/src/code/Code.tsx +53 -0
- package/src/code/CodeBlock.tsx +15 -0
- package/src/code/Json.tsx +73 -0
- package/src/code/index.ts +3 -0
- package/src/confirm/ConfirmButton.tsx +69 -0
- package/src/confirm/ConfirmDialog.tsx +68 -0
- package/src/confirm/ConfirmIconButton.tsx +62 -0
- package/src/confirm/ConfirmMenuItem.tsx +66 -0
- package/src/confirm/index.ts +4 -0
- package/src/container/ContainerLayout.tsx +40 -0
- package/src/container/ContainerSettingsContext.tsx +77 -0
- package/src/container/ContainerWidthControl.tsx +20 -0
- package/src/container/index.ts +3 -0
- package/src/content-table/ContentTable.tsx +214 -0
- package/src/content-table/UndrawEmpty.tsx +285 -0
- package/src/content-table/index.ts +1 -0
- package/src/country/countries.ts +268 -0
- package/src/country/country-select.tsx +48 -0
- package/src/country/index.ts +5 -0
- package/src/country/locale-select.tsx +43 -0
- package/src/country/locales.ts +192 -0
- package/src/country/phone-prefix-select.tsx +50 -0
- package/src/cube/BoxFeatures.tsx +91 -0
- package/src/cube/BoxMaintenanceChip.tsx +33 -0
- package/src/cube/BoxNumber.tsx +10 -0
- package/src/cube/BoxType.tsx +22 -0
- package/src/cube/CubeConnectedChip.tsx +16 -0
- package/src/cube/LockStatusChip.tsx +54 -0
- package/src/cube/UtilizationBar.tsx +94 -0
- package/src/cube/accessibility.tsx +422 -0
- package/src/cube/index.tsx +8 -0
- package/src/data-table/DataTable.tsx +338 -0
- package/src/data-table/DataTableColumnSettings.tsx +204 -0
- package/src/data-table/DataTableHeader.tsx +10 -0
- package/src/data-table/DataTableToolbar.tsx +10 -0
- package/src/data-table/index.tsx +8 -0
- package/src/data-table/useDataTableColumnStorage.ts +26 -0
- package/src/data-table/useDataTableStorage.ts +43 -0
- package/src/data-table/useSpringPage.ts +21 -0
- package/src/data-table/useSpringPageable.ts +25 -0
- package/src/date-pickers/PlainAdapterCommon.ts +125 -0
- package/src/date-pickers/PlainDateAdapter.spec.ts +50 -0
- package/src/date-pickers/PlainDateAdapter.ts +139 -0
- package/src/date-pickers/PlainDatePicker.spec.tsx +22 -0
- package/src/date-pickers/PlainDatePicker.tsx +73 -0
- package/src/date-pickers/PlainDateTimeAdapter.spec.ts +50 -0
- package/src/date-pickers/PlainDateTimeAdapter.ts +140 -0
- package/src/date-pickers/PlainDateTimePicker.spec.tsx +22 -0
- package/src/date-pickers/PlainDateTimePicker.tsx +65 -0
- package/src/date-pickers/PlainTimeAdapter.ts +247 -0
- package/src/date-pickers/PlainTimePicker.spec.tsx +22 -0
- package/src/date-pickers/PlainTimePicker.tsx +45 -0
- package/src/date-pickers/TemporalAdapter.ts +150 -0
- package/src/date-pickers/TimezoneSelect.tsx +387 -0
- package/src/date-pickers/getFormatString.ts +38 -0
- package/src/date-pickers/index.ts +5 -0
- package/src/date-pickers/parse.spec.ts +43 -0
- package/src/date-pickers/parse.ts +72 -0
- package/src/date-pickers/timeframe-picker.tsx +202 -0
- package/src/date-pickers/useLocale.ts +6 -0
- package/src/date-pickers/useRenderInput.tsx +20 -0
- package/src/fetch.spec.ts +85 -0
- package/src/fetch.ts +165 -0
- package/src/filter/Filter.tsx +194 -0
- package/src/filter/index.ts +1 -0
- package/src/formats/CompactFormat.spec.tsx +25 -0
- package/src/formats/CompactFormat.tsx +48 -0
- package/src/formats/CurrencyFormat.spec.tsx +25 -0
- package/src/formats/CurrencyFormat.tsx +77 -0
- package/src/formats/DecimalFormat.spec.tsx +25 -0
- package/src/formats/DecimalFormat.tsx +59 -0
- package/src/formats/DurationFormat.spec.tsx +57 -0
- package/src/formats/DurationFormat.tsx +72 -0
- package/src/formats/RelativeTemporalFormat.spec.tsx +84 -0
- package/src/formats/RelativeTemporalFormat.tsx +86 -0
- package/src/formats/SwitchableTemporalFormat.tsx +17 -0
- package/src/formats/TemporalFormat.spec.tsx +110 -0
- package/src/formats/TemporalFormat.tsx +58 -0
- package/src/formats/TemporalRangeFormat.spec.tsx +159 -0
- package/src/formats/TemporalRangeFormat.tsx +62 -0
- package/src/formats/index.ts +8 -0
- package/src/formats/types.ts +4 -0
- package/src/formats/useDateTimeFormat.ts +7 -0
- package/src/formats/useNumberFormat.ts +6 -0
- package/src/formats/useRelativeTimeFormat.ts +6 -0
- package/src/forms/EditForm.tsx +69 -0
- package/src/forms/SearchForm.tsx +51 -0
- package/src/forms/SubmitButton.tsx +34 -0
- package/src/forms/index.ts +4 -0
- package/src/forms/useFormSubmit.tsx +28 -0
- package/src/getNavigatorLanguages.ts +11 -0
- package/src/getSupportedFormatLocale.ts +24 -0
- package/src/help/HelpButton.tsx +134 -0
- package/src/help/HelpDrawer.tsx +65 -0
- package/src/help/HelpSettingsContext.tsx +178 -0
- package/src/help/index.ts +3 -0
- package/src/icons.ts +23 -0
- package/src/index.ts +34 -0
- package/src/layout/ErrorBoundary.tsx +232 -0
- package/src/layout/NotFound.tsx +51 -0
- package/src/layout/NotFoundSvg.tsx +172 -0
- package/src/layout/UserNav.tsx +107 -0
- package/src/layout/index.ts +5 -0
- package/src/layout/layout-context.tsx +40 -0
- package/src/layout/page-title.tsx +33 -0
- package/src/list/List.tsx +40 -0
- package/src/list/SkeletonListItem.tsx +50 -0
- package/src/list/index.tsx +1 -0
- package/src/localization.tsx +404 -0
- package/src/logo/Logo.tsx +35 -0
- package/src/logo/VCAppLogo.tsx +28 -0
- package/src/logo/VCLogo.tsx +56 -0
- package/src/logo/VCLogoIcon.tsx +55 -0
- package/src/logo/V_C_LOGO.svg +1 -0
- package/src/logo/V_C_LOGO_ICON.svg +1 -0
- package/src/logo/V_C_LOGO_ICON_WHITE.svg +1 -0
- package/src/logo/V_C_LOGO_WHITE.svg +1 -0
- package/src/logo/index.tsx +4 -0
- package/src/splash/index.tsx +34 -0
- package/src/splash/template.html +86 -0
- package/src/spring.ts +15 -0
- package/src/storage/MemoryStorage.ts +21 -0
- package/src/storage/index.ts +2 -0
- package/src/storage/storage.ts +97 -0
- package/src/storage/useStorage.ts +35 -0
- package/src/tabs/Tabs.tsx +187 -0
- package/src/tabs/index.ts +1 -0
- package/src/temporal/index.ts +2 -0
- package/src/temporal/parse.ts +29 -0
- package/src/temporal/polyfill.ts +36 -0
- package/src/utils/defined.ts +4 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/useFlag.ts +9 -0
- package/src/utils/useIsMounted.ts +12 -0
- package/src/view/View.tsx +22 -0
- package/src/view/ViewHeader.tsx +35 -0
- package/src/view/index.ts +2 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import deepmerge from "deepmerge";
|
|
2
|
+
import Mustache from "mustache";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {createContext, PropsWithChildren, useCallback, useContext, useEffect, useState} from "react";
|
|
5
|
+
import {getNavigatorLanguages} from "./getNavigatorLanguages";
|
|
6
|
+
import {useStorage} from "./storage";
|
|
7
|
+
import {defined} from "./utils";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Type for a message object (content of a translation file).
|
|
11
|
+
*/
|
|
12
|
+
export interface MessageObject {
|
|
13
|
+
[key: string]: string | MessageObject;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Function that is called when a key is missing.
|
|
18
|
+
*/
|
|
19
|
+
export type MissingFunc = (key: string) => string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Localization context options
|
|
23
|
+
*/
|
|
24
|
+
export interface LocalizationContextOptions<T extends MessageObject> {
|
|
25
|
+
/**
|
|
26
|
+
* Loads the message object for the given language.
|
|
27
|
+
*
|
|
28
|
+
* This will typically dynamically import a JSON file containing the messages.
|
|
29
|
+
* @param language The language to load
|
|
30
|
+
*/
|
|
31
|
+
load: (language: string) => Promise<T>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The fallback language to use, when the user's preferred languages cannot be loaded.
|
|
35
|
+
*/
|
|
36
|
+
fallback: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A function that is called when a key could not be found.
|
|
40
|
+
* Default: a function that prints a warning to the console and returns an empty string.
|
|
41
|
+
* @param key The key that could not be found.
|
|
42
|
+
*/
|
|
43
|
+
missing?: "fallback" | MissingFunc;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Sets the current language.
|
|
48
|
+
*/
|
|
49
|
+
type SetLanguageFunc = (language: string | null) => any;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns the message associated with `key` in the current language.
|
|
53
|
+
* Resolves placeholders with the values specified in `context`.
|
|
54
|
+
*/
|
|
55
|
+
export type TFunc<T> = (key: Leaves<T>, context?: Record<string, any>) => string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns whether the specified key exists in the current language.
|
|
59
|
+
*/
|
|
60
|
+
type THasKeyFunc<T> = (key: string) => key is Leaves<T>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Returns the value property `name` of the object associated with `key` in the current language.
|
|
64
|
+
*/
|
|
65
|
+
type EFunc<T> = (key: Branches<T>, name: string) => string;
|
|
66
|
+
|
|
67
|
+
type SFunc<T, P extends Branches<T>> = (prefix: P) => TFunc<TypeOfPath<T, P>>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Helper type for defining a function that resolves labels of a component.
|
|
71
|
+
*/
|
|
72
|
+
export type Labels<Key extends string> = TFunc<Record<Key, string>>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The object returned by `useLocalization`.
|
|
76
|
+
*/
|
|
77
|
+
export interface Localization<T extends MessageObject> {
|
|
78
|
+
/**
|
|
79
|
+
* Returns the message associated with `key` in the current language.
|
|
80
|
+
* Resolves placeholders with the values specified in `context`.
|
|
81
|
+
*/
|
|
82
|
+
t: TFunc<T>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Returns if the current key can be associated with a message.
|
|
86
|
+
*/
|
|
87
|
+
hasKey: THasKeyFunc<T>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns the value property `name` of the object associated with `key` in the current language.
|
|
91
|
+
*/
|
|
92
|
+
e: EFunc<T>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Returns a t-function for the subset of keys under the specified prefix.
|
|
96
|
+
*/
|
|
97
|
+
s: SFunc<T, Branches<T>>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Returns the currently used language.
|
|
101
|
+
*/
|
|
102
|
+
language: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sets the current language.
|
|
106
|
+
*/
|
|
107
|
+
setLanguage: SetLanguageFunc;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface LocalizationContextType<T extends MessageObject> {
|
|
111
|
+
messages: T | undefined;
|
|
112
|
+
language: string;
|
|
113
|
+
setLanguage: SetLanguageFunc;
|
|
114
|
+
fallbackMessages: T | undefined;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface LocalizationProviderProps<T extends MessageObject> {
|
|
118
|
+
language: string | null;
|
|
119
|
+
onChangeLanguage: SetLanguageFunc;
|
|
120
|
+
overrides?: Record<string, Partial<T>>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The key in the browser's storage, where the user-selected language is stored.
|
|
125
|
+
*/
|
|
126
|
+
const LANGUAGE_STORAGE_KEY = "variocube-language-v2";
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Creates a typed localization context.
|
|
130
|
+
*
|
|
131
|
+
* The language context is created within this function in order to enable correct typings on
|
|
132
|
+
* the message object and the accessor functions.
|
|
133
|
+
* @param options The options
|
|
134
|
+
*/
|
|
135
|
+
export function createLocalizationContext<T extends MessageObject>(options: LocalizationContextOptions<T>) {
|
|
136
|
+
const {load, fallback, missing = defaultMissing} = options;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Returns a promise to the messages for the first language of the given list of languages
|
|
140
|
+
* that could be successfully loaded.
|
|
141
|
+
* @param languages The languages to try loading
|
|
142
|
+
*/
|
|
143
|
+
const loadBestMatch = async (languages: (string | null)[]) => {
|
|
144
|
+
for (const language of processLanguageList(languages)) {
|
|
145
|
+
try {
|
|
146
|
+
const messages = await load(language);
|
|
147
|
+
if (messages) {
|
|
148
|
+
document.documentElement.setAttribute("lang", language);
|
|
149
|
+
return {messages, language};
|
|
150
|
+
}
|
|
151
|
+
} catch (error) {
|
|
152
|
+
// try next language
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
throw new Error("Could not load any language. This is likely a configuration error.");
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The React context.
|
|
160
|
+
*/
|
|
161
|
+
const LocalizationContext = createContext<LocalizationContextType<T>>({
|
|
162
|
+
messages: undefined,
|
|
163
|
+
language: fallback,
|
|
164
|
+
setLanguage: () => void 0,
|
|
165
|
+
fallbackMessages: undefined,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Localization provider component.
|
|
170
|
+
*/
|
|
171
|
+
const LocalizationProvider = (props: PropsWithChildren<LocalizationProviderProps<T>>) => {
|
|
172
|
+
const {children, language, onChangeLanguage, overrides} = props;
|
|
173
|
+
|
|
174
|
+
const [loaded, setLoaded] = useState<{ messages: T; language: string }>();
|
|
175
|
+
|
|
176
|
+
// The context value
|
|
177
|
+
const [value, setValue] = useState<LocalizationContextType<T>>({
|
|
178
|
+
messages: undefined,
|
|
179
|
+
language: fallback,
|
|
180
|
+
setLanguage: onChangeLanguage,
|
|
181
|
+
fallbackMessages: undefined,
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// Loads the fallback messages if required by the missing option
|
|
185
|
+
useEffect(() => {
|
|
186
|
+
if (missing == "fallback") {
|
|
187
|
+
load(fallback)
|
|
188
|
+
.then(fallbackMessages => setValue(v => ({...v, fallbackMessages})))
|
|
189
|
+
.catch(error => console.error(error));
|
|
190
|
+
}
|
|
191
|
+
}, []);
|
|
192
|
+
|
|
193
|
+
// Loads the best matching language and stores the result in `loaded`.
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
loadBestMatch([language, ...getNavigatorLanguages(), fallback])
|
|
196
|
+
.then(setLoaded)
|
|
197
|
+
.catch(error => console.error(error));
|
|
198
|
+
}, [language]);
|
|
199
|
+
|
|
200
|
+
// Update context value when `loaded` or `overrides` change.
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
if (loaded) {
|
|
203
|
+
const {language, messages} = loaded;
|
|
204
|
+
|
|
205
|
+
setValue(v => ({
|
|
206
|
+
...v,
|
|
207
|
+
language,
|
|
208
|
+
messages: deepmerge(messages, (overrides && overrides[language]) ?? {}),
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
}, [overrides, loaded]);
|
|
212
|
+
|
|
213
|
+
return (
|
|
214
|
+
<LocalizationContext.Provider value={value}>
|
|
215
|
+
{children}
|
|
216
|
+
</LocalizationContext.Provider>
|
|
217
|
+
);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Localization provider that stores the current language in the local storage.
|
|
222
|
+
*/
|
|
223
|
+
const StorageLocalizationProvider = (
|
|
224
|
+
{children, overrides}: PropsWithChildren<Pick<LocalizationProviderProps<T>, "overrides">>,
|
|
225
|
+
) => {
|
|
226
|
+
// The user defined language, or null if user did not manually select a language
|
|
227
|
+
const [userDefinedLanguage, setUserDefinedLanguage] = useStorage<string | null>(LANGUAGE_STORAGE_KEY, null);
|
|
228
|
+
|
|
229
|
+
return (
|
|
230
|
+
<LocalizationProvider
|
|
231
|
+
language={userDefinedLanguage}
|
|
232
|
+
onChangeLanguage={setUserDefinedLanguage}
|
|
233
|
+
overrides={overrides}
|
|
234
|
+
>
|
|
235
|
+
{children}
|
|
236
|
+
</LocalizationProvider>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Returns accessors to the currently used language.
|
|
242
|
+
*/
|
|
243
|
+
const useLocalization = () => {
|
|
244
|
+
const value = useContext(LocalizationContext);
|
|
245
|
+
if (!value) {
|
|
246
|
+
throw new Error(
|
|
247
|
+
"Cannot find localization context. Are you missing a LocalizationProvider in your component tree?",
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
const {messages, language, setLanguage, fallbackMessages} = value;
|
|
251
|
+
|
|
252
|
+
const handleMissing = useCallback((key: Leaves<T>) => {
|
|
253
|
+
if (missing == "fallback") {
|
|
254
|
+
return fallbackMessages ? getString(fallbackMessages, key) : undefined;
|
|
255
|
+
}
|
|
256
|
+
return missing(key);
|
|
257
|
+
}, [fallbackMessages]);
|
|
258
|
+
|
|
259
|
+
const t = useCallback((key: Leaves<T>, context?: Record<string, any>) => {
|
|
260
|
+
if (messages) {
|
|
261
|
+
const localized = getString(messages, key) ?? handleMissing(key);
|
|
262
|
+
if (localized && context) {
|
|
263
|
+
return Mustache.render(localized, context);
|
|
264
|
+
}
|
|
265
|
+
return localized;
|
|
266
|
+
}
|
|
267
|
+
}, [messages, handleMissing]);
|
|
268
|
+
|
|
269
|
+
function _hasKey(key: string): key is Leaves<T> {
|
|
270
|
+
return defined(messages) && defined(getString(messages, key));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const hasKey = useCallback(_hasKey, [messages]);
|
|
274
|
+
|
|
275
|
+
const e = useCallback((key: Branches<T>, name: string) => t(key + "." + name as Leaves<T>), [t]);
|
|
276
|
+
|
|
277
|
+
function _s<P extends string & keyof T>(prefix: P) {
|
|
278
|
+
return (key: string & keyof T[P]) => t(`${prefix}.${key}` as Leaves<T>);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const s = useCallback(_s, [t]);
|
|
282
|
+
|
|
283
|
+
return {
|
|
284
|
+
t,
|
|
285
|
+
hasKey,
|
|
286
|
+
e,
|
|
287
|
+
s,
|
|
288
|
+
language,
|
|
289
|
+
setLanguage,
|
|
290
|
+
} as Localization<T>;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
LocalizationProvider,
|
|
295
|
+
StorageLocalizationProvider,
|
|
296
|
+
useLocalization,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Processes a list of languages:
|
|
302
|
+
* - Skips null or empty languages
|
|
303
|
+
* - Expands a language by adding additional entries for the language component of locale notations.
|
|
304
|
+
* Example: an entry "en-US" turns into two entries "en-US" and "en".
|
|
305
|
+
* @param languages
|
|
306
|
+
*/
|
|
307
|
+
function processLanguageList(languages: (string | null)[]) {
|
|
308
|
+
const expanded = [];
|
|
309
|
+
for (const language of languages) {
|
|
310
|
+
if (language) {
|
|
311
|
+
// push the original language, e.g. "en-US"
|
|
312
|
+
expanded.push(language);
|
|
313
|
+
// push the language only, e.g.
|
|
314
|
+
const languageOnly = language.split("-").shift();
|
|
315
|
+
if (languageOnly && languageOnly != language) {
|
|
316
|
+
expanded.push(languageOnly);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
// avoid duplicates
|
|
321
|
+
return new Set(expanded);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Default handler for missing keys.
|
|
326
|
+
* @param key The missing key.
|
|
327
|
+
*/
|
|
328
|
+
function defaultMissing(key: string) {
|
|
329
|
+
console.warn("Missing translation key", key);
|
|
330
|
+
return "";
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/*
|
|
334
|
+
* Prepare for some heavy TypeScript shenanigans.
|
|
335
|
+
* This enables type checking in the `t()` function and friends.
|
|
336
|
+
*
|
|
337
|
+
* Inspired by:
|
|
338
|
+
* https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object/58436959#58436959
|
|
339
|
+
*/
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Concatenates two strings with a dot in the middle, unless the last string is empty.
|
|
343
|
+
* So Join<"a","b.c"> is "a.b.c" while Join<"a",""> is "a".
|
|
344
|
+
*/
|
|
345
|
+
type Join<K, P> = K extends string ? P extends string ? `${K}${"" extends P ? "" : "."}${P}`
|
|
346
|
+
: never
|
|
347
|
+
: never;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Helper type for reduction the depth type param.
|
|
351
|
+
*/
|
|
352
|
+
type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...0[]];
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Our max depth.
|
|
356
|
+
*/
|
|
357
|
+
type MaxDepth = 5;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Returns a union of all paths for a given type T
|
|
361
|
+
*/
|
|
362
|
+
type Paths<T, D extends number = MaxDepth> = [D] extends [never] ? never
|
|
363
|
+
: T extends object ? {
|
|
364
|
+
[K in keyof T]-?: K extends string | number ? `${K}` | Join<K, Paths<T[K], Prev[D]>>
|
|
365
|
+
: never;
|
|
366
|
+
}[keyof T]
|
|
367
|
+
: "";
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Returns a union of all the leaf paths for a given type T
|
|
371
|
+
*/
|
|
372
|
+
type Leaves<T, D extends number = MaxDepth> = [D] extends [never] ? never
|
|
373
|
+
: T extends object ? { [K in keyof T]-?: Join<K, Leaves<T[K], Prev[D]>> }[keyof T]
|
|
374
|
+
: "";
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Returns a union of all branch paths for a given type T
|
|
378
|
+
*/
|
|
379
|
+
type Branches<T> = Exclude<Paths<T>, Leaves<T>>;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Returns the type of the property at the specified path P for a given Type T
|
|
383
|
+
*/
|
|
384
|
+
type TypeOfPath<T, P extends string> = T extends object ? P extends keyof T ? T[P]
|
|
385
|
+
: P extends `${infer First}.${infer Rest}` ? First extends keyof T ? TypeOfPath<T[First], Rest>
|
|
386
|
+
: never
|
|
387
|
+
: never
|
|
388
|
+
: never;
|
|
389
|
+
|
|
390
|
+
function getString<T extends MessageObject>(obj: T, key: string) {
|
|
391
|
+
return getKey(obj, key)?.toString();
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function getKey<T extends MessageObject>(obj: T, key: string) {
|
|
395
|
+
return key.split(".")
|
|
396
|
+
.reduce((obj, key) => obj && obj[key] as any, obj) as any as (string | MessageObject | undefined);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Creates a simple TFunc from an object.
|
|
401
|
+
*/
|
|
402
|
+
export function createSimpleTFunc<T extends MessageObject>(obj: T): TFunc<T> {
|
|
403
|
+
return (key: Leaves<T>) => getString(obj, key) ?? "key not found";
|
|
404
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {useCustomLogo} from "../VCThemeProvider";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {Box, BoxProps} from "@mui/material";
|
|
4
|
+
import {VCLogo} from "./VCLogo";
|
|
5
|
+
|
|
6
|
+
interface LogoProps extends Omit<BoxProps, "height"> {
|
|
7
|
+
height?: number | string | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Logo(props: LogoProps) {
|
|
11
|
+
const {height= 52, ...rest} = props;
|
|
12
|
+
const customLogo = useCustomLogo();
|
|
13
|
+
if (customLogo) {
|
|
14
|
+
const {url, paddingX, paddingY} = customLogo;
|
|
15
|
+
return (
|
|
16
|
+
<Box {...rest}>
|
|
17
|
+
<Box
|
|
18
|
+
component="img"
|
|
19
|
+
src={url}
|
|
20
|
+
px={paddingX ?? 0}
|
|
21
|
+
py={paddingY ?? 0}
|
|
22
|
+
height={height}
|
|
23
|
+
width="auto"
|
|
24
|
+
/>
|
|
25
|
+
</Box>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return (
|
|
30
|
+
<Box {...rest}>
|
|
31
|
+
<VCLogo height={height} width="auto"/>
|
|
32
|
+
</Box>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {Box, BoxProps} from "@mui/material";
|
|
2
|
+
import {VCLogoIcon} from "./VCLogoIcon";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
interface VCAppLogoProps extends BoxProps {
|
|
6
|
+
appName?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function VCAppLogo({appName, ...props}: VCAppLogoProps) {
|
|
10
|
+
return (
|
|
11
|
+
<Box {...props}>
|
|
12
|
+
<Box sx={{display: "flex", flexFlow: "row nowrap", alignItems: "center"}}>
|
|
13
|
+
<VCLogoIcon width="auto" height="32" display="block"/>
|
|
14
|
+
{appName && (
|
|
15
|
+
<Box sx={{
|
|
16
|
+
lineHeight: 1,
|
|
17
|
+
fontSize: "20px",
|
|
18
|
+
fontWeight: 900,
|
|
19
|
+
textTransform: "uppercase",
|
|
20
|
+
marginLeft: "8px",
|
|
21
|
+
}}>
|
|
22
|
+
{appName}
|
|
23
|
+
</Box>
|
|
24
|
+
)}
|
|
25
|
+
</Box>
|
|
26
|
+
</Box>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, {SVGProps} from "react";
|
|
2
|
+
import {useTheme} from "@mui/material";
|
|
3
|
+
|
|
4
|
+
export function VCLogo(props: SVGProps<SVGSVGElement>) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
if (theme.palette.mode == "light") {
|
|
7
|
+
return <VCLogoBlueOrange {...props}/>;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return <VCLogoWhite {...props}/>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const VCLogoBlueOrange = (props: SVGProps<SVGSVGElement>) => (
|
|
15
|
+
<svg preserveAspectRatio="xMinYMin meet" viewBox="0 0 260 52" xmlns="http://www.w3.org/2000/svg" xmlSpace="preserve"
|
|
16
|
+
style={{
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
clipRule: "evenodd",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
strokeMiterlimit: 2,
|
|
21
|
+
}}
|
|
22
|
+
width={260}
|
|
23
|
+
height={52}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<path style={{ fill: "#05164d", }} d="M130 12.75h6.71v25.51H130z" />
|
|
27
|
+
<path d="M95.11 12.75h-8.28l-8.08 25.49h6.66l1.49-5.53h7.61l1.48 5.53h7.14l-8.02-25.49Zm-7 15.18 2.48-9.35h.32l2.45 9.35h-5.25ZM121.8 28.45a7.831 7.831 0 0 0 4.54-7.21c0-5-3.2-8.49-9.63-8.49h-11.08v25.49h6.61v-8.89h3l4.24 8.89h7.38l-5.06-9.79Zm-6.13-3.74h-3.43v-7h3.5a3.447 3.447 0 0 1 3.702 3.419l-.002.111c0 2.33-1.59 3.47-3.77 3.47ZM152.04 12.3c-7.4 0-11.61 4.62-11.61 11.87v2.8c0 7.18 4.19 11.74 11.59 11.74 7.4 0 11.59-4.56 11.59-11.74v-2.8c0-7.21-4.17-11.87-11.57-11.87Zm4.73 14.71c0 4.19-1.89 6.32-4.75 6.32-2.86 0-4.78-2.09-4.78-6.32v-2.93c0-4.19 1.89-6.38 4.75-6.38 2.86 0 4.75 2.19 4.75 6.38l.03 2.93ZM173.14 26.84c0 4.27 1.7 6.38 4.51 6.38 2.81 0 4.15-2 4.15-4.54h6.37v.87c0 5.24-4.17 9.16-10.62 9.16-7.19 0-11.25-4.54-11.25-11.9v-2.57c0-7.39 4.08-11.95 11.25-11.95 6.4 0 10.62 3.91 10.62 9.31v.84h-6.37c0-2.52-1.44-4.65-4.19-4.65-2.75 0-4.47 2.19-4.47 6.45v2.6ZM198.24 28.58c0 3.12 1.72 4.58 4.19 4.58 2.47 0 4.2-1.49 4.2-4.58V12.75h6.61v16.77c0 5.55-4.13 9.19-10.89 9.19-6.76 0-10.88-3.64-10.88-9.19V12.75h6.77v15.83ZM232.71 24.86v-.3a5.372 5.372 0 0 0 4.64-5.55c0-4-3.25-6.26-8-6.26h-11.61v25.49h11.93c4.8 0 8.86-2.54 8.86-7.25.072-3.273-2.547-6.033-5.82-6.13Zm-8.33-7.47h3.23c2 0 3.21 1 3.21 2.78 0 1.78-1.14 2.84-3.64 2.84h-2.8v-5.62Zm3.1 16.24h-3.1v-6.45h3.51c2.5 0 3.83 1.25 3.83 3.23s-1.48 3.22-4.24 3.22ZM259.37 38.26h-17.48V12.75h17.48V18h-10.84v5.05h10.15v4.82h-10.15v5.14h10.84v5.25ZM69.13 25.9l3.38 12.41h-6.86L56.94 12.7h8.59l3.6 13.2ZM75 31.24l6.31-18.54h-8.59l-1.38 5.09L75 31.24ZM14.24 46.48l29.94-17.24v9L22.09 51.02l-7.85-4.54Zm-4.25-2.45 34.19-19.79v-9L2.12 39.49l7.87 4.54Z"
|
|
28
|
+
style={{ fill: "#05164d", fillRule: "nonzero", }}
|
|
29
|
+
/>
|
|
30
|
+
<path d="M0 35.81V15.24l17.84 10.27L0 35.81Zm34.24-19.75 7.86-4.53L22.1 0l-7.86 4.53 20 11.53ZM9.98 6.99l-7.86 4.53 20 11.53 7.86-4.53-20-11.53Z"
|
|
31
|
+
style={{ fill: "#ff6a00", fillRule: "nonzero", }}
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
)
|
|
35
|
+
export const VCLogoWhite = (props: SVGProps<SVGSVGElement>) => (
|
|
36
|
+
<svg viewBox="0 0 260 52" xmlns="http://www.w3.org/2000/svg" xmlSpace="preserve"
|
|
37
|
+
style={{
|
|
38
|
+
fillRule: "evenodd",
|
|
39
|
+
clipRule: "evenodd",
|
|
40
|
+
strokeLinejoin: "round",
|
|
41
|
+
strokeMiterlimit: 2,
|
|
42
|
+
display: "block"
|
|
43
|
+
}}
|
|
44
|
+
width={260}
|
|
45
|
+
height={52}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<path style={{ fill: "#fff", }} d="M130 12.75h6.71v25.51H130z" />
|
|
49
|
+
<path d="M95.11 12.75h-8.28l-8.08 25.49h6.66l1.49-5.53h7.61l1.48 5.53h7.14l-8.02-25.49Zm-7 15.18 2.48-9.35h.32l2.45 9.35h-5.25ZM121.8 28.45a7.831 7.831 0 0 0 4.54-7.21c0-5-3.2-8.49-9.63-8.49h-11.08v25.49h6.61v-8.89h3l4.24 8.89h7.38l-5.06-9.79Zm-6.13-3.74h-3.43v-7h3.5a3.447 3.447 0 0 1 3.702 3.419l-.002.111c0 2.33-1.59 3.47-3.77 3.47ZM152.04 12.3c-7.4 0-11.61 4.62-11.61 11.87v2.8c0 7.18 4.19 11.74 11.59 11.74 7.4 0 11.59-4.56 11.59-11.74v-2.8c0-7.21-4.17-11.87-11.57-11.87Zm4.73 14.71c0 4.19-1.89 6.32-4.75 6.32-2.86 0-4.78-2.09-4.78-6.32v-2.93c0-4.19 1.89-6.38 4.75-6.38 2.86 0 4.75 2.19 4.75 6.38l.03 2.93ZM173.14 26.84c0 4.27 1.7 6.38 4.51 6.38 2.81 0 4.15-2 4.15-4.54h6.37v.87c0 5.24-4.17 9.16-10.62 9.16-7.19 0-11.25-4.54-11.25-11.9v-2.57c0-7.39 4.08-11.95 11.25-11.95 6.4 0 10.62 3.91 10.62 9.31v.84h-6.37c0-2.52-1.44-4.65-4.19-4.65-2.75 0-4.47 2.19-4.47 6.45v2.6ZM198.24 28.58c0 3.12 1.72 4.58 4.19 4.58 2.47 0 4.2-1.49 4.2-4.58V12.75h6.61v16.77c0 5.55-4.13 9.19-10.89 9.19-6.76 0-10.88-3.64-10.88-9.19V12.75h6.77v15.83ZM232.71 24.86v-.3a5.372 5.372 0 0 0 4.64-5.55c0-4-3.25-6.26-8-6.26h-11.61v25.49h11.93c4.8 0 8.86-2.54 8.86-7.25.072-3.273-2.547-6.033-5.82-6.13Zm-8.33-7.47h3.23c2 0 3.21 1 3.21 2.78 0 1.78-1.14 2.84-3.64 2.84h-2.8v-5.62Zm3.1 16.24h-3.1v-6.45h3.51c2.5 0 3.83 1.25 3.83 3.23s-1.48 3.22-4.24 3.22ZM259.37 38.26h-17.48V12.75h17.48V18h-10.84v5.05h10.15v4.82h-10.15v5.14h10.84v5.25ZM69.13 25.9l3.38 12.41h-6.86L56.94 12.7h8.59l3.6 13.2ZM75 31.24l6.31-18.54h-8.59l-1.38 5.09L75 31.24ZM14.24 46.48l29.94-17.24v9L22.09 51.02l-7.85-4.54Zm-4.25-2.45 34.19-19.79v-9L2.12 39.49l7.87 4.54ZM0 35.81V15.24l17.84 10.27L0 35.81Zm34.24-19.75 7.86-4.53L22.1 0l-7.86 4.53 20 11.53ZM9.98 6.99l-7.86 4.53 20 11.53 7.86-4.53-20-11.53Z"
|
|
50
|
+
style={{
|
|
51
|
+
fill: "#fff",
|
|
52
|
+
fillRule: "nonzero",
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
</svg>
|
|
56
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, {SVGProps} from "react";
|
|
2
|
+
import {useTheme} from "@mui/material";
|
|
3
|
+
|
|
4
|
+
export function VCLogoIcon(props: SVGProps<SVGSVGElement>) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
if (theme.palette.mode == "light") {
|
|
7
|
+
return <VCLogoIconOrangeBlue {...props}/>;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return <VCLogoIconWhite {...props}/>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const VCLogoIconOrangeBlue = (props: SVGProps<SVGSVGElement>) => (
|
|
15
|
+
<svg viewBox="0 0 74 86" xmlns="http://www.w3.org/2000/svg" xmlSpace="preserve"
|
|
16
|
+
style={{
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
clipRule: "evenodd",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
strokeMiterlimit: 2,
|
|
21
|
+
}}
|
|
22
|
+
{...props}
|
|
23
|
+
>
|
|
24
|
+
<path d="M23.68 77.48 73.6 48.66v15.08l-36.82 21.3-13.1-7.56Zm-7.08-4.09 57-32.92V25.35L3.5 65.83l13.1 7.56Z"
|
|
25
|
+
style={{
|
|
26
|
+
fill: "#05164d",
|
|
27
|
+
fillRule: "nonzero",
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
<path d="M0 59.74V25.35l29.69 17.17L0 59.74Zm57-33 13.1-7.56L36.78 0l-13.1 7.56L57 26.74ZM16.6 11.65 3.5 19.21l33.28 19.22 13.1-7.56L16.6 11.65Z"
|
|
31
|
+
style={{
|
|
32
|
+
fill: "#ff6a00",
|
|
33
|
+
fillRule: "nonzero",
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
)
|
|
38
|
+
export const VCLogoIconWhite = (props: SVGProps<SVGSVGElement>) => (
|
|
39
|
+
<svg viewBox="0 0 74 86" xmlns="http://www.w3.org/2000/svg" xmlSpace="preserve"
|
|
40
|
+
style={{
|
|
41
|
+
fillRule: "evenodd",
|
|
42
|
+
clipRule: "evenodd",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
strokeMiterlimit: 2,
|
|
45
|
+
}}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<path d="M23.68 77.48 73.6 48.66v15.08l-36.82 21.3-13.1-7.56Zm-7.08-4.09 57-32.92V25.35L3.5 65.83l13.1 7.56ZM0 59.74V25.35l29.69 17.17L0 59.74Zm57-33 13.1-7.56L36.78 0l-13.1 7.56L57 26.74ZM16.6 11.65 3.5 19.21l33.28 19.22 13.1-7.56L16.6 11.65Z"
|
|
49
|
+
style={{
|
|
50
|
+
fill: "#fff",
|
|
51
|
+
fillRule: "nonzero",
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg preserveAspectRatio="xMinYMin meet" width="100%" height="100%" viewBox="0 0 260 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect x="130" y="12.75" width="6.71" height="25.51" style="fill:#05164d;"/><path d="M95.11,12.75l-8.28,0l-8.08,25.49l6.66,0l1.49,-5.53l7.61,0l1.48,5.53l7.14,0l-8.02,-25.49Zm-7,15.18l2.48,-9.35l0.32,0l2.45,9.35l-5.25,0Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M121.8,28.45c2.8,-1.293 4.584,-4.127 4.54,-7.21c-0,-5 -3.2,-8.49 -9.63,-8.49l-11.08,0l-0,25.49l6.61,0l-0,-8.89l3,0l4.24,8.89l7.38,0l-5.06,-9.79Zm-6.13,-3.74l-3.43,0l0,-7l3.5,0c0.09,-0.007 0.181,-0.011 0.272,-0.011c1.881,-0 3.43,1.549 3.43,3.43c-0,0.037 -0.001,0.074 -0.002,0.111c-0,2.33 -1.59,3.47 -3.77,3.47Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M152.04,12.3c-7.4,-0 -11.61,4.62 -11.61,11.87l0,2.8c0,7.18 4.19,11.74 11.59,11.74c7.4,0 11.59,-4.56 11.59,-11.74l0,-2.8c0,-7.21 -4.17,-11.87 -11.57,-11.87Zm4.73,14.71c0,4.19 -1.89,6.32 -4.75,6.32c-2.86,0 -4.78,-2.09 -4.78,-6.32l0,-2.93c0,-4.19 1.89,-6.38 4.75,-6.38c2.86,-0 4.75,2.19 4.75,6.38l0.03,2.93Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M173.14,26.84c0,4.27 1.7,6.38 4.51,6.38c2.81,0 4.15,-2 4.15,-4.54l6.37,0l0,0.87c0,5.24 -4.17,9.16 -10.62,9.16c-7.19,0 -11.25,-4.54 -11.25,-11.9l0,-2.57c0,-7.39 4.08,-11.95 11.25,-11.95c6.4,0 10.62,3.91 10.62,9.31l0,0.84l-6.37,0c0,-2.52 -1.44,-4.65 -4.19,-4.65c-2.75,0 -4.47,2.19 -4.47,6.45l0,2.6Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M198.24,28.58c0,3.12 1.72,4.58 4.19,4.58c2.47,0 4.2,-1.49 4.2,-4.58l0,-15.83l6.61,0l0,16.77c0,5.55 -4.13,9.19 -10.89,9.19c-6.76,0 -10.88,-3.64 -10.88,-9.19l0,-16.77l6.77,-0l0,15.83Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M232.71,24.86l0,-0.3c2.738,-0.364 4.767,-2.791 4.64,-5.55c0,-4 -3.25,-6.26 -8,-6.26l-11.61,0l0,25.49l11.93,0c4.8,0 8.86,-2.54 8.86,-7.25c0.072,-3.273 -2.547,-6.033 -5.82,-6.13Zm-8.33,-7.47l3.23,-0c2,-0 3.21,1 3.21,2.78c-0,1.78 -1.14,2.84 -3.64,2.84l-2.8,-0l-0,-5.62Zm3.1,16.24l-3.1,-0l-0,-6.45l3.51,-0c2.5,-0 3.83,1.25 3.83,3.23c-0,1.98 -1.48,3.22 -4.24,3.22Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M259.37,38.26l-17.48,0l0,-25.51l17.48,0l0,5.25l-10.84,0l0,5.05l10.15,0l0,4.82l-10.15,0l0,5.14l10.84,0l0,5.25Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M69.13,25.9l3.38,12.41l-6.86,-0l-8.71,-25.61l8.59,-0l3.6,13.2Zm5.87,5.34l6.31,-18.54l-8.59,-0l-1.38,5.09l3.66,13.45Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M14.24,46.48l29.94,-17.24l0,9l-22.09,12.78l-7.85,-4.54Zm-4.25,-2.45l34.19,-19.79l0,-9l-42.06,24.25l7.87,4.54Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M0,35.81l0,-20.57l17.84,10.27l-17.84,10.3Zm34.24,-19.75l7.86,-4.53l-20,-11.53l-7.86,4.53l20,11.53Zm-24.26,-9.07l-7.86,4.53l20,11.53l7.86,-4.53l-20,-11.53Z" style="fill:#ff6a00;fill-rule:nonzero;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 74 86" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M23.68,77.48l49.92,-28.82l0,15.08l-36.82,21.3l-13.1,-7.56Zm-7.08,-4.09l57,-32.92l0,-15.12l-70.1,40.48l13.1,7.56Z" style="fill:#05164d;fill-rule:nonzero;"/><path d="M0,59.74l0,-34.39l29.69,17.17l-29.69,17.22Zm57,-33l13.1,-7.56l-33.32,-19.18l-13.1,7.56l33.32,19.18Zm-40.4,-15.09l-13.1,7.56l33.28,19.22l13.1,-7.56l-33.28,-19.22Z" style="fill:#ff6a00;fill-rule:nonzero;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 74 86" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M23.68,77.48l49.92,-28.82l0,15.08l-36.82,21.3l-13.1,-7.56Zm-7.08,-4.09l57,-32.92l0,-15.12l-70.1,40.48l13.1,7.56Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M0,59.74l0,-34.39l29.69,17.17l-29.69,17.22Zm57,-33l13.1,-7.56l-33.32,-19.18l-13.1,7.56l33.32,19.18Zm-40.4,-15.09l-13.1,7.56l33.28,19.22l13.1,-7.56l-33.28,-19.22Z" style="fill:#fff;fill-rule:nonzero;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 260 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect x="130" y="12.75" width="6.71" height="25.51" style="fill:#fff;"/><path d="M95.11,12.75l-8.28,0l-8.08,25.49l6.66,0l1.49,-5.53l7.61,0l1.48,5.53l7.14,0l-8.02,-25.49Zm-7,15.18l2.48,-9.35l0.32,0l2.45,9.35l-5.25,0Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M121.8,28.45c2.8,-1.293 4.584,-4.127 4.54,-7.21c-0,-5 -3.2,-8.49 -9.63,-8.49l-11.08,0l-0,25.49l6.61,0l-0,-8.89l3,0l4.24,8.89l7.38,0l-5.06,-9.79Zm-6.13,-3.74l-3.43,0l0,-7l3.5,0c0.09,-0.007 0.181,-0.011 0.272,-0.011c1.881,0 3.43,1.549 3.43,3.43c-0,0.037 -0.001,0.074 -0.002,0.111c-0,2.33 -1.59,3.47 -3.77,3.47Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M152.04,12.3c-7.4,-0 -11.61,4.62 -11.61,11.87l0,2.8c0,7.18 4.19,11.74 11.59,11.74c7.4,0 11.59,-4.56 11.59,-11.74l0,-2.8c0,-7.21 -4.17,-11.87 -11.57,-11.87Zm4.73,14.71c0,4.19 -1.89,6.32 -4.75,6.32c-2.86,0 -4.78,-2.09 -4.78,-6.32l0,-2.93c0,-4.19 1.89,-6.38 4.75,-6.38c2.86,0 4.75,2.19 4.75,6.38l0.03,2.93Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M173.14,26.84c0,4.27 1.7,6.38 4.51,6.38c2.81,0 4.15,-2 4.15,-4.54l6.37,0l0,0.87c0,5.24 -4.17,9.16 -10.62,9.16c-7.19,0 -11.25,-4.54 -11.25,-11.9l0,-2.57c0,-7.39 4.08,-11.95 11.25,-11.95c6.4,0 10.62,3.91 10.62,9.31l0,0.84l-6.37,0c0,-2.52 -1.44,-4.65 -4.19,-4.65c-2.75,0 -4.47,2.19 -4.47,6.45l0,2.6Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M198.24,28.58c0,3.12 1.72,4.58 4.19,4.58c2.47,0 4.2,-1.49 4.2,-4.58l0,-15.83l6.61,-0l0,16.77c0,5.55 -4.13,9.19 -10.89,9.19c-6.76,0 -10.88,-3.64 -10.88,-9.19l0,-16.77l6.77,-0l-0,15.83Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M232.71,24.86l0,-0.3c2.738,-0.364 4.767,-2.791 4.64,-5.55c0,-4 -3.25,-6.26 -8,-6.26l-11.61,0l0,25.49l11.93,0c4.8,0 8.86,-2.54 8.86,-7.25c0.072,-3.273 -2.547,-6.033 -5.82,-6.13Zm-8.33,-7.47l3.23,-0c2,-0 3.21,1 3.21,2.78c-0,1.78 -1.14,2.84 -3.64,2.84l-2.8,-0l-0,-5.62Zm3.1,16.24l-3.1,-0l-0,-6.45l3.51,-0c2.5,-0 3.83,1.25 3.83,3.23c-0,1.98 -1.48,3.22 -4.24,3.22Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M259.37,38.26l-17.48,0l0,-25.51l17.48,0l0,5.25l-10.84,0l0,5.05l10.15,0l0,4.82l-10.15,0l0,5.14l10.84,0l0,5.25Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M69.13,25.9l3.38,12.41l-6.86,-0l-8.71,-25.61l8.59,-0l3.6,13.2Zm5.87,5.34l6.31,-18.54l-8.59,-0l-1.38,5.09l3.66,13.45Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M14.24,46.48l29.94,-17.24l0,9l-22.09,12.78l-7.85,-4.54Zm-4.25,-2.45l34.19,-19.79l0,-9l-42.06,24.25l7.87,4.54Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M0,35.81l0,-20.57l17.84,10.27l-17.84,10.3Zm34.24,-19.75l7.86,-4.53l-20,-11.53l-7.86,4.53l20,11.53Zm-24.26,-9.07l-7.86,4.53l20,11.53l7.86,-4.53l-20,-11.53Z" style="fill:#fff;fill-rule:nonzero;"/></svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, {FunctionComponentElement} from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
|
|
4
|
+
export function render(element: FunctionComponentElement<any> | Array<FunctionComponentElement<any>>) {
|
|
5
|
+
try {
|
|
6
|
+
ReactDOM.render(element, document.querySelector("#react-root"), removeSplash);
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
// show the error using the class defined in the template
|
|
10
|
+
// this can obviously be improved
|
|
11
|
+
ReactDOM.render((
|
|
12
|
+
<div className="splash-error">
|
|
13
|
+
<h1>Failed to load application</h1>
|
|
14
|
+
<p>
|
|
15
|
+
An error occurred while loading the application.
|
|
16
|
+
Please make sure you are using a current browser version.
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
), document.body);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function removeSplash() {
|
|
24
|
+
// wait for fonts to become ready
|
|
25
|
+
if (document.fonts) {
|
|
26
|
+
await document.fonts.ready;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const preloader = document.querySelector("#splash");
|
|
30
|
+
if (preloader) {
|
|
31
|
+
preloader.classList.add("fadeout");
|
|
32
|
+
setTimeout(() => preloader.parentNode?.removeChild(preloader), 500);
|
|
33
|
+
}
|
|
34
|
+
}
|