@comet/admin 8.17.1 → 9.0.0-beta.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/lib/ContentOverflow.js +42 -46
- package/lib/DeleteMutation.js +25 -31
- package/lib/EditDialog.js +33 -38
- package/lib/EditDialogApiContext.js +4 -11
- package/lib/FinalForm.d.ts +3 -3
- package/lib/FinalForm.d.ts.map +1 -1
- package/lib/FinalForm.js +44 -52
- package/lib/FinalFormSaveButton.js +11 -17
- package/lib/FinalFormSaveCancelButtonsLegacy.js +19 -25
- package/lib/FinalFormSaveSplitButton.js +22 -28
- package/lib/FormMutation.js +4 -10
- package/lib/Selected.js +17 -23
- package/lib/Selection.js +10 -17
- package/lib/SelectionApi.js +1 -5
- package/lib/SelectionRoute.js +19 -26
- package/lib/alert/Alert.js +26 -31
- package/lib/alert/__stories__/Alert.stories.js +25 -30
- package/lib/apollo/filterByFragment.js +12 -18
- package/lib/apollo/useFocusAwarePolling.js +4 -9
- package/lib/appHeader/AppHeader.js +12 -18
- package/lib/appHeader/button/AppHeaderButton.js +10 -16
- package/lib/appHeader/button/AppHeaderButton.styles.d.ts +1 -3
- package/lib/appHeader/button/AppHeaderButton.styles.d.ts.map +1 -1
- package/lib/appHeader/button/AppHeaderButton.styles.js +12 -18
- package/lib/appHeader/dropdown/AppHeaderDropdown.js +21 -27
- package/lib/appHeader/fillSpace/AppHeaderFillSpace.js +8 -14
- package/lib/appHeader/menuButton/AppHeaderMenuButton.js +15 -21
- package/lib/buildRestMutation.d.ts +3 -3
- package/lib/buildRestMutation.d.ts.map +1 -1
- package/lib/buildRestMutation.js +7 -15
- package/lib/clipboard/readClipboardText.js +4 -10
- package/lib/clipboard/writeClipboardText.js +3 -10
- package/lib/common/ClearInputAdornment.js +14 -20
- package/lib/common/CometLogo.js +9 -15
- package/lib/common/DeleteDialog.js +25 -29
- package/lib/common/Dialog.js +17 -21
- package/lib/common/FieldSet.js +34 -41
- package/lib/common/FillSpace.js +8 -14
- package/lib/common/FullHeightContent.js +12 -18
- package/lib/common/HoverActions.js +18 -24
- package/lib/common/Loading.js +15 -21
- package/lib/common/MainContent.js +17 -24
- package/lib/common/OpenPickerAdornment.js +10 -16
- package/lib/common/ReadOnlyAdornment.js +10 -16
- package/lib/common/Tooltip.d.ts +3 -3
- package/lib/common/Tooltip.d.ts.map +1 -1
- package/lib/common/Tooltip.js +27 -35
- package/lib/common/buttons/Button.js +19 -23
- package/lib/common/buttons/CopyToClipboardButton.js +27 -33
- package/lib/common/buttons/SaveButton.js +13 -19
- package/lib/common/buttons/cancel/CancelButton.js +13 -19
- package/lib/common/buttons/clearinput/ClearInputButton.js +15 -20
- package/lib/common/buttons/delete/DeleteButton.js +13 -19
- package/lib/common/buttons/delete/__stories__/DeleteButton.stories.js +4 -10
- package/lib/common/buttons/feedback/FeedbackButton.js +23 -29
- package/lib/common/buttons/helpDialogButton/HelpDialogButton.js +15 -21
- package/lib/common/buttons/helpDialogButton/HelpDialogButton.sc.d.ts +2 -4
- package/lib/common/buttons/helpDialogButton/HelpDialogButton.sc.d.ts.map +1 -1
- package/lib/common/buttons/helpDialogButton/HelpDialogButton.sc.js +6 -12
- package/lib/common/buttons/okay/OkayButton.js +13 -19
- package/lib/common/buttons/split/SplitButton.js +38 -40
- package/lib/common/buttons/split/SplitButtonContext.js +3 -7
- package/lib/common/buttons/split/useSplitButtonContext.js +4 -9
- package/lib/common/toolbar/DataGridToolbar.js +11 -17
- package/lib/common/toolbar/StackToolbar.js +6 -12
- package/lib/common/toolbar/Toolbar.js +28 -34
- package/lib/common/toolbar/ToolbarBreadcrumbs.js +64 -70
- package/lib/common/toolbar/actions/ToolbarActionButton.js +19 -24
- package/lib/common/toolbar/actions/ToolbarActions.js +8 -14
- package/lib/common/toolbar/automatictitleitem/ToolbarAutomaticTitleItem.js +12 -18
- package/lib/common/toolbar/backbutton/ToolbarBackButton.js +22 -28
- package/lib/common/toolbar/fillspace/ToolbarFillSpace.js +8 -14
- package/lib/common/toolbar/item/ToolbarItem.js +8 -14
- package/lib/common/toolbar/titleitem/ToolbarTitleItem.js +11 -17
- package/lib/dataGrid/CrudContextMenu.js +58 -64
- package/lib/dataGrid/CrudMoreActionsMenu.js +46 -54
- package/lib/dataGrid/CrudVisibility.js +26 -32
- package/lib/dataGrid/CrudVisibilityIcon.d.ts +1 -0
- package/lib/dataGrid/CrudVisibilityIcon.d.ts.map +1 -1
- package/lib/dataGrid/CrudVisibilityIcon.js +7 -13
- package/lib/dataGrid/DataGridPanel.js +83 -87
- package/lib/dataGrid/GridCellContent.js +21 -27
- package/lib/dataGrid/GridColDef.js +1 -5
- package/lib/dataGrid/GridColumnsButton.js +14 -20
- package/lib/dataGrid/GridFilterButton.js +16 -22
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagement.js +34 -39
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagement.sc.d.ts +3 -9
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagement.sc.d.ts.map +1 -1
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagement.sc.js +11 -17
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagementListItem.js +21 -27
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagementListItem.styles.d.ts +2 -6
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagementListItem.styles.d.ts.map +1 -1
- package/lib/dataGrid/columnsManagement/DataGridColumnsManagementListItem.styles.js +11 -17
- package/lib/dataGrid/excelExport/applyDefaultStyling.js +1 -7
- package/lib/dataGrid/excelExport/generateExcelFile.js +4 -11
- package/lib/dataGrid/excelExport/useDataGridExcelExport.js +14 -20
- package/lib/dataGrid/gridColumnTypes.js +30 -36
- package/lib/dataGrid/muiGridFilterToGql.js +1 -7
- package/lib/dataGrid/muiGridPagingToGql.js +1 -7
- package/lib/dataGrid/muiGridSortToGql.js +1 -7
- package/lib/dataGrid/pagination/DataGridPagination.js +21 -27
- package/lib/dataGrid/pagination/DataGridPagination.styles.d.ts +1 -3
- package/lib/dataGrid/pagination/DataGridPagination.styles.d.ts.map +1 -1
- package/lib/dataGrid/pagination/DataGridPagination.styles.js +5 -11
- package/lib/dataGrid/pagination/paginationActions/DataGridPaginationActions.js +21 -27
- package/lib/dataGrid/pagination/paginationActions/DataGridPaginationActions.styles.d.ts +1 -3
- package/lib/dataGrid/pagination/paginationActions/DataGridPaginationActions.styles.d.ts.map +1 -1
- package/lib/dataGrid/pagination/paginationActions/DataGridPaginationActions.styles.js +7 -13
- package/lib/dataGrid/renderStaticSelectCell.js +1 -7
- package/lib/dataGrid/useBufferedRowCount.js +4 -10
- package/lib/dataGrid/useDataGridRemote.js +3 -9
- package/lib/dataGrid/useDataGridUrlState.js +17 -24
- package/lib/dataGrid/usePersistentColumnState.d.ts +2 -2
- package/lib/dataGrid/usePersistentColumnState.d.ts.map +1 -1
- package/lib/dataGrid/usePersistentColumnState.js +20 -26
- package/lib/dateTime/datePicker/DatePicker.d.ts +8 -8
- package/lib/dateTime/datePicker/DatePicker.d.ts.map +1 -1
- package/lib/dateTime/datePicker/DatePicker.js +29 -35
- package/lib/dateTime/datePicker/__stories__/DatePicker.stories.js +37 -42
- package/lib/dateTime/datePickerField/DatePickerField.d.ts +3 -3
- package/lib/dateTime/datePickerField/DatePickerField.d.ts.map +1 -1
- package/lib/dateTime/datePickerField/DatePickerField.js +6 -12
- package/lib/dateTime/datePickerField/__stories__/DatePickerField.stories.js +27 -32
- package/lib/dateTime/dateRangePicker/DateRangePicker.d.ts +8 -8
- package/lib/dateTime/dateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/lib/dateTime/dateRangePicker/DateRangePicker.js +35 -43
- package/lib/dateTime/dateRangePicker/__stories__/DateRangePicker.stories.js +37 -42
- package/lib/dateTime/dateRangePickerField/DateRangePickerField.d.ts +2 -2
- package/lib/dateTime/dateRangePickerField/DateRangePickerField.d.ts.map +1 -1
- package/lib/dateTime/dateRangePickerField/DateRangePickerField.js +6 -12
- package/lib/dateTime/dateRangePickerField/__stories__/DateRangePickerField.stories.js +27 -32
- package/lib/dateTime/dateTimePicker/DateTimePicker.d.ts +8 -8
- package/lib/dateTime/dateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/lib/dateTime/dateTimePicker/DateTimePicker.js +27 -33
- package/lib/dateTime/dateTimePicker/__stories__/DateTimePicker.stories.js +37 -42
- package/lib/dateTime/dateTimePickerField/DateTimePickerField.d.ts +2 -2
- package/lib/dateTime/dateTimePickerField/DateTimePickerField.d.ts.map +1 -1
- package/lib/dateTime/dateTimePickerField/DateTimePickerField.js +6 -12
- package/lib/dateTime/dateTimePickerField/__stories__/DateTimePickerField.stories.js +27 -32
- package/lib/dateTime/dateTimeRangePicker/DateTimeRangePicker.js +32 -40
- package/lib/dateTime/dateTimeRangePicker/__stories__/DateTimeRangePicker.stories.js +37 -42
- package/lib/dateTime/dateTimeRangePickerField/DateTimeRangePickerField.js +6 -12
- package/lib/dateTime/dateTimeRangePickerField/__stories__/DateTimeRangePickerField.stories.js +27 -32
- package/lib/dateTime/timePicker/TimePicker.d.ts +8 -8
- package/lib/dateTime/timePicker/TimePicker.d.ts.map +1 -1
- package/lib/dateTime/timePicker/TimePicker.js +28 -34
- package/lib/dateTime/timePicker/__stories__/TimePicker.stories.js +37 -42
- package/lib/dateTime/timePickerField/TimePickerField.d.ts +2 -2
- package/lib/dateTime/timePickerField/TimePickerField.d.ts.map +1 -1
- package/lib/dateTime/timePickerField/TimePickerField.js +6 -12
- package/lib/dateTime/timePickerField/__stories__/TimePickerField.stories.js +27 -32
- package/lib/dateTime/utils.js +5 -11
- package/lib/error/errorboundary/ErrorBoundary.js +39 -44
- package/lib/error/errorboundary/RouteWithErrorBoundary.js +8 -13
- package/lib/error/errordialog/ErrorDialog.d.ts.map +1 -1
- package/lib/error/errordialog/ErrorDialog.js +77 -83
- package/lib/error/errordialog/ErrorDialogHandler.js +11 -17
- package/lib/error/errordialog/ErrorScope.js +3 -9
- package/lib/error/errordialog/createErrorDialogApolloLink.js +11 -17
- package/lib/error/errordialog/errorDialogVar.js +2 -8
- package/lib/error/errordialog/useErrorDialog.js +5 -11
- package/lib/fetchProvider/fetch.js +6 -14
- package/lib/fileIcons/Excel.js +5 -12
- package/lib/fileIcons/File.js +5 -12
- package/lib/fileIcons/FileIcon.js +29 -35
- package/lib/fileIcons/Jpg.js +5 -12
- package/lib/fileIcons/Pdf.js +5 -12
- package/lib/fileIcons/Png.js +5 -12
- package/lib/fileIcons/Powerpoint.js +5 -12
- package/lib/fileIcons/Word.js +5 -12
- package/lib/fileIcons/Zip.js +5 -12
- package/lib/form/Autocomplete.d.ts +4 -2
- package/lib/form/Autocomplete.d.ts.map +1 -1
- package/lib/form/Autocomplete.js +25 -27
- package/lib/form/Checkbox.js +4 -11
- package/lib/form/Field.js +17 -23
- package/lib/form/FieldContainer.js +41 -47
- package/lib/form/FinalFormAsyncAutocomplete.js +5 -11
- package/lib/form/FinalFormAsyncSelect.js +5 -11
- package/lib/form/FinalFormContextProvider.js +7 -14
- package/lib/form/FinalFormDebug.js +16 -20
- package/lib/form/FinalFormFileSelect.js +14 -20
- package/lib/form/FinalFormInput.d.ts +1 -2
- package/lib/form/FinalFormInput.d.ts.map +1 -1
- package/lib/form/FinalFormInput.js +30 -30
- package/lib/form/FinalFormNumberInput.d.ts +1 -2
- package/lib/form/FinalFormNumberInput.d.ts.map +1 -1
- package/lib/form/FinalFormNumberInput.js +22 -22
- package/lib/form/FinalFormRangeInput.js +32 -38
- package/lib/form/FinalFormSearchTextField.d.ts +0 -1
- package/lib/form/FinalFormSearchTextField.d.ts.map +1 -1
- package/lib/form/FinalFormSearchTextField.js +13 -31
- package/lib/form/FinalFormSelect.js +25 -31
- package/lib/form/FinalFormSelect.sc.d.ts +1 -3
- package/lib/form/FinalFormSelect.sc.d.ts.map +1 -1
- package/lib/form/FinalFormSelect.sc.js +5 -11
- package/lib/form/FinalFormToggleButtonGroup.js +12 -18
- package/lib/form/FormSection.d.ts +1 -1
- package/lib/form/FormSection.js +18 -24
- package/lib/form/Radio.js +4 -11
- package/lib/form/Switch.js +4 -11
- package/lib/form/fields/AsyncAutocompleteField.js +6 -12
- package/lib/form/fields/AsyncSelectField.js +6 -12
- package/lib/form/fields/AutocompleteField.js +6 -12
- package/lib/form/fields/CheckboxField.js +8 -14
- package/lib/form/fields/CheckboxListField.js +8 -14
- package/lib/form/fields/NumberField.js +6 -12
- package/lib/form/fields/RadioGroupField.js +9 -16
- package/lib/form/fields/SearchField.js +6 -12
- package/lib/form/fields/SelectField.js +11 -15
- package/lib/form/fields/SwitchField.js +8 -14
- package/lib/form/fields/TextAreaField.js +6 -12
- package/lib/form/fields/TextField.js +6 -12
- package/lib/form/fields/ToggleButtonGroupField.js +6 -12
- package/lib/form/file/FileDropzone.js +35 -41
- package/lib/form/file/FileSelect.d.ts +2 -3
- package/lib/form/file/FileSelect.d.ts.map +1 -1
- package/lib/form/file/FileSelect.js +38 -52
- package/lib/form/file/FileSelectListItem.js +59 -65
- package/lib/form/file/commonErrorMessages.js +6 -12
- package/lib/form/file/fileSelectItemTypes.js +1 -5
- package/lib/form/helpers/OnChangeField.js +7 -13
- package/lib/form/useAsyncAutocompleteOptionsProps.js +10 -16
- package/lib/fullPageAlert/FullPageAlert.js +26 -32
- package/lib/fullPageAlert/FullPageAlert.styles.d.ts +3 -9
- package/lib/fullPageAlert/FullPageAlert.styles.d.ts.map +1 -1
- package/lib/fullPageAlert/FullPageAlert.styles.js +19 -25
- package/lib/fullPageAlert/FullPageAlertBackground.js +44 -50
- package/lib/helpers/PrettyBytes.js +4 -10
- package/lib/helpers/ThemedComponentBaseProps.js +1 -5
- package/lib/helpers/createComponentSlot.d.ts +1 -1
- package/lib/helpers/createComponentSlot.d.ts.map +1 -1
- package/lib/helpers/createComponentSlot.js +11 -15
- package/lib/helpers/useTopOffset.d.ts +1 -1
- package/lib/helpers/useTopOffset.d.ts.map +1 -1
- package/lib/helpers/useTopOffset.js +4 -10
- package/lib/helpers/useWindowSize.js +4 -10
- package/lib/hooks/useAsyncOptionsProps.js +6 -12
- package/lib/hooks/useElementIsOverflowing.d.ts +1 -1
- package/lib/hooks/useElementIsOverflowing.d.ts.map +1 -1
- package/lib/hooks/useElementIsOverflowing.js +4 -10
- package/lib/hooks/useStoredState.js +9 -12
- package/lib/index.d.ts +8 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +225 -1860
- package/lib/inlineAlert/InlineAlert.js +19 -25
- package/lib/inlineAlert/InlineAlert.sc.d.ts +2 -6
- package/lib/inlineAlert/InlineAlert.sc.d.ts.map +1 -1
- package/lib/inlineAlert/InlineAlert.sc.js +13 -19
- package/lib/inputWithPopper/InputWithPopper.d.ts +1 -1
- package/lib/inputWithPopper/InputWithPopper.d.ts.map +1 -1
- package/lib/inputWithPopper/InputWithPopper.js +19 -25
- package/lib/inputWithPopper/InputWithPopper.slots.d.ts +2 -4
- package/lib/inputWithPopper/InputWithPopper.slots.d.ts.map +1 -1
- package/lib/inputWithPopper/InputWithPopper.slots.js +9 -15
- package/lib/messages.js +2 -8
- package/lib/mui/MasterLayout.js +34 -40
- package/lib/mui/MasterLayoutContext.js +2 -8
- package/lib/mui/ThemeProvider.js +7 -13
- package/lib/mui/mainNavigation/CollapsibleItem.js +32 -38
- package/lib/mui/mainNavigation/CollapsibleItem.styles.d.ts +1 -3
- package/lib/mui/mainNavigation/CollapsibleItem.styles.d.ts.map +1 -1
- package/lib/mui/mainNavigation/CollapsibleItem.styles.js +12 -18
- package/lib/mui/mainNavigation/Context.js +8 -14
- package/lib/mui/mainNavigation/Item.d.ts.map +1 -1
- package/lib/mui/mainNavigation/Item.js +14 -21
- package/lib/mui/mainNavigation/Item.styles.d.ts +1 -3
- package/lib/mui/mainNavigation/Item.styles.d.ts.map +1 -1
- package/lib/mui/mainNavigation/Item.styles.js +7 -13
- package/lib/mui/mainNavigation/ItemAnchorLink.js +6 -12
- package/lib/mui/mainNavigation/ItemGroup.js +27 -33
- package/lib/mui/mainNavigation/ItemRouterLink.js +9 -15
- package/lib/mui/mainNavigation/MainNavigation.js +25 -31
- package/lib/mui/mainNavigation/MainNavigation.styles.js +13 -19
- package/lib/mui/mui-private-theming.d.js +0 -1
- package/lib/renderFinalFormChildren.js +3 -9
- package/lib/router/BrowserRouter.js +12 -16
- package/lib/router/ConfirmationDialog.js +42 -47
- package/lib/router/Context.d.ts +2 -2
- package/lib/router/Context.d.ts.map +1 -1
- package/lib/router/Context.js +2 -8
- package/lib/router/ForcePromptRoute.js +12 -19
- package/lib/router/MemoryRouter.js +12 -16
- package/lib/router/Prompt.js +18 -25
- package/lib/router/PromptHandler.d.ts +2 -2
- package/lib/router/PromptHandler.d.ts.map +1 -1
- package/lib/router/PromptHandler.js +17 -23
- package/lib/router/SubRoute.js +15 -23
- package/lib/rowActions/RowActionsIconItem.d.ts +2 -1
- package/lib/rowActions/RowActionsIconItem.d.ts.map +1 -1
- package/lib/rowActions/RowActionsIconItem.js +8 -14
- package/lib/rowActions/RowActionsItem.js +9 -15
- package/lib/rowActions/RowActionsListItem.js +10 -16
- package/lib/rowActions/RowActionsMenu.js +9 -15
- package/lib/rowActions/RowActionsSubMenu.js +17 -23
- package/lib/saveBoundary/SaveBoundary.js +32 -41
- package/lib/saveBoundary/SaveBoundarySaveButton.js +7 -13
- package/lib/section/SectionHeadline.d.ts +1 -1
- package/lib/section/SectionHeadline.js +30 -36
- package/lib/snackbar/SnackbarProvider.js +13 -19
- package/lib/snackbar/UndoSnackbar.js +12 -18
- package/lib/stack/Api.d.ts +1 -1
- package/lib/stack/Api.d.ts.map +1 -1
- package/lib/stack/Api.js +8 -16
- package/lib/stack/Breadcrumb.js +11 -17
- package/lib/stack/Page.js +3 -9
- package/lib/stack/Stack.js +22 -28
- package/lib/stack/StackLink.js +7 -13
- package/lib/stack/StackPageTitle.js +7 -14
- package/lib/stack/Switch.js +40 -49
- package/lib/stack/SwitchMeta.js +9 -15
- package/lib/stack/backbutton/StackBackButton.js +15 -21
- package/lib/stack/breadcrumbs/BreadcrumbLink.js +5 -11
- package/lib/stack/breadcrumbs/BreadcrumbsEntry.js +23 -29
- package/lib/stack/breadcrumbs/BreadcrumbsOverflow.js +20 -26
- package/lib/stack/breadcrumbs/StackBreadcrumbs.js +35 -42
- package/lib/stack/breadcrumbs/utils.js +11 -17
- package/lib/stack/useIsActiveStackSwitch.js +5 -11
- package/lib/table/AddButton.js +11 -17
- package/lib/table/DeleteButton.js +19 -25
- package/lib/table/ExcelExportButton.js +11 -17
- package/lib/table/LocalChangesToolbar.js +11 -17
- package/lib/table/Pagination.js +22 -29
- package/lib/table/Table.d.ts.map +1 -1
- package/lib/table/Table.js +51 -54
- package/lib/table/TableBodyRow.js +12 -17
- package/lib/table/TableDndOrder.js +32 -39
- package/lib/table/TableFilterFinalForm.js +23 -29
- package/lib/table/TableLocalChanges.js +11 -15
- package/lib/table/TableQuery.js +27 -33
- package/lib/table/TableQueryContext.js +2 -7
- package/lib/table/excelexport/IExportApi.js +1 -5
- package/lib/table/excelexport/applyDefaultStyling.js +1 -7
- package/lib/table/excelexport/createExcelExportDownload.js +15 -19
- package/lib/table/excelexport/useExportDisplayedTableData.js +5 -11
- package/lib/table/excelexport/useExportPagedTableQuery.js +8 -14
- package/lib/table/excelexport/useExportTableQuery.js +7 -13
- package/lib/table/filterbar/FilterBar.js +15 -20
- package/lib/table/filterbar/dirtyFieldsCount.js +3 -8
- package/lib/table/filterbar/filterBarActiveFilterBadge/FilterBarActiveFilterBadge.js +14 -19
- package/lib/table/filterbar/filterBarButton/FilterBarButton.js +24 -28
- package/lib/table/filterbar/filterBarMoreFilters/FilterBarMoreFilters.js +23 -28
- package/lib/table/filterbar/filterBarPopoverFilter/FilterBarPopoverFilter.js +44 -48
- package/lib/table/isVisible.js +1 -7
- package/lib/table/paging/IPagingInfo.d.ts +1 -1
- package/lib/table/paging/IPagingInfo.d.ts.map +1 -1
- package/lib/table/paging/IPagingInfo.js +1 -5
- package/lib/table/paging/createOffsetLimitPagingAction.js +1 -7
- package/lib/table/paging/createPagePagingActions.js +1 -7
- package/lib/table/paging/createRelayPagingActions.js +1 -7
- package/lib/table/paging/createRestPagingActions.js +3 -10
- package/lib/table/paging/createRestStartLimitPagingActions.js +1 -7
- package/lib/table/safeColumnGet.js +3 -8
- package/lib/table/usePersistedState.js +4 -10
- package/lib/table/usePersistedStateId.js +5 -11
- package/lib/table/useTableQuery.js +8 -13
- package/lib/table/useTableQueryFilter.js +13 -19
- package/lib/table/useTableQueryPaging.d.ts +1 -1
- package/lib/table/useTableQueryPaging.d.ts.map +1 -1
- package/lib/table/useTableQueryPaging.js +5 -10
- package/lib/table/useTableQuerySort.js +7 -11
- package/lib/table/withTableQueryContext.js +11 -13
- package/lib/tabs/RouterTabs.js +37 -44
- package/lib/tabs/TabScrollButton.js +14 -21
- package/lib/tabs/Tabs.js +27 -35
- package/lib/theme/breakpointsOptions.js +2 -8
- package/lib/theme/colors.js +7 -13
- package/lib/theme/componentsTheme/MuiAccordion.js +3 -9
- package/lib/theme/componentsTheme/MuiAlert.js +9 -15
- package/lib/theme/componentsTheme/MuiAlertTitle.js +3 -9
- package/lib/theme/componentsTheme/MuiAppBar.js +1 -7
- package/lib/theme/componentsTheme/MuiAutocomplete.js +8 -14
- package/lib/theme/componentsTheme/MuiBadge.js +3 -9
- package/lib/theme/componentsTheme/MuiButton.js +14 -20
- package/lib/theme/componentsTheme/MuiButtonGroup.js +8 -14
- package/lib/theme/componentsTheme/MuiCard.js +5 -11
- package/lib/theme/componentsTheme/MuiCardContent.js +3 -9
- package/lib/theme/componentsTheme/MuiCardHeader.js +3 -9
- package/lib/theme/componentsTheme/MuiCheckbox.js +16 -22
- package/lib/theme/componentsTheme/MuiChip.js +6 -12
- package/lib/theme/componentsTheme/MuiDataGrid.js +48 -54
- package/lib/theme/componentsTheme/MuiDialog.js +3 -9
- package/lib/theme/componentsTheme/MuiDialogActions.js +3 -9
- package/lib/theme/componentsTheme/MuiDialogContent.js +6 -12
- package/lib/theme/componentsTheme/MuiDialogContentText.js +3 -9
- package/lib/theme/componentsTheme/MuiDialogTitle.js +3 -9
- package/lib/theme/componentsTheme/MuiDrawer.js +3 -9
- package/lib/theme/componentsTheme/MuiFormControlLabel.js +3 -9
- package/lib/theme/componentsTheme/MuiFormHelperText.js +3 -9
- package/lib/theme/componentsTheme/MuiFormLabel.js +3 -9
- package/lib/theme/componentsTheme/MuiIconButton.js +3 -9
- package/lib/theme/componentsTheme/MuiInput.js +1 -7
- package/lib/theme/componentsTheme/MuiInputAdornment.js +3 -9
- package/lib/theme/componentsTheme/MuiInputBase.js +7 -13
- package/lib/theme/componentsTheme/MuiLinearProgress.js +3 -9
- package/lib/theme/componentsTheme/MuiLink.js +3 -9
- package/lib/theme/componentsTheme/MuiList.js +5 -11
- package/lib/theme/componentsTheme/MuiListItem.js +5 -11
- package/lib/theme/componentsTheme/MuiListItemAvatar.js +3 -9
- package/lib/theme/componentsTheme/MuiListItemButton.js +5 -11
- package/lib/theme/componentsTheme/MuiListItemIcon.js +3 -9
- package/lib/theme/componentsTheme/MuiListItemText.js +3 -9
- package/lib/theme/componentsTheme/MuiMenu.js +3 -9
- package/lib/theme/componentsTheme/MuiMenuItem.js +8 -14
- package/lib/theme/componentsTheme/MuiNativeSelect.js +8 -14
- package/lib/theme/componentsTheme/MuiPaper.js +3 -9
- package/lib/theme/componentsTheme/MuiPickersInputBase.js +17 -23
- package/lib/theme/componentsTheme/MuiPickersPopper.js +3 -9
- package/lib/theme/componentsTheme/MuiPickersTextField.js +1 -7
- package/lib/theme/componentsTheme/MuiPopover.js +1 -7
- package/lib/theme/componentsTheme/MuiRadio.js +13 -19
- package/lib/theme/componentsTheme/MuiSelect.js +10 -16
- package/lib/theme/componentsTheme/MuiSvgIcon.js +3 -9
- package/lib/theme/componentsTheme/MuiSwitch.js +14 -20
- package/lib/theme/componentsTheme/MuiTab.js +5 -11
- package/lib/theme/componentsTheme/MuiTableCell.js +5 -11
- package/lib/theme/componentsTheme/MuiTableFooter.js +3 -9
- package/lib/theme/componentsTheme/MuiTablePagination.js +5 -11
- package/lib/theme/componentsTheme/MuiTableRow.js +3 -9
- package/lib/theme/componentsTheme/MuiTabs.js +3 -9
- package/lib/theme/componentsTheme/MuiToggleButton.js +5 -11
- package/lib/theme/componentsTheme/MuiToggleButtonGroup.js +3 -9
- package/lib/theme/componentsTheme/MuiTooltip.js +1 -7
- package/lib/theme/componentsTheme/MuiTypography.js +3 -9
- package/lib/theme/componentsTheme/commonListStyles.js +1 -7
- package/lib/theme/componentsTheme/getCommonSelectTheme.js +8 -14
- package/lib/theme/componentsTheme/getComponentsTheme.js +115 -121
- package/lib/theme/createCometTheme.js +20 -26
- package/lib/theme/paletteOptions.js +16 -22
- package/lib/theme/shadows.js +1 -7
- package/lib/theme/typographyOptions.js +1 -7
- package/lib/theme/utils/mergeOverrideStyles.js +4 -9
- package/lib/translator/BaseTranslationDialog.d.ts +1 -0
- package/lib/translator/BaseTranslationDialog.d.ts.map +1 -1
- package/lib/translator/BaseTranslationDialog.js +28 -32
- package/lib/translator/ContentTranslationServiceContext.js +2 -8
- package/lib/translator/ContentTranslationServiceProvider.js +4 -10
- package/lib/translator/PlainTextTranslationDialog.js +7 -13
- package/lib/translator/useContentTranslationService.js +4 -10
- package/lib/utils/test-utils.js +16 -33
- package/lib/utils/useObservedWidth.d.ts +1 -1
- package/lib/utils/useObservedWidth.d.ts.map +1 -1
- package/lib/utils/useObservedWidth.js +7 -14
- package/lib/vendor.d.js +0 -1
- package/package.json +18 -14
- package/lib/form/file/getFilesInfoText.d.ts +0 -3
- package/lib/form/file/getFilesInfoText.d.ts.map +0 -1
- package/lib/form/file/getFilesInfoText.js +0 -55
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.mergeOverrideStyles = mergeOverrideStyles;
|
|
7
|
-
var _utils = require("@mui/utils");
|
|
8
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { deepmerge } from "@mui/utils";
|
|
8
|
+
|
|
14
9
|
// Copied from https://github.com/mui/material-ui/blob/d70a45a3f2cc87521b5822bbe2b40b9b054c22f9/packages/mui-material/src/styles/overrides.ts#L121-L139.
|
|
15
10
|
|
|
16
11
|
var getOverridesInterpolation = function getOverridesInterpolation(props, overrides) {
|
|
@@ -27,13 +22,13 @@ var getOverridesInterpolation = function getOverridesInterpolation(props, overri
|
|
|
27
22
|
|
|
28
23
|
// Overload for components with custom owner state (e.g. MuiPickersTextField from `@mui/x-date-pickers`)
|
|
29
24
|
|
|
30
|
-
function mergeOverrideStyles() {
|
|
25
|
+
export function mergeOverrideStyles() {
|
|
31
26
|
var passedIn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
32
27
|
var comet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
33
28
|
var mergedOverrides = _objectSpread({}, comet);
|
|
34
29
|
Object.keys(passedIn).forEach(function (classKey) {
|
|
35
30
|
mergedOverrides[classKey] = function (props) {
|
|
36
|
-
return
|
|
31
|
+
return deepmerge(getOverridesInterpolation(props, comet[classKey]), getOverridesInterpolation(props, passedIn[classKey]));
|
|
37
32
|
};
|
|
38
33
|
});
|
|
39
34
|
return mergedOverrides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTranslationDialog.d.ts","sourceRoot":"","sources":["../../src/translator/BaseTranslationDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseTranslationDialog.d.ts","sourceRoot":"","sources":["../../src/translator/BaseTranslationDialog.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,OAAO,CAAC;AAM3C,UAAU,0BAA0B,CAAC,CAAC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,CAAC;IAChB,cAAc,EAAE,CAAC,CAAC;IAClB,kBAAkB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IAC7C,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,OAAO,CAAC;CAChF;AAED,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAG,OAAO,0BAA0B,CAAC,CAAC,CAAC,4CAwC7E,CAAC"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.BaseTranslationDialog = void 0;
|
|
8
|
-
var _material = require("@mui/material");
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _reactIntl = require("react-intl");
|
|
11
|
-
var _Button = require("../common/buttons/Button");
|
|
12
|
-
var _messages = require("../messages");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -22,7 +10,15 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
22
10
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
24
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
25
|
-
|
|
13
|
+
import {
|
|
14
|
+
// eslint-disable-next-line no-restricted-imports
|
|
15
|
+
Dialog, DialogActions, DialogContent, DialogTitle, Grid, Typography } from "@mui/material";
|
|
16
|
+
import { useState } from "react";
|
|
17
|
+
import { FormattedMessage } from "react-intl";
|
|
18
|
+
import { Button } from "../common/buttons/Button";
|
|
19
|
+
import { messages } from "../messages";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
export var BaseTranslationDialog = function BaseTranslationDialog(props) {
|
|
26
22
|
var open = props.open,
|
|
27
23
|
onClose = props.onClose,
|
|
28
24
|
originalText = props.originalText,
|
|
@@ -30,64 +26,64 @@ var BaseTranslationDialog = exports.BaseTranslationDialog = function BaseTransla
|
|
|
30
26
|
onApplyTranslation = props.onApplyTranslation,
|
|
31
27
|
renderOriginalText = props.renderOriginalText,
|
|
32
28
|
renderTranslatedText = props.renderTranslatedText;
|
|
33
|
-
var _useState =
|
|
29
|
+
var _useState = useState(translatedText),
|
|
34
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
31
|
translation = _useState2[0],
|
|
36
32
|
setTranslation = _useState2[1];
|
|
37
|
-
return /*#__PURE__*/(
|
|
33
|
+
return /*#__PURE__*/_jsxs(Dialog, {
|
|
38
34
|
open: open,
|
|
39
35
|
onClose: onClose,
|
|
40
36
|
fullWidth: true,
|
|
41
37
|
maxWidth: "lg",
|
|
42
|
-
children: [/*#__PURE__*/(
|
|
43
|
-
children: /*#__PURE__*/(
|
|
38
|
+
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
|
39
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
44
40
|
id: "comet.translator.translation",
|
|
45
41
|
defaultMessage: "Translation"
|
|
46
42
|
})
|
|
47
|
-
}), /*#__PURE__*/(
|
|
48
|
-
children: /*#__PURE__*/(
|
|
43
|
+
}), /*#__PURE__*/_jsx(DialogContent, {
|
|
44
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
49
45
|
container: true,
|
|
50
46
|
columnSpacing: 4,
|
|
51
47
|
rowSpacing: 2,
|
|
52
48
|
columns: 2,
|
|
53
49
|
alignItems: "center",
|
|
54
|
-
children: [/*#__PURE__*/(
|
|
50
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
55
51
|
size: 1,
|
|
56
|
-
children: /*#__PURE__*/(
|
|
52
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
57
53
|
variant: "subtitle2",
|
|
58
|
-
children: /*#__PURE__*/(
|
|
54
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
59
55
|
id: "comet.translator.original",
|
|
60
56
|
defaultMessage: "Original"
|
|
61
57
|
})
|
|
62
58
|
})
|
|
63
|
-
}), /*#__PURE__*/(
|
|
59
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
64
60
|
size: 1,
|
|
65
|
-
children: /*#__PURE__*/(
|
|
61
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
66
62
|
variant: "subtitle2",
|
|
67
|
-
children: /*#__PURE__*/(
|
|
63
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
68
64
|
id: "comet.translator.translation",
|
|
69
65
|
defaultMessage: "Translation"
|
|
70
66
|
})
|
|
71
67
|
})
|
|
72
|
-
}), /*#__PURE__*/(
|
|
68
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
73
69
|
size: 1,
|
|
74
70
|
children: renderOriginalText(originalText)
|
|
75
|
-
}), /*#__PURE__*/(
|
|
71
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
76
72
|
size: 1,
|
|
77
73
|
children: renderTranslatedText(translation, setTranslation)
|
|
78
74
|
})]
|
|
79
75
|
})
|
|
80
|
-
}), /*#__PURE__*/(
|
|
81
|
-
children: [/*#__PURE__*/(
|
|
76
|
+
}), /*#__PURE__*/_jsxs(DialogActions, {
|
|
77
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
82
78
|
variant: "textDark",
|
|
83
79
|
onClick: onClose,
|
|
84
|
-
children: /*#__PURE__*/(
|
|
85
|
-
}), /*#__PURE__*/(
|
|
80
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, _objectSpread({}, messages.cancel))
|
|
81
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
86
82
|
onClick: function onClick() {
|
|
87
83
|
onApplyTranslation(translation);
|
|
88
84
|
onClose();
|
|
89
85
|
},
|
|
90
|
-
children: /*#__PURE__*/(
|
|
86
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, _objectSpread({}, messages.apply))
|
|
91
87
|
})]
|
|
92
88
|
})]
|
|
93
89
|
});
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ContentTranslationServiceContext = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var ContentTranslationServiceContext = exports.ContentTranslationServiceContext = /*#__PURE__*/(0, _react.createContext)({
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
export var ContentTranslationServiceContext = /*#__PURE__*/createContext({
|
|
9
3
|
enabled: false,
|
|
10
4
|
translate: function translate(text) {
|
|
11
5
|
throw new Error("This is a dummy function for the translation feature that should never be called!");
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ContentTranslationServiceProvider = void 0;
|
|
7
|
-
var _ContentTranslationServiceContext = require("./ContentTranslationServiceContext");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var ContentTranslationServiceProvider = exports.ContentTranslationServiceProvider = function ContentTranslationServiceProvider(_ref) {
|
|
1
|
+
import { ContentTranslationServiceContext } from "./ContentTranslationServiceContext";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var ContentTranslationServiceProvider = function ContentTranslationServiceProvider(_ref) {
|
|
10
4
|
var children = _ref.children,
|
|
11
5
|
enabled = _ref.enabled,
|
|
12
6
|
showApplyTranslationDialog = _ref.showApplyTranslationDialog,
|
|
13
7
|
translate = _ref.translate;
|
|
14
|
-
return /*#__PURE__*/(
|
|
8
|
+
return /*#__PURE__*/_jsx(ContentTranslationServiceContext.Provider, {
|
|
15
9
|
value: {
|
|
16
10
|
enabled: enabled,
|
|
17
11
|
showApplyTranslationDialog: showApplyTranslationDialog,
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.PlainTextTranslationDialog = void 0;
|
|
7
|
-
var _material = require("@mui/material");
|
|
8
|
-
var _BaseTranslationDialog = require("./BaseTranslationDialog");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
var PlainTextTranslationDialog = exports.PlainTextTranslationDialog = function PlainTextTranslationDialog(props) {
|
|
1
|
+
import { TextField } from "@mui/material";
|
|
2
|
+
import { BaseTranslationDialog } from "./BaseTranslationDialog";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export var PlainTextTranslationDialog = function PlainTextTranslationDialog(props) {
|
|
11
5
|
var open = props.open,
|
|
12
6
|
onClose = props.onClose,
|
|
13
7
|
originalText = props.originalText,
|
|
14
8
|
translatedText = props.translatedText,
|
|
15
9
|
onApplyTranslation = props.onApplyTranslation;
|
|
16
|
-
return /*#__PURE__*/(
|
|
10
|
+
return /*#__PURE__*/_jsx(BaseTranslationDialog, {
|
|
17
11
|
open: open,
|
|
18
12
|
onClose: onClose,
|
|
19
13
|
originalText: originalText,
|
|
20
14
|
translatedText: translatedText,
|
|
21
15
|
onApplyTranslation: onApplyTranslation,
|
|
22
16
|
renderOriginalText: function renderOriginalText(text) {
|
|
23
|
-
return /*#__PURE__*/(
|
|
17
|
+
return /*#__PURE__*/_jsx(TextField, {
|
|
24
18
|
value: text,
|
|
25
19
|
disabled: true,
|
|
26
20
|
fullWidth: true
|
|
27
21
|
});
|
|
28
22
|
},
|
|
29
23
|
renderTranslatedText: function renderTranslatedText(text, _onChange) {
|
|
30
|
-
return /*#__PURE__*/(
|
|
24
|
+
return /*#__PURE__*/_jsx(TextField, {
|
|
31
25
|
value: text,
|
|
32
26
|
onChange: function onChange(event) {
|
|
33
27
|
return _onChange(event.target.value);
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useContentTranslationService = useContentTranslationService;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _ContentTranslationServiceContext = require("./ContentTranslationServiceContext");
|
|
9
|
-
function useContentTranslationService() {
|
|
10
|
-
return (0, _react.useContext)(_ContentTranslationServiceContext.ContentTranslationServiceContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ContentTranslationServiceContext } from "./ContentTranslationServiceContext";
|
|
3
|
+
export function useContentTranslationService() {
|
|
4
|
+
return useContext(ContentTranslationServiceContext);
|
|
11
5
|
}
|
package/lib/utils/test-utils.js
CHANGED
|
@@ -1,52 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
render: true
|
|
8
|
-
};
|
|
9
|
-
exports.render = customRender;
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _react = require("@testing-library/react");
|
|
12
|
-
Object.keys(_react).forEach(function (key) {
|
|
13
|
-
if (key === "default" || key === "__esModule") return;
|
|
14
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
15
|
-
if (key in exports && exports[key] === _react[key]) return;
|
|
16
|
-
Object.defineProperty(exports, key, {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function get() {
|
|
19
|
-
return _react[key];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
var _reactIntl = require("react-intl");
|
|
24
|
-
var _ThemeProvider = require("../mui/ThemeProvider");
|
|
25
|
-
var _MemoryRouter = require("../router/MemoryRouter");
|
|
26
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
28
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
31
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
32
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
// Inspired by https://testing-library.com/docs/react-testing-library/setup/#custom-render
|
|
8
|
+
import { createTheme } from "@mui/material";
|
|
9
|
+
import { render } from "@testing-library/react";
|
|
10
|
+
import { IntlProvider } from "react-intl";
|
|
11
|
+
import { MuiThemeProvider } from "../mui/ThemeProvider";
|
|
12
|
+
import { RouterMemoryRouter } from "../router/MemoryRouter";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
14
|
var messages = {};
|
|
34
|
-
var theme =
|
|
15
|
+
var theme = createTheme();
|
|
35
16
|
function DefaultWrapper(_ref) {
|
|
36
17
|
var children = _ref.children;
|
|
37
|
-
return /*#__PURE__*/(
|
|
18
|
+
return /*#__PURE__*/_jsx(IntlProvider, {
|
|
38
19
|
locale: "en",
|
|
39
20
|
messages: messages,
|
|
40
|
-
children: /*#__PURE__*/(
|
|
21
|
+
children: /*#__PURE__*/_jsx(MuiThemeProvider, {
|
|
41
22
|
theme: theme,
|
|
42
|
-
children: /*#__PURE__*/(
|
|
23
|
+
children: /*#__PURE__*/_jsx(RouterMemoryRouter, {
|
|
43
24
|
children: children
|
|
44
25
|
})
|
|
45
26
|
})
|
|
46
27
|
});
|
|
47
28
|
}
|
|
48
29
|
function customRender(ui, options) {
|
|
49
|
-
return
|
|
30
|
+
return render(ui, _objectSpread({
|
|
50
31
|
wrapper: DefaultWrapper
|
|
51
32
|
}, options));
|
|
52
|
-
}
|
|
33
|
+
}
|
|
34
|
+
export * from "@testing-library/react";
|
|
35
|
+
export { customRender as render };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useObservedWidth.d.ts","sourceRoot":"","sources":["../../src/utils/useObservedWidth.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAErE,eAAO,MAAM,gBAAgB,GAAI,KAAK,SAAS,CAAC,WAAW,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"useObservedWidth.d.ts","sourceRoot":"","sources":["../../src/utils/useObservedWidth.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAErE,eAAO,MAAM,gBAAgB,GAAI,KAAK,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,KAAG,MAyBrE,CAAC"}
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useObservedWidth = void 0;
|
|
7
|
-
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
1
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
-
|
|
7
|
+
import debounce from "lodash.debounce";
|
|
8
|
+
import { useEffect, useMemo, useState } from "react";
|
|
9
|
+
export var useObservedWidth = function useObservedWidth(ref) {
|
|
17
10
|
var _ref$current$clientWi, _ref$current;
|
|
18
|
-
var _useState =
|
|
11
|
+
var _useState = useState((_ref$current$clientWi = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.clientWidth) !== null && _ref$current$clientWi !== void 0 ? _ref$current$clientWi : 0),
|
|
19
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
13
|
containerWidth = _useState2[0],
|
|
21
14
|
setContainerWidth = _useState2[1];
|
|
22
|
-
var elementObserver =
|
|
15
|
+
var elementObserver = useMemo(function () {
|
|
23
16
|
return new ResizeObserver(function () {
|
|
24
|
-
(
|
|
17
|
+
debounce(function () {
|
|
25
18
|
if (!ref.current) return;
|
|
26
19
|
setContainerWidth(ref.current.clientWidth);
|
|
27
20
|
}, 500)();
|
|
28
21
|
});
|
|
29
22
|
}, [ref]);
|
|
30
|
-
|
|
23
|
+
useEffect(function () {
|
|
31
24
|
if (!ref.current) return;
|
|
32
25
|
var element = ref.current;
|
|
33
26
|
elementObserver.observe(element);
|
package/lib/vendor.d.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/admin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-beta.0",
|
|
4
4
|
"description": "Comet Admin package",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/admin/admin",
|
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
"url": "https://github.com/vivid-planet/comet"
|
|
9
9
|
},
|
|
10
10
|
"license": "BSD-2-Clause",
|
|
11
|
-
"type": "
|
|
12
|
-
"
|
|
13
|
-
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./lib/index.js",
|
|
15
|
+
"types": "./lib/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
14
18
|
"files": [
|
|
15
19
|
"lib"
|
|
16
20
|
],
|
|
@@ -28,7 +32,7 @@
|
|
|
28
32
|
"react-dropzone": "^14.3.8",
|
|
29
33
|
"use-constant": "^2.0.0",
|
|
30
34
|
"uuid": "^11.1.0",
|
|
31
|
-
"@comet/admin-icons": "
|
|
35
|
+
"@comet/admin-icons": "9.0.0-beta.0"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"@apollo/client": "^3.14.0",
|
|
@@ -56,8 +60,8 @@
|
|
|
56
60
|
"@types/lodash.debounce": "^4.0.9",
|
|
57
61
|
"@types/lodash.isequal": "^4.5.8",
|
|
58
62
|
"@types/node": "^24.10.9",
|
|
59
|
-
"@types/react": "^
|
|
60
|
-
"@types/react-dom": "^
|
|
63
|
+
"@types/react": "^19.2.10",
|
|
64
|
+
"@types/react-dom": "^19.2.3",
|
|
61
65
|
"@types/react-router": "^5.1.20",
|
|
62
66
|
"@types/react-router-dom": "^5.3.3",
|
|
63
67
|
"eslint": "^9.39.2",
|
|
@@ -69,9 +73,9 @@
|
|
|
69
73
|
"msw": "^2.10.4",
|
|
70
74
|
"npm-run-all2": "^8.0.4",
|
|
71
75
|
"prettier": "^3.6.2",
|
|
72
|
-
"react": "^
|
|
76
|
+
"react": "^19.2.4",
|
|
73
77
|
"react-dnd": "^16.0.1",
|
|
74
|
-
"react-dom": "^
|
|
78
|
+
"react-dom": "^19.2.4",
|
|
75
79
|
"react-final-form": "^6.5.9",
|
|
76
80
|
"react-intl": "^7.1.11",
|
|
77
81
|
"react-router": "^5.3.4",
|
|
@@ -82,9 +86,9 @@
|
|
|
82
86
|
"typescript": "^5.9.3",
|
|
83
87
|
"vite-tsconfig-paths": "^6.0.4",
|
|
84
88
|
"vitest": "^4.0.16",
|
|
85
|
-
"@comet/admin-babel-preset": "
|
|
86
|
-
"@comet/eslint-config": "
|
|
87
|
-
"@comet/eslint-plugin": "
|
|
89
|
+
"@comet/admin-babel-preset": "9.0.0-beta.0",
|
|
90
|
+
"@comet/eslint-config": "9.0.0-beta.0",
|
|
91
|
+
"@comet/eslint-plugin": "9.0.0-beta.0"
|
|
88
92
|
},
|
|
89
93
|
"peerDependencies": {
|
|
90
94
|
"@apollo/client": "^3.7.0",
|
|
@@ -99,9 +103,9 @@
|
|
|
99
103
|
"final-form": "^4.16.1",
|
|
100
104
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
101
105
|
"history": "^4.10.1",
|
|
102
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
106
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
103
107
|
"react-dnd": "^16.0.0",
|
|
104
|
-
"react-dom": "^17.0.0 || ^18.0.0",
|
|
108
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
105
109
|
"react-final-form": "^6.3.1",
|
|
106
110
|
"react-intl": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
107
111
|
"react-router": "^5.1.2",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type FileSelectProps } from "./FileSelect";
|
|
2
|
-
export declare const getFilesInfoText: (maxFiles: FileSelectProps["maxFiles"], maxFileSize: FileSelectProps["maxFileSize"]) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
-
//# sourceMappingURL=getFilesInfoText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFilesInfoText.d.ts","sourceRoot":"","sources":["../../../src/form/file/getFilesInfoText.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAAI,UAAU,eAAe,CAAC,UAAU,CAAC,EAAE,aAAa,eAAe,CAAC,aAAa,CAAC,mDAmDlH,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getFilesInfoText = void 0;
|
|
7
|
-
var _reactIntl = require("react-intl");
|
|
8
|
-
var _PrettyBytes = require("../../helpers/PrettyBytes");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
var getFilesInfoText = exports.getFilesInfoText = function getFilesInfoText(maxFiles, maxFileSize) {
|
|
11
|
-
if (typeof maxFiles === "number" && typeof maxFileSize === "number") {
|
|
12
|
-
if (maxFiles === 1) {
|
|
13
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
14
|
-
id: "comet.fileSelect.singleFileMaximumSize",
|
|
15
|
-
defaultMessage: "Maximum 1 file, {maxFileSize}.",
|
|
16
|
-
values: {
|
|
17
|
-
maxFileSize: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PrettyBytes.PrettyBytes, {
|
|
18
|
-
value: maxFileSize
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
24
|
-
id: "comet.fileSelect.multipleFilesMaximumSize",
|
|
25
|
-
defaultMessage: "Maximum {maxFiles} files, {maxFileSize} per file.",
|
|
26
|
-
values: {
|
|
27
|
-
maxFileSize: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PrettyBytes.PrettyBytes, {
|
|
28
|
-
value: maxFileSize
|
|
29
|
-
}),
|
|
30
|
-
maxFiles: maxFiles
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
if (typeof maxFiles === "number") {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
36
|
-
id: "comet.fileSelect.maximumFiles",
|
|
37
|
-
defaultMessage: "Maximum {maxFiles, plural, one {# file} other {# files}}.",
|
|
38
|
-
values: {
|
|
39
|
-
maxFiles: maxFiles
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (typeof maxFileSize === "number") {
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
45
|
-
id: "comet.fileSelect.maximumSize",
|
|
46
|
-
defaultMessage: "Maximum {maxFileSize} per file.",
|
|
47
|
-
values: {
|
|
48
|
-
maxFileSize: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PrettyBytes.PrettyBytes, {
|
|
49
|
-
value: maxFileSize
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
};
|