@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,65 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {Drawer, Grid, IconButton} from "@mui/material";
|
|
3
|
+
import {useHelpSettingsContext} from "./HelpSettingsContext";
|
|
4
|
+
import {useCallback, useMemo} from "react";
|
|
5
|
+
import {Close, OpenInNew} from "@mui/icons-material";
|
|
6
|
+
|
|
7
|
+
export const buildHelpDrawerUrl = (selectedHelpAnchor = "", selectedHelpLanguage = "", selectedHelpPage = "", baseUrl: string) => {
|
|
8
|
+
let extraAnchor = selectedHelpAnchor ? `#${selectedHelpAnchor}` : "";
|
|
9
|
+
let extraLanguage = selectedHelpLanguage ? `/${selectedHelpLanguage}` : "";
|
|
10
|
+
return `${baseUrl}${selectedHelpPage}${extraLanguage}${extraAnchor}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function HelpDrawer() {
|
|
14
|
+
const {baseUrl, selectedHelpPage: selectedHelpPage, clearSelectedHelpPage: clearSelectedHelpPage,
|
|
15
|
+
selectedHelpAnchor : selectedHelpAnchor, clearSelectedHelpAnchor: clearSelectedHelpAnchor,
|
|
16
|
+
selectedHelpLanguage : selectedHelpLanguage, clearSelectedHelpLanguage: clearSelectedHelpLanguage} = useHelpSettingsContext();
|
|
17
|
+
|
|
18
|
+
const open = useMemo<boolean>(() => Boolean(selectedHelpPage), [selectedHelpPage, selectedHelpAnchor, selectedHelpLanguage]);
|
|
19
|
+
const url = useMemo<string>(() => {
|
|
20
|
+
if(selectedHelpPage) {
|
|
21
|
+
return buildHelpDrawerUrl(selectedHelpAnchor,selectedHelpLanguage, selectedHelpPage, baseUrl);
|
|
22
|
+
}else {
|
|
23
|
+
return `${baseUrl}`;
|
|
24
|
+
}
|
|
25
|
+
}, [baseUrl, selectedHelpPage, selectedHelpLanguage, selectedHelpAnchor]);
|
|
26
|
+
|
|
27
|
+
const iframe = React.useRef<HTMLIFrameElement>(null);
|
|
28
|
+
|
|
29
|
+
const handleOpenInNew = useCallback(() => {
|
|
30
|
+
window.open(url, url);
|
|
31
|
+
clearSelectedHelpPage();
|
|
32
|
+
clearSelectedHelpLanguage();
|
|
33
|
+
clearSelectedHelpAnchor();
|
|
34
|
+
}, [url, clearSelectedHelpPage]);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Drawer open={open} anchor="right" variant="persistent">
|
|
38
|
+
<Grid container sx={{width: "300px", height: "100%"}}>
|
|
39
|
+
<Grid item xs={12}>
|
|
40
|
+
<Grid container>
|
|
41
|
+
<Grid item style={{flexGrow: 1}}>
|
|
42
|
+
<IconButton size="small" onClick={() => clearSelectedHelpPage()}>
|
|
43
|
+
<Close />
|
|
44
|
+
</IconButton>
|
|
45
|
+
</Grid>
|
|
46
|
+
<Grid item>
|
|
47
|
+
<IconButton size="small" onClick={() => handleOpenInNew()}>
|
|
48
|
+
<OpenInNew />
|
|
49
|
+
</IconButton>
|
|
50
|
+
</Grid>
|
|
51
|
+
</Grid>
|
|
52
|
+
</Grid>
|
|
53
|
+
{open &&
|
|
54
|
+
<Grid item xs={12} sx={{height: "100%"}}>
|
|
55
|
+
<iframe onLoad={()=>{
|
|
56
|
+
if (selectedHelpAnchor){
|
|
57
|
+
iframe.current?.contentWindow?.postMessage(selectedHelpAnchor, "*");
|
|
58
|
+
}
|
|
59
|
+
}} ref={iframe} src={url} style={{border: 0, overflow: "scroll", height: "100%", width: "100%"}}/>
|
|
60
|
+
</Grid>
|
|
61
|
+
}
|
|
62
|
+
</Grid>
|
|
63
|
+
</Drawer>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import {Button, Dialog, DialogActions, DialogTitle} from "@mui/material";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import {
|
|
4
|
+
createContext,
|
|
5
|
+
Fragment,
|
|
6
|
+
PropsWithChildren,
|
|
7
|
+
ReactNode,
|
|
8
|
+
useCallback,
|
|
9
|
+
useContext,
|
|
10
|
+
useEffect,
|
|
11
|
+
useMemo,
|
|
12
|
+
useState,
|
|
13
|
+
} from "react";
|
|
14
|
+
const semver = require("semver");
|
|
15
|
+
const semverDiff = require("semver/functions/diff");
|
|
16
|
+
|
|
17
|
+
interface HelpSettingsContextData {
|
|
18
|
+
baseUrl: string;
|
|
19
|
+
apiUrl?: string;
|
|
20
|
+
selectedHelpPage?: string;
|
|
21
|
+
setSelectedHelpPage: (page: string) => void;
|
|
22
|
+
clearSelectedHelpPage: () => void;
|
|
23
|
+
selectedHelpAnchor?: string;
|
|
24
|
+
setSelectedHelpAnchor: (anchor: string) => void;
|
|
25
|
+
clearSelectedHelpAnchor: () => void;
|
|
26
|
+
|
|
27
|
+
selectedHelpLanguage?: string;
|
|
28
|
+
setSelectedHelpLanguage: (language: string) => void;
|
|
29
|
+
clearSelectedHelpLanguage: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const emptyContext: HelpSettingsContextData = {
|
|
33
|
+
baseUrl: "",
|
|
34
|
+
setSelectedHelpPage: (page: string) =>
|
|
35
|
+
console.error(
|
|
36
|
+
`Empty context should not call setSelectedHelpPage(${page}), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
37
|
+
),
|
|
38
|
+
clearSelectedHelpPage: () =>
|
|
39
|
+
console.error(
|
|
40
|
+
`Empty context should not call clearSelectedHelpPage(), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
41
|
+
),
|
|
42
|
+
setSelectedHelpAnchor: (anchor: string) =>
|
|
43
|
+
console.error(
|
|
44
|
+
`Empty context should not call setSelectedHelpAnchor(${anchor}), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
45
|
+
),
|
|
46
|
+
clearSelectedHelpAnchor: () =>
|
|
47
|
+
console.error(
|
|
48
|
+
`Empty context should not call clearSelectedHelpAnchor(), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
49
|
+
),
|
|
50
|
+
setSelectedHelpLanguage: (language: string) =>
|
|
51
|
+
console.error(
|
|
52
|
+
`Empty context should not call setSelectedHelpLanguage(${language}), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
53
|
+
),
|
|
54
|
+
clearSelectedHelpLanguage: () =>
|
|
55
|
+
console.error(
|
|
56
|
+
`Empty context should not call clearSelectedHelpLanguage(), you most likely do not have <HelpSettingsContextProvider/> in your component tree.`,
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const HelpSettingsContext = createContext(emptyContext);
|
|
61
|
+
|
|
62
|
+
interface HelpSettingsContextProviderProps {
|
|
63
|
+
baseUrl: string;
|
|
64
|
+
apiUrl?: string;
|
|
65
|
+
localStorageVar?: string;
|
|
66
|
+
changeLogUrl?: string;
|
|
67
|
+
currentVersion?: string;
|
|
68
|
+
dialogTitle?: string;
|
|
69
|
+
dialogContent?: ReactNode;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function HelpSettingsContextProvider(
|
|
73
|
+
{baseUrl, apiUrl, localStorageVar, changeLogUrl, currentVersion, dialogTitle, dialogContent, children}:
|
|
74
|
+
PropsWithChildren<
|
|
75
|
+
HelpSettingsContextProviderProps
|
|
76
|
+
>,
|
|
77
|
+
) {
|
|
78
|
+
const [selectedHelpPage, setSelectedHelpPage] = useState<string | undefined>();
|
|
79
|
+
const [selectedHelpAnchor, setSelectedHelpAnchor] = useState<string | undefined>();
|
|
80
|
+
const [selectedHelpLanguage, setSelectedHelpLanguage] = useState<string | undefined>();
|
|
81
|
+
|
|
82
|
+
const handleSetSelectedHelpPage = useCallback((helpPage: string) => {
|
|
83
|
+
setSelectedHelpPage(helpPage);
|
|
84
|
+
}, []);
|
|
85
|
+
|
|
86
|
+
const [openDialog, setOpenDialog] = useState<boolean>(false);
|
|
87
|
+
|
|
88
|
+
const clearSelectedHelpPage = useCallback(() => {
|
|
89
|
+
setSelectedHelpPage(undefined);
|
|
90
|
+
}, []);
|
|
91
|
+
|
|
92
|
+
const handleSetSelectedHelpAnchor = useCallback((helpAnchor: string) => {
|
|
93
|
+
setSelectedHelpAnchor(helpAnchor);
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
96
|
+
const clearSelectedHelpAnchor = useCallback(() => {
|
|
97
|
+
setSelectedHelpAnchor(undefined);
|
|
98
|
+
}, []);
|
|
99
|
+
|
|
100
|
+
const handleSetSelectedHelpLanguage = useCallback((helpLanguage: string) => {
|
|
101
|
+
setSelectedHelpLanguage(helpLanguage);
|
|
102
|
+
}, []);
|
|
103
|
+
|
|
104
|
+
const clearSelectedHelpLanguage = useCallback(() => {
|
|
105
|
+
setSelectedHelpLanguage(undefined);
|
|
106
|
+
}, []);
|
|
107
|
+
|
|
108
|
+
const defaultContext = useMemo<HelpSettingsContextData>(() => ({
|
|
109
|
+
baseUrl,
|
|
110
|
+
apiUrl,
|
|
111
|
+
selectedHelpPage: selectedHelpPage,
|
|
112
|
+
setSelectedHelpPage: handleSetSelectedHelpPage,
|
|
113
|
+
clearSelectedHelpPage: clearSelectedHelpPage,
|
|
114
|
+
selectedHelpAnchor: selectedHelpAnchor,
|
|
115
|
+
setSelectedHelpAnchor: handleSetSelectedHelpAnchor,
|
|
116
|
+
clearSelectedHelpAnchor: clearSelectedHelpAnchor,
|
|
117
|
+
selectedHelpLanguage: selectedHelpLanguage,
|
|
118
|
+
setSelectedHelpLanguage: handleSetSelectedHelpLanguage,
|
|
119
|
+
clearSelectedHelpLanguage: clearSelectedHelpLanguage,
|
|
120
|
+
}), [
|
|
121
|
+
baseUrl,
|
|
122
|
+
apiUrl,
|
|
123
|
+
selectedHelpPage,
|
|
124
|
+
handleSetSelectedHelpPage,
|
|
125
|
+
clearSelectedHelpPage,
|
|
126
|
+
selectedHelpAnchor,
|
|
127
|
+
handleSetSelectedHelpAnchor,
|
|
128
|
+
clearSelectedHelpAnchor,
|
|
129
|
+
selectedHelpLanguage,
|
|
130
|
+
handleSetSelectedHelpLanguage,
|
|
131
|
+
clearSelectedHelpLanguage,
|
|
132
|
+
]);
|
|
133
|
+
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
if (changeLogUrl && localStorageVar && currentVersion) {
|
|
136
|
+
const lastSeenVersion = localStorage.getItem(localStorageVar);
|
|
137
|
+
if (
|
|
138
|
+
lastSeenVersion
|
|
139
|
+
&& semver.lt(lastSeenVersion, currentVersion)
|
|
140
|
+
&& ["major", "minor"].includes(semverDiff(lastSeenVersion, currentVersion) as string)
|
|
141
|
+
) {
|
|
142
|
+
setOpenDialog(true);
|
|
143
|
+
} else {
|
|
144
|
+
localStorage.setItem(localStorageVar, currentVersion);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}, []);
|
|
148
|
+
|
|
149
|
+
function handleOk() {
|
|
150
|
+
if (localStorageVar && currentVersion) {
|
|
151
|
+
localStorage.setItem(localStorageVar, currentVersion);
|
|
152
|
+
}
|
|
153
|
+
setOpenDialog(false);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<Fragment>
|
|
158
|
+
<HelpSettingsContext.Provider value={defaultContext}>
|
|
159
|
+
{children}
|
|
160
|
+
</HelpSettingsContext.Provider>
|
|
161
|
+
<Dialog open={openDialog} onClose={() => setOpenDialog(false)} fullWidth>
|
|
162
|
+
<DialogTitle>
|
|
163
|
+
{dialogTitle}
|
|
164
|
+
</DialogTitle>
|
|
165
|
+
|
|
166
|
+
{dialogContent}
|
|
167
|
+
|
|
168
|
+
<DialogActions>
|
|
169
|
+
<Button variant="outlined" onClick={handleOk}>OK</Button>
|
|
170
|
+
</DialogActions>
|
|
171
|
+
</Dialog>
|
|
172
|
+
</Fragment>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function useHelpSettingsContext(): HelpSettingsContextData {
|
|
177
|
+
return useContext<HelpSettingsContextData>(HelpSettingsContext);
|
|
178
|
+
}
|
package/src/icons.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export {default as MenuIcon} from "@mui/icons-material/Menu";
|
|
2
|
+
export {default as FilterListIcon} from "@mui/icons-material/FilterList";
|
|
3
|
+
export {default as TuningIcon} from "@mui/icons-material/Tune";
|
|
4
|
+
export {default as CategoryIcon} from '@mui/icons-material/Category';
|
|
5
|
+
export {default as ChevronRightIcon} from "@mui/icons-material/ChevronRight";
|
|
6
|
+
export {default as ErrorIcon} from "@mui/icons-material/Error";
|
|
7
|
+
export {default as SuccessIcon} from "@mui/icons-material/Done";
|
|
8
|
+
export {default as SaveIcon} from "@mui/icons-material/SaveOutlined";
|
|
9
|
+
export {default as CloseIcon} from '@mui/icons-material/Close';
|
|
10
|
+
export {default as MoveUpIcon} from "@mui/icons-material/ArrowUpward";
|
|
11
|
+
export {default as MoveDownIcon} from "@mui/icons-material/ArrowDownward";
|
|
12
|
+
export {default as RemoveIcon} from "@mui/icons-material/Remove";
|
|
13
|
+
export {default as AddIcon} from "@mui/icons-material/Add";
|
|
14
|
+
|
|
15
|
+
export {default as MoveUpCircleIcon} from "@mui/icons-material/ArrowCircleUp";
|
|
16
|
+
export {default as MoveDownCircleIcon} from "@mui/icons-material/ArrowCircleDown";
|
|
17
|
+
export {default as RemoveCircleIcon} from "@mui/icons-material/RemoveCircle";
|
|
18
|
+
export {default as AddCircleIcon} from "@mui/icons-material/AddCircle";
|
|
19
|
+
|
|
20
|
+
export {default as SearchIcon} from "@mui/icons-material/Search";
|
|
21
|
+
export {default as AuditIcon} from "@mui/icons-material/TrackChanges";
|
|
22
|
+
export {default as CreateIcon} from "@mui/icons-material/Create";
|
|
23
|
+
export {default as UpdateIcon} from "@mui/icons-material/Update";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from "./AppShell";
|
|
2
|
+
export * from "./audit";
|
|
3
|
+
export * from "./breadcrumbs";
|
|
4
|
+
export * from "./code";
|
|
5
|
+
export * from "./confirm";
|
|
6
|
+
export * from "./container";
|
|
7
|
+
export * from "./content-table";
|
|
8
|
+
export * from "./country";
|
|
9
|
+
export * from "./cube";
|
|
10
|
+
export * from "./data-table";
|
|
11
|
+
export * from "./date-pickers";
|
|
12
|
+
export * from "./ErrorAlert";
|
|
13
|
+
export * from "./fetch";
|
|
14
|
+
export * from "./filter";
|
|
15
|
+
export * from "./formats";
|
|
16
|
+
export * from "./forms";
|
|
17
|
+
export * from "./help";
|
|
18
|
+
export * from "./icons";
|
|
19
|
+
export * from "./Input";
|
|
20
|
+
export * from "./LanguageSwitcher";
|
|
21
|
+
export * from "./layout";
|
|
22
|
+
export * from "./list";
|
|
23
|
+
export * from "./localization";
|
|
24
|
+
export * from "./logo";
|
|
25
|
+
export * from "./logo";
|
|
26
|
+
export * from "./Paging";
|
|
27
|
+
export * from "./splash";
|
|
28
|
+
export * from "./spring";
|
|
29
|
+
export * from "./storage";
|
|
30
|
+
export * from "./tabs";
|
|
31
|
+
export * from "./temporal";
|
|
32
|
+
export * from "./utils";
|
|
33
|
+
export * from "./VCThemeProvider";
|
|
34
|
+
export * from "./view";
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import React, {Component, ErrorInfo, Fragment} from "react";
|
|
2
|
+
import {Accordion, AccordionDetails, AccordionSummary, Box, Typography} from "@mui/material";
|
|
3
|
+
import {NotFoundSvg} from "./NotFoundSvg";
|
|
4
|
+
import ErrorStackParser from "error-stack-parser";
|
|
5
|
+
import {ExpandMore} from "@mui/icons-material";
|
|
6
|
+
|
|
7
|
+
type ErrorContext = {
|
|
8
|
+
url: string,
|
|
9
|
+
referrer: string,
|
|
10
|
+
userAgent: string,
|
|
11
|
+
error: any
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type StackTrace = {
|
|
15
|
+
file?: string,
|
|
16
|
+
lineNumber?: number,
|
|
17
|
+
columnNumber?: number,
|
|
18
|
+
method?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type BugsnagConfig = {
|
|
22
|
+
/**
|
|
23
|
+
* API Key provided by Bugsnag
|
|
24
|
+
*/
|
|
25
|
+
apiKey: string,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Method to retrieve user data such as Id, Name or Email
|
|
29
|
+
*/
|
|
30
|
+
getUser: () => { id?: string, name?: string, email?: string },
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type Props = {
|
|
34
|
+
/**
|
|
35
|
+
* List of storage key patterns which values should be anonymized
|
|
36
|
+
*/
|
|
37
|
+
anonymizeStorageKeyPatterns?: string[],
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Bugsnag configuration
|
|
41
|
+
*/
|
|
42
|
+
bugsnagConfig?: BugsnagConfig,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type States = {
|
|
46
|
+
hasError: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const codeSx = {
|
|
50
|
+
background: '#263238',
|
|
51
|
+
color: '#fff',
|
|
52
|
+
fontSize: '0.8rem',
|
|
53
|
+
padding: 1,
|
|
54
|
+
borderRadius: '3px',
|
|
55
|
+
overflowX: 'auto',
|
|
56
|
+
width: '100%'
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export class ErrorBoundary extends Component<Props, States> {
|
|
60
|
+
|
|
61
|
+
constructor(props: any) {
|
|
62
|
+
super(props);
|
|
63
|
+
this.state = {
|
|
64
|
+
hasError: false
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private static errorContext?: ErrorContext;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This lifecycle is invoked after an error has been thrown by a descendant component.
|
|
72
|
+
* It receives the error that was thrown as a parameter and should return a value to update state.
|
|
73
|
+
* @param error
|
|
74
|
+
* @doc https://reactjs.org/docs/react-component.html#static-getderivedstatefromerror
|
|
75
|
+
*/
|
|
76
|
+
static getDerivedStateFromError(error: any) {
|
|
77
|
+
// Store error context
|
|
78
|
+
ErrorBoundary.errorContext = {
|
|
79
|
+
url: location.href,
|
|
80
|
+
referrer: document.referrer,
|
|
81
|
+
userAgent: navigator.userAgent,
|
|
82
|
+
error
|
|
83
|
+
};
|
|
84
|
+
// Update state so the next render will show the fallback UI
|
|
85
|
+
return { hasError: true };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
|
89
|
+
console.error('An error occurred', { error, errorInfo });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async reportBugsnag() {
|
|
93
|
+
if (!this.props.bugsnagConfig) {
|
|
94
|
+
console.warn('Bugsnag not configured. Skip reporting to bugsnag.');
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (!ErrorBoundary.errorContext) {
|
|
98
|
+
console.warn('Error context not specified. Cannot report to bugsnag.');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const {bugsnagConfig: {apiKey, getUser}} = this.props;
|
|
102
|
+
const {error, url, referrer, userAgent} = ErrorBoundary.errorContext;
|
|
103
|
+
const stackTraces: StackTrace[] = ErrorStackParser.parse(error)
|
|
104
|
+
.map(({fileName: file, lineNumber, columnNumber, functionName: method}) => ({
|
|
105
|
+
file,
|
|
106
|
+
lineNumber,
|
|
107
|
+
columnNumber,
|
|
108
|
+
method
|
|
109
|
+
}));
|
|
110
|
+
const payload = {
|
|
111
|
+
apiKey,
|
|
112
|
+
payloadVersion: '5',
|
|
113
|
+
notifier: {
|
|
114
|
+
name: "variocube app-ui",
|
|
115
|
+
version: '1.0.11',
|
|
116
|
+
url: 'https://github.com'
|
|
117
|
+
},
|
|
118
|
+
events: [
|
|
119
|
+
{
|
|
120
|
+
exceptions: [{
|
|
121
|
+
errorClass: error.message,
|
|
122
|
+
stacktrace: stackTraces,
|
|
123
|
+
type: 'browserjs'
|
|
124
|
+
}],
|
|
125
|
+
request: {
|
|
126
|
+
httpMethod: '',
|
|
127
|
+
url,
|
|
128
|
+
referrer
|
|
129
|
+
},
|
|
130
|
+
user: getUser(),
|
|
131
|
+
metaData: {
|
|
132
|
+
userAgent: { userAgent },
|
|
133
|
+
sessionStorage: sessionStorage,
|
|
134
|
+
localStorage: localStorage
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
try {
|
|
141
|
+
const response = await fetch('https://notify.bugsnag.com/', {
|
|
142
|
+
method: 'POST',
|
|
143
|
+
body: JSON.stringify(payload)
|
|
144
|
+
});
|
|
145
|
+
if (response.ok) {
|
|
146
|
+
console.info('successfully reported error to bugsnag');
|
|
147
|
+
}
|
|
148
|
+
} catch (error) {
|
|
149
|
+
console.log('failed to report error to bugsnag', error)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
renderStorage(storage: Storage) {
|
|
154
|
+
const {anonymizeStorageKeyPatterns= []} = this.props;
|
|
155
|
+
const kv = [];
|
|
156
|
+
for (let i = 0; i < storage.length; i++) {
|
|
157
|
+
const key = storage.key(i);
|
|
158
|
+
if (key) {
|
|
159
|
+
let value = storage.getItem(key);
|
|
160
|
+
if (value && anonymizeStorageKeyPatterns.find(p => key.indexOf(p) > -1)) {
|
|
161
|
+
value = "*****";
|
|
162
|
+
}
|
|
163
|
+
kv.push({ key, value });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (kv.length === 0) return <Box component="code" sx={{ ...codeSx, mb: 2 }}>NONE</Box>
|
|
167
|
+
return kv
|
|
168
|
+
.sort((x, y) => x.key.localeCompare(y.key))
|
|
169
|
+
.map((o, i) => {
|
|
170
|
+
let value = o.value;
|
|
171
|
+
try {
|
|
172
|
+
value = JSON.stringify(JSON.parse(value as any), null, 3);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.log('cannot parse value', error)
|
|
175
|
+
}
|
|
176
|
+
return (
|
|
177
|
+
<Fragment key={'kv-' + i} >
|
|
178
|
+
<Typography variant="caption">{o.key}</Typography>
|
|
179
|
+
<Box component="code" sx={{ ...codeSx, mb: 2 }}>
|
|
180
|
+
{value}
|
|
181
|
+
</Box>
|
|
182
|
+
</Fragment>
|
|
183
|
+
)
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
render() {
|
|
188
|
+
if (!this.state.hasError) return this.props.children;
|
|
189
|
+
|
|
190
|
+
this.reportBugsnag()
|
|
191
|
+
.catch(err => console.error('failed to report to bugsnag', err));
|
|
192
|
+
|
|
193
|
+
const {errorContext: { error, url, referrer, userAgent } = {}} = ErrorBoundary;
|
|
194
|
+
return (
|
|
195
|
+
<Box p={3}>
|
|
196
|
+
<NotFoundSvg style={{ width: '100%', maxHeight: 300 }} />
|
|
197
|
+
<Box p={4} />
|
|
198
|
+
<Typography variant="h2" align="center">Oops, something went wrong!</Typography>
|
|
199
|
+
<Box p={2} />
|
|
200
|
+
<Accordion>
|
|
201
|
+
<AccordionSummary expandIcon={<ExpandMore />}>
|
|
202
|
+
<Typography>{error?.message}</Typography>
|
|
203
|
+
</AccordionSummary>
|
|
204
|
+
<AccordionDetails
|
|
205
|
+
sx={{
|
|
206
|
+
display: 'flex',
|
|
207
|
+
flexDirection: 'column'
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
210
|
+
<Typography variant="overline"><strong>URL</strong></Typography>
|
|
211
|
+
<Box component="code" sx={codeSx}>{url}</Box>
|
|
212
|
+
<Box my={1} />
|
|
213
|
+
<Typography variant="overline"><strong>Referrer</strong></Typography>
|
|
214
|
+
<Box component="code" sx={codeSx}>{referrer}</Box>
|
|
215
|
+
<Box my={1} />
|
|
216
|
+
<Typography variant="overline"><strong>User-Agent</strong></Typography>
|
|
217
|
+
<Box component="code" sx={codeSx}>{userAgent}</Box>
|
|
218
|
+
<Box my={1} />
|
|
219
|
+
<Typography variant="overline"><strong>Trace</strong></Typography>
|
|
220
|
+
<Box component="code" sx={codeSx}>{error?.stack}</Box>
|
|
221
|
+
<Box my={1} />
|
|
222
|
+
<Typography variant="overline"><strong>Session Storage</strong></Typography>
|
|
223
|
+
{this.renderStorage(sessionStorage)}
|
|
224
|
+
<Box my={1} />
|
|
225
|
+
<Typography variant="overline"><strong>Local Storage</strong></Typography>
|
|
226
|
+
{this.renderStorage(localStorage)}
|
|
227
|
+
</AccordionDetails>
|
|
228
|
+
</Accordion>
|
|
229
|
+
</Box>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {Button, Grid, Stack, Typography} from "@mui/material";
|
|
2
|
+
import {ReactElement} from "react";
|
|
3
|
+
import {NotFoundSvg} from "./NotFoundSvg";
|
|
4
|
+
import {ContainerLayout} from "../container";
|
|
5
|
+
import React from "react";
|
|
6
|
+
|
|
7
|
+
interface NotFoundProps {
|
|
8
|
+
svg?: ReactElement;
|
|
9
|
+
errorMsg?: string;
|
|
10
|
+
pathMsg?: string;
|
|
11
|
+
backToHomeMsg?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function NotFound(props: NotFoundProps) {
|
|
15
|
+
const {svg, errorMsg,pathMsg, backToHomeMsg} = props;
|
|
16
|
+
|
|
17
|
+
const path = window.location.pathname;
|
|
18
|
+
|
|
19
|
+
const defaultErrorMsg = "404: Not Found";
|
|
20
|
+
const defaultPathMsg = "We could not find the following path:";
|
|
21
|
+
const defaultBackToHomeMsg = "Back to Home";
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<ContainerLayout>
|
|
25
|
+
<Stack
|
|
26
|
+
direction="column"
|
|
27
|
+
alignItems="center"
|
|
28
|
+
>
|
|
29
|
+
{!svg &&
|
|
30
|
+
<NotFoundSvg style={{ width: '100%', maxHeight: 300 }} />
|
|
31
|
+
}
|
|
32
|
+
{svg &&
|
|
33
|
+
svg
|
|
34
|
+
}
|
|
35
|
+
</Stack>
|
|
36
|
+
<Grid container spacing={6}>
|
|
37
|
+
<Grid item xs={12}>
|
|
38
|
+
<Typography variant="h3" align="center">{errorMsg != "" ? errorMsg : defaultErrorMsg}</Typography>
|
|
39
|
+
<Typography variant="body1" align="center">{pathMsg != "" ? pathMsg : defaultPathMsg}</Typography>
|
|
40
|
+
<Typography variant="body1" align="center">{path}</Typography>
|
|
41
|
+
|
|
42
|
+
</Grid>
|
|
43
|
+
<Grid item xs={12}>
|
|
44
|
+
<Typography variant="body1" align="center">
|
|
45
|
+
<Button href="/">{backToHomeMsg != "" ? backToHomeMsg : defaultBackToHomeMsg}</Button>
|
|
46
|
+
</Typography>
|
|
47
|
+
</Grid>
|
|
48
|
+
</Grid>
|
|
49
|
+
</ContainerLayout>
|
|
50
|
+
);
|
|
51
|
+
}
|