From 935a6f454250cebfbf2c7ad4889fcd002e50e13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=C5=BBegle=C5=84?= Date: Fri, 14 May 2021 10:15:15 +0200 Subject: [PATCH] Reduce bundle size (#1103) * Add analysis tools * Use deep imports to reduce bundle size * Remove tslint config * Remove unused packages * Remove lodash-es references * Use root level mui imports * Remove mui from restricted imports --- .eslintrc.json | 8 +- package-lock.json | 156 ++++++++++++++++++ package.json | 10 +- src/Baseline.tsx | 2 +- .../AppActivateDialog/AppActivateDialog.tsx | 2 +- .../AppDeactivateDialog.tsx | 2 +- .../AppDeleteDialog/AppDeleteDialog.tsx | 2 +- .../AppDetailsPage/AppDetailsPage.tsx | 5 +- .../AppDetailsSettingsPage.tsx | 3 +- .../AppInProgressDeleteDialog.tsx | 2 +- .../AppInstallErrorPage.tsx | 4 +- .../AppInstallPage/AppInstallPage.tsx | 6 +- .../AppsInProgress/AppsInProgress.tsx | 18 +- .../components/AppsSkeleton/AppsSkeleton.tsx | 3 +- .../CardContainer/CardContainer.tsx | 3 +- .../CustomAppDefaultToken.tsx | 14 +- .../CustomAppDetailsPage.tsx | 2 +- .../CustomAppInformation.tsx | 4 +- .../CustomAppTokens/CustomAppTokens.tsx | 16 +- src/apps/components/CustomApps/CustomApps.tsx | 16 +- .../DeactivatedText/DeactivatedText.tsx | 2 +- .../HorizontalSpacer/HorizontalSpacer.tsx | 2 +- .../InstalledApps/InstalledApps.tsx | 16 +- .../components/Marketplace/Marketplace.tsx | 5 +- .../TokenCreateDialog/TokenCreateDialog.tsx | 18 +- .../TokenDeleteDialog/TokenDeleteDialog.tsx | 2 +- .../AttributeBulkDeleteDialog.tsx | 2 +- .../AttributeDeleteDialog.tsx | 2 +- .../AttributeDetails/AttributeDetails.tsx | 4 +- .../AttributeList/AttributeList.tsx | 5 +- .../AttributeListPage/AttributeListPage.tsx | 3 +- .../AttributeOrganization.tsx | 6 +- .../AttributeProperties.tsx | 5 +- .../AttributeValueDeleteDialog.tsx | 2 +- .../AttributeValueEditDialog.tsx | 14 +- .../AttributeValues/AttributeValues.tsx | 14 +- .../views/AttributeList/AttributeList.tsx | 2 +- .../components/LoginLoading/LoginLoading.tsx | 2 +- .../LoginPage/LoginPage.stories.tsx | 1 - src/auth/components/LoginPage/LoginPage.tsx | 12 +- .../NewPasswordPage/NewPasswordPage.tsx | 4 +- .../ResetPasswordPage/ResetPasswordPage.tsx | 4 +- .../ResetPasswordSuccessPage.tsx | 3 +- .../CategoryBackground/CategoryBackground.tsx | 5 +- .../CategoryDeleteDialog.tsx | 14 +- .../CategoryDetailsForm.tsx | 4 +- .../components/CategoryList/CategoryList.tsx | 5 +- .../CategoryListPage/CategoryListPage.tsx | 3 +- .../CategoryProductList.tsx | 5 +- .../CategoryProducts/CategoryProducts.tsx | 3 +- .../CategoryUpdatePage/CategoryUpdatePage.tsx | 3 +- src/categories/views/CategoryDetails.tsx | 3 +- .../views/CategoryList/CategoryList.tsx | 3 +- ...nnelWithVariantAvailabilityItemWrapper.tsx | 2 +- .../ChannelDeleteDialog.tsx | 2 +- .../components/ChannelForm/ChannelForm.tsx | 12 +- .../ChannelStatus/ChannelStatus.tsx | 5 +- ...sWithVariantsAvailabilityDialogContent.tsx | 4 +- .../ShippingZonesCard/ShippingZonesCard.tsx | 4 +- .../ShippingZonesListHeader.tsx | 2 +- .../pages/ChannelDetailsPage/utils.ts | 2 +- .../ChannelsListPage/ChannelsListPage.tsx | 16 +- src/channels/utils.ts | 2 +- .../CollectionDetails/CollectionDetails.tsx | 4 +- .../CollectionImage/CollectionImage.tsx | 5 +- .../CollectionList/CollectionList.tsx | 5 +- .../CollectionListPage/CollectionListPage.tsx | 3 +- .../CollectionProducts/CollectionProducts.tsx | 16 +- src/collections/views/CollectionDetails.tsx | 3 +- .../views/CollectionList/CollectionList.tsx | 3 +- src/components/Accordion/Accordion.tsx | 3 +- .../AccountPermissionGroups.tsx | 2 +- .../AccountPermissions/AccountPermissions.tsx | 8 +- src/components/ActionDialog/ActionDialog.tsx | 4 +- src/components/ActionDialog/DialogButtons.tsx | 3 +- src/components/AddressEdit/AddressEdit.tsx | 2 +- .../AddressFormatter/AddressFormatter.tsx | 2 +- src/components/Alert/Alert.tsx | 5 +- src/components/Alert/InlineAlert.tsx | 2 +- src/components/AppHeader/AppHeader.tsx | 3 +- src/components/AppLayout/AppLayout.tsx | 3 +- src/components/AppLayout/MenuList.tsx | 2 +- src/components/AppLayout/MenuNested.tsx | 3 +- src/components/AppStatus/AppStatus.tsx | 4 +- .../AssignAttributeDialog.tsx | 26 +-- .../AssignContainerDialog.tsx | 22 +-- .../AssignProductDialog.tsx | 22 +-- .../AttributeUnassignDialog.tsx | 2 +- src/components/Attributes/Attributes.tsx | 5 +- .../Attributes/BasicAttributeRow.tsx | 2 +- .../Attributes/ExtendedAttributeRow.tsx | 3 +- .../AutocompleteSelectMenu.tsx | 10 +- .../BulkAttributeUnassignDialog.tsx | 2 +- src/components/CardMenu/CardMenu.tsx | 16 +- src/components/CardTitle/CardTitle.tsx | 2 +- .../ChannelAvailabilityItemContent.tsx | 3 +- .../ChannelAvailabilityItemWrapper.tsx | 4 +- .../ChannelsAvailabilityCard.tsx | 2 +- .../ChannelsAvailabilityCardWrapper.tsx | 5 +- .../ChannelsAvailabilityContent.tsx | 3 +- ...ChannelsAvailabilityDialogChannelsList.tsx | 4 +- .../ChannelsAvailabilityDialogWrapper.tsx | 5 +- .../ChannelsAvailabilityDropdown.tsx | 4 +- src/components/Checkbox/Checkbox.tsx | 5 +- src/components/Chip/Chip.tsx | 2 +- .../CollectionWithDividers.tsx | 4 +- src/components/ColumnPicker/ColumnPicker.tsx | 4 +- .../ColumnPicker/ColumnPickerButton.tsx | 2 +- .../ColumnPicker/ColumnPickerContent.tsx | 12 +- .../CompanyAddressForm.tsx | 2 +- .../CompanyAddressInput.tsx | 3 +- .../ConfirmButton/ConfirmButton.tsx | 4 +- src/components/ControlledCheckbox.tsx | 3 +- src/components/ControlledSwitch.tsx | 5 +- src/components/CountryList/CountryList.tsx | 16 +- src/components/CreatorSteps/CreatorSteps.tsx | 2 +- src/components/Date/Date.tsx | 2 +- src/components/Date/DateTime.tsx | 2 +- src/components/DeleteButton/DeleteButton.tsx | 2 +- .../DeleteFilterTabDialog.tsx | 2 +- .../EditableTableCell/EditableTableCell.tsx | 13 +- .../ErrorMessageCard/ErrorMessageCard.tsx | 4 +- src/components/ErrorPage/ErrorPage.tsx | 3 +- src/components/ExternalLink/ExternalLink.tsx | 3 +- .../FileUploadField/FileUploadField.tsx | 6 +- src/components/Filter/Filter.tsx | 12 +- .../Filter/FilterAutocompleteField.tsx | 4 +- .../Filter/FilterContent/FilterContent.tsx | 3 +- .../FilterContent/FilterContentBody.tsx | 10 +- .../FilterContentBodyNameField.tsx | 3 +- .../FilterContent/FilterContentHeader.tsx | 3 +- .../Filter/FilterContent/FilterErrorsList.tsx | 2 +- src/components/Filter/FilterOptionField.tsx | 3 +- src/components/Filter/utils.ts | 2 +- src/components/FilterBar/FilterBar.tsx | 2 +- src/components/FilterCard/FilterCard.tsx | 5 +- .../IconButtonTableCell.tsx | 3 +- src/components/ImageUpload/ImageUpload.tsx | 2 +- .../LanguageSwitch/LanguageSwitch.tsx | 18 +- src/components/Link.tsx | 3 +- src/components/LinkChoice/LinkChoice.tsx | 5 +- src/components/ListField/ListField.tsx | 4 +- src/components/MediaTile/MediaTile.tsx | 3 +- src/components/Metadata/MetadataCard.tsx | 26 +-- .../MultiAutocompleteSelectField.tsx | 4 +- .../MultiAutocompleteSelectFieldContent.tsx | 10 +- .../MultiSelectField/MultiSelectField.tsx | 15 +- src/components/Navigator/Navigator.tsx | 4 +- src/components/Navigator/NavigatorSection.tsx | 3 +- .../NavigatorButton/NavigatorButton.tsx | 6 +- src/components/NotFoundPage/NotFoundPage.tsx | 3 +- src/components/PageHeader/PageHeader.tsx | 2 +- src/components/PhoneField/PhoneField.tsx | 2 +- src/components/PriceField/PriceField.tsx | 3 +- .../RadioGroupField/RadioGroupField.tsx | 16 +- .../RadioSwitchField/RadioSwitchField.tsx | 10 +- .../ResponsiveTable/ResponsiveTable.tsx | 2 +- .../RichTextEditor/RichTextEditor.tsx | 4 +- .../RowNumberSelect/RowNumberSelect.tsx | 3 +- .../SaveButtonBar/SaveButtonBar.tsx | 5 +- .../SaveFilterTabDialog.tsx | 14 +- src/components/SearchBar/SearchBar.tsx | 2 +- src/components/SearchBar/SearchInput.tsx | 2 +- src/components/SeoForm/SeoForm.tsx | 12 +- src/components/SideBar/MenuItem.tsx | 10 +- src/components/SideBarDrawer/MenuItemBtn.tsx | 2 +- .../SideBarDrawer/SideBarDrawer.tsx | 3 +- .../SingleAutocompleteSelectField.tsx | 3 +- .../SingleAutocompleteSelectFieldContent.tsx | 10 +- .../SingleSelectField/SingleSelectField.tsx | 15 +- src/components/SortableChip/SortableChip.tsx | 2 +- .../SortableChipsField/SortableChipsField.tsx | 2 +- .../SortableTable/SortableHandle.tsx | 2 +- .../SortableTable/SortableTableBody.tsx | 3 +- .../SortableTable/SortableTableRow.tsx | 3 +- src/components/SquareButton/SquareButton.tsx | 3 +- src/components/StatusChip/StatusChip.tsx | 2 +- src/components/StatusLabel/StatusLabel.tsx | 2 +- src/components/Tab/Tab.tsx | 2 +- src/components/TableCellAvatar/Avatar.tsx | 4 +- .../TableCellAvatar/TableCellAvatar.tsx | 3 +- .../TableCellHeader.stories.tsx | 12 +- .../TableCellHeader/TableCellHeader.tsx | 3 +- src/components/TableFilter/FilterTab.tsx | 2 +- src/components/TableFilter/FilterTabs.tsx | 2 +- src/components/TableHead/TableHead.tsx | 13 +- .../TablePagination/TablePagination.tsx | 3 +- .../TablePaginationActions.tsx | 2 +- .../TextFieldWithChoice.tsx | 19 ++- src/components/Timeline/Timeline.tsx | 5 +- src/components/Timeline/TimelineEvent.tsx | 10 +- .../Timeline/TimelineEventHeader.tsx | 2 +- src/components/Timeline/TimelineNote.tsx | 5 +- .../TypeDeleteWarningDialog.tsx | 5 +- .../TypeDeleteWarningDialogContent.tsx | 3 +- src/components/UserChip/UserChip.tsx | 24 +-- .../VisibilityCard/VisibilityCard.tsx | 5 +- src/components/messages/MessageManager.tsx | 10 +- src/configuration/ConfigurationPage.tsx | 4 +- .../CustomerAddress/CustomerAddress.tsx | 3 +- .../CustomerAddressChoiceCard.tsx | 3 +- .../CustomerAddressDialog.tsx | 12 +- .../CustomerAddressListPage.tsx | 3 +- .../CustomerAddresses/CustomerAddresses.tsx | 5 +- .../CustomerCreateAddress.tsx | 4 +- .../CustomerCreateDetails.tsx | 4 +- .../CustomerCreateNote/CustomerCreateNote.tsx | 5 +- .../CustomerDetails/CustomerDetails.tsx | 5 +- .../components/CustomerInfo/CustomerInfo.tsx | 5 +- .../components/CustomerList/CustomerList.tsx | 5 +- .../CustomerListPage/CustomerListPage.tsx | 3 +- .../CustomerOrders/CustomerOrders.tsx | 14 +- .../CustomerStats/CustomerStats.tsx | 4 +- src/customers/views/CustomerAddresses.tsx | 2 +- src/customers/views/CustomerDetails.tsx | 2 +- .../views/CustomerList/CustomerList.tsx | 3 +- .../DiscountCategories/DiscountCategories.tsx | 16 +- .../DiscountCollections.tsx | 16 +- .../DiscountCountrySelectDialog.tsx | 22 +-- .../DiscountDates/DiscountDates.tsx | 4 +- .../DiscountProducts/DiscountProducts.tsx | 16 +- .../components/SaleInfo/SaleInfo.tsx | 4 +- .../components/SaleList/SaleList.tsx | 5 +- .../components/SaleListPage/SaleListPage.tsx | 3 +- .../components/SaleSummary/SaleSummary.tsx | 4 +- .../components/SaleType/SaleType.tsx | 3 +- .../components/SaleValue/SaleValue.tsx | 16 +- .../components/VoucherDates/VoucherDates.tsx | 4 +- .../VoucherDetailsPage/VoucherDetailsPage.tsx | 2 +- .../components/VoucherInfo/VoucherInfo.tsx | 5 +- .../VoucherLimits/VoucherLimits.tsx | 4 +- .../components/VoucherList/VoucherList.tsx | 5 +- .../VoucherListPage/VoucherListPage.tsx | 3 +- .../VoucherRequirements.tsx | 16 +- .../VoucherSummary/VoucherSummary.tsx | 4 +- .../components/VoucherTypes/VoucherTypes.tsx | 3 +- .../components/VoucherValue/VoucherValue.tsx | 14 +- .../views/SaleDetails/SaleDetails.tsx | 3 +- src/discounts/views/SaleList/SaleList.tsx | 3 +- .../views/VoucherDetails/VoucherDetails.tsx | 3 +- .../views/VoucherList/VoucherList.tsx | 3 +- .../HomeActivityCard/HomeActivityCard.tsx | 12 +- .../HomeAnalyticsCard/HomeAnalyticsCard.tsx | 4 +- src/home/components/HomeHeader/HomeHeader.tsx | 2 +- .../HomeNotificationTable.tsx | 12 +- .../HomeProductListCard.tsx | 12 +- src/home/components/HomeScreen.tsx | 4 +- src/hooks/useChannelsSearchWithLoadMore.ts | 6 +- src/hooks/useElementScroll.ts | 2 +- src/hooks/useForm.ts | 2 +- src/hooks/useScroll.ts | 2 +- src/hooks/useStateFromProps.ts | 2 +- src/hooks/useWindowScroll.ts | 2 +- .../MenuCreateDialog/MenuCreateDialog.tsx | 14 +- .../MenuDetailsPage/MenuDetailsPage.tsx | 2 +- .../MenuItemDialog/MenuItemDialog.tsx | 16 +- .../components/MenuItems/MenuItems.tsx | 14 +- .../components/MenuList/MenuList.tsx | 12 +- .../components/MenuListPage/MenuListPage.tsx | 2 +- .../MenuProperties/MenuProperties.tsx | 4 +- src/navigation/views/MenuDetails/index.tsx | 2 +- src/navigation/views/MenuList/MenuList.tsx | 3 +- .../OrderAddressEditDialog.tsx | 12 +- .../OrderBulkCancelDialog.tsx | 2 +- .../OrderCancelDialog/OrderCancelDialog.tsx | 14 +- .../OrderCannotCancelOrderDialog.tsx | 14 +- .../OrderCustomer/OrderCustomer.tsx | 5 +- .../OrderCustomerAddressEdit.tsx | 4 +- .../OrderCustomerAddressesEditDialog.tsx | 16 +- .../OrderCustomerChangeDialog.tsx | 18 +- .../OrderCustomerNote/OrderCustomerNote.tsx | 4 +- .../OrderDetailsPage/OrderDetailsPage.tsx | 2 +- .../OrderDiscountCommonModal/ModalTitle.tsx | 3 +- .../OrderDiscountCommonModal.tsx | 1 - .../OrderDraftCancelDialog.tsx | 2 +- .../OrderDraftDetails/OrderDraftDetails.tsx | 4 +- .../OrderDraftDetailsProducts.tsx | 5 +- .../OrderDraftDetailsProducts/TableLine.tsx | 5 +- .../TableLineForm.tsx | 3 +- .../OrderDraftList/OrderDraftList.tsx | 5 +- .../OrderDraftListPage/OrderDraftListPage.tsx | 3 +- .../OrderDraftPage/OrderDraftPage.tsx | 2 +- .../OrderFulfillPage/OrderFulfillPage.tsx | 18 +- .../ExtraInfoLines.tsx | 3 +- .../OrderFulfilledProductsCard.tsx | 3 +- .../OrderFulfillmentCancelDialog.tsx | 14 +- .../OrderFulfillmentDialog.tsx | 24 +-- .../OrderFulfillmentTrackingDialog.tsx | 16 +- .../OrderHistory/ExtendedTimelineEvent.tsx | 3 +- .../components/OrderHistory/OrderHistory.tsx | 2 +- .../OrderInvoiceEmailSendDialog.tsx | 14 +- .../OrderInvoiceList/OrderInvoiceList.tsx | 16 +- src/orders/components/OrderList/OrderList.tsx | 12 +- .../OrderListPage/OrderListPage.tsx | 3 +- .../OrderMarkAsPaidDialog.tsx | 3 +- .../components/OrderPayment/OrderPayment.tsx | 5 +- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 16 +- .../OrderPaymentVoidDialog.tsx | 14 +- .../OrderProductAddDialog.tsx | 24 +-- .../OrderProductsCardHeader.tsx | 3 +- .../OrderProductsTableRow.tsx | 3 +- .../components/OrderRefund/OrderRefund.tsx | 5 +- .../OrderRefundFulfilledProducts.tsx | 24 +-- .../OrderRefundReturnAmount.tsx | 17 +- .../OrderRefundReturnAmountValues.tsx | 4 +- .../RefundAmountInput.tsx | 2 +- .../OrderRefundUnfulfilledProducts.tsx | 24 +-- .../OrderReturnRefundItemsCard/CardTitle.tsx | 3 +- .../MaximalButton.tsx | 3 +- .../ProductErrorCell.tsx | 4 +- .../ReturnItemsCard.tsx | 2 +- .../OrderSettings/OrderSettings.tsx | 4 +- .../OrderSettingsPage/OrderSettingsPage.tsx | 2 +- .../OrderShippingMethodEditDialog.tsx | 14 +- .../OrderUnfulfilledProductsCard.tsx | 6 +- .../views/OrderDraftList/OrderDraftList.tsx | 3 +- .../PageTypeAttributes/PageTypeAttributes.tsx | 12 +- .../PageTypeBulkDeleteDialog.tsx | 2 +- .../PageTypeCreatePage.stories.tsx | 1 - .../PageTypeCreatePage/PageTypeCreatePage.tsx | 4 +- .../PageTypeDetails/PageTypeDetails.tsx | 4 +- .../PageTypeDetailsPage.stories.tsx | 1 - .../PageTypeDetailsPage.tsx | 2 +- .../components/PageTypeList/PageTypeList.tsx | 5 +- .../PageTypeListPage/PageTypeListPage.tsx | 3 +- src/pageTypes/views/PageTypeDetails.tsx | 2 +- .../views/PageTypeList/PageTypeList.tsx | 2 +- src/pages/components/PageInfo/PageInfo.tsx | 4 +- src/pages/components/PageList/PageList.tsx | 12 +- .../components/PageListPage/PageListPage.tsx | 2 +- .../PageOrganizeContent.tsx | 6 +- src/pages/views/PageDetails.tsx | 2 +- src/pages/views/PageList/PageList.tsx | 4 +- .../AssignMembersDialog.tsx | 25 +-- .../MembersErrorDialog/MembersErrorDialog.tsx | 2 +- .../PermissionGroupDeleteDialog.tsx | 3 +- .../PermissionGroupInfo.tsx | 4 +- .../PermissionGroupList.tsx | 14 +- .../PermissionGroupListPage.tsx | 3 +- .../PermissionGroupMemberList.tsx | 15 +- .../UnassignMembersDialog.tsx | 2 +- src/permissionGroups/utils.ts | 2 +- .../PluginAuthorization.tsx | 5 +- .../PluginDetailsChannelsCardContent.tsx | 4 +- .../components/PluginInfo/PluginInfo.tsx | 4 +- .../PluginSecretFieldDialog.tsx | 14 +- .../PluginSettings/PluginSettings.tsx | 12 +- .../PluginAvailabilityStatusPopup.tsx | 3 +- .../ScrollableContent.tsx | 2 +- .../components/PluginsList/PluginsList.tsx | 7 +- .../PluginsListPage/PluginsListPage.tsx | 2 +- src/plugins/views/PluginsDetails.tsx | 2 +- .../ProductTypeAttributes.tsx | 12 +- .../ProductTypeDetails/ProductTypeDetails.tsx | 4 +- .../ProductTypeList/ProductTypeList.tsx | 12 +- .../ProductTypeListPage.tsx | 3 +- .../ProductTypeShipping.tsx | 4 +- .../ProductTypeTaxes/ProductTypeTaxes.tsx | 3 +- .../views/ProductTypeList/ProductTypeList.tsx | 2 +- .../views/ProductTypeUpdate/index.tsx | 2 +- .../ProductCategoryAndCollectionsForm.tsx | 3 +- .../ProductDetailsForm/ProductDetailsForm.tsx | 4 +- .../ProductExportDialog.tsx | 14 +- .../ProductExportDialogInfo.tsx | 12 +- .../ProductExternalMediaDialog.tsx | 16 +- .../components/ProductList/ProductList.tsx | 12 +- .../ProductListPage/ProductListPage.tsx | 3 +- .../components/ProductMedia/ProductMedia.tsx | 4 +- .../ProductMediaNavigation.tsx | 3 +- .../ProductMediaPage/ProductMediaPage.tsx | 4 +- .../ProductMediaPopper/ProductMediaPopper.tsx | 14 +- .../ProductOrganization.tsx | 4 +- .../ProductShipping/ProductShipping.tsx | 10 +- .../ProductStocks/CardAddItemsFooter.tsx | 2 +- .../ProductStocks/ProductStocks.tsx | 32 ++-- .../components/ProductTaxes/ProductTaxes.tsx | 3 +- .../ProductVariantAttributes.tsx | 4 +- .../ProductVariantCreatorPage.tsx | 3 +- .../ProductVariantCreatorPrices.tsx | 14 +- .../ProductVariantCreatorStock.tsx | 16 +- .../ProductVariantCreatorSummary.tsx | 4 +- .../ProductVariantCreatorValues.tsx | 3 +- .../ProductVariantDeleteDialog.tsx | 14 +- .../ProductVariantMediaSelectDialog.tsx | 12 +- .../ProductVariantMedia.tsx | 5 +- .../ProductVariantNavigation.tsx | 5 +- .../index.tsx | 2 +- .../ProductVariantPrice.tsx | 4 +- .../ProductVariants/ProductVariants.tsx | 14 +- src/products/views/ProductImage.tsx | 2 +- .../views/ProductList/ProductList.tsx | 3 +- src/products/views/ProductList/filters.ts | 2 +- .../views/ProductUpdate/ProductUpdate.tsx | 3 +- .../useChannelsWithProductVariants.ts | 4 +- src/products/views/ProductUpdate/utils.ts | 4 +- .../DeleteShippingRateDialog.tsx | 2 +- .../components/OrderValue/OrderValue.tsx | 14 +- .../components/OrderWeight/OrderWeight.tsx | 5 +- .../components/PricingCard/PricingCard.tsx | 14 +- .../ShippingMethodProducts.tsx | 18 +- .../ShippingMethodProductsAddDialog.tsx | 22 +-- .../ShippingRateInfo/ShippingRateInfo.tsx | 4 +- .../ShippingWeightUnitForm.tsx | 5 +- .../ShippingZoneAddWarehouseDialog.tsx | 14 +- .../ShippingZoneCountriesAssignDialog.tsx | 22 +-- .../ShippingZoneInfo/ShippingZoneInfo.tsx | 4 +- .../ShippingZonePostalCodeRangeDialog.tsx | 16 +- .../ShippingZonePostalCodes.tsx | 20 ++- .../ShippingZoneRates/ShippingZoneRates.tsx | 14 +- .../ShippingZoneSettingsCard.tsx | 4 +- .../ShippingZonesList/ShippingZonesList.tsx | 16 +- .../UnassignDialog/UnassignDialog.tsx | 2 +- src/shipping/handlers.ts | 2 +- .../PriceRatesUpdate/PriceRatesUpdate.tsx | 2 +- .../views/ShippingZoneDetails/index.tsx | 2 +- src/shipping/views/ShippingZonesList.tsx | 3 +- .../WeightRatesUpdate/WeightRatesUpdate.tsx | 2 +- .../SiteSettingsDetails.tsx | 4 +- .../SiteSettingsPage/SiteSettingsPage.tsx | 2 +- .../StaffAddMemberDialog.tsx | 14 +- .../StaffDetailsPage.stories.tsx | 1 - src/staff/components/StaffList/StaffList.tsx | 14 +- .../StaffListPage/StaffListPage.tsx | 3 +- .../StaffPassword/StaffPassword.tsx | 5 +- .../StaffPasswordResetDialog.tsx | 14 +- .../StaffPreferences/StaffPreferences.tsx | 4 +- .../StaffProperties/StaffProperties.tsx | 5 +- src/staff/utils.ts | 2 +- src/staff/views/StaffDetails.tsx | 2 +- src/storybook/CardDecorator.tsx | 3 +- .../stories/categories/CategoryUpdatePage.tsx | 1 - .../collections/CollectionCreatePage.tsx | 1 - .../collections/CollectionDetailsPage.tsx | 1 - .../stories/components/AddressEdit.tsx | 3 +- .../components/AutocompleteSelectMenu.tsx | 3 +- .../stories/components/EditableTableCell.tsx | 5 +- .../stories/components/ErrorPage.tsx | 1 - .../stories/components/PageHeader.tsx | 2 +- src/storybook/stories/components/messages.tsx | 2 +- .../stories/customers/CustomerCreatePage.tsx | 1 - .../stories/customers/CustomerDetailsPage.tsx | 1 - src/storybook/stories/home/HomePage.tsx | 1 - .../stories/orders/OrderCustomer.tsx | 1 - .../stories/orders/OrderDetailsPage.tsx | 1 - .../orders/OrderDraftPage/OrderDraftPage.tsx | 1 - .../stories/orders/OrderFulfillmentDialog.tsx | 1 - .../productTypes/ProductTypeCreatePage.tsx | 1 - .../productTypes/ProductTypeDetailsPage.tsx | 1 - .../stories/siteSettings/SiteSettingsPage.tsx | 1 - .../components/CountryList/CountryList.tsx | 12 +- .../CountryTaxesPage/CountryTaxesPage.tsx | 12 +- .../TaxConfiguration/TaxConfiguration.tsx | 5 +- .../TranslationFields/TranslationFields.tsx | 12 +- .../TranslationFieldsLong.tsx | 3 +- .../TranslationFieldsRich.tsx | 2 +- .../TranslationFieldsSave.tsx | 2 +- .../TranslationFieldsShort.tsx | 3 +- .../TranslationsEntitiesList.tsx | 13 +- .../TranslationsEntitiesListPage.tsx | 2 +- .../TranslationsLanguageList.tsx | 12 +- src/utils/filters/filters.ts | 2 +- src/utils/urls.ts | 2 +- .../WarehouseDeleteDialog.tsx | 2 +- .../WarehouseInfo/WarehouseInfo.tsx | 4 +- .../WarehouseList/WarehouseList.tsx | 14 +- .../WarehouseListPage/WarehouseListPage.tsx | 3 +- .../WarehouseZones/WarehouseZones.tsx | 4 +- .../WebhookDeleteDialog.tsx | 2 +- .../WebhookEvents/WebhookEvents.tsx | 4 +- .../components/WebhookInfo/WebhookInfo.tsx | 5 +- .../WebhookStatus/WebhookStatus.tsx | 4 +- .../components/WebhooksList/WebhooksList.tsx | 16 +- testUtils/filters.ts | 2 +- tslint.json | 19 --- webpack.config.js | 19 ++- 475 files changed, 1564 insertions(+), 1519 deletions(-) delete mode 100644 tslint.json diff --git a/.eslintrc.json b/.eslintrc.json index 3552568dd66..9c8aa5fd605 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -169,7 +169,13 @@ "space-before-function-paren": "off", "spaced-comment": "error", "use-isnan": "error", - "valid-typeof": "off" + "valid-typeof": "off", + "no-restricted-imports": [ + "error", + { + "paths": ["lodash"] + } + ] }, "ignorePatterns": ["node_modules/", "**/types/**/*"] } diff --git a/package-lock.json b/package-lock.json index 0bea490ec14..c36ae3d467f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2807,6 +2807,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2852,6 +2853,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -2861,6 +2863,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -3995,6 +3998,12 @@ "@octokit/openapi-types": "^6.0.0" } }, + "@polka/url": { + "version": "1.0.0-next.12", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz", + "integrity": "sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ==", + "dev": true + }, "@pollyjs/adapter": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@pollyjs/adapter/-/adapter-5.0.0.tgz", @@ -20412,6 +20421,12 @@ "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", "dev": true }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true + }, "opn": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", @@ -25108,6 +25123,25 @@ "simplebar": "^4.2.3" } }, + "sirv": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.11.tgz", + "integrity": "sha512-SR36i3/LSWja7AJNRBz4fF/Xjpn7lQFI30tZ434dIy+bitLYSP+ZEenHg36i23V2SGEz+kqjksg0uOGZ5LPiqg==", + "dev": true, + "requires": { + "@polka/url": "^1.0.0-next.9", + "mime": "^2.3.1", + "totalist": "^1.0.0" + }, + "dependencies": { + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + } + } + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -25445,6 +25479,42 @@ } } }, + "speed-measure-webpack-plugin": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.5.0.tgz", + "integrity": "sha512-Re0wX5CtM6gW7bZA64ONOfEPEhwbiSF/vz6e2GvadjuaPrQcHTQdRGsD8+BE7iUOysXH8tIenkPCQBEcspXsNg==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -26748,6 +26818,12 @@ "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", "dev": true }, + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "dev": true + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -27841,6 +27917,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -27886,6 +27963,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -27895,6 +27973,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -28121,6 +28200,83 @@ } } }, + "webpack-bundle-analyzer": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.1.tgz", + "integrity": "sha512-j5m7WgytCkiVBoOGavzNokBOqxe6Mma13X1asfVYtKWM3wxBiRRu1u1iG0Iol5+qp9WgyhkMmBAcvjEfJ2bdDw==", + "dev": true, + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" + }, + "dependencies": { + "acorn": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", + "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==", + "dev": true + }, + "acorn-walk": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", + "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==", + "dev": true + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "requires": { + "duplexer": "^0.1.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "ws": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==", + "dev": true + } + } + }, "webpack-cli": { "version": "3.3.12", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", diff --git a/package.json b/package.json index 7cf9955e52d..5f60a5d118a 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "jss": "^9.8.7", "keycode": "^2.2.0", "lodash": "^4.17.20", - "lodash-es": "^4.17.14", "moment-timezone": "^0.5.32", "qs": "^6.9.0", "react": "^16.12.0", @@ -161,14 +160,17 @@ "react-intl-translations-manager": "^5.0.3", "react-test-renderer": "^16.12.0", "regenerator-runtime": "^0.11.1", + "register-service-worker": "^1.7.2", "release-it": "^14.5.0", "require-context.macro": "^1.1.1", "rimraf": "^3.0.0", "setup-polly-jest": "^0.9.1", + "speed-measure-webpack-plugin": "^1.5.0", "start-server-and-test": "^1.11.0", "ts-jest": "^24.2.0", "tsconfig-paths-webpack-plugin": "^3.2.0", "webpack": "^4.35.3", + "webpack-bundle-analyzer": "^4.4.1", "webpack-cli": "^3.3.6", "webpack-dev-server": "^3.11.0", "webpack-manifest-plugin": "2.2.0", @@ -177,8 +179,7 @@ "workbox-precaching": "^6.1.2", "workbox-routing": "^6.1.2", "workbox-strategies": "^6.1.2", - "workbox-webpack-plugin": "^6.1.2", - "register-service-worker": "^1.7.2" + "workbox-webpack-plugin": "^6.1.2" }, "optionalDependencies": { "fsevents": "^1.2.9" @@ -204,8 +205,7 @@ "@assets(.*)$": "/assets/$1", "@locale(.*)$": "/locale/$1", "@saleor(?!.*macaw)(.*)$": "/src/$1", - "@test/(.*)$": "/testUtils/$1", - "^lodash-es(.*)$": "lodash/$1" + "@test/(.*)$": "/testUtils/$1" } }, "husky": { diff --git a/src/Baseline.tsx b/src/Baseline.tsx index 7e4ca21857a..72b6b882d01 100644 --- a/src/Baseline.tsx +++ b/src/Baseline.tsx @@ -1,4 +1,4 @@ -import CssBaseline from "@material-ui/core/CssBaseline"; +import { CssBaseline } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import { createStyles, SaleorTheme, withStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/apps/components/AppActivateDialog/AppActivateDialog.tsx b/src/apps/components/AppActivateDialog/AppActivateDialog.tsx index b4f6d2d1c5a..cc5bbaa4abd 100644 --- a/src/apps/components/AppActivateDialog/AppActivateDialog.tsx +++ b/src/apps/components/AppActivateDialog/AppActivateDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx b/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx index a7228d97940..c8805c0aa98 100644 --- a/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx +++ b/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx b/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx index fa57083683c..49cb7329698 100644 --- a/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx +++ b/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx index a01299701da..756e5d346b4 100644 --- a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx +++ b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx index 86672606e89..2ccf98d73c2 100644 --- a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx +++ b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; diff --git a/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx b/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx index 272a4fac84f..0712d6e2518 100644 --- a/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx +++ b/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx index ef26b4f0a39..f72020e21ed 100644 --- a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx +++ b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx @@ -1,7 +1,5 @@ import errorImg from "@assets/images/app-install-error.svg"; -import Button from "@material-ui/core/Button"; -import Grid from "@material-ui/core/Grid"; -import Typography from "@material-ui/core/Typography"; +import { Button, Grid, Typography } from "@material-ui/core"; import Container from "@saleor/components/Container"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/apps/components/AppInstallPage/AppInstallPage.tsx b/src/apps/components/AppInstallPage/AppInstallPage.tsx index b6ca74f8009..241ee433a6a 100644 --- a/src/apps/components/AppInstallPage/AppInstallPage.tsx +++ b/src/apps/components/AppInstallPage/AppInstallPage.tsx @@ -1,10 +1,6 @@ import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg"; import plusIcon from "@assets/images/plus-icon.svg"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Grid from "@material-ui/core/Grid"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Grid, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; diff --git a/src/apps/components/AppsInProgress/AppsInProgress.tsx b/src/apps/components/AppsInProgress/AppsInProgress.tsx index 0d1ed27dfe3..a6baf331d09 100644 --- a/src/apps/components/AppsInProgress/AppsInProgress.tsx +++ b/src/apps/components/AppsInProgress/AppsInProgress.tsx @@ -1,11 +1,13 @@ -import Button from "@material-ui/core/Button"; -import Progress from "@material-ui/core/CircularProgress"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Tooltip from "@material-ui/core/Tooltip"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + CircularProgress as Progress, + IconButton, + TableBody, + TableCell, + TableRow, + Tooltip, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ErrorIcon from "@material-ui/icons/Error"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/apps/components/AppsSkeleton/AppsSkeleton.tsx b/src/apps/components/AppsSkeleton/AppsSkeleton.tsx index 21fdb5ba264..9f8ee65669e 100644 --- a/src/apps/components/AppsSkeleton/AppsSkeleton.tsx +++ b/src/apps/components/AppsSkeleton/AppsSkeleton.tsx @@ -1,5 +1,4 @@ -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; +import { TableCell, TableRow } from "@material-ui/core"; import Skeleton from "@saleor/components/Skeleton"; import React from "react"; diff --git a/src/apps/components/CardContainer/CardContainer.tsx b/src/apps/components/CardContainer/CardContainer.tsx index 81444808efe..f0e815e2d45 100644 --- a/src/apps/components/CardContainer/CardContainer.tsx +++ b/src/apps/components/CardContainer/CardContainer.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import React from "react"; diff --git a/src/apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx b/src/apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx index 38b7433fdd7..ab12bfad136 100644 --- a/src/apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx +++ b/src/apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import Paper from "@material-ui/core/Paper"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + IconButton, + Paper, + Typography +} from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import Link from "@saleor/components/Link"; import useClipboard from "@saleor/hooks/useClipboard"; diff --git a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx index 3f03dc2a86f..10c2f591a1f 100644 --- a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx +++ b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import AccountPermissions from "@saleor/components/AccountPermissions"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; diff --git a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx index dc4e84603ff..44380ce06b4 100644 --- a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx +++ b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; diff --git a/src/apps/components/CustomAppTokens/CustomAppTokens.tsx b/src/apps/components/CustomAppTokens/CustomAppTokens.tsx index 9f96dcfc0c5..78261201885 100644 --- a/src/apps/components/CustomAppTokens/CustomAppTokens.tsx +++ b/src/apps/components/CustomAppTokens/CustomAppTokens.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/apps/components/CustomApps/CustomApps.tsx b/src/apps/components/CustomApps/CustomApps.tsx index cb564600fe6..4215004b0d9 100644 --- a/src/apps/components/CustomApps/CustomApps.tsx +++ b/src/apps/components/CustomApps/CustomApps.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import CardHeader from "@material-ui/core/CardHeader"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + CardHeader, + IconButton, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { commonMessages } from "@saleor/intl"; import { renderCollection, stopPropagation } from "@saleor/misc"; diff --git a/src/apps/components/DeactivatedText/DeactivatedText.tsx b/src/apps/components/DeactivatedText/DeactivatedText.tsx index 4327fb911f5..04a7bd2204b 100644 --- a/src/apps/components/DeactivatedText/DeactivatedText.tsx +++ b/src/apps/components/DeactivatedText/DeactivatedText.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/apps/components/HorizontalSpacer/HorizontalSpacer.tsx b/src/apps/components/HorizontalSpacer/HorizontalSpacer.tsx index ae844663f80..ee7da1f6a95 100644 --- a/src/apps/components/HorizontalSpacer/HorizontalSpacer.tsx +++ b/src/apps/components/HorizontalSpacer/HorizontalSpacer.tsx @@ -1,4 +1,4 @@ -import { makeStyles } from "@material-ui/core"; +import { makeStyles } from "@saleor/theme"; import React from "react"; export interface HorizontalSpacerProps { diff --git a/src/apps/components/InstalledApps/InstalledApps.tsx b/src/apps/components/InstalledApps/InstalledApps.tsx index 8c307cbf17e..0df7afaa7df 100644 --- a/src/apps/components/InstalledApps/InstalledApps.tsx +++ b/src/apps/components/InstalledApps/InstalledApps.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import TablePagination from "@saleor/components/TablePagination"; diff --git a/src/apps/components/Marketplace/Marketplace.tsx b/src/apps/components/Marketplace/Marketplace.tsx index 7ad75851d2b..55e9afb81c9 100644 --- a/src/apps/components/Marketplace/Marketplace.tsx +++ b/src/apps/components/Marketplace/Marketplace.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx b/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx index f7a571eed0d..eeac95d183e 100644 --- a/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx +++ b/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx @@ -1,11 +1,13 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import Paper from "@material-ui/core/Paper"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Paper, + TextField, + Typography +} from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx b/src/apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx index 422b2f759b2..fe49227e20b 100644 --- a/src/apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx +++ b/src/apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx index 480dfeda496..8aabc897b91 100644 --- a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx +++ b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx index 4ab30c283e1..9369e3c8aa2 100644 --- a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx +++ b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/attributes/components/AttributeDetails/AttributeDetails.tsx b/src/attributes/components/AttributeDetails/AttributeDetails.tsx index 9ff1a46c491..59685c5207b 100644 --- a/src/attributes/components/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/components/AttributeDetails/AttributeDetails.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import { NumericUnits } from "@saleor/attributes/components/AttributeDetails/NumericUnits"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; diff --git a/src/attributes/components/AttributeList/AttributeList.tsx b/src/attributes/components/AttributeList/AttributeList.tsx index cf0b255ab4e..a456f263f30 100644 --- a/src/attributes/components/AttributeList/AttributeList.tsx +++ b/src/attributes/components/AttributeList/AttributeList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/attributes/components/AttributeListPage/AttributeListPage.tsx b/src/attributes/components/AttributeListPage/AttributeListPage.tsx index 4bcbe0051a5..09b588644dc 100644 --- a/src/attributes/components/AttributeListPage/AttributeListPage.tsx +++ b/src/attributes/components/AttributeListPage/AttributeListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import AppHeader from "@saleor/components/AppHeader"; import FilterBar from "@saleor/components/FilterBar"; diff --git a/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx b/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx index 476abeec407..b66d1db6b11 100644 --- a/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx +++ b/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx @@ -1,9 +1,7 @@ -import { makeStyles } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField from "@saleor/components/RadioGroupField"; +import { makeStyles } from "@saleor/theme"; import { AttributeTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; diff --git a/src/attributes/components/AttributeProperties/AttributeProperties.tsx b/src/attributes/components/AttributeProperties/AttributeProperties.tsx index 41004ba4b42..1bd98386a11 100644 --- a/src/attributes/components/AttributeProperties/AttributeProperties.tsx +++ b/src/attributes/components/AttributeProperties/AttributeProperties.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import { ATTRIBUTE_TYPES_WITH_DEDICATED_VALUES } from "@saleor/attributes/utils/data"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx index 7554862d6ff..7d07edd4d78 100644 --- a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx +++ b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx index e39d03ad32f..29bf64e1890 100644 --- a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx +++ b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import { getAttributeValueErrorMessage } from "@saleor/attributes/errors"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/attributes/components/AttributeValues/AttributeValues.tsx b/src/attributes/components/AttributeValues/AttributeValues.tsx index b6eb1f0711c..1e369da3251 100644 --- a/src/attributes/components/AttributeValues/AttributeValues.tsx +++ b/src/attributes/components/AttributeValues/AttributeValues.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/attributes/views/AttributeList/AttributeList.tsx b/src/attributes/views/AttributeList/AttributeList.tsx index 2013b15338c..b3aa785ba37 100644 --- a/src/attributes/views/AttributeList/AttributeList.tsx +++ b/src/attributes/views/AttributeList/AttributeList.tsx @@ -1,4 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { areFiltersApplied, diff --git a/src/auth/components/LoginLoading/LoginLoading.tsx b/src/auth/components/LoginLoading/LoginLoading.tsx index b30e04e1857..3b3bf365bd8 100644 --- a/src/auth/components/LoginLoading/LoginLoading.tsx +++ b/src/auth/components/LoginLoading/LoginLoading.tsx @@ -1,4 +1,4 @@ -import CircularProgress from "@material-ui/core/CircularProgress"; +import { CircularProgress } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/auth/components/LoginPage/LoginPage.stories.tsx b/src/auth/components/LoginPage/LoginPage.stories.tsx index a1d05ccdb1d..b9151e0adb5 100644 --- a/src/auth/components/LoginPage/LoginPage.stories.tsx +++ b/src/auth/components/LoginPage/LoginPage.stories.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import CardDecorator from "@saleor/storybook/CardDecorator"; import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index 17960d3176b..ffd9aba72d8 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Divider from "@material-ui/core/Divider"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + CircularProgress, + Divider, + TextField, + Typography +} from "@material-ui/core"; import { AvailableExternalAuthentications_shop_availableExternalAuthentications } from "@saleor/auth/types/AvailableExternalAuthentications"; import { FormSpacer } from "@saleor/components/FormSpacer"; import { SubmitPromise } from "@saleor/hooks/useForm"; diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx index f11b70d2428..3e1fbe65ca4 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx @@ -1,6 +1,4 @@ -import Button from "@material-ui/core/Button"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Button, TextField, Typography } from "@material-ui/core"; import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx index 4d9252ca73c..45f23557f63 100644 --- a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx +++ b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx @@ -1,6 +1,4 @@ -import Button from "@material-ui/core/Button"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Button, TextField, Typography } from "@material-ui/core"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import { commonMessages } from "@saleor/intl"; diff --git a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx index b49ae56f264..ed40cdc7508 100644 --- a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx +++ b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import FormSpacer from "@saleor/components/FormSpacer"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/categories/components/CategoryBackground/CategoryBackground.tsx b/src/categories/components/CategoryBackground/CategoryBackground.tsx index e9a4b66cdb1..12a53fec007 100644 --- a/src/categories/components/CategoryBackground/CategoryBackground.tsx +++ b/src/categories/components/CategoryBackground/CategoryBackground.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Button, Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import ImageUpload from "@saleor/components/ImageUpload"; diff --git a/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx b/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx index 43618a50849..162f70ae7b0 100644 --- a/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx +++ b/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx index 03742653905..07263b05a67 100644 --- a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx +++ b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx @@ -1,7 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { diff --git a/src/categories/components/CategoryList/CategoryList.tsx b/src/categories/components/CategoryList/CategoryList.tsx index 98ab1047544..e4fe80f32eb 100644 --- a/src/categories/components/CategoryList/CategoryList.tsx +++ b/src/categories/components/CategoryList/CategoryList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import { CategoryListUrlSortField } from "@saleor/categories/urls"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/categories/components/CategoryListPage/CategoryListPage.tsx b/src/categories/components/CategoryListPage/CategoryListPage.tsx index 877e57ce9e9..c06474fce91 100644 --- a/src/categories/components/CategoryListPage/CategoryListPage.tsx +++ b/src/categories/components/CategoryListPage/CategoryListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import { CategoryListUrlSortField } from "@saleor/categories/urls"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 3eff4ada740..223908f3417 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; import Checkbox from "@saleor/components/Checkbox"; import MoneyRange from "@saleor/components/MoneyRange"; diff --git a/src/categories/components/CategoryProducts/CategoryProducts.tsx b/src/categories/components/CategoryProducts/CategoryProducts.tsx index 4c309cc137a..807655b5b64 100644 --- a/src/categories/components/CategoryProducts/CategoryProducts.tsx +++ b/src/categories/components/CategoryProducts/CategoryProducts.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import React from "react"; diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index 9d6ac397922..66f6b5d14b0 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index c182126ac86..b413a056e24 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/categories/views/CategoryList/CategoryList.tsx b/src/categories/views/CategoryList/CategoryList.tsx index 1127fc601b7..3c9d9193417 100644 --- a/src/categories/views/CategoryList/CategoryList.tsx +++ b/src/categories/views/CategoryList/CategoryList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; diff --git a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx index 31d82aa7fed..9bbc25a4605 100644 --- a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx +++ b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx @@ -1,7 +1,6 @@ import { ExpansionPanel, ExpansionPanelSummary, - makeStyles, Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; @@ -12,6 +11,7 @@ import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; import { areAllChannelVariantsSelected } from "@saleor/products/views/ProductUpdate/utils"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { useIntl } from "react-intl"; import { defineMessages } from "react-intl"; diff --git a/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx b/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx index 87e9ad9ae7c..c457650d183 100644 --- a/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx +++ b/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { diff --git a/src/channels/components/ChannelForm/ChannelForm.tsx b/src/channels/components/ChannelForm/ChannelForm.tsx index 81014378d08..31ee8ca2a8c 100644 --- a/src/channels/components/ChannelForm/ChannelForm.tsx +++ b/src/channels/components/ChannelForm/ChannelForm.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import InputAdornment from "@material-ui/core/InputAdornment"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + InputAdornment, + TextField, + Typography +} from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/channels/components/ChannelStatus/ChannelStatus.tsx b/src/channels/components/ChannelStatus/ChannelStatus.tsx index b2b5cc7ac18..8ea37c62989 100644 --- a/src/channels/components/ChannelStatus/ChannelStatus.tsx +++ b/src/channels/components/ChannelStatus/ChannelStatus.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx index b8fdf427bb0..916d3b64623 100644 --- a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx +++ b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx @@ -3,7 +3,6 @@ import { Divider, ExpansionPanel, ExpansionPanelSummary, - makeStyles, Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; @@ -15,7 +14,8 @@ import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; import { areAllChannelVariantsSelected } from "@saleor/products/views/ProductUpdate/utils"; -import map from "lodash-es/map"; +import { makeStyles } from "@saleor/theme"; +import map from "lodash/map"; import React, { ChangeEvent } from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/channels/components/ShippingZonesCard/ShippingZonesCard.tsx b/src/channels/components/ShippingZonesCard/ShippingZonesCard.tsx index d962c001398..bbd3d73fb33 100644 --- a/src/channels/components/ShippingZonesCard/ShippingZonesCard.tsx +++ b/src/channels/components/ShippingZonesCard/ShippingZonesCard.tsx @@ -2,11 +2,11 @@ import { Card, CardContent, Divider, - makeStyles, + ExpansionPanel, Typography } from "@material-ui/core"; -import ExpansionPanel from "@material-ui/core/ExpansionPanel"; import CardTitle from "@saleor/components/CardTitle"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/channels/components/ShippingZonesCard/ShippingZonesListHeader.tsx b/src/channels/components/ShippingZonesCard/ShippingZonesListHeader.tsx index 2de342674bc..03c70145902 100644 --- a/src/channels/components/ShippingZonesCard/ShippingZonesListHeader.tsx +++ b/src/channels/components/ShippingZonesCard/ShippingZonesListHeader.tsx @@ -1,8 +1,8 @@ import { ExpansionPanelSummary, Typography } from "@material-ui/core"; -import { makeStyles } from "@material-ui/core/styles"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import { ChannelShippingZones } from "@saleor/channels/pages/ChannelDetailsPage/types"; import IconChevronDown from "@saleor/icons/ChevronDown"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/channels/pages/ChannelDetailsPage/utils.ts b/src/channels/pages/ChannelDetailsPage/utils.ts index af220502c8f..90cc92ccb32 100644 --- a/src/channels/pages/ChannelDetailsPage/utils.ts +++ b/src/channels/pages/ChannelDetailsPage/utils.ts @@ -1,4 +1,4 @@ -import uniq from "lodash-es/uniq"; +import uniq from "lodash/uniq"; export const getUpdatedIdsWithNewId = (ids: string[], newId: string) => uniq([...ids, newId]); diff --git a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx index f23b0db1917..47af2ed02ce 100644 --- a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx +++ b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import Alert from "@saleor/components/Alert/Alert"; import AppHeader from "@saleor/components/AppHeader"; diff --git a/src/channels/utils.ts b/src/channels/utils.ts index 930d51d7b0a..598378e7258 100644 --- a/src/channels/utils.ts +++ b/src/channels/utils.ts @@ -13,7 +13,7 @@ import { ShippingZone_shippingZone_shippingMethods_channelListings } from "@saleor/shipping/types/ShippingZone"; import { mapNodeToChoice } from "@saleor/utils/maps"; -import uniqBy from "lodash-es/uniqBy"; +import uniqBy from "lodash/uniqBy"; export interface Channel { id: string; diff --git a/src/collections/components/CollectionDetails/CollectionDetails.tsx b/src/collections/components/CollectionDetails/CollectionDetails.tsx index c52bd4c26ce..248e866300e 100644 --- a/src/collections/components/CollectionDetails/CollectionDetails.tsx +++ b/src/collections/components/CollectionDetails/CollectionDetails.tsx @@ -1,7 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { diff --git a/src/collections/components/CollectionImage/CollectionImage.tsx b/src/collections/components/CollectionImage/CollectionImage.tsx index 251320f5254..e7ecef40ae0 100644 --- a/src/collections/components/CollectionImage/CollectionImage.tsx +++ b/src/collections/components/CollectionImage/CollectionImage.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Button, Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import ImageUpload from "@saleor/components/ImageUpload"; diff --git a/src/collections/components/CollectionList/CollectionList.tsx b/src/collections/components/CollectionList/CollectionList.tsx index ccb7a43d29e..9c4435fd1fa 100644 --- a/src/collections/components/CollectionList/CollectionList.tsx +++ b/src/collections/components/CollectionList/CollectionList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import { CollectionListUrlSortField } from "@saleor/collections/urls"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/collections/components/CollectionListPage/CollectionListPage.tsx b/src/collections/components/CollectionListPage/CollectionListPage.tsx index ddb5d1e78ca..6a8a8d0cc7a 100644 --- a/src/collections/components/CollectionListPage/CollectionListPage.tsx +++ b/src/collections/components/CollectionListPage/CollectionListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import { CollectionListUrlSortField } from "@saleor/collections/urls"; import { Container } from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/collections/components/CollectionProducts/CollectionProducts.tsx b/src/collections/components/CollectionProducts/CollectionProducts.tsx index 0d09ad1e041..d6e05dbc726 100644 --- a/src/collections/components/CollectionProducts/CollectionProducts.tsx +++ b/src/collections/components/CollectionProducts/CollectionProducts.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; diff --git a/src/collections/views/CollectionDetails.tsx b/src/collections/views/CollectionDetails.tsx index b6bf931dc27..8d73051652c 100644 --- a/src/collections/views/CollectionDetails.tsx +++ b/src/collections/views/CollectionDetails.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogContentText from "@material-ui/core/DialogContentText"; +import { Button, DialogContentText } from "@material-ui/core"; import { useChannelsList } from "@saleor/channels/queries"; import { createCollectionChannels, diff --git a/src/collections/views/CollectionList/CollectionList.tsx b/src/collections/views/CollectionList/CollectionList.tsx index 829a1ba208d..baead773466 100644 --- a/src/collections/views/CollectionList/CollectionList.tsx +++ b/src/collections/views/CollectionList/CollectionList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/components/Accordion/Accordion.tsx b/src/components/Accordion/Accordion.tsx index da770eecad4..15247369593 100644 --- a/src/components/Accordion/Accordion.tsx +++ b/src/components/Accordion/Accordion.tsx @@ -1,5 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; -import Typography from "@material-ui/core/Typography"; +import { IconButton, Typography } from "@material-ui/core"; import AddIcon from "@material-ui/icons/Add"; import RemoveIcon from "@material-ui/icons/Remove"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx index c3aa9c813b1..269915e0141 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; diff --git a/src/components/AccountPermissions/AccountPermissions.tsx b/src/components/AccountPermissions/AccountPermissions.tsx index 6e66585cee2..348f4977285 100644 --- a/src/components/AccountPermissions/AccountPermissions.tsx +++ b/src/components/AccountPermissions/AccountPermissions.tsx @@ -1,13 +1,13 @@ import { + Card, + CardContent, Checkbox, List, ListItem, ListItemIcon, - ListItemText + ListItemText, + Typography } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; import useUser from "@saleor/hooks/useUser"; diff --git a/src/components/ActionDialog/ActionDialog.tsx b/src/components/ActionDialog/ActionDialog.tsx index d59808d39db..fadd4c5d167 100644 --- a/src/components/ActionDialog/ActionDialog.tsx +++ b/src/components/ActionDialog/ActionDialog.tsx @@ -1,6 +1,4 @@ -import Dialog from "@material-ui/core/Dialog"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { Dialog, DialogContent, DialogTitle } from "@material-ui/core"; import { DialogProps } from "@saleor/types"; import React from "react"; diff --git a/src/components/ActionDialog/DialogButtons.tsx b/src/components/ActionDialog/DialogButtons.tsx index 0ee24641212..ddf73354f11 100644 --- a/src/components/ActionDialog/DialogButtons.tsx +++ b/src/components/ActionDialog/DialogButtons.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogActions from "@material-ui/core/DialogActions"; +import { Button, DialogActions } from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/AddressEdit/AddressEdit.tsx b/src/components/AddressEdit/AddressEdit.tsx index 1ea464d1d0a..427a47b1294 100644 --- a/src/components/AddressEdit/AddressEdit.tsx +++ b/src/components/AddressEdit/AddressEdit.tsx @@ -1,4 +1,4 @@ -import TextField from "@material-ui/core/TextField"; +import { TextField } from "@material-ui/core"; import { AddressTypeInput } from "@saleor/customers/types"; import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; diff --git a/src/components/AddressFormatter/AddressFormatter.tsx b/src/components/AddressFormatter/AddressFormatter.tsx index 86db5e22622..5e340e7e884 100644 --- a/src/components/AddressFormatter/AddressFormatter.tsx +++ b/src/components/AddressFormatter/AddressFormatter.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import React from "react"; import { AddressType } from "../../customers/types"; diff --git a/src/components/Alert/Alert.tsx b/src/components/Alert/Alert.tsx index 88d30c3ae83..f4dd2ce8f07 100644 --- a/src/components/Alert/Alert.tsx +++ b/src/components/Alert/Alert.tsx @@ -1,9 +1,6 @@ import alertIconDark from "@assets/images/alert-dark.svg"; import alertIcon from "@assets/images/alert.svg"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, IconButton, Typography } from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import useTheme from "@saleor/hooks/useTheme"; diff --git a/src/components/Alert/InlineAlert.tsx b/src/components/Alert/InlineAlert.tsx index 05b60d8d59c..a1deed47e70 100644 --- a/src/components/Alert/InlineAlert.tsx +++ b/src/components/Alert/InlineAlert.tsx @@ -1,4 +1,4 @@ -import Card from "@material-ui/core/Card"; +import { Card } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/AppHeader/AppHeader.tsx b/src/components/AppHeader/AppHeader.tsx index 37271f29127..bb890ffd434 100644 --- a/src/components/AppHeader/AppHeader.tsx +++ b/src/components/AppHeader/AppHeader.tsx @@ -1,5 +1,4 @@ -import Portal from "@material-ui/core/Portal"; -import Typography from "@material-ui/core/Typography"; +import { Portal, Typography } from "@material-ui/core"; import ArrowBackIcon from "@material-ui/icons/ArrowBack"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/AppLayout/AppLayout.tsx b/src/components/AppLayout/AppLayout.tsx index ea1495d655c..7a97176372f 100644 --- a/src/components/AppLayout/AppLayout.tsx +++ b/src/components/AppLayout/AppLayout.tsx @@ -1,5 +1,4 @@ -import LinearProgress from "@material-ui/core/LinearProgress"; -import useMediaQuery from "@material-ui/core/useMediaQuery"; +import { LinearProgress, useMediaQuery } from "@material-ui/core"; import { createConfigurationMenu } from "@saleor/configuration"; import useAppState from "@saleor/hooks/useAppState"; import useNavigator from "@saleor/hooks/useNavigator"; diff --git a/src/components/AppLayout/MenuList.tsx b/src/components/AppLayout/MenuList.tsx index 6ded8bc72eb..793e34451ce 100644 --- a/src/components/AppLayout/MenuList.tsx +++ b/src/components/AppLayout/MenuList.tsx @@ -1,5 +1,5 @@ import configureIcon from "@assets/images/menu-configure-icon.svg"; -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { User } from "@saleor/fragments/types/User"; import useTheme from "@saleor/hooks/useTheme"; import { sectionNames } from "@saleor/intl"; diff --git a/src/components/AppLayout/MenuNested.tsx b/src/components/AppLayout/MenuNested.tsx index 26f88d3dbee..d74434ee034 100644 --- a/src/components/AppLayout/MenuNested.tsx +++ b/src/components/AppLayout/MenuNested.tsx @@ -1,6 +1,5 @@ import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; -import Hidden from "@material-ui/core/Hidden"; -import Typography from "@material-ui/core/Typography"; +import { Hidden, Typography } from "@material-ui/core"; import useTheme from "@saleor/hooks/useTheme"; import { createHref } from "@saleor/misc"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/AppStatus/AppStatus.tsx b/src/components/AppStatus/AppStatus.tsx index 9e989a9a273..d2cf31769c7 100644 --- a/src/components/AppStatus/AppStatus.tsx +++ b/src/components/AppStatus/AppStatus.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import React from "react"; diff --git a/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx b/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx index b511bb5e0a3..be592339b39 100644 --- a/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx +++ b/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx @@ -1,15 +1,17 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/components/AssignContainerDialog/AssignContainerDialog.tsx b/src/components/AssignContainerDialog/AssignContainerDialog.tsx index 474d0f06cec..bb864663590 100644 --- a/src/components/AssignContainerDialog/AssignContainerDialog.tsx +++ b/src/components/AssignContainerDialog/AssignContainerDialog.tsx @@ -1,13 +1,15 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; diff --git a/src/components/AssignProductDialog/AssignProductDialog.tsx b/src/components/AssignProductDialog/AssignProductDialog.tsx index e51ae5ecfd1..05f77db4100 100644 --- a/src/components/AssignProductDialog/AssignProductDialog.tsx +++ b/src/components/AssignProductDialog/AssignProductDialog.tsx @@ -1,13 +1,15 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx b/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx index 1d552fe295e..ca4ed6844b3 100644 --- a/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx +++ b/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/components/Attributes/Attributes.tsx b/src/components/Attributes/Attributes.tsx index f2bab1ede51..3af15082b70 100644 --- a/src/components/Attributes/Attributes.tsx +++ b/src/components/Attributes/Attributes.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, IconButton, Typography } from "@material-ui/core"; import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import { AttributeReference } from "@saleor/attributes/utils/data"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/components/Attributes/BasicAttributeRow.tsx b/src/components/Attributes/BasicAttributeRow.tsx index 9a5c4efb8f2..08d3a8deb85 100644 --- a/src/components/Attributes/BasicAttributeRow.tsx +++ b/src/components/Attributes/BasicAttributeRow.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import Grid from "@saleor/components/Grid"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/Attributes/ExtendedAttributeRow.tsx b/src/components/Attributes/ExtendedAttributeRow.tsx index 531a59c0cbe..56ec065bb8f 100644 --- a/src/components/Attributes/ExtendedAttributeRow.tsx +++ b/src/components/Attributes/ExtendedAttributeRow.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import Grid from "@saleor/components/Grid"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx b/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx index 5f0f86c3384..24d3dbb8cc3 100644 --- a/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx +++ b/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx @@ -1,7 +1,9 @@ -import CircularProgress from "@material-ui/core/CircularProgress"; -import MenuItem from "@material-ui/core/MenuItem"; -import Paper from "@material-ui/core/Paper"; -import TextField from "@material-ui/core/TextField"; +import { + CircularProgress, + MenuItem, + Paper, + TextField +} from "@material-ui/core"; import ArrowBack from "@material-ui/icons/ArrowBack"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx b/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx index 18da355b702..009233ece90 100644 --- a/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx +++ b/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/components/CardMenu/CardMenu.tsx b/src/components/CardMenu/CardMenu.tsx index 6aa33e671d9..7376db274d2 100644 --- a/src/components/CardMenu/CardMenu.tsx +++ b/src/components/CardMenu/CardMenu.tsx @@ -1,10 +1,12 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import IconButton from "@material-ui/core/IconButton"; -import MenuItem from "@material-ui/core/MenuItem"; -import MenuList from "@material-ui/core/MenuList"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { + ClickAwayListener, + Grow, + IconButton, + MenuItem, + MenuList, + Paper, + Popper +} from "@material-ui/core"; import MoreVertIcon from "@material-ui/icons/MoreVert"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/CardTitle/CardTitle.tsx b/src/components/CardTitle/CardTitle.tsx index 63e9ea7d0a4..91d4fd6a8ff 100644 --- a/src/components/CardTitle/CardTitle.tsx +++ b/src/components/CardTitle/CardTitle.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx index b6903368e2b..69d8d24e74e 100644 --- a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx +++ b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx @@ -1,5 +1,4 @@ -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { TextField, Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; diff --git a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx index 7d6150611ec..a26cf5792cc 100644 --- a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx +++ b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx @@ -1,11 +1,11 @@ import { ExpansionPanel, ExpansionPanelSummary, - makeStyles + Typography } from "@material-ui/core"; -import Typography from "@material-ui/core/Typography"; import { ChannelData } from "@saleor/channels/utils"; import IconChevronDown from "@saleor/icons/ChevronDown"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { Messages } from "../types"; diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx index 86e00f9fad0..cd5331279e0 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { Channel as ChannelList, ChannelData } from "@saleor/channels/utils"; import Hr from "@saleor/components/Hr"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx index fdd84e41003..006a13a6bc2 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import RequirePermissions from "@saleor/components/RequirePermissions"; diff --git a/src/components/ChannelsAvailabilityContent/ChannelsAvailabilityContent.tsx b/src/components/ChannelsAvailabilityContent/ChannelsAvailabilityContent.tsx index 8e799215fa2..799206ca5fc 100644 --- a/src/components/ChannelsAvailabilityContent/ChannelsAvailabilityContent.tsx +++ b/src/components/ChannelsAvailabilityContent/ChannelsAvailabilityContent.tsx @@ -1,5 +1,4 @@ -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { TextField, Typography } from "@material-ui/core"; import { Channel } from "@saleor/channels/utils"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; diff --git a/src/components/ChannelsAvailabilityDialogChannelsList/ChannelsAvailabilityDialogChannelsList.tsx b/src/components/ChannelsAvailabilityDialogChannelsList/ChannelsAvailabilityDialogChannelsList.tsx index b2925177b94..5b29f4697bd 100644 --- a/src/components/ChannelsAvailabilityDialogChannelsList/ChannelsAvailabilityDialogChannelsList.tsx +++ b/src/components/ChannelsAvailabilityDialogChannelsList/ChannelsAvailabilityDialogChannelsList.tsx @@ -1,8 +1,8 @@ -import { makeStyles } from "@material-ui/core"; -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { Channel } from "@saleor/channels/utils"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; +import { makeStyles } from "@saleor/theme"; import React from "react"; export const useStyles = makeStyles( diff --git a/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx b/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx index faa118841e0..200f1c46866 100644 --- a/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx +++ b/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx @@ -1,9 +1,8 @@ -import { makeStyles } from "@material-ui/core"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { TextField, Typography } from "@material-ui/core"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; import Label from "@saleor/orders/components/OrderHistory/Label"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { useIntl } from "react-intl"; import { defineMessages, FormattedMessage } from "react-intl"; diff --git a/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx b/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx index 2f47908bbd4..ce7e44e6436 100644 --- a/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx +++ b/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx @@ -1,6 +1,4 @@ -import Menu from "@material-ui/core/Menu"; -import MenuItem from "@material-ui/core/MenuItem"; -import Typography from "@material-ui/core/Typography"; +import { Menu, MenuItem, Typography } from "@material-ui/core"; import { CollectionList_collections_edges_node_channelListings } from "@saleor/collections/types/CollectionList"; import Hr from "@saleor/components/Hr"; import StatusLabel from "@saleor/components/StatusLabel"; diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx index 772800f6b6d..2761bcb7ffb 100644 --- a/src/components/Checkbox/Checkbox.tsx +++ b/src/components/Checkbox/Checkbox.tsx @@ -1,6 +1,5 @@ -import MuiCheckbox, { - CheckboxProps as MuiCheckboxProps -} from "@material-ui/core/Checkbox"; +import { Checkbox as MuiCheckbox } from "@material-ui/core"; +import { CheckboxProps as MuiCheckboxProps } from "@material-ui/core/Checkbox"; import React from "react"; export type CheckboxProps = Omit< diff --git a/src/components/Chip/Chip.tsx b/src/components/Chip/Chip.tsx index c90ec80cebb..b6f4760df42 100644 --- a/src/components/Chip/Chip.tsx +++ b/src/components/Chip/Chip.tsx @@ -1,5 +1,5 @@ +import { Typography } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Typography from "@material-ui/core/Typography"; import CloseIcon from "@material-ui/icons/Close"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/CollectionWithDividers/CollectionWithDividers.tsx b/src/components/CollectionWithDividers/CollectionWithDividers.tsx index 3f1fbb9f368..2e4d0966264 100644 --- a/src/components/CollectionWithDividers/CollectionWithDividers.tsx +++ b/src/components/CollectionWithDividers/CollectionWithDividers.tsx @@ -1,5 +1,5 @@ -import Divider from "@material-ui/core/Divider"; -import initial from "lodash-es/initial"; +import { Divider } from "@material-ui/core"; +import initial from "lodash/initial"; import React from "react"; interface CollectionWithDividersProps { diff --git a/src/components/ColumnPicker/ColumnPicker.tsx b/src/components/ColumnPicker/ColumnPicker.tsx index bb34ffa64cb..b1da45dc692 100644 --- a/src/components/ColumnPicker/ColumnPicker.tsx +++ b/src/components/ColumnPicker/ColumnPicker.tsx @@ -1,6 +1,4 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import Popper from "@material-ui/core/Popper"; +import { ClickAwayListener, Grow, Popper } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/ColumnPicker/ColumnPickerButton.tsx b/src/components/ColumnPicker/ColumnPickerButton.tsx index a6c962b2ffd..1d6bba26d9b 100644 --- a/src/components/ColumnPicker/ColumnPickerButton.tsx +++ b/src/components/ColumnPicker/ColumnPickerButton.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/ColumnPicker/ColumnPickerContent.tsx b/src/components/ColumnPicker/ColumnPickerContent.tsx index 4f42c6b5001..d0e35d80501 100644 --- a/src/components/ColumnPicker/ColumnPickerContent.tsx +++ b/src/components/ColumnPicker/ColumnPickerContent.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + CircularProgress, + Typography +} from "@material-ui/core"; import useElementScroll from "@saleor/hooks/useElementScroll"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/CompanyAddressInput/CompanyAddressForm.tsx b/src/components/CompanyAddressInput/CompanyAddressForm.tsx index 0c24ec2e170..486c0e1d4c4 100644 --- a/src/components/CompanyAddressInput/CompanyAddressForm.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressForm.tsx @@ -1,4 +1,4 @@ -import TextField from "@material-ui/core/TextField"; +import { TextField } from "@material-ui/core"; import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import SingleAutocompleteSelectField, { diff --git a/src/components/CompanyAddressInput/CompanyAddressInput.tsx b/src/components/CompanyAddressInput/CompanyAddressInput.tsx index fecc511666f..e93b73f3359 100644 --- a/src/components/CompanyAddressInput/CompanyAddressInput.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressInput.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/ConfirmButton/ConfirmButton.tsx b/src/components/ConfirmButton/ConfirmButton.tsx index 99f13eef0e9..450f617c90f 100644 --- a/src/components/ConfirmButton/ConfirmButton.tsx +++ b/src/components/ConfirmButton/ConfirmButton.tsx @@ -1,5 +1,5 @@ -import Button, { ButtonProps } from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; +import { Button, CircularProgress } from "@material-ui/core"; +import { ButtonProps } from "@material-ui/core/Button"; import CheckIcon from "@material-ui/icons/Check"; import { DEFAULT_NOTIFICATION_SHOW_TIME } from "@saleor/config"; import { buttonMessages } from "@saleor/intl"; diff --git a/src/components/ControlledCheckbox.tsx b/src/components/ControlledCheckbox.tsx index 3d60f76f04e..081c203ff9c 100644 --- a/src/components/ControlledCheckbox.tsx +++ b/src/components/ControlledCheckbox.tsx @@ -1,5 +1,4 @@ -import Checkbox from "@material-ui/core/Checkbox"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; +import { Checkbox, FormControlLabel } from "@material-ui/core"; import React from "react"; interface ControlledCheckboxProps { diff --git a/src/components/ControlledSwitch.tsx b/src/components/ControlledSwitch.tsx index d38bcda2bf9..0f24b2e229b 100644 --- a/src/components/ControlledSwitch.tsx +++ b/src/components/ControlledSwitch.tsx @@ -1,6 +1,5 @@ -import { makeStyles } from "@material-ui/core"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Switch from "@material-ui/core/Switch"; +import { FormControlLabel, Switch } from "@material-ui/core"; +import { makeStyles } from "@saleor/theme"; import React from "react"; const useStyles = makeStyles( diff --git a/src/components/CountryList/CountryList.tsx b/src/components/CountryList/CountryList.tsx index eef523fe88f..2418f2bc9f2 100644 --- a/src/components/CountryList/CountryList.tsx +++ b/src/components/CountryList/CountryList.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + CardContent, + IconButton, + TableBody, + TableCell, + TableRow +} from "@material-ui/core"; import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/components/CreatorSteps/CreatorSteps.tsx b/src/components/CreatorSteps/CreatorSteps.tsx index a35e35b763f..7500cf25f83 100644 --- a/src/components/CreatorSteps/CreatorSteps.tsx +++ b/src/components/CreatorSteps/CreatorSteps.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/Date/Date.tsx b/src/components/Date/Date.tsx index 07e002f6bf8..0b799ee397f 100644 --- a/src/components/Date/Date.tsx +++ b/src/components/Date/Date.tsx @@ -1,4 +1,4 @@ -import Tooltip from "@material-ui/core/Tooltip"; +import { Tooltip } from "@material-ui/core"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import moment from "moment-timezone"; import React from "react"; diff --git a/src/components/Date/DateTime.tsx b/src/components/Date/DateTime.tsx index 3c08f044349..3e71f78e057 100644 --- a/src/components/Date/DateTime.tsx +++ b/src/components/Date/DateTime.tsx @@ -1,4 +1,4 @@ -import Tooltip from "@material-ui/core/Tooltip"; +import { Tooltip } from "@material-ui/core"; import moment from "moment-timezone"; import React from "react"; import ReactMoment from "react-moment"; diff --git a/src/components/DeleteButton/DeleteButton.tsx b/src/components/DeleteButton/DeleteButton.tsx index 196eac147ee..63789a37d96 100644 --- a/src/components/DeleteButton/DeleteButton.tsx +++ b/src/components/DeleteButton/DeleteButton.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx b/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx index c18663cba68..ed731f4ee4f 100644 --- a/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx +++ b/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/components/EditableTableCell/EditableTableCell.tsx b/src/components/EditableTableCell/EditableTableCell.tsx index 3a2206a8013..7c24d07c81e 100644 --- a/src/components/EditableTableCell/EditableTableCell.tsx +++ b/src/components/EditableTableCell/EditableTableCell.tsx @@ -1,8 +1,11 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableCell from "@material-ui/core/TableCell"; -import TextField, { TextFieldProps } from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableCell, + TextField, + Typography +} from "@material-ui/core"; +import { TextFieldProps } from "@material-ui/core/TextField"; import useForm from "@saleor/hooks/useForm"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/ErrorMessageCard/ErrorMessageCard.tsx b/src/components/ErrorMessageCard/ErrorMessageCard.tsx index 423976beaec..17040fcd267 100644 --- a/src/components/ErrorMessageCard/ErrorMessageCard.tsx +++ b/src/components/ErrorMessageCard/ErrorMessageCard.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; interface ErrorMessageCardProps { diff --git a/src/components/ErrorPage/ErrorPage.tsx b/src/components/ErrorPage/ErrorPage.tsx index cf0373516b6..e65d3832766 100644 --- a/src/components/ErrorPage/ErrorPage.tsx +++ b/src/components/ErrorPage/ErrorPage.tsx @@ -1,6 +1,5 @@ import notFoundImage from "@assets/images/what.svg"; -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; import SVG from "react-inlinesvg"; diff --git a/src/components/ExternalLink/ExternalLink.tsx b/src/components/ExternalLink/ExternalLink.tsx index f7322edbb82..ba32de58ef7 100644 --- a/src/components/ExternalLink/ExternalLink.tsx +++ b/src/components/ExternalLink/ExternalLink.tsx @@ -1,4 +1,5 @@ -import Typography, { TypographyProps } from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; +import { TypographyProps } from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/FileUploadField/FileUploadField.tsx b/src/components/FileUploadField/FileUploadField.tsx index b807cf4001b..b7446df6b8a 100644 --- a/src/components/FileUploadField/FileUploadField.tsx +++ b/src/components/FileUploadField/FileUploadField.tsx @@ -1,10 +1,8 @@ -import { makeStyles } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import IconButton from "@material-ui/core/IconButton"; -import Typography from "@material-ui/core/Typography"; +import { Button, IconButton, Typography } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { FileFragment } from "@saleor/fragments/types/FileFragment"; import { commonMessages } from "@saleor/intl"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/components/Filter/Filter.tsx b/src/components/Filter/Filter.tsx index 78abbef0b94..288738fe109 100644 --- a/src/components/Filter/Filter.tsx +++ b/src/components/Filter/Filter.tsx @@ -1,9 +1,11 @@ -import ButtonBase from "@material-ui/core/ButtonBase"; -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import Popper from "@material-ui/core/Popper"; +import { + ButtonBase, + ClickAwayListener, + Grow, + Popper, + Typography +} from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Typography from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React, { useState } from "react"; diff --git a/src/components/Filter/FilterAutocompleteField.tsx b/src/components/Filter/FilterAutocompleteField.tsx index d756c6653b7..dfd87e3258c 100644 --- a/src/components/Filter/FilterAutocompleteField.tsx +++ b/src/components/Filter/FilterAutocompleteField.tsx @@ -1,6 +1,4 @@ -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { FormControlLabel, TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import { toggle } from "@saleor/utils/lists"; import React from "react"; diff --git a/src/components/Filter/FilterContent/FilterContent.tsx b/src/components/Filter/FilterContent/FilterContent.tsx index 3d587e4650e..7a467a7fa57 100644 --- a/src/components/Filter/FilterContent/FilterContent.tsx +++ b/src/components/Filter/FilterContent/FilterContent.tsx @@ -1,5 +1,4 @@ -import { Typography } from "@material-ui/core"; -import Paper from "@material-ui/core/Paper"; +import { Paper, Typography } from "@material-ui/core"; import CollectionWithDividers from "@saleor/components/CollectionWithDividers"; import Hr from "@saleor/components/Hr"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; diff --git a/src/components/Filter/FilterContent/FilterContentBody.tsx b/src/components/Filter/FilterContent/FilterContentBody.tsx index 651e86414cd..3372d29a970 100644 --- a/src/components/Filter/FilterContent/FilterContentBody.tsx +++ b/src/components/Filter/FilterContent/FilterContentBody.tsx @@ -1,13 +1,9 @@ -import { - fade, - FormControlLabel, - makeStyles, - Radio, - TextField -} from "@material-ui/core"; +import { FormControlLabel, Radio, TextField } from "@material-ui/core"; +import { fade } from "@material-ui/core/styles/colorManipulator"; import FormSpacer from "@saleor/components/FormSpacer"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import SingleSelectField from "@saleor/components/SingleSelectField"; +import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/components/Filter/FilterContent/FilterContentBodyNameField.tsx b/src/components/Filter/FilterContent/FilterContentBodyNameField.tsx index 6bd6849dec3..8f78d088776 100644 --- a/src/components/Filter/FilterContent/FilterContentBodyNameField.tsx +++ b/src/components/Filter/FilterContent/FilterContentBodyNameField.tsx @@ -1,4 +1,5 @@ -import { Checkbox, FormControlLabel, makeStyles } from "@material-ui/core"; +import { Checkbox, FormControlLabel } from "@material-ui/core"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FilterReducerAction } from "../reducer"; diff --git a/src/components/Filter/FilterContent/FilterContentHeader.tsx b/src/components/Filter/FilterContent/FilterContentHeader.tsx index 7b704ea9597..544acfbe9d3 100644 --- a/src/components/Filter/FilterContent/FilterContentHeader.tsx +++ b/src/components/Filter/FilterContent/FilterContentHeader.tsx @@ -1,5 +1,6 @@ -import { Button, makeStyles, Typography } from "@material-ui/core"; +import { Button, Typography } from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/components/Filter/FilterContent/FilterErrorsList.tsx b/src/components/Filter/FilterContent/FilterErrorsList.tsx index 1d8e575259d..07ef5415ead 100644 --- a/src/components/Filter/FilterContent/FilterErrorsList.tsx +++ b/src/components/Filter/FilterContent/FilterErrorsList.tsx @@ -1,5 +1,5 @@ +import { Typography } from "@material-ui/core"; import { fade, makeStyles } from "@material-ui/core/styles"; -import Typography from "@material-ui/core/Typography"; import InlineAlert from "@saleor/components/Alert/InlineAlert"; import { useStyles as useDotStyles } from "@saleor/components/StatusLabel"; import classNames from "classnames"; diff --git a/src/components/Filter/FilterOptionField.tsx b/src/components/Filter/FilterOptionField.tsx index bca691a73b7..3c39a06ced6 100644 --- a/src/components/Filter/FilterOptionField.tsx +++ b/src/components/Filter/FilterOptionField.tsx @@ -1,5 +1,4 @@ -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; +import { FormControlLabel, Radio } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import { toggle } from "@saleor/utils/lists"; import classNames from "classnames"; diff --git a/src/components/Filter/utils.ts b/src/components/Filter/utils.ts index 371fb3b7d92..739d52e9d4b 100644 --- a/src/components/Filter/utils.ts +++ b/src/components/Filter/utils.ts @@ -1,4 +1,4 @@ -import compact from "lodash-es/compact"; +import compact from "lodash/compact"; import { FieldType, IFilterElement } from "./types"; diff --git a/src/components/FilterBar/FilterBar.tsx b/src/components/FilterBar/FilterBar.tsx index 8405825c9ba..16d7c250bda 100644 --- a/src/components/FilterBar/FilterBar.tsx +++ b/src/components/FilterBar/FilterBar.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/components/FilterCard/FilterCard.tsx b/src/components/FilterCard/FilterCard.tsx index f4293f3a598..f8b85bcccb8 100644 --- a/src/components/FilterCard/FilterCard.tsx +++ b/src/components/FilterCard/FilterCard.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import CardHeader from "@material-ui/core/CardHeader"; -import IconButton from "@material-ui/core/IconButton"; +import { Card, CardContent, CardHeader, IconButton } from "@material-ui/core"; import RefreshIcon from "@material-ui/icons/Refresh"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/components/IconButtonTableCell/IconButtonTableCell.tsx b/src/components/IconButtonTableCell/IconButtonTableCell.tsx index 749e6d2fe1f..577223148fb 100644 --- a/src/components/IconButtonTableCell/IconButtonTableCell.tsx +++ b/src/components/IconButtonTableCell/IconButtonTableCell.tsx @@ -1,5 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; +import { IconButton, TableCell } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/ImageUpload/ImageUpload.tsx b/src/components/ImageUpload/ImageUpload.tsx index c5c7f2a03e5..fa7d1c00bb0 100644 --- a/src/components/ImageUpload/ImageUpload.tsx +++ b/src/components/ImageUpload/ImageUpload.tsx @@ -1,5 +1,5 @@ +import { Typography } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Typography from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/LanguageSwitch/LanguageSwitch.tsx b/src/components/LanguageSwitch/LanguageSwitch.tsx index 0c53b9ab175..26c853cb63e 100644 --- a/src/components/LanguageSwitch/LanguageSwitch.tsx +++ b/src/components/LanguageSwitch/LanguageSwitch.tsx @@ -1,11 +1,13 @@ -import Card from "@material-ui/core/Card"; -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/MenuList"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + ClickAwayListener, + Grow, + MenuItem, + MenuList as Menu, + Paper, + Popper, + Typography +} from "@material-ui/core"; import ArrowDropDown from "@material-ui/icons/ArrowDropDown"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 7fa855df0e4..35b684ecfc1 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -1,4 +1,5 @@ -import Typography, { TypographyProps } from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; +import { TypographyProps } from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/LinkChoice/LinkChoice.tsx b/src/components/LinkChoice/LinkChoice.tsx index 9eb79ed0f35..6cb73293912 100644 --- a/src/components/LinkChoice/LinkChoice.tsx +++ b/src/components/LinkChoice/LinkChoice.tsx @@ -1,7 +1,4 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import MenuItem from "@material-ui/core/MenuItem"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { ClickAwayListener, MenuItem, Paper, Popper } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import { FormChange } from "@saleor/hooks/useForm"; import ArrowDropdown from "@saleor/icons/ArrowDropdown"; diff --git a/src/components/ListField/ListField.tsx b/src/components/ListField/ListField.tsx index e298e35194b..126a8c83131 100644 --- a/src/components/ListField/ListField.tsx +++ b/src/components/ListField/ListField.tsx @@ -1,5 +1,5 @@ -import Button from "@material-ui/core/Button"; -import TextField, { StandardTextFieldProps } from "@material-ui/core/TextField"; +import { Button, TextField } from "@material-ui/core"; +import { StandardTextFieldProps } from "@material-ui/core/TextField"; import { createStyles, SaleorTheme, diff --git a/src/components/MediaTile/MediaTile.tsx b/src/components/MediaTile/MediaTile.tsx index f242dd2b426..f3c34a05ec0 100644 --- a/src/components/MediaTile/MediaTile.tsx +++ b/src/components/MediaTile/MediaTile.tsx @@ -1,5 +1,4 @@ -import CircularProgress from "@material-ui/core/CircularProgress"; -import IconButton from "@material-ui/core/IconButton"; +import { CircularProgress, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/Metadata/MetadataCard.tsx b/src/components/Metadata/MetadataCard.tsx index 63b520c770c..e2dabd4ded3 100644 --- a/src/components/Metadata/MetadataCard.tsx +++ b/src/components/Metadata/MetadataCard.tsx @@ -1,16 +1,18 @@ import emptyMetadata from "@assets/images/empty-metadata.svg"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import Table from "@material-ui/core/Table"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardActions, + CardContent, + IconButton, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import ToggleIcon from "@material-ui/icons/ArrowDropDown"; import DeleteIcon from "@material-ui/icons/Delete"; import { FormChange } from "@saleor/hooks/useForm"; diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx index a54b5bfd74e..3dd326e72f0 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx @@ -1,7 +1,5 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton, TextField, Typography } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; import CloseIcon from "@material-ui/icons/Close"; import Debounce, { DebounceProps } from "@saleor/components/Debounce"; import ArrowDropdownIcon from "@saleor/icons/ArrowDropdown"; diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx index 9487ef55ef3..008d928ecbd 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx @@ -1,8 +1,10 @@ import chevronDown from "@assets/images/ChevronDown.svg"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import MenuItem from "@material-ui/core/MenuItem"; -import Paper from "@material-ui/core/Paper"; -import Typography from "@material-ui/core/Typography"; +import { + CircularProgress, + MenuItem, + Paper, + Typography +} from "@material-ui/core"; import AddIcon from "@material-ui/icons/Add"; import Checkbox from "@saleor/components/Checkbox"; import useElementScroll, { diff --git a/src/components/MultiSelectField/MultiSelectField.tsx b/src/components/MultiSelectField/MultiSelectField.tsx index 49c43d58328..d360c18e24c 100644 --- a/src/components/MultiSelectField/MultiSelectField.tsx +++ b/src/components/MultiSelectField/MultiSelectField.tsx @@ -1,9 +1,12 @@ -import FilledInput from "@material-ui/core/FilledInput"; -import FormControl from "@material-ui/core/FormControl"; -import FormHelperText from "@material-ui/core/FormHelperText"; -import InputLabel from "@material-ui/core/InputLabel"; -import MenuItem from "@material-ui/core/MenuItem"; -import Select, { SelectProps } from "@material-ui/core/Select"; +import { + FilledInput, + FormControl, + FormHelperText, + InputLabel, + MenuItem, + Select +} from "@material-ui/core"; +import { SelectProps } from "@material-ui/core/Select"; import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/components/Navigator/Navigator.tsx b/src/components/Navigator/Navigator.tsx index fd39dfc6719..f6acde56d73 100644 --- a/src/components/Navigator/Navigator.tsx +++ b/src/components/Navigator/Navigator.tsx @@ -1,6 +1,4 @@ -import Fade from "@material-ui/core/Fade"; -import Modal from "@material-ui/core/Modal"; -import Paper from "@material-ui/core/Paper"; +import { Fade, Modal, Paper } from "@material-ui/core"; import { APP_VERSION } from "@saleor/config"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import useNotifier from "@saleor/hooks/useNotifier"; diff --git a/src/components/Navigator/NavigatorSection.tsx b/src/components/Navigator/NavigatorSection.tsx index c2e4037bdd3..d2d1df1c73a 100644 --- a/src/components/Navigator/NavigatorSection.tsx +++ b/src/components/Navigator/NavigatorSection.tsx @@ -1,5 +1,4 @@ -import MenuItem from "@material-ui/core/MenuItem"; -import Typography from "@material-ui/core/Typography"; +import { MenuItem, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import { GetItemPropsOptions } from "downshift"; import React from "react"; diff --git a/src/components/NavigatorButton/NavigatorButton.tsx b/src/components/NavigatorButton/NavigatorButton.tsx index 014acc27eda..c36b0e22a85 100644 --- a/src/components/NavigatorButton/NavigatorButton.tsx +++ b/src/components/NavigatorButton/NavigatorButton.tsx @@ -1,8 +1,6 @@ import navigatorIcon from "@assets/images/navigator.svg"; -import Grow from "@material-ui/core/Grow"; -import IconButton, { IconButtonProps } from "@material-ui/core/IconButton"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { Grow, IconButton, Paper, Popper } from "@material-ui/core"; +import { IconButtonProps } from "@material-ui/core/IconButton"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/NotFoundPage/NotFoundPage.tsx b/src/components/NotFoundPage/NotFoundPage.tsx index 2ed765568b8..291307ee03d 100644 --- a/src/components/NotFoundPage/NotFoundPage.tsx +++ b/src/components/NotFoundPage/NotFoundPage.tsx @@ -1,6 +1,5 @@ import notFoundImage from "@assets/images/not-found-404.svg"; -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; import SVG from "react-inlinesvg"; diff --git a/src/components/PageHeader/PageHeader.tsx b/src/components/PageHeader/PageHeader.tsx index ab75ab51749..87d0238fab9 100644 --- a/src/components/PageHeader/PageHeader.tsx +++ b/src/components/PageHeader/PageHeader.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { LimitInfoFragment } from "@saleor/fragments/types/LimitInfoFragment"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/PhoneField/PhoneField.tsx b/src/components/PhoneField/PhoneField.tsx index 5525d62095d..3fc57ffcac0 100644 --- a/src/components/PhoneField/PhoneField.tsx +++ b/src/components/PhoneField/PhoneField.tsx @@ -1,4 +1,4 @@ -import TextField from "@material-ui/core/TextField"; +import { TextField } from "@material-ui/core"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/PriceField/PriceField.tsx b/src/components/PriceField/PriceField.tsx index 3bb72e5e0c9..14d6c79befb 100644 --- a/src/components/PriceField/PriceField.tsx +++ b/src/components/PriceField/PriceField.tsx @@ -1,6 +1,5 @@ +import { InputAdornment, TextField } from "@material-ui/core"; import { InputProps } from "@material-ui/core/Input"; -import InputAdornment from "@material-ui/core/InputAdornment"; -import TextField from "@material-ui/core/TextField"; import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/components/RadioGroupField/RadioGroupField.tsx b/src/components/RadioGroupField/RadioGroupField.tsx index 0aa23339f0a..55e3e446de1 100644 --- a/src/components/RadioGroupField/RadioGroupField.tsx +++ b/src/components/RadioGroupField/RadioGroupField.tsx @@ -1,10 +1,12 @@ -import FormControl from "@material-ui/core/FormControl"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import FormHelperText from "@material-ui/core/FormHelperText"; -import FormLabel from "@material-ui/core/FormLabel"; -import MenuItem from "@material-ui/core/MenuItem"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; +import { + FormControl, + FormControlLabel, + FormHelperText, + FormLabel, + MenuItem, + Radio, + RadioGroup +} from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/RadioSwitchField/RadioSwitchField.tsx b/src/components/RadioSwitchField/RadioSwitchField.tsx index ce76176e5bc..57e74b482fd 100644 --- a/src/components/RadioSwitchField/RadioSwitchField.tsx +++ b/src/components/RadioSwitchField/RadioSwitchField.tsx @@ -1,7 +1,9 @@ -import FormControl from "@material-ui/core/FormControl"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; +import { + FormControl, + FormControlLabel, + Radio, + RadioGroup +} from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/ResponsiveTable/ResponsiveTable.tsx b/src/components/ResponsiveTable/ResponsiveTable.tsx index ec01ecebbfc..b0523e09622 100644 --- a/src/components/ResponsiveTable/ResponsiveTable.tsx +++ b/src/components/ResponsiveTable/ResponsiveTable.tsx @@ -1,4 +1,4 @@ -import Table from "@material-ui/core/Table"; +import { Table } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/RichTextEditor/RichTextEditor.tsx b/src/components/RichTextEditor/RichTextEditor.tsx index eec6523b96a..83f52608f8a 100644 --- a/src/components/RichTextEditor/RichTextEditor.tsx +++ b/src/components/RichTextEditor/RichTextEditor.tsx @@ -1,7 +1,5 @@ import EditorJS, { LogLevels, OutputData } from "@editorjs/editorjs"; -import FormControl from "@material-ui/core/FormControl"; -import FormHelperText from "@material-ui/core/FormHelperText"; -import InputLabel from "@material-ui/core/InputLabel"; +import { FormControl, FormHelperText, InputLabel } from "@material-ui/core"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/RowNumberSelect/RowNumberSelect.tsx b/src/components/RowNumberSelect/RowNumberSelect.tsx index 674b414d39a..8a24f455435 100644 --- a/src/components/RowNumberSelect/RowNumberSelect.tsx +++ b/src/components/RowNumberSelect/RowNumberSelect.tsx @@ -1,5 +1,4 @@ -import MenuItem from "@material-ui/core/MenuItem"; -import Select from "@material-ui/core/Select"; +import { MenuItem, Select } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/components/SaveButtonBar/SaveButtonBar.tsx b/src/components/SaveButtonBar/SaveButtonBar.tsx index d843c4bc354..6808e55da15 100644 --- a/src/components/SaveButtonBar/SaveButtonBar.tsx +++ b/src/components/SaveButtonBar/SaveButtonBar.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Portal from "@material-ui/core/Portal"; +import { Button, Card, CardContent, Portal } from "@material-ui/core"; import useWindowScroll from "@saleor/hooks/useWindowScroll"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx b/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx index 5b116531b08..ed0d243fac3 100644 --- a/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx +++ b/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx index 741fce31677..26c017be007 100644 --- a/src/components/SearchBar/SearchBar.tsx +++ b/src/components/SearchBar/SearchBar.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import { SearchPageProps, TabPageProps } from "@saleor/types"; import React from "react"; diff --git a/src/components/SearchBar/SearchInput.tsx b/src/components/SearchBar/SearchInput.tsx index c3d531d3eaf..178f8ce8fe0 100644 --- a/src/components/SearchBar/SearchInput.tsx +++ b/src/components/SearchBar/SearchInput.tsx @@ -1,4 +1,4 @@ -import TextField from "@material-ui/core/TextField"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/SeoForm/SeoForm.tsx b/src/components/SeoForm/SeoForm.tsx index 90b8b4dff4e..702caae74d8 100644 --- a/src/components/SeoForm/SeoForm.tsx +++ b/src/components/SeoForm/SeoForm.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + TextField, + Typography +} from "@material-ui/core"; import { CollectionErrorFragment } from "@saleor/fragments/types/CollectionErrorFragment"; import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; diff --git a/src/components/SideBar/MenuItem.tsx b/src/components/SideBar/MenuItem.tsx index e38b7d371e2..c43b408d29b 100644 --- a/src/components/SideBar/MenuItem.tsx +++ b/src/components/SideBar/MenuItem.tsx @@ -1,8 +1,10 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { + ClickAwayListener, + Paper, + Popper, + Typography +} from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Typography from "@material-ui/core/Typography"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/SideBarDrawer/MenuItemBtn.tsx b/src/components/SideBarDrawer/MenuItemBtn.tsx index 9013d5f36d7..f703542b764 100644 --- a/src/components/SideBarDrawer/MenuItemBtn.tsx +++ b/src/components/SideBarDrawer/MenuItemBtn.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import React from "react"; import SVG from "react-inlinesvg"; diff --git a/src/components/SideBarDrawer/SideBarDrawer.tsx b/src/components/SideBarDrawer/SideBarDrawer.tsx index e7963401c41..a1fb78deda0 100644 --- a/src/components/SideBarDrawer/SideBarDrawer.tsx +++ b/src/components/SideBarDrawer/SideBarDrawer.tsx @@ -1,6 +1,5 @@ import logoLight from "@assets/images/logo-sidebar-light.svg"; -import { Typography } from "@material-ui/core"; -import Drawer from "@material-ui/core/Drawer"; +import { Drawer, Typography } from "@material-ui/core"; import ArrowLeftIcon from "@material-ui/icons/ArrowLeft"; import MenuIcon from "@material-ui/icons/Menu"; import classNames from "classnames"; diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx index be27d6b8ae9..b88c0730d65 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx @@ -1,6 +1,5 @@ +import { InputBase, TextField } from "@material-ui/core"; import { InputProps } from "@material-ui/core/Input"; -import InputBase from "@material-ui/core/InputBase"; -import TextField from "@material-ui/core/TextField"; import { ExtendedFormHelperTextProps } from "@saleor/channels/components/ChannelForm/types"; import { makeStyles } from "@saleor/theme"; import { FetchMoreProps } from "@saleor/types"; diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx index 3e9460bbf28..5304112fea8 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx @@ -1,8 +1,10 @@ import chevronDown from "@assets/images/ChevronDown.svg"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import MenuItem from "@material-ui/core/MenuItem"; -import Paper from "@material-ui/core/Paper"; -import Typography from "@material-ui/core/Typography"; +import { + CircularProgress, + MenuItem, + Paper, + Typography +} from "@material-ui/core"; import Add from "@material-ui/icons/Add"; import useElementScroll, { isScrolledToBottom diff --git a/src/components/SingleSelectField/SingleSelectField.tsx b/src/components/SingleSelectField/SingleSelectField.tsx index 25de8186c08..8acb4877ee0 100644 --- a/src/components/SingleSelectField/SingleSelectField.tsx +++ b/src/components/SingleSelectField/SingleSelectField.tsx @@ -1,10 +1,13 @@ -import FormControl from "@material-ui/core/FormControl"; -import FormHelperText from "@material-ui/core/FormHelperText"; +import { + FormControl, + FormHelperText, + InputLabel, + MenuItem, + OutlinedInput, + Select +} from "@material-ui/core"; import { InputProps } from "@material-ui/core/Input"; -import InputLabel from "@material-ui/core/InputLabel"; -import MenuItem from "@material-ui/core/MenuItem"; -import OutlinedInput from "@material-ui/core/OutlinedInput"; -import Select, { SelectProps } from "@material-ui/core/Select"; +import { SelectProps } from "@material-ui/core/Select"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/SortableChip/SortableChip.tsx b/src/components/SortableChip/SortableChip.tsx index bd987ed9897..904fdf65f85 100644 --- a/src/components/SortableChip/SortableChip.tsx +++ b/src/components/SortableChip/SortableChip.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/SortableChipsField/SortableChipsField.tsx b/src/components/SortableChipsField/SortableChipsField.tsx index da00bceaed8..abe688e1f68 100644 --- a/src/components/SortableChipsField/SortableChipsField.tsx +++ b/src/components/SortableChipsField/SortableChipsField.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import { ReorderAction } from "@saleor/types"; import React from "react"; diff --git a/src/components/SortableTable/SortableHandle.tsx b/src/components/SortableTable/SortableHandle.tsx index bc3dcef7872..56a61a08243 100644 --- a/src/components/SortableTable/SortableHandle.tsx +++ b/src/components/SortableTable/SortableHandle.tsx @@ -1,4 +1,4 @@ -import TableCell from "@material-ui/core/TableCell"; +import { TableCell } from "@material-ui/core"; import Draggable from "@saleor/icons/Draggable"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/SortableTable/SortableTableBody.tsx b/src/components/SortableTable/SortableTableBody.tsx index 19b12be81e0..e28c718b66d 100644 --- a/src/components/SortableTable/SortableTableBody.tsx +++ b/src/components/SortableTable/SortableTableBody.tsx @@ -1,4 +1,5 @@ -import TableBody, { TableBodyProps } from "@material-ui/core/TableBody"; +import { TableBody } from "@material-ui/core"; +import { TableBodyProps } from "@material-ui/core/TableBody"; import { makeStyles } from "@saleor/theme"; import { ReorderAction } from "@saleor/types"; import React from "react"; diff --git a/src/components/SortableTable/SortableTableRow.tsx b/src/components/SortableTable/SortableTableRow.tsx index 48a77dad192..c5f09a45957 100644 --- a/src/components/SortableTable/SortableTableRow.tsx +++ b/src/components/SortableTable/SortableTableRow.tsx @@ -1,4 +1,5 @@ -import TableRow, { TableRowProps } from "@material-ui/core/TableRow"; +import { TableRow } from "@material-ui/core"; +import { TableRowProps } from "@material-ui/core/TableRow"; import React from "react"; import { SortableElement } from "react-sortable-hoc"; diff --git a/src/components/SquareButton/SquareButton.tsx b/src/components/SquareButton/SquareButton.tsx index a66edc14b96..7b64cfe1643 100644 --- a/src/components/SquareButton/SquareButton.tsx +++ b/src/components/SquareButton/SquareButton.tsx @@ -1,4 +1,5 @@ -import ButtonBase, { ButtonBaseProps } from "@material-ui/core/ButtonBase"; +import { ButtonBase } from "@material-ui/core"; +import { ButtonBaseProps } from "@material-ui/core/ButtonBase"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/StatusChip/StatusChip.tsx b/src/components/StatusChip/StatusChip.tsx index 59935683717..268abcad5c0 100644 --- a/src/components/StatusChip/StatusChip.tsx +++ b/src/components/StatusChip/StatusChip.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/StatusLabel/StatusLabel.tsx b/src/components/StatusLabel/StatusLabel.tsx index f11ab37d54c..9db03a49307 100644 --- a/src/components/StatusLabel/StatusLabel.tsx +++ b/src/components/StatusLabel/StatusLabel.tsx @@ -1,6 +1,6 @@ +import { Typography } from "@material-ui/core"; import grey from "@material-ui/core/colors/grey"; import yellow from "@material-ui/core/colors/yellow"; -import Typography from "@material-ui/core/Typography"; import Label from "@saleor/orders/components/OrderHistory/Label"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; diff --git a/src/components/Tab/Tab.tsx b/src/components/Tab/Tab.tsx index 6fb2fca0e24..b88b2504051 100644 --- a/src/components/Tab/Tab.tsx +++ b/src/components/Tab/Tab.tsx @@ -1,5 +1,5 @@ +import { Typography } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Typography from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TableCellAvatar/Avatar.tsx b/src/components/TableCellAvatar/Avatar.tsx index b6847ec5597..99e0bdf84b5 100644 --- a/src/components/TableCellAvatar/Avatar.tsx +++ b/src/components/TableCellAvatar/Avatar.tsx @@ -1,6 +1,6 @@ -import { makeStyles } from "@material-ui/core"; -import MuiAvatar from "@material-ui/core/Avatar"; +import { Avatar as MuiAvatar } from "@material-ui/core"; import Cached from "@material-ui/icons/Cached"; +import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TableCellAvatar/TableCellAvatar.tsx b/src/components/TableCellAvatar/TableCellAvatar.tsx index bee96702623..9b3f21bb73f 100644 --- a/src/components/TableCellAvatar/TableCellAvatar.tsx +++ b/src/components/TableCellAvatar/TableCellAvatar.tsx @@ -1,4 +1,5 @@ -import TableCell, { TableCellProps } from "@material-ui/core/TableCell"; +import { TableCell } from "@material-ui/core"; +import { TableCellProps } from "@material-ui/core/TableCell"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TableCellHeader/TableCellHeader.stories.tsx b/src/components/TableCellHeader/TableCellHeader.stories.tsx index bf6148f4ff7..4c5be3cc51b 100644 --- a/src/components/TableCellHeader/TableCellHeader.stories.tsx +++ b/src/components/TableCellHeader/TableCellHeader.stories.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/components/TableCellHeader/TableCellHeader.tsx b/src/components/TableCellHeader/TableCellHeader.tsx index aa46cf34c76..d7033aa0d77 100644 --- a/src/components/TableCellHeader/TableCellHeader.tsx +++ b/src/components/TableCellHeader/TableCellHeader.tsx @@ -1,4 +1,5 @@ -import TableCell, { TableCellProps } from "@material-ui/core/TableCell"; +import { TableCell } from "@material-ui/core"; +import { TableCellProps } from "@material-ui/core/TableCell"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TableFilter/FilterTab.tsx b/src/components/TableFilter/FilterTab.tsx index 4e2b5283b81..488d45dffd2 100644 --- a/src/components/TableFilter/FilterTab.tsx +++ b/src/components/TableFilter/FilterTab.tsx @@ -1,4 +1,4 @@ -import Tab from "@material-ui/core/Tab"; +import { Tab } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TableFilter/FilterTabs.tsx b/src/components/TableFilter/FilterTabs.tsx index fea3b21d100..69220297baf 100644 --- a/src/components/TableFilter/FilterTabs.tsx +++ b/src/components/TableFilter/FilterTabs.tsx @@ -1,4 +1,4 @@ -import Tabs from "@material-ui/core/Tabs"; +import { Tabs } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/TableHead/TableHead.tsx b/src/components/TableHead/TableHead.tsx index 34046084322..77508c0e38d 100644 --- a/src/components/TableHead/TableHead.tsx +++ b/src/components/TableHead/TableHead.tsx @@ -1,10 +1,11 @@ +import { + TableCell, + TableHead as MuiTableHead, + TableRow, + Typography +} from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import TableCell from "@material-ui/core/TableCell"; -import MuiTableHead, { - TableHeadProps as MuiTableHeadProps -} from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { TableHeadProps as MuiTableHeadProps } from "@material-ui/core/TableHead"; import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/TablePagination/TablePagination.tsx b/src/components/TablePagination/TablePagination.tsx index 82598f52bb1..d4cfbdc282a 100644 --- a/src/components/TablePagination/TablePagination.tsx +++ b/src/components/TablePagination/TablePagination.tsx @@ -1,6 +1,5 @@ +import { TableCell, Toolbar } from "@material-ui/core"; import { IconButtonProps } from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; -import Toolbar from "@material-ui/core/Toolbar"; import RowNumberSelect from "@saleor/components/RowNumberSelect"; import { maybe } from "@saleor/misc"; import { makeStyles } from "@saleor/theme"; diff --git a/src/components/TablePagination/TablePaginationActions.tsx b/src/components/TablePagination/TablePaginationActions.tsx index 43a7f76733f..f1b33c57d0a 100644 --- a/src/components/TablePagination/TablePaginationActions.tsx +++ b/src/components/TablePagination/TablePaginationActions.tsx @@ -1,4 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import ArrowLeft from "@material-ui/icons/ArrowLeft"; import ArrowRight from "@material-ui/icons/ArrowRight"; diff --git a/src/components/TextFieldWithChoice/TextFieldWithChoice.tsx b/src/components/TextFieldWithChoice/TextFieldWithChoice.tsx index abf8e6697bd..563546b40c4 100644 --- a/src/components/TextFieldWithChoice/TextFieldWithChoice.tsx +++ b/src/components/TextFieldWithChoice/TextFieldWithChoice.tsx @@ -1,11 +1,14 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/MenuList"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; -import TextField, { TextFieldProps } from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + ClickAwayListener, + Grow, + MenuItem, + MenuList as Menu, + Paper, + Popper, + TextField, + Typography +} from "@material-ui/core"; +import { TextFieldProps } from "@material-ui/core/TextField"; import DropdownIcon from "@material-ui/icons/ArrowDropDown"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/Timeline/Timeline.tsx b/src/components/Timeline/Timeline.tsx index 674cc56f3ba..f8219951b83 100644 --- a/src/components/Timeline/Timeline.tsx +++ b/src/components/Timeline/Timeline.tsx @@ -1,8 +1,5 @@ -import Avatar from "@material-ui/core/Avatar"; -import Button from "@material-ui/core/Button"; -import CardContent from "@material-ui/core/CardContent"; +import { Avatar, Button, CardContent, TextField } from "@material-ui/core"; import deepPurple from "@material-ui/core/colors/deepPurple"; -import TextField from "@material-ui/core/TextField"; import PersonIcon from "@material-ui/icons/Person"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/Timeline/TimelineEvent.tsx b/src/components/Timeline/TimelineEvent.tsx index 112fccb2cd2..a3bd1cff58d 100644 --- a/src/components/Timeline/TimelineEvent.tsx +++ b/src/components/Timeline/TimelineEvent.tsx @@ -1,7 +1,9 @@ -import ExpansionPanel from "@material-ui/core/ExpansionPanel"; -import ExpansionPanelDetails from "@material-ui/core/ExpansionPanelDetails"; -import ExpansionPanelSummary from "@material-ui/core/ExpansionPanelSummary"; -import Typography from "@material-ui/core/Typography"; +import { + ExpansionPanel, + ExpansionPanelDetails, + ExpansionPanelSummary, + Typography +} from "@material-ui/core"; import ExpandMoreIcon from "@material-ui/icons/ExpandMore"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/Timeline/TimelineEventHeader.tsx b/src/components/Timeline/TimelineEventHeader.tsx index e1fc50cc1cd..5911cd37a61 100644 --- a/src/components/Timeline/TimelineEventHeader.tsx +++ b/src/components/Timeline/TimelineEventHeader.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import useNavigator from "@saleor/hooks/useNavigator"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/components/Timeline/TimelineNote.tsx b/src/components/Timeline/TimelineNote.tsx index 507edfe32a7..8a96801c0de 100644 --- a/src/components/Timeline/TimelineNote.tsx +++ b/src/components/Timeline/TimelineNote.tsx @@ -1,8 +1,5 @@ -import Avatar from "@material-ui/core/Avatar"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Avatar, Card, CardContent, Typography } from "@material-ui/core"; import * as colors from "@material-ui/core/colors"; -import Typography from "@material-ui/core/Typography"; import PersonIcon from "@material-ui/icons/Person"; import { makeStyles } from "@saleor/theme"; import CRC from "crc-32"; diff --git a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx index 59b582e0c80..f11c0b6fe39 100644 --- a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx +++ b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx @@ -1,7 +1,4 @@ -import { CardContent } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Modal from "@material-ui/core/Modal"; +import { Card, CardContent, CircularProgress, Modal } from "@material-ui/core"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import ModalTitle from "@saleor/orders/components/OrderDiscountCommonModal/ModalTitle"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; diff --git a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx index 6c2b19a6c7d..9645a001883 100644 --- a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx +++ b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx @@ -1,5 +1,4 @@ -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { CardContent, Typography } from "@material-ui/core"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton from "@saleor/components/ConfirmButton"; diff --git a/src/components/UserChip/UserChip.tsx b/src/components/UserChip/UserChip.tsx index d148651ba4f..9cb95556ad4 100644 --- a/src/components/UserChip/UserChip.tsx +++ b/src/components/UserChip/UserChip.tsx @@ -1,14 +1,16 @@ -import Avatar from "@material-ui/core/Avatar"; -import Chip from "@material-ui/core/Chip"; -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Grow from "@material-ui/core/Grow"; -import Hidden from "@material-ui/core/Hidden"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/MenuList"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; -import Switch from "@material-ui/core/Switch"; +import { + Avatar, + Chip, + ClickAwayListener, + FormControlLabel, + Grow, + Hidden, + MenuItem, + MenuList as Menu, + Paper, + Popper, + Switch +} from "@material-ui/core"; import { User } from "@saleor/fragments/types/User"; import ArrowDropdown from "@saleor/icons/ArrowDropdown"; import { getUserInitials, getUserName } from "@saleor/misc"; diff --git a/src/components/VisibilityCard/VisibilityCard.tsx b/src/components/VisibilityCard/VisibilityCard.tsx index 597425f87e9..e065dda0eb6 100644 --- a/src/components/VisibilityCard/VisibilityCard.tsx +++ b/src/components/VisibilityCard/VisibilityCard.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; diff --git a/src/components/messages/MessageManager.tsx b/src/components/messages/MessageManager.tsx index 3ebe96cc716..130f60dcf90 100644 --- a/src/components/messages/MessageManager.tsx +++ b/src/components/messages/MessageManager.tsx @@ -1,7 +1,9 @@ -import Button from "@material-ui/core/Button"; -import IconButton from "@material-ui/core/IconButton"; -import SnackbarContent from "@material-ui/core/SnackbarContent"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + IconButton, + SnackbarContent, + Typography +} from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import classNames from "classnames"; import React, { useState } from "react"; diff --git a/src/configuration/ConfigurationPage.tsx b/src/configuration/ConfigurationPage.tsx index d55fdd67d81..677e5c7da4f 100644 --- a/src/configuration/ConfigurationPage.tsx +++ b/src/configuration/ConfigurationPage.tsx @@ -1,7 +1,5 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent, Typography } from "@material-ui/core"; import { IconProps } from "@material-ui/core/Icon"; -import Typography from "@material-ui/core/Typography"; import { User } from "@saleor/fragments/types/User"; import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/customers/components/CustomerAddress/CustomerAddress.tsx b/src/customers/components/CustomerAddress/CustomerAddress.tsx index 15fd0c145d2..76d9931bac5 100644 --- a/src/customers/components/CustomerAddress/CustomerAddress.tsx +++ b/src/customers/components/CustomerAddress/CustomerAddress.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import AddressFormatter from "@saleor/components/AddressFormatter"; import CardMenu from "@saleor/components/CardMenu"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx b/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx index 88aa79f1237..b4bc4090e35 100644 --- a/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx +++ b/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import AddressFormatter from "@saleor/components/AddressFormatter"; import classNames from "classnames"; import React from "react"; diff --git a/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx b/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx index b98d2e1fb28..13114da0244 100644 --- a/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx +++ b/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle +} from "@material-ui/core"; import AddressEdit from "@saleor/components/AddressEdit"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx b/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx index fdbe09feb90..adb5ca936f3 100644 --- a/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx +++ b/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx index e3c38c128d6..6d619b6d246 100644 --- a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx +++ b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import AddressFormatter from "@saleor/components/AddressFormatter"; import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; diff --git a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx index 686dbe8bead..7e1dba784ce 100644 --- a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx +++ b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import AddressEdit from "@saleor/components/AddressEdit"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; diff --git a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx index 9b48d934618..2e749c321de 100644 --- a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx +++ b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx index b04b0496ca3..5f67a492a16 100644 --- a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx +++ b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; diff --git a/src/customers/components/CustomerDetails/CustomerDetails.tsx b/src/customers/components/CustomerDetails/CustomerDetails.tsx index 5039626c85f..aebf42761c6 100644 --- a/src/customers/components/CustomerDetails/CustomerDetails.tsx +++ b/src/customers/components/CustomerDetails/CustomerDetails.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/customers/components/CustomerInfo/CustomerInfo.tsx b/src/customers/components/CustomerInfo/CustomerInfo.tsx index 9dfdbd7f2a3..9292f2c02dd 100644 --- a/src/customers/components/CustomerInfo/CustomerInfo.tsx +++ b/src/customers/components/CustomerInfo/CustomerInfo.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; diff --git a/src/customers/components/CustomerList/CustomerList.tsx b/src/customers/components/CustomerList/CustomerList.tsx index 8b72865ac00..1317ee82738 100644 --- a/src/customers/components/CustomerList/CustomerList.tsx +++ b/src/customers/components/CustomerList/CustomerList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/customers/components/CustomerListPage/CustomerListPage.tsx b/src/customers/components/CustomerListPage/CustomerListPage.tsx index 787e0e576d6..65c4c2fb68e 100644 --- a/src/customers/components/CustomerListPage/CustomerListPage.tsx +++ b/src/customers/components/CustomerListPage/CustomerListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/customers/components/CustomerOrders/CustomerOrders.tsx b/src/customers/components/CustomerOrders/CustomerOrders.tsx index 18bd339e988..db916fcdacb 100644 --- a/src/customers/components/CustomerOrders/CustomerOrders.tsx +++ b/src/customers/components/CustomerOrders/CustomerOrders.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; diff --git a/src/customers/components/CustomerStats/CustomerStats.tsx b/src/customers/components/CustomerStats/CustomerStats.tsx index bc92964fc9e..699e320f095 100644 --- a/src/customers/components/CustomerStats/CustomerStats.tsx +++ b/src/customers/components/CustomerStats/CustomerStats.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import { Hr } from "@saleor/components/Hr"; diff --git a/src/customers/views/CustomerAddresses.tsx b/src/customers/views/CustomerAddresses.tsx index e6da862a284..08fb5a70002 100644 --- a/src/customers/views/CustomerAddresses.tsx +++ b/src/customers/views/CustomerAddresses.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; diff --git a/src/customers/views/CustomerDetails.tsx b/src/customers/views/CustomerDetails.tsx index 5f535d3b851..4d631b484bb 100644 --- a/src/customers/views/CustomerDetails.tsx +++ b/src/customers/views/CustomerDetails.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; diff --git a/src/customers/views/CustomerList/CustomerList.tsx b/src/customers/views/CustomerList/CustomerList.tsx index 39b6736da00..9d8e720662b 100644 --- a/src/customers/views/CustomerList/CustomerList.tsx +++ b/src/customers/views/CustomerList/CustomerList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; diff --git a/src/discounts/components/DiscountCategories/DiscountCategories.tsx b/src/discounts/components/DiscountCategories/DiscountCategories.tsx index d01b561448c..0bc04990b18 100644 --- a/src/discounts/components/DiscountCategories/DiscountCategories.tsx +++ b/src/discounts/components/DiscountCategories/DiscountCategories.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/discounts/components/DiscountCollections/DiscountCollections.tsx b/src/discounts/components/DiscountCollections/DiscountCollections.tsx index ea797316a20..a6df4222113 100644 --- a/src/discounts/components/DiscountCollections/DiscountCollections.tsx +++ b/src/discounts/components/DiscountCollections/DiscountCollections.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx b/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx index dfcdcb12517..b73699d85fe 100644 --- a/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx +++ b/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx @@ -1,13 +1,15 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/discounts/components/DiscountDates/DiscountDates.tsx b/src/discounts/components/DiscountDates/DiscountDates.tsx index b75dd66fd5d..b551808fc53 100644 --- a/src/discounts/components/DiscountDates/DiscountDates.tsx +++ b/src/discounts/components/DiscountDates/DiscountDates.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Grid from "@saleor/components/Grid"; diff --git a/src/discounts/components/DiscountProducts/DiscountProducts.tsx b/src/discounts/components/DiscountProducts/DiscountProducts.tsx index 19e917e999d..dd40edb8883 100644 --- a/src/discounts/components/DiscountProducts/DiscountProducts.tsx +++ b/src/discounts/components/DiscountProducts/DiscountProducts.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; diff --git a/src/discounts/components/SaleInfo/SaleInfo.tsx b/src/discounts/components/SaleInfo/SaleInfo.tsx index dad0ffc231e..5bb7dcf93ea 100644 --- a/src/discounts/components/SaleInfo/SaleInfo.tsx +++ b/src/discounts/components/SaleInfo/SaleInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/discounts/components/SaleList/SaleList.tsx b/src/discounts/components/SaleList/SaleList.tsx index 8040121d43e..adb11c9b124 100644 --- a/src/discounts/components/SaleList/SaleList.tsx +++ b/src/discounts/components/SaleList/SaleList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import Date from "@saleor/components/Date"; import Money from "@saleor/components/Money"; diff --git a/src/discounts/components/SaleListPage/SaleListPage.tsx b/src/discounts/components/SaleListPage/SaleListPage.tsx index 247465d21ef..0488d23f7b2 100644 --- a/src/discounts/components/SaleListPage/SaleListPage.tsx +++ b/src/discounts/components/SaleListPage/SaleListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/discounts/components/SaleSummary/SaleSummary.tsx b/src/discounts/components/SaleSummary/SaleSummary.tsx index bf77c571dc6..44ab1b5b521 100644 --- a/src/discounts/components/SaleSummary/SaleSummary.tsx +++ b/src/discounts/components/SaleSummary/SaleSummary.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; diff --git a/src/discounts/components/SaleType/SaleType.tsx b/src/discounts/components/SaleType/SaleType.tsx index 8b4d9e634f1..7cdeb8e0882 100644 --- a/src/discounts/components/SaleType/SaleType.tsx +++ b/src/discounts/components/SaleType/SaleType.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField, { RadioGroupFieldChoice diff --git a/src/discounts/components/SaleValue/SaleValue.tsx b/src/discounts/components/SaleValue/SaleValue.tsx index 007e8d1d54e..882eb763cba 100644 --- a/src/discounts/components/SaleValue/SaleValue.tsx +++ b/src/discounts/components/SaleValue/SaleValue.tsx @@ -1,10 +1,12 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/discounts/components/VoucherDates/VoucherDates.tsx b/src/discounts/components/VoucherDates/VoucherDates.tsx index 9bec1f4c98a..9070f3ca834 100644 --- a/src/discounts/components/VoucherDates/VoucherDates.tsx +++ b/src/discounts/components/VoucherDates/VoucherDates.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Grid from "@saleor/components/Grid"; diff --git a/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx b/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx index 7744973d825..ac11e98d4b3 100644 --- a/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx +++ b/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { ChannelVoucherData } from "@saleor/channels/utils"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; diff --git a/src/discounts/components/VoucherInfo/VoucherInfo.tsx b/src/discounts/components/VoucherInfo/VoucherInfo.tsx index 3e2dccf3ef5..34e36a3d105 100644 --- a/src/discounts/components/VoucherInfo/VoucherInfo.tsx +++ b/src/discounts/components/VoucherInfo/VoucherInfo.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Button, Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/discounts/components/VoucherLimits/VoucherLimits.tsx b/src/discounts/components/VoucherLimits/VoucherLimits.tsx index 970a3529ee1..1b19433cf68 100644 --- a/src/discounts/components/VoucherLimits/VoucherLimits.tsx +++ b/src/discounts/components/VoucherLimits/VoucherLimits.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment"; diff --git a/src/discounts/components/VoucherList/VoucherList.tsx b/src/discounts/components/VoucherList/VoucherList.tsx index eb8b2c5cd9c..0ca931d4628 100644 --- a/src/discounts/components/VoucherList/VoucherList.tsx +++ b/src/discounts/components/VoucherList/VoucherList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import Date from "@saleor/components/Date"; import Money from "@saleor/components/Money"; diff --git a/src/discounts/components/VoucherListPage/VoucherListPage.tsx b/src/discounts/components/VoucherListPage/VoucherListPage.tsx index 47253834cb7..62412779261 100644 --- a/src/discounts/components/VoucherListPage/VoucherListPage.tsx +++ b/src/discounts/components/VoucherListPage/VoucherListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx index 0507394226d..3275386e8b8 100644 --- a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx +++ b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx @@ -1,10 +1,12 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; import PriceField from "@saleor/components/PriceField"; diff --git a/src/discounts/components/VoucherSummary/VoucherSummary.tsx b/src/discounts/components/VoucherSummary/VoucherSummary.tsx index 2e1233191a1..ce8e0fc4141 100644 --- a/src/discounts/components/VoucherSummary/VoucherSummary.tsx +++ b/src/discounts/components/VoucherSummary/VoucherSummary.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; diff --git a/src/discounts/components/VoucherTypes/VoucherTypes.tsx b/src/discounts/components/VoucherTypes/VoucherTypes.tsx index 35d5d1e5b3d..33fbf66f62b 100644 --- a/src/discounts/components/VoucherTypes/VoucherTypes.tsx +++ b/src/discounts/components/VoucherTypes/VoucherTypes.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import RadioGroupField from "@saleor/components/RadioGroupField"; diff --git a/src/discounts/components/VoucherValue/VoucherValue.tsx b/src/discounts/components/VoucherValue/VoucherValue.tsx index 4b6105a2813..935546f0616 100644 --- a/src/discounts/components/VoucherValue/VoucherValue.tsx +++ b/src/discounts/components/VoucherValue/VoucherValue.tsx @@ -1,9 +1,11 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { FormSpacer } from "@saleor/components/FormSpacer"; diff --git a/src/discounts/views/SaleDetails/SaleDetails.tsx b/src/discounts/views/SaleDetails/SaleDetails.tsx index 0617b7f7311..7828ec77dc4 100644 --- a/src/discounts/views/SaleDetails/SaleDetails.tsx +++ b/src/discounts/views/SaleDetails/SaleDetails.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogContentText from "@material-ui/core/DialogContentText"; +import { Button, DialogContentText } from "@material-ui/core"; import { categoryUrl } from "@saleor/categories/urls"; import { useChannelsList } from "@saleor/channels/queries"; import { diff --git a/src/discounts/views/SaleList/SaleList.tsx b/src/discounts/views/SaleList/SaleList.tsx index 4f92536616a..3e24d5ab195 100644 --- a/src/discounts/views/SaleList/SaleList.tsx +++ b/src/discounts/views/SaleList/SaleList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/discounts/views/VoucherDetails/VoucherDetails.tsx b/src/discounts/views/VoucherDetails/VoucherDetails.tsx index 82d201c1a66..9cf108a2465 100644 --- a/src/discounts/views/VoucherDetails/VoucherDetails.tsx +++ b/src/discounts/views/VoucherDetails/VoucherDetails.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogContentText from "@material-ui/core/DialogContentText"; +import { Button, DialogContentText } from "@material-ui/core"; import { useChannelsList } from "@saleor/channels/queries"; import { ChannelVoucherData, diff --git a/src/discounts/views/VoucherList/VoucherList.tsx b/src/discounts/views/VoucherList/VoucherList.tsx index 43d24dd4046..1992b6e3d91 100644 --- a/src/discounts/views/VoucherList/VoucherList.tsx +++ b/src/discounts/views/VoucherList/VoucherList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/home/components/HomeActivityCard/HomeActivityCard.tsx b/src/home/components/HomeActivityCard/HomeActivityCard.tsx index ec032462238..aaba7fd662b 100644 --- a/src/home/components/HomeActivityCard/HomeActivityCard.tsx +++ b/src/home/components/HomeActivityCard/HomeActivityCard.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import List from "@material-ui/core/List"; -import ListItem from "@material-ui/core/ListItem"; -import ListItemText from "@material-ui/core/ListItemText"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + List, + ListItem, + ListItemText, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx b/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx index 9ca3bbaf118..315acf725eb 100644 --- a/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx +++ b/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx @@ -1,7 +1,5 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent, Typography } from "@material-ui/core"; import { IconProps } from "@material-ui/core/Icon"; -import Typography from "@material-ui/core/Typography"; import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/home/components/HomeHeader/HomeHeader.tsx b/src/home/components/HomeHeader/HomeHeader.tsx index 9aeef78656e..5f6b41a7e26 100644 --- a/src/home/components/HomeHeader/HomeHeader.tsx +++ b/src/home/components/HomeHeader/HomeHeader.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import Skeleton from "@saleor/components/Skeleton"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx index 761586a9e13..8cc93a5e2b6 100644 --- a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx +++ b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"; import RequirePermissions from "@saleor/components/RequirePermissions"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/home/components/HomeProductListCard/HomeProductListCard.tsx b/src/home/components/HomeProductListCard/HomeProductListCard.tsx index 0e8197a5c49..93552020933 100644 --- a/src/home/components/HomeProductListCard/HomeProductListCard.tsx +++ b/src/home/components/HomeProductListCard/HomeProductListCard.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/home/components/HomeScreen.tsx b/src/home/components/HomeScreen.tsx index 8035d9c1422..d37e8009f2c 100644 --- a/src/home/components/HomeScreen.tsx +++ b/src/home/components/HomeScreen.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/hooks/useChannelsSearchWithLoadMore.ts b/src/hooks/useChannelsSearchWithLoadMore.ts index 9100415b183..5cd19898864 100644 --- a/src/hooks/useChannelsSearchWithLoadMore.ts +++ b/src/hooks/useChannelsSearchWithLoadMore.ts @@ -1,7 +1,7 @@ import { useBaseChannelsList } from "@saleor/channels/queries"; -import chunk from "lodash-es/chunk"; -import compact from "lodash-es/compact"; -import concat from "lodash-es/concat"; +import chunk from "lodash/chunk"; +import compact from "lodash/compact"; +import concat from "lodash/concat"; import { useEffect, useState } from "react"; import { diff --git a/src/hooks/useElementScroll.ts b/src/hooks/useElementScroll.ts index fa4156ced22..f9df93b4502 100644 --- a/src/hooks/useElementScroll.ts +++ b/src/hooks/useElementScroll.ts @@ -1,4 +1,4 @@ -import throttle from "lodash-es/throttle"; +import throttle from "lodash/throttle"; import { MutableRefObject, useEffect, useState } from "react"; export type Position = Record<"x" | "y", number>; diff --git a/src/hooks/useForm.ts b/src/hooks/useForm.ts index 5fb19376dd4..6118a2e8a51 100644 --- a/src/hooks/useForm.ts +++ b/src/hooks/useForm.ts @@ -1,5 +1,5 @@ import { toggle } from "@saleor/utils/lists"; -import isEqual from "lodash-es/isEqual"; +import isEqual from "lodash/isEqual"; import omit from "lodash/omit"; import React from "react"; import { useState } from "react"; diff --git a/src/hooks/useScroll.ts b/src/hooks/useScroll.ts index 6e871b8c234..b9521ed9018 100644 --- a/src/hooks/useScroll.ts +++ b/src/hooks/useScroll.ts @@ -1,4 +1,4 @@ -import throttle from "lodash-es/throttle"; +import throttle from "lodash/throttle"; import { useEffect, useState } from "react"; function getPosition() { diff --git a/src/hooks/useStateFromProps.ts b/src/hooks/useStateFromProps.ts index b70bbb2a590..afcc18cc09d 100644 --- a/src/hooks/useStateFromProps.ts +++ b/src/hooks/useStateFromProps.ts @@ -1,4 +1,4 @@ -import isEqual from "lodash-es/isEqual"; +import isEqual from "lodash/isEqual"; import { Dispatch, SetStateAction, useState } from "react"; export interface UseStateFromPropsOpts { diff --git a/src/hooks/useWindowScroll.ts b/src/hooks/useWindowScroll.ts index 5218d58c9f8..ccafe9e2ec5 100644 --- a/src/hooks/useWindowScroll.ts +++ b/src/hooks/useWindowScroll.ts @@ -1,4 +1,4 @@ -import throttle from "lodash-es/throttle"; +import throttle from "lodash/throttle"; import { useEffect, useState } from "react"; function getPosition() { diff --git a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx index 200a9ed0bfe..08cae0086bd 100644 --- a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx +++ b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx index 9d0a6ae06f7..f7c28f379d4 100644 --- a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx +++ b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx index 394c2ec469a..4eaebcb67a1 100644 --- a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx +++ b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField, + Typography +} from "@material-ui/core"; import AutocompleteSelectMenu from "@saleor/components/AutocompleteSelectMenu"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/navigation/components/MenuItems/MenuItems.tsx b/src/navigation/components/MenuItems/MenuItems.tsx index 1f30790bd91..f8793cc514c 100644 --- a/src/navigation/components/MenuItems/MenuItems.tsx +++ b/src/navigation/components/MenuItems/MenuItems.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import IconButton from "@material-ui/core/IconButton"; -import Paper from "@material-ui/core/Paper"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardActions, + IconButton, + Paper, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/navigation/components/MenuList/MenuList.tsx b/src/navigation/components/MenuList/MenuList.tsx index 158ec147239..6e14b18b113 100644 --- a/src/navigation/components/MenuList/MenuList.tsx +++ b/src/navigation/components/MenuList/MenuList.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import Checkbox from "@saleor/components/Checkbox"; import IconButtonTableCell from "@saleor/components/IconButtonTableCell"; diff --git a/src/navigation/components/MenuListPage/MenuListPage.tsx b/src/navigation/components/MenuListPage/MenuListPage.tsx index 457424ca60a..9f09a6d73cc 100644 --- a/src/navigation/components/MenuListPage/MenuListPage.tsx +++ b/src/navigation/components/MenuListPage/MenuListPage.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/navigation/components/MenuProperties/MenuProperties.tsx b/src/navigation/components/MenuProperties/MenuProperties.tsx index 8182a95b7ba..c30e97f55c4 100644 --- a/src/navigation/components/MenuProperties/MenuProperties.tsx +++ b/src/navigation/components/MenuProperties/MenuProperties.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/navigation/views/MenuDetails/index.tsx b/src/navigation/views/MenuDetails/index.tsx index 8b69de55bae..ddc319d7655 100644 --- a/src/navigation/views/MenuDetails/index.tsx +++ b/src/navigation/views/MenuDetails/index.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; diff --git a/src/navigation/views/MenuList/MenuList.tsx b/src/navigation/views/MenuList/MenuList.tsx index 0974162d548..46165bffdb7 100644 --- a/src/navigation/views/MenuList/MenuList.tsx +++ b/src/navigation/views/MenuList/MenuList.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogContentText from "@material-ui/core/DialogContentText"; +import { Button, DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; import useBulkActions from "@saleor/hooks/useBulkActions"; diff --git a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx index 6f6e73ed982..d709aadeacc 100644 --- a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx +++ b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle +} from "@material-ui/core"; import AddressEdit from "@saleor/components/AddressEdit"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx index dca9ac17a52..e0f28f86d39 100644 --- a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx +++ b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx index 393c78591b5..52fbdbebcd1 100644 --- a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx +++ b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx b/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx index 80dcb16d4d9..5f7401a0507 100644 --- a/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx +++ b/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; import { DialogProps } from "@saleor/types"; diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index 55ee02ff8a1..0d0621ebfab 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ExternalLink from "@saleor/components/ExternalLink"; import Form from "@saleor/components/Form"; diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx index e81f4f7476c..1ca43f29adf 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx @@ -1,6 +1,4 @@ -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; +import { FormControlLabel, Radio, RadioGroup } from "@material-ui/core"; import AddressEdit from "@saleor/components/AddressEdit"; import CardSpacer from "@saleor/components/CardSpacer"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx index fb4c7eddb42..95425a12ce0 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx @@ -1,10 +1,12 @@ -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import Divider from "@material-ui/core/Divider"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Typography from "@material-ui/core/Typography"; +import { + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Divider, + FormControlLabel, + Typography +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/orders/components/OrderCustomerChangeDialog/OrderCustomerChangeDialog.tsx b/src/orders/components/OrderCustomerChangeDialog/OrderCustomerChangeDialog.tsx index bbb830173c3..a1e95797065 100644 --- a/src/orders/components/OrderCustomerChangeDialog/OrderCustomerChangeDialog.tsx +++ b/src/orders/components/OrderCustomerChangeDialog/OrderCustomerChangeDialog.tsx @@ -1,11 +1,13 @@ -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; -import Typography from "@material-ui/core/Typography"; +import { + Dialog, + DialogActions, + DialogContent, + DialogTitle, + FormControlLabel, + Radio, + RadioGroup, + Typography +} from "@material-ui/core"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; import { buttonMessages } from "@saleor/intl"; diff --git a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx index f6a96cb525d..23e4daa1f13 100644 --- a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx +++ b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; import React from "react"; diff --git a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx index dd69e58a488..28b7b55391b 100644 --- a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx +++ b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; import { CardSpacer } from "@saleor/components/CardSpacer"; diff --git a/src/orders/components/OrderDiscountCommonModal/ModalTitle.tsx b/src/orders/components/OrderDiscountCommonModal/ModalTitle.tsx index cec6f6f6ddf..cffb80e053d 100644 --- a/src/orders/components/OrderDiscountCommonModal/ModalTitle.tsx +++ b/src/orders/components/OrderDiscountCommonModal/ModalTitle.tsx @@ -1,5 +1,4 @@ -import Divider from "@material-ui/core/Divider"; -import Typography from "@material-ui/core/Typography"; +import { Divider, Typography } from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import CardSpacer from "@saleor/components/CardSpacer"; import { makeStyles } from "@saleor/theme"; diff --git a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx index c6c03ee7e9c..4cad81ba550 100644 --- a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx +++ b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx @@ -1,4 +1,3 @@ -/* eslint-disable sort-keys */ import { Card, CardContent, diff --git a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx index 403d07f32f2..b8a63dd388f 100644 --- a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx +++ b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx index 4b9bcf5eb4f..65e40a50a4a 100644 --- a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx +++ b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx @@ -1,6 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Button, Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { OrderDiscountContext, diff --git a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx index 872e5ad68e8..6e7716bd020 100644 --- a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableHead, TableRow } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; import { diff --git a/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx b/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx index 997466061cb..ce7230275d5 100644 --- a/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx @@ -1,7 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { IconButton, TableCell, TableRow, Typography } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import Link from "@saleor/components/Link"; import Money from "@saleor/components/Money"; diff --git a/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx b/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx index 128b0d72ed5..568d65e95ad 100644 --- a/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx @@ -1,7 +1,8 @@ -import { makeStyles, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import DebounceForm from "@saleor/components/DebounceForm"; import Form from "@saleor/components/Form"; import { OrderDetails_order_lines } from "@saleor/orders/types/OrderDetails"; +import { makeStyles } from "@saleor/theme"; import createNonNegativeValueChangeHandler from "@saleor/utils/handlers/nonNegativeValueChangeHandler"; import React from "react"; diff --git a/src/orders/components/OrderDraftList/OrderDraftList.tsx b/src/orders/components/OrderDraftList/OrderDraftList.tsx index 515fedd8bd6..c5c09b18469 100644 --- a/src/orders/components/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/components/OrderDraftList/OrderDraftList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; diff --git a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx index 382bd530579..1fc5396e4b6 100644 --- a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx +++ b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx index b024e67e971..ec637ad3bae 100644 --- a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx +++ b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; import CardSpacer from "@saleor/components/CardSpacer"; diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx index 62837d07879..36f724627ca 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx @@ -1,11 +1,13 @@ -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardActions, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import { CSSProperties } from "@material-ui/styles"; import AppHeader from "@saleor/components/AppHeader"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx index 69813e9cc51..2acbb964672 100644 --- a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx @@ -1,5 +1,6 @@ -import { makeStyles, TableCell, TableRow, Typography } from "@material-ui/core"; +import { TableCell, TableRow, Typography } from "@material-ui/core"; import { getStringOrPlaceholder } from "@saleor/misc"; +import { makeStyles } from "@saleor/theme"; import { FulfillmentStatus } from "@saleor/types/globalTypes"; import classNames from "classnames"; import React from "react"; diff --git a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx index a6dbb746cb4..28c7d9c47f0 100644 --- a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; +import { Card, TableBody } from "@material-ui/core"; import CardMenu from "@saleor/components/CardMenu"; import CardSpacer from "@saleor/components/CardSpacer"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx index 5fc3c0dd26b..a3acdc25690 100644 --- a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx +++ b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx index 99a4a42025e..79ec50072f4 100644 --- a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx +++ b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx @@ -1,14 +1,16 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + TableBody, + TableCell, + TableHead, + TableRow, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx index 93a119b2fce..ad290fba723 100644 --- a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx +++ b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx b/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx index 2a035668569..400e36ac701 100644 --- a/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx +++ b/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx @@ -1,6 +1,7 @@ -import { makeStyles, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import Money from "@saleor/components/Money"; import { TimelineEvent } from "@saleor/components/Timeline"; +import { makeStyles } from "@saleor/theme"; import { OrderEventsEnum } from "@saleor/types/globalTypes"; import camelCase from "lodash/camelCase"; import React from "react"; diff --git a/src/orders/components/OrderHistory/OrderHistory.tsx b/src/orders/components/OrderHistory/OrderHistory.tsx index 2a9e149845f..2c7039bf8a0 100644 --- a/src/orders/components/OrderHistory/OrderHistory.tsx +++ b/src/orders/components/OrderHistory/OrderHistory.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import Form from "@saleor/components/Form"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx index 639c79e9464..188dbd68820 100644 --- a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx +++ b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx index c9f18c25419..8c1f4d72255 100644 --- a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx +++ b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/orders/components/OrderList/OrderList.tsx b/src/orders/components/OrderList/OrderList.tsx index 193c27a71c3..aa6ccaa25ff 100644 --- a/src/orders/components/OrderList/OrderList.tsx +++ b/src/orders/components/OrderList/OrderList.tsx @@ -1,8 +1,10 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow +} from "@material-ui/core"; import { CSSProperties } from "@material-ui/styles"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; diff --git a/src/orders/components/OrderListPage/OrderListPage.tsx b/src/orders/components/OrderListPage/OrderListPage.tsx index b4e642234b0..e96272dca90 100644 --- a/src/orders/components/OrderListPage/OrderListPage.tsx +++ b/src/orders/components/OrderListPage/OrderListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Alert from "@saleor/components/Alert/Alert"; import CardMenu from "@saleor/components/CardMenu"; import Container from "@saleor/components/Container"; diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index c9ae2f1c42b..33aaa28d02e 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import TextField from "@material-ui/core/TextField"; +import { DialogContentText, TextField } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index b03383247b4..67866df8f96 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import CardContent from "@material-ui/core/CardContent"; +import { Button, Card, CardActions, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; import Money, { subtractMoney } from "@saleor/components/Money"; diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 1c9638095d7..b5637afb4f4 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index eed639a9519..e852d4d27f6 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 75f2b918839..da78da99eac 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -1,14 +1,16 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/orders/components/OrderProductsCardElements/OrderProductsCardHeader.tsx b/src/orders/components/OrderProductsCardElements/OrderProductsCardHeader.tsx index 2dc8e7f39df..acf09dcd39e 100644 --- a/src/orders/components/OrderProductsCardElements/OrderProductsCardHeader.tsx +++ b/src/orders/components/OrderProductsCardElements/OrderProductsCardHeader.tsx @@ -1,4 +1,5 @@ -import { makeStyles, TableCell, TableHead, TableRow } from "@material-ui/core"; +import { TableCell, TableHead, TableRow } from "@material-ui/core"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx b/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx index 4075d3348df..864bb0f66e4 100644 --- a/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx +++ b/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx @@ -1,4 +1,4 @@ -import { makeStyles, TableCell, TableRow } from "@material-ui/core"; +import { TableCell, TableRow } from "@material-ui/core"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; @@ -8,6 +8,7 @@ import { OrderDetails_order_fulfillments_lines, OrderDetails_order_lines } from "@saleor/orders/types/OrderDetails"; +import { makeStyles } from "@saleor/theme"; import React from "react"; const useStyles = makeStyles( diff --git a/src/orders/components/OrderRefund/OrderRefund.tsx b/src/orders/components/OrderRefund/OrderRefund.tsx index 48b89657b5a..aad8fbc74e3 100644 --- a/src/orders/components/OrderRefund/OrderRefund.tsx +++ b/src/orders/components/OrderRefund/OrderRefund.tsx @@ -1,8 +1,7 @@ -import { makeStyles } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField from "@saleor/components/RadioGroupField"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx index 4d827982621..c8c7d816bc8 100644 --- a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx +++ b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx @@ -1,14 +1,15 @@ -import { makeStyles } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Table from "@material-ui/core/Table"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; @@ -16,6 +17,7 @@ import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { renderCollection } from "@saleor/misc"; import { OrderRefundData_order_fulfillments } from "@saleor/orders/types/OrderRefundData"; +import { makeStyles } from "@saleor/theme"; import { FulfillmentStatus } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx index 7c0404c1516..57e7e04b592 100644 --- a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx +++ b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx @@ -1,10 +1,12 @@ -import { makeStyles, RadioGroup } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + FormControlLabel, + Radio, + RadioGroup, + Typography +} from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; @@ -12,6 +14,7 @@ import Hr from "@saleor/components/Hr"; import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx index 97b76a08fa8..ee4cf046713 100644 --- a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx +++ b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx @@ -1,8 +1,8 @@ -import { makeStyles } from "@material-ui/core"; import Money, { IMoney } from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; +import { makeStyles } from "@saleor/theme"; import classNames from "classnames"; -import { reduce } from "lodash"; +import reduce from "lodash/reduce"; import React from "react"; import { useIntl } from "react-intl"; import { defineMessages } from "react-intl"; diff --git a/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx b/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx index 9dfe9e450ac..b2b50ec14a0 100644 --- a/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx +++ b/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx @@ -1,7 +1,7 @@ -import { makeStyles } from "@material-ui/core"; import { IMoney } from "@saleor/components/Money"; import PriceField from "@saleor/components/PriceField"; import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { makeStyles } from "@saleor/theme"; import { getFormErrors } from "@saleor/utils/errors"; import getOrderErrorMessage from "@saleor/utils/errors/order"; import React from "react"; diff --git a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx index 67a7db7e46f..8159e2047a8 100644 --- a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx +++ b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx @@ -1,14 +1,15 @@ -import { makeStyles } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Table from "@material-ui/core/Table"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; @@ -16,6 +17,7 @@ import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { renderCollection } from "@saleor/misc"; import { OrderRefundData_order_lines } from "@saleor/orders/types/OrderRefundData"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx index 0b3942b47ec..ac2dc77f870 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx @@ -1,7 +1,8 @@ -import { makeStyles, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import DefaultCardTitle from "@saleor/components/CardTitle"; import { StatusType } from "@saleor/components/StatusChip/types"; import StatusLabel from "@saleor/components/StatusLabel"; +import { makeStyles } from "@saleor/theme"; import { FulfillmentStatus } from "@saleor/types/globalTypes"; import camelCase from "lodash/camelCase"; import React from "react"; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/MaximalButton.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/MaximalButton.tsx index 9fd5b1a57e4..02d1963611c 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/MaximalButton.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/MaximalButton.tsx @@ -1,4 +1,5 @@ -import { Button, makeStyles } from "@material-ui/core"; +import { Button } from "@material-ui/core"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx index a66d319efc3..37855dbf5bf 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx @@ -1,6 +1,4 @@ -import Popper from "@material-ui/core/Popper"; -import TableCell from "@material-ui/core/TableCell"; -import Typography from "@material-ui/core/Typography"; +import { Popper, TableCell, Typography } from "@material-ui/core"; import ErrorExclamationCircleIcon from "@saleor/icons/ErrorExclamationCircle"; import { makeStyles } from "@saleor/theme"; import React, { useState } from "react"; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx index ac13c0cc8d4..a0e40cc5ec9 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx @@ -2,7 +2,6 @@ import { Card, CardContent, Checkbox, - makeStyles, Table, TableBody, TableCell, @@ -20,6 +19,7 @@ import { OrderDetails_order, OrderDetails_order_lines } from "@saleor/orders/types/OrderDetails"; +import { makeStyles } from "@saleor/theme"; import React, { CSSProperties } from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderSettings/OrderSettings.tsx b/src/orders/components/OrderSettings/OrderSettings.tsx index 6c1ebe1f2f4..fc17ade6eae 100644 --- a/src/orders/components/OrderSettings/OrderSettings.tsx +++ b/src/orders/components/OrderSettings/OrderSettings.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import React from "react"; diff --git a/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx b/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx index 577a1d150e1..f8e34d47803 100644 --- a/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx +++ b/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index 15fd0970357..7713527ff86 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx index 0a7697bfa74..aad53645260 100644 --- a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx +++ b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx @@ -1,10 +1,8 @@ -import { makeStyles, TableBody } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; +import { Button, Card, CardActions, TableBody } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { renderCollection } from "@saleor/misc"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index c421185854b..e021fdb5e9f 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ChannelPickerDialog from "@saleor/channels/components/ChannelPickerDialog"; import ActionDialog from "@saleor/components/ActionDialog"; diff --git a/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx b/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx index 31ec3b1838f..5009eb25466 100644 --- a/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx +++ b/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableCell, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/pageTypes/components/PageTypeBulkDeleteDialog/PageTypeBulkDeleteDialog.tsx b/src/pageTypes/components/PageTypeBulkDeleteDialog/PageTypeBulkDeleteDialog.tsx index 34635bae07d..d52edc5bb3e 100644 --- a/src/pageTypes/components/PageTypeBulkDeleteDialog/PageTypeBulkDeleteDialog.tsx +++ b/src/pageTypes/components/PageTypeBulkDeleteDialog/PageTypeBulkDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx index 528b63c2152..71fda9d22f9 100644 --- a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx +++ b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { PageErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx index 3b3f7b2a7de..731df2a8e0f 100644 --- a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx +++ b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx @@ -1,5 +1,4 @@ -import { makeStyles } from "@material-ui/core"; -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; @@ -11,6 +10,7 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { commonMessages, sectionNames } from "@saleor/intl"; +import { makeStyles } from "@saleor/theme"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx index b1a6bc32c0c..1041c94a6bd 100644 --- a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx +++ b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx index 828c4d38f17..4d415c3c142 100644 --- a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx +++ b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { listActionsProps } from "@saleor/fixtures"; import { PageErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; diff --git a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx index 33cc2723be6..c6313546085 100644 --- a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx +++ b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; diff --git a/src/pageTypes/components/PageTypeList/PageTypeList.tsx b/src/pageTypes/components/PageTypeList/PageTypeList.tsx index bd84226d1d6..f8c56075112 100644 --- a/src/pageTypes/components/PageTypeList/PageTypeList.tsx +++ b/src/pageTypes/components/PageTypeList/PageTypeList.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx index 9d7260f403a..029c086564a 100644 --- a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx +++ b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/pageTypes/views/PageTypeDetails.tsx b/src/pageTypes/views/PageTypeDetails.tsx index e47afb6d847..53ed9928e68 100644 --- a/src/pageTypes/views/PageTypeDetails.tsx +++ b/src/pageTypes/views/PageTypeDetails.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { attributeUrl } from "@saleor/attributes/urls"; import AssignAttributeDialog from "@saleor/components/AssignAttributeDialog"; import AttributeUnassignDialog from "@saleor/components/AttributeUnassignDialog"; diff --git a/src/pageTypes/views/PageTypeList/PageTypeList.tsx b/src/pageTypes/views/PageTypeList/PageTypeList.tsx index 0736d854dc6..c5223b072f7 100644 --- a/src/pageTypes/views/PageTypeList/PageTypeList.tsx +++ b/src/pageTypes/views/PageTypeList/PageTypeList.tsx @@ -1,4 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { diff --git a/src/pages/components/PageInfo/PageInfo.tsx b/src/pages/components/PageInfo/PageInfo.tsx index 36e2027d68e..c298f513e26 100644 --- a/src/pages/components/PageInfo/PageInfo.tsx +++ b/src/pages/components/PageInfo/PageInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { diff --git a/src/pages/components/PageList/PageList.tsx b/src/pages/components/PageList/PageList.tsx index 394eace5954..7510e032d6b 100644 --- a/src/pages/components/PageList/PageList.tsx +++ b/src/pages/components/PageList/PageList.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/pages/components/PageListPage/PageListPage.tsx b/src/pages/components/PageListPage/PageListPage.tsx index aaf488cc785..4a1b519cb8d 100644 --- a/src/pages/components/PageListPage/PageListPage.tsx +++ b/src/pages/components/PageListPage/PageListPage.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx index 868ea49588b..6d35bfb288b 100644 --- a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx +++ b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx @@ -1,12 +1,10 @@ -import { makeStyles } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; import { PageTypeFragment } from "@saleor/fragments/types/PageTypeFragment"; import { FormChange } from "@saleor/hooks/useForm"; +import { makeStyles } from "@saleor/theme"; import { FetchMoreProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; import getPageErrorMessage from "@saleor/utils/errors/page"; diff --git a/src/pages/views/PageDetails.tsx b/src/pages/views/PageDetails.tsx index 93dcc58a779..14249e8fb56 100644 --- a/src/pages/views/PageDetails.tsx +++ b/src/pages/views/PageDetails.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import { useAttributeValueDeleteMutation } from "@saleor/attributes/mutations"; import { getAttributesAfterFileAttributesUpdate, diff --git a/src/pages/views/PageList/PageList.tsx b/src/pages/views/PageList/PageList.tsx index 8d876ae4b0e..214c25eb1d3 100644 --- a/src/pages/views/PageList/PageList.tsx +++ b/src/pages/views/PageList/PageList.tsx @@ -1,6 +1,4 @@ -import Button from "@material-ui/core/Button"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { Button, DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; diff --git a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx index 9d05956d5c7..da74a4cdfc2 100644 --- a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx +++ b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx @@ -1,14 +1,17 @@ -import { Checkbox, Typography } from "@material-ui/core"; -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Checkbox, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx index 496f637ae6a..10e688c1cb0 100644 --- a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx +++ b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx index a1193db15cc..1325b665e14 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx @@ -1,5 +1,4 @@ -import { Typography } from "@material-ui/core"; -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText, Typography } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; diff --git a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx index ec64abc6f87..ef773d435df 100644 --- a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx +++ b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; diff --git a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx index 33b544545c8..672f5e3a2ed 100644 --- a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx @@ -1,9 +1,11 @@ -import { TableHead } from "@material-ui/core"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + IconButton, + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx index e022a7e8348..844a8d59d56 100644 --- a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx +++ b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx index f4bdfcca55f..cfcba8787a4 100644 --- a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx +++ b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx @@ -1,9 +1,12 @@ -import { Button, IconButton } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx index 568c77bab78..44a61b98db0 100644 --- a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx +++ b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/permissionGroups/utils.ts b/src/permissionGroups/utils.ts index b924f1cd99e..ce80d54b077 100644 --- a/src/permissionGroups/utils.ts +++ b/src/permissionGroups/utils.ts @@ -1,6 +1,6 @@ import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; import { User } from "@saleor/fragments/types/User"; -import difference from "lodash-es/difference"; +import difference from "lodash/difference"; import { PermissionGroupDetailsPageFormData } from "./components/PermissionGroupDetailsPage"; import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index 912006049fb..d99e4cb85d5 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; diff --git a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx index 2fa9877dd63..ce97b3230fd 100644 --- a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx +++ b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx @@ -1,8 +1,8 @@ -import { CardContent, makeStyles, Typography } from "@material-ui/core"; import CollectionWithDividers from "@saleor/components/CollectionWithDividers"; import Skeleton from "@saleor/components/Skeleton"; import { Plugin_plugin } from "@saleor/plugins/types/Plugin"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -29,6 +29,8 @@ export interface PluginDetailsChannelsCardProps { plugin: Plugin_plugin; } +import { CardContent, Typography } from "@material-ui/core"; + import { pluginDetailsChannelsCardMessages as messages } from "./messages"; const PluginDetailsChannelsCardContent: React.FC = ({ diff --git a/src/plugins/components/PluginInfo/PluginInfo.tsx b/src/plugins/components/PluginInfo/PluginInfo.tsx index 69586164a57..ef4ba04b7d5 100644 --- a/src/plugins/components/PluginInfo/PluginInfo.tsx +++ b/src/plugins/components/PluginInfo/PluginInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx index 30fd08383ed..f0ef5d2e445 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/plugins/components/PluginSettings/PluginSettings.tsx b/src/plugins/components/PluginSettings/PluginSettings.tsx index ef2a903bdc7..46ddefda8f1 100644 --- a/src/plugins/components/PluginSettings/PluginSettings.tsx +++ b/src/plugins/components/PluginSettings/PluginSettings.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Tooltip from "@material-ui/core/Tooltip"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TextField, + Tooltip, + Typography +} from "@material-ui/core"; import InfoIcon from "@material-ui/icons/Info"; import CardTitle from "@saleor/components/CardTitle"; import ControlledSwitch from "@saleor/components/ControlledSwitch"; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx index 185b3eff457..e91fdfa6db0 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx @@ -1,6 +1,7 @@ -import { Card, makeStyles, Popper } from "@material-ui/core"; +import { Card, Popper } from "@material-ui/core"; import { Plugin_plugin } from "@saleor/plugins/types/Plugin"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import ChannelConfigPluginPopupBody from "./ChannelConfigPluginPopupBody"; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/ScrollableContent.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/ScrollableContent.tsx index ec7968ec398..33e48c47de1 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/ScrollableContent.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/ScrollableContent.tsx @@ -1,4 +1,4 @@ -import List from "@material-ui/core/List"; +import { List } from "@material-ui/core"; import { makeStyles } from "@saleor/theme"; import React from "react"; diff --git a/src/plugins/components/PluginsList/PluginsList.tsx b/src/plugins/components/PluginsList/PluginsList.tsx index 8bea9653464..e07985cd431 100644 --- a/src/plugins/components/PluginsList/PluginsList.tsx +++ b/src/plugins/components/PluginsList/PluginsList.tsx @@ -1,14 +1,11 @@ -import { makeStyles } from "@material-ui/core"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import EditIcon from "@material-ui/icons/Edit"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TablePagination from "@saleor/components/TablePagination"; import { renderCollection } from "@saleor/misc"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; +import { makeStyles } from "@saleor/theme"; import { ListProps, SortPage } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/plugins/components/PluginsListPage/PluginsListPage.tsx b/src/plugins/components/PluginsListPage/PluginsListPage.tsx index 5fec3ef02e5..ecd1d01d2af 100644 --- a/src/plugins/components/PluginsListPage/PluginsListPage.tsx +++ b/src/plugins/components/PluginsListPage/PluginsListPage.tsx @@ -1,4 +1,4 @@ -import Card from "@material-ui/core/Card"; +import { Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; diff --git a/src/plugins/views/PluginsDetails.tsx b/src/plugins/views/PluginsDetails.tsx index a2534ec747f..89b92c6921d 100644 --- a/src/plugins/views/PluginsDetails.tsx +++ b/src/plugins/views/PluginsDetails.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; diff --git a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx index 311c40a8510..6c4ea54e2b4 100644 --- a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx +++ b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableCell, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx index fdc6c8deec4..383f3de9c1c 100644 --- a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx +++ b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx index d79b203cbaf..062bf89a4c7 100644 --- a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx @@ -1,8 +1,10 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + TableBody, + TableCell, + TableFooter, + TableRow, + Typography +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx index 495dafe0500..2ff2194d04b 100644 --- a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx +++ b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; diff --git a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx index 4d054524be1..732ee1963b6 100644 --- a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx +++ b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import React from "react"; diff --git a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx index 22e888b8b1a..3f0b4e3eee8 100644 --- a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx +++ b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import { ProductTypeDetails_taxTypes } from "@saleor/productTypes/types/ProductTypeDetails"; diff --git a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx index 57017b8069e..963b89e261a 100644 --- a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx @@ -1,4 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { diff --git a/src/productTypes/views/ProductTypeUpdate/index.tsx b/src/productTypes/views/ProductTypeUpdate/index.tsx index 2994f6fe86f..bcbce53ba4d 100644 --- a/src/productTypes/views/ProductTypeUpdate/index.tsx +++ b/src/productTypes/views/ProductTypeUpdate/index.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { attributeUrl } from "@saleor/attributes/urls"; import AssignAttributeDialog from "@saleor/components/AssignAttributeDialog"; import AttributeUnassignDialog from "@saleor/components/AttributeUnassignDialog"; diff --git a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx index 03a0b30cb7f..9e51477961b 100644 --- a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx +++ b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import FormSpacer from "@saleor/components/FormSpacer"; import MultiSelectField from "@saleor/components/MultiSelectField"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx index 5b6af5fe8dc..e5afd12f0dc 100644 --- a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx +++ b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx @@ -1,7 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; diff --git a/src/products/components/ProductExportDialog/ProductExportDialog.tsx b/src/products/components/ProductExportDialog/ProductExportDialog.tsx index 16d608598d6..978c67ae970 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialog.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Typography +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx index e751010f82b..7b152c8e9ca 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + CircularProgress, + FormControlLabel, + TextField, + Typography +} from "@material-ui/core"; import Accordion, { AccordionProps } from "@saleor/components/Accordion"; import { useChannelsSearch } from "@saleor/components/ChannelsAvailabilityDialog/utils"; import ChannelsAvailabilityDialogChannelsList from "@saleor/components/ChannelsAvailabilityDialogChannelsList"; diff --git a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx index 68b29c96f6f..9da81b0f43c 100644 --- a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx +++ b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField, + Typography +} from "@material-ui/core"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import { buttonMessages } from "@saleor/intl"; diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 7c1fc9d58d2..4e0aa9ab2a9 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -1,8 +1,10 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + TableBody, + TableCell, + TableFooter, + TableRow, + Typography +} from "@material-ui/core"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; import Checkbox from "@saleor/components/Checkbox"; import MoneyRange from "@saleor/components/MoneyRange"; diff --git a/src/products/components/ProductListPage/ProductListPage.tsx b/src/products/components/ProductListPage/ProductListPage.tsx index ad6193847d7..4d1487075fb 100644 --- a/src/products/components/ProductListPage/ProductListPage.tsx +++ b/src/products/components/ProductListPage/ProductListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Alert from "@saleor/components/Alert/Alert"; import CardMenu from "@saleor/components/CardMenu"; import ColumnPicker, { diff --git a/src/products/components/ProductMedia/ProductMedia.tsx b/src/products/components/ProductMedia/ProductMedia.tsx index 96879e3e8a0..0e886d3768d 100644 --- a/src/products/components/ProductMedia/ProductMedia.tsx +++ b/src/products/components/ProductMedia/ProductMedia.tsx @@ -1,6 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Button, Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ImageUpload from "@saleor/components/ImageUpload"; import MediaTile from "@saleor/components/MediaTile"; diff --git a/src/products/components/ProductMediaNavigation/ProductMediaNavigation.tsx b/src/products/components/ProductMediaNavigation/ProductMediaNavigation.tsx index c4252286965..5da1f23a783 100644 --- a/src/products/components/ProductMediaNavigation/ProductMediaNavigation.tsx +++ b/src/products/components/ProductMediaNavigation/ProductMediaNavigation.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; import { makeStyles } from "@saleor/theme"; diff --git a/src/products/components/ProductMediaPage/ProductMediaPage.tsx b/src/products/components/ProductMediaPage/ProductMediaPage.tsx index 9c0f2048a95..bbd936a10f6 100644 --- a/src/products/components/ProductMediaPage/ProductMediaPage.tsx +++ b/src/products/components/ProductMediaPage/ProductMediaPage.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/products/components/ProductMediaPopper/ProductMediaPopper.tsx b/src/products/components/ProductMediaPopper/ProductMediaPopper.tsx index 686991f6574..6c3f8cf97ef 100644 --- a/src/products/components/ProductMediaPopper/ProductMediaPopper.tsx +++ b/src/products/components/ProductMediaPopper/ProductMediaPopper.tsx @@ -1,9 +1,11 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/MenuList"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { + ClickAwayListener, + Grow, + MenuItem, + MenuList as Menu, + Paper, + Popper +} from "@material-ui/core"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/products/components/ProductOrganization/ProductOrganization.tsx b/src/products/components/ProductOrganization/ProductOrganization.tsx index 685cde9c33e..9a072eb44a6 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; diff --git a/src/products/components/ProductShipping/ProductShipping.tsx b/src/products/components/ProductShipping/ProductShipping.tsx index 1ce534eb69f..d39735cf977 100644 --- a/src/products/components/ProductShipping/ProductShipping.tsx +++ b/src/products/components/ProductShipping/ProductShipping.tsx @@ -1,7 +1,9 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import InputAdornment from "@material-ui/core/InputAdornment"; -import TextField from "@material-ui/core/TextField"; +import { + Card, + CardContent, + InputAdornment, + TextField +} from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; diff --git a/src/products/components/ProductStocks/CardAddItemsFooter.tsx b/src/products/components/ProductStocks/CardAddItemsFooter.tsx index b3379c99779..4881a0431a6 100644 --- a/src/products/components/ProductStocks/CardAddItemsFooter.tsx +++ b/src/products/components/ProductStocks/CardAddItemsFooter.tsx @@ -1,7 +1,7 @@ import { IconButton } from "@material-ui/core"; -import { makeStyles } from "@material-ui/core"; import AddIcon from "@material-ui/icons/Add"; import Link from "@saleor/components/Link"; +import { makeStyles } from "@saleor/theme"; import React, { MutableRefObject } from "react"; import { MessageDescriptor, useIntl } from "react-intl"; diff --git a/src/products/components/ProductStocks/ProductStocks.tsx b/src/products/components/ProductStocks/ProductStocks.tsx index 326e723348b..bb294539abc 100644 --- a/src/products/components/ProductStocks/ProductStocks.tsx +++ b/src/products/components/ProductStocks/ProductStocks.tsx @@ -1,19 +1,21 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import IconButton from "@material-ui/core/IconButton"; -import MenuItem from "@material-ui/core/MenuItem"; -import Paper from "@material-ui/core/Paper"; -import Popper from "@material-ui/core/Popper"; +import { + Card, + CardContent, + ClickAwayListener, + Grow, + IconButton, + MenuItem, + Paper, + Popper, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import Table from "@material-ui/core/Table"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; import AddIcon from "@material-ui/icons/Add"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/products/components/ProductTaxes/ProductTaxes.tsx b/src/products/components/ProductTaxes/ProductTaxes.tsx index d5c4e518b1f..e37032c2482 100644 --- a/src/products/components/ProductTaxes/ProductTaxes.tsx +++ b/src/products/components/ProductTaxes/ProductTaxes.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; diff --git a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx index 061174d4fbd..70327c4e6d3 100644 --- a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx +++ b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx index db5051163f2..287541f6702 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; +import { Button, Typography } from "@material-ui/core"; import Container from "@saleor/components/Container"; import Hr from "@saleor/components/Hr"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx index e6174f9ad4b..422220af621 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx @@ -1,9 +1,11 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + FormControlLabel, + Radio, + RadioGroup, + Typography +} from "@material-ui/core"; import { ChannelPriceData } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx index 39e864a9c2a..4428f12e929 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx @@ -1,10 +1,12 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Radio from "@material-ui/core/Radio"; -import RadioGroup from "@material-ui/core/RadioGroup"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + FormControlLabel, + Radio, + RadioGroup, + TextField, + Typography +} from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx index d5bb298fca0..7ad2751a45a 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx @@ -1,11 +1,9 @@ -import Card from "@material-ui/core/Card"; +import { Card, IconButton, TextField } from "@material-ui/core"; import blue from "@material-ui/core/colors/blue"; import cyan from "@material-ui/core/colors/cyan"; import green from "@material-ui/core/colors/green"; import purple from "@material-ui/core/colors/purple"; import yellow from "@material-ui/core/colors/yellow"; -import IconButton from "@material-ui/core/IconButton"; -import TextField from "@material-ui/core/TextField"; import DeleteIcon from "@material-ui/icons/Delete"; import { ChannelPriceData } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx index 689be7b2edf..1b9af2d2be8 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import Alert from "@saleor/components/Alert/Alert"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx index dab61d374fb..7229014f669 100644 --- a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx +++ b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx index 6a257b741bb..98f871050eb 100644 --- a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx +++ b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx @@ -1,8 +1,10 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle +} from "@material-ui/core"; import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment"; import { buttonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/theme"; diff --git a/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx b/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx index 5e0c05b95d6..b57daad49c3 100644 --- a/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx +++ b/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment"; diff --git a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx index 5c51f962d65..879fc343688 100644 --- a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx +++ b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx @@ -1,8 +1,5 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card, TableCell, TableRow } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx b/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx index 8d200f8fa1e..35a7558d349 100644 --- a/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx +++ b/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx @@ -3,13 +3,13 @@ import { Divider, ExpansionPanel, ExpansionPanelSummary, - makeStyles, Typography } from "@material-ui/core"; import Skeleton from "@saleor/components/Skeleton"; import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import IconChevronDown from "@saleor/icons/ChevronDown"; +import { makeStyles } from "@saleor/theme"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index e04c0343b42..f98b924d2c2 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -1,12 +1,12 @@ import { + Card, + CardContent, TableBody, TableCell, TableHead, TableRow, Typography } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; import { ChannelData, ChannelPriceArgs } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; import PriceField from "@saleor/components/PriceField"; diff --git a/src/products/components/ProductVariants/ProductVariants.tsx b/src/products/components/ProductVariants/ProductVariants.tsx index 7420bc2b418..f81d49e8204 100644 --- a/src/products/components/ProductVariants/ProductVariants.tsx +++ b/src/products/components/ProductVariants/ProductVariants.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Hidden from "@material-ui/core/Hidden"; +import { + Button, + Card, + CardContent, + Hidden, + TableCell, + Typography +} from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import TableCell from "@material-ui/core/TableCell"; -import Typography from "@material-ui/core/Typography"; import Alert from "@saleor/components/Alert/Alert"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/products/views/ProductImage.tsx b/src/products/views/ProductImage.tsx index 974ad253ab1..fa8ede1a120 100644 --- a/src/products/views/ProductImage.tsx +++ b/src/products/views/ProductImage.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; import useNavigator from "@saleor/hooks/useNavigator"; diff --git a/src/products/views/ProductList/ProductList.tsx b/src/products/views/ProductList/ProductList.tsx index 264c409d7f8..b49441a5c34 100644 --- a/src/products/views/ProductList/ProductList.tsx +++ b/src/products/views/ProductList/ProductList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/products/views/ProductList/filters.ts b/src/products/views/ProductList/filters.ts index 9b5a6921477..1ad7eff8967 100644 --- a/src/products/views/ProductList/filters.ts +++ b/src/products/views/ProductList/filters.ts @@ -21,7 +21,7 @@ import { SearchProductTypesVariables } from "@saleor/searches/types/SearchProductTypes"; import { mapEdgesToItems, mapNodeToChoice } from "@saleor/utils/maps"; -import isArray from "lodash-es/isArray"; +import isArray from "lodash/isArray"; import { IFilterElement } from "../../../components/Filter"; import { diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index 7fa2322a4ea..3b294700cc4 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -1,6 +1,5 @@ import placeholderImg from "@assets/images/placeholder255x255.png"; -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { useAttributeValueDeleteMutation } from "@saleor/attributes/mutations"; import ChannelsWithVariantsAvailabilityDialog from "@saleor/channels/components/ChannelsWithVariantsAvailabilityDialog"; diff --git a/src/products/views/ProductUpdate/useChannelsWithProductVariants.ts b/src/products/views/ProductUpdate/useChannelsWithProductVariants.ts index 2eae15ade96..5f2a70330eb 100644 --- a/src/products/views/ProductUpdate/useChannelsWithProductVariants.ts +++ b/src/products/views/ProductUpdate/useChannelsWithProductVariants.ts @@ -1,6 +1,6 @@ import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import isEmpty from "lodash-es/isEmpty"; -import reduce from "lodash-es/reduce"; +import isEmpty from "lodash/isEmpty"; +import reduce from "lodash/reduce"; import { useEffect, useRef, useState } from "react"; import { diff --git a/src/products/views/ProductUpdate/utils.ts b/src/products/views/ProductUpdate/utils.ts index db4dccc5fe5..28b3be4bf2a 100644 --- a/src/products/views/ProductUpdate/utils.ts +++ b/src/products/views/ProductUpdate/utils.ts @@ -4,8 +4,8 @@ import { } from "@saleor/channels/pages/ChannelDetailsPage/utils"; import { ChannelData } from "@saleor/channels/utils"; import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; -import { reduce } from "lodash"; -import every from "lodash-es/every"; +import every from "lodash/every"; +import reduce from "lodash/reduce"; import { ChannelsWithVariantsData, diff --git a/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx b/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx index 1476c57c0ae..dd5fa09804d 100644 --- a/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx +++ b/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/shipping/components/OrderValue/OrderValue.tsx b/src/shipping/components/OrderValue/OrderValue.tsx index 2d1e1246771..670f241d8ef 100644 --- a/src/shipping/components/OrderValue/OrderValue.tsx +++ b/src/shipping/components/OrderValue/OrderValue.tsx @@ -1,9 +1,11 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import { ChannelShippingData } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; diff --git a/src/shipping/components/OrderWeight/OrderWeight.tsx b/src/shipping/components/OrderWeight/OrderWeight.tsx index 69e680410c9..bad24c7dd5d 100644 --- a/src/shipping/components/OrderWeight/OrderWeight.tsx +++ b/src/shipping/components/OrderWeight/OrderWeight.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; diff --git a/src/shipping/components/PricingCard/PricingCard.tsx b/src/shipping/components/PricingCard/PricingCard.tsx index 922df602efe..962cec3db1b 100644 --- a/src/shipping/components/PricingCard/PricingCard.tsx +++ b/src/shipping/components/PricingCard/PricingCard.tsx @@ -1,9 +1,11 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Card, + CardContent, + TableBody, + TableCell, + TableRow, + Typography +} from "@material-ui/core"; import { ChannelShippingData } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; import PriceField from "@saleor/components/PriceField"; diff --git a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx index 135322bcbdd..47222b02e42 100644 --- a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx +++ b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx @@ -1,11 +1,13 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx index 5fcb832d974..a8584431b95 100644 --- a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx +++ b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx @@ -1,13 +1,15 @@ -import Button from "@material-ui/core/Button"; -import CircularProgress from "@material-ui/core/CircularProgress"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + CircularProgress, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx index 867b89900c5..0e36aaf8561 100644 --- a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx +++ b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx @@ -1,7 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import RichTextEditor, { diff --git a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx index 4d7dec6c522..4843fb38b39 100644 --- a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx +++ b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import CardContent from "@material-ui/core/CardContent"; +import { Button, Card, CardActions, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Form from "@saleor/components/Form"; import Hr from "@saleor/components/Hr"; diff --git a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx index e85e765275e..1468d783087 100644 --- a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx +++ b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import CompanyAddressForm from "@saleor/components/CompanyAddressInput/CompanyAddressForm"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx index af49b8bec62..303844462d7 100644 --- a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx +++ b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx @@ -1,13 +1,15 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableRow from "@material-ui/core/TableRow"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TableBody, + TableCell, + TableRow, + TextField, + Typography +} from "@material-ui/core"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx index 95c579fc753..e13a72ad011 100644 --- a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx +++ b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; diff --git a/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx b/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx index bd91ec06ca9..04b8db6a31a 100644 --- a/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx +++ b/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField, + Typography +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx index 0a46ef8dcb9..88fa9ad5640 100644 --- a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx +++ b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx @@ -1,12 +1,14 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + IconButton, + TableBody, + TableCell, + TableHead, + TableRow, + Typography +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField from "@saleor/components/RadioGroupField"; diff --git a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx index feba5d26bc7..11e7f88a8eb 100644 --- a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx +++ b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx index 7fe76d4171f..393918cb5ad 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx @@ -1,6 +1,4 @@ -import { Divider } from "@material-ui/core"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent, Divider } from "@material-ui/core"; import { Channels_channels } from "@saleor/channels/types/Channels"; import CardTitle from "@saleor/components/CardTitle"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; diff --git a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx index 4bee8f5da36..f2aee671a2c 100644 --- a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx +++ b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableFooter, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; diff --git a/src/shipping/components/UnassignDialog/UnassignDialog.tsx b/src/shipping/components/UnassignDialog/UnassignDialog.tsx index ca2f71a5a86..eb69a46341b 100644 --- a/src/shipping/components/UnassignDialog/UnassignDialog.tsx +++ b/src/shipping/components/UnassignDialog/UnassignDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/shipping/handlers.ts b/src/shipping/handlers.ts index 33ca7e27f79..1a3ee4f0275 100644 --- a/src/shipping/handlers.ts +++ b/src/shipping/handlers.ts @@ -14,7 +14,7 @@ import { ShippingPostalCodeRulesCreateInputRange } from "@saleor/types/globalTypes"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; -import { differenceBy } from "lodash"; +import differenceBy from "lodash/differenceBy"; import { useIntl } from "react-intl"; import { diff --git a/src/shipping/views/PriceRatesUpdate/PriceRatesUpdate.tsx b/src/shipping/views/PriceRatesUpdate/PriceRatesUpdate.tsx index 33e1a469109..2e0c4de251d 100644 --- a/src/shipping/views/PriceRatesUpdate/PriceRatesUpdate.tsx +++ b/src/shipping/views/PriceRatesUpdate/PriceRatesUpdate.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { createShippingChannelsFromRate, createSortedShippingChannels diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 3077b70e0fd..067d2844365 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import { useChannelsList } from "@saleor/channels/queries"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; diff --git a/src/shipping/views/ShippingZonesList.tsx b/src/shipping/views/ShippingZonesList.tsx index b6ee8c11c35..db0d4fc529c 100644 --- a/src/shipping/views/ShippingZonesList.tsx +++ b/src/shipping/views/ShippingZonesList.tsx @@ -1,5 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; -import IconButton from "@material-ui/core/IconButton"; +import { DialogContentText, IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; diff --git a/src/shipping/views/WeightRatesUpdate/WeightRatesUpdate.tsx b/src/shipping/views/WeightRatesUpdate/WeightRatesUpdate.tsx index b7978e15671..f678d2de4a6 100644 --- a/src/shipping/views/WeightRatesUpdate/WeightRatesUpdate.tsx +++ b/src/shipping/views/WeightRatesUpdate/WeightRatesUpdate.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { createShippingChannelsFromRate, createSortedShippingChannels diff --git a/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx b/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx index 111c3e71b7f..c25da371ca1 100644 --- a/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx +++ b/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 82af939fce5..48201774d18 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -1,4 +1,4 @@ -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CompanyAddressInput from "@saleor/components/CompanyAddressInput"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx index cdbb03e0a2e..78f037453e1 100644 --- a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx +++ b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx b/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx index 734a55718ad..c3275d04e59 100644 --- a/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx +++ b/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { userPermissionGroups } from "@saleor/permissionGroups/fixtures"; import StaffDetailsPage, { StaffDetailsPageProps diff --git a/src/staff/components/StaffList/StaffList.tsx b/src/staff/components/StaffList/StaffList.tsx index 012a979430c..f61d3cfb428 100644 --- a/src/staff/components/StaffList/StaffList.tsx +++ b/src/staff/components/StaffList/StaffList.tsx @@ -1,9 +1,11 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import Typography from "@material-ui/core/Typography"; +import { + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow, + Typography +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; diff --git a/src/staff/components/StaffListPage/StaffListPage.tsx b/src/staff/components/StaffListPage/StaffListPage.tsx index 93f4fb1e1ea..1c8bbe55ced 100644 --- a/src/staff/components/StaffListPage/StaffListPage.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Alert from "@saleor/components/Alert/Alert"; import AppHeader from "@saleor/components/AppHeader"; import { Container } from "@saleor/components/Container"; diff --git a/src/staff/components/StaffPassword/StaffPassword.tsx b/src/staff/components/StaffPassword/StaffPassword.tsx index fe51fbc2bbd..092cb04fd79 100644 --- a/src/staff/components/StaffPassword/StaffPassword.tsx +++ b/src/staff/components/StaffPassword/StaffPassword.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Button, Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx index 429984bdf5d..a74b90dc4a6 100644 --- a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx +++ b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx @@ -1,9 +1,11 @@ -import Button from "@material-ui/core/Button"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogContent from "@material-ui/core/DialogContent"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import TextField from "@material-ui/core/TextField"; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField +} from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/staff/components/StaffPreferences/StaffPreferences.tsx b/src/staff/components/StaffPreferences/StaffPreferences.tsx index 8191098ed8d..170e0bec130 100644 --- a/src/staff/components/StaffPreferences/StaffPreferences.tsx +++ b/src/staff/components/StaffPreferences/StaffPreferences.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import { Locale, localeNames } from "@saleor/components/Locale"; diff --git a/src/staff/components/StaffProperties/StaffProperties.tsx b/src/staff/components/StaffProperties/StaffProperties.tsx index eeb7c39c798..f9c5a8088d8 100644 --- a/src/staff/components/StaffProperties/StaffProperties.tsx +++ b/src/staff/components/StaffProperties/StaffProperties.tsx @@ -1,8 +1,5 @@ import photoIcon from "@assets/images/photo-icon.svg"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; import { commonMessages } from "@saleor/intl"; diff --git a/src/staff/utils.ts b/src/staff/utils.ts index a2d427a4875..dbe92eaab31 100644 --- a/src/staff/utils.ts +++ b/src/staff/utils.ts @@ -1,4 +1,4 @@ -import difference from "lodash-es/difference"; +import difference from "lodash/difference"; import { StaffDetailsFormData } from "./components/StaffDetailsPage"; import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; diff --git a/src/staff/views/StaffDetails.tsx b/src/staff/views/StaffDetails.tsx index 5f89100a316..5034d021087 100644 --- a/src/staff/views/StaffDetails.tsx +++ b/src/staff/views/StaffDetails.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; diff --git a/src/storybook/CardDecorator.tsx b/src/storybook/CardDecorator.tsx index 6f113a51411..850171ab1a2 100644 --- a/src/storybook/CardDecorator.tsx +++ b/src/storybook/CardDecorator.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import React from "react"; const CardDecorator = storyFn => ( diff --git a/src/storybook/stories/categories/CategoryUpdatePage.tsx b/src/storybook/stories/categories/CategoryUpdatePage.tsx index ec5a824bafc..416129ce8e4 100644 --- a/src/storybook/stories/categories/CategoryUpdatePage.tsx +++ b/src/storybook/stories/categories/CategoryUpdatePage.tsx @@ -1,5 +1,4 @@ import placeholderImage from "@assets/images/placeholder255x255.png"; -import { Omit } from "@material-ui/core"; import { ProductErrorCode } from "@saleor/types/globalTypes"; import { mapEdgesToItems, mapNodeToChoice } from "@saleor/utils/maps"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/collections/CollectionCreatePage.tsx b/src/storybook/stories/collections/CollectionCreatePage.tsx index 50715681efe..cd0c57e035e 100644 --- a/src/storybook/stories/collections/CollectionCreatePage.tsx +++ b/src/storybook/stories/collections/CollectionCreatePage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { channelsList } from "@saleor/channels/fixtures"; import { createCollectionChannels } from "@saleor/channels/utils"; import { CollectionErrorCode } from "@saleor/types/globalTypes"; diff --git a/src/storybook/stories/collections/CollectionDetailsPage.tsx b/src/storybook/stories/collections/CollectionDetailsPage.tsx index 7a6429f80eb..2fbae68f02f 100644 --- a/src/storybook/stories/collections/CollectionDetailsPage.tsx +++ b/src/storybook/stories/collections/CollectionDetailsPage.tsx @@ -1,6 +1,5 @@ import placeholderCollectionImage from "@assets/images/block1.jpg"; import placeholderProductImage from "@assets/images/placeholder60x60.png"; -import { Omit } from "@material-ui/core"; import { createCollectionChannelsData } from "@saleor/channels/utils"; import { CollectionErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/components/AddressEdit.tsx b/src/storybook/stories/components/AddressEdit.tsx index c5b8ed4ca40..3ccd1866417 100644 --- a/src/storybook/stories/components/AddressEdit.tsx +++ b/src/storybook/stories/components/AddressEdit.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import AddressEdit from "@saleor/components/AddressEdit"; import { mapCountriesToChoices } from "@saleor/utils/maps"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/components/AutocompleteSelectMenu.tsx b/src/storybook/stories/components/AutocompleteSelectMenu.tsx index 2cfd33d724a..0a9baccd52d 100644 --- a/src/storybook/stories/components/AutocompleteSelectMenu.tsx +++ b/src/storybook/stories/components/AutocompleteSelectMenu.tsx @@ -1,5 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; +import { Card, CardContent } from "@material-ui/core"; import AutocompleteSelectMenu, { AutocompleteSelectMenuProps } from "@saleor/components/AutocompleteSelectMenu"; diff --git a/src/storybook/stories/components/EditableTableCell.tsx b/src/storybook/stories/components/EditableTableCell.tsx index c67d4a16a29..b5519555e95 100644 --- a/src/storybook/stories/components/EditableTableCell.tsx +++ b/src/storybook/stories/components/EditableTableCell.tsx @@ -1,7 +1,4 @@ -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { TableBody, TableCell, TableHead, TableRow } from "@material-ui/core"; import EditableTableCell from "@saleor/components/EditableTableCell"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/components/ErrorPage.tsx b/src/storybook/stories/components/ErrorPage.tsx index a9b66f288b8..16ddfa64f1f 100644 --- a/src/storybook/stories/components/ErrorPage.tsx +++ b/src/storybook/stories/components/ErrorPage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import ErrorPage, { ErrorPageProps } from "@saleor/components/ErrorPage"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/components/PageHeader.tsx b/src/storybook/stories/components/PageHeader.tsx index 58105fcb699..a23a2ebf75e 100644 --- a/src/storybook/stories/components/PageHeader.tsx +++ b/src/storybook/stories/components/PageHeader.tsx @@ -1,4 +1,4 @@ -import IconButton from "@material-ui/core/IconButton"; +import { IconButton } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import PageHeader from "@saleor/components/PageHeader"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/components/messages.tsx b/src/storybook/stories/components/messages.tsx index f661e09b7e8..24ab6346c5a 100644 --- a/src/storybook/stories/components/messages.tsx +++ b/src/storybook/stories/components/messages.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import { IMessage } from "@saleor/components/messages"; import useNotifier from "@saleor/hooks/useNotifier"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/customers/CustomerCreatePage.tsx b/src/storybook/stories/customers/CustomerCreatePage.tsx index 9d3f32d9d39..2d3dda87f96 100644 --- a/src/storybook/stories/customers/CustomerCreatePage.tsx +++ b/src/storybook/stories/customers/CustomerCreatePage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/customers/CustomerDetailsPage.tsx b/src/storybook/stories/customers/CustomerDetailsPage.tsx index b0d01c917b6..6557eadc1aa 100644 --- a/src/storybook/stories/customers/CustomerDetailsPage.tsx +++ b/src/storybook/stories/customers/CustomerDetailsPage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/home/HomePage.tsx b/src/storybook/stories/home/HomePage.tsx index 54f3fe48517..551b4606771 100644 --- a/src/storybook/stories/home/HomePage.tsx +++ b/src/storybook/stories/home/HomePage.tsx @@ -1,5 +1,4 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; -import { Omit } from "@material-ui/core"; import { adminUserPermissions } from "@saleor/fixtures"; import { PermissionEnum } from "@saleor/types/globalTypes"; import { mapEdgesToItems } from "@saleor/utils/maps"; diff --git a/src/storybook/stories/orders/OrderCustomer.tsx b/src/storybook/stories/orders/OrderCustomer.tsx index 10a8f911aa0..ea34b40c9be 100644 --- a/src/storybook/stories/orders/OrderCustomer.tsx +++ b/src/storybook/stories/orders/OrderCustomer.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { adminUserPermissions } from "@saleor/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderDetailsPage.tsx b/src/storybook/stories/orders/OrderDetailsPage.tsx index 3cf372bb8ea..bd100dfb27f 100644 --- a/src/storybook/stories/orders/OrderDetailsPage.tsx +++ b/src/storybook/stories/orders/OrderDetailsPage.tsx @@ -1,5 +1,4 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; -import { Omit } from "@material-ui/core"; import { adminUserPermissions } from "@saleor/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderDraftPage/OrderDraftPage.tsx b/src/storybook/stories/orders/OrderDraftPage/OrderDraftPage.tsx index 9611b645f9e..65e3fc61fa2 100644 --- a/src/storybook/stories/orders/OrderDraftPage/OrderDraftPage.tsx +++ b/src/storybook/stories/orders/OrderDraftPage/OrderDraftPage.tsx @@ -1,5 +1,4 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; -import { Omit } from "@material-ui/core"; import { adminUserPermissions, fetchMoreProps } from "@saleor/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderFulfillmentDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentDialog.tsx index 5b91a2996db..8592005d65b 100644 --- a/src/storybook/stories/orders/OrderFulfillmentDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentDialog.tsx @@ -1,5 +1,4 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; -import { Omit } from "@material-ui/core"; import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx index a8e84a1f6dd..fd53d7716e4 100644 --- a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx index 8f82d30bd09..7e5deeb0a5e 100644 --- a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { listActionsProps } from "@saleor/fixtures"; import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; diff --git a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx index 4cc3cc3628c..5ea7eb96f23 100644 --- a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx +++ b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx @@ -1,4 +1,3 @@ -import { Omit } from "@material-ui/core"; import { ShopErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/taxes/components/CountryList/CountryList.tsx b/src/taxes/components/CountryList/CountryList.tsx index 06832f785c0..32dd8e77be8 100644 --- a/src/taxes/components/CountryList/CountryList.tsx +++ b/src/taxes/components/CountryList/CountryList.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import { makeStyles } from "@saleor/theme"; diff --git a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx index c2666f3a2dd..81e44fae386 100644 --- a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx +++ b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import { Container } from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; diff --git a/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx b/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx index 2aede4076a5..08c3a4cf8b4 100644 --- a/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx +++ b/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx @@ -1,7 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardActions from "@material-ui/core/CardActions"; -import CardContent from "@material-ui/core/CardContent"; +import { Button, Card, CardActions, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; diff --git a/src/translations/components/TranslationFields/TranslationFields.tsx b/src/translations/components/TranslationFields/TranslationFields.tsx index 587b273f1da..5ce5283809a 100644 --- a/src/translations/components/TranslationFields/TranslationFields.tsx +++ b/src/translations/components/TranslationFields/TranslationFields.tsx @@ -1,9 +1,11 @@ import { OutputData } from "@editorjs/editorjs"; -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import IconButton from "@material-ui/core/IconButton"; -import Typography from "@material-ui/core/Typography"; +import { + Button, + Card, + CardContent, + IconButton, + Typography +} from "@material-ui/core"; import ArrowIcon from "@material-ui/icons/ArrowDropDown"; import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/translations/components/TranslationFields/TranslationFieldsLong.tsx b/src/translations/components/TranslationFields/TranslationFieldsLong.tsx index f24e0e69400..8b436644723 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsLong.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsLong.tsx @@ -1,5 +1,4 @@ -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { TextField, Typography } from "@material-ui/core"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import React from "react"; diff --git a/src/translations/components/TranslationFields/TranslationFieldsRich.tsx b/src/translations/components/TranslationFields/TranslationFieldsRich.tsx index 51dde46b7c5..1f303131a37 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsRich.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsRich.tsx @@ -1,5 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import Typography from "@material-ui/core/Typography"; +import { Typography } from "@material-ui/core"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import RichTextEditor from "@saleor/components/RichTextEditor"; import RichTextEditorContent from "@saleor/components/RichTextEditor/RichTextEditorContent"; diff --git a/src/translations/components/TranslationFields/TranslationFieldsSave.tsx b/src/translations/components/TranslationFields/TranslationFieldsSave.tsx index 9848c4bdeff..0c4ae5d99a7 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsSave.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsSave.tsx @@ -1,4 +1,4 @@ -import Button from "@material-ui/core/Button"; +import { Button } from "@material-ui/core"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; diff --git a/src/translations/components/TranslationFields/TranslationFieldsShort.tsx b/src/translations/components/TranslationFields/TranslationFieldsShort.tsx index 5eda9f29390..204e1a5089c 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsShort.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsShort.tsx @@ -1,5 +1,4 @@ -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { TextField, Typography } from "@material-ui/core"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import React from "react"; diff --git a/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx b/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx index 052f3da636a..c4e23c8b19a 100644 --- a/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx +++ b/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx @@ -1,9 +1,10 @@ -import { Omit } from "@material-ui/core"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TablePagination from "@saleor/components/TablePagination"; diff --git a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx index 06de22e7980..f18184678df 100644 --- a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx +++ b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx @@ -1,4 +1,4 @@ -import Card from "@material-ui/core/Card"; +import { Card } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; diff --git a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx index 153aaa8eb42..7075280032b 100644 --- a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx +++ b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx @@ -1,8 +1,10 @@ -import Card from "@material-ui/core/Card"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Card, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/utils/filters/filters.ts b/src/utils/filters/filters.ts index e57367ddb5d..f229de27e1a 100644 --- a/src/utils/filters/filters.ts +++ b/src/utils/filters/filters.ts @@ -1,6 +1,6 @@ import { IFilter, IFilterElement } from "@saleor/components/Filter"; import { findValueInEnum } from "@saleor/misc"; -import isArray from "lodash-es/isArray"; +import isArray from "lodash/isArray"; function createFilterUtils< TQueryParams extends {}, diff --git a/src/utils/urls.ts b/src/utils/urls.ts index 1a25d64688a..ac41b7c27a2 100644 --- a/src/utils/urls.ts +++ b/src/utils/urls.ts @@ -1,4 +1,4 @@ -import isArray from "lodash-es/isArray"; +import isArray from "lodash/isArray"; import { stringify } from "qs"; export function stringifyQs(params: {}): string { diff --git a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx index df8e450a7dd..2a6f34d85d3 100644 --- a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx +++ b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import React from "react"; diff --git a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx index fa071979a32..1eadbe2b2fd 100644 --- a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx +++ b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; +import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; diff --git a/src/warehouses/components/WarehouseList/WarehouseList.tsx b/src/warehouses/components/WarehouseList/WarehouseList.tsx index ccde142847d..720802af309 100644 --- a/src/warehouses/components/WarehouseList/WarehouseList.tsx +++ b/src/warehouses/components/WarehouseList/WarehouseList.tsx @@ -1,9 +1,11 @@ -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableFooter from "@material-ui/core/TableFooter"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + IconButton, + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; diff --git a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx index d4225598f5f..d5424c827b7 100644 --- a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx +++ b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx @@ -1,5 +1,4 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; +import { Button, Card } from "@material-ui/core"; import Alert from "@saleor/components/Alert/Alert"; import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; diff --git a/src/warehouses/components/WarehouseZones/WarehouseZones.tsx b/src/warehouses/components/WarehouseZones/WarehouseZones.tsx index e60b4d7e82e..18b7bf10ff2 100644 --- a/src/warehouses/components/WarehouseZones/WarehouseZones.tsx +++ b/src/warehouses/components/WarehouseZones/WarehouseZones.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Link from "@saleor/components/Link"; import Skeleton from "@saleor/components/Skeleton"; diff --git a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx index de9ce5d5028..a01509ec73e 100644 --- a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx +++ b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx @@ -1,4 +1,4 @@ -import DialogContentText from "@material-ui/core/DialogContentText"; +import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; diff --git a/src/webhooks/components/WebhookEvents/WebhookEvents.tsx b/src/webhooks/components/WebhookEvents/WebhookEvents.tsx index 2c62b6cfc65..2fde9a8d488 100644 --- a/src/webhooks/components/WebhookEvents/WebhookEvents.tsx +++ b/src/webhooks/components/WebhookEvents/WebhookEvents.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; diff --git a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx index 9c801403ca0..859a24c9062 100644 --- a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx +++ b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx @@ -1,7 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; diff --git a/src/webhooks/components/WebhookStatus/WebhookStatus.tsx b/src/webhooks/components/WebhookStatus/WebhookStatus.tsx index ffbead75fc5..eaf6e0c9755 100644 --- a/src/webhooks/components/WebhookStatus/WebhookStatus.tsx +++ b/src/webhooks/components/WebhookStatus/WebhookStatus.tsx @@ -1,6 +1,4 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; +import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { ChangeEvent } from "@saleor/hooks/useForm"; diff --git a/src/webhooks/components/WebhooksList/WebhooksList.tsx b/src/webhooks/components/WebhooksList/WebhooksList.tsx index 830ac80dbb0..ca4ce25830e 100644 --- a/src/webhooks/components/WebhooksList/WebhooksList.tsx +++ b/src/webhooks/components/WebhooksList/WebhooksList.tsx @@ -1,10 +1,12 @@ -import Button from "@material-ui/core/Button"; -import Card from "@material-ui/core/Card"; -import IconButton from "@material-ui/core/IconButton"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; +import { + Button, + Card, + IconButton, + TableBody, + TableCell, + TableHead, + TableRow +} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { App_app_webhooks } from "@saleor/apps/types/App"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/testUtils/filters.ts b/testUtils/filters.ts index d26d998a623..48c6679a693 100644 --- a/testUtils/filters.ts +++ b/testUtils/filters.ts @@ -1,5 +1,5 @@ import { IFilter } from "@saleor/components/Filter"; -import clone from "lodash-es/clone"; +import clone from "lodash/clone"; export function getExistingKeys(o: {}): string[] { return Object.keys(o).filter(key => o[key] !== undefined && o[key] !== null); diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 1f133a0e20e..00000000000 --- a/tslint.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["tslint:latest", "tslint-config-prettier"], - "rules": { - "interface-name": false, - "max-classes-per-file": false, - "member-access": [true, "no-public"], - "no-console": [true, "log"], - "no-implicit-dependencies": false, - "no-shadowed-variable": false, - "no-submodule-imports": [ - true, - "@material-ui", - "lodash-es", - "@assets", - "@locale", - "@saleor" - ] - } -} diff --git a/webpack.config.js b/webpack.config.js index 04b6db9f9b5..5870b8644fc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,11 +6,23 @@ const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const { InjectManifest } = require("workbox-webpack-plugin"); const SentryWebpackPlugin = require("@sentry/webpack-plugin"); +const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") + .BundleAnalyzerPlugin; +const SpeedMeasurePlugin = require("speed-measure-webpack-plugin"); require("dotenv").config(); const resolve = path.resolve.bind(path, __dirname); +let bundleAnalyzerPlugin; +let speedMeasureWrapper = fn => fn; +const analyze = process.env.ANALYZE; +if (!!analyze) { + const smp = new SpeedMeasurePlugin(); + speedMeasureWrapper = smp.wrap; + bundleAnalyzerPlugin = new BundleAnalyzerPlugin(); +} + const pathsPlugin = new TsconfigPathsPlugin({ configFile: "./tsconfig.json" }); @@ -36,7 +48,7 @@ const environmentPlugin = new webpack.EnvironmentPlugin({ const dashboardBuildPath = "build/dashboard/"; -module.exports = (env, argv) => { +module.exports = speedMeasureWrapper((env, argv) => { const devMode = argv.mode !== "production"; let fileLoaderPath; @@ -135,11 +147,12 @@ module.exports = (env, argv) => { environmentPlugin, htmlWebpackPlugin, sentryPlugin, - manifestPlugin + manifestPlugin, + bundleAnalyzerPlugin ].filter(Boolean), resolve: { extensions: [".js", ".jsx", ".ts", ".tsx"], plugins: [pathsPlugin] } }; -}; +});