@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,69 @@
|
|
|
1
|
+
import {Button, ButtonProps} from "@mui/material";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import {Fragment, PropsWithChildren, useCallback} from "react";
|
|
4
|
+
import {useFlag, useIsMounted} from "../utils";
|
|
5
|
+
import {ConfirmDialog} from "./ConfirmDialog";
|
|
6
|
+
|
|
7
|
+
interface ConfirmButtonProps {
|
|
8
|
+
title: string;
|
|
9
|
+
confirmTitle?: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
onConfirm: () => Promise<any>;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
color?: ButtonProps["color"];
|
|
16
|
+
variant?: ButtonProps["variant"];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function ConfirmButton(props: PropsWithChildren<ConfirmButtonProps>) {
|
|
20
|
+
const {
|
|
21
|
+
fullWidth,
|
|
22
|
+
title,
|
|
23
|
+
confirmTitle,
|
|
24
|
+
cancel,
|
|
25
|
+
icon,
|
|
26
|
+
children,
|
|
27
|
+
onConfirm,
|
|
28
|
+
color,
|
|
29
|
+
variant,
|
|
30
|
+
disabled,
|
|
31
|
+
} = props;
|
|
32
|
+
const isMounted = useIsMounted();
|
|
33
|
+
const [dialogOpen, setDialogOpen, clearDialogOpen] = useFlag(false);
|
|
34
|
+
|
|
35
|
+
const handleConfirm = useCallback(async () => {
|
|
36
|
+
await onConfirm();
|
|
37
|
+
if (isMounted) {
|
|
38
|
+
clearDialogOpen();
|
|
39
|
+
}
|
|
40
|
+
}, [onConfirm, isMounted]);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Fragment>
|
|
44
|
+
<Button
|
|
45
|
+
onClick={setDialogOpen}
|
|
46
|
+
color={color}
|
|
47
|
+
variant={variant}
|
|
48
|
+
disabled={disabled}
|
|
49
|
+
startIcon={icon}
|
|
50
|
+
fullWidth={fullWidth}
|
|
51
|
+
>
|
|
52
|
+
{title}
|
|
53
|
+
</Button>
|
|
54
|
+
<ConfirmDialog
|
|
55
|
+
open={dialogOpen}
|
|
56
|
+
onClose={clearDialogOpen}
|
|
57
|
+
title={title}
|
|
58
|
+
confirmTitle={confirmTitle}
|
|
59
|
+
cancel={cancel}
|
|
60
|
+
onConfirm={handleConfirm}
|
|
61
|
+
color={color}
|
|
62
|
+
fullWidth={fullWidth}
|
|
63
|
+
icon={icon}
|
|
64
|
+
>
|
|
65
|
+
{children}
|
|
66
|
+
</ConfirmDialog>
|
|
67
|
+
</Fragment>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {Button, ButtonProps, CircularProgress, Dialog, DialogActions, DialogContent, DialogTitle} from "@mui/material";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import {PropsWithChildren} from "react";
|
|
4
|
+
import {useAsyncCallback} from "react-async-hook";
|
|
5
|
+
import {ErrorAlert} from "../ErrorAlert";
|
|
6
|
+
|
|
7
|
+
interface ConfirmDialogProps {
|
|
8
|
+
open: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
title: string;
|
|
11
|
+
confirmTitle?: string;
|
|
12
|
+
cancel: string;
|
|
13
|
+
onConfirm: () => Promise<any>;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
color?: ButtonProps["color"];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function ConfirmDialog(props: PropsWithChildren<ConfirmDialogProps>) {
|
|
20
|
+
const {
|
|
21
|
+
open,
|
|
22
|
+
onClose,
|
|
23
|
+
title,
|
|
24
|
+
confirmTitle = title,
|
|
25
|
+
cancel,
|
|
26
|
+
onConfirm,
|
|
27
|
+
fullWidth = true,
|
|
28
|
+
icon,
|
|
29
|
+
color = "primary",
|
|
30
|
+
children
|
|
31
|
+
} = props;
|
|
32
|
+
|
|
33
|
+
const {loading, error, execute} = useAsyncCallback(onConfirm);
|
|
34
|
+
|
|
35
|
+
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
if (e.currentTarget.reportValidity()) {
|
|
38
|
+
await execute();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Dialog fullWidth={fullWidth} open={open} onClose={onClose}>
|
|
44
|
+
<DialogTitle>{title}</DialogTitle>
|
|
45
|
+
<form onSubmit={handleSubmit}>
|
|
46
|
+
<DialogContent>{children}</DialogContent>
|
|
47
|
+
{error && (
|
|
48
|
+
<DialogContent>
|
|
49
|
+
<ErrorAlert error={error}/>
|
|
50
|
+
</DialogContent>
|
|
51
|
+
)}
|
|
52
|
+
<DialogActions>
|
|
53
|
+
<Button
|
|
54
|
+
type="submit"
|
|
55
|
+
color={color}
|
|
56
|
+
disabled={loading}
|
|
57
|
+
startIcon={loading ? <CircularProgress color={color} size={16} sx={{mx: 0.25}} /> : icon}
|
|
58
|
+
>
|
|
59
|
+
{confirmTitle}
|
|
60
|
+
</Button>
|
|
61
|
+
<Button onClick={onClose} color="inherit">
|
|
62
|
+
{cancel}
|
|
63
|
+
</Button>
|
|
64
|
+
</DialogActions>
|
|
65
|
+
</form>
|
|
66
|
+
</Dialog>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {ButtonProps, IconButton} from "@mui/material";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import {Fragment, PropsWithChildren, useCallback} from "react";
|
|
4
|
+
import {useFlag, useIsMounted} from "../utils";
|
|
5
|
+
import {ConfirmDialog} from "./ConfirmDialog";
|
|
6
|
+
|
|
7
|
+
interface ConfirmIconButtonProps {
|
|
8
|
+
title: string;
|
|
9
|
+
confirmTitle?: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
onConfirm: () => Promise<any>;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
color?: ButtonProps["color"];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function ConfirmIconButton(props: PropsWithChildren<ConfirmIconButtonProps>) {
|
|
18
|
+
const {
|
|
19
|
+
title,
|
|
20
|
+
confirmTitle,
|
|
21
|
+
cancel,
|
|
22
|
+
icon,
|
|
23
|
+
children,
|
|
24
|
+
onConfirm,
|
|
25
|
+
color,
|
|
26
|
+
disabled,
|
|
27
|
+
} = props;
|
|
28
|
+
const isMounted = useIsMounted();
|
|
29
|
+
const [dialogOpen, setDialogOpen, clearDialogOpen] = useFlag(false);
|
|
30
|
+
|
|
31
|
+
const handleConfirm = useCallback(async () => {
|
|
32
|
+
await onConfirm();
|
|
33
|
+
if (isMounted) {
|
|
34
|
+
clearDialogOpen();
|
|
35
|
+
}
|
|
36
|
+
}, [onConfirm, isMounted]);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Fragment>
|
|
40
|
+
<IconButton
|
|
41
|
+
onClick={setDialogOpen}
|
|
42
|
+
color={color}
|
|
43
|
+
disabled={disabled}
|
|
44
|
+
title={title}
|
|
45
|
+
>
|
|
46
|
+
{icon}
|
|
47
|
+
</IconButton>
|
|
48
|
+
<ConfirmDialog
|
|
49
|
+
open={dialogOpen}
|
|
50
|
+
onClose={clearDialogOpen}
|
|
51
|
+
title={title}
|
|
52
|
+
confirmTitle={confirmTitle}
|
|
53
|
+
cancel={cancel}
|
|
54
|
+
onConfirm={handleConfirm}
|
|
55
|
+
color={color}
|
|
56
|
+
icon={icon}
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
</ConfirmDialog>
|
|
60
|
+
</Fragment>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {ButtonProps, ListItemIcon, ListItemText, MenuItem} from "@mui/material";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import {Fragment, PropsWithChildren, useCallback} from "react";
|
|
4
|
+
import {useFlag, useIsMounted} from "../utils";
|
|
5
|
+
import {ConfirmDialog} from "./ConfirmDialog";
|
|
6
|
+
|
|
7
|
+
interface ConfirmButtonProps {
|
|
8
|
+
title: string;
|
|
9
|
+
confirmTitle?: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
onConfirm: () => Promise<any>;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
color?: ButtonProps["color"];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function ConfirmMenuItem(props: PropsWithChildren<ConfirmButtonProps>) {
|
|
19
|
+
const {
|
|
20
|
+
fullWidth,
|
|
21
|
+
title,
|
|
22
|
+
confirmTitle,
|
|
23
|
+
cancel,
|
|
24
|
+
icon,
|
|
25
|
+
children,
|
|
26
|
+
onConfirm,
|
|
27
|
+
color,
|
|
28
|
+
disabled,
|
|
29
|
+
} = props;
|
|
30
|
+
const isMounted = useIsMounted();
|
|
31
|
+
const [dialogOpen, setDialogOpen, clearDialogOpen] = useFlag(false);
|
|
32
|
+
|
|
33
|
+
const handleConfirm = useCallback(async () => {
|
|
34
|
+
await onConfirm();
|
|
35
|
+
if (isMounted) {
|
|
36
|
+
clearDialogOpen();
|
|
37
|
+
}
|
|
38
|
+
}, [onConfirm, isMounted]);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Fragment>
|
|
42
|
+
<MenuItem
|
|
43
|
+
onClick={setDialogOpen}
|
|
44
|
+
disabled={disabled}
|
|
45
|
+
>
|
|
46
|
+
{icon && (
|
|
47
|
+
<ListItemIcon>{icon}</ListItemIcon>
|
|
48
|
+
)}
|
|
49
|
+
<ListItemText primary={title} />
|
|
50
|
+
</MenuItem>
|
|
51
|
+
<ConfirmDialog
|
|
52
|
+
open={dialogOpen}
|
|
53
|
+
onClose={clearDialogOpen}
|
|
54
|
+
title={title}
|
|
55
|
+
confirmTitle={confirmTitle}
|
|
56
|
+
cancel={cancel}
|
|
57
|
+
onConfirm={handleConfirm}
|
|
58
|
+
color={color}
|
|
59
|
+
fullWidth={fullWidth}
|
|
60
|
+
icon={icon}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</ConfirmDialog>
|
|
64
|
+
</Fragment>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, {createElement, PropsWithChildren} from "react";
|
|
2
|
+
import {Breakpoint} from "@mui/system";
|
|
3
|
+
import {Box, Container} from "@mui/material";
|
|
4
|
+
import {containerWidthToBreakPoint, useContainerSettingsContext} from "./ContainerSettingsContext";
|
|
5
|
+
import {useHelpSettingsContext} from "../help/HelpSettingsContext";
|
|
6
|
+
import {HelpDrawer} from "../help/HelpDrawer";
|
|
7
|
+
|
|
8
|
+
interface ContainerLayoutProps extends PropsWithChildren<any> {
|
|
9
|
+
fixedWidth?: Breakpoint | false;
|
|
10
|
+
margin?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function ContainerLayout({children, fixedWidth, margin, helpKey}: ContainerLayoutProps) {
|
|
14
|
+
const {width} = useContainerSettingsContext();
|
|
15
|
+
const {baseUrl} = useHelpSettingsContext();
|
|
16
|
+
|
|
17
|
+
let selectedWidth = fixedWidth;
|
|
18
|
+
if(!selectedWidth && width) {
|
|
19
|
+
selectedWidth = containerWidthToBreakPoint(width);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Container maxWidth={selectedWidth} id="containerLayout">
|
|
24
|
+
<Box
|
|
25
|
+
marginTop={margin != undefined ? margin : 5}
|
|
26
|
+
id="containerLayoutBoxScreen"
|
|
27
|
+
display="block"
|
|
28
|
+
displayPrint="none"
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
{baseUrl &&
|
|
32
|
+
<HelpDrawer />
|
|
33
|
+
}
|
|
34
|
+
</Box>
|
|
35
|
+
<Box id="containerLayoutBoxPrint" display="none" displayPrint="block" style={{marginTop: "-32px"}}>
|
|
36
|
+
{children}
|
|
37
|
+
</Box>
|
|
38
|
+
</Container>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
createElement,
|
|
5
|
+
PropsWithChildren,
|
|
6
|
+
useCallback,
|
|
7
|
+
useContext,
|
|
8
|
+
useEffect,
|
|
9
|
+
useMemo,
|
|
10
|
+
useState
|
|
11
|
+
} from "react";
|
|
12
|
+
import {Breakpoint} from "@mui/system";
|
|
13
|
+
|
|
14
|
+
type ContainerWidth = Breakpoint | 'max';
|
|
15
|
+
|
|
16
|
+
const availableWidths: ContainerWidth[] = [ 'lg', 'xl', 'max'];
|
|
17
|
+
|
|
18
|
+
export function nextWidth(currentWidth: ContainerWidth): ContainerWidth {
|
|
19
|
+
const currentIndex = availableWidths.indexOf(currentWidth);
|
|
20
|
+
const nextIndex = currentIndex + 1;
|
|
21
|
+
return nextIndex >= availableWidths.length ? availableWidths[0] : availableWidths[nextIndex];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function containerWidthToBreakPoint(width: ContainerWidth): Breakpoint | false {
|
|
25
|
+
return width === 'max' ? false : width;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const WIDTH_KEY = "variocube-container-width";
|
|
29
|
+
const DEFAULT_WIDTH: ContainerWidth = 'lg';
|
|
30
|
+
|
|
31
|
+
interface ContainerSettingsContextData {
|
|
32
|
+
width: ContainerWidth;
|
|
33
|
+
setWidth: (width: ContainerWidth) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const emptyContext: ContainerSettingsContextData = {
|
|
37
|
+
width: DEFAULT_WIDTH,
|
|
38
|
+
setWidth: (width: ContainerWidth) => console.error(`Empty context should not call setWidth(${width}), you most likely do not have <ContainerSettingsContextProvider/> in your component tree.`)
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const ContainerSettingsContext = createContext(emptyContext);
|
|
42
|
+
|
|
43
|
+
export function ContainerSettingsContextProvider({children}: PropsWithChildren<any>) {
|
|
44
|
+
const [width, setWidth] = useState<ContainerWidth | undefined>(undefined);
|
|
45
|
+
|
|
46
|
+
const handleSetWidth = useCallback((next: ContainerWidth) => {
|
|
47
|
+
console.log(`Setting container width to ${next}`);
|
|
48
|
+
localStorage.setItem(WIDTH_KEY, next);
|
|
49
|
+
setWidth(next);
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const defaultContext = useMemo<ContainerSettingsContextData>(() => {
|
|
53
|
+
return {
|
|
54
|
+
width: width || DEFAULT_WIDTH,
|
|
55
|
+
setWidth: handleSetWidth
|
|
56
|
+
};
|
|
57
|
+
}, [width, handleSetWidth]);
|
|
58
|
+
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
let configured = localStorage.getItem(WIDTH_KEY);
|
|
61
|
+
if(configured) {
|
|
62
|
+
setWidth(configured as ContainerWidth);
|
|
63
|
+
} else {
|
|
64
|
+
setWidth(DEFAULT_WIDTH);
|
|
65
|
+
}
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<ContainerSettingsContext.Provider value={defaultContext}>
|
|
70
|
+
{children}
|
|
71
|
+
</ContainerSettingsContext.Provider>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function useContainerSettingsContext(): ContainerSettingsContextData {
|
|
76
|
+
return useContext<ContainerSettingsContextData>(ContainerSettingsContext);
|
|
77
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {Link} from "@mui/material";
|
|
3
|
+
import {LinkProps} from "@mui/material/Link/Link";
|
|
4
|
+
import {nextWidth, useContainerSettingsContext} from "./ContainerSettingsContext";
|
|
5
|
+
import {useCallback} from "react";
|
|
6
|
+
|
|
7
|
+
interface ContainerWidthControlProps extends Omit<LinkProps, "children"> {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function ContainerWidthControl(props: ContainerWidthControlProps) {
|
|
11
|
+
const {width, setWidth} = useContainerSettingsContext();
|
|
12
|
+
|
|
13
|
+
const handleChangeContainerWidth = useCallback(() => {
|
|
14
|
+
setWidth(nextWidth(width));
|
|
15
|
+
}, [width]);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Link href="#" underline="hover" color="secondary" onClick={handleChangeContainerWidth} {...props}>{width}</Link>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React, {Fragment, ReactComponentElement, useMemo, useState} from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Button,
|
|
5
|
+
Checkbox,
|
|
6
|
+
CircularProgress,
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogActions,
|
|
9
|
+
DialogContent,
|
|
10
|
+
FormControlLabel,
|
|
11
|
+
Grid,
|
|
12
|
+
IconButton,
|
|
13
|
+
LinearProgress, Paper,
|
|
14
|
+
Table,
|
|
15
|
+
TableBody,
|
|
16
|
+
TableCell,
|
|
17
|
+
TableContainer,
|
|
18
|
+
TableHead,
|
|
19
|
+
TablePagination,
|
|
20
|
+
TableRow,
|
|
21
|
+
TableSortLabel,
|
|
22
|
+
useTheme
|
|
23
|
+
} from "@mui/material";
|
|
24
|
+
import {FilterListIcon, TuningIcon} from "../icons";
|
|
25
|
+
import {Page, PagingSettings} from "../Paging";
|
|
26
|
+
import {UndrawEmpty} from "./UndrawEmpty";
|
|
27
|
+
|
|
28
|
+
export type ColumnType = { [sortKey: string]: { show: boolean, name: string, align?: 'left'|'right'|'center', unsortable?: boolean } }
|
|
29
|
+
|
|
30
|
+
type ContentTableProps<T> = {
|
|
31
|
+
pageable: PagingSettings<keyof ColumnType>,
|
|
32
|
+
columns: ColumnType,
|
|
33
|
+
onPageableChange: (pageable: PagingSettings<keyof ColumnType>) => void,
|
|
34
|
+
onColumnsChange: (columns: ColumnType) => void,
|
|
35
|
+
page?: Page<T>,
|
|
36
|
+
inProgress?: boolean,
|
|
37
|
+
onFilterClick?: () => void,
|
|
38
|
+
renderEmptyContent?: ReactComponentElement<any>,
|
|
39
|
+
renderTableBody?: ReactComponentElement<any>,
|
|
40
|
+
renderFilterOptions?: ReactComponentElement<any>
|
|
41
|
+
renderColumnFilter?: ReactComponentElement<any>,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const ContentTable = <T extends unknown>(props: ContentTableProps<T>) => {
|
|
45
|
+
const {
|
|
46
|
+
page, pageable, columns,
|
|
47
|
+
renderEmptyContent, renderTableBody, renderFilterOptions, renderColumnFilter,
|
|
48
|
+
inProgress,
|
|
49
|
+
onPageableChange,
|
|
50
|
+
onColumnsChange,
|
|
51
|
+
onFilterClick,
|
|
52
|
+
} = props;
|
|
53
|
+
const currentPage = useMemo(() => page, [page]);
|
|
54
|
+
const currentPageable = useMemo(() => pageable, [pageable]);
|
|
55
|
+
const [showColumnSettings, setShowColumnSettings] = useState(false);
|
|
56
|
+
|
|
57
|
+
const handleSortColumn = (key: keyof typeof columns) => {
|
|
58
|
+
const {sort, direction} = currentPageable;
|
|
59
|
+
let oD: 'desc'|'asc';
|
|
60
|
+
if (sort == key) {
|
|
61
|
+
oD = direction === 'desc' ? 'asc' : 'desc';
|
|
62
|
+
} else {
|
|
63
|
+
oD = 'desc';
|
|
64
|
+
}
|
|
65
|
+
updatePageable({
|
|
66
|
+
...currentPageable,
|
|
67
|
+
sort: key,
|
|
68
|
+
direction: oD
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const handlePageChange = (e: any, pageNumber: number) => {
|
|
73
|
+
updatePageable({
|
|
74
|
+
...currentPageable,
|
|
75
|
+
pageNumber: pageNumber
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const handleRowsPerPageChange = (e: any) => {
|
|
80
|
+
updatePageable({
|
|
81
|
+
...currentPageable,
|
|
82
|
+
pageSize: e.target.value as number
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const updatePageable = (settings: PagingSettings<keyof typeof columns>) => {
|
|
87
|
+
onPageableChange(settings);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const toggleColumnSettings = () => setShowColumnSettings(!showColumnSettings);
|
|
91
|
+
|
|
92
|
+
const handleColumnsChange = (sortKey: keyof typeof columns, show: boolean) => {
|
|
93
|
+
onColumnsChange({
|
|
94
|
+
...columns,
|
|
95
|
+
[sortKey]: {
|
|
96
|
+
...columns[sortKey],
|
|
97
|
+
show
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const theme = useTheme();
|
|
103
|
+
return (
|
|
104
|
+
<Paper sx={{ maxWidth: `calc(100vw - ${theme.spacing(4)})` }}>
|
|
105
|
+
{!currentPage && (
|
|
106
|
+
<Box display="flex" flexDirection="column" justifyContent="center" alignItems="center" p={3}>
|
|
107
|
+
<CircularProgress />
|
|
108
|
+
</Box>
|
|
109
|
+
)}
|
|
110
|
+
{currentPage && (
|
|
111
|
+
<Fragment>
|
|
112
|
+
<Box p={1}>
|
|
113
|
+
<Grid container>
|
|
114
|
+
<Grid item display="flex" flexGrow={1} alignItems="center">
|
|
115
|
+
{onFilterClick && (
|
|
116
|
+
<IconButton onClick={onFilterClick}>
|
|
117
|
+
<FilterListIcon />
|
|
118
|
+
</IconButton>
|
|
119
|
+
)}
|
|
120
|
+
<Box mx={1} />
|
|
121
|
+
{renderFilterOptions && ( renderFilterOptions )}
|
|
122
|
+
</Grid>
|
|
123
|
+
<Grid item>
|
|
124
|
+
<IconButton onClick={toggleColumnSettings}>
|
|
125
|
+
<TuningIcon />
|
|
126
|
+
</IconButton>
|
|
127
|
+
</Grid>
|
|
128
|
+
</Grid>
|
|
129
|
+
</Box>
|
|
130
|
+
<TableContainer >
|
|
131
|
+
<Table size="small">
|
|
132
|
+
<TableHead sx={{
|
|
133
|
+
background: theme.palette.mode === 'light' ? theme.palette.grey[200] : theme.palette.grey[600]
|
|
134
|
+
}}>
|
|
135
|
+
<TableRow>
|
|
136
|
+
{Object.keys(columns).filter(k => columns[k].show).map((k) => (
|
|
137
|
+
<TableCell key={'data-table-' + k} sx={{ whiteSpace: 'nowrap' }} align={columns[k].align}>
|
|
138
|
+
{!columns[k].unsortable && (
|
|
139
|
+
<TableSortLabel
|
|
140
|
+
active={currentPageable.sort === k}
|
|
141
|
+
direction={currentPageable.sort === k ? currentPageable.direction : 'asc'}
|
|
142
|
+
onClick={() => handleSortColumn(k)}
|
|
143
|
+
>
|
|
144
|
+
{columns[k].name}
|
|
145
|
+
</TableSortLabel>
|
|
146
|
+
)}
|
|
147
|
+
{columns[k].unsortable && (columns[k].name)}
|
|
148
|
+
</TableCell>
|
|
149
|
+
))}
|
|
150
|
+
</TableRow>
|
|
151
|
+
</TableHead>
|
|
152
|
+
<TableBody sx={{
|
|
153
|
+
'& > tr:not(.empty)': {
|
|
154
|
+
cursor: 'pointer',
|
|
155
|
+
'&:hover': {
|
|
156
|
+
background: `${theme.palette.mode === 'light' ? theme.palette.grey[50] : theme.palette.grey[800]} !important`
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}}>
|
|
160
|
+
{currentPage.content.length === 0 && (
|
|
161
|
+
renderEmptyContent ?
|
|
162
|
+
(<Fragment>{renderEmptyContent}</Fragment>) :
|
|
163
|
+
(
|
|
164
|
+
<TableRow className={'empty'}>
|
|
165
|
+
<TableCell colSpan={Object.keys(columns).length}>
|
|
166
|
+
<Box display="flex" flexDirection="column" justifyContent="center" alignItems="center" p={3}>
|
|
167
|
+
<Box sx={{
|
|
168
|
+
height: 300,
|
|
169
|
+
[theme.breakpoints.down('md')]: {
|
|
170
|
+
height: 150
|
|
171
|
+
},
|
|
172
|
+
}}>
|
|
173
|
+
<UndrawEmpty height="100%" width="auto" />
|
|
174
|
+
</Box>
|
|
175
|
+
</Box>
|
|
176
|
+
</TableCell>
|
|
177
|
+
</TableRow>
|
|
178
|
+
)
|
|
179
|
+
)}
|
|
180
|
+
{renderTableBody}
|
|
181
|
+
</TableBody>
|
|
182
|
+
</Table>
|
|
183
|
+
</TableContainer>
|
|
184
|
+
<TablePagination
|
|
185
|
+
rowsPerPageOptions={[10, 25, 50]}
|
|
186
|
+
component="div"
|
|
187
|
+
count={currentPage.totalElements}
|
|
188
|
+
rowsPerPage={currentPageable.pageSize}
|
|
189
|
+
page={currentPageable.pageNumber}
|
|
190
|
+
onPageChange={handlePageChange}
|
|
191
|
+
onRowsPerPageChange={handleRowsPerPageChange}
|
|
192
|
+
/>
|
|
193
|
+
{inProgress && (
|
|
194
|
+
<LinearProgress variant="indeterminate" />
|
|
195
|
+
)}
|
|
196
|
+
<Dialog fullWidth maxWidth="sm" open={showColumnSettings}>
|
|
197
|
+
<DialogContent>
|
|
198
|
+
{renderColumnFilter && <Fragment>{renderColumnFilter}</Fragment>}
|
|
199
|
+
{!renderColumnFilter && Object.keys(columns).map((k, i) => (
|
|
200
|
+
<FormControlLabel key={'column-setting-' + i} label={columns[k].name}
|
|
201
|
+
color="primary"
|
|
202
|
+
control={<Checkbox checked={columns[k].show} onChange={e => handleColumnsChange(k, e.target.checked)} />}
|
|
203
|
+
/>
|
|
204
|
+
))}
|
|
205
|
+
</DialogContent>
|
|
206
|
+
<DialogActions>
|
|
207
|
+
<Button variant="contained" color="primary" onClick={toggleColumnSettings}>OK</Button>
|
|
208
|
+
</DialogActions>
|
|
209
|
+
</Dialog>
|
|
210
|
+
</Fragment>
|
|
211
|
+
)}
|
|
212
|
+
</Paper>
|
|
213
|
+
)
|
|
214
|
+
}
|