From a82de30309e5840820da892a927bec3d526759fa Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Thu, 14 May 2020 11:30:32 +0200 Subject: [PATCH] Add circleci config and enhance our linters (#519) * Add circleci config * Season linting config * Apply code style --- .circleci/config.yml | 79 + .eslintrc.json | 27 +- .travis/check-strict-null-errors.snapshot | 2836 ----------------- lighthouserc.json | 9 + package-lock.json | 183 +- package.json | 26 +- .../AttributeBulkDeleteDialog.tsx | 5 +- .../AttributeDeleteDialog.tsx | 5 +- .../AttributeDetails/AttributeDetails.tsx | 14 +- .../AttributeList/AttributeList.tsx | 10 +- .../AttributeListPage/AttributeListPage.tsx | 18 +- .../components/AttributeListPage/filters.ts | 7 +- .../AttributePage/AttributePage.tsx | 10 +- .../AttributeProperties.tsx | 8 +- .../AttributeValueDeleteDialog.tsx | 5 +- .../AttributeValueEditDialog.tsx | 10 +- .../AttributeValues/AttributeValues.tsx | 6 +- src/attributes/errors.ts | 4 +- src/attributes/fixtures.ts | 7 +- src/attributes/index.tsx | 10 +- src/attributes/mutations.ts | 2 +- src/attributes/queries.ts | 2 +- .../views/AttributeCreate/AttributeCreate.tsx | 18 +- .../AttributeDetails/AttributeDetails.tsx | 14 +- .../views/AttributeList/AttributeList.tsx | 22 +- .../views/AttributeList/filters.test.ts | 12 +- src/attributes/views/AttributeList/filters.ts | 11 +- src/auth/AuthProvider.tsx | 14 +- src/auth/components/Layout.tsx | 7 +- src/auth/components/LoginPage/LoginPage.tsx | 5 +- .../NewPasswordPage.stories.tsx | 6 +- .../NewPasswordPage/NewPasswordPage.tsx | 7 +- .../ResetPasswordPage.stories.tsx | 6 +- .../ResetPasswordPage/ResetPasswordPage.tsx | 5 +- .../ResetPasswordSuccessPage.stories.tsx | 4 +- .../ResetPasswordSuccessPage.tsx | 7 +- src/auth/components/SectionRoute.tsx | 2 +- src/auth/errors.ts | 2 +- src/auth/index.tsx | 2 +- src/auth/mutations.ts | 4 +- src/auth/views/Login.tsx | 4 +- src/auth/views/NewPassword.tsx | 4 +- src/auth/views/ResetPassword.tsx | 6 +- src/auth/views/ResetPasswordSuccess.tsx | 2 +- .../CategoryBackground/CategoryBackground.tsx | 8 +- .../CategoryCreatePage/CategoryCreatePage.tsx | 10 +- .../CategoryDeleteDialog.tsx | 3 +- .../CategoryDetailsForm.tsx | 10 +- .../components/CategoryList/CategoryList.tsx | 9 +- .../CategoryListPage/CategoryListPage.tsx | 12 +- .../CategoryProductList.tsx | 8 +- .../CategoryProducts/CategoryProducts.tsx | 2 +- .../CategoryUpdatePage/CategoryUpdatePage.tsx | 10 +- src/categories/index.tsx | 8 +- src/categories/mutations.ts | 4 +- src/categories/queries.ts | 2 +- src/categories/urls.ts | 4 +- src/categories/views/CategoryCreate.tsx | 6 +- src/categories/views/CategoryDetails.tsx | 12 +- .../views/CategoryList/CategoryList.tsx | 14 +- src/categories/views/CategoryList/filter.ts | 1 + .../CollectionCreatePage.tsx | 10 +- .../CollectionDetails/CollectionDetails.tsx | 12 +- .../CollectionDetailsPage.tsx | 10 +- .../CollectionImage/CollectionImage.tsx | 10 +- .../CollectionList/CollectionList.tsx | 10 +- .../CollectionListPage/CollectionListPage.tsx | 24 +- .../components/CollectionListPage/filters.ts | 5 +- .../CollectionProducts/CollectionProducts.tsx | 6 +- src/collections/index.tsx | 8 +- src/collections/mutations.ts | 2 +- src/collections/queries.ts | 2 +- src/collections/urls.ts | 4 +- src/collections/views/CollectionCreate.tsx | 6 +- src/collections/views/CollectionDetails.tsx | 14 +- .../views/CollectionList/CollectionList.tsx | 22 +- .../views/CollectionList/filters.test.ts | 14 +- .../views/CollectionList/filters.ts | 23 +- .../AccountPermissionGroups.stories.tsx | 9 +- .../AccountPermissionGroups.tsx | 8 +- .../AccountPermissions/AccountPermissions.tsx | 18 +- .../AccountStatus/AccountStatus.tsx | 5 +- src/components/ActionDialog/ActionDialog.tsx | 4 +- src/components/AddressEdit/AddressEdit.tsx | 12 +- src/components/AppHeader/AppHeader.tsx | 1 + src/components/AppLayout/AppLayout.tsx | 18 +- src/components/AppLayout/MenuList.tsx | 6 +- src/components/AppLayout/MenuNested.tsx | 6 +- src/components/AppLayout/ResponsiveDrawer.tsx | 1 + src/components/AppLayout/menuStructure.ts | 8 +- .../AssignCategoryDialog.tsx | 6 +- .../AssignCollectionDialog.tsx | 6 +- .../AssignProductDialog.tsx | 6 +- .../AutocompleteSelectMenu.tsx | 8 +- src/components/ColumnPicker/ColumnPicker.tsx | 4 +- .../ColumnPicker/ColumnPickerContent.tsx | 8 +- .../CompanyAddressForm.tsx | 13 +- .../CompanyAddressInput.tsx | 2 +- src/components/CountryList/CountryList.tsx | 8 +- src/components/Date/Date.tsx | 2 +- src/components/DebounceForm.tsx | 1 + .../EditableTableCell/EditableTableCell.tsx | 3 +- src/components/ErrorPage/ErrorPage.tsx | 3 +- src/components/Filter/Filter.tsx | 2 +- .../Filter/FilterAutocompleteField.tsx | 12 +- src/components/Filter/FilterContent.tsx | 28 +- src/components/Filter/FilterOptionField.tsx | 6 +- src/components/Filter/reducer.ts | 1 + src/components/Filter/types.ts | 1 + src/components/Filter/useFilter.ts | 2 +- src/components/FilterBar/FilterBar.tsx | 8 +- src/components/Form/Form.tsx | 3 +- .../IconButtonTableCell.tsx | 2 +- src/components/ImageUpload/ImageUpload.tsx | 1 + .../LinkChoice/LinkChoice.stories.tsx | 6 +- src/components/LinkChoice/LinkChoice.tsx | 12 +- src/components/ListField/ListField.tsx | 4 +- src/components/Locale/Locale.tsx | 9 +- .../MultiAutocompleteSelectField.stories.tsx | 6 +- .../MultiAutocompleteSelectField.tsx | 12 +- .../MultiAutocompleteSelectFieldContent.tsx | 13 +- src/components/Navigator/Navigator.tsx | 6 +- src/components/Navigator/NavigatorInput.tsx | 1 + src/components/Navigator/modes/catalog.ts | 6 +- .../Navigator/modes/commands/actions.ts | 8 +- src/components/Navigator/modes/customers.ts | 4 +- .../Navigator/modes/default/default.ts | 4 +- .../Navigator/modes/default/views.ts | 8 +- src/components/Navigator/modes/index.ts | 4 +- src/components/Navigator/modes/orders.ts | 4 +- src/components/Navigator/modes/types.ts | 1 + .../Navigator/queries/useCatalogSearch.ts | 4 +- .../queries/useCheckIfOrderExists.ts | 4 +- src/components/Navigator/useQuickSearch.ts | 6 +- src/components/NotFoundPage/NotFoundPage.tsx | 3 +- src/components/PhoneField/PhoneField.tsx | 3 +- src/components/RequirePermissions.tsx | 3 +- src/components/RichTextEditor/ImageSource.tsx | 2 +- src/components/RichTextEditor/LinkEntity.tsx | 2 +- src/components/RichTextEditor/LinkSource.tsx | 2 +- .../RichTextEditor/RichTextEditor.tsx | 12 +- .../SaveButtonBar/SaveButtonBar.tsx | 4 +- .../SaveFilterTabDialog.tsx | 2 +- src/components/SearchBar/SearchBar.tsx | 6 +- src/components/SearchBar/SearchInput.tsx | 2 +- src/components/Shop/index.tsx | 6 +- .../SingleAutocompleteSelectField.stories.tsx | 6 +- .../SingleAutocompleteSelectField.tsx | 8 +- .../SingleAutocompleteSelectFieldContent.tsx | 12 +- .../SingleSelectField/SingleSelectField.tsx | 2 +- .../SortableTable/SortableHandle.tsx | 3 +- .../SortableTable/SortableTableBody.tsx | 10 +- .../SortableTable/SortableTableRow.tsx | 1 + .../TableCellHeader.stories.tsx | 2 +- src/components/TableHead/TableHead.tsx | 1 - .../TablePagination/TablePagination.tsx | 4 +- .../TablePaginationActions.tsx | 4 +- .../VisibilityCard/VisibilityCard.tsx | 6 +- src/components/WindowTitle/index.tsx | 3 +- src/configuration/ConfigurationPage.tsx | 4 +- src/configuration/index.tsx | 14 +- .../CustomerAddress/CustomerAddress.tsx | 6 +- .../CustomerAddressDialog.tsx | 10 +- .../CustomerAddressListPage.tsx | 11 +- .../CustomerAddresses/CustomerAddresses.tsx | 6 +- .../CustomerCreateAddress.tsx | 6 +- .../CustomerCreateDetails.tsx | 10 +- .../CustomerCreateNote/CustomerCreateNote.tsx | 7 +- .../CustomerCreatePage/CustomerCreatePage.tsx | 8 +- .../CustomerDetails/CustomerDetails.tsx | 14 +- .../CustomerDetailsPage.tsx | 8 +- .../components/CustomerInfo/CustomerInfo.tsx | 7 +- .../components/CustomerList/CustomerList.tsx | 10 +- .../CustomerListPage/CustomerListPage.tsx | 30 +- .../components/CustomerListPage/filters.ts | 5 +- .../CustomerOrders/CustomerOrders.tsx | 6 +- .../CustomerStats/CustomerStats.tsx | 6 +- src/customers/index.tsx | 8 +- src/customers/queries.ts | 2 +- src/customers/urls.ts | 4 +- src/customers/views/CustomerAddresses.tsx | 10 +- src/customers/views/CustomerCreate.tsx | 6 +- src/customers/views/CustomerDetails.tsx | 8 +- .../views/CustomerList/CustomerList.tsx | 22 +- .../views/CustomerList/filters.test.ts | 12 +- src/customers/views/CustomerList/filters.ts | 5 +- .../DiscountCategories/DiscountCategories.tsx | 6 +- .../DiscountCollections.tsx | 6 +- .../DiscountCountrySelectDialog.tsx | 11 +- .../DiscountDates/DiscountDates.tsx | 7 +- .../DiscountProducts/DiscountProducts.tsx | 6 +- .../SaleCreatePage/SaleCreatePage.tsx | 8 +- .../SaleDetailsPage/SaleDetailsPage.tsx | 8 +- .../components/SaleInfo/SaleInfo.tsx | 10 +- .../components/SaleList/SaleList.tsx | 10 +- .../components/SaleListPage/SaleListPage.tsx | 28 +- .../components/SaleListPage/filters.ts | 5 +- .../components/SaleSummary/SaleSummary.tsx | 6 +- .../components/SaleType/SaleType.tsx | 6 +- .../components/SaleValue/SaleValue.tsx | 8 +- .../VoucherCreatePage/VoucherCreatePage.tsx | 8 +- .../components/VoucherDates/VoucherDates.tsx | 8 +- .../VoucherDetailsPage/VoucherDetailsPage.tsx | 8 +- .../components/VoucherInfo/VoucherInfo.tsx | 14 +- .../VoucherLimits/VoucherLimits.tsx | 10 +- .../components/VoucherList/VoucherList.tsx | 10 +- .../VoucherListPage/VoucherListPage.tsx | 28 +- .../components/VoucherListPage/filters.ts | 23 +- .../VoucherRequirements.tsx | 6 +- .../VoucherSummary/VoucherSummary.tsx | 6 +- .../components/VoucherTypes/VoucherTypes.tsx | 8 +- .../components/VoucherValue/VoucherValue.tsx | 6 +- src/discounts/fixtures.ts | 1 + src/discounts/index.tsx | 10 +- src/discounts/queries.ts | 2 +- src/discounts/urls.ts | 4 +- src/discounts/views/SaleCreate.tsx | 6 +- src/discounts/views/SaleDetails.tsx | 10 +- src/discounts/views/SaleList/SaleList.tsx | 22 +- src/discounts/views/SaleList/filters.test.ts | 20 +- src/discounts/views/SaleList/filters.ts | 21 +- src/discounts/views/VoucherCreate.tsx | 6 +- src/discounts/views/VoucherDetails.tsx | 10 +- .../views/VoucherList/VoucherList.tsx | 20 +- .../views/VoucherList/filters.test.ts | 16 +- src/discounts/views/VoucherList/filters.ts | 25 +- src/fixtures.ts | 2 +- .../HomeActivityCard/HomeActivityCard.tsx | 6 +- src/home/components/HomeHeader/HomeHeader.tsx | 3 +- .../HomeNotificationTable.tsx | 5 +- src/home/components/HomePage/HomePage.tsx | 26 +- .../HomeProductListCard.tsx | 8 +- src/home/components/HomeScreen.tsx | 5 +- src/home/views/index.tsx | 4 +- src/hooks/makeMutation.ts | 8 +- src/hooks/makeQuery.ts | 6 +- src/hooks/makeTopLevelSearch.ts | 2 +- src/hooks/useAddressValidation.ts | 9 +- src/hooks/useDateLocalize.ts | 3 +- src/hooks/useForm.ts | 2 +- src/hooks/useFormset.ts | 1 + src/hooks/useListSettings.ts | 3 +- src/hooks/useLocale.ts | 3 +- src/hooks/useMultiAutocomplete.ts | 1 + src/hooks/useNotifier.ts | 3 +- src/hooks/useSearchQuery.ts | 3 +- src/hooks/useShop.ts | 3 +- src/hooks/useTheme.ts | 3 +- src/icons/ArrowSort.tsx | 5 +- src/icons/Attributes.tsx | 5 +- src/icons/Ballot.tsx | 5 +- src/icons/BoldIcon.tsx | 5 +- src/icons/Bot.tsx | 5 +- src/icons/Draggable.tsx | 5 +- src/icons/Folder.tsx | 5 +- src/icons/HeaderOne.tsx | 5 +- src/icons/HeaderThree.tsx | 5 +- src/icons/HeaderTwo.tsx | 5 +- src/icons/Home.tsx | 5 +- src/icons/Image.tsx | 5 +- src/icons/ItalicIcon.tsx | 5 +- src/icons/LinkIcon.tsx | 5 +- src/icons/LocalShipping.tsx | 5 +- src/icons/Monetization.tsx | 5 +- src/icons/Moon.tsx | 5 +- src/icons/Navigation.tsx | 5 +- src/icons/NoPhoto.tsx | 5 +- src/icons/OrderedListIcon.tsx | 5 +- src/icons/Orders.tsx | 5 +- src/icons/Pages.tsx | 5 +- src/icons/Plugins.tsx | 5 +- src/icons/ProductTypes.tsx | 5 +- src/icons/QuotationIcon.tsx | 5 +- src/icons/Sales.tsx | 5 +- src/icons/ShippingMethods.tsx | 5 +- src/icons/Shop.tsx | 5 +- src/icons/SiteSettings.tsx | 5 +- src/icons/StaffMembers.tsx | 5 +- src/icons/StoreMall.tsx | 5 +- src/icons/StrikethroughIcon.tsx | 5 +- src/icons/Sun.tsx | 5 +- src/icons/Taxes.tsx | 5 +- src/icons/Truck.tsx | 5 +- src/icons/UnorderedListIcon.tsx | 5 +- src/icons/Unstyled.tsx | 5 +- src/icons/Webhooks.tsx | 5 +- src/index.tsx | 12 +- src/misc.ts | 4 +- src/mutations.tsx | 4 +- .../MenuCreateDialog/MenuCreateDialog.tsx | 5 +- .../MenuDetailsPage/MenuDetailsPage.tsx | 6 +- .../MenuItemDialog/MenuItemDialog.tsx | 11 +- .../components/MenuItems/MenuItems.tsx | 8 +- .../components/MenuList/MenuList.tsx | 10 +- .../components/MenuListPage/MenuListPage.tsx | 9 +- .../MenuProperties/MenuProperties.tsx | 6 +- src/navigation/index.tsx | 6 +- src/navigation/mutations.ts | 1 + src/navigation/queries.ts | 3 +- src/navigation/views/MenuDetails/index.tsx | 6 +- .../views/MenuDetails/successHandlers.ts | 2 +- src/navigation/views/MenuList/MenuList.tsx | 8 +- .../OrderAddressEditDialog.tsx | 7 +- .../OrderBulkCancelDialog.tsx | 5 +- .../OrderCancelDialog/OrderCancelDialog.tsx | 9 +- .../OrderCannotCancelOrderDialog.tsx | 5 +- .../OrderCustomer/OrderCustomer.tsx | 6 +- .../OrderCustomerNote/OrderCustomerNote.tsx | 5 +- .../OrderDetailsPage/OrderDetailsPage.tsx | 6 +- .../OrderDraftCancelDialog.tsx | 9 +- .../OrderDraftDetails/OrderDraftDetails.tsx | 2 +- .../OrderDraftDetailsProducts.tsx | 10 +- .../OrderDraftDetailsSummary.tsx | 10 +- .../OrderDraftFinalizeDialog.tsx | 9 +- .../OrderDraftList/OrderDraftList.tsx | 10 +- .../OrderDraftListPage/OrderDraftListPage.tsx | 31 +- .../components/OrderDraftListPage/filters.ts | 5 +- .../OrderDraftPage/OrderDraftPage.tsx | 6 +- .../OrderFulfillPage.stories.tsx | 8 +- .../OrderFulfillPage/OrderFulfillPage.tsx | 45 +- .../components/OrderFulfillPage/fixtures.ts | 2 +- .../OrderFulfillment/OrderFulfillment.tsx | 10 +- .../OrderFulfillmentCancelDialog.tsx | 11 +- .../OrderFulfillmentDialog.tsx | 8 +- .../OrderFulfillmentTrackingDialog.tsx | 11 +- .../components/OrderHistory/OrderHistory.tsx | 6 +- src/orders/components/OrderList/OrderList.tsx | 12 +- .../OrderListPage/OrderListPage.tsx | 17 +- .../components/OrderListPage/filters.ts | 9 +- .../OrderMarkAsPaidDialog.tsx | 9 +- .../components/OrderPayment/OrderPayment.tsx | 6 +- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 9 +- .../OrderPaymentVoidDialog.tsx | 7 +- .../OrderProductAddDialog.tsx | 16 +- .../OrderShippingMethodEditDialog.tsx | 10 +- .../OrderUnfulfilledItems.tsx | 6 +- src/orders/fixtures.ts | 3 +- src/orders/index.tsx | 14 +- src/orders/mutations.ts | 4 +- src/orders/queries.ts | 12 +- src/orders/urls.ts | 4 +- .../OrderDetails/OrderDetailsMessages.tsx | 6 +- src/orders/views/OrderDetails/index.tsx | 20 +- .../views/OrderDraftList/OrderDraftList.tsx | 22 +- .../views/OrderDraftList/filters.test.ts | 14 +- src/orders/views/OrderDraftList/filters.ts | 15 +- .../views/OrderFulfill/OrderFulfill.tsx | 15 +- src/orders/views/OrderList/OrderList.tsx | 22 +- src/orders/views/OrderList/filters.test.ts | 16 +- src/orders/views/OrderList/filters.ts | 7 +- .../PageDetailsPage/PageDetailsPage.tsx | 18 +- src/pages/components/PageInfo/PageInfo.tsx | 8 +- src/pages/components/PageList/PageList.tsx | 10 +- .../components/PageListPage/PageListPage.tsx | 9 +- src/pages/components/PageSlug/PageSlug.tsx | 8 +- src/pages/index.tsx | 8 +- src/pages/queries.ts | 2 +- src/pages/views/PageCreate.tsx | 6 +- src/pages/views/PageDetails.tsx | 8 +- src/pages/views/PageList/PageList.tsx | 10 +- .../AssignMembersDialog.stories.tsx | 6 +- .../AssignMembersDialog.tsx | 35 +- .../MembersErrorDialog.stories.tsx | 3 +- .../MembersErrorDialog/MembersErrorDialog.tsx | 5 +- .../PermissionGroupCreatePage.stories.tsx | 7 +- .../PermissionGroupCreatePage.tsx | 13 +- .../PermissionGroupDeleteDialog.stories.tsx | 7 +- .../PermissionGroupDeleteDialog.tsx | 9 +- .../PermissionGroupDetailsPage.stories.tsx | 6 +- .../PermissionGroupDetailsPage.tsx | 44 +- .../PermissionGroupInfo.tsx | 5 +- .../PermissionGroupList.tsx | 17 +- .../PermissionGroupListPage.stories.tsx | 9 +- .../PermissionGroupListPage.tsx | 8 +- .../PermissionGroupMemberList.tsx | 25 +- .../UnassignMembersDialog.stories.tsx | 4 +- .../UnassignMembersDialog.tsx | 5 +- src/permissionGroups/fixtures.ts | 4 +- src/permissionGroups/index.tsx | 18 +- src/permissionGroups/mutations.ts | 3 +- src/permissionGroups/queries.ts | 11 +- src/permissionGroups/sort.ts | 1 + src/permissionGroups/urls.ts | 9 +- src/permissionGroups/utils.ts | 6 +- .../PermissionGroupCreate.tsx | 11 +- .../PermissionGroupDetails.tsx | 40 +- .../PermissionGroupList.tsx | 29 +- .../PluginAuthorization.tsx | 5 +- .../components/PluginInfo/PluginInfo.tsx | 6 +- .../PluginSecretFieldDialog.stories.tsx | 2 +- .../PluginSecretFieldDialog.tsx | 5 +- .../PluginSettings/PluginSettings.tsx | 4 +- .../PluginsDetailsPage/PluginsDetailsPage.tsx | 8 +- .../components/PluginsList/PluginsList.tsx | 10 +- .../PluginsListPage/PluginsListPage.tsx | 12 +- .../components/PluginsListPage/filters.ts | 7 +- src/plugins/fixtures.ts | 1 + src/plugins/index.tsx | 10 +- src/plugins/queries.ts | 2 +- src/plugins/urls.ts | 4 +- src/plugins/utils.ts | 1 + src/plugins/views/PluginList/PluginList.tsx | 38 +- src/plugins/views/PluginList/filters.test.ts | 10 +- src/plugins/views/PluginList/filters.ts | 21 +- src/plugins/views/PluginsDetails.tsx | 10 +- .../AssignAttributeDialog.tsx | 10 +- .../ProductTypeAttributeEditDialog.tsx | 5 +- .../ProductTypeAttributeUnassignDialog.tsx | 9 +- .../ProductTypeAttributes.tsx | 6 +- ...ProductTypeBulkAttributeUnassignDialog.tsx | 5 +- .../ProductTypeCreatePage.tsx | 6 +- .../ProductTypeDeleteDialog.tsx | 5 +- .../ProductTypeDetails/ProductTypeDetails.tsx | 5 +- .../ProductTypeDetailsPage.tsx | 6 +- .../ProductTypeList/ProductTypeList.tsx | 8 +- .../ProductTypeListPage.tsx | 18 +- .../components/ProductTypeListPage/filters.ts | 7 +- .../ProductTypeShipping.tsx | 4 +- .../ProductTypeTaxes/ProductTypeTaxes.tsx | 6 +- .../containers/ProductTypeOperations.tsx | 2 +- src/productTypes/fixtures.ts | 6 +- .../useAvailableAttributeSearch/index.tsx | 4 +- src/productTypes/index.tsx | 8 +- src/productTypes/queries.ts | 4 +- src/productTypes/urls.ts | 4 +- src/productTypes/views/ProductTypeCreate.tsx | 6 +- .../views/ProductTypeList/ProductTypeList.tsx | 18 +- .../views/ProductTypeList/filters.test.ts | 18 +- .../views/ProductTypeList/filters.ts | 13 +- .../views/ProductTypeUpdate/index.tsx | 8 +- .../ProductAttributes/ProductAttributes.tsx | 7 +- .../ProductCategoryAndCollectionsForm.tsx | 5 +- .../ProductCreatePage/ProductCreatePage.tsx | 12 +- .../ProductDetailsForm/ProductDetailsForm.tsx | 9 +- .../ProductImageNavigation.tsx | 5 +- .../ProductImagePage/ProductImagePage.tsx | 6 +- .../ProductImages/ProductImages.tsx | 1 + .../components/ProductList/ProductList.tsx | 7 +- .../ProductListPage/ProductListPage.tsx | 8 +- .../components/ProductListPage/filters.ts | 15 +- .../ProductOrganization.tsx | 7 +- .../ProductPricing/ProductPricing.tsx | 7 +- .../ProductStocks/ProductStocks.tsx | 31 +- .../ProductUpdatePage/ProductUpdatePage.tsx | 18 +- .../ProductVariantAttributes.tsx | 6 +- .../ProductVariantCreatePage.tsx | 10 +- .../ProductVariantCreator.stories.tsx | 10 +- .../ProductVariantCreatorContent.tsx | 6 +- .../ProductVariantCreatorPage.tsx | 14 +- .../ProductVariantCreatorPriceAndSku.tsx | 6 +- .../ProductVariantCreatorPrices.tsx | 10 +- .../ProductVariantCreatorStock.tsx | 16 +- .../ProductVariantCreatorSummary.tsx | 14 +- .../ProductVariantCreatorValues.tsx | 10 +- .../createVariants.ts | 1 + .../ProductVariantCreatorPage/fixtures.ts | 1 + .../ProductVariantCreatorPage/form.ts | 1 + .../ProductVariantCreatorPage/reducer.test.ts | 4 +- .../ProductVariantCreatorPage/reducer.ts | 7 +- .../ProductVariantCreatorPage/utils.ts | 5 +- .../ProductVariantDeleteDialog.tsx | 9 +- .../ProductVariantImageSelectDialog.tsx | 6 +- .../ProductVariantImages.tsx | 8 +- .../ProductVariantNavigation.tsx | 12 +- .../ProductVariantPage/ProductVariantPage.tsx | 8 +- .../ProductVariantPrice.tsx | 7 +- .../ProductVariants/ProductVariants.tsx | 10 +- .../containers/ProductImagesReorder.tsx | 9 +- src/products/fixtures.ts | 1 + src/products/index.tsx | 10 +- src/products/mutations.ts | 39 +- src/products/queries.ts | 20 +- src/products/urls.ts | 9 +- src/products/utils/data.ts | 8 +- src/products/utils/handlers.ts | 1 + src/products/views/ProductCreate.tsx | 6 +- src/products/views/ProductImage.tsx | 12 +- .../views/ProductList/ProductList.tsx | 38 +- .../views/ProductList/filters.test.ts | 12 +- src/products/views/ProductList/filters.ts | 30 +- src/products/views/ProductList/fixtures.ts | 8 +- .../views/ProductUpdate/ProductUpdate.tsx | 16 +- src/products/views/ProductUpdate/handlers.ts | 2 +- src/products/views/ProductVariant.tsx | 12 +- src/products/views/ProductVariantCreate.tsx | 10 +- .../ProductVariantCreator.tsx | 14 +- src/queries.tsx | 4 +- src/searches/useCategorySearch.ts | 4 +- src/searches/useCollectionSearch.ts | 4 +- src/searches/useCustomerSearch.ts | 4 +- src/searches/usePageSearch.ts | 4 +- src/searches/usePermissionGroupSearch.ts | 4 +- src/searches/useProductSearch.ts | 4 +- src/searches/useProductTypeSearch.ts | 4 +- src/searches/useServiceAccountSearch.ts | 4 +- src/searches/useStaffMemberSearch.ts | 4 +- src/searches/useWarehouseSearch.ts | 4 +- .../ServiceCreatePage.stories.tsx | 6 +- .../ServiceCreatePage/ServiceCreatePage.tsx | 8 +- .../ServiceDeleteDialog.stories.tsx | 2 +- .../ServiceDeleteDialog.tsx | 5 +- .../ServiceDetailsPage.stories.tsx | 6 +- .../ServiceDetailsPage/ServiceDetailsPage.tsx | 8 +- .../components/ServiceInfo/ServiceInfo.tsx | 7 +- .../components/ServiceList/ServiceList.tsx | 16 +- .../ServiceListPage.stories.tsx | 12 +- .../ServiceListPage/ServiceListPage.tsx | 28 +- .../components/ServiceListPage/filters.ts | 7 +- .../ServiceTokenCreateDialog.tsx | 11 +- .../ServiceTokenDeleteDialog.stories.tsx | 2 +- .../ServiceTokenDeleteDialog.tsx | 5 +- .../ServiceTokens/ServiceTokens.tsx | 5 +- src/services/index.tsx | 8 +- src/services/mutations.ts | 2 +- src/services/queries.ts | 2 +- src/services/urls.ts | 4 +- .../views/ServiceCreate/ServiceCreate.tsx | 6 +- .../views/ServiceDetails/ServiceDetails.tsx | 10 +- .../views/ServiceList/ServiceList.tsx | 28 +- .../views/ServiceList/filters.test.ts | 10 +- src/services/views/ServiceList/filters.ts | 21 +- .../ShippingWeightUnitForm.tsx | 6 +- .../ShippingZoneAddWarehouseDialog.tsx | 29 +- .../ShippingZoneCountriesAssignDialog.tsx | 11 +- .../ShippingZoneCreatePage.tsx | 6 +- .../ShippingZoneDetailsPage.tsx | 12 +- .../ShippingZoneInfo/ShippingZoneInfo.tsx | 7 +- .../ShippingZoneRateDialog.tsx | 12 +- .../ShippingZoneRateDialog/errors.ts | 4 +- .../ShippingZoneRates/ShippingZoneRates.tsx | 6 +- .../ShippingZoneWarehouses.tsx | 9 +- .../ShippingZonesList/ShippingZonesList.tsx | 6 +- .../ShippingZonesListPage.tsx | 6 +- src/shipping/index.tsx | 8 +- src/shipping/mutations.ts | 2 +- src/shipping/queries.ts | 2 +- src/shipping/views/ShippingZoneCreate.tsx | 6 +- .../views/ShippingZoneDetails/data.ts | 5 +- .../views/ShippingZoneDetails/index.tsx | 32 +- src/shipping/views/ShippingZonesList.tsx | 16 +- .../SiteSettingsDetails.tsx | 8 +- .../SiteSettingsKeyDialog.tsx | 8 +- .../SiteSettingsKeys/SiteSettingsKeys.tsx | 6 +- .../SiteSettingsMailing.tsx | 7 +- .../SiteSettingsPage/SiteSettingsPage.tsx | 10 +- src/siteSettings/queries.ts | 1 + src/siteSettings/views/index.tsx | 3 +- .../StaffAddMemberDialog.tsx | 11 +- .../StaffDetailsPage.stories.tsx | 6 +- .../StaffDetailsPage/StaffDetailsPage.tsx | 8 +- src/staff/components/StaffList/StaffList.tsx | 12 +- .../StaffListPage/StaffListPage.stories.tsx | 22 +- .../StaffListPage/StaffListPage.tsx | 24 +- src/staff/components/StaffListPage/filters.ts | 5 +- .../StaffPassword/StaffPassword.tsx | 5 +- .../StaffPasswordResetDialog.tsx | 15 +- .../StaffPreferences/StaffPreferences.tsx | 5 +- .../StaffProperties/StaffProperties.tsx | 12 +- src/staff/fixtures.ts | 1 + src/staff/index.tsx | 8 +- src/staff/mutations.ts | 5 +- src/staff/queries.ts | 3 +- src/staff/urls.ts | 4 +- src/staff/utils.ts | 2 +- src/staff/views/StaffDetails.tsx | 7 +- src/staff/views/StaffList/StaffList.tsx | 9 +- src/staff/views/StaffList/filters.test.ts | 12 +- src/staff/views/StaffList/filters.ts | 9 +- src/storybook/Decorator.tsx | 2 +- src/storybook/config.js | 2 +- src/storybook/mock.tsx | 3 +- .../stories/attributes/AttributeListPage.tsx | 12 +- .../stories/attributes/AttributePage.tsx | 6 +- .../attributes/AttributeValueEditDialog.tsx | 6 +- .../stories/categories/CategoryCreatePage.tsx | 2 +- .../stories/categories/CategoryListPage.tsx | 12 +- .../stories/categories/CategoryUpdatePage.tsx | 5 +- .../collections/CollectionCreatePage.tsx | 2 +- .../collections/CollectionDetailsPage.tsx | 6 +- .../collections/CollectionListPage.tsx | 8 +- .../stories/components/ActionDialog.tsx | 2 +- .../stories/components/AddressEdit.tsx | 2 +- .../stories/components/AddressFormatter.tsx | 2 +- .../components/AssignAttributeDialog.tsx | 6 +- .../components/AssignProductDialog.tsx | 6 +- .../components/AutocompleteSelectMenu.tsx | 6 +- src/storybook/stories/components/CardMenu.tsx | 2 +- src/storybook/stories/components/Checkbox.tsx | 4 +- src/storybook/stories/components/Chip.tsx | 2 +- .../stories/components/ColumnPicker.tsx | 6 +- src/storybook/stories/components/Date.tsx | 2 +- src/storybook/stories/components/DateTime.tsx | 2 +- .../components/DeleteFilterTabDialog.tsx | 6 +- .../stories/components/EditableTableCell.tsx | 4 +- .../stories/components/ErrorMessageCard.tsx | 3 +- .../stories/components/ErrorPage.tsx | 4 +- .../stories/components/ExternalLink.tsx | 2 +- .../stories/components/FileUpload.tsx | 2 +- src/storybook/stories/components/Filter.tsx | 14 +- src/storybook/stories/components/Money.tsx | 2 +- .../stories/components/MoneyRange.tsx | 2 +- .../stories/components/MultiSelectField.tsx | 4 +- .../stories/components/NotFoundPage.tsx | 2 +- .../stories/components/PageHeader.tsx | 2 +- src/storybook/stories/components/Percent.tsx | 2 +- .../stories/components/PhoneField.tsx | 2 +- .../stories/components/PriceField.tsx | 2 +- .../stories/components/RichTextEditor.tsx | 2 +- .../stories/components/SaveButtonBar.tsx | 4 +- .../components/SaveFilterTabDialog.tsx | 6 +- .../stories/components/SingleSelectField.tsx | 2 +- src/storybook/stories/components/Skeleton.tsx | 2 +- .../stories/components/StatusLabel.tsx | 2 +- .../stories/components/TablePagination.tsx | 4 +- src/storybook/stories/components/Timeline.tsx | 6 +- src/storybook/stories/components/Weight.tsx | 2 +- .../stories/components/WeightRange.tsx | 2 +- src/storybook/stories/components/messages.tsx | 2 +- .../configuration/ConfigurationPage.tsx | 7 +- .../stories/customers/CustomerCreatePage.tsx | 2 +- .../stories/customers/CustomerDetailsPage.tsx | 2 +- .../stories/customers/CustomerListPage.tsx | 6 +- .../stories/discounts/SaleCreatePage.tsx | 2 +- .../stories/discounts/SaleDetailsPage.tsx | 2 +- .../stories/discounts/SaleListPage.tsx | 14 +- .../stories/discounts/VoucherCreatePage.tsx | 2 +- .../stories/discounts/VoucherDetailsPage.tsx | 2 +- .../stories/discounts/VoucherListPage.tsx | 14 +- src/storybook/stories/home/HomePage.tsx | 6 +- .../stories/navigation/MenuCreateDialog.tsx | 2 +- .../stories/navigation/MenuDetailsPage.tsx | 2 +- .../stories/navigation/MenuItemDialog.tsx | 2 +- .../stories/navigation/MenuListPage.tsx | 2 +- .../stories/orders/OrderCancelDialog.tsx | 2 +- .../stories/orders/OrderCustomer.tsx | 2 +- .../stories/orders/OrderDetailsPage.tsx | 4 +- .../stories/orders/OrderDraftCancelDialog.tsx | 2 +- .../orders/OrderDraftFinalizeDialog.tsx | 2 +- .../stories/orders/OrderDraftListPage.tsx | 6 +- .../stories/orders/OrderDraftPage.tsx | 4 +- .../orders/OrderFulfillmentCancelDialog.tsx | 4 +- .../stories/orders/OrderFulfillmentDialog.tsx | 4 +- .../orders/OrderFulfillmentTrackingDialog.tsx | 2 +- .../stories/orders/OrderListPage.tsx | 6 +- .../stories/orders/OrderMarkAsPaidDialog.tsx | 2 +- .../stories/orders/OrderPaymentDialog.tsx | 2 +- .../stories/orders/OrderPaymentVoidDialog.tsx | 2 +- .../stories/orders/OrderProductAddDialog.tsx | 6 +- .../orders/OrderShippingMethodEditDialog.tsx | 2 +- .../stories/pages/PageDetailsPage.tsx | 2 +- src/storybook/stories/pages/PageListPage.tsx | 2 +- .../stories/plugins/PluginsListPage.tsx | 6 +- .../ProductTypeAttributeEditDialog.tsx | 2 +- .../productTypes/ProductTypeCreatePage.tsx | 2 +- .../productTypes/ProductTypeDetailsPage.tsx | 4 +- .../productTypes/ProductTypeListPage.tsx | 10 +- .../stories/products/ProductCreatePage.tsx | 6 +- .../stories/products/ProductImagePage.tsx | 2 +- .../stories/products/ProductListPage.tsx | 8 +- .../stories/products/ProductUpdatePage.tsx | 6 +- .../products/ProductVariantCreatePage.tsx | 6 +- .../ProductVariantImageSelectDialog.tsx | 2 +- .../stories/products/ProductVariantPage.tsx | 6 +- .../shipping/ShippingZoneCreatePage.tsx | 2 +- .../shipping/ShippingZoneDetailsPage.tsx | 6 +- .../shipping/ShippingZoneRateDialog.tsx | 4 +- .../shipping/ShippingZonesListPage.tsx | 4 +- .../stories/siteSettings/SiteSettingsPage.tsx | 2 +- .../components/CountryList/CountryList.tsx | 4 +- .../CountryListPage/CountryListPage.tsx | 6 +- .../CountryTaxesPage/CountryTaxesPage.tsx | 6 +- .../TaxConfiguration/TaxConfiguration.tsx | 6 +- src/taxes/index.tsx | 2 +- src/taxes/queries.ts | 1 + src/taxes/views/CountryList.tsx | 6 +- src/taxes/views/CountryTaxes.tsx | 2 +- .../TranslationFields/TranslationFields.tsx | 2 +- .../TranslationFieldsLong.tsx | 4 +- .../TranslationFieldsRich.tsx | 6 +- .../TranslationFieldsSave.tsx | 5 +- .../TranslationFieldsShort.tsx | 4 +- .../TranslationsCategoriesPage.tsx | 6 +- .../TranslationsCollectionsPage.tsx | 10 +- .../TranslationsEntitiesList.tsx | 12 +- .../TranslationsEntitiesListPage.tsx | 8 +- .../TranslationsLanguageList.tsx | 10 +- .../TranslationsLanguageListPage.tsx | 13 +- .../TranslationsPagesPage.tsx | 6 +- .../TranslationsProductTypesPage.tsx | 10 +- .../TranslationsProductsPage.tsx | 6 +- .../TranslationsSalesPage.tsx | 6 +- .../TranslationsVouchersPage.tsx | 6 +- src/translations/index.tsx | 2 +- src/translations/urls.ts | 2 +- .../views/TranslationsCategories.tsx | 8 +- .../views/TranslationsCollections.tsx | 8 +- .../views/TranslationsEntities.tsx | 6 +- .../views/TranslationsLanguageList.tsx | 4 +- src/translations/views/TranslationsPages.tsx | 8 +- .../views/TranslationsProductTypes.tsx | 8 +- .../views/TranslationsProducts.tsx | 8 +- src/translations/views/TranslationsSales.tsx | 8 +- .../views/TranslationsVouchers.tsx | 8 +- src/utils/errors/account.ts | 8 +- src/utils/errors/discounts.ts | 6 +- src/utils/errors/menu.ts | 6 +- src/utils/errors/order.ts | 6 +- src/utils/errors/page.ts | 6 +- src/utils/errors/permissionGroups.ts | 3 +- src/utils/errors/product.ts | 6 +- src/utils/errors/shipping.ts | 6 +- src/utils/errors/shop.ts | 6 +- src/utils/errors/staff.ts | 3 +- src/utils/errors/stock.ts | 8 +- src/utils/errors/warehouse.ts | 8 +- src/utils/errors/webhooks.ts | 6 +- src/utils/filters/fields.ts | 4 +- src/utils/filters/filters.ts | 5 +- src/utils/handlers/dialogActionHandlers.ts | 2 +- src/utils/handlers/filterHandlers.ts | 5 +- src/utils/handlers/sortHandler.ts | 3 +- src/utils/menu/menu.ts | 16 +- src/utils/sort.ts | 3 +- src/utils/urls.ts | 2 +- .../WarehouseCreatePage.stories.tsx | 10 +- .../WarehouseCreatePage.tsx | 26 +- .../WarehouseDeleteDialog.tsx | 5 +- .../WarehouseDetailsPage.stories.tsx | 10 +- .../WarehouseDetailsPage.tsx | 30 +- .../WarehouseInfo/WarehouseInfo.tsx | 9 +- .../WarehouseList/WarehouseList.tsx | 13 +- .../WarehouseListPage.stories.tsx | 12 +- .../WarehouseListPage/WarehouseListPage.tsx | 14 +- .../WarehouseZones/WarehouseZones.tsx | 11 +- src/warehouses/index.tsx | 14 +- src/warehouses/mutations.ts | 12 +- src/warehouses/queries.ts | 8 +- src/warehouses/urls.ts | 4 +- .../views/WarehouseCreate/WarehouseCreate.tsx | 17 +- .../WarehouseDetails/WarehouseDetails.tsx | 39 +- .../views/WarehouseList/WarehouseList.tsx | 70 +- src/warehouses/views/WarehouseList/filters.ts | 1 + src/warehouses/views/WarehouseList/sort.ts | 2 +- .../WebhookCreatePage/WebhookCreatePage.tsx | 2 +- .../WebhooksCreatePage.stories.tsx | 4 +- .../WebhookDeleteDialog.stories.tsx | 2 +- .../WebhookDeleteDialog.tsx | 5 +- .../components/WebhookInfo/WebhookInfo.tsx | 6 +- .../WebhooksDetailsPage.stories.tsx | 4 +- .../WebhooksDetailsPage.tsx | 7 +- .../components/WebhooksList/WebhooksList.tsx | 12 +- .../WebhookListPage.stories.tsx | 10 +- .../WebhooksListPage/WebhooksListPage.tsx | 28 +- .../components/WebhooksListPage/filters.ts | 7 +- src/webhooks/index.tsx | 10 +- src/webhooks/queries.ts | 2 +- src/webhooks/urls.ts | 4 +- .../views/WebhookList/WebhookList.tsx | 22 +- .../views/WebhookList/filters.test.ts | 12 +- src/webhooks/views/WebhookList/filters.ts | 9 +- src/webhooks/views/WebhookList/sort.ts | 2 +- src/webhooks/views/WebhooksCreate.tsx | 1 + src/webhooks/views/WebhooksDetails.tsx | 10 +- 763 files changed, 3156 insertions(+), 5871 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis/check-strict-null-errors.snapshot create mode 100644 lighthouserc.json diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..d600bff95 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,79 @@ +version: 2 +jobs: + build-lint-benchmark: + docker: + - image: circleci/node:10.7.0-browsers + steps: + - checkout + - restore_cache: + keys: + - cache-{{ .Branch }}-{{ checksum "package.json" }} + - run: + name: Install system dependencies + command: sudo apt-get install -y libpng-dev + - run: + name: Install dependencies + command: npm install + - save_cache: + key: cache-{{ .Branch }}-{{ checksum "package.json" }} + paths: + - ~/.npm + - ~/.cache + - run: + name: Build application + command: npm run build + - run: + name: Package lock security test + command: npx lockfile-lint --path package-lock.json --allowed-hosts npm + - run: + name: Run linters + command: npm run lint + - run: + name: Install Lighthouse tools + command: sudo npm install -g @lhci/cli + - run: + name: Lighthouse audit + command: npx lhci autorun --upload.target=temporary-public-storage + + cypress: + docker: + - image: cypress/base:10 + environment: + TERM: xterm + parallelism: 1 + steps: + - checkout + - restore_cache: + keys: + - cache-{{ .Branch }}-{{ checksum "package.json" }} + - run: + name: Npm CI + command: npm ci + - run: + command: npx cypress verify + - save_cache: + key: cache-{{ .Branch }}-{{ checksum "package.json" }} + paths: + - ~/.npm + - ~/.cache + - persist_to_workspace: + root: ~/ + paths: + - project + - .cache/Cypress + - attach_workspace: + at: ~/ + - run: + name: Running E2E tests + command: npm run test:e2e:run + - store_artifacts: + path: cypress/videos + - store_artifacts: + path: cypress/screenshots + +workflows: + version: 2 + qa: + jobs: + - build-lint-benchmark: + context: Lighthouse diff --git a/.eslintrc.json b/.eslintrc.json index 98db3877e..2e6c63326 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,12 @@ "parserOptions": { "sourceType": "module" }, - "plugins": ["@typescript-eslint", "import", "local-rules"], + "plugins": [ + "@typescript-eslint", + "import", + "local-rules", + "simple-import-sort" + ], "rules": { "@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/array-type": [ @@ -69,9 +74,9 @@ "eqeqeq": ["error", "smart"], "guard-for-in": "error", "id-blacklist": "off", - "import/no-extraneous-dependencies": "off", - "import/no-internal-modules": "off", - "import/order": "error", + "import/no-extraneous-dependencies": "off", // imports are handled by simple-import-sort/sort + "import/no-internal-modules": "off", // imports are handled by simple-import-sort/sort + "import/order": "off", // imports are handled by simple-import-sort/sort "linebreak-style": "off", "local-rules/named-styles": "error", "max-classes-per-file": "off", @@ -113,7 +118,6 @@ ], "no-debugger": "error", "no-duplicate-case": "error", - "no-duplicate-imports": "error", "no-empty": "error", "no-eval": "error", "no-extra-bind": "error", @@ -149,22 +153,13 @@ "prefer-object-spread": "error", "quote-props": "off", "radix": "error", + "simple-import-sort/sort": ["error"], + "sort-imports": "off", // imports are handled by simple-import-sort/sort "sort-keys": "warn", "space-before-function-paren": "off", "spaced-comment": "error", "use-isnan": "error", "valid-typeof": "off" - // "@typescript-eslint/tslint/config": [ - // "error", - // { - // "rules": { - // "jsdoc-format": [true, "check-multiline-start"], - // "no-reference-import": true, - // "object-literal-sort-keys": true, - // "prefer-conditional-expression": true - // } - // } - // ] }, "ignorePatterns": ["node_modules/", "**/types/**/*"] } diff --git a/.travis/check-strict-null-errors.snapshot b/.travis/check-strict-null-errors.snapshot deleted file mode 100644 index c35b716c6..000000000 --- a/.travis/check-strict-null-errors.snapshot +++ /dev/null @@ -1,2836 +0,0 @@ -src/attributes/components/AttributeList/AttributeList.tsx(102,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/attributes/components/AttributeList/AttributeList.tsx(114,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/attributes/components/AttributeList/AttributeList.tsx(128,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/attributes/components/AttributeList/AttributeList.tsx(143,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/attributes/components/AttributeList/AttributeList.tsx(158,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/attributes/components/AttributeList/AttributeList.tsx(197,41): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeList/AttributeList.tsx(199,31): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeList/AttributeList.tsx(207,44): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeList/AttributeList.tsx(219,48): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeList/AttributeList.tsx(231,27): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeList/AttributeList.tsx(244,27): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributePage/AttributePage.tsx(67,9): error TS2322: Type '{ availableInGrid: boolean; filterableInDashboard: boolean; filterableInStorefront: boolean; inputType: AttributeInputTypeEnum | null; name: string | null; slug: string | null; storefrontSearchPosition: string; valueRequired: boolean; visibleInStorefront: boolean; }' is not assignable to type 'AttributePageFormData'. -src/attributes/components/AttributePage/AttributePage.tsx(118,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'. -src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx(45,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx(45,23): error TS2531: Object is possibly 'null'. -src/attributes/components/AttributeValues/AttributeValues.tsx(113,34): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeValues/AttributeValues.tsx(117,32): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeValues/AttributeValues.tsx(117,46): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeValues/AttributeValues.tsx(120,32): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeValues/AttributeValues.tsx(120,46): error TS2532: Object is possibly 'undefined'. -src/attributes/components/AttributeValues/AttributeValues.tsx(125,66): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(61,29): error TS2538: Type 'undefined' cannot be used as an index type. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(65,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(65,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(71,29): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(71,29): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(91,46): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(126,13): error TS2322: Type 'AttributeCreate_attributeCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(127,21): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(127,21): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(131,13): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(183,17): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(185,42): error TS2538: Type 'undefined' cannot be used as an index type. -src/attributes/views/AttributeCreate/AttributeCreate.tsx(191,52): error TS2538: Type 'undefined' cannot be used as an index type. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(53,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(53,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(63,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(63,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(74,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(74,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(79,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(79,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(85,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(85,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(96,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(96,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(98,9): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(98,15): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(98,15): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(128,57): error TS2345: Argument of type '{ optimisticResponse: { attributeReorderValues: { __typename: "AttributeReorderValues"; attribute: { values: any; } | { values: any; __typename: "Attribute"; id: string; name: string | null; ... 7 more ...; valueRequired: boolean; }; errors: never[]; }; }; variables: { ...; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(133,46): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(135,45): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(135,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(135,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(136,45): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(136,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(136,45): error TS2345: Argument of type '(AttributeDetails_attribute_values | null)[] | null' is not assignable to parameter of type 'List'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(147,45): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(147,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(147,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(147,45): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(156,39): error TS2322: Type 'AttributeDetails_attribute | null | undefined' is not assignable to type 'AttributeDetailsFragment | null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(156,62): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(158,39): error TS2322: Type 'AttributeUpdate_attributeUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(160,43): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(160,43): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(202,39): error TS2322: Type '(AttributeDetails_attribute_values | null)[] | null | undefined' is not assignable to type 'AttributeDetailsFragment_values[]'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(203,47): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(203,47): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(208,39): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(209,47): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(209,47): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(225,39): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(226,47): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(226,47): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(230,39): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(232,43): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(232,43): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(232,43): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(232,43): error TS2533: Object is possibly 'null' or 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(233,68): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(243,62): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(256,39): error TS2322: Type 'AttributeValueCreate_attributeValueCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(258,43): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(258,43): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(274,39): error TS2322: Type 'AttributeDetails_attribute_values | null | undefined' is not assignable to type 'AttributeDetails_attribute_values | null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(275,41): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(275,41): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(275,41): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(276,66): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(283,39): error TS2322: Type 'AttributeValueUpdate_attributeValueUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(285,43): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(285,43): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(294,49): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(294,49): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(294,49): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(294,49): error TS2533: Object is possibly 'null' or 'undefined'. -src/attributes/views/AttributeDetails/AttributeDetails.tsx(295,70): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeList/AttributeList.tsx(95,5): error TS2322: Type '(params?: AttributeListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/attributes/views/AttributeList/AttributeList.tsx(123,5): error TS2345: Argument of type 'AttributeList_attributes_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/attributes/views/AttributeList/AttributeList.tsx(123,17): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeList/AttributeList.tsx(123,17): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeList/AttributeList.tsx(129,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeList/AttributeList.tsx(129,9): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeList/AttributeList.tsx(143,38): error TS2571: Object is of type 'unknown'. -src/attributes/views/AttributeList/AttributeList.tsx(150,13): error TS2322: Type 'AttributeList_attributes_edges_node[] | undefined' is not assignable to type 'AttributeList_attributes_edges_node[]'. -src/attributes/views/AttributeList/AttributeList.tsx(151,15): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeList/AttributeList.tsx(151,15): error TS2531: Object is possibly 'null'. -src/attributes/views/AttributeList/AttributeList.tsx(192,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/attributes/views/AttributeList/AttributeList.tsx(193,57): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeList/AttributeList.tsx(196,35): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/attributes/views/AttributeList/AttributeList.tsx(199,13): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/attributes/views/AttributeList/AttributeList.tsx(199,35): error TS2532: Object is possibly 'undefined'. -src/attributes/views/AttributeList/filters.ts(27,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/filters.ts(31,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/filters.ts(35,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/filters.ts(39,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/filters.ts(43,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/filters.ts(47,39): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/attributes/views/AttributeList/sort.ts(20,7): error TS2322: Type 'undefined' is not assignable to type 'AttributeSortField'. -src/auth/AuthProvider.tsx(71,41): error TS2322: Type 'undefined' is not assignable to type 'User'. -src/auth/AuthProvider.tsx(83,20): error TS2531: Object is possibly 'null'. -src/auth/AuthProvider.tsx(86,21): error TS2345: Argument of type '{ user: TokenAuth_tokenCreate_user | null; }' is not assignable to parameter of type 'AuthProviderState | ((prevState: Readonly, props: Readonly) => AuthProviderState | ... 1 more ... | null) | Pick<...> | null'. -src/auth/AuthProvider.tsx(89,11): error TS2531: Object is possibly 'null'. -src/auth/AuthProvider.tsx(89,11): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/auth/AuthProvider.tsx(94,23): error TS2532: Object is possibly 'undefined'. -src/auth/AuthProvider.tsx(97,34): error TS2532: Object is possibly 'undefined'. -src/auth/AuthProvider.tsx(97,34): error TS2531: Object is possibly 'null'. -src/auth/AuthProvider.tsx(120,22): error TS2532: Object is possibly 'undefined'. -src/auth/AuthProvider.tsx(120,22): error TS2531: Object is possibly 'null'. -src/auth/AuthProvider.tsx(121,25): error TS2532: Object is possibly 'undefined'. -src/auth/AuthProvider.tsx(121,25): error TS2531: Object is possibly 'null'. -src/auth/AuthProvider.tsx(121,25): error TS2345: Argument of type 'TokenAuth_tokenCreate_user | null' is not assignable to parameter of type 'User'. -src/auth/AuthProvider.tsx(132,19): error TS2345: Argument of type '{ user: undefined; }' is not assignable to parameter of type 'AuthProviderState | ((prevState: Readonly, props: Readonly) => AuthProviderState | ... 1 more ... | null) | Pick<...> | null'. -src/auth/AuthProvider.tsx(133,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx(11,3): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/auth/components/SectionRoute.tsx(17,11): error TS2339: Property 'user' does not exist on type 'unknown'. -src/auth/index.tsx(27,3): error TS2322: Type 'undefined' is not assignable to type '(username: string, password: string) => void'. -src/auth/index.tsx(28,3): error TS2322: Type 'undefined' is not assignable to type '(token: string, user: User) => void'. -src/auth/index.tsx(29,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/auth/misc.ts(5,3): error TS2531: Object is possibly 'null'. -src/auth/misc.ts(5,32): error TS2531: Object is possibly 'null'. -src/auth/views/Login.tsx(10,11): error TS2339: Property 'login' does not exist on type 'unknown'. -src/auth/views/Login.tsx(10,18): error TS2339: Property 'user' does not exist on type 'unknown'. -src/auth/views/Login.tsx(10,24): error TS2339: Property 'tokenAuthLoading' does not exist on type 'unknown'. -src/auth/views/NewPassword.tsx(16,11): error TS2339: Property 'loginByToken' does not exist on type 'unknown'. -src/auth/views/NewPassword.tsx(21,9): error TS2531: Object is possibly 'null'. -src/auth/views/NewPassword.tsx(22,20): error TS2531: Object is possibly 'null'. -src/auth/views/NewPassword.tsx(22,44): error TS2531: Object is possibly 'null'. -src/auth/views/ResetPassword.tsx(21,9): error TS2531: Object is possibly 'null'. -src/auth/views/ResetPassword.tsx(21,9): error TS2531: Object is possibly 'null'. -src/auth/views/ResetPassword.tsx(24,11): error TS2531: Object is possibly 'null'. -src/auth/views/ResetPassword.tsx(24,11): error TS2531: Object is possibly 'null'. -src/auth/views/ResetPassword.tsx(55,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/categories/components/CategoryBackground/CategoryBackground.tsx(59,46): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryBackground/CategoryBackground.tsx(80,48): error TS2531: Object is possibly 'null'. -src/categories/components/CategoryBackground/CategoryBackground.tsx(82,15): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLInputElement | null) => void) | RefObject | null | undefined'. -src/categories/components/CategoryBackground/CategoryBackground.tsx(100,22): error TS2322: Type 'CategoryDetails_category_backgroundImage' is not assignable to type '{ alt?: string | undefined; url: string; }'. -src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx(65,43): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryList/CategoryList.tsx(89,9): error TS2322: Type 'CategoryFragment[] | undefined' is not assignable to type 'Node[]'. -src/categories/components/CategoryList/CategoryList.tsx(96,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/categories/components/CategoryList/CategoryList.tsx(109,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/categories/components/CategoryList/CategoryList.tsx(126,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/categories/components/CategoryList/CategoryList.tsx(158,11): error TS2345: Argument of type 'CategoryFragment[] | undefined' is not assignable to parameter of type 'CategoryFragment[]'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(173,46): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(178,44): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(178,44): error TS2531: Object is possibly 'null'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(212,34): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(213,33): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(213,33): error TS2531: Object is possibly 'null'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(214,33): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(214,33): error TS2531: Object is possibly 'null'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(215,30): error TS2322: Type 'CategoryDetails_category_products_edges_node_basePrice | null' is not assignable to type 'IMoney'. -src/categories/components/CategoryProductList/CategoryProductList.tsx(215,37): error TS2532: Object is possibly 'undefined'. -src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx(102,9): error TS2322: Type '{ backgroundImageAlt: string | null; description: any; name: string; seoDescription: string; seoTitle: string; }' is not assignable to type 'FormData'. -src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx(104,41): error TS2531: Object is possibly 'null'. -src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx(137,13): error TS2322: Type 'CategoryDetails_category_backgroundImage | null | undefined' is not assignable to type 'CategoryDetails_category_backgroundImage'. -src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx(203,17): error TS2322: Type 'undefined' is not assignable to type 'Partial<{ asc: boolean; sort: CategoryListUrlSortField; }>'. -src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx(216,15): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/categories/index.tsx(48,5): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/categories/views/CategoryCreate.tsx(25,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryCreate.tsx(25,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryCreate.tsx(31,28): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryCreate.tsx(31,28): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryCreate.tsx(40,11): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryCreate.tsx(40,11): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryCreate.tsx(54,9): error TS2322: Type 'CategoryCreate_categoryCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/categories/views/CategoryDetails.tsx(81,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(81,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(96,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(96,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(97,36): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(97,36): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(102,11): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/categories/views/CategoryDetails.tsx(113,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(113,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(144,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(144,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(155,5): error TS2345: Argument of type 'CategoryDetails_category_children_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/categories/views/CategoryDetails.tsx(156,21): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(156,21): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(156,21): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(157,21): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(157,21): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(157,21): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(164,20): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/categories/views/CategoryDetails.tsx(164,39): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(164,39): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(170,15): error TS2322: Type 'CategoryPageTab | undefined' is not assignable to type 'CategoryPageTab'. -src/categories/views/CategoryDetails.tsx(171,15): error TS2322: Type 'CategoryDetails_category | null | undefined' is not assignable to type 'CategoryDetails_category'. -src/categories/views/CategoryDetails.tsx(171,37): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(173,15): error TS2322: Type 'CategoryUpdate_categoryUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/categories/views/CategoryDetails.tsx(173,35): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(173,35): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(179,39): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(179,39): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(179,39): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(208,15): error TS2322: Type '{ hasNextPage: boolean; hasPreviousPage: boolean; endCursor: string; startCursor: string; } | undefined' is not assignable to type '{ hasNextPage: boolean; hasPreviousPage: boolean; }'. -src/categories/views/CategoryDetails.tsx(226,15): error TS2322: Type 'CategoryDetails_category_products_edges_node[] | undefined' is not assignable to type 'CategoryDetails_category_products_edges_node[]'. -src/categories/views/CategoryDetails.tsx(227,17): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(227,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(227,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(230,15): error TS2322: Type 'CategoryDetails_category_children_edges_node[] | undefined' is not assignable to type 'CategoryDetails_category_children_edges_node[]'. -src/categories/views/CategoryDetails.tsx(231,17): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(231,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(231,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(278,44): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(278,44): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryDetails.tsx(288,15): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/categories/views/CategoryDetails.tsx(290,29): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(295,36): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/categories/views/CategoryDetails.tsx(309,42): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(311,44): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(325,35): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/categories/views/CategoryDetails.tsx(339,42): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryDetails.tsx(341,44): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryList/CategoryList.tsx(121,5): error TS2345: Argument of type 'RootCategories_categories_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/categories/views/CategoryList/CategoryList.tsx(121,17): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryList/CategoryList.tsx(121,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryList/CategoryList.tsx(127,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryList/CategoryList.tsx(127,9): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryList/CategoryList.tsx(147,17): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryList/CategoryList.tsx(147,17): error TS2531: Object is possibly 'null'. -src/categories/views/CategoryList/CategoryList.tsx(197,30): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/categories/views/CategoryList/CategoryList.tsx(214,36): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryList/CategoryList.tsx(215,53): error TS2532: Object is possibly 'undefined'. -src/categories/views/CategoryList/sort.ts(16,7): error TS2322: Type 'undefined' is not assignable to type 'CategorySortField'. -src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx(48,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx(49,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx(93,17): error TS2322: Type '{ __typename: string; alt: string; url: string; } | null' is not assignable to type 'CollectionDetails_collection_backgroundImage'. -src/collections/components/CollectionDetails/CollectionDetails.tsx(60,43): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(70,41): error TS2531: Object is possibly 'null'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(99,17): error TS2322: Type '{ backgroundImageAlt: string | null; description: any; isFeatured: boolean; isPublished: boolean; name: string; publicationDate: any; seoDescription: string | null; seoTitle: string | null; }' is not assignable to type '{ backgroundImageAlt: string; }'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(100,17): error TS2322: Type 'CollectionDetails_collection_backgroundImage | null | undefined' is not assignable to type 'CollectionDetails_collection_backgroundImage'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(113,17): error TS2322: Type 'string | null' is not assignable to type 'string | undefined'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(120,17): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx(121,17): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/collections/components/CollectionImage/CollectionImage.tsx(71,46): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionImage/CollectionImage.tsx(92,48): error TS2531: Object is possibly 'null'. -src/collections/components/CollectionImage/CollectionImage.tsx(94,15): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLInputElement | null) => void) | RefObject | null | undefined'. -src/collections/components/CollectionImage/CollectionImage.tsx(112,22): error TS2322: Type 'CollectionDetails_collection_backgroundImage' is not assignable to type '{ alt?: string | undefined; url: string; }'. -src/collections/components/CollectionList/CollectionList.tsx(91,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/collections/components/CollectionList/CollectionList.tsx(103,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/collections/components/CollectionList/CollectionList.tsx(114,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/collections/components/CollectionList/CollectionList.tsx(154,41): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(161,44): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(165,49): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(169,27): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(169,27): error TS2531: Object is possibly 'null'. -src/collections/components/CollectionList/CollectionList.tsx(176,50): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(181,33): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionList/CollectionList.tsx(183,27): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(122,11): error TS2322: Type 'CollectionDetails_collection_products_edges_node[] | undefined' is not assignable to type 'Node[]'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(122,30): error TS2531: Object is possibly 'null'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(152,15): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(152,40): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(154,15): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(154,44): error TS2532: Object is possibly 'undefined'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(161,13): error TS2345: Argument of type 'CollectionDetails_collection_products_edges_node[] | undefined' is not assignable to parameter of type 'CollectionDetails_collection_products_edges_node[]'. -src/collections/components/CollectionProducts/CollectionProducts.tsx(161,25): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(20,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(20,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(26,30): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(26,30): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(28,36): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(28,36): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionCreate.tsx(34,11): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/collections/views/CollectionCreate.tsx(50,13): error TS2322: Type 'CreateCollection_collectionCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/collections/views/CollectionCreate.tsx(51,21): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionCreate.tsx(51,21): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(79,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(79,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(85,42): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(85,42): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(91,17): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/collections/views/CollectionDetails.tsx(98,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(98,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(109,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(109,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(121,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(121,15): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(158,36): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(158,36): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(159,21): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(159,21): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(159,57): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(159,57): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(181,17): error TS2345: Argument of type 'CollectionUpdate_collectionUpdate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/collections/views/CollectionDetails.tsx(181,29): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(181,29): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(184,21): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(184,21): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(189,21): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(189,21): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(195,17): error TS2345: Argument of type 'CollectionDetails_collection_products_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/collections/views/CollectionDetails.tsx(195,29): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(195,29): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(195,29): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(202,32): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/collections/views/CollectionDetails.tsx(202,51): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(202,51): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(207,21): error TS2322: Type 'CollectionDetails_collection | null | undefined' is not assignable to type 'CollectionDetails_collection'. -src/collections/views/CollectionDetails.tsx(207,45): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(208,21): error TS2322: Type 'CollectionUpdate_collectionUpdate_errors[]' is not assignable to type 'UserError[]'. -src/collections/views/CollectionDetails.tsx(209,23): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(213,25): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(213,25): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(213,25): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(213,61): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(213,61): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(296,44): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(296,44): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionDetails.tsx(310,25): error TS2322: Type 'string[] | undefined' is not assignable to type '(string | null)[]'. -src/collections/views/CollectionDetails.tsx(323,48): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionDetails.tsx(325,50): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(101,5): error TS2322: Type '(params?: CollectionListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/collections/views/CollectionList/CollectionList.tsx(134,5): error TS2345: Argument of type 'CollectionList_collections_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/collections/views/CollectionList/CollectionList.tsx(134,17): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(134,17): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(140,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(140,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(151,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(151,9): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(162,38): error TS2571: Object is of type 'unknown'. -src/collections/views/CollectionList/CollectionList.tsx(184,17): error TS2322: Type 'CollectionList_collections_edges_node[] | undefined' is not assignable to type 'CollectionList_collections_edges_node[]'. -src/collections/views/CollectionList/CollectionList.tsx(185,19): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(185,19): error TS2531: Object is possibly 'null'. -src/collections/views/CollectionList/CollectionList.tsx(241,17): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/collections/views/CollectionList/CollectionList.tsx(243,31): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(248,41): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: true; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/collections/views/CollectionList/CollectionList.tsx(265,44): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(267,46): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(274,17): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/collections/views/CollectionList/CollectionList.tsx(276,31): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(281,41): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: false; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/collections/views/CollectionList/CollectionList.tsx(298,44): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(300,46): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(307,17): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/collections/views/CollectionList/CollectionList.tsx(309,31): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(314,40): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/collections/views/CollectionList/CollectionList.tsx(330,44): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/CollectionList.tsx(332,46): error TS2532: Object is possibly 'undefined'. -src/collections/views/CollectionList/filters.ts(30,7): error TS2322: Type 'CollectionPublished | undefined' is not assignable to type 'CollectionPublished'. -src/collections/views/CollectionList/sort.ts(16,7): error TS2322: Type 'undefined' is not assignable to type 'CollectionSortField'. -src/components/AppLayout/AppActionContext.tsx(4,3): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'RefObject'. -src/components/AppLayout/AppHeaderContext.tsx(4,3): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'RefObject'. -src/components/AppLayout/AppLayout.tsx(309,11): error TS2339: Property 'logout' does not exist on type 'unknown'. -src/components/AppLayout/AppLayout.tsx(309,19): error TS2339: Property 'user' does not exist on type 'unknown'. -src/components/AppLayout/AppLayout.tsx(353,9): error TS2322: Type 'null' is not assignable to type '"unhandled" | undefined'. -src/components/AppLayout/AppLayout.tsx(425,26): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/AppLayout/AppLayout.tsx(433,66): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/AppLayout/AppLayout.tsx(516,48): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/AppLayout/MenuList.tsx(198,7): error TS2531: Object is possibly 'null'. -src/components/AppLayout/MenuList.tsx(198,36): error TS2531: Object is possibly 'null'. -src/components/AppLayout/MenuList.tsx(232,11): error TS2532: Object is possibly 'undefined'. -src/components/AppLayout/MenuList.tsx(235,24): error TS2532: Object is possibly 'undefined'. -src/components/AppLayout/MenuList.tsx(236,23): error TS2532: Object is possibly 'undefined'. -src/components/AppLayout/MenuList.tsx(241,12): error TS2531: Object is possibly 'null'. -src/components/AppLayout/MenuList.tsx(241,41): error TS2531: Object is possibly 'null'. -src/components/AppLayout/MenuList.tsx(247,36): error TS2532: Object is possibly 'undefined'. -src/components/AppLayout/MenuNested.tsx(177,10): error TS2532: Object is possibly 'undefined'. -src/components/AppLayout/MenuNested.tsx(180,30): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/components/AssignProductDialog/AssignProductDialog.tsx(149,48): error TS2531: Object is possibly 'null'. -src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx(104,27): error TS2322: Type '((value: string) => void) | undefined' is not assignable to type '(...args: string[]) => void'. -src/components/CardMenu/CardMenu.tsx(57,7): error TS2769: No overload matches this call. -src/components/CardTitle/CardTitle.tsx(63,11): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -src/components/Checkbox/Checkbox.tsx(106,11): error TS2531: Object is possibly 'null'. -src/components/Checkbox/Checkbox.tsx(108,15): error TS2531: Object is possibly 'null'. -src/components/Checkbox/Checkbox.tsx(129,9): error TS2322: Type 'string | false' is not assignable to type 'string | number | string[] | undefined'. -src/components/ColumnPicker/ColumnPicker.tsx(81,12): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/ColumnPicker/ColumnPickerContent.tsx(96,43): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/components/ColumnPicker/ColumnPickerContent.tsx(129,46): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/ColumnPicker/ColumnPickerContent.tsx(153,44): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/ConfirmButton/ConfirmButton.tsx(103,11): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/components/ConfirmButton/ConfirmButton.tsx(111,24): error TS2769: No overload matches this call. -src/components/ConfirmButton/ConfirmButton.tsx(117,20): error TS2769: No overload matches this call. -src/components/ConfirmButton/ConfirmButton.tsx(142,13): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -src/components/ControlledSwitch.tsx(46,13): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/CountryList/CountryList.tsx(146,41): error TS2538: Type 'undefined' cannot be used as an index type. -src/components/CountryList/CountryList.tsx(147,43): error TS2532: Object is possibly 'undefined'. -src/components/CountryList/CountryList.tsx(149,34): error TS2532: Object is possibly 'undefined'. -src/components/CountryList/CountryList.tsx(152,30): error TS2532: Object is possibly 'undefined'. -src/components/CountryList/CountryList.tsx(167,58): error TS2532: Object is possibly 'undefined'. -src/components/Date/Date.test.tsx(34,10): error TS2531: Object is possibly 'null'. -src/components/Date/Date.test.tsx(43,10): error TS2531: Object is possibly 'null'. -src/components/Date/DateContext.tsx(3,56): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'. -src/components/Date/DateTime.tsx(17,37): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'LocaleSpecifier'. -src/components/Debounce.tsx(15,20): error TS2769: No overload matches this call. -src/components/Debounce.tsx(17,5): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/components/Debounce.tsx(21,18): error TS2769: No overload matches this call. -src/components/Filter/Filter.tsx(107,12): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/Filter/FilterAutocompleteField.tsx(58,28): error TS2532: Object is possibly 'undefined'. -src/components/Filter/FilterAutocompleteField.tsx(103,28): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/Filter/FilterAutocompleteField.tsx(141,11): error TS2322: Type '(() => void) | undefined' is not assignable to type '() => void'. -src/components/Filter/FilterContent.tsx(347,21): error TS2532: Object is possibly 'undefined'. -src/components/Filter/FilterOptionField.tsx(45,8): error TS2532: Object is possibly 'undefined'. -src/components/Filter/reducer.ts(49,3): error TS2322: Type '({ active?: boolean | undefined; multiple?: boolean | undefined; options?: MultiAutocompleteChoiceType[] | undefined; value?: string[] | undefined; } | { ...; })[]' is not assignable to type 'IFilter'. -src/components/Filter/reducer.ts(49,54): error TS2339: Property 'name' does not exist on type '{ active?: boolean | undefined; multiple?: boolean | undefined; options?: MultiAutocompleteChoiceType[] | undefined; value?: string[] | undefined; } | { ...; }'. -src/components/Filter/reducer.ts(49,65): error TS2339: Property 'name' does not exist on type '{ active?: boolean | undefined; multiple?: boolean | undefined; options?: MultiAutocompleteChoiceType[] | undefined; value?: string[] | undefined; } | { ...; }'. -src/components/Filter/reducer.ts(58,37): error TS2345: Argument of type 'T | undefined' is not assignable to parameter of type 'string'. -src/components/Filter/reducer.ts(60,31): error TS2345: Argument of type 'IFilter | undefined' is not assignable to parameter of type 'IFilter'. -src/components/Filter/reducer.ts(62,7): error TS2322: Type 'IFilter | undefined' is not assignable to type 'IFilter'. -src/components/Form/Form.tsx(15,31): error TS2345: Argument of type 'T | undefined' is not assignable to parameter of type 'Record'. -src/components/ImageUpload/ImageUpload.tsx(81,15): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -src/components/ImageUpload/ImageUpload.tsx(86,17): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -src/components/LanguageSwitch/LanguageSwitch.tsx(65,40): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/ListField/ListField.tsx(66,9): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/ListField/ListField.tsx(86,7): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/Locale/Locale.tsx(108,3): error TS2418: Type of computed property's value is 'undefined', which is not assignable to type 'Record'. -src/components/Locale/Locale.tsx(191,53): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. -src/components/Locale/Locale.tsx(212,3): error TS2322: Type 'undefined' is not assignable to type 'Locale'. -src/components/messages/index.ts(10,62): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'IMessageContext'. -src/components/messages/MessageManager.tsx(38,7): error TS2322: Type 'number' is not assignable to type 'never'. -src/components/messages/MessageManager.tsx(51,21): error TS2345: Argument of type '{ message: undefined; opened: true; }' is not assignable to parameter of type 'MessageManagerState | ((prevState: Readonly, props: Readonly<{}>) => MessageManagerState | Pick<...> | null) | Pick<...> | null'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx(19,3): error TS2322: Type 'undefined' is not assignable to type 'MultiAutocompleteChoiceType[]'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx(26,3): error TS2322: Type 'undefined' is not assignable to type 'string[]'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx(159,19): error TS2322: Type 'boolean | "" | null | undefined' is not assignable to type 'boolean'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx(163,19): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx(165,19): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx(161,43): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx(164,47): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx(181,40): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/MultiSelectField/MultiSelectField.tsx(90,34): error TS2532: Object is possibly 'undefined'. -src/components/Navigator/modes/catalog.ts(23,11): error TS2531: Object is possibly 'null'. -src/components/Navigator/modes/catalog.ts(40,11): error TS2531: Object is possibly 'null'. -src/components/Navigator/modes/catalog.ts(62,11): error TS2531: Object is possibly 'null'. -src/components/Navigator/modes/catalog.ts(67,18): error TS2531: Object is possibly 'null'. -src/components/Navigator/modes/utils.ts(58,7): error TS2322: Type 'null' is not assignable to type 'QuickSearchMode'. -src/components/Navigator/Navigator.tsx(84,9): error TS2322: Type 'null' is not assignable to type 'number | undefined'. -src/components/Navigator/Navigator.tsx(155,23): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/Navigator/Navigator.tsx(167,23): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/Navigator/Navigator.tsx(179,23): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/Navigator/Navigator.tsx(191,23): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/Navigator/NavigatorInput.tsx(70,11): error TS2322: Type 'string | null' is not assignable to type 'string | undefined'. -src/components/Navigator/useQuickSearch.ts(43,11): error TS2531: Object is possibly 'null'. -src/components/Navigator/useQuickSearch.ts(43,11): error TS2531: Object is possibly 'null'. -src/components/Navigator/useQuickSearch.ts(44,27): error TS2531: Object is possibly 'null'. -src/components/Navigator/useQuickSearch.ts(44,27): error TS2531: Object is possibly 'null'. -src/components/Navigator/useQuickSearch.ts(109,9): error TS2322: Type 'SearchCatalog | undefined' is not assignable to type 'SearchCatalog'. -src/components/Navigator/useQuickSearch.ts(114,9): error TS2322: Type 'CheckIfOrderExists_order | null | undefined' is not assignable to type 'CheckIfOrderExists_order'. -src/components/Navigator/useQuickSearch.ts(114,28): error TS2532: Object is possibly 'undefined'. -src/components/RichTextEditor/ImageEntity.tsx(56,39): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/RichTextEditor/ImageSource.tsx(41,53): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/components/RichTextEditor/LinkEntity.tsx(70,39): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/SaveButtonBar/SaveButtonBar.tsx(122,27): error TS2532: Object is possibly 'undefined'. -src/components/SaveButtonBar/SaveButtonBar.tsx(133,27): error TS2532: Object is possibly 'undefined'. -src/components/SeoForm/SeoForm.tsx(157,20): error TS2532: Object is possibly 'undefined'. -src/components/SeoForm/SeoForm.tsx(164,47): error TS2532: Object is possibly 'undefined'. -src/components/Shop/index.tsx(13,61): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'ShopInfo_shop'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx(20,3): error TS2322: Type 'undefined' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx(21,3): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx(82,27): error TS2322: Type '((value: string) => void) | undefined' is not assignable to type '(...args: string[]) => void'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx(148,21): error TS2322: Type 'boolean | "" | null | undefined' is not assignable to type 'boolean'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx(149,21): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx(152,21): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx(154,21): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx(130,43): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx(133,47): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx(150,40): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/SingleSelectField/SingleSelectField.tsx(82,38): error TS2571: Object is of type 'unknown'. -src/components/StatusLabel/StatusLabel.tsx(59,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -src/components/TableHead/TableHead.tsx(119,43): error TS2532: Object is possibly 'undefined'. -src/components/TableHead/TableHead.tsx(119,55): error TS2532: Object is possibly 'undefined'. -src/components/TableHead/TableHead.tsx(123,31): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/TableHead/TableHead.tsx(123,48): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. -src/components/TablePagination/TablePagination.tsx(92,6): error TS2604: JSX element type 'Component' does not have any construct or call signatures. -src/components/TablePagination/TablePagination.tsx(95,24): error TS2532: Object is possibly 'undefined'. -src/components/TablePagination/TablePagination.tsx(98,15): error TS2322: Type 'ListSettings | undefined' is not assignable to type 'ListSettings'. -src/components/TablePagination/TablePagination.tsx(99,15): error TS2322: Type '((key: "columns" | "rowNumber", value: any) => void) | undefined' is not assignable to type '(key: "columns" | "rowNumber", value: any) => any'. -src/components/TextFieldWithChoice/TextFieldWithChoice.tsx(59,17): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/components/TextFieldWithChoice/TextFieldWithChoice.tsx(72,21): error TS2322: Type 'MutableRefObject' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject | null | undefined'. -src/components/Theme/ThemeProvider.tsx(36,9): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/components/Timeline/TimelineNote.tsx(98,23): error TS2531: Object is possibly 'null'. -src/components/Timezone/Timezone.tsx(3,60): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'. -src/components/VisibilityCard/VisibilityCard.tsx(88,39): error TS2571: Object is of type 'unknown'. -src/components/WindowTitle/index.tsx(14,34): error TS2571: Object is of type 'unknown'. -src/config.ts(9,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'. -src/configuration/ConfigurationPage.tsx(125,51): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/configuration/index.tsx(193,27): error TS2571: Object is of type 'unknown'. -src/containers/AppState/reducer.ts(34,38): error TS2345: Argument of type '"unhandled" | undefined' is not assignable to parameter of type '"unhandled"'. -src/containers/AppState/reducer.ts(36,39): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/customers/components/CustomerAddress/CustomerAddress.tsx(108,27): error TS2322: Type 'CustomerAddresses_user_addresses' is not assignable to type 'AddressType'. -src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx(81,7): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/customers/components/CustomerAddresses/CustomerAddresses.tsx(56,20): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerAddresses/CustomerAddresses.tsx(57,19): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerAddresses/CustomerAddresses.tsx(68,17): error TS2322: Type 'CustomerDetails_user_defaultBillingAddress | null | undefined' is not assignable to type 'AddressType | undefined'. -src/customers/components/CustomerAddresses/CustomerAddresses.tsx(85,17): error TS2322: Type 'CustomerDetails_user_defaultShippingAddress | null | undefined' is not assignable to type 'AddressType | undefined'. -src/customers/components/CustomerAddresses/CustomerAddresses.tsx(106,13): error TS2322: Type 'CustomerDetails_user_defaultBillingAddress | null | undefined' is not assignable to type 'AddressType | undefined'. -src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx(65,31): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx(125,13): error TS2345: Argument of type '(CustomerAddresses_user_addresses | null)[] | null | undefined' is not assignable to parameter of type '(CustomerAddresses_user_addresses | null)[]'. -src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx(132,31): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx(136,31): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerCreatePage/CustomerCreatePage.tsx(125,9): error TS2322: Type 'null' is not assignable to type 'AddressInput'. -src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx(79,17): error TS2322: Type '{ email: string; firstName: string; isActive: boolean; lastName: string; note: string | null; }' is not assignable to type '{ isActive: boolean; note: string; }'. -src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx(93,17): error TS2322: Type 'CustomerDetails_user_orders_edges_node[] | undefined' is not assignable to type 'CustomerDetails_user_orders_edges_node[]'. -src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx(94,19): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerList/CustomerList.tsx(87,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/customers/components/CustomerList/CustomerList.tsx(99,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/customers/components/CustomerList/CustomerList.tsx(110,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/customers/components/CustomerList/CustomerList.tsx(154,44): error TS2532: Object is possibly 'undefined'. -src/customers/components/CustomerList/CustomerList.tsx(161,49): error TS2532: Object is possibly 'undefined'. -src/customers/components/CustomerList/CustomerList.tsx(165,27): error TS2532: Object is possibly 'undefined'. -src/customers/components/CustomerList/CustomerList.tsx(165,27): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerOrders/CustomerOrders.tsx(47,47): error TS2345: Argument of type 'PaymentChargeStatusEnum | null' is not assignable to parameter of type 'string'. -src/customers/components/CustomerOrders/CustomerOrders.tsx(97,13): error TS2345: Argument of type '{ paymentStatus: any; __typename: "Order"; id: string; created: any; number: string | null; total: CustomerDetails_user_orders_edges_node_total | null; }[] | undefined' is not assignable to parameter of type '{ paymentStatus: any; __typename: "Order"; id: string; created: any; number: string | null; total: CustomerDetails_user_orders_edges_node_total | null; }[]'. -src/customers/components/CustomerStats/CustomerStats.tsx(70,16): error TS2531: Object is possibly 'null'. -src/customers/components/CustomerStats/CustomerStats.tsx(74,25): error TS2531: Object is possibly 'null'. -src/customers/fixtures.ts(949,3): error TS2322: Type '({ __typename: "Address"; city: string; cityArea: string; companyName: string; country: { __typename: "CountryDisplay"; code: string; country: string; }; countryArea: string; firstName: string; ... 5 more ...; streetAddress2: string; } | { ...; })[]' is not assignable to type '(CustomerAddresses_user_addresses | null)[]'. -src/customers/views/CustomerAddresses.tsx(53,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(53,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(62,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(62,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(68,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(68,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(77,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(77,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(104,29): error TS2571: Object is of type 'unknown'. -src/customers/views/CustomerAddresses.tsx(114,31): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerAddresses.tsx(114,50): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerAddresses.tsx(114,50): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(117,31): error TS2322: Type 'CustomerAddresses_user | null | undefined' is not assignable to type 'CustomerAddresses_user'. -src/customers/views/CustomerAddresses.tsx(117,53): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerAddresses.tsx(138,31): error TS2322: Type 'undefined' is not assignable to type 'CustomerAddresses_user_addresses'. -src/customers/views/CustomerAddresses.tsx(143,31): error TS2322: Type 'CreateCustomerAddress_addressCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/customers/views/CustomerAddresses.tsx(145,35): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerAddresses.tsx(145,35): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(162,31): error TS2322: Type 'CustomerAddresses_user_addresses | null | undefined' is not assignable to type 'CustomerAddresses_user_addresses'. -src/customers/views/CustomerAddresses.tsx(163,33): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerAddresses.tsx(163,33): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(163,33): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(164,43): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(171,31): error TS2322: Type 'UpdateCustomerAddress_addressUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/customers/views/CustomerAddresses.tsx(173,35): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerAddresses.tsx(173,35): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerAddresses.tsx(181,55): error TS2345: Argument of type '{ variables: { id: string | undefined; input: AddressInput; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/customers/views/CustomerAddresses.tsx(201,55): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/customers/views/CustomerCreate.tsx(20,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(20,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(26,28): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(26,28): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(42,17): error TS2322: Type '(CustomerCreateData_shop_countries | null)[]' is not assignable to type 'CustomerCreateData_shop_countries[]'. -src/customers/views/CustomerCreate.tsx(42,40): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerCreate.tsx(42,40): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(44,17): error TS2322: Type 'CreateCustomer_customerCreate_errors[]' is not assignable to type 'UserError[]'. -src/customers/views/CustomerCreate.tsx(45,32): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerCreate.tsx(45,32): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(46,26): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(47,21): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerCreate.tsx(50,34): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(42,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(42,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(49,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(49,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(80,23): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerDetails.tsx(80,42): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerDetails.tsx(80,42): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(83,23): error TS2322: Type 'CustomerDetails_user | null | undefined' is not assignable to type 'CustomerDetails_user'. -src/customers/views/CustomerDetails.tsx(83,45): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerDetails.tsx(89,23): error TS2322: Type 'UpdateCustomer_customerUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/customers/views/CustomerDetails.tsx(90,31): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerDetails.tsx(90,31): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(123,37): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerDetails.tsx(123,37): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerDetails.tsx(148,41): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerDetails.tsx(148,41): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerList/CustomerList.tsx(96,5): error TS2322: Type '(params?: CustomerListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/customers/views/CustomerList/CustomerList.tsx(129,5): error TS2345: Argument of type 'ListCustomers_customers_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/customers/views/CustomerList/CustomerList.tsx(129,17): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerList/CustomerList.tsx(129,17): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerList/CustomerList.tsx(135,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerList/CustomerList.tsx(135,9): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerList/CustomerList.tsx(146,38): error TS2571: Object is of type 'unknown'. -src/customers/views/CustomerList/CustomerList.tsx(164,13): error TS2322: Type 'ListCustomers_customers_edges_node[] | undefined' is not assignable to type 'ListCustomers_customers_edges_node[]'. -src/customers/views/CustomerList/CustomerList.tsx(164,36): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerList/CustomerList.tsx(164,36): error TS2531: Object is possibly 'null'. -src/customers/views/CustomerList/CustomerList.tsx(193,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/customers/views/CustomerList/CustomerList.tsx(194,57): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerList/CustomerList.tsx(199,35): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/customers/views/CustomerList/CustomerList.tsx(215,40): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerList/CustomerList.tsx(217,42): error TS2532: Object is possibly 'undefined'. -src/customers/views/CustomerList/filters.ts(35,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(36,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(48,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(49,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(61,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(62,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/customers/views/CustomerList/filters.ts(77,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/customers/views/CustomerList/filters.ts(78,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/customers/views/CustomerList/filters.ts(81,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/customers/views/CustomerList/filters.ts(82,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/customers/views/CustomerList/sort.ts(16,7): error TS2322: Type 'undefined' is not assignable to type 'UserSortField'. -src/discounts/components/DiscountCategories/DiscountCategories.tsx(95,11): error TS2322: Type 'SaleDetails_sale_categories_edges_node[] | undefined' is not assignable to type 'Node[]'. -src/discounts/components/DiscountCategories/DiscountCategories.tsx(95,30): error TS2531: Object is possibly 'null'. -src/discounts/components/DiscountCategories/DiscountCategories.tsx(127,13): error TS2345: Argument of type 'SaleDetails_sale_categories_edges_node[] | undefined' is not assignable to parameter of type 'SaleDetails_sale_categories_edges_node[]'. -src/discounts/components/DiscountCategories/DiscountCategories.tsx(127,25): error TS2531: Object is possibly 'null'. -src/discounts/components/DiscountCollections/DiscountCollections.tsx(95,11): error TS2322: Type 'SaleDetails_sale_collections_edges_node[] | undefined' is not assignable to type 'Node[]'. -src/discounts/components/DiscountCollections/DiscountCollections.tsx(95,30): error TS2531: Object is possibly 'null'. -src/discounts/components/DiscountCollections/DiscountCollections.tsx(125,13): error TS2345: Argument of type 'SaleDetails_sale_collections_edges_node[] | undefined' is not assignable to parameter of type 'SaleDetails_sale_collections_edges_node[]'. -src/discounts/components/DiscountCollections/DiscountCollections.tsx(125,25): error TS2531: Object is possibly 'null'. -src/discounts/components/DiscountProducts/DiscountProducts.tsx(109,11): error TS2322: Type 'SaleDetails_sale_products_edges_node[] | undefined' is not assignable to type 'Node[]'. -src/discounts/components/DiscountProducts/DiscountProducts.tsx(109,30): error TS2531: Object is possibly 'null'. -src/discounts/components/DiscountProducts/DiscountProducts.tsx(144,13): error TS2345: Argument of type 'SaleDetails_sale_products_edges_node[] | undefined' is not assignable to parameter of type 'SaleDetails_sale_products_edges_node[]'. -src/discounts/components/DiscountProducts/DiscountProducts.tsx(144,25): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(116,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(163,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(163,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(181,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(181,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(199,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx(199,31): error TS2531: Object is possibly 'null'. -src/discounts/components/SaleList/SaleList.tsx(103,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/SaleList/SaleList.tsx(115,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/SaleList/SaleList.tsx(130,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/SaleList/SaleList.tsx(142,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/SaleList/SaleList.tsx(186,44): error TS2532: Object is possibly 'undefined'. -src/discounts/components/SaleList/SaleList.tsx(190,49): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(135,7): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(135,19): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(137,14): error TS2533: Object is possibly 'null' or 'undefined'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(153,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(154,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(156,13): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(159,27): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(164,29): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(219,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(219,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(236,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(236,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(253,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(253,35): error TS2531: Object is possibly 'null'. -src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx(315,19): error TS2322: Type '(VoucherDetails_voucher_countries | null)[] | null | undefined' is not assignable to type 'CountryFragment[]'. -src/discounts/components/VoucherList/VoucherList.tsx(118,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(130,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(144,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(158,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(172,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(186,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/discounts/components/VoucherList/VoucherList.tsx(229,44): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherList/VoucherList.tsx(233,49): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherList/VoucherList.tsx(285,23): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherList/VoucherList.tsx(285,59): error TS2532: Object is possibly 'undefined'. -src/discounts/components/VoucherValue/VoucherValue.tsx(75,13): error TS2322: Type 'null' is not assignable to type '{ label: ReactNode; value: string; }[]'. -src/discounts/views/SaleCreate.tsx(29,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleCreate.tsx(29,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleCreate.tsx(35,24): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleCreate.tsx(35,24): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleCreate.tsx(45,42): error TS2571: Object is of type 'unknown'. -src/discounts/views/SaleCreate.tsx(47,13): error TS2322: Type 'SaleCreate_saleCreate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/discounts/views/SaleCreate.tsx(47,33): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleCreate.tsx(47,33): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(100,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(100,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(111,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(111,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(124,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(124,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(130,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(130,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(136,47): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(154,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(154,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(154,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(157,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(157,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(157,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(158,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(158,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(158,43): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(197,38): error TS2345: Argument of type 'SaleDetails_sale_products_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/discounts/views/SaleDetails.tsx(206,39): error TS2571: Object is of type 'unknown'. -src/discounts/views/SaleDetails.tsx(208,31): error TS2322: Type 'SaleDetails_sale | null | undefined' is not assignable to type 'SaleDetails_sale'. -src/discounts/views/SaleDetails.tsx(208,49): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(212,31): error TS2322: Type 'SaleUpdate_saleUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/discounts/views/SaleDetails.tsx(213,39): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(213,39): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleDetails.tsx(242,31): error TS2322: Type 'SaleDetailsPageTab | undefined' is not assignable to type 'SaleDetailsPageTab'. -src/discounts/views/SaleDetails.tsx(406,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/SaleDetails.tsx(419,58): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/SaleDetails.tsx(428,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(430,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(438,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/SaleDetails.tsx(452,59): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/SaleDetails.tsx(461,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(463,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(471,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/SaleDetails.tsx(484,56): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/SaleDetails.tsx(493,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(495,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(524,54): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleDetails.tsx(524,54): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleList/filters.ts(34,42): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/SaleList/filters.ts(45,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/SaleList/filters.ts(46,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/SaleList/filters.ts(54,13): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/filters.ts(68,5): error TS2322: Type '"" | DiscountValueTypeEnum | undefined' is not assignable to type 'DiscountValueTypeEnum | null | undefined'. -src/discounts/views/SaleList/filters.ts(72,25): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/SaleList/filters.ts(73,25): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/SaleList/SaleList.tsx(97,5): error TS2322: Type '(params?: SaleListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/discounts/views/SaleList/SaleList.tsx(129,47): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/SaleList.tsx(132,5): error TS2345: Argument of type 'SaleList_sales_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/discounts/views/SaleList/SaleList.tsx(132,17): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/SaleList.tsx(132,17): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleList/SaleList.tsx(138,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleList/SaleList.tsx(138,9): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleList/SaleList.tsx(149,38): error TS2571: Object is of type 'unknown'. -src/discounts/views/SaleList/SaleList.tsx(155,26): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/discounts/views/SaleList/SaleList.tsx(176,44): error TS2571: Object is of type 'unknown'. -src/discounts/views/SaleList/SaleList.tsx(177,15): error TS2322: Type 'SaleList_sales_edges_node[] | undefined' is not assignable to type 'SaleList_sales_edges_node[]'. -src/discounts/views/SaleList/SaleList.tsx(177,34): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/SaleList.tsx(177,34): error TS2531: Object is possibly 'null'. -src/discounts/views/SaleList/SaleList.tsx(209,15): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/SaleList/SaleList.tsx(222,32): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/SaleList.tsx(223,49): error TS2532: Object is possibly 'undefined'. -src/discounts/views/SaleList/sort.ts(18,7): error TS2322: Type 'undefined' is not assignable to type 'SaleSortField'. -src/discounts/views/VoucherCreate.tsx(27,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherCreate.tsx(27,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherCreate.tsx(33,27): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherCreate.tsx(33,27): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherCreate.tsx(43,42): error TS2571: Object is of type 'unknown'. -src/discounts/views/VoucherCreate.tsx(45,13): error TS2322: Type 'VoucherCreate_voucherCreate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/discounts/views/VoucherCreate.tsx(45,33): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherCreate.tsx(45,33): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(102,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(102,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(113,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(113,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(127,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(127,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(133,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(133,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(139,47): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(157,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(157,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(157,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(160,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(160,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(160,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(161,43): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(161,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(161,43): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(200,38): error TS2345: Argument of type 'VoucherDetails_voucher_products_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/discounts/views/VoucherDetails.tsx(209,39): error TS2571: Object is of type 'unknown'. -src/discounts/views/VoucherDetails.tsx(211,31): error TS2322: Type 'VoucherDetails_voucher | null | undefined' is not assignable to type 'VoucherDetails_voucher'. -src/discounts/views/VoucherDetails.tsx(211,52): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(215,31): error TS2322: Type 'VoucherUpdate_voucherUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/discounts/views/VoucherDetails.tsx(217,35): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(217,35): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(250,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(250,50): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(250,50): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(253,45): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(255,57): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(289,31): error TS2322: Type 'VoucherDetailsPageTab | undefined' is not assignable to type 'VoucherDetailsPageTab'. -src/discounts/views/VoucherDetails.tsx(460,54): error TS2571: Object is of type 'unknown'. -src/discounts/views/VoucherDetails.tsx(475,35): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(475,35): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(475,35): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(476,48): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherDetails.tsx(511,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/VoucherDetails.tsx(525,58): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/VoucherDetails.tsx(534,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(536,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(544,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/VoucherDetails.tsx(558,59): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/VoucherDetails.tsx(567,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(569,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(577,31): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/VoucherDetails.tsx(591,56): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/discounts/views/VoucherDetails.tsx(600,48): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(602,50): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(631,54): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherDetails.tsx(631,54): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherList/filters.ts(38,13): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/filters.ts(52,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/VoucherList/filters.ts(53,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/VoucherList/filters.ts(61,13): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/filters.ts(77,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/VoucherList/filters.ts(78,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/discounts/views/VoucherList/filters.ts(93,25): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/VoucherList/filters.ts(94,25): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/VoucherList/filters.ts(100,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/VoucherList/filters.ts(101,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/discounts/views/VoucherList/sort.ts(24,7): error TS2322: Type 'undefined' is not assignable to type 'VoucherSortField'. -src/discounts/views/VoucherList/VoucherList.tsx(97,5): error TS2322: Type '(params?: VoucherListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/discounts/views/VoucherList/VoucherList.tsx(129,47): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/VoucherList.tsx(132,5): error TS2345: Argument of type 'VoucherList_vouchers_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/discounts/views/VoucherList/VoucherList.tsx(132,17): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/VoucherList.tsx(132,17): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherList/VoucherList.tsx(138,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherList/VoucherList.tsx(138,9): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherList/VoucherList.tsx(149,38): error TS2571: Object is of type 'unknown'. -src/discounts/views/VoucherList/VoucherList.tsx(155,29): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/discounts/views/VoucherList/VoucherList.tsx(176,44): error TS2571: Object is of type 'unknown'. -src/discounts/views/VoucherList/VoucherList.tsx(178,15): error TS2322: Type 'VoucherList_vouchers_edges_node[] | undefined' is not assignable to type 'VoucherList_vouchers_edges_node[]'. -src/discounts/views/VoucherList/VoucherList.tsx(178,37): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/VoucherList.tsx(178,37): error TS2531: Object is possibly 'null'. -src/discounts/views/VoucherList/VoucherList.tsx(209,15): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/discounts/views/VoucherList/VoucherList.tsx(222,32): error TS2532: Object is possibly 'undefined'. -src/discounts/views/VoucherList/VoucherList.tsx(223,49): error TS2532: Object is possibly 'undefined'. -src/fixtures.ts(20,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(21,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(22,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(23,23): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(29,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(30,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(31,5): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(32,23): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/fixtures.ts(38,20): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -src/home/components/HomeActivityCard/activityMessages.ts(34,20): error TS2531: Object is possibly 'null'. -src/home/components/HomeProductListCard/HomeProductListCard.tsx(83,42): error TS2532: Object is possibly 'undefined'. -src/home/components/HomeProductListCard/HomeProductListCard.tsx(83,42): error TS2531: Object is possibly 'null'. -src/home/components/HomeProductListCard/HomeProductListCard.tsx(96,47): error TS2531: Object is possibly 'null'. -src/home/components/HomeProductListCard/HomeProductListCard.tsx(120,39): error TS2532: Object is possibly 'undefined'. -src/home/components/HomeProductListCard/HomeProductListCard.tsx(120,39): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(14,11): error TS2339: Property 'user' does not exist on type 'unknown'. -src/home/views/index.tsx(20,11): error TS2322: Type 'Home_activities_edges_node[] | undefined' is not assignable to type 'Home_activities_edges_node[]'. -src/home/views/index.tsx(21,13): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(21,13): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(23,11): error TS2322: Type 'number | null | undefined' is not assignable to type 'number'. -src/home/views/index.tsx(23,31): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(23,31): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(24,11): error TS2322: Type 'Home_salesToday_gross | undefined' is not assignable to type 'Home_salesToday_gross'. -src/home/views/index.tsx(24,30): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(24,30): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(25,11): error TS2322: Type 'Home_productTopToday_edges_node[] | undefined' is not assignable to type 'Home_productTopToday_edges_node[]'. -src/home/views/index.tsx(26,13): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(26,13): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(55,11): error TS2322: Type 'number | null | undefined' is not assignable to type 'number'. -src/home/views/index.tsx(55,40): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(55,40): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(56,11): error TS2322: Type 'number | null | undefined' is not assignable to type 'number'. -src/home/views/index.tsx(56,40): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(56,40): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(57,11): error TS2322: Type 'number | null | undefined' is not assignable to type 'number'. -src/home/views/index.tsx(57,43): error TS2532: Object is possibly 'undefined'. -src/home/views/index.tsx(57,43): error TS2531: Object is possibly 'null'. -src/home/views/index.tsx(58,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/hooks/makeMutation.ts(42,15): error TS2532: Object is possibly 'undefined'. -src/hooks/makeQuery.ts(66,25): error TS2532: Object is possibly 'undefined'. -src/hooks/makeSearch.ts(41,7): error TS2322: Type '(TVariables & { query: string; }) | { query: string; }' is not assignable to type 'TVariables | undefined'. -src/hooks/makeTopLevelSearch.ts(20,9): error TS2532: Object is possibly 'undefined'. -src/hooks/makeTopLevelSearch.ts(40,18): error TS2532: Object is possibly 'undefined'. -src/hooks/useClipboard.ts(9,20): error TS2769: No overload matches this call. -src/hooks/useClipboard.ts(17,7): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/hooks/useDebounce.ts(9,38): error TS2769: No overload matches this call. -src/hooks/useDebounce.ts(13,20): error TS2769: No overload matches this call. -src/hooks/useDebounce.ts(16,5): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/hooks/useElementScroll.ts(13,3): error TS2322: Type 'undefined' is not assignable to type 'Record<"x" | "y", number>'. -src/hooks/useFormset.ts(28,5): error TS2322: Type 'FormsetAtomicData | undefined' is not assignable to type 'FormsetAtomicData'. -src/hooks/useMultiAutocomplete.ts(17,26): error TS2532: Object is possibly 'undefined'. -src/hooks/useNotifier.ts(8,3): error TS2322: Type 'unknown' is not assignable to type 'IMessageContext'. -src/mutations.tsx(40,17): error TS2532: Object is possibly 'undefined'. -src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx(107,31): error TS2345: Argument of type '(MenuDetails_menu_items | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuDetailsPage/tree.test.ts(15,5): error TS2531: Object is possibly 'null'. -src/navigation/components/MenuDetailsPage/tree.test.ts(16,46): error TS2345: Argument of type 'MenuDetails_menu_items_children | null' is not assignable to parameter of type 'MenuDetails_menu_items'. -src/navigation/components/MenuDetailsPage/tree.test.ts(181,40): error TS2345: Argument of type '(MenuDetails_menu_items | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuDetailsPage/tree.ts(7,13): error TS2322: Type 'null' is not assignable to type 'number'. -src/navigation/components/MenuDetailsPage/tree.ts(14,17): error TS2345: Argument of type '(MenuDetails_menu_items_children | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuDetailsPage/tree.ts(26,22): error TS2569: Type '(MenuDetails_menu_items_children | null)[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/navigation/components/MenuDetailsPage/tree.ts(42,26): error TS2345: Argument of type '(MenuDetails_menu_items_children | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuDetailsPage/tree.ts(60,7): error TS2345: Argument of type '(MenuDetails_menu_items_children | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuDetailsPage/tree.ts(80,15): error TS2531: Object is possibly 'null'. -src/navigation/components/MenuDetailsPage/tree.ts(109,5): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. -src/navigation/components/MenuItemDialog/MenuItemDialog.tsx(73,10): error TS2533: Object is possibly 'null' or 'undefined'. -src/navigation/components/MenuItemDialog/MenuItemDialog.tsx(99,48): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string | (() => string)'. -src/navigation/components/MenuItemDialog/MenuItemDialog.tsx(105,23): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'SetStateAction'. -src/navigation/components/MenuItemDialog/MenuItemDialog.tsx(111,41): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'SetStateAction'. -src/navigation/components/MenuItems/MenuItems.tsx(234,9): error TS2322: Type '{ minHeight: number; padding: boolean; paddingTop: boolean; }' is not assignable to type 'CSSProperties'. -src/navigation/components/MenuItems/tree.test.ts(42,28): error TS2531: Object is possibly 'null'. -src/navigation/components/MenuItems/tree.ts(71,9): error TS2322: Type '({ id: string; parentId: string | undefined; sortOrder: number; type: TreeOperationType; } | undefined)[]' is not assignable to type 'TreeOperation[]'. -src/navigation/components/MenuItems/tree.ts(90,3): error TS2322: Type 'TreeOperation | undefined' is not assignable to type 'TreeOperation'. -src/navigation/components/MenuItems/tree.ts(100,15): error TS2531: Object is possibly 'null'. -src/navigation/components/MenuItems/tree.ts(101,19): error TS2345: Argument of type 'MenuDetails_menu_items_children | null' is not assignable to parameter of type 'MenuDetails_menu_items'. -src/navigation/components/MenuItems/tree.ts(114,42): error TS2345: Argument of type '(MenuDetails_menu_items_children | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/components/MenuList/MenuList.tsx(91,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/navigation/components/MenuList/MenuList.tsx(106,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/navigation/components/MenuList/MenuList.tsx(155,46): error TS2532: Object is possibly 'undefined'. -src/navigation/components/MenuList/MenuList.tsx(159,51): error TS2532: Object is possibly 'undefined'. -src/navigation/components/MenuList/MenuList.tsx(163,29): error TS2532: Object is possibly 'undefined'. -src/navigation/components/MenuList/MenuList.tsx(163,29): error TS2531: Object is possibly 'null'. -src/navigation/components/MenuList/MenuList.tsx(169,45): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(155,27): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(155,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(155,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(156,27): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(156,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(156,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(157,27): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(157,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(157,27): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(172,25): error TS2322: Type 'MenuDetails_menu | null | undefined' is not assignable to type 'MenuDetails_menu'. -src/navigation/views/MenuDetails/index.tsx(172,43): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(219,48): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(219,48): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(248,31): error TS2322: Type 'MenuItemCreate_menuItemCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/navigation/views/MenuDetails/index.tsx(250,35): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(250,35): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(277,31): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/navigation/views/MenuDetails/index.tsx(286,31): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(286,31): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(286,31): error TS2345: Argument of type '(MenuDetails_menu_items | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/views/MenuDetails/index.tsx(287,40): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(287,40): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/index.tsx(287,40): error TS2345: Argument of type '(MenuDetails_menu_items | null)[] | null' is not assignable to parameter of type 'MenuDetails_menu_items[]'. -src/navigation/views/MenuDetails/index.tsx(292,29): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/navigation/views/MenuDetails/index.tsx(305,31): error TS2322: Type 'MenuItemUpdate_menuItemUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/navigation/views/MenuDetails/index.tsx(307,35): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuDetails/index.tsx(307,35): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(18,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(18,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(33,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(33,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(52,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(52,7): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(67,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(67,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(68,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(68,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(69,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuDetails/successHandlers.ts(69,5): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(74,5): error TS2345: Argument of type 'MenuList_menus_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/navigation/views/MenuList/MenuList.tsx(74,17): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(74,17): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(80,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(80,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(87,24): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(87,24): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(92,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(92,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(103,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(103,9): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(127,21): error TS2322: Type 'MenuList_menus_edges_node[] | undefined' is not assignable to type 'MenuList_menus_edges_node[]'. -src/navigation/views/MenuList/MenuList.tsx(127,40): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(127,40): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(177,21): error TS2322: Type 'MenuCreate_menuCreate_errors[]' is not assignable to type 'UserError[]'. -src/navigation/views/MenuList/MenuList.tsx(177,29): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(190,34): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/navigation/views/MenuList/MenuList.tsx(210,31): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(210,31): error TS2531: Object is possibly 'null'. -src/navigation/views/MenuList/MenuList.tsx(210,31): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(220,21): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/navigation/views/MenuList/MenuList.tsx(222,35): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(227,38): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/navigation/views/MenuList/MenuList.tsx(246,35): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/MenuList.tsx(251,44): error TS2532: Object is possibly 'undefined'. -src/navigation/views/MenuList/sort.ts(12,7): error TS2322: Type 'undefined' is not assignable to type 'MenuSortField'. -src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx(64,13): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx(64,13): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx(76,26): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx(107,19): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/components/OrderCustomer/OrderCustomer.tsx(90,17): error TS2533: Object is possibly 'null' or 'undefined'. -src/orders/components/OrderCustomer/OrderCustomer.tsx(133,17): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/orders/components/OrderCustomer/OrderCustomer.tsx(138,35): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderCustomer/OrderCustomer.tsx(326,25): error TS2533: Object is possibly 'null' or 'undefined'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(93,13): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(93,38): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(134,15): error TS2322: Type '(OrderDetails_order_lines | null)[]' is not assignable to type 'OrderDetails_order_lines[]'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(139,13): error TS2345: Argument of type '(OrderDetails_order_fulfillments | null)[] | undefined' is not assignable to parameter of type '(OrderDetails_order_fulfillments | null)[]'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(147,19): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(167,13): error TS2322: Type '(OrderDetails_order_events | null)[] | null | undefined' is not assignable to type 'OrderDetails_order_events[]'. -src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx(182,30): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx(52,9): error TS2322: Type '(OrderDetails_order_lines | null)[] | undefined' is not assignable to type 'OrderDetails_order_lines[]'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(125,40): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(125,40): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(127,30): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(127,50): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(129,50): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(130,52): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(137,30): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(139,42): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(140,57): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(145,25): error TS2322: Type '(() => void) | undefined' is not assignable to type '(event: FormEvent) => void'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(166,30): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(166,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(167,33): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(167,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(173,30): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(173,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(173,52): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(176,31): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(176,31): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(176,59): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(177,33): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(177,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx(185,62): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(50,31): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(88,35): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(102,24): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(108,31): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(118,24): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx(127,31): error TS2531: Object is possibly 'null'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(91,47): error TS2345: Argument of type 'PaymentChargeStatusEnum | null' is not assignable to parameter of type 'string'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(109,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(121,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(135,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(146,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderDraftList/OrderDraftList.tsx(176,11): error TS2345: Argument of type '{ paymentStatus: any; status: { localized: string; status: string; }; __typename: "Order"; billingAddress: OrderDraftList_draftOrders_edges_node_billingAddress | null; ... 4 more ...; userEmail: string | null; }[] | undefined' is not assignable to parameter of type '{ paymentStatus: any; status: { localized: string; status: string; }; __typename: "Order"; billingAddress: OrderDraftList_draftOrders_edges_node_billingAddress | null; ... 4 more ...; userEmail: string | null; }[]'. -src/orders/components/OrderDraftPage/OrderDraftPage.tsx(139,13): error TS2322: Type '(OrderDetails_order_events | null)[] | null | undefined' is not assignable to type 'OrderDetails_order_events[]'. -src/orders/components/OrderFulfillment/OrderFulfillment.tsx(87,25): error TS2531: Object is possibly 'null'. -src/orders/components/OrderFulfillment/OrderFulfillment.tsx(180,29): error TS2345: Argument of type '(OrderDetails_order_fulfillments_lines | null)[] | null | undefined' is not assignable to parameter of type '(OrderDetails_order_fulfillments_lines | null)[]'. -src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx(147,50): error TS2531: Object is possibly 'null'. -src/orders/components/OrderHistory/OrderHistory.tsx(226,21): error TS2322: Type 'OrderDetails_order_events_user | null' is not assignable to type '{ email: string; }'. -src/orders/components/OrderHistory/OrderHistory.tsx(235,19): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/orders/components/OrderList/OrderList.tsx(96,47): error TS2345: Argument of type 'PaymentChargeStatusEnum | null' is not assignable to parameter of type 'string'. -src/orders/components/OrderList/OrderList.tsx(113,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(125,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(139,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(153,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(167,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(178,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/orders/components/OrderList/OrderList.tsx(208,11): error TS2345: Argument of type '{ paymentStatus: any; status: { localized: string; status: string; }; __typename: "Order"; billingAddress: OrderList_orders_edges_node_billingAddress | null; ... 4 more ...; userEmail: string | null; }[] | undefined' is not assignable to parameter of type '{ paymentStatus: any; status: { localized: string; status: string; }; __typename: "Order"; billingAddress: OrderList_orders_edges_node_billingAddress | null; ... 4 more ...; userEmail: string | null; }[]'. -src/orders/components/OrderPayment/OrderPayment.tsx(58,5): error TS2345: Argument of type 'PaymentChargeStatusEnum | null | undefined' is not assignable to parameter of type 'string'. -src/orders/components/OrderPayment/OrderPayment.tsx(91,38): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(98,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(101,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(110,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(112,21): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(126,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(129,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(155,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(158,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(171,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(174,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(193,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(196,26): error TS2322: Type 'OrderDetails_order_totalAuthorized | null' is not assignable to type 'IMoney'. -src/orders/components/OrderPayment/OrderPayment.tsx(208,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(211,26): error TS2322: Type 'OrderDetails_order_totalCaptured | null' is not assignable to type 'IMoney'. -src/orders/components/OrderPayment/OrderPayment.tsx(224,25): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(224,53): error TS2531: Object is possibly 'null'. -src/orders/components/OrderPayment/OrderPayment.tsx(230,23): error TS2345: Argument of type 'OrderDetails_order_totalCaptured | null' is not assignable to parameter of type 'IMoney'. -src/orders/components/OrderPayment/OrderPayment.tsx(231,23): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(125,14): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(126,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(130,19): error TS2345: Argument of type '(SearchOrderVariant_search_edges_node_variants | null)[]' is not assignable to parameter of type 'SearchOrderVariant_search_edges_node_variants[]'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(132,12): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(135,57): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(176,9): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(176,59): error TS2345: Argument of type 'SearchOrderVariant_search_edges_node_variants | null' is not assignable to parameter of type 'SearchOrderVariant_search_edges_node_variants'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(181,32): error TS2345: Argument of type '(SearchOrderVariant_search_edges_node_variants | null)[] | null' is not assignable to parameter of type 'SearchOrderVariant_search_edges_node_variants[]'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(246,61): error TS2538: Type 'undefined' cannot be used as an index type. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(251,31): error TS2345: Argument of type 'SearchOrderVariant_search_edges_node | undefined' is not assignable to parameter of type 'SearchOrderVariant_search_edges_node'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(262,48): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(262,48): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(265,38): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(268,22): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(268,34): error TS2532: Object is possibly 'undefined'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(270,40): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(276,63): error TS2538: Type 'undefined' cannot be used as an index type. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(283,35): error TS2345: Argument of type 'SearchOrderVariant_search_edges_node_variants | null' is not assignable to parameter of type 'SearchOrderVariant_search_edges_node_variants'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(294,35): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(300,40): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(307,38): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(307,38): error TS2531: Object is possibly 'null'. -src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx(307,38): error TS2531: Object is possibly 'null'. -src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx(77,22): error TS2322: Type 'OrderDetails_order_availableShippingMethods_price | null' is not assignable to type 'IMoney'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(129,40): error TS2531: Object is possibly 'null'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(139,30): error TS2531: Object is possibly 'null'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(140,33): error TS2531: Object is possibly 'null'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(149,21): error TS2531: Object is possibly 'null'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(155,25): error TS2531: Object is possibly 'null'. -src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx(156,33): error TS2531: Object is possibly 'null'. -src/orders/fixtures.ts(1142,41): error TS2345: Argument of type 'PaymentChargeStatusEnum | null' is not assignable to parameter of type 'string'. -src/orders/queries.ts(327,3): error TS2344: Type 'SearchOrderVariant' does not satisfy the constraint 'SearchData'. -src/orders/views/OrderDetails/index.tsx(55,32): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(63,32): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(78,11): error TS2339: Property 'user' does not exist on type 'unknown'. -src/orders/views/OrderDetails/index.tsx(161,34): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(164,27): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(164,58): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(164,58): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(174,27): error TS2322: Type 'OrderDetails_order | undefined' is not assignable to type 'OrderDetails_order'. -src/orders/views/OrderDetails/index.tsx(175,27): error TS2322: Type '(OrderDetails_order_availableShippingMethods | null)[] | null' is not assignable to type '{ id: string; name: string; }[] | undefined'. -src/orders/views/OrderDetails/index.tsx(176,35): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(176,35): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(210,50): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(210,50): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(217,29): error TS2345: Argument of type 'OrderCancel_orderCancel_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(218,37): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(218,37): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(221,27): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(221,47): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(235,29): error TS2345: Argument of type 'OrderMarkAsPaid_orderMarkAsPaid_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(237,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(237,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(253,29): error TS2345: Argument of type 'OrderVoid_orderVoid_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(253,41): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(253,41): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(263,29): error TS2345: Argument of type 'OrderCapture_orderCapture_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(265,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(265,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(269,27): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/orders/views/OrderDetails/index.tsx(269,48): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(269,48): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(284,29): error TS2345: Argument of type 'OrderRefund_orderRefund_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(286,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(286,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(289,27): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/orders/views/OrderDetails/index.tsx(289,48): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(289,48): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(304,29): error TS2345: Argument of type 'OrderCreateFulfillment_orderFulfillmentCreate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(306,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(306,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(311,27): error TS2322: Type '(OrderDetails_order_lines | null)[]' is not assignable to type 'OrderDetails_order_lines[]'. -src/orders/views/OrderDetails/index.tsx(311,46): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(312,37): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(312,62): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(319,52): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(322,39): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(322,64): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(325,50): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(330,38): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(338,29): error TS2345: Argument of type 'OrderFulfillmentCancel_orderFulfillmentCancel_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(340,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(340,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(347,31): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(357,29): error TS2345: Argument of type 'OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(359,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(359,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(364,27): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(366,31): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(366,31): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(366,31): error TS2533: Object is possibly 'null' or 'undefined'. -src/orders/views/OrderDetails/index.tsx(367,48): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(372,31): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(385,27): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(386,53): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(386,53): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(420,27): error TS2322: Type 'OrderDetails_order | undefined' is not assignable to type 'OrderDetails_order'. -src/orders/views/OrderDetails/index.tsx(421,50): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(421,50): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(423,37): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(424,38): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(449,50): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(449,50): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(457,29): error TS2345: Argument of type 'OrderDraftCancel_draftOrderDelete_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(459,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(459,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(466,27): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(466,52): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(473,27): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/orders/views/OrderDetails/index.tsx(473,52): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(474,64): error TS2345: Argument of type 'OrderDetails_order | undefined' is not assignable to parameter of type 'OrderDetails_order'. -src/orders/views/OrderDetails/index.tsx(480,29): error TS2345: Argument of type 'OrderShippingMethodUpdate_orderUpdateShipping_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(482,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(482,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(488,35): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(488,35): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(491,27): error TS2322: Type '(OrderDetails_order_availableShippingMethods | null)[] | null | undefined' is not assignable to type 'OrderDetails_order_availableShippingMethods[] | undefined'. -src/orders/views/OrderDetails/index.tsx(492,35): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(508,29): error TS2345: Argument of type 'OrderLinesAdd_draftOrderLinesCreate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(510,33): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(510,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(544,25): error TS2345: Argument of type 'OrderUpdate_orderUpdate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(544,37): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(544,37): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(547,25): error TS2345: Argument of type 'OrderDetails_order_shippingAddress | null | undefined' is not assignable to parameter of type 'AddressType'. -src/orders/views/OrderDetails/index.tsx(547,37): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(549,46): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(549,46): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(551,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(552,34): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(555,23): error TS2322: Type 'OrderUpdate_orderUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(556,31): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(556,31): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(575,25): error TS2345: Argument of type 'OrderUpdate_orderUpdate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(575,37): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(575,37): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(578,25): error TS2345: Argument of type 'OrderDetails_order_billingAddress | null | undefined' is not assignable to parameter of type 'AddressType'. -src/orders/views/OrderDetails/index.tsx(578,37): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(580,46): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(580,46): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(582,33): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(583,34): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/index.tsx(586,23): error TS2322: Type 'OrderUpdate_orderUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/orders/views/OrderDetails/index.tsx(587,31): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/index.tsx(587,31): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(58,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(58,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(71,27): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(71,27): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(71,27): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(80,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(80,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(94,27): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(94,27): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(94,27): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(103,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(103,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(109,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(109,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(119,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(119,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(125,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(125,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(140,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(140,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(158,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(158,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(173,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(173,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(179,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(179,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(183,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(183,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(189,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(189,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(193,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(193,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(206,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(206,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(209,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(209,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(224,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(224,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(230,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(230,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(240,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(240,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(255,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(255,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(261,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(261,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(273,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(273,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(279,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(279,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(289,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(289,22): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(295,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDetails/OrderDetailsMessages.tsx(295,25): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/filters.ts(36,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDraftList/filters.ts(37,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDraftList/filters.ts(42,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(75,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(75,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(97,5): error TS2322: Type '(params?: OrderDraftListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(144,5): error TS2345: Argument of type 'OrderDraftList_draftOrders_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(144,17): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(144,17): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(150,9): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(150,9): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(163,38): error TS2571: Object is of type 'unknown'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(169,32): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(191,15): error TS2322: Type 'OrderDraftList_draftOrders_edges_node[] | undefined' is not assignable to type 'OrderDraftList_draftOrders_edges_node[]'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(192,17): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(192,17): error TS2531: Object is possibly 'null'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(235,42): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDraftList/OrderDraftList.tsx(237,44): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderDraftList/sort.ts(18,7): error TS2322: Type 'undefined' is not assignable to type 'OrderSortField'. -src/orders/views/OrderList/filters.ts(43,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderList/filters.ts(44,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderList/filters.ts(49,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/orders/views/OrderList/filters.ts(56,13): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderList/filters.ts(77,7): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderList/OrderList.tsx(73,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(73,23): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(95,5): error TS2322: Type '(params?: OrderListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/orders/views/OrderList/OrderList.tsx(128,38): error TS2571: Object is of type 'unknown'. -src/orders/views/OrderList/OrderList.tsx(144,5): error TS2345: Argument of type 'OrderList_orders_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/orders/views/OrderList/OrderList.tsx(144,17): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderList/OrderList.tsx(144,17): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(150,9): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(150,9): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(168,27): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; restock: boolean; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/orders/views/OrderList/OrderList.tsx(183,15): error TS2322: Type 'OrderList_orders_edges_node[] | undefined' is not assignable to type 'OrderList_orders_edges_node[]'. -src/orders/views/OrderList/OrderList.tsx(183,35): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderList/OrderList.tsx(183,35): error TS2531: Object is possibly 'null'. -src/orders/views/OrderList/OrderList.tsx(222,43): error TS2532: Object is possibly 'undefined'. -src/orders/views/OrderList/sort.ts(20,7): error TS2322: Type 'undefined' is not assignable to type 'OrderSortField'. -src/pages/components/PageList/PageList.tsx(91,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/pages/components/PageList/PageList.tsx(106,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/pages/components/PageList/PageList.tsx(121,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/pages/components/PageList/PageList.tsx(168,46): error TS2532: Object is possibly 'undefined'. -src/pages/components/PageList/PageList.tsx(172,51): error TS2532: Object is possibly 'undefined'. -src/pages/components/PageList/PageList.tsx(175,51): error TS2532: Object is possibly 'undefined'. -src/pages/components/PageList/PageList.tsx(182,29): error TS2532: Object is possibly 'undefined'. -src/pages/components/PageList/PageList.tsx(192,35): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageCreate.tsx(23,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageCreate.tsx(23,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageCreate.tsx(29,24): error TS2531: Object is possibly 'null'. -src/pages/views/PageCreate.tsx(29,24): error TS2531: Object is possibly 'null'. -src/pages/views/PageCreate.tsx(45,13): error TS2322: Type 'PageCreate_pageCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/pages/views/PageCreate.tsx(45,33): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageCreate.tsx(45,33): error TS2531: Object is possibly 'null'. -src/pages/views/PageCreate.tsx(47,13): error TS2322: Type 'null' is not assignable to type 'PageDetails_page'. -src/pages/views/PageDetails.tsx(44,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageDetails.tsx(44,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageDetails.tsx(62,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/pages/views/PageDetails.tsx(62,40): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageDetails.tsx(62,40): error TS2531: Object is possibly 'null'. -src/pages/views/PageDetails.tsx(66,21): error TS2322: Type 'PageUpdate_pageUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/pages/views/PageDetails.tsx(67,29): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageDetails.tsx(67,29): error TS2531: Object is possibly 'null'. -src/pages/views/PageDetails.tsx(71,21): error TS2322: Type 'PageDetails_page | null | undefined' is not assignable to type 'PageDetails_page'. -src/pages/views/PageDetails.tsx(71,39): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageDetails.tsx(107,44): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageDetails.tsx(107,44): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(66,5): error TS2345: Argument of type 'PageList_pages_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/pages/views/PageList/PageList.tsx(66,17): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(66,17): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(77,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(77,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(91,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(91,9): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(115,17): error TS2322: Type 'PageList_pages_edges_node[] | undefined' is not assignable to type 'PageList_pages_edges_node[]'. -src/pages/views/PageList/PageList.tsx(115,36): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(115,36): error TS2531: Object is possibly 'null'. -src/pages/views/PageList/PageList.tsx(175,35): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: true; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/pages/views/PageList/PageList.tsx(192,44): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(194,46): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(205,35): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: false; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/pages/views/PageList/PageList.tsx(221,42): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(223,44): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(233,34): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/pages/views/PageList/PageList.tsx(249,42): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/PageList.tsx(251,44): error TS2532: Object is possibly 'undefined'. -src/pages/views/PageList/sort.ts(14,7): error TS2322: Type 'undefined' is not assignable to type 'PageSortField'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(69,5): error TS2322: Type '({ value: string; } | { value: string; __typename: "ConfigurationItem"; name: string; type: ConfigurationTypeFieldEnum | null; helpText: string | null; label: string | null; })[] | undefined' is not assignable to type 'ConfigurationItemInput[]'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(70,7): error TS2531: Object is possibly 'null'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(71,41): error TS2345: Argument of type '(Plugin_plugin_configuration | null)[] | null' is not assignable to parameter of type 'Plugin_plugin_configuration[]'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(71,63): error TS2531: Object is possibly 'null'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(74,18): error TS2531: Object is possibly 'null'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(156,23): error TS2322: Type '(Plugin_plugin_configuration | null)[] | null' is not assignable to type 'Plugin_plugin_configuration[]'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(162,23): error TS2531: Object is possibly 'null'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(163,39): error TS2345: Argument of type '(Plugin_plugin_configuration | null)[] | null' is not assignable to parameter of type 'Plugin_plugin_configuration[]'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(163,61): error TS2531: Object is possibly 'null'. -src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx(169,27): error TS2322: Type '(Plugin_plugin_configuration | null)[] | null' is not assignable to type 'Plugin_plugin_configuration[]'. -src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx(70,17): error TS2769: No overload matches this call. -src/plugins/components/PluginSettings/PluginSettings.tsx(73,16): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginSettings/PluginSettings.tsx(76,26): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginSettings/PluginSettings.tsx(89,31): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginSettings/PluginSettings.tsx(90,26): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginsList/PluginsList.tsx(75,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/plugins/components/PluginsList/PluginsList.tsx(90,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/plugins/components/PluginsList/PluginsList.tsx(134,47): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginsList/PluginsList.tsx(140,47): error TS2532: Object is possibly 'undefined'. -src/plugins/components/PluginsList/PluginsList.tsx(141,31): error TS2532: Object is possibly 'undefined'. -src/plugins/utils.ts(11,14): error TS2532: Object is possibly 'undefined'. -src/plugins/utils.ts(11,14): error TS2345: Argument of type 'ConfigurationTypeFieldEnum | null' is not assignable to parameter of type 'ConfigurationTypeFieldEnum'. -src/plugins/views/PluginDetails.test.ts(64,9): error TS2322: Type 'ConfigurationItemInput[] | null' is not assignable to type 'ConfigurationItemInput[]'. -src/plugins/views/PluginDetails.test.ts(70,9): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginDetails.test.ts(77,9): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginList/PluginList.tsx(80,5): error TS2322: Type '(params?: PluginListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/plugins/views/PluginList/PluginList.tsx(111,5): error TS2345: Argument of type 'Plugins_plugins_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/plugins/views/PluginList/PluginList.tsx(111,17): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginList/PluginList.tsx(111,17): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginList/PluginList.tsx(117,38): error TS2571: Object is of type 'unknown'. -src/plugins/views/PluginList/PluginList.tsx(128,9): error TS2322: Type 'Plugins_plugins_edges_node[] | undefined' is not assignable to type 'Plugins_plugins_edges_node[]'. -src/plugins/views/PluginList/PluginList.tsx(128,30): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginList/PluginList.tsx(128,30): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginList/sort.ts(14,7): error TS2322: Type 'undefined' is not assignable to type 'PluginSortField'. -src/plugins/views/PluginsDetails.tsx(44,14): error TS2533: Object is possibly 'null' or 'undefined'. -src/plugins/views/PluginsDetails.tsx(62,9): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(62,9): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(76,21): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(76,21): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(81,28): error TS2345: Argument of type '{ variables: { id: string; input: { configuration: { name: string | undefined; value: string; }[]; }; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/plugins/views/PluginsDetails.tsx(98,19): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/plugins/views/PluginsDetails.tsx(98,38): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(98,38): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(102,19): error TS2322: Type 'PluginUpdate_pluginUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/plugins/views/PluginsDetails.tsx(106,19): error TS2322: Type 'Plugin_plugin | null | undefined' is not assignable to type 'Plugin_plugin'. -src/plugins/views/PluginsDetails.tsx(106,39): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(125,29): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(125,29): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(125,29): error TS2345: Argument of type '(Plugin_plugin_configuration | null)[] | null' is not assignable to parameter of type 'Plugin_plugin_configuration[] | null'. -src/plugins/views/PluginsDetails.tsx(133,30): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(133,30): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(145,58): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string'. -src/plugins/views/PluginsDetails.tsx(155,23): error TS2322: Type 'Plugin_plugin_configuration | null | undefined' is not assignable to type 'Plugin_plugin_configuration'. -src/plugins/views/PluginsDetails.tsx(156,25): error TS2532: Object is possibly 'undefined'. -src/plugins/views/PluginsDetails.tsx(156,25): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(156,25): error TS2531: Object is possibly 'null'. -src/plugins/views/PluginsDetails.tsx(157,36): error TS2531: Object is possibly 'null'. -src/products/components/ProductAttributes/ProductAttributes.tsx(90,3): error TS2322: Type '{ label: string | null; value: string | null; }[]' is not assignable to type 'MultiAutocompleteChoiceType[]'. -src/products/components/ProductAttributes/ProductAttributes.tsx(99,3): error TS2322: Type '{ label: string | null; value: string | null; }[]' is not assignable to type 'MultiAutocompleteChoiceType[]'. -src/products/components/ProductAttributes/ProductAttributes.tsx(120,3): error TS2322: Type '{ label: string | null; value: string | null; }[]' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/products/components/ProductAttributes/ProductAttributes.tsx(189,25): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/components/ProductAttributes/ProductAttributes.tsx(191,29): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx(48,11): error TS2322: Type '{ value: string; label: string; }[] | undefined' is not assignable to type '{ value: string; label: ReactNode; }[]'. -src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx(61,11): error TS2322: Type '{ value: string; label: string; }[] | undefined' is not assignable to type '{ value: string; label: string; }[]'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(132,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(133,5): error TS2322: Type 'null' is not assignable to type 'number'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(156,35): error TS2345: Argument of type '{ id: string; name: string; hasVariants: boolean; productAttributes: SearchProductTypes_search_edges_node_productAttributes[]; }[] | undefined' is not assignable to parameter of type 'Node[]'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(159,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(198,11): error TS2345: Argument of type '{ id: string; name: string; hasVariants: boolean; productAttributes: SearchProductTypes_search_edges_node_productAttributes[]; }[] | undefined' is not assignable to parameter of type 'ProductType[]'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(203,24): error TS2322: Type '(() => any) | undefined' is not assignable to type '() => any'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(238,23): error TS2322: Type 'undefined' is not assignable to type 'ProductDetails_product'. -src/products/components/ProductCreatePage/ProductCreatePage.tsx(309,15): error TS2322: Type '(() => any) | undefined' is not assignable to type '() => void'. -src/products/components/ProductDetailsForm/ProductDetailsForm.tsx(59,11): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/products/components/ProductImages/ProductImages.tsx(201,20): error TS2531: Object is possibly 'null'. -src/products/components/ProductImages/ProductImages.tsx(220,30): error TS2531: Object is possibly 'null'. -src/products/components/ProductImages/ProductImages.tsx(231,52): error TS2345: Argument of type 'FileList | null' is not assignable to parameter of type 'FileList'. -src/products/components/ProductList/ProductList.tsx(130,38): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(130,38): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(133,31): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(133,31): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(141,47): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(141,63): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(144,47): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(144,63): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(150,41): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(150,57): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(165,39): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(165,39): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(169,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductList/ProductList.tsx(178,47): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(178,63): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(183,39): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductList/ProductList.tsx(194,47): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(194,63): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(199,39): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductList/ProductList.tsx(221,41): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductList/ProductList.tsx(231,21): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(239,41): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(239,57): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(244,39): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductList/ProductList.tsx(286,43): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(293,46): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(298,44): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(298,44): error TS2531: Object is possibly 'null'. -src/products/components/ProductList/ProductList.tsx(301,51): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(305,21): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(305,37): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(320,21): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(320,37): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(325,57): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(358,43): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(365,43): error TS2531: Object is possibly 'null'. -src/products/components/ProductList/ProductList.tsx(374,21): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'ProductListColumns[]'. -src/products/components/ProductList/ProductList.tsx(374,37): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(377,36): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(378,35): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(378,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductList/ProductList.tsx(379,35): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductList/ProductList.tsx(379,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductList/ProductList.tsx(380,32): error TS2322: Type 'ProductList_products_edges_node_basePrice | null' is not assignable to type 'IMoney'. -src/products/components/ProductList/ProductList.tsx(380,39): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductListPage/ProductListPage.tsx(87,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/products/components/ProductListPage/ProductListPage.tsx(113,5): error TS2322: Type '{ label: string | null; value: string; }' is not assignable to type 'ColumnPickerChoice'. -src/products/components/ProductListPage/ProductListPage.tsx(125,11): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'string[]'. -src/products/components/ProductListPage/ProductListPage.tsx(125,27): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductListPage/ProductListPage.tsx(128,11): error TS2322: Type 'ProductListColumns[] | undefined' is not assignable to type 'string[]'. -src/products/components/ProductListPage/ProductListPage.tsx(128,27): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductOrganization/ProductOrganization.tsx(110,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/components/ProductOrganization/ProductOrganization.tsx(118,13): error TS2322: Type 'SingleAutocompleteChoiceType[] | undefined' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/products/components/ProductOrganization/ProductOrganization.tsx(119,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/components/ProductOrganization/ProductOrganization.tsx(120,13): error TS2322: Type '((event: ChangeEvent) => void) | undefined' is not assignable to type '(event: ChangeEvent) => void'. -src/products/components/ProductOrganization/ProductOrganization.tsx(130,38): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductOrganization/ProductOrganization.tsx(138,19): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductOrganization/ProductOrganization.tsx(163,11): error TS2322: Type 'SingleAutocompleteChoiceType[] | undefined' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/products/components/ProductOrganization/ProductOrganization.tsx(179,11): error TS2322: Type 'MultiAutocompleteChoiceType[] | undefined' is not assignable to type 'MultiAutocompleteChoiceType[]'. -src/products/components/ProductStock/ProductStock.tsx(84,31): error TS2531: Object is possibly 'null'. -src/products/components/ProductStock/ProductStock.tsx(84,31): error TS2531: Object is possibly 'null'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(131,17): error TS2531: Object is possibly 'null'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(135,16): error TS2345: Argument of type '(ProductDetails_product_collections | null)[] | null' is not assignable to parameter of type 'Node[]'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(145,32): error TS2531: Object is possibly 'null'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(149,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(186,26): error TS2322: Type '(() => any) | undefined' is not assignable to type '() => any'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(196,21): error TS2322: Type 'RawDraftContentState | undefined' is not assignable to type 'RawDraftContentState'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(205,21): error TS2322: Type '((id: string) => any) | undefined' is not assignable to type '(id: string) => () => void'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(229,23): error TS2322: Type 'ProductDetails_product_basePrice | null | undefined' is not assignable to type 'ProductVariant_costPrice | undefined'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(253,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(274,21): error TS2322: Type 'ProductUpdatePageFormData' is not assignable to type '{ category: string; collections: string[]; productType?: string | undefined; }'. -src/products/components/ProductUpdatePage/ProductUpdatePage.tsx(313,17): error TS2322: Type '(() => any) | undefined' is not assignable to type '() => void'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(41,26): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(45,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(56,10): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(64,3): error TS2322: Type '{ label: string | null; value: string | null; }[]' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(64,10): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(129,43): error TS2769: No overload matches this call. -src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx(130,37): error TS2538: Type 'null' cannot be used as an index type. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(63,20): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(64,17): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(88,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(92,13): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(93,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(93,59): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(121,20): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(122,17): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(141,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(145,13): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(146,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(146,59): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(167,20): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(168,17): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(176,20): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(177,17): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(192,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(196,13): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(197,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(197,59): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(207,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(211,13): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(212,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/createVariants.test.ts(212,59): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.ts(23,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/createVariants.ts(26,10): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/form.ts(35,5): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/products/components/ProductVariantCreateDialog/form.ts(41,5): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(23,3): error TS2322: Type '{ slug: string | null; value: string; }[]' is not assignable to type 'AttributeValue[]'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(23,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(24,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(33,3): error TS2322: Type '{ slug: string | null; value: string; }[]' is not assignable to type 'AttributeValue[]'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(33,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(34,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(41,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(42,19): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(60,5): error TS2322: Type '{ id: string; values: (string | null)[]; }[]' is not assignable to type 'Attribute[]'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreate.stories.tsx(64,7): error TS2322: Type '{ id: string; values: (string | null)[]; }[]' is not assignable to type 'Attribute[]'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(73,7): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(73,7): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(76,11): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(78,30): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(78,30): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(84,7): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(84,7): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(87,11): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(89,30): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(89,30): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(167,36): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(171,34): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(189,25): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(190,51): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(195,27): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(195,27): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(277,36): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(281,34): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(292,25): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(293,51): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(298,27): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx(298,27): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(95,3): error TS2322: Type '(string | null)[]' is not assignable to type 'string[]'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(98,7): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(98,7): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(100,11): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(101,11): error TS2533: Object is possibly 'null' or 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(102,33): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(191,35): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(222,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(249,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateSummary.tsx(273,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(51,14): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(53,62): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(53,62): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(55,17): error TS2769: No overload matches this call. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(55,22): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(60,23): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(61,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(66,36): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/ProductVariantCreateValues.tsx(67,28): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreateDialog/reducer.ts(47,36): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/reducer.ts(53,55): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/reducer.ts(53,64): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/reducer.ts(82,5): error TS2322: Type '(Attribute | undefined)[]' is not assignable to type 'Attribute[]'. -src/products/components/ProductVariantCreateDialog/reducer.ts(209,18): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/reducer.ts(235,18): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantCreateDialog/reducer.ts(328,37): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(331,41): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductVariantCreateDialog/reducer.ts(333,41): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/components/ProductVariantCreateDialog/reducer.ts(335,51): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(337,51): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(339,55): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(341,55): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(343,52): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(345,52): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/components/ProductVariantCreateDialog/reducer.ts(349,9): error TS2345: Argument of type '"price" | "sku" | "stock" | undefined' is not assignable to parameter of type 'VariantField'. -src/products/components/ProductVariantCreateDialog/reducer.ts(354,39): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(75,9): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(76,17): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(77,17): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(83,25): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(83,53): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(96,33): error TS2322: Type '(data: ProductVariantCreatePageFormData) => void' is not assignable to type '(data: { attributes: { name: string | null; slug: string | null; values: string[]; }[]; costPrice: string; images: string[] | undefined; priceOverride: string; quantity: string; sku: string; }) => void'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(110,19): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(110,50): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(111,19): error TS2322: Type '(ProductVariantCreateData_product_variants | null)[] | null | undefined' is not assignable to type 'ProductVariantDetails_productVariant[] | ProductVariantCreateData_product_variants[]'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(128,19): error TS2322: Type 'VariantCreate_productVariantCreate_productErrors[]' is not assignable to type 'UserError[]'. -src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx(137,19): error TS2322: Type 'VariantCreate_productVariantCreate_productErrors[]' is not assignable to type 'UserError[]'. -src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx(76,12): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx(84,23): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx(84,25): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx(84,25): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx(84,25): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx(106,62): error TS2322: Type 'null' is not assignable to type 'string | undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(70,40): error TS2345: Argument of type 'ProductVariant | undefined' is not assignable to parameter of type 'ProductVariant'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(80,37): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(80,37): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(80,65): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(82,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(82,5): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(83,7): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(83,7): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(83,24): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(83,24): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(87,5): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(88,46): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(89,30): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(89,30): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(89,47): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(89,47): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(93,28): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(93,28): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(94,32): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(94,32): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(95,27): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(96,22): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(102,7): error TS2322: Type 'FormsetData' is not assignable to type 'FormsetData'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(109,24): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(125,23): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(126,31): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(126,31): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(128,23): error TS2322: Type '(ProductVariant_product_variants | null)[] | null | undefined' is not assignable to type 'ProductVariantDetails_productVariant[] | ProductVariantCreateData_product_variants[]'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(128,45): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(139,23): error TS2322: Type 'FormsetData' is not assignable to type 'VariantAttributeInput[]'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(140,23): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(146,23): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(147,23): error TS2322: Type '(ProductVariant_product_images | null)[] | undefined' is not assignable to type 'ProductImage[] | undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(153,23): error TS2322: Type 'VariantUpdate_productVariantUpdate_productErrors[]' is not assignable to type 'UserError[]'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(168,23): error TS2322: Type 'VariantUpdate_productVariantUpdate_productErrors[]' is not assignable to type 'UserError[]'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(171,23): error TS2322: Type 'number | null | undefined' is not assignable to type 'number | undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(196,11): error TS2322: Type '(ProductVariant_product_images | null)[] | undefined' is not assignable to type 'ProductImage[] | undefined'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(197,39): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariantPage/ProductVariantPage.tsx(197,67): error TS2531: Object is possibly 'null'. -src/products/components/ProductVariants/ProductVariants.tsx(177,39): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariants/ProductVariants.tsx(186,46): error TS2532: Object is possibly 'undefined'. -src/products/components/ProductVariants/ProductVariants.tsx(196,29): error TS2532: Object is possibly 'undefined'. -src/products/containers/ProductImagesReorder.tsx(32,34): error TS2532: Object is possibly 'undefined'. -src/products/containers/ProductImagesReorder.tsx(32,34): error TS2532: Object is possibly 'undefined'. -src/products/containers/ProductImagesReorder.tsx(34,31): error TS2538: Type 'null' cannot be used as an index type. -src/products/containers/ProductUpdateOperations.tsx(105,11): error TS2322: Type '(ProductDetails_product_images | null)[] | null' is not assignable to type '{ id: string; url: string; }[]'. -src/products/urls.ts(66,39): error TS2345: Argument of type 'ProductListUrlQueryParams | undefined' is not assignable to parameter of type 'object'. -src/products/urls.ts(72,59): error TS2345: Argument of type 'ProductUrlQueryParams | undefined' is not assignable to parameter of type 'object'. -src/products/urls.ts(88,15): error TS2345: Argument of type 'Partial<{ action: "remove"; }> | undefined' is not assignable to parameter of type 'object'. -src/products/urls.ts(106,15): error TS2345: Argument of type 'Partial<{ action: "remove"; }> | undefined' is not assignable to parameter of type 'object'. -src/products/utils/data.ts(39,7): error TS2322: Type '{ data: { inputType: AttributeInputTypeEnum | null; isRequired: boolean; values: (ProductDetails_product_attributes_attribute_values | null)[] | null; }; id: string; label: string | null; value: (string | null)[]; }[]' is not assignable to type 'ProductAttributeInput[]'. -src/products/utils/data.ts(47,46): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(60,3): error TS2322: Type '{ id: string; values: { label: string | null; value: string | null; }[]; }[]' is not assignable to type 'ProductAttributeValueChoices[]'. -src/products/utils/data.ts(65,18): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(66,18): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(76,3): error TS2322: Type '{ data: { inputType: AttributeInputTypeEnum | null; isRequired: boolean; values: (SearchProductTypes_search_edges_node_productAttributes_values | null)[] | null; }; id: string; label: string | null; value: never[]; }[]' is not assignable to type 'ProductAttributeInput[]'. -src/products/utils/data.ts(93,7): error TS2322: Type '{ data: { values: (ProductVariant_attributes_attribute_values | null)[] | null; }; id: string; label: string | null; value: string | null; }[]' is not assignable to type 'VariantAttributeInput[]'. -src/products/utils/data.ts(99,28): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(108,3): error TS2322: Type '{ data: { values: (ProductVariantCreateData_product_productType_variantAttributes_values | null)[] | null; }; id: string; label: string | null; value: string; }[] | undefined' is not assignable to type 'VariantAttributeInput[]'. -src/products/utils/data.ts(109,5): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(111,17): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(113,11): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(114,14): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(164,28): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(165,27): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(168,13): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(168,51): error TS2531: Object is possibly 'null'. -src/products/utils/data.ts(175,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/utils/data.ts(176,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/utils/data.ts(177,5): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/utils/data.ts(186,5): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/products/utils/handlers.ts(20,28): error TS2532: Object is possibly 'undefined'. -src/products/utils/handlers.ts(25,26): error TS2532: Object is possibly 'undefined'. -src/products/utils/handlers.ts(34,27): error TS2345: Argument of type '(ProductAttributeValueChoices | { values: { label: string | null; value: string; }[]; id: string; })[]' is not assignable to parameter of type 'ProductAttributeValueChoices[]'. -src/products/utils/handlers.ts(56,28): error TS2532: Object is possibly 'undefined'. -src/products/utils/handlers.ts(84,27): error TS2345: Argument of type '(ProductAttributeValueChoices | { values: { label: string | null; value: string; }[]; id: string; })[]' is not assignable to parameter of type 'ProductAttributeValueChoices[]'. -src/products/utils/handlers.ts(106,20): error TS2345: Argument of type 'ProductType | undefined' is not assignable to parameter of type 'ProductType'. -src/products/utils/handlers.ts(109,52): error TS2345: Argument of type 'ProductType | undefined' is not assignable to parameter of type 'ProductType'. -src/products/utils/handlers.ts(111,7): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductCreate.tsx(54,9): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(54,9): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(60,27): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(60,27): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(62,30): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(62,30): error TS2531: Object is possibly 'null'. -src/products/views/ProductCreate.tsx(66,18): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/views/ProductCreate.tsx(113,37): error TS2571: Object is of type 'unknown'. -src/products/views/ProductCreate.tsx(123,15): error TS2322: Type 'ProductCreate_productCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/products/views/ProductCreate.tsx(124,23): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductCreate.tsx(124,23): error TS2531: Object is possibly 'null'. -src/products/views/ProductImage.tsx(41,9): error TS2531: Object is possibly 'null'. -src/products/views/ProductImage.tsx(41,9): error TS2531: Object is possibly 'null'. -src/products/views/ProductImage.tsx(83,25): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductImage.tsx(83,46): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductImage.tsx(83,46): error TS2531: Object is possibly 'null'. -src/products/views/ProductImage.tsx(84,25): error TS2322: Type 'ProductImageById_product_mainImage | null' is not assignable to type '{ id: string; alt: string; url: string; } | undefined'. -src/products/views/ProductImage.tsx(85,25): error TS2322: Type '(ProductImageById_product_images | null)[] | null | undefined' is not assignable to type '{ id: string; url: string; }[] | undefined'. -src/products/views/ProductImage.tsx(85,45): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductImage.tsx(85,45): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(56,47): error TS2344: Type 'SearchCategoriesVariables' does not satisfy the constraint 'SearchVariables'. -src/products/views/ProductList/filters.ts(60,48): error TS2344: Type 'SearchCollectionsVariables' does not satisfy the constraint 'SearchVariables'. -src/products/views/ProductList/filters.ts(64,49): error TS2344: Type 'SearchProductTypesVariables' does not satisfy the constraint 'SearchVariables'. -src/products/views/ProductList/filters.ts(68,5): error TS2322: Type '{ active: boolean; choices: { label: string | null; value: string | null; }[]; name: string | null; slug: string | null; value: any; }[]' is not assignable to type '(FilterOpts & { choices: MultiAutocompleteChoiceType[]; name: string; slug: string; })[]'. -src/products/views/ProductList/filters.ts(69,24): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(69,33): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(71,29): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(71,47): error TS2538: Type 'null' cannot be used as an index type. -src/products/views/ProductList/filters.ts(72,18): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(73,18): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(74,18): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(79,52): error TS2538: Type 'null' cannot be used as an index type. -src/products/views/ProductList/filters.ts(80,33): error TS2538: Type 'null' cannot be used as an index type. -src/products/views/ProductList/filters.ts(87,11): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(87,11): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(104,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(104,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(111,39): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/products/views/ProductList/filters.ts(117,11): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(117,11): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(134,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(134,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(141,39): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/products/views/ProductList/filters.ts(150,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductList/filters.ts(151,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductList/filters.ts(158,11): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(158,11): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(175,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(175,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/filters.ts(182,39): error TS2345: Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. -src/products/views/ProductList/filters.ts(186,42): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/views/ProductList/filters.ts(190,42): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/views/ProductList/filters.ts(203,27): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(204,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(205,18): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/filters.ts(215,23): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/views/ProductList/filters.ts(216,23): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/products/views/ProductList/filters.ts(231,4): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. -src/products/views/ProductList/fixtures.ts(13,3): error TS2322: Type '{ active: false; choices: { label: string | null; value: string | null; }[]; name: string | null; slug: string | null; value: (string | false | null)[]; }[]' is not assignable to type '(FilterOpts & { choices: MultiAutocompleteChoiceType[]; name: string; slug: string; })[]'. -src/products/views/ProductList/fixtures.ts(15,14): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(16,14): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(17,14): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(21,13): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(21,13): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(21,34): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(21,60): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/fixtures.ts(21,60): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(180,38): error TS2571: Object is of type 'unknown'. -src/products/views/ProductList/ProductList.tsx(194,17): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(194,17): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(197,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(197,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(204,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(204,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(211,15): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(211,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(220,7): error TS2322: Type '{ first: number; ids: ProductListColumns[] | undefined; }' is not assignable to type 'AvailableInGridAttributesVariables'. -src/products/views/ProductList/ProductList.tsx(226,15): error TS2345: Argument of type 'ProductList_products_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/products/views/ProductList/ProductList.tsx(226,27): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(226,27): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(232,19): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(232,19): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(243,19): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(243,19): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(262,27): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductList/ProductList.tsx(270,31): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(270,31): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(283,31): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(283,31): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(286,27): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/products/views/ProductList/ProductList.tsx(287,35): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(287,35): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(294,31): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(294,31): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(300,27): error TS2322: Type 'ProductList_products_edges_node[] | undefined' is not assignable to type 'ProductList_products_edges_node[]'. -src/products/views/ProductList/ProductList.tsx(301,29): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(301,29): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(305,31): error TS2345: Argument of type '(prev: AvailableInGridAttributes, next: AvailableInGridAttributes) => AvailableInGridAttributes | { ...; }' is not assignable to parameter of type '(prev: AvailableInGridAttributes, next: AvailableInGridAttributes) => AvailableInGridAttributes'. -src/products/views/ProductList/ProductList.tsx(307,35): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(308,35): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(317,42): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(318,42): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(320,47): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(326,35): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(326,35): error TS2531: Object is possibly 'null'. -src/products/views/ProductList/ProductList.tsx(394,47): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/products/views/ProductList/ProductList.tsx(409,54): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(412,50): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(424,48): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: true; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/products/views/ProductList/ProductList.tsx(441,54): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(444,50): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(456,48): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; isPublished: false; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/products/views/ProductList/ProductList.tsx(473,54): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/ProductList.tsx(476,50): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductList/sort.ts(21,7): error TS2322: Type 'undefined' is not assignable to type 'ProductOrderField'. -src/products/views/ProductList/sort.ts(31,36): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/views/ProductList/sort.ts(35,34): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/products/views/ProductList/sort.ts(36,30): error TS2345: Argument of type 'ProductListUrlSortField.name | ProductListUrlSortField.productType | ProductListUrlSortField.status | ProductListUrlSortField.price | undefined' is not assignable to parameter of type 'ProductListUrlSortField'. -src/products/views/ProductUpdate/handlers.ts(43,27): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/handlers.ts(43,27): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/handlers.ts(70,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/handlers.ts(70,43): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(100,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(100,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(105,36): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(105,36): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(109,24): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/views/ProductUpdate/ProductUpdate.tsx(115,30): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(115,30): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(121,15): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/products/views/ProductUpdate/ProductUpdate.tsx(134,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(134,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(143,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(143,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(152,13): error TS2322: Type 'ProductDetails_product | undefined' is not assignable to type 'ProductDetails_product'. -src/products/views/ProductUpdate/ProductUpdate.tsx(175,17): error TS2345: Argument of type 'ProductDetails_product | undefined' is not assignable to parameter of type 'ProductDetails_product'. -src/products/views/ProductUpdate/ProductUpdate.tsx(184,17): error TS2345: Argument of type 'ProductDetails_product | undefined' is not assignable to parameter of type 'ProductDetails_product'. -src/products/views/ProductUpdate/ProductUpdate.tsx(197,17): error TS2345: Argument of type 'ProductUpdate_productUpdate_errors[] | null | undefined' is not assignable to parameter of type 'UserError[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(197,29): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(197,29): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(198,29): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(198,29): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(201,21): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(201,21): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(214,20): error TS2569: Type 'ProductUpdate_productUpdate_errors[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/products/views/ProductUpdate/ProductUpdate.tsx(215,25): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(215,25): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(218,20): error TS2569: Type 'SimpleProductUpdate_productUpdate_errors[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/products/views/ProductUpdate/ProductUpdate.tsx(219,25): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(219,25): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(226,32): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductUpdate/ProductUpdate.tsx(226,51): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(226,51): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(235,21): error TS2322: Type '(ProductDetails_product_images | null)[] | null | undefined' is not assignable to type 'ProductDetails_product_images[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(235,41): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(235,41): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(236,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductUpdate/ProductUpdate.tsx(236,41): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(238,21): error TS2322: Type 'ProductDetails_product | undefined' is not assignable to type 'ProductDetails_product'. -src/products/views/ProductUpdate/ProductUpdate.tsx(239,21): error TS2322: Type '(ProductDetails_product_variants | null)[] | null | undefined' is not assignable to type 'ProductDetails_product_variants[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(239,43): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(252,54): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(316,25): error TS2322: Type 'string[] | undefined' is not assignable to type 'string[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(330,48): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(332,50): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(339,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductUpdate/ProductUpdate.tsx(340,23): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(340,23): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(340,23): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(342,21): error TS2322: Type 'ProductVariantBulkCreate_productVariantBulkCreate_bulkProductErrors[] | null' is not assignable to type 'ProductVariantBulkCreate_productVariantBulkCreate_bulkProductErrors[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(344,25): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(344,25): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(349,21): error TS2322: Type '(ProductDetails_product_productType_variantAttributes | null)[] | null' is not assignable to type 'ProductDetails_product_productType_variantAttributes[]'. -src/products/views/ProductUpdate/ProductUpdate.tsx(350,29): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductUpdate/ProductUpdate.tsx(350,29): error TS2531: Object is possibly 'null'. -src/products/views/ProductUpdate/ProductUpdate.tsx(353,49): error TS2571: Object is of type 'unknown'. -src/products/views/ProductVariant.tsx(69,16): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariant.tsx(69,16): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariant.tsx(72,23): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariant.tsx(72,23): error TS2345: Argument of type 'VariantUpdate_productVariantUpdate_productErrors[] | null' is not assignable to parameter of type 'SetStateAction'. -src/products/views/ProductVariant.tsx(93,49): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariant.tsx(110,32): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductVariant.tsx(110,51): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductVariant.tsx(110,51): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariant.tsx(117,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductVariant.tsx(159,21): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/products/views/ProductVariant.tsx(159,39): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductVariant.tsx(159,39): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(38,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(38,15): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(47,17): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(47,17): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(92,49): error TS2571: Object is of type 'unknown'. -src/products/views/ProductVariantCreate.tsx(93,21): error TS2322: Type 'VariantCreate_productVariantCreate_productErrors[] | null' is not assignable to type 'VariantCreate_productVariantCreate_productErrors[]'. -src/products/views/ProductVariantCreate.tsx(95,25): error TS2532: Object is possibly 'undefined'. -src/products/views/ProductVariantCreate.tsx(95,25): error TS2531: Object is possibly 'null'. -src/products/views/ProductVariantCreate.tsx(104,21): error TS2322: Type 'ProductVariantCreateData_product | null | undefined' is not assignable to type 'ProductVariantCreateData_product'. -src/products/views/ProductVariantCreate.tsx(104,42): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx(95,37): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx(198,53): error TS2345: Argument of type 'MutableRefObject' is not assignable to parameter of type 'MutableRefObject'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(154,36): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(157,43): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(164,46): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(168,34): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(169,23): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(175,34): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(176,23): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx(184,45): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx(55,5): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx(55,5): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx(53,18): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(71,5): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(71,5): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(96,17): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(108,5): error TS2322: Type '{ label: string | null; value: string; }[]' is not assignable to type 'ChoiceType[]'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(110,11): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(111,20): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(112,20): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(115,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(115,26): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(116,5): error TS2322: Type '{ label: string | null; value: string; }[]' is not assignable to type 'ChoiceType[]'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(118,11): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(119,20): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(120,20): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(123,5): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(123,25): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(146,17): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(158,17): error TS2322: Type '(ProductTypeDetails_productType_productAttributes | null)[] | null | undefined' is not assignable to type 'ProductTypeDetails_productType_productAttributes[] | ProductTypeDetails_productType_variantAttributes[]'. -src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx(184,21): error TS2322: Type '(ProductTypeDetails_productType_variantAttributes | null)[] | null | undefined' is not assignable to type 'ProductTypeDetails_productType_productAttributes[] | ProductTypeDetails_productType_variantAttributes[]'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(87,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(102,35): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(146,41): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(153,44): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(177,32): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(178,21): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(198,32): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(199,21): error TS2532: Object is possibly 'undefined'. -src/productTypes/components/ProductTypeList/ProductTypeList.tsx(199,21): error TS2531: Object is possibly 'null'. -src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx(58,11): error TS2322: Type '{ label: string | null; value: string | null; }[]' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/productTypes/containers/ProductTypeOperations.tsx(48,37): error TS2533: Object is possibly 'null' or 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(128,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(128,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(131,39): error TS2345: Argument of type '(ProductTypeDetailsFragment_productAttributes | null)[] | null' is not assignable to parameter of type 'ProductTypeDetailsFragment_productAttributes[]'. -src/productTypes/containers/ProductTypeOperations.tsx(132,39): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(132,39): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(136,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(136,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(139,39): error TS2345: Argument of type '(ProductTypeDetailsFragment_variantAttributes | null)[] | null' is not assignable to parameter of type 'ProductTypeDetailsFragment_productAttributes[]'. -src/productTypes/containers/ProductTypeOperations.tsx(140,39): error TS2532: Object is possibly 'undefined'. -src/productTypes/containers/ProductTypeOperations.tsx(140,39): error TS2532: Object is possibly 'undefined'. -src/productTypes/hooks/useAvailableAttributeSearch/index.tsx(40,45): error TS2344: Type 'SearchAttributesVariables' does not satisfy the constraint 'SearchVariables'. -src/productTypes/views/ProductTypeCreate.tsx(22,9): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(22,9): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(28,31): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(28,31): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(58,19): error TS2322: Type 'WeightUnitsEnum | null | undefined' is not assignable to type 'WeightUnitsEnum'. -src/productTypes/views/ProductTypeCreate.tsx(58,50): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeCreate.tsx(58,50): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(60,19): error TS2322: Type 'ProductTypeCreate_productTypeCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/productTypes/views/ProductTypeCreate.tsx(61,27): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeCreate.tsx(61,27): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeCreate.tsx(70,19): error TS2322: Type '(ProductTypeCreateData_taxTypes | null)[] | null' is not assignable to type 'ProductTypeDetails_taxTypes[]'. -src/productTypes/views/ProductTypeCreate.tsx(70,41): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeList/filters.ts(32,25): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/productTypes/views/ProductTypeList/filters.ts(37,42): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(95,5): error TS2322: Type '(params?: ProductTypeListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(128,5): error TS2345: Argument of type 'ProductTypeList_productTypes_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(128,17): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(128,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(134,9): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(134,9): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(151,38): error TS2571: Object is of type 'unknown'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(159,33): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(180,15): error TS2322: Type 'ProductTypeList_productTypes_edges_node[] | undefined' is not assignable to type 'ProductTypeList_productTypes_edges_node[]'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(181,17): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(181,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(224,42): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeList/ProductTypeList.tsx(226,44): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeList/sort.ts(14,7): error TS2322: Type 'undefined' is not assignable to type 'ProductTypeSortField'. -src/productTypes/views/ProductTypeUpdate/index.tsx(74,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(74,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(80,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(81,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(83,46): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(83,46): error TS2345: Argument of type 'AssignAttribute_attributeAssign_errors[]' is not assignable to parameter of type 'UserError[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(89,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(89,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(101,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(101,19): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(114,18): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(115,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(121,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(122,17): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(124,38): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(124,38): error TS2345: Argument of type 'ProductTypeUpdate_productTypeUpdate_errors[]' is not assignable to parameter of type 'UserError[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(130,17): error TS2322: Type 'ProductTypeDetails_productType | null | undefined' is not assignable to type 'ProductTypeDetailsFragment'. -src/productTypes/views/ProductTypeUpdate/index.tsx(130,42): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(178,35): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(180,49): error TS2538: Type 'undefined' cannot be used as an index type. -src/productTypes/views/ProductTypeUpdate/index.tsx(187,29): error TS2322: Type 'string | undefined' is not assignable to type 'string | null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(193,23): error TS2322: Type 'string[] | undefined' is not assignable to type '(string | null)[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(204,27): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(204,27): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(205,27): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(205,27): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(209,29): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(209,29): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(219,36): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/productTypes/views/ProductTypeUpdate/index.tsx(219,55): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(219,55): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(221,25): error TS2322: Type 'WeightUnitsEnum | null | undefined' is not assignable to type 'WeightUnitsEnum'. -src/productTypes/views/ProductTypeUpdate/index.tsx(222,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(222,33): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(226,25): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/productTypes/views/ProductTypeUpdate/index.tsx(226,48): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(226,48): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(227,25): error TS2322: Type 'ProductTypeDetails_productType | null | undefined' is not assignable to type 'ProductTypeDetails_productType'. -src/productTypes/views/ProductTypeUpdate/index.tsx(227,50): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(229,25): error TS2322: Type '(ProductTypeDetails_taxTypes | null)[] | null' is not assignable to type 'ProductTypeDetails_taxTypes[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(229,47): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(322,29): error TS2322: Type '(string | null)[]' is not assignable to type 'string[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(324,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(324,33): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(324,33): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(345,29): error TS2322: Type 'string[] | undefined' is not assignable to type 'string[]'. -src/productTypes/views/ProductTypeUpdate/index.tsx(351,40): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(352,39): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(355,43): error TS2569: Type 'string[] | undefined' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/productTypes/views/ProductTypeUpdate/index.tsx(364,43): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(364,43): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(370,25): error TS2322: Type 'number | undefined' is not assignable to type 'number'. -src/productTypes/views/ProductTypeUpdate/index.tsx(370,56): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(376,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(376,33): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(384,34): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(384,34): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(384,34): error TS2569: Type '(ProductTypeDetails_productType_productAttributes | null)[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/productTypes/views/ProductTypeUpdate/index.tsx(385,34): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(385,34): error TS2531: Object is possibly 'null'. -src/productTypes/views/ProductTypeUpdate/index.tsx(385,34): error TS2569: Type '(ProductTypeDetails_productType_variantAttributes | null)[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/productTypes/views/ProductTypeUpdate/index.tsx(395,33): error TS2532: Object is possibly 'undefined'. -src/productTypes/views/ProductTypeUpdate/index.tsx(395,33): error TS2531: Object is possibly 'null'. -src/queries.tsx(86,31): error TS2532: Object is possibly 'undefined'. -src/searches/useCategorySearch.ts(31,35): error TS2344: Type 'SearchCategories' does not satisfy the constraint 'SearchData'. -src/searches/useCollectionSearch.ts(32,3): error TS2344: Type 'SearchCollections' does not satisfy the constraint 'SearchData'. -src/searches/useCustomerSearch.ts(33,35): error TS2344: Type 'SearchCustomers' does not satisfy the constraint 'SearchData'. -src/searches/usePageSearch.ts(24,35): error TS2344: Type 'SearchPages' does not satisfy the constraint 'SearchData'. -src/searches/useProductSearch.ts(30,35): error TS2344: Type 'SearchProducts' does not satisfy the constraint 'SearchData'. -src/searches/useProductTypeSearch.ts(45,3): error TS2344: Type 'SearchProductTypes' does not satisfy the constraint 'SearchData'. -src/searches/useServiceAccountSearch.ts(32,3): error TS2344: Type 'SearchServiceAccount' does not satisfy the constraint 'SearchData'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx(26,3): error TS2322: Type 'null' is not assignable to type 'string'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx(32,36): error TS2322: Type 'undefined' is not assignable to type 'ServiceDetails_serviceAccount'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(71,13): error TS2531: Object is possibly 'null'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(72,27): error TS2531: Object is possibly 'null'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(77,5): error TS2322: Type 'boolean | null' is not assignable to type 'boolean'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(78,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(79,18): error TS2531: Object is possibly 'null'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(79,67): error TS2531: Object is possibly 'null'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(88,23): error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'. -src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx(110,17): error TS2322: Type '(ServiceDetails_serviceAccount_tokens | null)[] | null | undefined' is not assignable to type 'ServiceDetailsFragment_tokens[]'. -src/services/components/ServiceList/ServiceList.tsx(87,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/services/components/ServiceList/ServiceList.tsx(129,49): error TS2532: Object is possibly 'undefined'. -src/services/components/ServiceList/ServiceList.tsx(133,21): error TS2532: Object is possibly 'undefined'. -src/services/components/ServiceListPage/ServiceListPage.stories.tsx(45,49): error TS2322: Type 'undefined' is not assignable to type 'ServiceList_serviceAccounts_edges_node[]'. -src/services/components/ServiceTokenCreateDialog/ServiceTokenCreateDialog.tsx(117,49): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/services/components/ServiceTokens/ServiceTokens.tsx(96,49): error TS2532: Object is possibly 'undefined'. -src/services/components/ServiceTokens/ServiceTokens.tsx(100,35): error TS2532: Object is possibly 'undefined'. -src/services/components/ServiceTokens/ServiceTokens.tsx(107,45): error TS2532: Object is possibly 'undefined'. -src/services/index.tsx(55,52): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | (() => string)'. -src/services/views/ServiceCreate/ServiceCreate.tsx(27,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(27,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(31,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(31,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(32,16): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(32,16): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/services/views/ServiceCreate/ServiceCreate.tsx(48,21): error TS2571: Object is of type 'unknown'. -src/services/views/ServiceCreate/ServiceCreate.tsx(64,15): error TS2322: Type 'ServiceCreate_serviceAccountCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/services/views/ServiceCreate/ServiceCreate.tsx(65,23): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceCreate/ServiceCreate.tsx(65,23): error TS2531: Object is possibly 'null'. -src/services/views/ServiceCreate/ServiceCreate.tsx(70,40): error TS2571: Object is of type 'unknown'. -src/services/views/ServiceDetails/ServiceDetails.tsx(63,21): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(63,21): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(70,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(70,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(90,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(90,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(95,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(95,27): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(123,39): error TS2571: Object is of type 'unknown'. -src/services/views/ServiceDetails/ServiceDetails.tsx(149,41): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/services/views/ServiceDetails/ServiceDetails.tsx(159,33): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/services/views/ServiceDetails/ServiceDetails.tsx(161,33): error TS2322: Type 'ServiceUpdate_serviceAccountUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/services/views/ServiceDetails/ServiceDetails.tsx(163,37): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(163,37): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(178,58): error TS2571: Object is of type 'unknown'. -src/services/views/ServiceDetails/ServiceDetails.tsx(179,33): error TS2322: Type 'ServiceDetails_serviceAccount | null | undefined' is not assignable to type 'ServiceDetails_serviceAccount'. -src/services/views/ServiceDetails/ServiceDetails.tsx(179,54): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(184,33): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/services/views/ServiceDetails/ServiceDetails.tsx(185,41): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(185,41): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(197,33): error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(199,37): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(199,37): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(206,49): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(206,49): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(206,49): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(207,46): error TS2531: Object is possibly 'null'. -src/services/views/ServiceDetails/ServiceDetails.tsx(209,39): error TS2533: Object is possibly 'null' or 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(210,44): error TS2533: Object is possibly 'null' or 'undefined'. -src/services/views/ServiceDetails/ServiceDetails.tsx(213,50): error TS2533: Object is possibly 'null' or 'undefined'. -src/services/views/ServiceList/ServiceList.tsx(89,5): error TS2322: Type '(params?: ServiceListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/services/views/ServiceList/ServiceList.tsx(120,5): error TS2345: Argument of type 'ServiceList_serviceAccounts_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/services/views/ServiceList/ServiceList.tsx(120,17): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceList/ServiceList.tsx(120,17): error TS2531: Object is possibly 'null'. -src/services/views/ServiceList/ServiceList.tsx(128,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceList/ServiceList.tsx(128,9): error TS2531: Object is possibly 'null'. -src/services/views/ServiceList/ServiceList.tsx(138,38): error TS2571: Object is of type 'unknown'. -src/services/views/ServiceList/ServiceList.tsx(144,25): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/services/views/ServiceList/ServiceList.tsx(167,15): error TS2322: Type 'ServiceList_serviceAccounts_edges_node[] | undefined' is not assignable to type 'ServiceList_serviceAccounts_edges_node[]'. -src/services/views/ServiceList/ServiceList.tsx(168,17): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceList/ServiceList.tsx(168,17): error TS2531: Object is possibly 'null'. -src/services/views/ServiceList/ServiceList.tsx(186,15): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/services/views/ServiceList/ServiceList.tsx(188,19): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceList/ServiceList.tsx(188,19): error TS2531: Object is possibly 'null'. -src/services/views/ServiceList/ServiceList.tsx(188,19): error TS2532: Object is possibly 'undefined'. -src/services/views/ServiceList/sort.ts(12,7): error TS2322: Type 'undefined' is not assignable to type 'ServiceAccountSortField'. -src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx(75,19): error TS2322: Type '(CountryFragment | undefined)[]' is not assignable to type 'CountryFragment[]'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(75,17): error TS2322: Type '(ShippingZoneDetailsFragment_countries | null)[] | null | undefined' is not assignable to type 'CountryFragment[]'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(102,17): error TS2322: Type '(ShippingZoneDetailsFragment_shippingMethods | null)[] | undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods[]'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(103,19): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(104,31): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(115,17): error TS2322: Type '(ShippingZoneDetailsFragment_shippingMethods | null)[] | undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods[]'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(116,19): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx(117,31): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(94,31): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(97,29): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(98,29): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(101,29): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(102,29): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx(105,30): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(128,49): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(135,27): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods_minimumOrderPrice | null' is not assignable to type 'IMoney | undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(135,33): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(136,27): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods_maximumOrderPrice | null' is not assignable to type 'IMoney | undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(136,31): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(140,27): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods_minimumOrderWeight | null' is not assignable to type 'Weight | undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(140,33): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(141,27): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods_maximumOrderWeight | null' is not assignable to type 'Weight | undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(141,31): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(150,30): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods_price | null' is not assignable to type 'IMoney'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(150,37): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(157,45): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx(163,47): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZonesList/ShippingZonesList.tsx(150,46): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZonesList/ShippingZonesList.tsx(155,29): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZonesList/ShippingZonesList.tsx(161,29): error TS2532: Object is possibly 'undefined'. -src/shipping/components/ShippingZonesList/ShippingZonesList.tsx(161,29): error TS2531: Object is possibly 'null'. -src/shipping/components/ShippingZonesList/ShippingZonesList.tsx(171,34): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneCreate.tsx(21,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneCreate.tsx(21,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneCreate.tsx(25,32): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneCreate.tsx(25,32): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneCreate.tsx(32,34): error TS2571: Object is of type 'unknown'. -src/shipping/views/ShippingZoneCreate.tsx(34,11): error TS2322: Type 'CreateShippingZone_shippingZoneCreate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/shipping/views/ShippingZoneCreate.tsx(35,19): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneCreate.tsx(35,19): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(40,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(40,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(49,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(49,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(58,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(58,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(67,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(67,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(76,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(76,9): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(98,17): error TS2322: Type 'UpdateShippingZone_shippingZoneUpdate_errors[] | null | undefined' is not assignable to type 'UserError[]'. -src/shipping/views/ShippingZoneDetails/index.tsx(100,21): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneDetails/index.tsx(100,21): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/index.tsx(174,17): error TS2322: Type 'ShippingZone_shippingZone | null | undefined' is not assignable to type 'ShippingZoneDetailsFragment'. -src/shipping/views/ShippingZoneDetails/index.tsx(174,43): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneDetails/index.tsx(186,17): error TS2322: Type 'ShippingZone_shippingZone | null | undefined' is not assignable to type 'ShippingZoneDetailsFragment'. -src/shipping/views/ShippingZoneDetails/index.tsx(186,43): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(49,5): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(49,47): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(57,38): error TS2571: Object is of type 'unknown'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(59,9): error TS2322: Type 'UpdateShippingRate_shippingPriceUpdate_errors[] | null' is not assignable to type 'UserError[]'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(60,17): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(60,17): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(66,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(77,33): error TS2533: Object is possibly 'null' or 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(82,9): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods | null | undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(83,9): error TS2322: Type 'ShippingMethodTypeEnum | null | undefined' is not assignable to type 'ShippingMethodTypeEnum'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(83,30): error TS2533: Object is possibly 'null' or 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(90,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(106,33): error TS2533: Object is possibly 'null' or 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(114,38): error TS2571: Object is of type 'unknown'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(116,9): error TS2322: Type 'CreateShippingRate_shippingPriceCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(117,17): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(117,17): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(157,9): error TS2322: Type 'undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(158,9): error TS2322: Type 'ShippingMethodTypeEnum | undefined' is not assignable to type 'ShippingMethodTypeEnum'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(188,32): error TS2571: Object is of type 'unknown'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(190,17): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(190,55): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(213,26): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(214,36): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(215,33): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(235,23): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(235,23): error TS2533: Object is possibly 'null' or 'undefined'. -src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx(236,36): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(49,11): error TS2339: Property 'user' does not exist on type 'unknown'. -src/shipping/views/ShippingZonesList.tsx(66,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(66,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(84,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(84,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(94,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(94,15): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(119,25): error TS2345: Argument of type 'ShippingZones_shippingZones_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/shipping/views/ShippingZonesList.tsx(119,37): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZonesList.tsx(119,37): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(128,37): error TS2571: Object is of type 'unknown'. -src/shipping/views/ShippingZonesList.tsx(136,29): error TS2322: Type 'ShippingZones_shippingZones_edges_node[] | undefined' is not assignable to type 'ShippingZoneFragment[]'. -src/shipping/views/ShippingZonesList.tsx(137,31): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZonesList.tsx(137,31): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(193,50): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/shipping/views/ShippingZonesList.tsx(206,43): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZonesList.tsx(206,43): error TS2531: Object is possibly 'null'. -src/shipping/views/ShippingZonesList.tsx(206,43): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZonesList.tsx(229,54): error TS2345: Argument of type '{ variables: { ids: string[] | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/shipping/views/ShippingZonesList.tsx(239,56): error TS2532: Object is possibly 'undefined'. -src/shipping/views/ShippingZonesList.tsx(242,52): error TS2532: Object is possibly 'undefined'. -src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx(86,70): error TS2532: Object is possibly 'undefined'. -src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx(89,49): error TS2532: Object is possibly 'undefined'. -src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx(94,49): error TS2532: Object is possibly 'undefined'. -src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx(97,55): error TS2532: Object is possibly 'undefined'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(102,17): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(111,23): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(112,30): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(113,26): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(114,30): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(115,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(115,24): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(116,29): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(117,33): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(118,33): error TS2531: Object is possibly 'null'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(122,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(123,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(124,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(125,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(145,11): error TS2345: Argument of type '(SiteSettings_shop_countries | null)[]' is not assignable to parameter of type 'ShopInfo_shop_countries[]'. -src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx(230,17): error TS2322: Type '(SiteSettings_shop_authorizationKeys | null)[] | undefined' is not assignable to type 'SiteSettings_shop_authorizationKeys[]'. -src/siteSettings/fixtures.ts(13,3): error TS2322: Type '{ __typename: "Address"; city: string; cityArea: string; companyName: string; country: { __typename: "CountryDisplay"; code: string; country: string; }; countryArea: null; firstName: null; id: string; ... 4 more ...; streetAddress2: null; }' is not assignable to type 'SiteSettings_shop_companyAddress'. -src/siteSettings/views/index.tsx(40,22): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(40,22): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(48,22): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(48,22): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(59,27): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(59,27): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(67,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(68,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(69,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(70,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(71,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(72,9): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(92,26): error TS2569: Type 'ShopSettingsUpdate_shopDomainUpdate_errors[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/siteSettings/views/index.tsx(94,27): error TS2532: Object is possibly 'undefined'. -src/siteSettings/views/index.tsx(94,27): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(97,26): error TS2569: Type 'ShopSettingsUpdate_shopSettingsUpdate_errors[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/siteSettings/views/index.tsx(99,27): error TS2532: Object is possibly 'undefined'. -src/siteSettings/views/index.tsx(99,27): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(102,26): error TS2569: Type 'ShopSettingsUpdate_shopAddressUpdate_errors[] | null' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. -src/siteSettings/views/index.tsx(104,27): error TS2532: Object is possibly 'undefined'. -src/siteSettings/views/index.tsx(104,27): error TS2531: Object is possibly 'null'. -src/siteSettings/views/index.tsx(168,27): error TS2322: Type 'SiteSettings_shop | null | undefined' is not assignable to type 'SiteSettings_shop'. -src/siteSettings/views/index.tsx(168,45): error TS2532: Object is possibly 'undefined'. -src/siteSettings/views/index.tsx(186,27): error TS2322: Type 'AuthorizationKeyAdd_authorizationKeyAdd_errors[] | null' is not assignable to type 'UserError[]'. -src/siteSettings/views/index.tsx(188,31): error TS2532: Object is possibly 'undefined'. -src/siteSettings/views/index.tsx(188,31): error TS2531: Object is possibly 'null'. -src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx(76,13): error TS2531: Object is possibly 'null'. -src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx(77,27): error TS2531: Object is possibly 'null'. -src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx(84,18): error TS2531: Object is possibly 'null'. -src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx(84,71): error TS2531: Object is possibly 'null'. -src/staff/components/StaffList/StaffList.tsx(95,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/staff/components/StaffList/StaffList.tsx(110,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/staff/components/StaffList/StaffList.tsx(124,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/staff/components/StaffList/StaffList.tsx(129,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/staff/components/StaffList/StaffList.tsx(150,32): error TS2532: Object is possibly 'undefined'. -src/staff/components/StaffList/StaffList.tsx(150,32): error TS2531: Object is possibly 'null'. -src/staff/components/StaffList/StaffList.tsx(153,40): error TS2532: Object is possibly 'undefined'. -src/staff/components/StaffList/StaffList.tsx(153,40): error TS2531: Object is possibly 'null'. -src/staff/components/StaffList/StaffList.tsx(167,23): error TS2532: Object is possibly 'undefined'. -src/staff/components/StaffList/StaffList.tsx(181,47): error TS2532: Object is possibly 'undefined'. -src/staff/components/StaffProperties/StaffProperties.tsx(125,31): error TS2531: Object is possibly 'null'. -src/staff/components/StaffProperties/StaffProperties.tsx(139,28): error TS2531: Object is possibly 'null'. -src/staff/components/StaffProperties/StaffProperties.tsx(142,36): error TS2531: Object is possibly 'null'. -src/staff/components/StaffProperties/StaffProperties.tsx(167,54): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(56,9): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(56,9): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(79,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(79,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(86,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(86,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(94,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(94,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(101,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(101,28): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(126,35): error TS2571: Object is of type 'unknown'. -src/staff/views/StaffDetails.tsx(126,52): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffDetails.tsx(126,52): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(184,58): error TS2571: Object is of type 'unknown'. -src/staff/views/StaffDetails.tsx(185,33): error TS2322: Type 'StaffMemberDetails_user | undefined' is not assignable to type 'StaffMemberDetails_user'. -src/staff/views/StaffDetails.tsx(203,58): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffDetails.tsx(203,58): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(225,56): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffDetails.tsx(225,56): error TS2531: Object is possibly 'null'. -src/staff/views/StaffDetails.tsx(234,33): error TS2322: Type 'ChangeStaffPassword_passwordChange_errors[] | null' is not assignable to type 'UserError[]'. -src/staff/views/StaffDetails.tsx(236,37): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffDetails.tsx(236,37): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/filters.ts(27,42): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/staff/views/StaffList/sort.ts(12,7): error TS2322: Type 'undefined' is not assignable to type 'UserSortField'. -src/staff/views/StaffList/StaffList.tsx(67,38): error TS2571: Object is of type 'unknown'. -src/staff/views/StaffList/StaffList.tsx(95,5): error TS2322: Type '(params?: StaffListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/staff/views/StaffList/StaffList.tsx(126,9): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(126,9): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(130,38): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(130,38): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(145,33): error TS2571: Object is of type 'unknown'. -src/staff/views/StaffList/StaffList.tsx(157,11): error TS2345: Argument of type 'StaffList_staffUsers_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/staff/views/StaffList/StaffList.tsx(157,23): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffList/StaffList.tsx(157,23): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(182,15): error TS2322: Type 'StaffList_staffUsers_edges_node[] | undefined' is not assignable to type 'StaffList_staffUsers_edges_node[]'. -src/staff/views/StaffList/StaffList.tsx(183,17): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffList/StaffList.tsx(183,17): error TS2531: Object is possibly 'null'. -src/staff/views/StaffList/StaffList.tsx(195,15): error TS2322: Type 'StaffMemberAdd_staffCreate_errors[] | null' is not assignable to type 'UserError[]'. -src/staff/views/StaffList/StaffList.tsx(196,23): error TS2532: Object is possibly 'undefined'. -src/staff/views/StaffList/StaffList.tsx(196,23): error TS2531: Object is possibly 'null'. -src/storybook/mock.tsx(39,22): error TS2769: No overload matches this call. -src/storybook/mock.tsx(47,20): error TS2769: No overload matches this call. -src/storybook/mock.tsx(49,5): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/storybook/mock.tsx(61,5): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/storybook/mock.tsx(71,5): error TS2322: Type 'Timeout' is not assignable to type 'null'. -src/storybook/stories/attributes/AttributeListPage.tsx(64,35): error TS2322: Type 'undefined' is not assignable to type 'AttributeList_attributes_edges_node[]'. -src/storybook/stories/attributes/AttributePage.tsx(24,3): error TS2322: Type '(AttributeDetailsFragment_values | null)[] | null' is not assignable to type 'AttributeDetailsFragment_values[]'. -src/storybook/stories/attributes/AttributePage.tsx(33,7): error TS2322: Type 'undefined' is not assignable to type 'AttributeDetailsFragment | null'. -src/storybook/stories/attributes/AttributePage.tsx(35,7): error TS2322: Type 'undefined' is not assignable to type 'AttributeDetailsFragment_values[]'. -src/storybook/stories/attributes/AttributePage.tsx(38,53): error TS2322: Type 'undefined' is not assignable to type 'AttributeDetailsFragment_values[]'. -src/storybook/stories/attributes/AttributeValueEditDialog.tsx(13,3): error TS2322: Type '{ type: AttributeValueType.STRING; } | { type: AttributeValueType.STRING; __typename: "AttributeValue"; id: string; name: string | null; slug: string | null; }' is not assignable to type 'AttributeDetails_attribute_values | null'. -src/storybook/stories/attributes/AttributeValueEditDialog.tsx(14,8): error TS2531: Object is possibly 'null'. -src/storybook/stories/auth/LoginPage.tsx(12,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/categories/CategoryListPage.tsx(37,47): error TS2322: Type 'undefined' is not assignable to type 'CategoryFragment[]'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(19,3): error TS2322: Type 'undefined' is not assignable to type '(index: CategoryPageTab) => void'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(23,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(24,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(26,26): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(30,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(31,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(32,25): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(39,13): error TS2531: Object is possibly 'null'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(41,18): error TS2531: Object is possibly 'null'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(77,7): error TS2322: Type 'undefined' is not assignable to type 'CategoryDetails_category_children_edges_node[]'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(79,7): error TS2322: Type 'undefined' is not assignable to type 'CategoryDetails_category_products_edges_node[]'. -src/storybook/stories/categories/CategoryUpdatePage.tsx(80,7): error TS2322: Type 'undefined' is not assignable to type 'CategoryDetails_category'. -src/storybook/stories/collections/CollectionDetailsPage.tsx(40,39): error TS2322: Type 'undefined' is not assignable to type 'CollectionDetails_collection'. -src/storybook/stories/collections/CollectionDetailsPage.tsx(55,9): error TS2322: Type '{ edges: never[]; } | { edges: never[]; __typename: "ProductCountableConnection"; pageInfo: CollectionDetails_collection_products_pageInfo; }' is not assignable to type 'CollectionDetails_collection_products | null'. -src/storybook/stories/collections/CollectionListPage.tsx(44,36): error TS2322: Type 'undefined' is not assignable to type 'CollectionList_collections_edges_node[]'. -src/storybook/stories/components/ActionDialog.tsx(13,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/components/ActionDialog.tsx(14,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/components/AddressEdit.tsx(24,40): error TS2345: Argument of type '(CustomerDetails_user_defaultBillingAddress & CustomerAddresses_user_defaultBillingAddress) | null' is not assignable to parameter of type 'AddressType'. -src/storybook/stories/components/AddressEdit.tsx(29,32): error TS2531: Object is possibly 'null'. -src/storybook/stories/components/AddressEdit.tsx(30,11): error TS2322: Type 'undefined' is not assignable to type '(event: ChangeEvent) => any'. -src/storybook/stories/components/AddressFormatter.tsx(13,23): error TS2322: Type '(CustomerDetails_user_defaultBillingAddress & CustomerAddresses_user_defaultBillingAddress) | null' is not assignable to type 'AddressType | undefined'. -src/storybook/stories/components/AssignAttributeDialog.tsx(30,39): error TS2322: Type 'undefined' is not assignable to type 'SearchAttributes_productType_availableAttributes_edges_node[]'. -src/storybook/stories/components/AutocompleteSelectMenu.tsx(72,17): error TS2533: Object is possibly 'null' or 'undefined'. -src/storybook/stories/components/AutocompleteSelectMenu.tsx(74,3): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/components/AutocompleteSelectMenu.tsx(110,25): error TS2533: Object is possibly 'null' or 'undefined'. -src/storybook/stories/components/MultiSelectField.tsx(20,41): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(25,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(32,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(39,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(46,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(54,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/MultiSelectField.tsx(63,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PhoneField.tsx(18,7): error TS2322: Type 'undefined' is not assignable to type '(event: ChangeEvent) => any'. -src/storybook/stories/components/PriceField.tsx(11,43): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(12,53): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(14,37): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(17,36): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(20,36): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(22,47): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(24,44): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(31,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/PriceField.tsx(41,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SaveButtonBar.tsx(43,11): error TS2322: Type 'Timeout' is not assignable to type 'undefined'. -src/storybook/stories/components/SaveButtonBar.tsx(67,23): error TS2322: Type '{ state: "default"; disabled: boolean; onCancel: undefined; onDelete: undefined; onSave: undefined; }' is not assignable to type 'SaveButtonBarProps'. -src/storybook/stories/components/SaveButtonBar.tsx(68,26): error TS2322: Type '{ state: "loading"; disabled: boolean; onCancel: undefined; onDelete: undefined; onSave: undefined; }' is not assignable to type 'SaveButtonBarProps'. -src/storybook/stories/components/SaveButtonBar.tsx(69,26): error TS2322: Type '{ state: "success"; disabled: boolean; onCancel: undefined; onDelete: undefined; onSave: undefined; }' is not assignable to type 'SaveButtonBarProps'. -src/storybook/stories/components/SaveButtonBar.tsx(70,24): error TS2322: Type '{ state: "error"; disabled: boolean; onCancel: undefined; onDelete: undefined; onSave: undefined; }' is not assignable to type 'SaveButtonBarProps'. -src/storybook/stories/components/SaveButtonBar.tsx(71,27): error TS2322: Type '{ disabled: true; onCancel: undefined; onDelete: undefined; onSave: undefined; state: ConfirmButtonTransitionState; }' is not assignable to type 'SaveButtonBarProps'. -src/storybook/stories/components/SingleSelectField.tsx(19,42): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(24,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(31,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(38,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(45,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(53,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/SingleSelectField.tsx(62,7): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(18,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(19,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(29,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(30,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(40,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(41,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(51,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/components/TablePagination.tsx(52,9): error TS2322: Type 'undefined' is not assignable to type '(event: any) => any'. -src/storybook/stories/configuration/ConfigurationPage.tsx(14,17): error TS2531: Object is possibly 'null'. -src/storybook/stories/configuration/ConfigurationPage.tsx(15,10): error TS2531: Object is possibly 'null'. -src/storybook/stories/configuration/ConfigurationPage.tsx(45,22): error TS2531: Object is possibly 'null'. -src/storybook/stories/customers/CustomerAddressDialog.tsx(12,3): error TS2322: Type 'CustomerAddresses_user_addresses | null' is not assignable to type 'CustomerAddresses_user_addresses'. -src/storybook/stories/customers/CustomerAddressDialog.tsx(12,12): error TS2531: Object is possibly 'null'. -src/storybook/stories/customers/CustomerAddressListPage.tsx(24,41): error TS2322: Type 'undefined' is not assignable to type 'CustomerAddresses_user'. -src/storybook/stories/customers/CustomerDetailsPage.tsx(36,37): error TS2322: Type 'undefined' is not assignable to type 'CustomerDetails_user'. -src/storybook/stories/customers/CustomerDetailsPage.tsx(51,9): error TS2322: Type '{ id: string; } | { id: string; __typename: "Address"; city: string; cityArea: string; companyName: string; country: CustomerDetails_user_defaultBillingAddress_country; ... 6 more ...; streetAddress2: string; }' is not assignable to type 'CustomerDetails_user_defaultBillingAddress | null'. -src/storybook/stories/customers/CustomerDetailsPage.tsx(72,9): error TS2322: Type '{ edges: never[]; } | { edges: never[]; __typename: "OrderCountableConnection"; }' is not assignable to type 'CustomerDetails_user_lastPlacedOrder | null'. -src/storybook/stories/customers/CustomerListPage.tsx(31,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(32,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(38,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(39,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(45,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(46,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/customers/CustomerListPage.tsx(60,50): error TS2322: Type 'undefined' is not assignable to type 'ListCustomers_customers_edges_node[]'. -src/storybook/stories/discounts/SaleDetailsPage.tsx(22,26): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/SaleDetailsPage.tsx(25,28): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/SaleDetailsPage.tsx(30,25): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/SaleDetailsPage.tsx(49,33): error TS2322: Type 'undefined' is not assignable to type 'SaleDetails_sale'. -src/storybook/stories/discounts/SaleListPage.tsx(37,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/SaleListPage.tsx(38,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/SaleListPage.tsx(56,50): error TS2322: Type 'undefined' is not assignable to type 'SaleList_sales_edges_node[]'. -src/storybook/stories/discounts/VoucherDetailsPage.tsx(24,26): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/VoucherDetailsPage.tsx(27,28): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/VoucherDetailsPage.tsx(32,25): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/discounts/VoucherDetailsPage.tsx(46,52): error TS2322: Type 'undefined' is not assignable to type 'VoucherDetails_voucher'. -src/storybook/stories/discounts/VoucherListPage.tsx(39,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/VoucherListPage.tsx(40,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/VoucherListPage.tsx(50,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/VoucherListPage.tsx(51,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/discounts/VoucherListPage.tsx(65,53): error TS2322: Type 'undefined' is not assignable to type 'VoucherList_vouchers_edges_node[]'. -src/storybook/stories/home/HomePage.tsx(15,15): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(20,3): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(20,11): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(21,3): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(21,20): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(22,3): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(22,20): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(23,3): error TS2322: Type 'number | null' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(23,23): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(24,10): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(25,16): error TS2531: Object is possibly 'null'. -src/storybook/stories/home/HomePage.tsx(36,7): error TS2322: Type 'undefined' is not assignable to type 'Home_activities_edges_node[]'. -src/storybook/stories/home/HomePage.tsx(37,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(38,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(39,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(40,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/home/HomePage.tsx(41,7): error TS2322: Type 'undefined' is not assignable to type 'Home_salesToday_gross'. -src/storybook/stories/home/HomePage.tsx(42,7): error TS2322: Type 'undefined' is not assignable to type 'Home_productTopToday_edges_node[]'. -src/storybook/stories/home/HomePage.tsx(43,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/navigation/MenuDetailsPage.tsx(18,19): error TS2322: Type 'undefined' is not assignable to type 'Promise'. -src/storybook/stories/navigation/MenuDetailsPage.tsx(26,49): error TS2322: Type 'undefined' is not assignable to type 'MenuDetails_menu'. -src/storybook/stories/navigation/MenuListPage.tsx(33,46): error TS2322: Type 'undefined' is not assignable to type 'MenuList_menus_edges_node[]'. -src/storybook/stories/orders/OrderAddressEditDialog.tsx(16,39): error TS2345: Argument of type 'OrderDetails_order_shippingAddress | null' is not assignable to parameter of type 'AddressType'. -src/storybook/stories/orders/OrderAddressEditDialog.tsx(28,39): error TS2345: Argument of type 'OrderDetails_order_billingAddress | null' is not assignable to parameter of type 'AddressType'. -src/storybook/stories/orders/OrderCancelDialog.tsx(14,7): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => any'. -src/storybook/stories/orders/OrderCustomer.tsx(30,51): error TS2322: Type 'undefined' is not assignable to type 'OrderDetails_order'. -src/storybook/stories/orders/OrderCustomer.tsx(36,9): error TS2322: Type '{ id: string; } | { id: string; __typename: "Address"; city: string; cityArea: string; companyName: string; country: OrderDetails_order_shippingAddress_country; ... 6 more ...; streetAddress2: string; }' is not assignable to type 'OrderDetails_order_shippingAddress | null'. -src/storybook/stories/orders/OrderDetailsPage.tsx(23,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(26,3): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(27,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(28,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(29,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(30,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(31,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(32,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(35,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderDetailsPage.tsx(43,54): error TS2322: Type 'undefined' is not assignable to type 'OrderDetails_order'. -src/storybook/stories/orders/OrderDetailsPage.tsx(103,9): error TS2322: Type '({ status: FulfillmentStatus.CANCELED; } | { status: FulfillmentStatus.CANCELED; __typename: "Fulfillment"; id: string; lines: (OrderDetails_order_fulfillments_lines | null)[] | null; fulfillmentOrder: number; trackingNumber: string; })[]' is not assignable to type '(OrderDetails_order_fulfillments | null)[]'. -src/storybook/stories/orders/OrderDraftListPage.tsx(30,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/orders/OrderDraftListPage.tsx(31,9): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/orders/OrderDraftListPage.tsx(36,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/orders/OrderDraftListPage.tsx(51,45): error TS2322: Type 'undefined' is not assignable to type 'OrderDraftList_draftOrders_edges_node[]'. -src/storybook/stories/orders/OrderDraftPage.tsx(21,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderDraftPage.tsx(25,3): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => void'. -src/storybook/stories/orders/OrderDraftPage.tsx(29,3): error TS2322: Type 'undefined' is not assignable to type '(id: string) => void'. -src/storybook/stories/orders/OrderDraftPage.tsx(31,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderDraftPage.tsx(32,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderDraftPage.tsx(44,48): error TS2322: Type 'undefined' is not assignable to type 'OrderDetails_order'. -src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx(13,7): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => any'. -src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx(14,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderFulfillmentDialog.tsx(16,3): error TS2322: Type '(OrderDetails_order_lines | null)[]' is not assignable to type 'OrderDetails_order_lines[]'. -src/storybook/stories/orders/OrderFulfillmentDialog.tsx(17,3): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderFulfillmentDialog.tsx(18,3): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => any'. -src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx(14,7): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => any'. -src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx(15,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderHistory.tsx(13,19): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => void'. -src/storybook/stories/orders/OrderHistory.tsx(13,41): error TS2322: Type '(OrderDetails_order_events | null)[] | null' is not assignable to type 'OrderDetails_order_events[]'. -src/storybook/stories/orders/OrderListPage.tsx(53,7): error TS2322: Type 'undefined' is not assignable to type 'OrderList_orders_edges_node[]'. -src/storybook/stories/orders/OrderListPage.tsx(54,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/orders/OrderPaymentDialog.tsx(15,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderPaymentDialog.tsx(16,7): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => void'. -src/storybook/stories/orders/OrderPaymentDialog.tsx(25,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderPaymentDialog.tsx(26,7): error TS2322: Type 'undefined' is not assignable to type '(data: FormData) => void'. -src/storybook/stories/orders/OrderProductAddDialog.tsx(16,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/orders/OrderProductAddDialog.tsx(17,7): error TS2322: Type 'undefined' is not assignable to type '(data: SearchOrderVariant_search_edges_node_variants[]) => void'. -src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx(15,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx(18,7): error TS2322: Type 'null' is not assignable to type 'string'. -src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx(19,7): error TS2322: Type '(OrderDetails_order_availableShippingMethods | null)[] | null' is not assignable to type 'OrderDetails_order_availableShippingMethods[] | undefined'. -src/storybook/stories/pages/PageDetailsPage.tsx(26,49): error TS2322: Type 'undefined' is not assignable to type 'PageDetails_page'. -src/storybook/stories/pages/PageListPage.tsx(32,46): error TS2322: Type 'undefined' is not assignable to type 'PageList_pages_edges_node[]'. -src/storybook/stories/plugins/PluginDetailsPage.tsx(27,52): error TS2322: Type 'undefined' is not assignable to type 'Plugin_plugin'. -src/storybook/stories/plugins/PluginsListPage.tsx(38,49): error TS2322: Type 'undefined' is not assignable to type 'Plugins_plugins_edges_node[]'. -src/storybook/stories/products/ProductCreatePage.tsx(23,7): error TS2322: Type '(ProductDetails_product_collections | null)[] | null' is not assignable to type 'SearchCollections_search_edges_node[]'. -src/storybook/stories/products/ProductCreatePage.tsx(30,7): error TS2322: Type '(SearchProductTypes_search_edges_node & ProductTypeList_productTypes_edges_node)[]' is not assignable to type '{ id: string; name: string; hasVariants: boolean; productAttributes: SearchProductTypes_search_edges_node_productAttributes[]; }[]'. -src/storybook/stories/products/ProductCreatePage.tsx(31,20): error TS2322: Type 'ProductDetails_product_category | null' is not assignable to type 'SearchCategories_search_edges_node'. -src/storybook/stories/products/ProductCreatePage.tsx(43,7): error TS2322: Type '(ProductDetails_product_collections | null)[] | null' is not assignable to type 'SearchCollections_search_edges_node[]'. -src/storybook/stories/products/ProductCreatePage.tsx(50,7): error TS2322: Type '(SearchProductTypes_search_edges_node & ProductTypeList_productTypes_edges_node)[]' is not assignable to type '{ id: string; name: string; hasVariants: boolean; productAttributes: SearchProductTypes_search_edges_node_productAttributes[]; }[]'. -src/storybook/stories/products/ProductCreatePage.tsx(51,20): error TS2322: Type 'ProductDetails_product_category | null' is not assignable to type 'SearchCategories_search_edges_node'. -src/storybook/stories/products/ProductCreatePage.tsx(65,7): error TS2322: Type '(ProductDetails_product_collections | null)[] | null' is not assignable to type 'SearchCollections_search_edges_node[]'. -src/storybook/stories/products/ProductCreatePage.tsx(72,7): error TS2322: Type '(SearchProductTypes_search_edges_node & ProductTypeList_productTypes_edges_node)[]' is not assignable to type '{ id: string; name: string; hasVariants: boolean; productAttributes: SearchProductTypes_search_edges_node_productAttributes[]; }[]'. -src/storybook/stories/products/ProductCreatePage.tsx(73,20): error TS2322: Type 'ProductDetails_product_category | null' is not assignable to type 'SearchCategories_search_edges_node'. -src/storybook/stories/products/ProductImagePage.tsx(22,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductImagePage.tsx(23,25): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductImagePage.tsx(33,7): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductImagePage.tsx(34,25): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductListPage.tsx(37,3): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/products/ProductListPage.tsx(43,3): error TS2322: Type '{ columns: ("productType" | "isPublished" | "price")[]; } | { columns: ("productType" | "isPublished" | "price")[]; rowNumber: number; }' is not assignable to type 'ListSettings | undefined'. -src/storybook/stories/products/ProductListPage.tsx(56,7): error TS2322: Type 'undefined' is not assignable to type 'ProductList_products_edges_node[]'. -src/storybook/stories/products/ProductListPage.tsx(57,7): error TS2322: Type 'undefined' is not assignable to type 'number'. -src/storybook/stories/products/ProductUpdatePage.tsx(19,16): error TS2322: Type 'ProductDetails_product_category | null' is not assignable to type 'SearchCategories_search_edges_node'. -src/storybook/stories/products/ProductUpdatePage.tsx(28,3): error TS2322: Type '((ProductDetails_product_images | null)[] & (ProductVariantCreateData_product_images | null)[]) | null' is not assignable to type 'ProductDetails_product_images[]'. -src/storybook/stories/products/ProductUpdatePage.tsx(31,24): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductUpdatePage.tsx(36,24): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/products/ProductUpdatePage.tsx(41,3): error TS2322: Type '((ProductDetails_product_variants | null)[] & (ProductVariantCreateData_product_variants | null)[]) | null' is not assignable to type 'ProductDetails_product_variants[]'. -src/storybook/stories/products/ProductUpdatePage.tsx(63,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/products/ProductUpdatePage.tsx(65,7): error TS2322: Type 'undefined' is not assignable to type 'ProductDetails_product_variants[]'. -src/storybook/stories/products/ProductUpdatePage.tsx(66,7): error TS2322: Type 'undefined' is not assignable to type 'ProductDetails_product'. -src/storybook/stories/products/ProductUpdatePage.tsx(67,7): error TS2322: Type 'undefined' is not assignable to type 'SearchCollections_search_edges_node[]'. -src/storybook/stories/products/ProductUpdatePage.tsx(68,7): error TS2322: Type 'undefined' is not assignable to type 'ProductDetails_product_images[]'. -src/storybook/stories/products/ProductVariantCreatePage.tsx(23,7): error TS2322: Type 'undefined' is not assignable to type '(variantId: string) => void'. -src/storybook/stories/products/ProductVariantCreatePage.tsx(53,7): error TS2322: Type 'undefined' is not assignable to type '(variantId: string) => void'. -src/storybook/stories/products/ProductVariantCreatePage.tsx(63,7): error TS2322: Type 'undefined' is not assignable to type 'ProductVariantCreateData_product'. -src/storybook/stories/products/ProductVariantCreatePage.tsx(66,7): error TS2322: Type 'undefined' is not assignable to type '(variantId: string) => void'. -src/storybook/stories/products/ProductVariantCreatePage.tsx(82,7): error TS2322: Type 'undefined' is not assignable to type '(variantId: string) => void'. -src/storybook/stories/products/ProductVariantImageSelectDialog.tsx(18,7): error TS2322: Type '(ProductVariant_product_images | null)[] | null' is not assignable to type 'ProductImage[] | undefined'. -src/storybook/stories/products/ProductVariantImageSelectDialog.tsx(19,23): error TS2531: Object is possibly 'null'. -src/storybook/stories/products/ProductVariantImageSelectDialog.tsx(19,50): error TS2531: Object is possibly 'null'. -src/storybook/stories/products/ProductVariantPage.tsx(21,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/products/ProductVariantPage.tsx(30,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/products/ProductVariantPage.tsx(36,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/products/ProductVariantPage.tsx(49,7): error TS2322: Type 'undefined' is not assignable to type '() => any'. -src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx(16,3): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx(21,3): error TS2322: Type '{ label: string | null; value: string; }[]' is not assignable to type '{ label: string; value: string; }[]'. -src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx(21,11): error TS2531: Object is possibly 'null'. -src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx(22,12): error TS2531: Object is possibly 'null'. -src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx(23,12): error TS2531: Object is possibly 'null'. -src/storybook/stories/productTypes/ProductTypeCreatePage.tsx(28,55): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx(42,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx(43,7): error TS2322: Type 'undefined' is not assignable to type 'ProductTypeDetails_productType'. -src/storybook/stories/productTypes/ProductTypeListPage.tsx(52,53): error TS2322: Type 'undefined' is not assignable to type 'ProductTypeList_productTypes_edges_node[]'. -src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx(35,7): error TS2322: Type 'undefined' is not assignable to type 'ShippingZoneDetailsFragment'. -src/storybook/stories/shipping/ShippingZoneRateDialog.tsx(21,3): error TS2322: Type 'ShippingZoneDetailsFragment_shippingMethods | null' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods'. -src/storybook/stories/shipping/ShippingZoneRateDialog.tsx(21,9): error TS2531: Object is possibly 'null'. -src/storybook/stories/shipping/ShippingZoneRateDialog.tsx(29,56): error TS2322: Type 'undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods'. -src/storybook/stories/shipping/ShippingZoneRateDialog.tsx(32,40): error TS2322: Type 'undefined' is not assignable to type 'ShippingZoneDetailsFragment_shippingMethods'. -src/storybook/stories/shipping/ShippingZonesListPage.tsx(35,7): error TS2322: Type 'undefined' is not assignable to type 'ShippingZoneFragment[]'. -src/storybook/stories/siteSettings/SiteSettingsPage.tsx(27,50): error TS2322: Type 'undefined' is not assignable to type 'SiteSettings_shop'. -src/storybook/stories/staff/StaffDetailsPage.tsx(33,50): error TS2322: Type 'undefined' is not assignable to type 'StaffMemberDetails_user'. -src/storybook/stories/staff/StaffDetailsPage.tsx(40,22): error TS2531: Object is possibly 'null'. -src/storybook/stories/staff/StaffListPage.tsx(31,3): error TS2322: Type 'undefined' is not assignable to type '() => void'. -src/storybook/stories/staff/StaffListPage.tsx(44,47): error TS2322: Type 'undefined' is not assignable to type 'StaffList_staffUsers_edges_node[]'. -src/storybook/stories/taxes/CountryListPage.tsx(30,33): error TS2322: Type 'undefined' is not assignable to type 'CountryList_shop'. -src/storybook/stories/taxes/CountryTaxesPage.tsx(13,3): error TS2322: Type '(CountryList_shop_countries_vat_reducedRates | null)[]' is not assignable to type 'CountryList_shop_countries_vat_reducedRates[]'. -src/storybook/stories/taxes/CountryTaxesPage.tsx(13,18): error TS2531: Object is possibly 'null'. -src/storybook/stories/taxes/CountryTaxesPage.tsx(22,7): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/storybook/stories/taxes/CountryTaxesPage.tsx(23,7): error TS2322: Type 'undefined' is not assignable to type 'CountryList_shop_countries_vat_reducedRates[]'. -src/storybook/stories/translations/TranslationsLanguageListPage.tsx(19,46): error TS2322: Type 'undefined' is not assignable to type 'ShopInfo_shop_languages[]'. -src/taxes/components/CountryList/CountryList.tsx(67,49): error TS2532: Object is possibly 'undefined'. -src/taxes/components/CountryList/CountryList.tsx(70,49): error TS2532: Object is possibly 'undefined'. -src/taxes/components/CountryList/CountryList.tsx(74,27): error TS2532: Object is possibly 'undefined'. -src/taxes/components/CountryList/CountryList.tsx(74,27): error TS2531: Object is possibly 'null'. -src/taxes/components/CountryListPage/CountryListPage.tsx(73,19): error TS2322: Type '(CountryList_shop_countries | null)[] | undefined' is not assignable to type 'CountryList_shop_countries[]'. -src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx(191,52): error TS2532: Object is possibly 'undefined'. -src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx(197,33): error TS2532: Object is possibly 'undefined'. -src/taxes/views/CountryList.tsx(22,9): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryList.tsx(22,9): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryList.tsx(30,9): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryList.tsx(30,9): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryList.tsx(67,19): error TS2322: Type '{ countries: (CountryList_shop_countries | null)[]; } | { countries: (CountryList_shop_countries | null)[]; __typename: "Shop"; chargeTaxesOnShipping: boolean; includeTaxesInPrices: boolean; displayGrossPrices: boolean; } | undefined' is not assignable to type 'CountryList_shop'. -src/taxes/views/CountryList.tsx(68,24): error TS2532: Object is possibly 'undefined'. -src/taxes/views/CountryList.tsx(69,32): error TS2532: Object is possibly 'undefined'. -src/taxes/views/CountryList.tsx(69,32): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryList.tsx(70,34): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryTaxes.tsx(20,11): error TS2532: Object is possibly 'undefined'. -src/taxes/views/CountryTaxes.tsx(20,11): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryTaxes.tsx(20,47): error TS2531: Object is possibly 'null'. -src/taxes/views/CountryTaxes.tsx(24,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/taxes/views/CountryTaxes.tsx(24,38): error TS2533: Object is possibly 'null' or 'undefined'. -src/taxes/views/CountryTaxes.tsx(25,13): error TS2322: Type '(CountryList_shop_countries_vat_reducedRates | null)[] | undefined' is not assignable to type 'CountryList_shop_countries_vat_reducedRates[]'. -src/taxes/views/CountryTaxes.tsx(25,40): error TS2533: Object is possibly 'null' or 'undefined'. -src/taxes/views/CountryTaxes.tsx(25,40): error TS2531: Object is possibly 'null'. -src/theme.ts(21,18): error TS2345: Argument of type '{ overrides: { MuiButton: { contained: { "&$disabled": { backgroundColor: string; }; "&:active": { boxShadow: null; }; "&:hover": { boxShadow: null; }; boxShadow: null; }; containedPrimary: { "&:active": { backgroundColor: string; }; "&:hover": { ...; }; }; label: { ...; }; root: { ...; }; text: { ...; }; textPrimar...' is not assignable to parameter of type 'ThemeOptions'. -src/translations/components/TranslationFields/TranslationFields.tsx(170,25): error TS2322: Type 'undefined' is not assignable to type '(data: string) => void'. -src/translations/components/TranslationFields/TranslationFields.tsx(179,25): error TS2322: Type 'undefined' is not assignable to type '(data: string) => void'. -src/translations/components/TranslationFields/TranslationFields.tsx(188,25): error TS2322: Type 'undefined' is not assignable to type '(data: string) => void'. -src/translations/components/TranslationFields/TranslationFieldsRich.tsx(39,13): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -src/translations/components/TranslationFields/TranslationFieldsRich.tsx(40,13): error TS2322: Type 'undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(77,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(81,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(112,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(116,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(123,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx(127,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(80,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(84,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(117,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(121,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(128,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx(134,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx(81,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx(85,13): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx(105,47): error TS2532: Object is possibly 'undefined'. -src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx(115,23): error TS2532: Object is possibly 'undefined'. -src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx(57,43): error TS2532: Object is possibly 'undefined'. -src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx(61,27): error TS2532: Object is possibly 'undefined'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(77,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(81,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(115,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(119,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(126,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx(130,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(78,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(82,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(115,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(119,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(126,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx(130,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(67,8): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(80,34): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(88,54): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(89,19): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(90,21): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(90,45): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(93,19): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(93,38): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(95,17): error TS2322: Type '{ displayName: string; name: string; translation: string | null | undefined; type: "short"; value: string | null | undefined; }' is not assignable to type 'TranslationField'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(95,20): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(95,20): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(106,52): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(108,23): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(109,27): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(113,40): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(122,31): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(131,12): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(144,38): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(152,58): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(153,23): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(154,25): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(155,29): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(159,23): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(159,42): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(161,21): error TS2322: Type '{ displayName: string; name: string; translation: string | null | undefined; type: "short"; value: string | null | undefined; }' is not assignable to type 'TranslationField'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(161,24): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(161,24): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(172,56): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(174,27): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(175,31): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(179,44): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx(188,35): error TS2531: Object is possibly 'null'. -src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx(73,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx(77,13): error TS2322: Type 'string | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx(74,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx(78,13): error TS2322: Type 'string | null | undefined' is not assignable to type 'string'. -src/translations/views/TranslationsCategories.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsCategories.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsCategories.tsx(94,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsCategories.tsx(111,17): error TS2322: Type 'CategoryTranslationDetails_category | null | undefined' is not assignable to type 'CategoryTranslationFragment'. -src/translations/views/TranslationsCategories.tsx(111,39): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsCollections.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsCollections.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsCollections.tsx(97,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsCollections.tsx(118,17): error TS2322: Type 'CollectionTranslationDetails_collection | null | undefined' is not assignable to type 'CollectionTranslationFragment'. -src/translations/views/TranslationsCollections.tsx(118,41): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(44,5): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(47,10): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(47,35): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(61,49): error TS2345: Argument of type '"categories" | "collections" | "pages" | "productTypes" | "products" | "sales" | "vouchers" | undefined' is not assignable to parameter of type 'string'. -src/translations/views/TranslationsEntities.tsx(123,5): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsEntities.tsx(150,9): error TS2322: Type '"categories" | "collections" | "pages" | "productTypes" | "products" | "sales" | "vouchers" | undefined' is not assignable to type '"categories" | "collections" | "pages" | "productTypes" | "products" | "sales" | "vouchers"'. -src/translations/views/TranslationsEntities.tsx(160,15): error TS2345: Argument of type 'CategoryTranslations_categories_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(160,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(160,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(168,17): error TS2322: Type '{ completion: { current: any; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(169,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(169,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(210,15): error TS2345: Argument of type 'ProductTranslations_products_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(210,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(210,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(218,17): error TS2322: Type '{ completion: { current: any; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(219,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(219,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(260,15): error TS2345: Argument of type 'CollectionTranslations_collections_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(260,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(260,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(268,17): error TS2322: Type '{ completion: { current: any; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(269,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(269,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(310,15): error TS2345: Argument of type 'SaleTranslations_sales_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(310,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(310,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(318,17): error TS2322: Type '{ completion: { current: number; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(319,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(319,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(348,15): error TS2345: Argument of type 'VoucherTranslations_vouchers_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(348,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(348,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(356,17): error TS2322: Type '{ completion: { current: number; max: number; }; id: string; name: string | null; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(357,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(357,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(390,15): error TS2345: Argument of type 'PageTranslations_pages_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(390,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(390,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(398,17): error TS2322: Type '{ completion: { current: any; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(399,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(399,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(436,15): error TS2345: Argument of type 'ProductTypeTranslations_productTypes_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/translations/views/TranslationsEntities.tsx(436,27): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(436,27): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(444,17): error TS2322: Type '{ completion: { current: number; max: number; }; id: string; name: string; }[] | undefined' is not assignable to type 'TranslatableEntity[]'. -src/translations/views/TranslationsEntities.tsx(445,19): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsEntities.tsx(445,19): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(451,31): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(455,31): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(463,54): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(463,54): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(467,54): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsEntities.tsx(467,54): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsLanguageList.tsx(15,30): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsPages.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsPages.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsPages.tsx(97,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsPages.tsx(114,17): error TS2322: Type 'PageTranslationDetails_page | null | undefined' is not assignable to type 'PageTranslationFragment'. -src/translations/views/TranslationsPages.tsx(114,35): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsProducts.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProducts.tsx(51,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProducts.tsx(94,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsProducts.tsx(111,17): error TS2322: Type 'ProductTranslationDetails_product | null | undefined' is not assignable to type 'ProductTranslationFragment'. -src/translations/views/TranslationsProducts.tsx(111,38): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsProductTypes.tsx(58,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(58,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(66,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(66,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(120,19): error TS2345: Argument of type 'UpdateAttributeTranslations_attributeTranslate_errors[] | null' is not assignable to parameter of type 'UserError[]'. -src/translations/views/TranslationsProductTypes.tsx(122,23): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsProductTypes.tsx(122,23): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(128,23): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsProductTypes.tsx(128,23): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsProductTypes.tsx(143,44): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsProductTypes.tsx(164,21): error TS2322: Type 'ProductTypeTranslationDetails_productType | null | undefined' is not assignable to type 'ProductTypeTranslationFragment'. -src/translations/views/TranslationsProductTypes.tsx(165,29): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsSales.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsSales.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsSales.tsx(90,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsSales.tsx(108,17): error TS2322: Type 'SaleTranslationDetails_sale | null | undefined' is not assignable to type 'SaleTranslationFragment'. -src/translations/views/TranslationsSales.tsx(108,35): error TS2532: Object is possibly 'undefined'. -src/translations/views/TranslationsVouchers.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsVouchers.tsx(54,9): error TS2531: Object is possibly 'null'. -src/translations/views/TranslationsVouchers.tsx(90,40): error TS2571: Object is of type 'unknown'. -src/translations/views/TranslationsVouchers.tsx(108,17): error TS2322: Type 'VoucherTranslationDetails_voucher | null | undefined' is not assignable to type 'VoucherTranslationFragment'. -src/translations/views/TranslationsVouchers.tsx(108,38): error TS2532: Object is possibly 'undefined'. -src/utils/credentialsManagement.ts(7,7): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -src/utils/credentialsManagement.ts(10,32): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. -src/utils/credentialsManagement.ts(17,7): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -src/utils/errors.ts(4,3): error TS2322: Type 'UserError | undefined' is not assignable to type 'UserError'. -src/utils/filters/storage.ts(11,21): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. -src/utils/handlers/multiAutocompleteSelectChangeHandler.ts(17,17): error TS2345: Argument of type '(MultiAutocompleteChoiceType | undefined)[]' is not assignable to parameter of type 'MultiAutocompleteChoiceType[]'. -src/utils/handlers/multiAutocompleteSelectChangeHandler.ts(17,52): error TS2532: Object is possibly 'undefined'. -src/utils/handlers/multiAutocompleteSelectChangeHandler.ts(17,64): error TS2532: Object is possibly 'undefined'. -src/utils/menu/menu.ts(30,9): error TS2322: Type '(TValue | undefined)[]' is not assignable to type 'TValue[]'. -src/utils/menu/menu.ts(59,9): error TS2322: Type 'IFlatMenuItem | undefined' is not assignable to type 'IFlatMenuItem'. -src/utils/menu/menu.ts(97,7): error TS2532: Object is possibly 'undefined'. -src/utils/menu/menu.ts(98,13): error TS2322: Type 'IFlatMenuItem | undefined' is not assignable to type 'IFlatMenuItem'. -src/utils/menu/menu.ts(101,11): error TS2322: Type 'IFlatMenuItem | undefined' is not assignable to type 'IFlatMenuItem'. -src/utils/menu/menu.ts(101,46): error TS2532: Object is possibly 'undefined'. -src/utils/menu/menu.ts(110,11): error TS2532: Object is possibly 'undefined'. -src/utils/menu/menu.ts(112,43): error TS2532: Object is possibly 'undefined'. -src/utils/menu/menu.ts(113,45): error TS2345: Argument of type 'IFlatMenuItem | undefined' is not assignable to parameter of type 'IFlatMenuItem'. -src/utils/menu/menu.ts(144,72): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string'. -src/utils/sort.ts(82,3): error TS2322: Type '(params: TParams) => { direction: OrderDirection; field: TSortField; } | undefined' is not assignable to type 'GetSortQueryVariables'. -src/utils/urls.ts(12,5): error TS2322: Type 'undefined' is not assignable to type 'string[]'. -src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx(65,7): error TS2532: Object is possibly 'undefined'. -src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx(78,11): error TS2345: Argument of type '{ label: string | null; value: string; }[]' is not assignable to parameter of type 'SingleAutocompleteChoiceType[]'. -src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx(99,19): error TS2322: Type '{ label: string | null; value: string; }[]' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(75,34): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(76,37): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(102,11): error TS2322: Type 'string | false' is not assignable to type 'string | undefined'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(118,34): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(120,27): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(138,34): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhookInfo/WebhookInfo.tsx(140,27): error TS2345: Argument of type 'WebhookCreate_webhookCreate_webhookErrors[]' is not assignable to parameter of type 'UserError[]'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.stories.tsx(28,7): error TS2322: Type 'undefined' is not assignable to type 'WebhookDetails_webhook'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(59,18): error TS2531: Object is possibly 'null'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(60,16): error TS2531: Object is possibly 'null'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(62,5): error TS2322: Type '(WebhookEventTypeEnum | null)[]' is not assignable to type 'WebhookEventTypeEnum[]'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(62,13): error TS2531: Object is possibly 'null'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(63,21): error TS2531: Object is possibly 'null'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(66,5): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(77,7): error TS2532: Object is possibly 'undefined'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(89,11): error TS2345: Argument of type '{ label: string | null; value: string; }[]' is not assignable to parameter of type 'SingleAutocompleteChoiceType[]'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(112,19): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx(113,19): error TS2322: Type '{ label: string | null; value: string; }[]' is not assignable to type 'SingleAutocompleteChoiceType[]'. -src/webhooks/components/WebhooksList/WebhooksList.tsx(87,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/webhooks/components/WebhooksList/WebhooksList.tsx(102,37): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. -src/webhooks/components/WebhooksList/WebhooksList.tsx(147,47): error TS2532: Object is possibly 'undefined'. -src/webhooks/components/WebhooksList/WebhooksList.tsx(151,25): error TS2532: Object is possibly 'undefined'. -src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx(43,50): error TS2322: Type 'undefined' is not assignable to type 'Webhooks_webhooks_edges_node[]'. -src/webhooks/views/WebhookList/filters.ts(38,37): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'boolean'. -src/webhooks/views/WebhookList/sort.ts(14,7): error TS2322: Type 'undefined' is not assignable to type 'WebhookSortField'. -src/webhooks/views/WebhookList/WebhookList.tsx(89,5): error TS2322: Type '(params?: WebhookListUrlQueryParams | undefined) => string' is not assignable to type 'CreateUrl'. -src/webhooks/views/WebhookList/WebhookList.tsx(120,9): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhookList/WebhookList.tsx(120,9): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhookList/WebhookList.tsx(130,38): error TS2571: Object is of type 'unknown'. -src/webhooks/views/WebhookList/WebhookList.tsx(136,11): error TS2345: Argument of type 'Webhooks_webhooks_pageInfo | undefined' is not assignable to parameter of type 'PageInfo'. -src/webhooks/views/WebhookList/WebhookList.tsx(136,23): error TS2532: Object is possibly 'undefined'. -src/webhooks/views/WebhookList/WebhookList.tsx(136,23): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhookList/WebhookList.tsx(150,25): error TS2345: Argument of type '{ variables: { id: string | undefined; }; }' is not assignable to parameter of type 'MutationFunctionOptions'. -src/webhooks/views/WebhookList/WebhookList.tsx(174,15): error TS2322: Type 'Webhooks_webhooks_edges_node[] | undefined' is not assignable to type 'Webhooks_webhooks_edges_node[]'. -src/webhooks/views/WebhookList/WebhookList.tsx(174,37): error TS2532: Object is possibly 'undefined'. -src/webhooks/views/WebhookList/WebhookList.tsx(174,37): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhookList/WebhookList.tsx(187,15): error TS2322: Type 'string | null' is not assignable to type 'string'. -src/webhooks/views/WebhookList/WebhookList.tsx(189,19): error TS2532: Object is possibly 'undefined'. -src/webhooks/views/WebhookList/WebhookList.tsx(189,19): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhookList/WebhookList.tsx(189,19): error TS2532: Object is possibly 'undefined'. -src/webhooks/views/WebhooksCreate.tsx(33,9): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksCreate.tsx(33,9): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksCreate.tsx(37,27): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksCreate.tsx(37,27): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksCreate.tsx(72,15): error TS2322: Type 'WebhookCreate_webhookCreate_webhookErrors[] | null' is not assignable to type 'WebhookCreate_webhookCreate_webhookErrors[]'. -src/webhooks/views/WebhooksCreate.tsx(73,23): error TS2532: Object is possibly 'undefined'. -src/webhooks/views/WebhooksCreate.tsx(73,23): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksDetails.tsx(52,9): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksDetails.tsx(64,9): error TS2533: Object is possibly 'null' or 'undefined'. -src/webhooks/views/WebhooksDetails.tsx(90,19): error TS2531: Object is possibly 'null'. -src/webhooks/views/WebhooksDetails.tsx(100,25): error TS2345: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'. -src/webhooks/views/WebhooksDetails.tsx(107,23): error TS2322: Type 'WebhookDetails_webhook | undefined' is not assignable to type 'WebhookDetails_webhook'. -src/webhooks/views/WebhooksDetails.tsx(136,52): error TS2345: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'. diff --git a/lighthouserc.json b/lighthouserc.json new file mode 100644 index 000000000..ac231e81b --- /dev/null +++ b/lighthouserc.json @@ -0,0 +1,9 @@ +{ + "ci": { + "collect": { + "url": ["http://localhost:3000/"], + "numberOfRuns": 5, + "staticDistDir": "./build/dashboard" + } + } +} diff --git a/package-lock.json b/package-lock.json index 0acae4294..dcdde831a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3368,6 +3368,12 @@ "integrity": "sha512-MNl+rT5UmZeilaPxAVs6YaPC2m6aA8rofviZbhbxpPpl61uKodfdQVsBtgJGTqGizEf02oW3tsVe7FYB8kK14A==", "dev": true }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/draft-js": { "version": "0.10.37", "resolved": "https://registry.npmjs.org/@types/draft-js/-/draft-js-0.10.37.tgz", @@ -4043,9 +4049,9 @@ } }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "acorn-walk": { @@ -9798,9 +9804,9 @@ } }, "eslint": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz", - "integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -9843,12 +9849,20 @@ }, "dependencies": { "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-regex": { @@ -9857,6 +9871,16 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -9866,6 +9890,21 @@ "restore-cursor": "^3.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9883,32 +9922,38 @@ } }, "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" } }, + "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 + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -9926,24 +9971,45 @@ } }, "inquirer": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", - "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.15", "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "is-fullwidth-code-point": { @@ -9989,6 +10055,12 @@ "signal-exit": "^3.0.2" } }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -10017,6 +10089,15 @@ } } }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -10332,6 +10413,12 @@ "integrity": "sha512-CT7a5pT6SG9hvhCjyHKFA1+lClB4WA+gvBt04E7/buUTELgatneCrublqTzi++tZuCefUhJXrTm3W1wpK14sqg==", "dev": true }, + "eslint-plugin-simple-import-sort": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-5.0.3.tgz", + "integrity": "sha512-1rf3AWiHeWNCQdAq0iXNnlccnH1UDnelGgrPbjBBHE8d2hXVtOudcmy0vTF4hri3iJ0MKz8jBhmH6lJ0ZWZLHQ==", + "dev": true + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -10367,20 +10454,20 @@ } }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", "dev": true } } @@ -10391,12 +10478,20 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } } }, "esrecurse": { @@ -11196,9 +11291,9 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, "flush-write-stream": { @@ -19953,9 +20048,9 @@ "dev": true }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", "dev": true }, "stubs": { diff --git a/package.json b/package.json index 0d18f52dc..784d95fd5 100644 --- a/package.json +++ b/package.json @@ -117,11 +117,12 @@ "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.14.0", "enzyme-to-json": "^3.3.5", - "eslint": "^6.7.1", + "eslint": "^6.8.0", "eslint-loader": "^3.0.2", "eslint-plugin-import": "^2.19.1", "eslint-plugin-local-rules": "^0.1.1", "eslint-plugin-prefer-arrow": "^1.1.6", + "eslint-plugin-simple-import-sort": "^5.0.3", "file-loader": "^5.0.2", "fork-ts-checker-webpack-plugin": "^3.1.1", "html-webpack-plugin": "^3.2.0", @@ -178,22 +179,29 @@ "eslint --fix", "prettier --write", "git add" + ], + "*.{js,jsx}": [ + "eslint --fix", + "prettier --write", + "git add" ] }, "scripts": { - "build": "webpack -p", - "extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js", - "transpile-messages": "node scripts/transpile-tx.js", - "extract-messages": "npm run extract-json-messages && npm run transpile-messages", + "build-storybook": "build-storybook -c src/storybook/ -o build/storybook", "build-types": "apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts", - "check-types": "tsc --noEmit", + "build": "webpack -p", "check-strict-null-errors": "tsc --noEmit --strictNullChecks | node scripts/count-strict-null-check-errors.js", + "check-types": "tsc --noEmit", + "extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js", + "extract-messages": "npm run extract-json-messages && npm run transpile-messages", "generate-component": "plop --plopfile .plop/plopfile.js", + "heroku-postbuild": "npm run build", + "serve:lhci": "NODE_ENV=production npm run server", "start": "webpack-dev-server --open -d", "storybook": "start-storybook -p 3000 -c src/storybook/", - "build-storybook": "build-storybook -c src/storybook/ -o build/storybook", - "test": "jest src/", "test-e2e": "testcafe 'chrome:headless' .testcafe", - "heroku-postbuild": "npm run build" + "test": "jest src/", + "transpile-messages": "node scripts/transpile-tx.js", + "lint": "npx eslint \"src/**/*.@(tsx|ts|jsx|js)\" --fix ; npx prettier --check \"src/**/*.@(tsx|ts|jsx|js)\" --write" } } diff --git a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx index 220bd2b79..480dfeda4 100644 --- a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx +++ b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface AttributeBulkDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx index 90c3c09e3..4ab30c283 100644 --- a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx +++ b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface AttributeDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/attributes/components/AttributeDetails/AttributeDetails.tsx b/src/attributes/components/AttributeDetails/AttributeDetails.tsx index 26b3ea201..fa2ba39de 100644 --- a/src/attributes/components/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/components/AttributeDetails/AttributeDetails.tsx @@ -1,20 +1,20 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; -import slugify from "slugify"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { commonMessages } from "@saleor/intl"; import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; -import { getProductErrorMessage, getFormErrors } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; -import { AttributePageFormData } from "../AttributePage"; +import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; +import slugify from "slugify"; + import { getAttributeSlugErrorMessage } from "../../errors"; +import { AttributePageFormData } from "../AttributePage"; export interface AttributeDetailsProps { canChangeType: boolean; diff --git a/src/attributes/components/AttributeList/AttributeList.tsx b/src/attributes/components/AttributeList/AttributeList.tsx index b3844066f..bf29ea4d9 100644 --- a/src/attributes/components/AttributeList/AttributeList.tsx +++ b/src/attributes/components/AttributeList/AttributeList.tsx @@ -3,20 +3,20 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { translateBoolean } from "@saleor/intl"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; -import TableCellHeader from "@saleor/components/TableCellHeader"; -import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AttributeList_attributes_edges_node } from "../../types/AttributeList"; export interface AttributeListProps diff --git a/src/attributes/components/AttributeListPage/AttributeListPage.tsx b/src/attributes/components/AttributeListPage/AttributeListPage.tsx index 70f8733c2..9de531647 100644 --- a/src/attributes/components/AttributeListPage/AttributeListPage.tsx +++ b/src/attributes/components/AttributeListPage/AttributeListPage.tsx @@ -1,27 +1,27 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import AppHeader from "@saleor/components/AppHeader"; import FilterBar from "@saleor/components/FilterBar"; import { sectionNames } from "@saleor/intl"; -import { AttributeListUrlSortField } from "@saleor/attributes/urls"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import Container from "../../../components/Container"; import PageHeader from "../../../components/PageHeader"; import { + FilterPageProps, ListActions, PageListProps, - FilterPageProps, - TabPageProps, - SortPage + SortPage, + TabPageProps } from "../../../types"; import { AttributeList_attributes_edges_node } from "../../types/AttributeList"; import AttributeList from "../AttributeList/AttributeList"; import { - createFilterStructure, + AttributeFilterKeys, AttributeListFilterOpts, - AttributeFilterKeys + createFilterStructure } from "./filters"; export interface AttributeListPageProps diff --git a/src/attributes/components/AttributeListPage/filters.ts b/src/attributes/components/AttributeListPage/filters.ts index d3309a492..2eb5dd6fb 100644 --- a/src/attributes/components/AttributeListPage/filters.ts +++ b/src/attributes/components/AttributeListPage/filters.ts @@ -1,9 +1,8 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { FilterOpts } from "@saleor/types"; -import { commonMessages } from "@saleor/intl"; import { IFilter } from "@saleor/components/Filter"; +import { commonMessages } from "@saleor/intl"; +import { FilterOpts } from "@saleor/types"; import { createBooleanField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum AttributeFilterKeys { availableInGrid = "availableInGrid", diff --git a/src/attributes/components/AttributePage/AttributePage.tsx b/src/attributes/components/AttributePage/AttributePage.tsx index 69a0f3477..099183aa2 100644 --- a/src/attributes/components/AttributePage/AttributePage.tsx +++ b/src/attributes/components/AttributePage/AttributePage.tsx @@ -1,7 +1,4 @@ -import React from "react"; -import { useIntl } from "react-intl"; -import slugify from "slugify"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -14,7 +11,10 @@ import { sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ReorderAction } from "@saleor/types"; import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; +import slugify from "slugify"; + import { AttributeDetailsFragment, AttributeDetailsFragment_values diff --git a/src/attributes/components/AttributeProperties/AttributeProperties.tsx b/src/attributes/components/AttributeProperties/AttributeProperties.tsx index 1ad3fcd36..b88bf7060 100644 --- a/src/attributes/components/AttributeProperties/AttributeProperties.tsx +++ b/src/attributes/components/AttributeProperties/AttributeProperties.tsx @@ -2,9 +2,7 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; @@ -12,7 +10,9 @@ import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AttributePageFormData } from "../AttributePage"; export interface AttributePropertiesProps { diff --git a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx index e8872a427..7554862d6 100644 --- a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx +++ b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface AttributeValueDeleteDialogProps { attributeName: string; diff --git a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx index 5dba17ab3..60b9c1506 100644 --- a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx +++ b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx @@ -4,9 +4,8 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { getAttributeValueErrorMessage } from "@saleor/attributes/errors"; +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -15,8 +14,9 @@ import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { getFormErrors } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; -import { getAttributeValueErrorMessage } from "@saleor/attributes/errors"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AttributeDetails_attribute_values } from "../../types/AttributeDetails"; export interface AttributeValueEditDialogFormData { diff --git a/src/attributes/components/AttributeValues/AttributeValues.tsx b/src/attributes/components/AttributeValues/AttributeValues.tsx index 2cdd5c229..55c6ce43a 100644 --- a/src/attributes/components/AttributeValues/AttributeValues.tsx +++ b/src/attributes/components/AttributeValues/AttributeValues.tsx @@ -6,9 +6,6 @@ import TableCell from "@material-ui/core/TableCell"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; @@ -18,6 +15,9 @@ import { } from "@saleor/components/SortableTable"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ReorderAction } from "@saleor/types"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AttributeDetailsFragment_values } from "../../types/AttributeDetailsFragment"; export interface AttributeValuesProps { diff --git a/src/attributes/errors.ts b/src/attributes/errors.ts index 1b0ad377b..89ba9feac 100644 --- a/src/attributes/errors.ts +++ b/src/attributes/errors.ts @@ -1,7 +1,7 @@ -import { IntlShape, defineMessages } from "react-intl"; - import { ProductErrorCode } from "@saleor/types/globalTypes"; import { getProductErrorMessage } from "@saleor/utils/errors"; +import { defineMessages, IntlShape } from "react-intl"; + import { ProductErrorFragment } from "./types/ProductErrorFragment"; const messages = defineMessages({ diff --git a/src/attributes/fixtures.ts b/src/attributes/fixtures.ts index 92ab3ef0d..7f7af4ec7 100644 --- a/src/attributes/fixtures.ts +++ b/src/attributes/fixtures.ts @@ -3,6 +3,7 @@ import { AttributeInputTypeEnum, AttributeValueType } from "@saleor/types/globalTypes"; + import { AttributeDetailsFragment } from "./types/AttributeDetailsFragment"; import { AttributeList_attributes_edges_node } from "./types/AttributeList"; @@ -36,10 +37,8 @@ export const attribute: AttributeDetailsFragment = { visibleInStorefront: true }; -export const attributes: Array< - AttributeList_attributes_edges_node & - ProductDetails_product_productType_variantAttributes -> = [ +export const attributes: Array = [ { node: { __typename: "Attribute" as "Attribute", diff --git a/src/attributes/index.tsx b/src/attributes/index.tsx index a15e5fc40..3c01987bd 100644 --- a/src/attributes/index.tsx +++ b/src/attributes/index.tsx @@ -1,19 +1,19 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; +import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { useIntl } from "react-intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { attributeAddPath, AttributeAddUrlQueryParams, attributeListPath, AttributeListUrlQueryParams, + AttributeListUrlSortField, attributePath, - AttributeUrlQueryParams, - AttributeListUrlSortField + AttributeUrlQueryParams } from "./urls"; import AttributeCreateComponent from "./views/AttributeCreate"; import AttributeDetailsComponent from "./views/AttributeDetails"; diff --git a/src/attributes/mutations.ts b/src/attributes/mutations.ts index 5aebd35a2..f7c607e5a 100644 --- a/src/attributes/mutations.ts +++ b/src/attributes/mutations.ts @@ -1,6 +1,6 @@ +import { TypedMutation } from "@saleor/mutations"; import gql from "graphql-tag"; -import { TypedMutation } from "@saleor/mutations"; import { attributeDetailsFragment } from "./queries"; import { AttributeBulkDelete, diff --git a/src/attributes/queries.ts b/src/attributes/queries.ts index 20b4392c4..99a12cb86 100644 --- a/src/attributes/queries.ts +++ b/src/attributes/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { pageInfoFragment, TypedQuery } from "../queries"; import { AttributeDetails, diff --git a/src/attributes/views/AttributeCreate/AttributeCreate.tsx b/src/attributes/views/AttributeCreate/AttributeCreate.tsx index 7ece9730e..64f33c19f 100644 --- a/src/attributes/views/AttributeCreate/AttributeCreate.tsx +++ b/src/attributes/views/AttributeCreate/AttributeCreate.tsx @@ -1,11 +1,10 @@ -import React from "react"; -import { useIntl } from "react-intl"; -import slugify from "slugify"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { maybe } from "@saleor/misc"; import { ReorderEvent } from "@saleor/types"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import { add, isSelected, @@ -13,9 +12,10 @@ import { remove, updateAtIndex } from "@saleor/utils/lists"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import React from "react"; +import { useIntl } from "react-intl"; +import slugify from "slugify"; + import AttributePage from "../../components/AttributePage"; import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog"; import AttributeValueEditDialog, { @@ -25,10 +25,10 @@ import { AttributeCreateMutation } from "../../mutations"; import { AttributeCreate } from "../../types/AttributeCreate"; import { attributeAddUrl, + AttributeAddUrlDialog, AttributeAddUrlQueryParams, attributeListUrl, - attributeUrl, - AttributeAddUrlDialog + attributeUrl } from "../../urls"; interface AttributeDetailsProps { diff --git a/src/attributes/views/AttributeDetails/AttributeDetails.tsx b/src/attributes/views/AttributeDetails/AttributeDetails.tsx index 2c00bb10d..b1a31ad69 100644 --- a/src/attributes/views/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/views/AttributeDetails/AttributeDetails.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ReorderEvent } from "@saleor/types"; -import { move } from "@saleor/utils/lists"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import { getProductErrorMessage } from "@saleor/utils/errors"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import { move } from "@saleor/utils/lists"; +import React from "react"; +import { useIntl } from "react-intl"; + import AttributeDeleteDialog from "../../components/AttributeDeleteDialog"; import AttributePage from "../../components/AttributePage"; import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog"; @@ -31,8 +31,8 @@ import { AttributeValueUpdate } from "../../types/AttributeValueUpdate"; import { attributeListUrl, attributeUrl, - AttributeUrlQueryParams, - AttributeUrlDialog + AttributeUrlDialog, + AttributeUrlQueryParams } from "../../urls"; interface AttributeDetailsProps { diff --git a/src/attributes/views/AttributeList/AttributeList.tsx b/src/attributes/views/AttributeList/AttributeList.tsx index 63defa847..82c18383f 100644 --- a/src/attributes/views/AttributeList/AttributeList.tsx +++ b/src/attributes/views/AttributeList/AttributeList.tsx @@ -1,16 +1,13 @@ import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { useIntl } from "react-intl"; - import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterOpts + saveFilterTab } from "@saleor/attributes/views/AttributeList/filters"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -22,11 +19,14 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import useShop from "@saleor/hooks/useShop"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; -import useShop from "@saleor/hooks/useShop"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { useIntl } from "react-intl"; + import { PAGINATE_BY } from "../../../config"; import useBulkActions from "../../../hooks/useBulkActions"; import { maybe } from "../../../misc"; @@ -38,12 +38,12 @@ import { AttributeBulkDelete } from "../../types/AttributeBulkDelete"; import { attributeAddUrl, attributeListUrl, + AttributeListUrlDialog, AttributeListUrlQueryParams, - attributeUrl, - AttributeListUrlDialog + attributeUrl } from "../../urls"; -import { getSortQueryVariables } from "./sort"; import { getFilterQueryParam } from "./filters"; +import { getSortQueryVariables } from "./sort"; interface AttributeListProps { params: AttributeListUrlQueryParams; diff --git a/src/attributes/views/AttributeList/filters.test.ts b/src/attributes/views/AttributeList/filters.test.ts index 5a50d1f1c..e939c4326 100644 --- a/src/attributes/views/AttributeList/filters.test.ts +++ b/src/attributes/views/AttributeList/filters.test.ts @@ -1,12 +1,12 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { AttributeListUrlFilters } from "@saleor/attributes/urls"; import { createFilterStructure } from "@saleor/attributes/components/AttributeListPage"; +import { AttributeListUrlFilters } from "@saleor/attributes/urls"; import { getFilterQueryParams } from "@saleor/utils/filters"; -import { config } from "@test/intl"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { config } from "@test/intl"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/attributes/views/AttributeList/filters.ts b/src/attributes/views/AttributeList/filters.ts index 5c39a51ca..74c89a557 100644 --- a/src/attributes/views/AttributeList/filters.ts +++ b/src/attributes/views/AttributeList/filters.ts @@ -1,10 +1,11 @@ -import { AttributeFilterInput } from "@saleor/types/globalTypes"; -import { maybe, parseBoolean } from "@saleor/misc"; -import { IFilterElement } from "@saleor/components/Filter"; import { - AttributeListFilterOpts, - AttributeFilterKeys + AttributeFilterKeys, + AttributeListFilterOpts } from "@saleor/attributes/components/AttributeListPage"; +import { IFilterElement } from "@saleor/components/Filter"; +import { maybe, parseBoolean } from "@saleor/misc"; +import { AttributeFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, diff --git a/src/auth/AuthProvider.tsx b/src/auth/AuthProvider.tsx index a99fc03e1..060da3ab4 100644 --- a/src/auth/AuthProvider.tsx +++ b/src/auth/AuthProvider.tsx @@ -1,23 +1,23 @@ -import React from "react"; - +import { maybe } from "@saleor/misc"; import { isSupported as isCredentialsManagementAPISupported, login as loginWithCredentialsManagementAPI, saveCredentials } from "@saleor/utils/credentialsManagement"; +import React from "react"; import { MutationFunction, MutationResult } from "react-apollo"; -import { maybe } from "@saleor/misc"; + +import { UserContext } from "./"; import { + TokenRefreshMutation, TypedTokenAuthMutation, - TypedVerifyTokenMutation, - TokenRefreshMutation + TypedVerifyTokenMutation } from "./mutations"; +import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken"; import { TokenAuth, TokenAuthVariables } from "./types/TokenAuth"; import { User } from "./types/User"; import { VerifyToken, VerifyTokenVariables } from "./types/VerifyToken"; import { getAuthToken, removeAuthToken, setAuthToken } from "./utils"; -import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken"; -import { UserContext } from "./"; interface AuthProviderOperationsProps { children: (props: { diff --git a/src/auth/components/Layout.tsx b/src/auth/components/Layout.tsx index 8a8d9edb7..2be8f3ea1 100644 --- a/src/auth/components/Layout.tsx +++ b/src/auth/components/Layout.tsx @@ -1,11 +1,10 @@ -import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import SVG from "react-inlinesvg"; - import backgroundArt from "@assets/images/login-background.svg"; import saleorDarkLogo from "@assets/images/logo-dark.svg"; import saleorLightLogo from "@assets/images/logo-light.svg"; +import { makeStyles } from "@material-ui/core/styles"; import useTheme from "@saleor/hooks/useTheme"; +import React from "react"; +import SVG from "react-inlinesvg"; const useStyles = makeStyles( theme => ({ diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index fc68ed093..4ef242773 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -2,12 +2,11 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Form from "@saleor/components/Form"; import { FormSpacer } from "@saleor/components/FormSpacer"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface FormData { email: string; diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx index 36e2e3cf4..293200bc1 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import CardDecorator from "@saleor/storybook//CardDecorator"; import Decorator from "@saleor/storybook//Decorator"; import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import NewPasswordPage from "./NewPasswordPage"; storiesOf("Views / Authentication / Set up a new password", module) diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx index 2dfd65389..1f9e9617c 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx @@ -2,13 +2,12 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx b/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx index 4c4a495a8..ab28cbe46 100644 --- a/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx +++ b/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import CardDecorator from "@saleor/storybook/CardDecorator"; import Decorator from "@saleor/storybook/Decorator"; import { formError } from "@saleor/storybook/misc"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import ResetPasswordPage, { ResetPasswordPageProps } from "./ResetPasswordPage"; const props: ResetPasswordPageProps = { diff --git a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx index e5647a944..d7f297011 100644 --- a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx +++ b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx @@ -2,12 +2,11 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.stories.tsx b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.stories.tsx index 3e263e929..a18ef5c0e 100644 --- a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.stories.tsx +++ b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.stories.tsx @@ -1,8 +1,8 @@ +import CardDecorator from "@saleor/storybook/CardDecorator"; +import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; -import CardDecorator from "@saleor/storybook/CardDecorator"; -import Decorator from "@saleor/storybook/Decorator"; import ResetPasswordSuccessPage from "./ResetPasswordSuccessPage"; storiesOf("Views / Authentication / Reset password success", module) diff --git a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx index 52c7697ff..5cc95cb26 100644 --- a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx +++ b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx @@ -1,11 +1,10 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import FormSpacer from "@saleor/components/FormSpacer"; import React from "react"; import { FormattedMessage } from "react-intl"; -import FormSpacer from "@saleor/components/FormSpacer"; - const useStyles = makeStyles( { submit: { @@ -24,9 +23,7 @@ export interface ResetPasswordSuccessPageProps { onBack: () => void; } -const ResetPasswordSuccessPage: React.FC< - ResetPasswordSuccessPageProps -> = props => { +const ResetPasswordSuccessPage: React.FC = props => { const { onBack } = props; const classes = useStyles(props); diff --git a/src/auth/components/SectionRoute.tsx b/src/auth/components/SectionRoute.tsx index f1b2d1546..332909a62 100644 --- a/src/auth/components/SectionRoute.tsx +++ b/src/auth/components/SectionRoute.tsx @@ -1,7 +1,7 @@ +import useUser from "@saleor/hooks/useUser"; import React from "react"; import { Route, RouteProps } from "react-router-dom"; -import useUser from "@saleor/hooks/useUser"; import NotFound from "../../NotFound"; import { PermissionEnum } from "../../types/globalTypes"; import { hasPermission } from "../misc"; diff --git a/src/auth/errors.ts b/src/auth/errors.ts index 61808e3b2..c69adc137 100644 --- a/src/auth/errors.ts +++ b/src/auth/errors.ts @@ -1,5 +1,5 @@ -import { GraphQLError } from "graphql"; import { findValueInEnum } from "@saleor/misc"; +import { GraphQLError } from "graphql"; export enum JWTError { invalid = "JSONWebTokenError", diff --git a/src/auth/index.tsx b/src/auth/index.tsx index 7eecf89d1..3f2607d5f 100644 --- a/src/auth/index.tsx +++ b/src/auth/index.tsx @@ -2,6 +2,7 @@ import React from "react"; import { Route, Switch } from "react-router-dom"; import Layout from "./components/Layout"; +import LoginLoading from "./components/LoginLoading"; import { User } from "./types/User"; import { newPasswordPath, @@ -12,7 +13,6 @@ import LoginView from "./views/Login"; import NewPassword from "./views/NewPassword"; import ResetPassword from "./views/ResetPassword"; import ResetPasswordSuccess from "./views/ResetPasswordSuccess"; -import LoginLoading from "./components/LoginLoading"; interface UserContext { login: (username: string, password: string) => void; diff --git a/src/auth/mutations.ts b/src/auth/mutations.ts index ef6152076..42a1a0020 100644 --- a/src/auth/mutations.ts +++ b/src/auth/mutations.ts @@ -1,7 +1,8 @@ +import { accountErrorFragment } from "@saleor/customers/mutations"; import gql from "graphql-tag"; -import { accountErrorFragment } from "@saleor/customers/mutations"; import { TypedMutation } from "../mutations"; +import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken"; import { RequestPasswordReset, RequestPasswordResetVariables @@ -9,7 +10,6 @@ import { import { SetPassword, SetPasswordVariables } from "./types/SetPassword"; import { TokenAuth, TokenAuthVariables } from "./types/TokenAuth"; import { VerifyToken, VerifyTokenVariables } from "./types/VerifyToken"; -import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken"; export const fragmentUser = gql` fragment User on User { diff --git a/src/auth/views/Login.tsx b/src/auth/views/Login.tsx index b901f4c86..70a7a8dda 100644 --- a/src/auth/views/Login.tsx +++ b/src/auth/views/Login.tsx @@ -1,7 +1,7 @@ -import React from "react"; - import useNavigator from "@saleor/hooks/useNavigator"; import useUser from "@saleor/hooks/useUser"; +import React from "react"; + import LoginPage, { FormData } from "../components/LoginPage"; import { passwordResetUrl } from "../urls"; diff --git a/src/auth/views/NewPassword.tsx b/src/auth/views/NewPassword.tsx index b2373720b..5fe9267ef 100644 --- a/src/auth/views/NewPassword.tsx +++ b/src/auth/views/NewPassword.tsx @@ -1,9 +1,9 @@ +import useNavigator from "@saleor/hooks/useNavigator"; +import useUser from "@saleor/hooks/useUser"; import { parse as parseQs } from "qs"; import React from "react"; import { RouteComponentProps } from "react-router"; -import useNavigator from "@saleor/hooks/useNavigator"; -import useUser from "@saleor/hooks/useUser"; import NewPasswordPage, { NewPasswordPageFormData } from "../components/NewPasswordPage"; diff --git a/src/auth/views/ResetPassword.tsx b/src/auth/views/ResetPassword.tsx index 69b130f92..fc189ad50 100644 --- a/src/auth/views/ResetPassword.tsx +++ b/src/auth/views/ResetPassword.tsx @@ -1,10 +1,10 @@ +import { APP_MOUNT_URI } from "@saleor/config"; +import useNavigator from "@saleor/hooks/useNavigator"; +import { commonMessages } from "@saleor/intl"; import React from "react"; import { useIntl } from "react-intl"; import urlJoin from "url-join"; -import { APP_MOUNT_URI } from "@saleor/config"; -import useNavigator from "@saleor/hooks/useNavigator"; -import { commonMessages } from "@saleor/intl"; import ResetPasswordPage, { ResetPasswordPageFormData } from "../components/ResetPasswordPage"; diff --git a/src/auth/views/ResetPasswordSuccess.tsx b/src/auth/views/ResetPasswordSuccess.tsx index 650a22cd4..d09e99ebd 100644 --- a/src/auth/views/ResetPasswordSuccess.tsx +++ b/src/auth/views/ResetPasswordSuccess.tsx @@ -1,6 +1,6 @@ +import useNavigator from "@saleor/hooks/useNavigator"; import React from "react"; -import useNavigator from "@saleor/hooks/useNavigator"; import ResetPasswordSuccessPage from "../components/ResetPasswordSuccessPage"; const ResetPasswordSuccessView: React.FC = () => { diff --git a/src/categories/components/CategoryBackground/CategoryBackground.tsx b/src/categories/components/CategoryBackground/CategoryBackground.tsx index 80cb662d1..b801afa95 100644 --- a/src/categories/components/CategoryBackground/CategoryBackground.tsx +++ b/src/categories/components/CategoryBackground/CategoryBackground.tsx @@ -1,17 +1,17 @@ -import makeStyles from "@material-ui/core/styles/makeStyles"; -import TextField from "@material-ui/core/TextField"; -import React from "react"; - import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; +import makeStyles from "@material-ui/core/styles/makeStyles"; +import TextField from "@material-ui/core/TextField"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import ImageTile from "@saleor/components/ImageTile"; import ImageUpload from "@saleor/components/ImageUpload"; import Skeleton from "@saleor/components/Skeleton"; import { commonMessages } from "@saleor/intl"; +import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; + import { CategoryDetails_category_backgroundImage } from "../../types/CategoryDetails"; import { FormData } from "../CategoryUpdatePage"; diff --git a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx index a47266f62..951a026c0 100644 --- a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx +++ b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx @@ -1,7 +1,4 @@ -import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -11,7 +8,10 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import SeoForm from "@saleor/components/SeoForm"; import { sectionNames } from "@saleor/intl"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import CategoryDetailsForm from "../../components/CategoryDetailsForm"; interface FormData { diff --git a/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx b/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx index aa1eb6a2b..9b1282d7e 100644 --- a/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx +++ b/src/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx @@ -5,11 +5,10 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; +import { buttonMessages } from "@saleor/intl"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; - const useStyles = makeStyles( theme => ({ deleteButton: { diff --git a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx index 615667541..7d089cb14 100644 --- a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx +++ b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx @@ -1,16 +1,16 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import { RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor from "@saleor/components/RichTextEditor"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { CategoryDetails_category } from "../../types/CategoryDetails"; diff --git a/src/categories/components/CategoryList/CategoryList.tsx b/src/categories/components/CategoryList/CategoryList.tsx index 09ae331b4..48c79af01 100644 --- a/src/categories/components/CategoryList/CategoryList.tsx +++ b/src/categories/components/CategoryList/CategoryList.tsx @@ -3,20 +3,19 @@ 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 React from "react"; -import { FormattedMessage } from "react-intl"; - import { CategoryFragment } from "@saleor/categories/types/CategoryFragment"; +import { CategoryListUrlSortField } from "@saleor/categories/urls"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; -import { CategoryListUrlSortField } from "@saleor/categories/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/categories/components/CategoryListPage/CategoryListPage.tsx b/src/categories/components/CategoryListPage/CategoryListPage.tsx index 11c22bcde..0015bfb99 100644 --- a/src/categories/components/CategoryListPage/CategoryListPage.tsx +++ b/src/categories/components/CategoryListPage/CategoryListPage.tsx @@ -1,9 +1,7 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import { CategoryFragment } from "@saleor/categories/types/CategoryFragment"; +import { CategoryListUrlSortField } from "@saleor/categories/urls"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import SearchBar from "@saleor/components/SearchBar"; @@ -12,10 +10,12 @@ import { ListActions, PageListProps, SearchPageProps, - TabPageProps, - SortPage + SortPage, + TabPageProps } from "@saleor/types"; -import { CategoryListUrlSortField } from "@saleor/categories/urls"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import CategoryList from "../CategoryList"; export interface CategoryTableProps diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 50fe397a4..5aaaf8728 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -8,8 +8,6 @@ import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; -import { FormattedMessage, useIntl } from "react-intl"; - import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; @@ -18,6 +16,8 @@ import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps } from "@saleor/types"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails"; const useStyles = makeStyles( @@ -74,9 +74,7 @@ interface CategoryProductListProps extends ListProps, ListActions { products: CategoryDetails_category_products_edges_node[]; } -export const CategoryProductList: React.FC< - CategoryProductListProps -> = props => { +export const CategoryProductList: React.FC = props => { const { disabled, isChecked, diff --git a/src/categories/components/CategoryProducts/CategoryProducts.tsx b/src/categories/components/CategoryProducts/CategoryProducts.tsx index df517b4b3..06ace2040 100644 --- a/src/categories/components/CategoryProducts/CategoryProducts.tsx +++ b/src/categories/components/CategoryProducts/CategoryProducts.tsx @@ -1,9 +1,9 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import CardTitle from "@saleor/components/CardTitle"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; import { ListActions, PageListProps } from "../../../types"; import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails"; import CategoryProductList from "../CategoryProductList"; diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index 58260c5f7..91ec1591a 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -1,9 +1,6 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; -import { RawDraftContentState } from "draft-js"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; @@ -15,7 +12,10 @@ import SaveButtonBar from "@saleor/components/SaveButtonBar"; import SeoForm from "@saleor/components/SeoForm"; import { Tab, TabContainer } from "@saleor/components/Tab"; import { sectionNames } from "@saleor/intl"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { RawDraftContentState } from "draft-js"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { TabListActions } from "../../../types"; import CategoryDetailsForm from "../../components/CategoryDetailsForm"; diff --git a/src/categories/index.tsx b/src/categories/index.tsx index 2ae9db35f..3de1ea6fc 100644 --- a/src/categories/index.tsx +++ b/src/categories/index.tsx @@ -1,18 +1,18 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { categoryAddPath, categoryListPath, CategoryListUrlQueryParams, + CategoryListUrlSortField, categoryPath, - CategoryUrlQueryParams, - CategoryListUrlSortField + CategoryUrlQueryParams } from "./urls"; import { CategoryCreateView } from "./views/CategoryCreate"; import CategoryDetailsView, { getActiveTab } from "./views/CategoryDetails"; diff --git a/src/categories/mutations.ts b/src/categories/mutations.ts index a228faa8c..dc41a0f25 100644 --- a/src/categories/mutations.ts +++ b/src/categories/mutations.ts @@ -1,7 +1,7 @@ +import { productErrorFragment } from "@saleor/attributes/mutations"; +import makeMutation from "@saleor/hooks/makeMutation"; import gql from "graphql-tag"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { productErrorFragment } from "@saleor/attributes/mutations"; import { categoryDetailsFragment } from "./queries"; import { CategoryBulkDelete, diff --git a/src/categories/queries.ts b/src/categories/queries.ts index 15ddc9247..0cb1a7361 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { pageInfoFragment } from "../queries"; import { CategoryDetails, diff --git a/src/categories/urls.ts b/src/categories/urls.ts index 13c88a5d5..88fa6d5a1 100644 --- a/src/categories/urls.ts +++ b/src/categories/urls.ts @@ -7,8 +7,8 @@ import { Dialog, Filters, Pagination, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; import { CategoryPageTab } from "./components/CategoryUpdatePage"; diff --git a/src/categories/views/CategoryCreate.tsx b/src/categories/views/CategoryCreate.tsx index 1eb3c56f5..2fb7665a5 100644 --- a/src/categories/views/CategoryCreate.tsx +++ b/src/categories/views/CategoryCreate.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import CategoryCreatePage from "../components/CategoryCreatePage"; import { useCategoryCreateMutation } from "../mutations"; diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index e33d91b96..1d62f36da 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -1,10 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -14,7 +12,9 @@ import usePaginator, { } from "@saleor/hooks/usePaginator"; import { commonMessages } from "@saleor/intl"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { PAGINATE_BY } from "../../config"; import { maybe } from "../../misc"; import { TypedProductBulkDeleteMutation } from "../../products/mutations"; @@ -38,8 +38,8 @@ import { categoryAddUrl, categoryListUrl, categoryUrl, - CategoryUrlQueryParams, - CategoryUrlDialog + CategoryUrlDialog, + CategoryUrlQueryParams } from "../urls"; export interface CategoryDetailsProps { diff --git a/src/categories/views/CategoryList/CategoryList.tsx b/src/categories/views/CategoryList/CategoryList.tsx index 5363e67a8..ca2587b8d 100644 --- a/src/categories/views/CategoryList/CategoryList.tsx +++ b/src/categories/views/CategoryList/CategoryList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -17,9 +14,12 @@ import usePaginator, { } from "@saleor/hooks/usePaginator"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { CategoryListPage } from "../../components/CategoryListPage/CategoryListPage"; import { useCategoryBulkDeleteMutation } from "../../mutations"; import { useRootCategoriesQuery } from "../../queries"; @@ -27,10 +27,10 @@ import { CategoryBulkDelete } from "../../types/CategoryBulkDelete"; import { categoryAddUrl, categoryListUrl, + CategoryListUrlDialog, CategoryListUrlFilters, CategoryListUrlQueryParams, - categoryUrl, - CategoryListUrlDialog + categoryUrl } from "../../urls"; import { areFiltersApplied, diff --git a/src/categories/views/CategoryList/filter.ts b/src/categories/views/CategoryList/filter.ts index f61179a63..fc42e95b9 100644 --- a/src/categories/views/CategoryList/filter.ts +++ b/src/categories/views/CategoryList/filter.ts @@ -1,4 +1,5 @@ import { CategoryFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils diff --git a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx index c6a3acabb..714484810 100644 --- a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx +++ b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx @@ -1,9 +1,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; @@ -17,7 +14,10 @@ import SeoForm from "@saleor/components/SeoForm"; import VisibilityCard from "@saleor/components/VisibilityCard"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { commonMessages, sectionNames } from "@saleor/intl"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import CollectionDetails from "../CollectionDetails/CollectionDetails"; import { CollectionImage } from "../CollectionImage/CollectionImage"; diff --git a/src/collections/components/CollectionDetails/CollectionDetails.tsx b/src/collections/components/CollectionDetails/CollectionDetails.tsx index c63bc1dea..194010216 100644 --- a/src/collections/components/CollectionDetails/CollectionDetails.tsx +++ b/src/collections/components/CollectionDetails/CollectionDetails.tsx @@ -1,17 +1,17 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import { RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor from "@saleor/components/RichTextEditor"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; -import { getProductErrorMessage, getFormErrors } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; +import { RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import { CollectionDetails_collection } from "../../types/CollectionDetails"; export interface CollectionDetailsProps { diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index 106ba3463..0f919e913 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -1,7 +1,4 @@ -import { RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -17,7 +14,10 @@ import SeoForm from "@saleor/components/SeoForm"; import VisibilityCard from "@saleor/components/VisibilityCard"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { sectionNames } from "@saleor/intl"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { ListActions, PageListProps } from "../../../types"; import { CollectionDetails_collection } from "../../types/CollectionDetails"; diff --git a/src/collections/components/CollectionImage/CollectionImage.tsx b/src/collections/components/CollectionImage/CollectionImage.tsx index 6e96904c6..f17fb376c 100644 --- a/src/collections/components/CollectionImage/CollectionImage.tsx +++ b/src/collections/components/CollectionImage/CollectionImage.tsx @@ -1,17 +1,17 @@ -import { makeStyles } from "@material-ui/core/styles"; -import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; +import { makeStyles } from "@material-ui/core/styles"; +import TextField from "@material-ui/core/TextField"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import ImageTile from "@saleor/components/ImageTile"; import ImageUpload from "@saleor/components/ImageUpload"; import Skeleton from "@saleor/components/Skeleton"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { CollectionDetails_collection_backgroundImage } from "../../types/CollectionDetails"; const useStyles = makeStyles( diff --git a/src/collections/components/CollectionList/CollectionList.tsx b/src/collections/components/CollectionList/CollectionList.tsx index 8657460a6..34f9fb65f 100644 --- a/src/collections/components/CollectionList/CollectionList.tsx +++ b/src/collections/components/CollectionList/CollectionList.tsx @@ -3,20 +3,20 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { CollectionListUrlSortField } from "@saleor/collections/urls"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; -import { CollectionListUrlSortField } from "@saleor/collections/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { CollectionList_collections_edges_node } from "../../types/CollectionList"; const useStyles = makeStyles( diff --git a/src/collections/components/CollectionListPage/CollectionListPage.tsx b/src/collections/components/CollectionListPage/CollectionListPage.tsx index dcf23c717..0a709ef05 100644 --- a/src/collections/components/CollectionListPage/CollectionListPage.tsx +++ b/src/collections/components/CollectionListPage/CollectionListPage.tsx @@ -1,20 +1,20 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import { CollectionListUrlSortField } from "@saleor/collections/urls"; +import { Container } from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { + FilterPageProps, + ListActions, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { Container } from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - ListActions, - PageListProps, - FilterPageProps, - TabPageProps, - SortPage -} from "@saleor/types"; -import { CollectionListUrlSortField } from "@saleor/collections/urls"; import { CollectionList_collections_edges_node } from "../../types/CollectionList"; import CollectionList from "../CollectionList/CollectionList"; import { diff --git a/src/collections/components/CollectionListPage/filters.ts b/src/collections/components/CollectionListPage/filters.ts index fdcd1478e..09b0fdd6e 100644 --- a/src/collections/components/CollectionListPage/filters.ts +++ b/src/collections/components/CollectionListPage/filters.ts @@ -1,10 +1,9 @@ -import { defineMessages, IntlShape } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; import { commonMessages } from "@saleor/intl"; import { FilterOpts } from "@saleor/types"; import { CollectionPublished } from "@saleor/types/globalTypes"; -import { IFilter } from "@saleor/components/Filter"; import { createOptionsField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export interface CollectionListFilterOpts { status: FilterOpts; diff --git a/src/collections/components/CollectionProducts/CollectionProducts.tsx b/src/collections/components/CollectionProducts/CollectionProducts.tsx index 6d007651b..d5dd384d9 100644 --- a/src/collections/components/CollectionProducts/CollectionProducts.tsx +++ b/src/collections/components/CollectionProducts/CollectionProducts.tsx @@ -7,9 +7,6 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -20,6 +17,9 @@ import TableCellAvatar, { } from "@saleor/components/TableCellAvatar"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions, PageListProps } from "../../../types"; import { CollectionDetails_collection } from "../../types/CollectionDetails"; diff --git a/src/collections/index.tsx b/src/collections/index.tsx index 4c76b7bd8..9f9e5bf2e 100644 --- a/src/collections/index.tsx +++ b/src/collections/index.tsx @@ -1,18 +1,18 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { collectionAddPath, collectionListPath, CollectionListUrlQueryParams, + CollectionListUrlSortField, collectionPath, - CollectionUrlQueryParams, - CollectionListUrlSortField + CollectionUrlQueryParams } from "./urls"; import CollectionCreate from "./views/CollectionCreate"; import CollectionDetailsView from "./views/CollectionDetails"; diff --git a/src/collections/mutations.ts b/src/collections/mutations.ts index b339d1a04..bc582d939 100644 --- a/src/collections/mutations.ts +++ b/src/collections/mutations.ts @@ -1,6 +1,6 @@ +import { productErrorFragment } from "@saleor/attributes/mutations"; import gql from "graphql-tag"; -import { productErrorFragment } from "@saleor/attributes/mutations"; import { TypedMutation } from "../mutations"; import { collectionDetailsFragment, diff --git a/src/collections/queries.ts b/src/collections/queries.ts index b8230d0f9..cd7107ad3 100644 --- a/src/collections/queries.ts +++ b/src/collections/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { TypedQuery } from "../queries"; import { CollectionDetails, diff --git a/src/collections/urls.ts b/src/collections/urls.ts index d22345b8a..65abf5b16 100644 --- a/src/collections/urls.ts +++ b/src/collections/urls.ts @@ -7,8 +7,8 @@ import { Dialog, Filters, Pagination, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; const collectionSectionUrl = "/collections/"; diff --git a/src/collections/views/CollectionCreate.tsx b/src/collections/views/CollectionCreate.tsx index 345243306..f927657ef 100644 --- a/src/collections/views/CollectionCreate.tsx +++ b/src/collections/views/CollectionCreate.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { CollectionCreateInput } from "../../types/globalTypes"; import CollectionCreatePage from "../components/CollectionCreatePage/CollectionCreatePage"; import { TypedCollectionCreateMutation } from "../mutations"; diff --git a/src/collections/views/CollectionDetails.tsx b/src/collections/views/CollectionDetails.tsx index f5cbe6b93..601dce748 100644 --- a/src/collections/views/CollectionDetails.tsx +++ b/src/collections/views/CollectionDetails.tsx @@ -1,10 +1,8 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import AssignProductDialog from "@saleor/components/AssignProductDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA, PAGINATE_BY } from "@saleor/config"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -16,7 +14,9 @@ import usePaginator, { import { commonMessages } from "@saleor/intl"; import useProductSearch from "@saleor/searches/useProductSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { getMutationState, maybe } from "../../misc"; import { productUrl } from "../../products/urls"; import { CollectionInput } from "../../types/globalTypes"; @@ -27,15 +27,15 @@ import CollectionOperations from "../containers/CollectionOperations"; import { TypedCollectionDetailsQuery } from "../queries"; import { CollectionAssignProduct } from "../types/CollectionAssignProduct"; import { CollectionUpdate } from "../types/CollectionUpdate"; +import { CollectionUpdateWithHomepage } from "../types/CollectionUpdateWithHomepage"; import { RemoveCollection } from "../types/RemoveCollection"; import { UnassignCollectionProduct } from "../types/UnassignCollectionProduct"; import { collectionListUrl, collectionUrl, - CollectionUrlQueryParams, - CollectionUrlDialog + CollectionUrlDialog, + CollectionUrlQueryParams } from "../urls"; -import { CollectionUpdateWithHomepage } from "../types/CollectionUpdateWithHomepage"; interface CollectionDetailsProps { id: string; diff --git a/src/collections/views/CollectionList/CollectionList.tsx b/src/collections/views/CollectionList/CollectionList.tsx index b5579d6aa..7a7fe384a 100644 --- a/src/collections/views/CollectionList/CollectionList.tsx +++ b/src/collections/views/CollectionList/CollectionList.tsx @@ -2,9 +2,6 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -17,14 +14,17 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import useShop from "@saleor/hooks/useShop"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import CollectionListPage from "../../components/CollectionListPage/CollectionListPage"; import { TypedCollectionBulkDelete, @@ -36,19 +36,19 @@ import { CollectionBulkPublish } from "../../types/CollectionBulkPublish"; import { collectionAddUrl, collectionListUrl, + CollectionListUrlDialog, CollectionListUrlQueryParams, - collectionUrl, - CollectionListUrlDialog + collectionUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/collections/views/CollectionList/filters.test.ts b/src/collections/views/CollectionList/filters.test.ts index 1dc360a69..7e0bd32fb 100644 --- a/src/collections/views/CollectionList/filters.test.ts +++ b/src/collections/views/CollectionList/filters.test.ts @@ -1,13 +1,13 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { CollectionListUrlFilters } from "@saleor/collections/urls"; import { createFilterStructure } from "@saleor/collections/components/CollectionListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; +import { CollectionListUrlFilters } from "@saleor/collections/urls"; import { CollectionPublished } from "@saleor/types/globalTypes"; -import { config } from "@test/intl"; +import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { config } from "@test/intl"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/collections/views/CollectionList/filters.ts b/src/collections/views/CollectionList/filters.ts index 9b42354a5..c5d9a4fa1 100644 --- a/src/collections/views/CollectionList/filters.ts +++ b/src/collections/views/CollectionList/filters.ts @@ -1,23 +1,24 @@ +import { + CollectionFilterKeys, + CollectionListFilterOpts +} from "@saleor/collections/components/CollectionListPage"; +import { IFilterElement } from "@saleor/components/Filter"; +import { findValueInEnum, maybe } from "@saleor/misc"; import { CollectionFilterInput, CollectionPublished } from "@saleor/types/globalTypes"; -import { IFilterElement } from "@saleor/components/Filter"; -import { maybe, findValueInEnum } from "@saleor/misc"; -import { - CollectionListFilterOpts, - CollectionFilterKeys -} from "@saleor/collections/components/CollectionListPage"; -import { - CollectionListUrlFilters, - CollectionListUrlFiltersEnum, - CollectionListUrlQueryParams -} from "../../urls"; + import { createFilterTabUtils, createFilterUtils, getSingleEnumValueQueryParam } from "../../../utils/filters"; +import { + CollectionListUrlFilters, + CollectionListUrlFiltersEnum, + CollectionListUrlQueryParams +} from "../../urls"; export const COLLECTION_FILTERS_KEY = "collectionFilters"; diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx index 65bb2ffe8..82285210a 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx @@ -1,9 +1,10 @@ +import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; +import Decorator from "@saleor/storybook/Decorator"; +import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; -import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; -import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; + import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; import AccountPermissionGroups, { AccountPermissionGroupsProps } from "."; diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx index 2314165e5..f3b783e3b 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import Typography from "@material-ui/core/Typography"; import { FormChange } from "@saleor/hooks/useForm"; import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; import { FetchMoreProps, SearchPageProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; -import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; import getStaffErrorMessage from "@saleor/utils/errors/staff"; +import React from "react"; +import { useIntl } from "react-intl"; + import MultiAutocompleteSelectField, { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; diff --git a/src/components/AccountPermissions/AccountPermissions.tsx b/src/components/AccountPermissions/AccountPermissions.tsx index 1bcc23822..739161f5e 100644 --- a/src/components/AccountPermissions/AccountPermissions.tsx +++ b/src/components/AccountPermissions/AccountPermissions.tsx @@ -1,20 +1,20 @@ -import React from "react"; -import { useIntl } from "react-intl"; +import { + Checkbox, + List, + ListItem, + ListItemIcon, + ListItemText +} from "@material-ui/core"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; -import { - List, - ListItem, - ListItemText, - ListItemIcon, - Checkbox -} from "@material-ui/core"; import useUser from "@saleor/hooks/useUser"; import { PermissionData } from "@saleor/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage"; +import React from "react"; +import { useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/components/AccountStatus/AccountStatus.tsx b/src/components/AccountStatus/AccountStatus.tsx index a6302888f..d78ad8eaf 100644 --- a/src/components/AccountStatus/AccountStatus.tsx +++ b/src/components/AccountStatus/AccountStatus.tsx @@ -1,11 +1,10 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface StaffStatusProps { data: { diff --git a/src/components/ActionDialog/ActionDialog.tsx b/src/components/ActionDialog/ActionDialog.tsx index 737ce0723..e11e6da01 100644 --- a/src/components/ActionDialog/ActionDialog.tsx +++ b/src/components/ActionDialog/ActionDialog.tsx @@ -4,12 +4,12 @@ import DialogActions from "@material-ui/core/DialogActions"; import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; +import { buttonMessages } from "@saleor/intl"; +import { DialogProps } from "@saleor/types"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; -import { DialogProps } from "@saleor/types"; import ConfirmButton, { ConfirmButtonTransitionState } from "../ConfirmButton/ConfirmButton"; diff --git a/src/components/AddressEdit/AddressEdit.tsx b/src/components/AddressEdit/AddressEdit.tsx index 041bbd99d..0b8201d45 100644 --- a/src/components/AddressEdit/AddressEdit.tsx +++ b/src/components/AddressEdit/AddressEdit.tsx @@ -1,15 +1,15 @@ import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl, IntlShape } from "react-intl"; - import { AddressTypeInput } from "@saleor/customers/types"; -import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; -import getAccountErrorMessage from "@saleor/utils/errors/account"; +import { commonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; +import getAccountErrorMessage from "@saleor/utils/errors/account"; import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; + import FormSpacer from "../FormSpacer"; import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType diff --git a/src/components/AppHeader/AppHeader.tsx b/src/components/AppHeader/AppHeader.tsx index 5e5e11138..f4bdc4ab4 100644 --- a/src/components/AppHeader/AppHeader.tsx +++ b/src/components/AppHeader/AppHeader.tsx @@ -3,6 +3,7 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import ArrowBackIcon from "@material-ui/icons/ArrowBack"; import React from "react"; + import AppHeaderContext from "../AppLayout/AppHeaderContext"; import Skeleton from "../Skeleton"; diff --git a/src/components/AppLayout/AppLayout.tsx b/src/components/AppLayout/AppLayout.tsx index 0decf3a2b..536ced5e4 100644 --- a/src/components/AppLayout/AppLayout.tsx +++ b/src/components/AppLayout/AppLayout.tsx @@ -1,3 +1,6 @@ +import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg"; +import saleorDarkLogo from "@assets/images/logo-dark.svg"; +import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; import Avatar from "@material-ui/core/Avatar"; import Chip from "@material-ui/core/Chip"; import ClickAwayListener from "@material-ui/core/ClickAwayListener"; @@ -9,15 +12,6 @@ import Menu from "@material-ui/core/MenuList"; import Paper from "@material-ui/core/Paper"; import Popper from "@material-ui/core/Popper"; import { makeStyles } from "@material-ui/core/styles"; -import classNames from "classnames"; -import React from "react"; -import SVG from "react-inlinesvg"; -import { FormattedMessage, useIntl } from "react-intl"; -import useRouter from "use-react-router"; - -import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg"; -import saleorDarkLogo from "@assets/images/logo-dark.svg"; -import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; import { createConfigurationMenu } from "@saleor/configuration"; import useAppState from "@saleor/hooks/useAppState"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; @@ -26,6 +20,12 @@ import useTheme from "@saleor/hooks/useTheme"; import useUser from "@saleor/hooks/useUser"; import ArrowDropdown from "@saleor/icons/ArrowDropdown"; import { staffMemberDetailsUrl } from "@saleor/staff/urls"; +import classNames from "classnames"; +import React from "react"; +import SVG from "react-inlinesvg"; +import { FormattedMessage, useIntl } from "react-intl"; +import useRouter from "use-react-router"; + import Container from "../Container"; import ErrorPage from "../ErrorPage"; import AppActionContext from "./AppActionContext"; diff --git a/src/components/AppLayout/MenuList.tsx b/src/components/AppLayout/MenuList.tsx index 2ca3d9171..035c9f2c0 100644 --- a/src/components/AppLayout/MenuList.tsx +++ b/src/components/AppLayout/MenuList.tsx @@ -1,14 +1,14 @@ +import configureIcon from "@assets/images/menu-configure-icon.svg"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import useTheme from "@saleor/hooks/useTheme"; +import { sectionNames } from "@saleor/intl"; import classNames from "classnames"; import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage, useIntl } from "react-intl"; import { matchPath } from "react-router"; -import configureIcon from "@assets/images/menu-configure-icon.svg"; -import useTheme from "@saleor/hooks/useTheme"; -import { sectionNames } from "@saleor/intl"; import { User } from "../../auth/types/User"; import { configurationMenuUrl, diff --git a/src/components/AppLayout/MenuNested.tsx b/src/components/AppLayout/MenuNested.tsx index 57e81dd7c..2019fdfe0 100644 --- a/src/components/AppLayout/MenuNested.tsx +++ b/src/components/AppLayout/MenuNested.tsx @@ -1,13 +1,13 @@ +import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; import Hidden from "@material-ui/core/Hidden"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import useTheme from "@saleor/hooks/useTheme"; +import { createHref } from "@saleor/misc"; import classNames from "classnames"; import React from "react"; import SVG from "react-inlinesvg"; -import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; -import useTheme from "@saleor/hooks/useTheme"; -import { createHref } from "@saleor/misc"; import { drawerNestedMenuWidth, drawerWidthExpandedMobile } from "./consts"; import { IActiveSubMenu } from "./MenuList"; import { IMenuItem } from "./menuStructure"; diff --git a/src/components/AppLayout/ResponsiveDrawer.tsx b/src/components/AppLayout/ResponsiveDrawer.tsx index 86f1dbb83..49baa1e7f 100644 --- a/src/components/AppLayout/ResponsiveDrawer.tsx +++ b/src/components/AppLayout/ResponsiveDrawer.tsx @@ -2,6 +2,7 @@ import Drawer from "@material-ui/core/Drawer"; import Hidden from "@material-ui/core/Hidden"; import { makeStyles } from "@material-ui/core/styles"; import React from "react"; + import { drawerWidth, drawerWidthExpanded, diff --git a/src/components/AppLayout/menuStructure.ts b/src/components/AppLayout/menuStructure.ts index 2c6aaaac8..1785de889 100644 --- a/src/components/AppLayout/menuStructure.ts +++ b/src/components/AppLayout/menuStructure.ts @@ -1,18 +1,18 @@ -import { commonMessages, sectionNames } from "@saleor/intl"; -import { IntlShape } from "react-intl"; - import catalogIcon from "@assets/images/menu-catalog-icon.svg"; import customerIcon from "@assets/images/menu-customers-icon.svg"; import discountsIcon from "@assets/images/menu-discounts-icon.svg"; import homeIcon from "@assets/images/menu-home-icon.svg"; import ordersIcon from "@assets/images/menu-orders-icon.svg"; import translationIcon from "@assets/images/menu-translation-icon.svg"; +import { commonMessages, sectionNames } from "@saleor/intl"; +import { IntlShape } from "react-intl"; + import { categoryListUrl } from "../../categories/urls"; import { collectionListUrl } from "../../collections/urls"; import { customerListUrl } from "../../customers/urls"; +import { saleListUrl, voucherListUrl } from "../../discounts/urls"; import { orderDraftListUrl, orderListUrl } from "../../orders/urls"; import { productListUrl } from "../../products/urls"; -import { saleListUrl, voucherListUrl } from "../../discounts/urls"; import { languageListUrl } from "../../translations/urls"; import { PermissionEnum } from "../../types/globalTypes"; diff --git a/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx b/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx index 8d66db15b..7b3bc1ed5 100644 --- a/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx +++ b/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx @@ -9,9 +9,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -20,6 +17,9 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import Checkbox from "../Checkbox"; export interface FormData { diff --git a/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx b/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx index 48a24afcd..bf46d3de3 100644 --- a/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx +++ b/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx @@ -9,13 +9,13 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import Checkbox from "../Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState diff --git a/src/components/AssignProductDialog/AssignProductDialog.tsx b/src/components/AssignProductDialog/AssignProductDialog.tsx index 3d1eadfba..7c40a65ae 100644 --- a/src/components/AssignProductDialog/AssignProductDialog.tsx +++ b/src/components/AssignProductDialog/AssignProductDialog.tsx @@ -9,9 +9,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -22,6 +19,9 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import Checkbox from "../Checkbox"; export interface FormData { diff --git a/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx b/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx index a3c2aa496..f8f0b165c 100644 --- a/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx +++ b/src/components/AutocompleteSelectMenu/AutocompleteSelectMenu.tsx @@ -4,11 +4,11 @@ import Paper from "@material-ui/core/Paper"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import ArrowBack from "@material-ui/icons/ArrowBack"; +import { buttonMessages } from "@saleor/intl"; import Downshift from "downshift"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import { getMenuItemByPath, IMenu, @@ -34,9 +34,9 @@ const validationError: Error = new Error( "Values supplied to AutocompleteSelectMenu should be unique" ); -const DebounceAutocomplete: React.ComponentType< - DebounceProps -> = Debounce; +const DebounceAutocomplete: React.ComponentType> = Debounce; const useStyles = makeStyles( theme => ({ diff --git a/src/components/ColumnPicker/ColumnPicker.tsx b/src/components/ColumnPicker/ColumnPicker.tsx index 3dc2cf759..d49a7144b 100644 --- a/src/components/ColumnPicker/ColumnPicker.tsx +++ b/src/components/ColumnPicker/ColumnPicker.tsx @@ -3,10 +3,10 @@ import Grow from "@material-ui/core/Grow"; import Popper from "@material-ui/core/Popper"; import { fade } from "@material-ui/core/styles/colorManipulator"; import makeStyles from "@material-ui/core/styles/makeStyles"; -import React from "react"; - import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { toggle } from "@saleor/utils/lists"; +import React from "react"; + import ColumnPickerButton from "./ColumnPickerButton"; import ColumnPickerContent, { ColumnPickerContentProps diff --git a/src/components/ColumnPicker/ColumnPickerContent.tsx b/src/components/ColumnPicker/ColumnPickerContent.tsx index 971a57d3d..d4f5b4929 100644 --- a/src/components/ColumnPicker/ColumnPickerContent.tsx +++ b/src/components/ColumnPicker/ColumnPickerContent.tsx @@ -4,15 +4,15 @@ import CardContent from "@material-ui/core/CardContent"; import CircularProgress from "@material-ui/core/CircularProgress"; import makeStyles from "@material-ui/core/styles/makeStyles"; import Typography from "@material-ui/core/Typography"; +import useElementScroll from "@saleor/hooks/useElementScroll"; +import { buttonMessages } from "@saleor/intl"; +import { FetchMoreProps } from "@saleor/types"; +import { isSelected } from "@saleor/utils/lists"; import classNames from "classnames"; import React from "react"; import InfiniteScroll from "react-infinite-scroller"; import { FormattedMessage } from "react-intl"; -import useElementScroll from "@saleor/hooks/useElementScroll"; -import { buttonMessages } from "@saleor/intl"; -import { FetchMoreProps } from "@saleor/types"; -import { isSelected } from "@saleor/utils/lists"; import ControlledCheckbox from "../ControlledCheckbox"; import Hr from "../Hr"; diff --git a/src/components/CompanyAddressInput/CompanyAddressForm.tsx b/src/components/CompanyAddressInput/CompanyAddressForm.tsx index 8526826d3..53d4f3ac5 100644 --- a/src/components/CompanyAddressInput/CompanyAddressForm.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressForm.tsx @@ -1,22 +1,21 @@ import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl, IntlShape } from "react-intl"; - import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { AddressTypeInput } from "@saleor/customers/types"; -import { ChangeEvent } from "@saleor/hooks/useForm"; -import getShopErrorMessage from "@saleor/utils/errors/shop"; -import { getFormErrors } from "@saleor/utils/errors"; -import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { ChangeEvent } from "@saleor/hooks/useForm"; +import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import getShopErrorMessage from "@saleor/utils/errors/shop"; import getWarehouseErrorMessage from "@saleor/utils/errors/warehouse"; import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; export interface CompanyAddressFormProps { countries: SingleAutocompleteChoiceType[]; diff --git a/src/components/CompanyAddressInput/CompanyAddressInput.tsx b/src/components/CompanyAddressInput/CompanyAddressInput.tsx index 87ecaf788..4df8709ca 100644 --- a/src/components/CompanyAddressInput/CompanyAddressInput.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressInput.tsx @@ -1,8 +1,8 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; import classNames from "classnames"; +import React from "react"; import CardTitle from "../CardTitle"; import CompanyAddressForm, { diff --git a/src/components/CountryList/CountryList.tsx b/src/components/CountryList/CountryList.tsx index 91f14550e..57d39b9d0 100644 --- a/src/components/CountryList/CountryList.tsx +++ b/src/components/CountryList/CountryList.tsx @@ -8,14 +8,14 @@ import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import DeleteIcon from "@material-ui/icons/Delete"; +import CardTitle from "@saleor/components/CardTitle"; +import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import Skeleton from "@saleor/components/Skeleton"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import Skeleton from "@saleor/components/Skeleton"; -import { maybe, renderCollection, getStringOrPlaceholder } from "../../misc"; +import { getStringOrPlaceholder, maybe, renderCollection } from "../../misc"; import { CountryFragment } from "../../taxes/types/CountryFragment"; export interface CountryListProps { diff --git a/src/components/Date/Date.tsx b/src/components/Date/Date.tsx index 8f745be5e..07e002f6b 100644 --- a/src/components/Date/Date.tsx +++ b/src/components/Date/Date.tsx @@ -1,8 +1,8 @@ import Tooltip from "@material-ui/core/Tooltip"; +import useDateLocalize from "@saleor/hooks/useDateLocalize"; import moment from "moment-timezone"; import React from "react"; -import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { LocaleConsumer } from "../Locale"; import { Consumer } from "./DateContext"; diff --git a/src/components/DebounceForm.tsx b/src/components/DebounceForm.tsx index 0e17ca8d9..5e446afa9 100644 --- a/src/components/DebounceForm.tsx +++ b/src/components/DebounceForm.tsx @@ -1,4 +1,5 @@ import React from "react"; + import Debounce from "./Debounce"; export interface DebounceFormProps { diff --git a/src/components/EditableTableCell/EditableTableCell.tsx b/src/components/EditableTableCell/EditableTableCell.tsx index 20da0e949..516df9499 100644 --- a/src/components/EditableTableCell/EditableTableCell.tsx +++ b/src/components/EditableTableCell/EditableTableCell.tsx @@ -4,11 +4,10 @@ import { makeStyles } from "@material-ui/core/styles"; import TableCell from "@material-ui/core/TableCell"; import TextField, { TextFieldProps } from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; +import useForm from "@saleor/hooks/useForm"; import classNames from "classnames"; import React from "react"; -import useForm from "@saleor/hooks/useForm"; - const useStyles = makeStyles( theme => ({ card: { diff --git a/src/components/ErrorPage/ErrorPage.tsx b/src/components/ErrorPage/ErrorPage.tsx index 5b2042567..856230375 100644 --- a/src/components/ErrorPage/ErrorPage.tsx +++ b/src/components/ErrorPage/ErrorPage.tsx @@ -1,3 +1,4 @@ +import notFoundImage from "@assets/images/what.svg"; import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; @@ -5,8 +6,6 @@ import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; -import notFoundImage from "@assets/images/what.svg"; - export interface ErrorPageProps { onBack: () => void; } diff --git a/src/components/Filter/Filter.tsx b/src/components/Filter/Filter.tsx index bcaeefc26..098dc7837 100644 --- a/src/components/Filter/Filter.tsx +++ b/src/components/Filter/Filter.tsx @@ -9,9 +9,9 @@ import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; +import { FilterContent } from "."; import { IFilter, IFilterElement } from "./types"; import useFilter from "./useFilter"; -import { FilterContent } from "."; export interface FilterProps { currencySymbol: string; diff --git a/src/components/Filter/FilterAutocompleteField.tsx b/src/components/Filter/FilterAutocompleteField.tsx index 7a909c899..9034050d4 100644 --- a/src/components/Filter/FilterAutocompleteField.tsx +++ b/src/components/Filter/FilterAutocompleteField.tsx @@ -1,15 +1,15 @@ -import React from "react"; import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Typography from "@material-ui/core/Typography"; -import TextField from "@material-ui/core/TextField"; import makeStyles from "@material-ui/core/styles/makeStyles"; +import TextField from "@material-ui/core/TextField"; +import Typography from "@material-ui/core/Typography"; +import { toggle } from "@saleor/utils/lists"; +import React from "react"; import { FormattedMessage } from "react-intl"; -import { toggle } from "@saleor/utils/lists"; -import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; -import Link from "../Link"; import Checkbox from "../Checkbox"; import Hr from "../Hr"; +import Link from "../Link"; +import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; import { FilterBaseFieldProps } from "./types"; interface FilterAutocompleteFieldProps extends FilterBaseFieldProps { diff --git a/src/components/Filter/FilterContent.tsx b/src/components/Filter/FilterContent.tsx index 9a9021ccc..b43601557 100644 --- a/src/components/Filter/FilterContent.tsx +++ b/src/components/Filter/FilterContent.tsx @@ -1,28 +1,28 @@ +import { TextField } from "@material-ui/core"; import Button from "@material-ui/core/Button"; +import FormControlLabel from "@material-ui/core/FormControlLabel"; import Paper from "@material-ui/core/Paper"; import Radio from "@material-ui/core/Radio"; -import Typography from "@material-ui/core/Typography"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import React from "react"; -import { FormattedMessage, useIntl, IntlShape } from "react-intl"; -import classNames from "classnames"; - -import makeStyles from "@material-ui/core/styles/makeStyles"; import { fade } from "@material-ui/core/styles/colorManipulator"; -import { buttonMessages } from "@saleor/intl"; -import { TextField } from "@material-ui/core"; +import makeStyles from "@material-ui/core/styles/makeStyles"; +import Typography from "@material-ui/core/Typography"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import Hr from "../Hr"; +import { buttonMessages } from "@saleor/intl"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; + import Checkbox from "../Checkbox"; -import SingleSelectField from "../SingleSelectField"; -import { SingleAutocompleteChoiceType } from "../SingleAutocompleteSelectField"; import FormSpacer from "../FormSpacer"; +import Hr from "../Hr"; import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; -import { IFilter, FieldType, FilterType } from "./types"; +import { SingleAutocompleteChoiceType } from "../SingleAutocompleteSelectField"; +import SingleSelectField from "../SingleSelectField"; import Arrow from "./Arrow"; -import { FilterReducerAction } from "./reducer"; import FilterAutocompleteField from "./FilterAutocompleteField"; import FilterOptionField from "./FilterOptionField"; +import { FilterReducerAction } from "./reducer"; +import { FieldType, FilterType, IFilter } from "./types"; export interface FilterContentProps { currencySymbol: string; diff --git a/src/components/Filter/FilterOptionField.tsx b/src/components/Filter/FilterOptionField.tsx index 5900b3822..fc4d53647 100644 --- a/src/components/Filter/FilterOptionField.tsx +++ b/src/components/Filter/FilterOptionField.tsx @@ -1,10 +1,10 @@ import FormControlLabel from "@material-ui/core/FormControlLabel"; import Radio from "@material-ui/core/Radio"; -import React from "react"; import makeStyles from "@material-ui/core/styles/makeStyles"; -import classNames from "classnames"; - import { toggle } from "@saleor/utils/lists"; +import classNames from "classnames"; +import React from "react"; + import Checkbox from "../Checkbox"; import { FilterBaseFieldProps } from "./types"; diff --git a/src/components/Filter/reducer.ts b/src/components/Filter/reducer.ts index e8d837c7c..7d54f8110 100644 --- a/src/components/Filter/reducer.ts +++ b/src/components/Filter/reducer.ts @@ -1,4 +1,5 @@ import { update } from "@saleor/utils/lists"; + import { IFilter, IFilterElementMutableData } from "./types"; export type FilterReducerActionType = diff --git a/src/components/Filter/types.ts b/src/components/Filter/types.ts index a7b2f28a4..f872a87f1 100644 --- a/src/components/Filter/types.ts +++ b/src/components/Filter/types.ts @@ -1,4 +1,5 @@ import { FetchMoreProps, SearchPageProps } from "@saleor/types"; + import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; import { FilterReducerAction } from "./reducer"; diff --git a/src/components/Filter/useFilter.ts b/src/components/Filter/useFilter.ts index e51bebe56..de4435b47 100644 --- a/src/components/Filter/useFilter.ts +++ b/src/components/Filter/useFilter.ts @@ -1,4 +1,4 @@ -import { useReducer, useEffect, Dispatch } from "react"; +import { Dispatch, useEffect, useReducer } from "react"; import reduceFilter, { FilterReducerAction } from "./reducer"; import { IFilter, IFilterElement } from "./types"; diff --git a/src/components/FilterBar/FilterBar.tsx b/src/components/FilterBar/FilterBar.tsx index db4f6445e..fd912aabf 100644 --- a/src/components/FilterBar/FilterBar.tsx +++ b/src/components/FilterBar/FilterBar.tsx @@ -1,14 +1,14 @@ +import Button from "@material-ui/core/Button"; +import makeStyles from "@material-ui/core/styles/makeStyles"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import makeStyles from "@material-ui/core/styles/makeStyles"; -import Button from "@material-ui/core/Button"; import { FilterProps } from "../../types"; +import Filter from "../Filter"; import { IFilter } from "../Filter/types"; -import FilterTabs, { FilterTab } from "../TableFilter"; import { SearchBarProps } from "../SearchBar"; import SearchInput from "../SearchBar/SearchInput"; -import Filter from "../Filter"; +import FilterTabs, { FilterTab } from "../TableFilter"; export interface FilterBarProps extends FilterProps, diff --git a/src/components/Form/Form.tsx b/src/components/Form/Form.tsx index 43668380f..2721f678a 100644 --- a/src/components/Form/Form.tsx +++ b/src/components/Form/Form.tsx @@ -1,6 +1,5 @@ -import React from "react"; - import useForm, { UseFormResult } from "@saleor/hooks/useForm"; +import React from "react"; export interface FormProps { children: (props: UseFormResult) => React.ReactNode; diff --git a/src/components/IconButtonTableCell/IconButtonTableCell.tsx b/src/components/IconButtonTableCell/IconButtonTableCell.tsx index b5d427cb1..e135ee3e3 100644 --- a/src/components/IconButtonTableCell/IconButtonTableCell.tsx +++ b/src/components/IconButtonTableCell/IconButtonTableCell.tsx @@ -1,8 +1,8 @@ import IconButton from "@material-ui/core/IconButton"; import { makeStyles } from "@material-ui/core/styles"; import TableCell from "@material-ui/core/TableCell"; -import React from "react"; import classNames from "classnames"; +import React from "react"; import { stopPropagation } from "../../misc"; import { ICONBUTTON_SIZE } from "../../theme"; diff --git a/src/components/ImageUpload/ImageUpload.tsx b/src/components/ImageUpload/ImageUpload.tsx index 745067320..f0b1d18a2 100644 --- a/src/components/ImageUpload/ImageUpload.tsx +++ b/src/components/ImageUpload/ImageUpload.tsx @@ -4,6 +4,7 @@ import Typography from "@material-ui/core/Typography"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; + import ImageIcon from "../../icons/Image"; import Dropzone from "../Dropzone"; diff --git a/src/components/LinkChoice/LinkChoice.stories.tsx b/src/components/LinkChoice/LinkChoice.stories.tsx index 0b7f17610..8589b34f8 100644 --- a/src/components/LinkChoice/LinkChoice.stories.tsx +++ b/src/components/LinkChoice/LinkChoice.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { countries } from "@saleor/fixtures"; import CardDecorator from "@saleor/storybook/CardDecorator"; import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Form from "../Form"; import LinkChoice, { LinkChoiceProps } from "./LinkChoice"; diff --git a/src/components/LinkChoice/LinkChoice.tsx b/src/components/LinkChoice/LinkChoice.tsx index 34d60ad4d..2e0ce08a5 100644 --- a/src/components/LinkChoice/LinkChoice.tsx +++ b/src/components/LinkChoice/LinkChoice.tsx @@ -1,17 +1,17 @@ -import React from "react"; import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Paper from "@material-ui/core/Paper"; import MenuItem from "@material-ui/core/MenuItem"; -import makeStyles from "@material-ui/core/styles/makeStyles"; +import Paper from "@material-ui/core/Paper"; import Popper from "@material-ui/core/Popper"; import { fade } from "@material-ui/core/styles/colorManipulator"; +import makeStyles from "@material-ui/core/styles/makeStyles"; +import { FormChange } from "@saleor/hooks/useForm"; +import ArrowDropdown from "@saleor/icons/ArrowDropdown"; import classNames from "classnames"; import { codes } from "keycode"; +import React from "react"; -import ArrowDropdown from "@saleor/icons/ArrowDropdown"; -import { FormChange } from "@saleor/hooks/useForm"; -import { SingleAutocompleteChoiceType } from "../SingleAutocompleteSelectField"; import Link from "../Link"; +import { SingleAutocompleteChoiceType } from "../SingleAutocompleteSelectField"; const useStyles = makeStyles( theme => ({ diff --git a/src/components/ListField/ListField.tsx b/src/components/ListField/ListField.tsx index efd6a3d1f..c0e89814c 100644 --- a/src/components/ListField/ListField.tsx +++ b/src/components/ListField/ListField.tsx @@ -2,8 +2,8 @@ import Button from "@material-ui/core/Button"; import { createStyles, Theme, - withStyles, - WithStyles + WithStyles, + withStyles } from "@material-ui/core/styles"; import TextField, { StandardTextFieldProps } from "@material-ui/core/TextField"; import React from "react"; diff --git a/src/components/Locale/Locale.tsx b/src/components/Locale/Locale.tsx index 03bb1b0c5..e8f3dd6eb 100644 --- a/src/components/Locale/Locale.tsx +++ b/src/components/Locale/Locale.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { IntlProvider } from "react-intl"; - import locale_AR from "@locale/ar.json"; import locale_AZ from "@locale/az.json"; import locale_BG from "@locale/bg.json"; @@ -10,8 +7,8 @@ import locale_CS from "@locale/cs.json"; import locale_DA from "@locale/da.json"; import locale_DE from "@locale/de.json"; import locale_EL from "@locale/el.json"; -import locale_ES from "@locale/es.json"; import locale_ES_CO from "@locale/es_CO.json"; +import locale_ES from "@locale/es.json"; import locale_ET from "@locale/et.json"; import locale_FA from "@locale/fa.json"; import locale_FR from "@locale/fr.json"; @@ -27,8 +24,8 @@ import locale_MN from "@locale/mn.json"; import locale_NB from "@locale/nb.json"; import locale_NL from "@locale/nl.json"; import locale_PL from "@locale/pl.json"; -import locale_PT from "@locale/pt.json"; import locale_PT_BR from "@locale/pt_BR.json"; +import locale_PT from "@locale/pt.json"; import locale_RO from "@locale/ro.json"; import locale_RU from "@locale/ru.json"; import locale_SK from "@locale/sk.json"; @@ -43,6 +40,8 @@ import locale_VI from "@locale/vi.json"; import locale_ZH_HANS from "@locale/zh-Hans.json"; import locale_ZH_HANT from "@locale/zh-Hant.json"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; +import React from "react"; +import { IntlProvider } from "react-intl"; export enum Locale { AR = "ar", diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx index 7b6763e7e..98d665139 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.stories.tsx @@ -1,11 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { countries } from "@saleor/fixtures"; import useMultiAutocomplete from "@saleor/hooks/useMultiAutocomplete"; import CardDecorator from "@saleor/storybook/CardDecorator"; import Decorator from "@saleor/storybook/Decorator"; import { ChoiceProvider } from "@saleor/storybook/mock"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import MultiAutocompleteSelectField, { MultiAutocompleteSelectFieldProps } from "./MultiAutocompleteSelectField"; diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx index d7aab9a97..cd88b6ec8 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx @@ -1,19 +1,19 @@ import IconButton from "@material-ui/core/IconButton"; import { makeStyles } from "@material-ui/core/styles"; +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"; +import { FetchMoreProps } from "@saleor/types"; import Downshift, { ControllerStateAndHelpers } from "downshift"; import { filter } from "fuzzaldrin"; import React from "react"; -import { fade } from "@material-ui/core/styles/colorManipulator"; -import Debounce, { DebounceProps } from "@saleor/components/Debounce"; -import ArrowDropdownIcon from "@saleor/icons/ArrowDropdown"; -import { FetchMoreProps } from "@saleor/types"; import MultiAutocompleteSelectFieldContent, { - MultiAutocompleteChoiceType, - MultiAutocompleteActionType + MultiAutocompleteActionType, + MultiAutocompleteChoiceType } from "./MultiAutocompleteSelectFieldContent"; const useStyles = makeStyles( diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx index 9bc21a39a..2a69f20cd 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx @@ -1,21 +1,20 @@ -import classNames from "classnames"; -import { GetItemPropsOptions } from "downshift"; -import React from "react"; -import SVG from "react-inlinesvg"; -import { FormattedMessage } from "react-intl"; - import chevronDown from "@assets/images/ChevronDown.svg"; import CircularProgress from "@material-ui/core/CircularProgress"; import MenuItem from "@material-ui/core/MenuItem"; -import Typography from "@material-ui/core/Typography"; import Paper from "@material-ui/core/Paper"; import { makeStyles } from "@material-ui/core/styles"; +import Typography from "@material-ui/core/Typography"; import AddIcon from "@material-ui/icons/Add"; import Checkbox from "@saleor/components/Checkbox"; import useElementScroll, { isScrolledToBottom } from "@saleor/hooks/useElementScroll"; import { FetchMoreProps } from "@saleor/types"; +import classNames from "classnames"; +import { GetItemPropsOptions } from "downshift"; +import React from "react"; +import SVG from "react-inlinesvg"; +import { FormattedMessage } from "react-intl"; import Hr from "../Hr"; diff --git a/src/components/Navigator/Navigator.tsx b/src/components/Navigator/Navigator.tsx index 3a2752f60..07fc647b8 100644 --- a/src/components/Navigator/Navigator.tsx +++ b/src/components/Navigator/Navigator.tsx @@ -3,15 +3,15 @@ import Modal from "@material-ui/core/Modal"; import Paper from "@material-ui/core/Paper"; import makeStyles from "@material-ui/core/styles/makeStyles"; import useTheme from "@material-ui/core/styles/useTheme"; +import { APP_VERSION } from "@saleor/config"; +import useLocalStorage from "@saleor/hooks/useLocalStorage"; +import useNotifier from "@saleor/hooks/useNotifier"; import Downshift from "downshift"; import hotkeys from "hotkeys-js"; import React from "react"; import { useIntl } from "react-intl"; import cmp from "semver-compare"; -import { APP_VERSION } from "@saleor/config"; -import useLocalStorage from "@saleor/hooks/useLocalStorage"; -import useNotifier from "@saleor/hooks/useNotifier"; import { getActions, getCatalog, diff --git a/src/components/Navigator/NavigatorInput.tsx b/src/components/Navigator/NavigatorInput.tsx index b82235162..9dd9d57e3 100644 --- a/src/components/Navigator/NavigatorInput.tsx +++ b/src/components/Navigator/NavigatorInput.tsx @@ -1,6 +1,7 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import React from "react"; import { useIntl } from "react-intl"; + import { QuickSearchMode } from "./types"; const useStyles = makeStyles( diff --git a/src/components/Navigator/modes/catalog.ts b/src/components/Navigator/modes/catalog.ts index 08be62dee..dcb1e3142 100644 --- a/src/components/Navigator/modes/catalog.ts +++ b/src/components/Navigator/modes/catalog.ts @@ -1,11 +1,11 @@ -import { score } from "fuzzaldrin"; -import { IntlShape } from "react-intl"; - import { categoryUrl } from "@saleor/categories/urls"; import { collectionUrl } from "@saleor/collections/urls"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { maybe } from "@saleor/misc"; import { productUrl } from "@saleor/products/urls"; +import { score } from "fuzzaldrin"; +import { IntlShape } from "react-intl"; + import { SearchCatalog } from "../queries/types/SearchCatalog"; import { QuickSearchAction, QuickSearchActionInput } from "../types"; import messages from "./messages"; diff --git a/src/components/Navigator/modes/commands/actions.ts b/src/components/Navigator/modes/commands/actions.ts index 6a85d568a..a10c60c5d 100644 --- a/src/components/Navigator/modes/commands/actions.ts +++ b/src/components/Navigator/modes/commands/actions.ts @@ -1,15 +1,15 @@ -import { score } from "fuzzaldrin"; -import { IntlShape } from "react-intl"; - import { categoryAddUrl } from "@saleor/categories/urls"; -import { permissionGroupAddUrl } from "@saleor/permissionGroups/urls"; import { collectionAddUrl } from "@saleor/collections/urls"; import { customerAddUrl } from "@saleor/customers/urls"; import { voucherAddUrl } from "@saleor/discounts/urls"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { OrderDraftCreate } from "@saleor/orders/types/OrderDraftCreate"; +import { permissionGroupAddUrl } from "@saleor/permissionGroups/urls"; import { productAddUrl } from "@saleor/products/urls"; +import { score } from "fuzzaldrin"; import { MutationFunction } from "react-apollo"; +import { IntlShape } from "react-intl"; + import { QuickSearchActionInput, QuickSearchMode } from "../../types"; import messages from "../messages"; import { sortScores } from "../utils"; diff --git a/src/components/Navigator/modes/customers.ts b/src/components/Navigator/modes/customers.ts index 32c1fe187..86cf7006c 100644 --- a/src/components/Navigator/modes/customers.ts +++ b/src/components/Navigator/modes/customers.ts @@ -1,8 +1,8 @@ -import { IntlShape } from "react-intl"; - import { customerUrl } from "@saleor/customers/urls"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; +import { IntlShape } from "react-intl"; + import { QuickSearchAction } from "../types"; import messages from "./messages"; diff --git a/src/components/Navigator/modes/default/default.ts b/src/components/Navigator/modes/default/default.ts index d25691fff..c8222ecb7 100644 --- a/src/components/Navigator/modes/default/default.ts +++ b/src/components/Navigator/modes/default/default.ts @@ -1,8 +1,8 @@ +import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; +import { OrderDraftCreate } from "@saleor/orders/types/OrderDraftCreate"; import { MutationFunction } from "react-apollo"; import { IntlShape } from "react-intl"; -import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; -import { OrderDraftCreate } from "@saleor/orders/types/OrderDraftCreate"; import { QuickSearchAction, QuickSearchMode } from "../../types"; import { searchInCommands } from "../commands"; import { sortScores } from "../utils"; diff --git a/src/components/Navigator/modes/default/views.ts b/src/components/Navigator/modes/default/views.ts index c489ce6fb..60dee6617 100644 --- a/src/components/Navigator/modes/default/views.ts +++ b/src/components/Navigator/modes/default/views.ts @@ -1,6 +1,3 @@ -import { score } from "fuzzaldrin"; -import { IntlShape } from "react-intl"; - import { attributeListUrl } from "@saleor/attributes/urls"; import { categoryListUrl } from "@saleor/categories/urls"; import { collectionListUrl } from "@saleor/collections/urls"; @@ -20,8 +17,11 @@ import { siteSettingsUrl } from "@saleor/siteSettings/urls"; import { staffListUrl } from "@saleor/staff/urls"; import { countryListUrl } from "@saleor/taxes/urls"; import { languageListUrl } from "@saleor/translations/urls"; -import { webhookListUrl } from "@saleor/webhooks/urls"; import { warehouseListUrl } from "@saleor/warehouses/urls"; +import { webhookListUrl } from "@saleor/webhooks/urls"; +import { score } from "fuzzaldrin"; +import { IntlShape } from "react-intl"; + import { QuickSearchActionInput } from "../../types"; interface View { diff --git a/src/components/Navigator/modes/index.ts b/src/components/Navigator/modes/index.ts index 4dd2d487f..e0f85ce51 100644 --- a/src/components/Navigator/modes/index.ts +++ b/src/components/Navigator/modes/index.ts @@ -1,8 +1,8 @@ -import { IntlShape } from "react-intl"; - import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { OrderDraftCreate } from "@saleor/orders/types/OrderDraftCreate"; import { MutationFunction } from "react-apollo"; +import { IntlShape } from "react-intl"; + import { QuickSearchAction, QuickSearchMode } from "../types"; import getCatalogModeActions from "./catalog"; import getCommandModeActions from "./commands"; diff --git a/src/components/Navigator/modes/orders.ts b/src/components/Navigator/modes/orders.ts index d5d44b244..f9dfda64d 100644 --- a/src/components/Navigator/modes/orders.ts +++ b/src/components/Navigator/modes/orders.ts @@ -1,8 +1,8 @@ -import { IntlShape } from "react-intl"; - import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { maybe, transformOrderStatus } from "@saleor/misc"; import { orderUrl } from "@saleor/orders/urls"; +import { IntlShape } from "react-intl"; + import { CheckIfOrderExists_order } from "../queries/types/CheckIfOrderExists"; import { QuickSearchAction } from "../types"; import messages from "./messages"; diff --git a/src/components/Navigator/modes/types.ts b/src/components/Navigator/modes/types.ts index 13bab413f..400e05aa1 100644 --- a/src/components/Navigator/modes/types.ts +++ b/src/components/Navigator/modes/types.ts @@ -1,4 +1,5 @@ import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; + import { CheckIfOrderExists_order } from "../queries/types/CheckIfOrderExists"; import { SearchCatalog } from "../queries/types/SearchCatalog"; diff --git a/src/components/Navigator/queries/useCatalogSearch.ts b/src/components/Navigator/queries/useCatalogSearch.ts index acf80c47d..5b6c3a9fd 100644 --- a/src/components/Navigator/queries/useCatalogSearch.ts +++ b/src/components/Navigator/queries/useCatalogSearch.ts @@ -1,8 +1,8 @@ +import makeQuery, { UseQueryResult } from "@saleor/hooks/makeQuery"; +import useDebounce from "@saleor/hooks/useDebounce"; import gql from "graphql-tag"; import { useState } from "react"; -import makeQuery, { UseQueryResult } from "@saleor/hooks/makeQuery"; -import useDebounce from "@saleor/hooks/useDebounce"; import { SearchCatalog, SearchCatalogVariables } from "./types/SearchCatalog"; const searchCatalog = gql` diff --git a/src/components/Navigator/queries/useCheckIfOrderExists.ts b/src/components/Navigator/queries/useCheckIfOrderExists.ts index d08b65a1a..5ad53ffa4 100644 --- a/src/components/Navigator/queries/useCheckIfOrderExists.ts +++ b/src/components/Navigator/queries/useCheckIfOrderExists.ts @@ -1,8 +1,8 @@ +import makeQuery, { UseQueryResult } from "@saleor/hooks/makeQuery"; +import useDebounce from "@saleor/hooks/useDebounce"; import gql from "graphql-tag"; import { useState } from "react"; -import makeQuery, { UseQueryResult } from "@saleor/hooks/makeQuery"; -import useDebounce from "@saleor/hooks/useDebounce"; import { CheckIfOrderExists, CheckIfOrderExistsVariables diff --git a/src/components/Navigator/useQuickSearch.ts b/src/components/Navigator/useQuickSearch.ts index edf3ddde8..ca6e27efe 100644 --- a/src/components/Navigator/useQuickSearch.ts +++ b/src/components/Navigator/useQuickSearch.ts @@ -1,6 +1,3 @@ -import { RefObject, useEffect, useState } from "react"; -import { useIntl } from "react-intl"; - import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import { ChangeEvent, FormChange } from "@saleor/hooks/useForm"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; @@ -9,6 +6,9 @@ import { maybe } from "@saleor/misc"; import { useOrderDraftCreateMutation } from "@saleor/orders/mutations"; import { orderUrl } from "@saleor/orders/urls"; import useCustomerSearch from "@saleor/searches/useCustomerSearch"; +import { RefObject, useEffect, useState } from "react"; +import { useIntl } from "react-intl"; + import getModeActions from "./modes"; import { getGqlOrderId, isQueryValidOrderNumber } from "./modes/orders"; import { getMode } from "./modes/utils"; diff --git a/src/components/NotFoundPage/NotFoundPage.tsx b/src/components/NotFoundPage/NotFoundPage.tsx index ad36ceaab..6de11eaa6 100644 --- a/src/components/NotFoundPage/NotFoundPage.tsx +++ b/src/components/NotFoundPage/NotFoundPage.tsx @@ -1,3 +1,4 @@ +import notFoundImage from "@assets/images/not-found-404.svg"; import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; @@ -5,8 +6,6 @@ import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; -import notFoundImage from "@assets/images/not-found-404.svg"; - const useStyles = makeStyles( theme => ({ button: { diff --git a/src/components/PhoneField/PhoneField.tsx b/src/components/PhoneField/PhoneField.tsx index d6a1567c9..efa90e8d7 100644 --- a/src/components/PhoneField/PhoneField.tsx +++ b/src/components/PhoneField/PhoneField.tsx @@ -1,8 +1,7 @@ import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; - import SingleSelectField from "@saleor/components/SingleSelectField"; +import React from "react"; const useStyles = makeStyles( theme => ({ diff --git a/src/components/RequirePermissions.tsx b/src/components/RequirePermissions.tsx index db6043255..13a11bc61 100644 --- a/src/components/RequirePermissions.tsx +++ b/src/components/RequirePermissions.tsx @@ -1,7 +1,6 @@ -import React from "react"; - import { User_userPermissions } from "@saleor/auth/types/User"; import { PermissionEnum } from "@saleor/types/globalTypes"; +import React from "react"; export function hasPermissions( userPermissions: User_userPermissions[], diff --git a/src/components/RichTextEditor/ImageSource.tsx b/src/components/RichTextEditor/ImageSource.tsx index 766681eb9..d3ae28ff9 100644 --- a/src/components/RichTextEditor/ImageSource.tsx +++ b/src/components/RichTextEditor/ImageSource.tsx @@ -4,11 +4,11 @@ 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 { buttonMessages } from "@saleor/intl"; import { AtomicBlockUtils, EditorState, EntityInstance } from "draft-js"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import Form from "../Form"; interface ImageSourceProps { diff --git a/src/components/RichTextEditor/LinkEntity.tsx b/src/components/RichTextEditor/LinkEntity.tsx index 5a12f0195..86166fe2e 100644 --- a/src/components/RichTextEditor/LinkEntity.tsx +++ b/src/components/RichTextEditor/LinkEntity.tsx @@ -7,11 +7,11 @@ import Popper from "@material-ui/core/Popper"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; +import { buttonMessages } from "@saleor/intl"; import { ContentState } from "draft-js"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import Link from "../Link"; interface LinkEntityProps { diff --git a/src/components/RichTextEditor/LinkSource.tsx b/src/components/RichTextEditor/LinkSource.tsx index 433e956c1..b6c55e7a5 100644 --- a/src/components/RichTextEditor/LinkSource.tsx +++ b/src/components/RichTextEditor/LinkSource.tsx @@ -4,11 +4,11 @@ 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 { buttonMessages } from "@saleor/intl"; import { EditorState, EntityInstance, RichUtils } from "draft-js"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import Form from "../Form"; interface LinkSourceProps { diff --git a/src/components/RichTextEditor/RichTextEditor.tsx b/src/components/RichTextEditor/RichTextEditor.tsx index 463a9ad40..461b15ccc 100644 --- a/src/components/RichTextEditor/RichTextEditor.tsx +++ b/src/components/RichTextEditor/RichTextEditor.tsx @@ -1,7 +1,8 @@ import { makeStyles } from "@material-ui/core/styles"; import { fade } from "@material-ui/core/styles/colorManipulator"; import Typography from "@material-ui/core/Typography"; -import { FormattedMessage } from "react-intl"; +import { CreateCSSProperties } from "@material-ui/styles/withStyles"; +import { ChangeEvent } from "@saleor/hooks/useForm"; import classNames from "classnames"; import { RawDraftContentState } from "draft-js"; import { @@ -12,17 +13,16 @@ import { } from "draftail"; import isEqual from "lodash-es/isEqual"; import React from "react"; - -import { ChangeEvent } from "@saleor/hooks/useForm"; import ErrorBoundary from "react-error-boundary"; -import { CreateCSSProperties } from "@material-ui/styles/withStyles"; +import { FormattedMessage } from "react-intl"; + import BoldIcon from "../../icons/BoldIcon"; -import HeaderTwo from "../../icons/HeaderTwo"; +import HeaderOne from "../../icons/HeaderOne"; import HeaderThree from "../../icons/HeaderThree"; +import HeaderTwo from "../../icons/HeaderTwo"; import ItalicIcon from "../../icons/ItalicIcon"; import LinkIcon from "../../icons/LinkIcon"; import OrderedListIcon from "../../icons/OrderedListIcon"; -import HeaderOne from "../../icons/HeaderOne"; import QuotationIcon from "../../icons/QuotationIcon"; import StrikethroughIcon from "../../icons/StrikethroughIcon"; import UnorderedListIcon from "../../icons/UnorderedListIcon"; diff --git a/src/components/SaveButtonBar/SaveButtonBar.tsx b/src/components/SaveButtonBar/SaveButtonBar.tsx index 83ab6548a..c4ada8be0 100644 --- a/src/components/SaveButtonBar/SaveButtonBar.tsx +++ b/src/components/SaveButtonBar/SaveButtonBar.tsx @@ -1,12 +1,12 @@ import Button from "@material-ui/core/Button"; import Portal from "@material-ui/core/Portal"; import { makeStyles } from "@material-ui/core/styles"; +import useWindowScroll from "@saleor/hooks/useWindowScroll"; +import { buttonMessages } from "@saleor/intl"; import classNames from "classnames"; import React from "react"; import { useIntl } from "react-intl"; -import useWindowScroll from "@saleor/hooks/useWindowScroll"; -import { buttonMessages } from "@saleor/intl"; import { maybe } from "../../misc"; import AppActionContext from "../AppLayout/AppActionContext"; import ConfirmButton, { diff --git a/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx b/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx index a75f282a7..5b116531b 100644 --- a/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx +++ b/src/components/SaveFilterTabDialog/SaveFilterTabDialog.tsx @@ -4,10 +4,10 @@ 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 { buttonMessages } from "@saleor/intl"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "../ConfirmButton"; import Form from "../Form"; diff --git a/src/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx index 17c66b4bb..4493b62c1 100644 --- a/src/components/SearchBar/SearchBar.tsx +++ b/src/components/SearchBar/SearchBar.tsx @@ -1,9 +1,9 @@ +import Button from "@material-ui/core/Button"; +import makeStyles from "@material-ui/core/styles/makeStyles"; +import { SearchPageProps, TabPageProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import makeStyles from "@material-ui/core/styles/makeStyles"; -import Button from "@material-ui/core/Button"; -import { SearchPageProps, TabPageProps } from "@saleor/types"; import FilterTabs, { FilterTab } from "../TableFilter"; import SearchInput from "./SearchInput"; diff --git a/src/components/SearchBar/SearchInput.tsx b/src/components/SearchBar/SearchInput.tsx index 5d8b38e3e..ead6b46eb 100644 --- a/src/components/SearchBar/SearchInput.tsx +++ b/src/components/SearchBar/SearchInput.tsx @@ -1,6 +1,6 @@ import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; import TextField from "@material-ui/core/TextField"; +import React from "react"; import { SearchPageProps } from "../../types"; import Debounce from "../Debounce"; diff --git a/src/components/Shop/index.tsx b/src/components/Shop/index.tsx index bf536a492..a99c967d9 100644 --- a/src/components/Shop/index.tsx +++ b/src/components/Shop/index.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import Helmet from "react-helmet"; - import appleTouchIcon from "@assets/favicons/apple-touch-icon.png"; import favicon16 from "@assets/favicons/favicon-16x16.png"; import favicon32 from "@assets/favicons/favicon-32x32.png"; import safariPinnedTab from "@assets/favicons/safari-pinned-tab.svg"; +import React from "react"; +import Helmet from "react-helmet"; + import { TypedShopInfoQuery } from "./query"; import { ShopInfo_shop } from "./types/ShopInfo"; diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx index 303bf4fa2..791cf77e8 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.stories.tsx @@ -1,12 +1,12 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import Form from "@saleor/components/Form"; import { countries } from "@saleor/fixtures"; import CardDecorator from "@saleor/storybook/CardDecorator"; import Decorator from "@saleor/storybook/Decorator"; import { ChoiceProvider } from "@saleor/storybook/mock"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import SingleAutocompleteSelectField, { SingleAutocompleteSelectFieldProps } from "./SingleAutocompleteSelectField"; diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx index f140d4c05..bca5ac905 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx @@ -1,17 +1,17 @@ import { InputProps } from "@material-ui/core/Input"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; +import useStateFromProps from "@saleor/hooks/useStateFromProps"; +import { FetchMoreProps } from "@saleor/types"; import Downshift from "downshift"; import { filter } from "fuzzaldrin"; import React from "react"; -import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { FetchMoreProps } from "@saleor/types"; import ArrowDropdownIcon from "../../icons/ArrowDropdown"; import Debounce, { DebounceProps } from "../Debounce"; import SingleAutocompleteSelectFieldContent, { - SingleAutocompleteChoiceType, - SingleAutocompleteActionType + SingleAutocompleteActionType, + SingleAutocompleteChoiceType } from "./SingleAutocompleteSelectFieldContent"; const useStyles = makeStyles( diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx index 1375deebf..5453b90e1 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx @@ -1,20 +1,20 @@ +import chevronDown from "@assets/images/ChevronDown.svg"; import CircularProgress from "@material-ui/core/CircularProgress"; import MenuItem from "@material-ui/core/MenuItem"; -import Add from "@material-ui/icons/Add"; import Paper from "@material-ui/core/Paper"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import Add from "@material-ui/icons/Add"; +import useElementScroll, { + isScrolledToBottom +} from "@saleor/hooks/useElementScroll"; +import { FetchMoreProps } from "@saleor/types"; import classNames from "classnames"; import { GetItemPropsOptions } from "downshift"; import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; -import chevronDown from "@assets/images/ChevronDown.svg"; -import useElementScroll, { - isScrolledToBottom -} from "@saleor/hooks/useElementScroll"; -import { FetchMoreProps } from "@saleor/types"; import Hr from "../Hr"; const menuItemHeight = 46; diff --git a/src/components/SingleSelectField/SingleSelectField.tsx b/src/components/SingleSelectField/SingleSelectField.tsx index 87bd69de3..94220f968 100644 --- a/src/components/SingleSelectField/SingleSelectField.tsx +++ b/src/components/SingleSelectField/SingleSelectField.tsx @@ -1,5 +1,6 @@ import FormControl from "@material-ui/core/FormControl"; import FormHelperText from "@material-ui/core/FormHelperText"; +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"; @@ -8,7 +9,6 @@ import { makeStyles } from "@material-ui/core/styles"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { InputProps } from "@material-ui/core/Input"; const useStyles = makeStyles( theme => ({ diff --git a/src/components/SortableTable/SortableHandle.tsx b/src/components/SortableTable/SortableHandle.tsx index d9369fcb1..40997efd8 100644 --- a/src/components/SortableTable/SortableHandle.tsx +++ b/src/components/SortableTable/SortableHandle.tsx @@ -1,10 +1,9 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import TableCell from "@material-ui/core/TableCell"; +import Draggable from "@saleor/icons/Draggable"; import React from "react"; import { SortableHandle as SortableHandleHoc } from "react-sortable-hoc"; -import Draggable from "@saleor/icons/Draggable"; - const useStyles = makeStyles( theme => ({ columnDrag: { diff --git a/src/components/SortableTable/SortableTableBody.tsx b/src/components/SortableTable/SortableTableBody.tsx index 79d8f74fb..4a8d715c8 100644 --- a/src/components/SortableTable/SortableTableBody.tsx +++ b/src/components/SortableTable/SortableTableBody.tsx @@ -1,10 +1,9 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import TableBody, { TableBodyProps } from "@material-ui/core/TableBody"; +import { ReorderAction } from "@saleor/types"; import React from "react"; import { SortableContainer } from "react-sortable-hoc"; -import { ReorderAction } from "@saleor/types"; - const InnerSortableTableBody = SortableContainer( ({ children, ...props }) => {children} ); @@ -29,9 +28,10 @@ const useStyles = makeStyles( { name: "SortableTableBody" } ); -const SortableTableBody: React.FC< - Omit -> = props => { +const SortableTableBody: React.FC> = props => { const classes = useStyles({}); return ( diff --git a/src/components/SortableTable/SortableTableRow.tsx b/src/components/SortableTable/SortableTableRow.tsx index f75299921..48a77dad1 100644 --- a/src/components/SortableTable/SortableTableRow.tsx +++ b/src/components/SortableTable/SortableTableRow.tsx @@ -1,6 +1,7 @@ import TableRow, { TableRowProps } from "@material-ui/core/TableRow"; import React from "react"; import { SortableElement } from "react-sortable-hoc"; + import SortableHandle from "./SortableHandle"; const SortableTableRow = SortableElement( diff --git a/src/components/TableCellHeader/TableCellHeader.stories.tsx b/src/components/TableCellHeader/TableCellHeader.stories.tsx index 25d2e24c6..bf6148f4f 100644 --- a/src/components/TableCellHeader/TableCellHeader.stories.tsx +++ b/src/components/TableCellHeader/TableCellHeader.stories.tsx @@ -3,10 +3,10 @@ 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 ResponsiveTable from "@saleor/components/ResponsiveTable"; import { storiesOf } from "@storybook/react"; import React from "react"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Decorator from "../../storybook/Decorator"; import TableCellHeader, { TableCellHeaderArrowDirection diff --git a/src/components/TableHead/TableHead.tsx b/src/components/TableHead/TableHead.tsx index 113a7cd65..1a1d39602 100644 --- a/src/components/TableHead/TableHead.tsx +++ b/src/components/TableHead/TableHead.tsx @@ -11,7 +11,6 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import { Node } from "../../types"; - import Checkbox from "../Checkbox"; export interface TableHeadProps extends MuiTableHeadProps { diff --git a/src/components/TablePagination/TablePagination.tsx b/src/components/TablePagination/TablePagination.tsx index 9a669bf0c..4961a7b1c 100644 --- a/src/components/TablePagination/TablePagination.tsx +++ b/src/components/TablePagination/TablePagination.tsx @@ -2,10 +2,10 @@ import { IconButtonProps } from "@material-ui/core/IconButton"; import { makeStyles } from "@material-ui/core/styles"; import TableCell from "@material-ui/core/TableCell"; import Toolbar from "@material-ui/core/Toolbar"; -import React from "react"; - import RowNumberSelect from "@saleor/components/RowNumberSelect"; import { maybe } from "@saleor/misc"; +import React from "react"; + import { ListSettings } from "../../types"; import TablePaginationActions from "./TablePaginationActions"; diff --git a/src/components/TablePagination/TablePaginationActions.tsx b/src/components/TablePagination/TablePaginationActions.tsx index f847475d3..8d83749e3 100644 --- a/src/components/TablePagination/TablePaginationActions.tsx +++ b/src/components/TablePagination/TablePaginationActions.tsx @@ -62,9 +62,7 @@ export interface TablePaginationActionsProps { onPreviousPage(event); } -export const TablePaginationActions: React.FC< - TablePaginationActionsProps -> = props => { +export const TablePaginationActions: React.FC = props => { const { backIconButtonProps, className, diff --git a/src/components/VisibilityCard/VisibilityCard.tsx b/src/components/VisibilityCard/VisibilityCard.tsx index d75166fc8..201f96e2d 100644 --- a/src/components/VisibilityCard/VisibilityCard.tsx +++ b/src/components/VisibilityCard/VisibilityCard.tsx @@ -3,13 +3,13 @@ import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import RadioSwitchField from "@saleor/components/RadioSwitchField"; import { UserError } from "@saleor/types"; import { getFieldError } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; + import { DateContext } from "../Date/DateContext"; import FormSpacer from "../FormSpacer"; diff --git a/src/components/WindowTitle/index.tsx b/src/components/WindowTitle/index.tsx index e68c41ba0..12f3a1041 100644 --- a/src/components/WindowTitle/index.tsx +++ b/src/components/WindowTitle/index.tsx @@ -1,8 +1,7 @@ +import useShop from "@saleor/hooks/useShop"; import React from "react"; import { Helmet } from "react-helmet"; -import useShop from "@saleor/hooks/useShop"; - interface WindowTitleProps { title: string; } diff --git a/src/configuration/ConfigurationPage.tsx b/src/configuration/ConfigurationPage.tsx index fcdc547c4..cbf57c4a4 100644 --- a/src/configuration/ConfigurationPage.tsx +++ b/src/configuration/ConfigurationPage.tsx @@ -1,12 +1,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; +import { IconProps } from "@material-ui/core/Icon"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import { sectionNames } from "@saleor/intl"; import React from "react"; import { useIntl } from "react-intl"; -import { IconProps } from "@material-ui/core/Icon"; -import { sectionNames } from "@saleor/intl"; import { hasPermission } from "../auth/misc"; import { User } from "../auth/types/User"; import Container from "../components/Container"; diff --git a/src/configuration/index.tsx b/src/configuration/index.tsx index 82cc16c98..b42e81f20 100644 --- a/src/configuration/index.tsx +++ b/src/configuration/index.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { IntlShape, useIntl } from "react-intl"; - import { attributeListUrl } from "@saleor/attributes/urls"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -9,30 +6,33 @@ import Attributes from "@saleor/icons/Attributes"; import Bot from "@saleor/icons/Bot"; import Navigation from "@saleor/icons/Navigation"; import Pages from "@saleor/icons/Pages"; +import PermissionGroups from "@saleor/icons/PermissionGroups"; import Plugins from "@saleor/icons/Plugins"; import ProductTypes from "@saleor/icons/ProductTypes"; import ShippingMethods from "@saleor/icons/ShippingMethods"; import SiteSettings from "@saleor/icons/SiteSettings"; import StaffMembers from "@saleor/icons/StaffMembers"; -import PermissionGroups from "@saleor/icons/PermissionGroups"; import Taxes from "@saleor/icons/Taxes"; +import Warehouses from "@saleor/icons/Warehouses"; import Webhooks from "@saleor/icons/Webhooks"; import { sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { menuListUrl } from "@saleor/navigation/urls"; import { pageListUrl } from "@saleor/pages/urls"; +import { permissionGroupListUrl } from "@saleor/permissionGroups/urls"; import { pluginListUrl } from "@saleor/plugins/urls"; import { productTypeListUrl } from "@saleor/productTypes/urls"; import { serviceListUrl } from "@saleor/services/urls"; import { shippingZonesListUrl } from "@saleor/shipping/urls"; import { siteSettingsUrl } from "@saleor/siteSettings/urls"; import { staffListUrl } from "@saleor/staff/urls"; -import { permissionGroupListUrl } from "@saleor/permissionGroups/urls"; import { taxSection } from "@saleor/taxes/urls"; import { PermissionEnum } from "@saleor/types/globalTypes"; -import { webhookListUrl } from "@saleor/webhooks/urls"; -import Warehouses from "@saleor/icons/Warehouses"; import { warehouseSection } from "@saleor/warehouses/urls"; +import { webhookListUrl } from "@saleor/webhooks/urls"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; + import ConfigurationPage, { MenuSection } from "./ConfigurationPage"; export function createConfigurationMenu(intl: IntlShape): MenuSection[] { diff --git a/src/customers/components/CustomerAddress/CustomerAddress.tsx b/src/customers/components/CustomerAddress/CustomerAddress.tsx index 59dfbe2f7..7a40c0988 100644 --- a/src/customers/components/CustomerAddress/CustomerAddress.tsx +++ b/src/customers/components/CustomerAddress/CustomerAddress.tsx @@ -3,14 +3,14 @@ import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/core/CardActions"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AddressFormatter from "@saleor/components/AddressFormatter"; import CardMenu from "@saleor/components/CardMenu"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; import { buttonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AddressTypeEnum } from "../../../types/globalTypes"; import { CustomerAddresses_user_addresses } from "../../types/CustomerAddresses"; diff --git a/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx b/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx index 9a77a8a5d..b20ecc1c1 100644 --- a/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx +++ b/src/customers/components/CustomerAddressDialog/CustomerAddressDialog.tsx @@ -3,15 +3,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 { createStyles, withStyles, WithStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - +import { createStyles, WithStyles, withStyles } from "@material-ui/core/styles"; import AddressEdit from "@saleor/components/AddressEdit"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; @@ -19,7 +17,9 @@ import { buttonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { AddressInput } from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { AddressTypeInput } from "../../types"; import { CustomerAddresses_user_addresses } from "../../types/CustomerAddresses"; diff --git a/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx b/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx index d823a8d0b..e63c49739 100644 --- a/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx +++ b/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.tsx @@ -1,13 +1,12 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; - -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { AddressTypeEnum } from "../../../types/globalTypes"; import { CustomerAddresses_user } from "../../types/CustomerAddresses"; @@ -46,9 +45,7 @@ const useStyles = makeStyles( { name: "CustomerAddressListPage" } ); -const CustomerAddressListPage: React.FC< - CustomerAddressListPageProps -> = props => { +const CustomerAddressListPage: React.FC = props => { const { customer, disabled, diff --git a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx index 99241e255..a82fbc172 100644 --- a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx +++ b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx @@ -3,13 +3,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AddressFormatter from "@saleor/components/AddressFormatter"; import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; import { buttonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { CustomerDetails_user } from "../../types/CustomerDetails"; diff --git a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx index 5ef7e309b..3d38cc6f7 100644 --- a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx +++ b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx @@ -2,14 +2,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AddressEdit from "@saleor/components/AddressEdit"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AddressTypeInput } from "../../types"; const useStyles = makeStyles( diff --git a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx index 785f5ccef..586721a70 100644 --- a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx +++ b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx @@ -2,14 +2,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { commonMessages } from "@saleor/intl"; +import { getFormErrors } from "@saleor/utils/errors"; +import getAccountErrorMessage from "@saleor/utils/errors/account"; import React from "react"; import { useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; -import getAccountErrorMessage from "@saleor/utils/errors/account"; import { CustomerCreatePageFormData } from "../CustomerCreatePage"; const useStyles = makeStyles( diff --git a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx index 6765547d9..780786c00 100644 --- a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx +++ b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx @@ -2,14 +2,13 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface CustomerCreateNoteProps { data: { diff --git a/src/customers/components/CustomerCreatePage/CustomerCreatePage.tsx b/src/customers/components/CustomerCreatePage/CustomerCreatePage.tsx index c122130fe..a31fcd973 100644 --- a/src/customers/components/CustomerCreatePage/CustomerCreatePage.tsx +++ b/src/customers/components/CustomerCreatePage/CustomerCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -9,11 +6,14 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { sectionNames } from "@saleor/intl"; import { AddressInput } from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { AddressTypeInput } from "../../types"; import { CustomerCreateData_shop_countries } from "../../types/CustomerCreateData"; import CustomerCreateAddress from "../CustomerCreateAddress/CustomerCreateAddress"; diff --git a/src/customers/components/CustomerDetails/CustomerDetails.tsx b/src/customers/components/CustomerDetails/CustomerDetails.tsx index 6007dfe3f..32848b90e 100644 --- a/src/customers/components/CustomerDetails/CustomerDetails.tsx +++ b/src/customers/components/CustomerDetails/CustomerDetails.tsx @@ -3,17 +3,17 @@ import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; +import CardTitle from "@saleor/components/CardTitle"; +import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; +import Skeleton from "@saleor/components/Skeleton"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { maybe } from "@saleor/misc"; +import { getFormErrors } from "@saleor/utils/errors"; +import getAccountErrorMessage from "@saleor/utils/errors/account"; import moment from "moment-timezone"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; -import Skeleton from "@saleor/components/Skeleton"; -import { maybe } from "@saleor/misc"; -import { getFormErrors } from "@saleor/utils/errors"; -import getAccountErrorMessage from "@saleor/utils/errors/account"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { CustomerDetails_user } from "../../types/CustomerDetails"; const useStyles = makeStyles( diff --git a/src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx b/src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx index 308a7f115..c76f78c6a 100644 --- a/src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx +++ b/src/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -9,8 +6,11 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { sectionNames } from "@saleor/intl"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { getUserName, maybe } from "../../../misc"; import { CustomerDetails_user } from "../../types/CustomerDetails"; import CustomerAddresses from "../CustomerAddresses"; diff --git a/src/customers/components/CustomerInfo/CustomerInfo.tsx b/src/customers/components/CustomerInfo/CustomerInfo.tsx index f0b985921..44044e58e 100644 --- a/src/customers/components/CustomerInfo/CustomerInfo.tsx +++ b/src/customers/components/CustomerInfo/CustomerInfo.tsx @@ -3,16 +3,15 @@ import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; -import { commonMessages } from "@saleor/intl"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/customers/components/CustomerList/CustomerList.tsx b/src/customers/components/CustomerList/CustomerList.tsx index 0dd489df0..160bc7d7b 100644 --- a/src/customers/components/CustomerList/CustomerList.tsx +++ b/src/customers/components/CustomerList/CustomerList.tsx @@ -3,19 +3,19 @@ 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 React from "react"; -import { FormattedMessage } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { CustomerListUrlSortField } from "@saleor/customers/urls"; import { getUserName, maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; -import { CustomerListUrlSortField } from "@saleor/customers/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { ListCustomers_customers_edges_node } from "../../types/ListCustomers"; const useStyles = makeStyles( diff --git a/src/customers/components/CustomerListPage/CustomerListPage.tsx b/src/customers/components/CustomerListPage/CustomerListPage.tsx index 2c45b6f05..51f0c9464 100644 --- a/src/customers/components/CustomerListPage/CustomerListPage.tsx +++ b/src/customers/components/CustomerListPage/CustomerListPage.tsx @@ -1,26 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { CustomerListUrlSortField } from "@saleor/customers/urls"; +import { sectionNames } from "@saleor/intl"; +import { + FilterPageProps, + ListActions, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import { sectionNames } from "@saleor/intl"; -import { - ListActions, - PageListProps, - TabPageProps, - SortPage, - FilterPageProps -} from "@saleor/types"; -import { CustomerListUrlSortField } from "@saleor/customers/urls"; -import FilterBar from "@saleor/components/FilterBar"; -import CustomerList from "../CustomerList/CustomerList"; import { ListCustomers_customers_edges_node } from "../../types/ListCustomers"; +import CustomerList from "../CustomerList/CustomerList"; import { + createFilterStructure, CustomerFilterKeys, - CustomerListFilterOpts, - createFilterStructure + CustomerListFilterOpts } from "./filters"; export interface CustomerListPageProps diff --git a/src/customers/components/CustomerListPage/filters.ts b/src/customers/components/CustomerListPage/filters.ts index 71301bac9..eb4642493 100644 --- a/src/customers/components/CustomerListPage/filters.ts +++ b/src/customers/components/CustomerListPage/filters.ts @@ -1,11 +1,10 @@ -import { IntlShape, defineMessages } from "react-intl"; - -import { FilterOpts, MinMax } from "@saleor/types"; import { IFilter } from "@saleor/components/Filter"; +import { FilterOpts, MinMax } from "@saleor/types"; import { createDateField, createNumberField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum CustomerFilterKeys { joined = "joined", diff --git a/src/customers/components/CustomerOrders/CustomerOrders.tsx b/src/customers/components/CustomerOrders/CustomerOrders.tsx index 09800e4cd..cf9aac9c5 100644 --- a/src/customers/components/CustomerOrders/CustomerOrders.tsx +++ b/src/customers/components/CustomerOrders/CustomerOrders.tsx @@ -5,15 +5,15 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection, transformPaymentStatus } from "../../../misc"; import { CustomerDetails_user_orders_edges_node } from "../../types/CustomerDetails"; diff --git a/src/customers/components/CustomerStats/CustomerStats.tsx b/src/customers/components/CustomerStats/CustomerStats.tsx index 1187c502a..2623a6c0f 100644 --- a/src/customers/components/CustomerStats/CustomerStats.tsx +++ b/src/customers/components/CustomerStats/CustomerStats.tsx @@ -2,13 +2,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import { Hr } from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { CustomerDetails_user } from "../../types/CustomerDetails"; diff --git a/src/customers/index.tsx b/src/customers/index.tsx index 1314ebc9c..301ea12f4 100644 --- a/src/customers/index.tsx +++ b/src/customers/index.tsx @@ -1,10 +1,10 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { customerAddPath, @@ -12,9 +12,9 @@ import { CustomerAddressesUrlQueryParams, customerListPath, CustomerListUrlQueryParams, + CustomerListUrlSortField, customerPath, - CustomerUrlQueryParams, - CustomerListUrlSortField + CustomerUrlQueryParams } from "./urls"; import CustomerAddressesViewComponent from "./views/CustomerAddresses"; import CustomerCreateView from "./views/CustomerCreate"; diff --git a/src/customers/queries.ts b/src/customers/queries.ts index 7bd2af3b9..461543b21 100644 --- a/src/customers/queries.ts +++ b/src/customers/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { fragmentAddress } from "../orders/queries"; import { TypedQuery } from "../queries"; import { diff --git a/src/customers/urls.ts b/src/customers/urls.ts index 819672388..f770d63c9 100644 --- a/src/customers/urls.ts +++ b/src/customers/urls.ts @@ -8,8 +8,8 @@ import { Filters, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; export const customerSection = "/customers/"; diff --git a/src/customers/views/CustomerAddresses.tsx b/src/customers/views/CustomerAddresses.tsx index f1e8fdc81..1dfa46b37 100644 --- a/src/customers/views/CustomerAddresses.tsx +++ b/src/customers/views/CustomerAddresses.tsx @@ -1,7 +1,4 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -9,6 +6,9 @@ import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../misc"; import CustomerAddressDialog from "../components/CustomerAddressDialog"; import CustomerAddressListPage from "../components/CustomerAddressListPage"; @@ -25,9 +25,9 @@ import { SetCustomerDefaultAddress } from "../types/SetCustomerDefaultAddress"; import { UpdateCustomerAddress } from "../types/UpdateCustomerAddress"; import { customerAddressesUrl, + CustomerAddressesUrlDialog, CustomerAddressesUrlQueryParams, - customerUrl, - CustomerAddressesUrlDialog + customerUrl } from "../urls"; interface CustomerAddressesProps { diff --git a/src/customers/views/CustomerCreate.tsx b/src/customers/views/CustomerCreate.tsx index 97b91efde..1da211ca1 100644 --- a/src/customers/views/CustomerCreate.tsx +++ b/src/customers/views/CustomerCreate.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import CustomerCreatePage from "../components/CustomerCreatePage"; import { TypedCreateCustomerMutation } from "../mutations"; diff --git a/src/customers/views/CustomerDetails.tsx b/src/customers/views/CustomerDetails.tsx index f5d446b88..da4868cc5 100644 --- a/src/customers/views/CustomerDetails.tsx +++ b/src/customers/views/CustomerDetails.tsx @@ -1,13 +1,13 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { orderListUrl, orderUrl } from "../../orders/urls"; import CustomerDetailsPage from "../components/CustomerDetailsPage/CustomerDetailsPage"; diff --git a/src/customers/views/CustomerList/CustomerList.tsx b/src/customers/views/CustomerList/CustomerList.tsx index b9df0532c..f0ef3486a 100644 --- a/src/customers/views/CustomerList/CustomerList.tsx +++ b/src/customers/views/CustomerList/CustomerList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -16,14 +13,17 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import useShop from "@saleor/hooks/useShop"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import CustomerListPage from "../../components/CustomerListPage"; import { TypedBulkRemoveCustomers } from "../../mutations"; import { useCustomerListQuery } from "../../queries"; @@ -31,19 +31,19 @@ import { BulkRemoveCustomers } from "../../types/BulkRemoveCustomers"; import { customerAddUrl, customerListUrl, + CustomerListUrlDialog, CustomerListUrlQueryParams, - customerUrl, - CustomerListUrlDialog + customerUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/customers/views/CustomerList/filters.test.ts b/src/customers/views/CustomerList/filters.test.ts index 7f73e826a..e2dcdbf6d 100644 --- a/src/customers/views/CustomerList/filters.test.ts +++ b/src/customers/views/CustomerList/filters.test.ts @@ -1,13 +1,13 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { CustomerListUrlFilters } from "@saleor/customers/urls"; import { createFilterStructure } from "@saleor/customers/components/CustomerListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; +import { CustomerListUrlFilters } from "@saleor/customers/urls"; import { date } from "@saleor/fixtures"; +import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/customers/views/CustomerList/filters.ts b/src/customers/views/CustomerList/filters.ts index fb72e2d0b..0068da444 100644 --- a/src/customers/views/CustomerList/filters.ts +++ b/src/customers/views/CustomerList/filters.ts @@ -1,10 +1,11 @@ -import { CustomerFilterInput } from "@saleor/types/globalTypes"; -import { maybe } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; import { CustomerFilterKeys, CustomerListFilterOpts } from "@saleor/customers/components/CustomerListPage"; +import { maybe } from "@saleor/misc"; +import { CustomerFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, diff --git a/src/discounts/components/DiscountCategories/DiscountCategories.tsx b/src/discounts/components/DiscountCategories/DiscountCategories.tsx index 1a805509b..419d68187 100644 --- a/src/discounts/components/DiscountCategories/DiscountCategories.tsx +++ b/src/discounts/components/DiscountCategories/DiscountCategories.tsx @@ -7,15 +7,15 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps } from "../../../types"; import { SaleDetails_sale } from "../../types/SaleDetails"; diff --git a/src/discounts/components/DiscountCollections/DiscountCollections.tsx b/src/discounts/components/DiscountCollections/DiscountCollections.tsx index 3484bc853..1525ae8e8 100644 --- a/src/discounts/components/DiscountCollections/DiscountCollections.tsx +++ b/src/discounts/components/DiscountCollections/DiscountCollections.tsx @@ -7,15 +7,15 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps } from "../../../types"; import { SaleDetails_sale } from "../../types/SaleDetails"; diff --git a/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx b/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx index 0b8991c76..9a12c61f3 100644 --- a/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx +++ b/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.tsx @@ -9,10 +9,6 @@ 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 { filter } from "fuzzaldrin"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState @@ -24,6 +20,9 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; // tslint:disable no-submodule-imports import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { buttonMessages } from "@saleor/intl"; +import { filter } from "fuzzaldrin"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface FormData { allCountries: boolean; @@ -58,9 +57,7 @@ const useStyles = makeStyles( }), { name: "DiscountCountrySelectDialog" } ); -const DiscountCountrySelectDialog: React.FC< - DiscountCountrySelectDialogProps -> = props => { +const DiscountCountrySelectDialog: React.FC = props => { const { confirmButtonState, onClose, diff --git a/src/discounts/components/DiscountDates/DiscountDates.tsx b/src/discounts/components/DiscountDates/DiscountDates.tsx index 734a24773..8a62a36ac 100644 --- a/src/discounts/components/DiscountDates/DiscountDates.tsx +++ b/src/discounts/components/DiscountDates/DiscountDates.tsx @@ -1,16 +1,15 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Grid from "@saleor/components/Grid"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; interface DiscountDatesProps { data: { diff --git a/src/discounts/components/DiscountProducts/DiscountProducts.tsx b/src/discounts/components/DiscountProducts/DiscountProducts.tsx index b9ee5828d..8f3d51b38 100644 --- a/src/discounts/components/DiscountProducts/DiscountProducts.tsx +++ b/src/discounts/components/DiscountProducts/DiscountProducts.tsx @@ -7,9 +7,6 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -20,6 +17,9 @@ import TableCellAvatar, { } from "@saleor/components/TableCellAvatar"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps } from "../../../types"; import { SaleDetails_sale } from "../../types/SaleDetails"; diff --git a/src/discounts/components/SaleCreatePage/SaleCreatePage.tsx b/src/discounts/components/SaleCreatePage/SaleCreatePage.tsx index c4fece3cd..bdbecea77 100644 --- a/src/discounts/components/SaleCreatePage/SaleCreatePage.tsx +++ b/src/discounts/components/SaleCreatePage/SaleCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -9,8 +6,11 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { sectionNames } from "@saleor/intl"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { SaleType as SaleTypeEnum } from "../../../types/globalTypes"; import DiscountDates from "../DiscountDates"; import SaleInfo from "../SaleInfo"; diff --git a/src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx b/src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx index d615284bd..32d70c990 100644 --- a/src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx +++ b/src/discounts/components/SaleDetailsPage/SaleDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -10,8 +7,11 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { Tab, TabContainer } from "@saleor/components/Tab"; -import { sectionNames } from "@saleor/intl"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe, splitDateTime } from "../../../misc"; import { ListProps, TabListActions } from "../../../types"; import { SaleType as SaleTypeEnum } from "../../../types/globalTypes"; diff --git a/src/discounts/components/SaleInfo/SaleInfo.tsx b/src/discounts/components/SaleInfo/SaleInfo.tsx index 90908fd10..d56914c27 100644 --- a/src/discounts/components/SaleInfo/SaleInfo.tsx +++ b/src/discounts/components/SaleInfo/SaleInfo.tsx @@ -1,14 +1,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { commonMessages } from "@saleor/intl"; +import { getFormErrors } from "@saleor/utils/errors"; +import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; import React from "react"; import { useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; -import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; import { FormData } from "../SaleDetailsPage"; export interface SaleInfoProps { diff --git a/src/discounts/components/SaleList/SaleList.tsx b/src/discounts/components/SaleList/SaleList.tsx index ce78fd11a..6f640d982 100644 --- a/src/discounts/components/SaleList/SaleList.tsx +++ b/src/discounts/components/SaleList/SaleList.tsx @@ -3,23 +3,23 @@ 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 React from "react"; -import { FormattedMessage } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import Date from "@saleor/components/Date"; import Money from "@saleor/components/Money"; import Percent from "@saleor/components/Percent"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { SaleListUrlSortField } from "@saleor/discounts/urls"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; import { SaleType } from "@saleor/types/globalTypes"; -import { SaleListUrlSortField } from "@saleor/discounts/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { SaleList_sales_edges_node } from "../../types/SaleList"; export interface SaleListProps diff --git a/src/discounts/components/SaleListPage/SaleListPage.tsx b/src/discounts/components/SaleListPage/SaleListPage.tsx index b6c5ef9bd..96f593619 100644 --- a/src/discounts/components/SaleListPage/SaleListPage.tsx +++ b/src/discounts/components/SaleListPage/SaleListPage.tsx @@ -1,26 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { SaleListUrlSortField } from "@saleor/discounts/urls"; +import { sectionNames } from "@saleor/intl"; +import { + FilterPageProps, + ListActions, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - ListActions, - PageListProps, - TabPageProps, - SortPage, - FilterPageProps -} from "@saleor/types"; -import { SaleListUrlSortField } from "@saleor/discounts/urls"; import { SaleList_sales_edges_node } from "../../types/SaleList"; import SaleList from "../SaleList"; import { + createFilterStructure, SaleFilterKeys, - SaleListFilterOpts, - createFilterStructure + SaleListFilterOpts } from "./filters"; export interface SaleListPageProps diff --git a/src/discounts/components/SaleListPage/filters.ts b/src/discounts/components/SaleListPage/filters.ts index cd60e2cda..eff413b00 100644 --- a/src/discounts/components/SaleListPage/filters.ts +++ b/src/discounts/components/SaleListPage/filters.ts @@ -1,5 +1,4 @@ -import { defineMessages, IntlShape } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; import { FilterOpts, MinMax } from "@saleor/types"; import { DiscountStatusEnum, @@ -9,7 +8,7 @@ import { createDateField, createOptionsField } from "@saleor/utils/filters/fields"; -import { IFilter } from "@saleor/components/Filter"; +import { defineMessages, IntlShape } from "react-intl"; export enum SaleFilterKeys { saleType = "saleType", diff --git a/src/discounts/components/SaleSummary/SaleSummary.tsx b/src/discounts/components/SaleSummary/SaleSummary.tsx index 9841f895e..8c5787386 100644 --- a/src/discounts/components/SaleSummary/SaleSummary.tsx +++ b/src/discounts/components/SaleSummary/SaleSummary.tsx @@ -1,9 +1,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; @@ -13,6 +10,9 @@ import Money from "@saleor/components/Money"; import Percent from "@saleor/components/Percent"; import Skeleton from "@saleor/components/Skeleton"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { SaleType } from "../../../types/globalTypes"; import { SaleDetails_sale } from "../../types/SaleDetails"; diff --git a/src/discounts/components/SaleType/SaleType.tsx b/src/discounts/components/SaleType/SaleType.tsx index 333db8ef7..a5f782f37 100644 --- a/src/discounts/components/SaleType/SaleType.tsx +++ b/src/discounts/components/SaleType/SaleType.tsx @@ -1,15 +1,15 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { IntlShape, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField, { RadioGroupFieldChoice } from "@saleor/components/RadioGroupField"; import { FormChange } from "@saleor/hooks/useForm"; import { SaleType as SaleTypeEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; + import { FormData } from "../SaleDetailsPage"; export interface SaleTypeProps { diff --git a/src/discounts/components/SaleValue/SaleValue.tsx b/src/discounts/components/SaleValue/SaleValue.tsx index 708671e43..9a30298c1 100644 --- a/src/discounts/components/SaleValue/SaleValue.tsx +++ b/src/discounts/components/SaleValue/SaleValue.tsx @@ -1,15 +1,15 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; import { SaleType } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; + import { FormData } from "../SaleDetailsPage"; export interface SaleValueProps { diff --git a/src/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx b/src/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx index fb09430bf..2cbd55592 100644 --- a/src/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx +++ b/src/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -9,8 +6,11 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { sectionNames } from "@saleor/intl"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { DiscountValueTypeEnum, VoucherTypeEnum diff --git a/src/discounts/components/VoucherDates/VoucherDates.tsx b/src/discounts/components/VoucherDates/VoucherDates.tsx index 3f94dfa76..2ae93259a 100644 --- a/src/discounts/components/VoucherDates/VoucherDates.tsx +++ b/src/discounts/components/VoucherDates/VoucherDates.tsx @@ -1,16 +1,16 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Grid from "@saleor/components/Grid"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; + import { FormData } from "../VoucherDetailsPage"; interface VoucherDatesProps { diff --git a/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx b/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx index 11db32b9b..e6f60c36f 100644 --- a/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx +++ b/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx @@ -1,7 +1,4 @@ import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -13,8 +10,11 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { Tab, TabContainer } from "@saleor/components/Tab"; import { RequirementsPicker } from "@saleor/discounts/types"; -import { sectionNames } from "@saleor/intl"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, splitDateTime } from "../../../misc"; import { ListProps, TabListActions } from "../../../types"; import { diff --git a/src/discounts/components/VoucherInfo/VoucherInfo.tsx b/src/discounts/components/VoucherInfo/VoucherInfo.tsx index 0ca4160d3..03eb4c89d 100644 --- a/src/discounts/components/VoucherInfo/VoucherInfo.tsx +++ b/src/discounts/components/VoucherInfo/VoucherInfo.tsx @@ -1,17 +1,17 @@ +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 CardTitle from "@saleor/components/CardTitle"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { commonMessages } from "@saleor/intl"; +import { getFormErrors } from "@saleor/utils/errors"; +import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Button from "@material-ui/core/Button"; -import CardTitle from "@saleor/components/CardTitle"; -import { commonMessages } from "@saleor/intl"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; -import { getFormErrors } from "@saleor/utils/errors"; -import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; -import { FormData } from "../VoucherDetailsPage"; import { generateCode } from "../../../misc"; +import { FormData } from "../VoucherDetailsPage"; interface VoucherInfoProps { data: FormData; diff --git a/src/discounts/components/VoucherLimits/VoucherLimits.tsx b/src/discounts/components/VoucherLimits/VoucherLimits.tsx index c2650d659..d3583f7b5 100644 --- a/src/discounts/components/VoucherLimits/VoucherLimits.tsx +++ b/src/discounts/components/VoucherLimits/VoucherLimits.tsx @@ -1,14 +1,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; +import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; +import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; import React from "react"; import { useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; -import { getFormErrors } from "@saleor/utils/errors"; -import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; -import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; import { FormData } from "../VoucherDetailsPage"; interface VoucherLimitsProps { diff --git a/src/discounts/components/VoucherList/VoucherList.tsx b/src/discounts/components/VoucherList/VoucherList.tsx index 34899a583..4733999a7 100644 --- a/src/discounts/components/VoucherList/VoucherList.tsx +++ b/src/discounts/components/VoucherList/VoucherList.tsx @@ -3,23 +3,23 @@ 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 React from "react"; -import { FormattedMessage } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import Date from "@saleor/components/Date"; import Money from "@saleor/components/Money"; import Percent from "@saleor/components/Percent"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { VoucherListUrlSortField } from "@saleor/discounts/urls"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; -import { VoucherListUrlSortField } from "@saleor/discounts/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { VoucherList_vouchers_edges_node } from "../../types/VoucherList"; export interface VoucherListProps diff --git a/src/discounts/components/VoucherListPage/VoucherListPage.tsx b/src/discounts/components/VoucherListPage/VoucherListPage.tsx index 91dbf982d..11193de57 100644 --- a/src/discounts/components/VoucherListPage/VoucherListPage.tsx +++ b/src/discounts/components/VoucherListPage/VoucherListPage.tsx @@ -1,26 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { VoucherListUrlSortField } from "@saleor/discounts/urls"; +import { sectionNames } from "@saleor/intl"; +import { + FilterPageProps, + ListActions, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - ListActions, - PageListProps, - TabPageProps, - SortPage, - FilterPageProps -} from "@saleor/types"; -import { VoucherListUrlSortField } from "@saleor/discounts/urls"; import { VoucherList_vouchers_edges_node } from "../../types/VoucherList"; import VoucherList from "../VoucherList"; import { + createFilterStructure, VoucherFilterKeys, - VoucherListFilterOpts, - createFilterStructure + VoucherListFilterOpts } from "./filters"; export interface VoucherListPageProps diff --git a/src/discounts/components/VoucherListPage/filters.ts b/src/discounts/components/VoucherListPage/filters.ts index e1c2c56a5..8fc0a88c2 100644 --- a/src/discounts/components/VoucherListPage/filters.ts +++ b/src/discounts/components/VoucherListPage/filters.ts @@ -1,16 +1,15 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { - createOptionsField, - createNumberField, - createDateField -} from "@saleor/utils/filters/fields"; -import { - VoucherDiscountType, - DiscountStatusEnum -} from "@saleor/types/globalTypes"; -import { MinMax, FilterOpts } from "@saleor/types"; import { IFilter } from "@saleor/components/Filter"; +import { FilterOpts, MinMax } from "@saleor/types"; +import { + DiscountStatusEnum, + VoucherDiscountType +} from "@saleor/types/globalTypes"; +import { + createDateField, + createNumberField, + createOptionsField +} from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum VoucherFilterKeys { saleType = "saleType", diff --git a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx index afb105079..8a152bf17 100644 --- a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx +++ b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx @@ -1,9 +1,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; import RadioGroupField from "@saleor/components/RadioGroupField"; @@ -11,6 +8,9 @@ import { RequirementsPicker } from "@saleor/discounts/types"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; +import React from "react"; +import { useIntl } from "react-intl"; + import { FormData } from "../VoucherDetailsPage"; interface VoucherRequirementsProps { diff --git a/src/discounts/components/VoucherSummary/VoucherSummary.tsx b/src/discounts/components/VoucherSummary/VoucherSummary.tsx index df402a531..f476fbe3a 100644 --- a/src/discounts/components/VoucherSummary/VoucherSummary.tsx +++ b/src/discounts/components/VoucherSummary/VoucherSummary.tsx @@ -1,9 +1,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; @@ -13,6 +10,9 @@ import Money from "@saleor/components/Money"; import Percent from "@saleor/components/Percent"; import Skeleton from "@saleor/components/Skeleton"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { DiscountValueTypeEnum } from "../../../types/globalTypes"; import { translateVoucherTypes } from "../../translations"; diff --git a/src/discounts/components/VoucherTypes/VoucherTypes.tsx b/src/discounts/components/VoucherTypes/VoucherTypes.tsx index 871acc1a4..bb181c15f 100644 --- a/src/discounts/components/VoucherTypes/VoucherTypes.tsx +++ b/src/discounts/components/VoucherTypes/VoucherTypes.tsx @@ -1,16 +1,16 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import RadioGroupField from "@saleor/components/RadioGroupField"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; -import { FormData } from "../VoucherDetailsPage"; +import React from "react"; +import { useIntl } from "react-intl"; + import { DiscountValueTypeEnum } from "../../../types/globalTypes"; +import { FormData } from "../VoucherDetailsPage"; interface VoucherTypesProps { data: FormData; diff --git a/src/discounts/components/VoucherValue/VoucherValue.tsx b/src/discounts/components/VoucherValue/VoucherValue.tsx index f34bfa0d3..680b2b228 100644 --- a/src/discounts/components/VoucherValue/VoucherValue.tsx +++ b/src/discounts/components/VoucherValue/VoucherValue.tsx @@ -2,9 +2,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { FormSpacer } from "@saleor/components/FormSpacer"; @@ -14,6 +11,9 @@ import TextFieldWithChoice from "@saleor/components/TextFieldWithChoice"; import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getDiscountErrorMessage from "@saleor/utils/errors/discounts"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { DiscountValueTypeEnum } from "../../../types/globalTypes"; import { translateVoucherTypes } from "../../translations"; import { FormData } from "../VoucherDetailsPage"; diff --git a/src/discounts/fixtures.ts b/src/discounts/fixtures.ts index 5dac9a7d9..9c2f22bfb 100644 --- a/src/discounts/fixtures.ts +++ b/src/discounts/fixtures.ts @@ -1,4 +1,5 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; + import { DiscountValueTypeEnum, SaleType, diff --git a/src/discounts/index.tsx b/src/discounts/index.tsx index 4b3e64591..e2a23db85 100644 --- a/src/discounts/index.tsx +++ b/src/discounts/index.tsx @@ -1,10 +1,10 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { saleDetailsPageTab } from "./components/SaleDetailsPage"; import { voucherDetailsPageTab } from "./components/VoucherDetailsPage"; @@ -12,15 +12,15 @@ import { saleAddPath, saleListPath, SaleListUrlQueryParams, + SaleListUrlSortField, salePath, SaleUrlQueryParams, voucherAddPath, voucherListPath, VoucherListUrlQueryParams, + VoucherListUrlSortField, voucherPath, - VoucherUrlQueryParams, - SaleListUrlSortField, - VoucherListUrlSortField + VoucherUrlQueryParams } from "./urls"; import SaleCreateView from "./views/SaleCreate"; import SaleDetailsViewComponent from "./views/SaleDetails"; diff --git a/src/discounts/queries.ts b/src/discounts/queries.ts index 0d7230c34..0a45954c6 100644 --- a/src/discounts/queries.ts +++ b/src/discounts/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { pageInfoFragment, TypedQuery } from "../queries"; import { SaleDetails, SaleDetailsVariables } from "./types/SaleDetails"; import { SaleList, SaleListVariables } from "./types/SaleList"; diff --git a/src/discounts/urls.ts b/src/discounts/urls.ts index 186e9a722..c3a8f7f41 100644 --- a/src/discounts/urls.ts +++ b/src/discounts/urls.ts @@ -6,10 +6,10 @@ import { BulkAction, Dialog, Filters, + FiltersWithMultipleValues, Pagination, - TabActionDialog, Sort, - FiltersWithMultipleValues + TabActionDialog } from "../types"; import { SaleDetailsPageTab } from "./components/SaleDetailsPage"; import { VoucherDetailsPageTab } from "./components/VoucherDetailsPage"; diff --git a/src/discounts/views/SaleCreate.tsx b/src/discounts/views/SaleCreate.tsx index 3c237ea83..b44ee45cb 100644 --- a/src/discounts/views/SaleCreate.tsx +++ b/src/discounts/views/SaleCreate.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { decimal, joinDateTime, maybe } from "../../misc"; import { DiscountValueTypeEnum, SaleType } from "../../types/globalTypes"; import SaleCreatePage from "../components/SaleCreatePage"; diff --git a/src/discounts/views/SaleDetails.tsx b/src/discounts/views/SaleDetails.tsx index caa386836..5c8d904cc 100644 --- a/src/discounts/views/SaleDetails.tsx +++ b/src/discounts/views/SaleDetails.tsx @@ -1,8 +1,5 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import AssignCategoriesDialog from "@saleor/components/AssignCategoryDialog"; import AssignCollectionDialog from "@saleor/components/AssignCollectionDialog"; @@ -21,6 +18,9 @@ import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { categoryUrl } from "../../categories/urls"; import { collectionUrl } from "../../collections/urls"; import { decimal, joinDateTime, maybe } from "../../misc"; @@ -43,8 +43,8 @@ import { SaleUpdate } from "../types/SaleUpdate"; import { saleListUrl, saleUrl, - SaleUrlQueryParams, - SaleUrlDialog + SaleUrlDialog, + SaleUrlQueryParams } from "../urls"; interface SaleDetailsProps { diff --git a/src/discounts/views/SaleList/SaleList.tsx b/src/discounts/views/SaleList/SaleList.tsx index 2cfb889b4..d1a781efb 100644 --- a/src/discounts/views/SaleList/SaleList.tsx +++ b/src/discounts/views/SaleList/SaleList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -21,30 +18,33 @@ import useShop from "@saleor/hooks/useShop"; import { commonMessages, sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import SaleListPage from "../../components/SaleListPage"; import { TypedSaleBulkDelete } from "../../mutations"; import { useSaleListQuery } from "../../queries"; import { SaleBulkDelete } from "../../types/SaleBulkDelete"; import { saleAddUrl, - SaleListUrlQueryParams, - saleUrl, saleListUrl, - SaleListUrlDialog + SaleListUrlDialog, + SaleListUrlQueryParams, + saleUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/discounts/views/SaleList/filters.test.ts b/src/discounts/views/SaleList/filters.test.ts index f6d7f7743..665ef9c20 100644 --- a/src/discounts/views/SaleList/filters.test.ts +++ b/src/discounts/views/SaleList/filters.test.ts @@ -1,17 +1,17 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { SaleListUrlFilters } from "@saleor/discounts/urls"; import { createFilterStructure } from "@saleor/discounts/components/SaleListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; +import { SaleListUrlFilters } from "@saleor/discounts/urls"; import { date } from "@saleor/fixtures"; +import { + DiscountStatusEnum, + DiscountValueTypeEnum +} from "@saleor/types/globalTypes"; +import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { - DiscountValueTypeEnum, - DiscountStatusEnum -} from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/discounts/views/SaleList/filters.ts b/src/discounts/views/SaleList/filters.ts index d2683e58f..3a1e6c88b 100644 --- a/src/discounts/views/SaleList/filters.ts +++ b/src/discounts/views/SaleList/filters.ts @@ -1,28 +1,29 @@ +import { IFilterElement } from "@saleor/components/Filter"; +import { + SaleFilterKeys, + SaleListFilterOpts +} from "@saleor/discounts/components/SaleListPage"; +import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; import { DiscountStatusEnum, DiscountValueTypeEnum, SaleFilterInput } from "@saleor/types/globalTypes"; -import { maybe, findValueInEnum, joinDateTime } from "@saleor/misc"; -import { IFilterElement } from "@saleor/components/Filter"; -import { - SaleListFilterOpts, - SaleFilterKeys -} from "@saleor/discounts/components/SaleListPage"; + import { createFilterTabUtils, createFilterUtils, dedupeFilter, getGteLteVariables, - getSingleEnumValueQueryParam, getMinMaxQueryParam, - getMultipleEnumValueQueryParam + getMultipleEnumValueQueryParam, + getSingleEnumValueQueryParam } from "../../../utils/filters"; import { SaleListUrlFilters, SaleListUrlFiltersEnum, - SaleListUrlQueryParams, - SaleListUrlFiltersWithMultipleValues + SaleListUrlFiltersWithMultipleValues, + SaleListUrlQueryParams } from "../../urls"; export const SALE_FILTERS_KEY = "saleFilters"; diff --git a/src/discounts/views/VoucherCreate.tsx b/src/discounts/views/VoucherCreate.tsx index 4b5b4bb4e..7a042be8b 100644 --- a/src/discounts/views/VoucherCreate.tsx +++ b/src/discounts/views/VoucherCreate.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { decimal, joinDateTime, maybe } from "../../misc"; import { DiscountValueTypeEnum, diff --git a/src/discounts/views/VoucherDetails.tsx b/src/discounts/views/VoucherDetails.tsx index 61b63e6b5..7e0ca6b81 100644 --- a/src/discounts/views/VoucherDetails.tsx +++ b/src/discounts/views/VoucherDetails.tsx @@ -1,8 +1,5 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import AssignCategoriesDialog from "@saleor/components/AssignCategoryDialog"; import AssignCollectionDialog from "@saleor/components/AssignCollectionDialog"; @@ -21,6 +18,9 @@ import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { categoryUrl } from "../../categories/urls"; import { collectionUrl } from "../../collections/urls"; import { decimal, joinDateTime, maybe } from "../../misc"; @@ -48,8 +48,8 @@ import { VoucherUpdate } from "../types/VoucherUpdate"; import { voucherListUrl, voucherUrl, - VoucherUrlQueryParams, - VoucherUrlDialog + VoucherUrlDialog, + VoucherUrlQueryParams } from "../urls"; interface VoucherDetailsProps { diff --git a/src/discounts/views/VoucherList/VoucherList.tsx b/src/discounts/views/VoucherList/VoucherList.tsx index e17019d3e..1a1b411fb 100644 --- a/src/discounts/views/VoucherList/VoucherList.tsx +++ b/src/discounts/views/VoucherList/VoucherList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -21,10 +18,13 @@ import useShop from "@saleor/hooks/useShop"; import { commonMessages, sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import VoucherListPage from "../../components/VoucherListPage"; import { TypedVoucherBulkDelete } from "../../mutations"; import { useVoucherListQuery } from "../../queries"; @@ -32,19 +32,19 @@ import { VoucherBulkDelete } from "../../types/VoucherBulkDelete"; import { voucherAddUrl, voucherListUrl, + VoucherListUrlDialog, VoucherListUrlQueryParams, - voucherUrl, - VoucherListUrlDialog + voucherUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/discounts/views/VoucherList/filters.test.ts b/src/discounts/views/VoucherList/filters.test.ts index 0000a4e6b..cf7abeaab 100644 --- a/src/discounts/views/VoucherList/filters.test.ts +++ b/src/discounts/views/VoucherList/filters.test.ts @@ -1,17 +1,17 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { VoucherListUrlFilters } from "@saleor/discounts/urls"; import { createFilterStructure } from "@saleor/discounts/components/VoucherListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; +import { VoucherListUrlFilters } from "@saleor/discounts/urls"; import { date } from "@saleor/fixtures"; -import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; -import { config } from "@test/intl"; import { DiscountStatusEnum, VoucherDiscountType } from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { getFilterQueryParams } from "@saleor/utils/filters"; +import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; +import { config } from "@test/intl"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/discounts/views/VoucherList/filters.ts b/src/discounts/views/VoucherList/filters.ts index 691ec9a1e..27570299a 100644 --- a/src/discounts/views/VoucherList/filters.ts +++ b/src/discounts/views/VoucherList/filters.ts @@ -1,27 +1,28 @@ -import { - VoucherFilterInput, - DiscountStatusEnum, - VoucherDiscountType -} from "@saleor/types/globalTypes"; -import { maybe, findValueInEnum, joinDateTime } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; import { - VoucherListFilterOpts, - VoucherFilterKeys + VoucherFilterKeys, + VoucherListFilterOpts } from "@saleor/discounts/components/VoucherListPage"; +import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; +import { + DiscountStatusEnum, + VoucherDiscountType, + VoucherFilterInput +} from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, dedupeFilter, getGteLteVariables, - getMultipleEnumValueQueryParam, - getMinMaxQueryParam + getMinMaxQueryParam, + getMultipleEnumValueQueryParam } from "../../../utils/filters"; import { VoucherListUrlFilters, VoucherListUrlFiltersEnum, - VoucherListUrlQueryParams, - VoucherListUrlFiltersWithMultipleValues + VoucherListUrlFiltersWithMultipleValues, + VoucherListUrlQueryParams } from "../../urls"; export const VOUCHER_FILTERS_KEY = "voucherFilters"; diff --git a/src/fixtures.ts b/src/fixtures.ts index 037506378..5d3b050b3 100644 --- a/src/fixtures.ts +++ b/src/fixtures.ts @@ -1,3 +1,4 @@ +import { User_userPermissions } from "./auth/types/User"; import { ShopInfo_shop_permissions } from "./components/Shop/types/ShopInfo"; import { FetchMoreProps, @@ -9,7 +10,6 @@ import { TabPageProps } from "./types"; import { PermissionEnum } from "./types/globalTypes"; -import { User_userPermissions } from "./auth/types/User"; const pageInfo = { hasNextPage: true, diff --git a/src/home/components/HomeActivityCard/HomeActivityCard.tsx b/src/home/components/HomeActivityCard/HomeActivityCard.tsx index e8f3060a2..4094a8f35 100644 --- a/src/home/components/HomeActivityCard/HomeActivityCard.tsx +++ b/src/home/components/HomeActivityCard/HomeActivityCard.tsx @@ -4,12 +4,12 @@ import ListItem from "@material-ui/core/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { renderCollection } from "../../../misc"; import { Home_activities_edges_node } from "../../types/Home"; import { getActivityMessage } from "./activityMessages"; diff --git a/src/home/components/HomeHeader/HomeHeader.tsx b/src/home/components/HomeHeader/HomeHeader.tsx index df541359b..579f0d63a 100644 --- a/src/home/components/HomeHeader/HomeHeader.tsx +++ b/src/home/components/HomeHeader/HomeHeader.tsx @@ -1,10 +1,9 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import Skeleton from "@saleor/components/Skeleton"; import React from "react"; import { FormattedMessage } from "react-intl"; -import Skeleton from "@saleor/components/Skeleton"; - const useStyles = makeStyles( theme => ({ headerContainer: { diff --git a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx index cdebe2245..ae409a0ee 100644 --- a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx +++ b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx @@ -5,14 +5,13 @@ import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import RequirePermissions from "@saleor/components/RequirePermissions"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import { UserPermissionProps } from "@saleor/types"; import { PermissionEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/home/components/HomePage/HomePage.tsx b/src/home/components/HomePage/HomePage.tsx index f4015a240..072173bcd 100644 --- a/src/home/components/HomePage/HomePage.tsx +++ b/src/home/components/HomePage/HomePage.tsx @@ -1,6 +1,4 @@ import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; - import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; @@ -9,6 +7,8 @@ import RequirePermissions from "@saleor/components/RequirePermissions"; import Skeleton from "@saleor/components/Skeleton"; import { UserPermissionProps } from "@saleor/types"; import { PermissionEnum } from "@saleor/types/globalTypes"; +import React from "react"; + import Orders from "../../../icons/Orders"; import Sales from "../../../icons/Sales"; import { @@ -36,10 +36,10 @@ const useStyles = makeStyles( } }, icon: { - "& path":{ - fill:theme.palette.primary.main, + "& path": { + fill: theme.palette.primary.main } - }, + } }), { name: "HomePage" } ); @@ -91,7 +91,13 @@ const HomePage: React.FC = props => {
} + icon={ + + } > {sales ? ( @@ -101,7 +107,13 @@ const HomePage: React.FC = props => { } + icon={ + + } > {orders === undefined ? ( diff --git a/src/home/components/HomeProductListCard/HomeProductListCard.tsx b/src/home/components/HomeProductListCard/HomeProductListCard.tsx index 0df05d32e..4ebe0e70c 100644 --- a/src/home/components/HomeProductListCard/HomeProductListCard.tsx +++ b/src/home/components/HomeProductListCard/HomeProductListCard.tsx @@ -4,15 +4,15 @@ 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 classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { Home_productTopToday_edges_node } from "../../types/Home"; diff --git a/src/home/components/HomeScreen.tsx b/src/home/components/HomeScreen.tsx index aa9bcbf44..8035d9c14 100644 --- a/src/home/components/HomeScreen.tsx +++ b/src/home/components/HomeScreen.tsx @@ -1,12 +1,11 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface HomeScreenProps { user: { diff --git a/src/home/views/index.tsx b/src/home/views/index.tsx index 81af44182..2c1016991 100644 --- a/src/home/views/index.tsx +++ b/src/home/views/index.tsx @@ -1,7 +1,7 @@ -import React from "react"; - import useNavigator from "@saleor/hooks/useNavigator"; import useUser from "@saleor/hooks/useUser"; +import React from "react"; + import { getUserName, maybe } from "../../misc"; import { orderListUrl } from "../../orders/urls"; import { productListUrl, productVariantEditUrl } from "../../products/urls"; diff --git a/src/hooks/makeMutation.ts b/src/hooks/makeMutation.ts index 0bd2c2eb5..ad32a28a0 100644 --- a/src/hooks/makeMutation.ts +++ b/src/hooks/makeMutation.ts @@ -1,3 +1,7 @@ +import { isJwtError } from "@saleor/auth/errors"; +import { commonMessages } from "@saleor/intl"; +import { getMutationStatus, maybe } from "@saleor/misc"; +import { MutationResultAdditionalProps } from "@saleor/types"; import { ApolloError } from "apollo-client"; import { DocumentNode } from "graphql"; import { @@ -7,10 +11,6 @@ import { } from "react-apollo"; import { useIntl } from "react-intl"; -import { commonMessages } from "@saleor/intl"; -import { maybe, getMutationStatus } from "@saleor/misc"; -import { MutationResultAdditionalProps } from "@saleor/types"; -import { isJwtError } from "@saleor/auth/errors"; import useNotifier from "./useNotifier"; import useUser from "./useUser"; diff --git a/src/hooks/makeQuery.ts b/src/hooks/makeQuery.ts index beddd14df..6871848b1 100644 --- a/src/hooks/makeQuery.ts +++ b/src/hooks/makeQuery.ts @@ -1,12 +1,12 @@ +import { isJwtError } from "@saleor/auth/errors"; +import { commonMessages } from "@saleor/intl"; +import { maybe, RequireAtLeastOne } from "@saleor/misc"; import { ApolloQueryResult } from "apollo-client"; import { DocumentNode } from "graphql"; import { useEffect } from "react"; import { QueryResult, useQuery as useBaseQuery } from "react-apollo"; import { useIntl } from "react-intl"; -import { commonMessages } from "@saleor/intl"; -import { maybe, RequireAtLeastOne } from "@saleor/misc"; -import { isJwtError } from "@saleor/auth/errors"; import useAppState from "./useAppState"; import useNotifier from "./useNotifier"; import useUser from "./useUser"; diff --git a/src/hooks/makeTopLevelSearch.ts b/src/hooks/makeTopLevelSearch.ts index 1b163be8d..26793ddcf 100644 --- a/src/hooks/makeTopLevelSearch.ts +++ b/src/hooks/makeTopLevelSearch.ts @@ -1,6 +1,6 @@ +import { PageInfoFragment } from "@saleor/types/PageInfoFragment"; import { DocumentNode } from "graphql"; -import { PageInfoFragment } from "@saleor/types/PageInfoFragment"; import makeSearch, { SearchVariables, UseSearchHook } from "./makeSearch"; export interface SearchData { diff --git a/src/hooks/useAddressValidation.ts b/src/hooks/useAddressValidation.ts index 8db050f74..c14efc6b7 100644 --- a/src/hooks/useAddressValidation.ts +++ b/src/hooks/useAddressValidation.ts @@ -1,10 +1,9 @@ -import { useState } from "react"; - import { AddressTypeInput } from "@saleor/customers/types"; -import { transformFormToAddress } from "@saleor/misc"; -import { AddressInput, AccountErrorCode } from "@saleor/types/globalTypes"; -import { add, remove } from "@saleor/utils/lists"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { transformFormToAddress } from "@saleor/misc"; +import { AccountErrorCode, AddressInput } from "@saleor/types/globalTypes"; +import { add, remove } from "@saleor/utils/lists"; +import { useState } from "react"; interface UseAddressValidation { errors: AccountErrorFragment[]; diff --git a/src/hooks/useDateLocalize.ts b/src/hooks/useDateLocalize.ts index d183556c2..f7dd06971 100644 --- a/src/hooks/useDateLocalize.ts +++ b/src/hooks/useDateLocalize.ts @@ -1,8 +1,7 @@ +import { LocaleContext } from "@saleor/components/Locale"; import moment from "moment-timezone"; import { useContext } from "react"; -import { LocaleContext } from "@saleor/components/Locale"; - function useDateLocalize(): (date: string) => string { const { locale } = useContext(LocaleContext); diff --git a/src/hooks/useForm.ts b/src/hooks/useForm.ts index 73034800b..752030949 100644 --- a/src/hooks/useForm.ts +++ b/src/hooks/useForm.ts @@ -1,7 +1,7 @@ +import { toggle } from "@saleor/utils/lists"; import isEqual from "lodash-es/isEqual"; import { useState } from "react"; -import { toggle } from "@saleor/utils/lists"; import useStateFromProps from "./useStateFromProps"; export interface ChangeEvent { diff --git a/src/hooks/useFormset.ts b/src/hooks/useFormset.ts index be1143ebe..373be104b 100644 --- a/src/hooks/useFormset.ts +++ b/src/hooks/useFormset.ts @@ -1,4 +1,5 @@ import { removeAtIndex } from "@saleor/utils/lists"; + import useStateFromProps from "./useStateFromProps"; export type FormsetChange = (id: string, value: TValue) => void; diff --git a/src/hooks/useListSettings.ts b/src/hooks/useListSettings.ts index cac29fca9..a8ead57e7 100644 --- a/src/hooks/useListSettings.ts +++ b/src/hooks/useListSettings.ts @@ -1,5 +1,6 @@ -import { useEffect } from "react"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; +import { useEffect } from "react"; + import { AppListViewSettings, defaultListSettings } from "./../config"; import { ListSettings, ListViews } from "./../types"; diff --git a/src/hooks/useLocale.ts b/src/hooks/useLocale.ts index 9114c9d72..f35188b0c 100644 --- a/src/hooks/useLocale.ts +++ b/src/hooks/useLocale.ts @@ -1,6 +1,5 @@ -import { useContext } from "react"; - import { LocaleContext } from "@saleor/components/Locale"; +import { useContext } from "react"; function useLocale() { const localeInfo = useContext(LocaleContext); diff --git a/src/hooks/useMultiAutocomplete.ts b/src/hooks/useMultiAutocomplete.ts index af3a375a2..01ad18a1b 100644 --- a/src/hooks/useMultiAutocomplete.ts +++ b/src/hooks/useMultiAutocomplete.ts @@ -1,5 +1,6 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import { maybe } from "@saleor/misc"; + import useListActions from "./useListActions"; function useMultiAutocomplete(initial: MultiAutocompleteChoiceType[] = []) { diff --git a/src/hooks/useNotifier.ts b/src/hooks/useNotifier.ts index 6f18707e9..af927991f 100644 --- a/src/hooks/useNotifier.ts +++ b/src/hooks/useNotifier.ts @@ -1,6 +1,5 @@ -import { useContext } from "react"; - import { IMessageContext, MessageContext } from "@saleor/components/messages"; +import { useContext } from "react"; export type UseNotifierResult = IMessageContext; function useNotifier(): UseNotifierResult { diff --git a/src/hooks/useSearchQuery.ts b/src/hooks/useSearchQuery.ts index eac204bfc..c12db30df 100644 --- a/src/hooks/useSearchQuery.ts +++ b/src/hooks/useSearchQuery.ts @@ -1,6 +1,5 @@ -import React from "react"; - import { ChangeEvent } from "@saleor/hooks/useForm"; +import React from "react"; export type UseSearchQuery = [string, (event: ChangeEvent) => void, () => void]; function useSearchQuery( diff --git a/src/hooks/useShop.ts b/src/hooks/useShop.ts index bf89283c8..c15c7bf0c 100644 --- a/src/hooks/useShop.ts +++ b/src/hooks/useShop.ts @@ -1,6 +1,5 @@ -import { useContext } from "react"; - import { ShopContext } from "@saleor/components/Shop"; +import { useContext } from "react"; function useShop() { return useContext(ShopContext); diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts index 409b09f3d..e945a468a 100644 --- a/src/hooks/useTheme.ts +++ b/src/hooks/useTheme.ts @@ -1,6 +1,5 @@ -import { useContext } from "react"; - import { ThemeContext } from "@saleor/components/Theme"; +import { useContext } from "react"; function useTheme() { const themeInfo = useContext(ThemeContext); diff --git a/src/icons/ArrowSort.tsx b/src/icons/ArrowSort.tsx index 4455903c0..071b7ade9 100644 --- a/src/icons/ArrowSort.tsx +++ b/src/icons/ArrowSort.tsx @@ -10,7 +10,8 @@ const ArrowSort = createSvgIcon( d="M11.0328 17.1401V4H12.9672V17.1401L14.6322 15.4751L16 16.8429L12 20.8429L8 16.8429L9.36782 15.4751L11.0328 17.1401Z" fill="currentColor" /> - -, "ArrowSort") + , + "ArrowSort" +); export default ArrowSort; diff --git a/src/icons/Attributes.tsx b/src/icons/Attributes.tsx index bf3fb437b..c14386357 100644 --- a/src/icons/Attributes.tsx +++ b/src/icons/Attributes.tsx @@ -9,7 +9,8 @@ const Attributes = createSvgIcon( d="M37.9487 10.4808C37.9487 14.4459 34.7343 17.6603 30.7692 17.6603C26.8041 17.6603 23.5897 14.4459 23.5897 10.4808C23.5897 6.51565 26.8041 3.30128 30.7692 3.30128C34.7343 3.30128 37.9487 6.51565 37.9487 10.4808ZM40 10.4808C40 15.5788 35.8672 19.7115 30.7692 19.7115C25.6712 19.7115 21.5385 15.5788 21.5385 10.4808C21.5385 5.38275 25.6712 1.25 30.7692 1.25C35.8672 1.25 40 5.38275 40 10.4808ZM16.4103 9.45484H2.05128V23.8138H16.4103V9.45484ZM0 7.40356V25.8651H18.4615V7.40356H0ZM24.6154 20.7371L13.9566 39.1987H35.2741L24.6154 20.7371ZM24.6154 24.8397L17.5095 37.1474H31.7212L24.6154 24.8397Z" fill="#06847B" /> - -, "Attributes") + , + "Attributes" +); export default Attributes; diff --git a/src/icons/Ballot.tsx b/src/icons/Ballot.tsx index bb33bdb3c..1862e633b 100644 --- a/src/icons/Ballot.tsx +++ b/src/icons/Ballot.tsx @@ -11,7 +11,8 @@ const Ballot = createSvgIcon( - -, "Ballot") + , + "Ballot" +); export default Ballot; diff --git a/src/icons/BoldIcon.tsx b/src/icons/BoldIcon.tsx index bbc865c18..85724be5a 100644 --- a/src/icons/BoldIcon.tsx +++ b/src/icons/BoldIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const BoldIcon = createSvgIcon( <> - -, "BoldIcon") + , + "BoldIcon" +); export default BoldIcon; diff --git a/src/icons/Bot.tsx b/src/icons/Bot.tsx index 176688f6c..600357d5f 100644 --- a/src/icons/Bot.tsx +++ b/src/icons/Bot.tsx @@ -7,7 +7,8 @@ const Bot = createSvgIcon( clipRule="evenodd" d="M22.1012 3.96887C22.1012 5.12931 21.1604 6.07004 20 6.07004C18.8396 6.07004 17.8988 5.12931 17.8988 3.96887C17.8988 2.80843 18.8396 1.8677 20 1.8677C21.1604 1.8677 22.1012 2.80843 22.1012 3.96887ZM20.856 7.84519C22.6365 7.45378 23.9689 5.86692 23.9689 3.96887C23.9689 1.77692 22.1919 0 20 0C17.8081 0 16.0311 1.77692 16.0311 3.96887C16.0311 5.81119 17.2864 7.36033 18.9883 7.80765V10.1167H5.29183V16.3424H0V28.7938H5.29183V35.0195H34.7082V28.7938H40V16.3424H34.7082V10.1167H20.856V7.84519ZM34.7082 26.9261V18.2101H38.1323V26.9261H34.7082ZM5.29183 18.2101H1.8677V26.9261H5.29183V18.2101ZM12.2986 26.3603H27.7916V33.1517H32.8405V11.9844H7.15953V33.1517H12.2986V26.3603ZM14.1663 33.1517V28.228H25.9239V33.1517H14.1663ZM16.6537 19.6887C16.6537 20.8151 15.7125 21.7899 14.4747 21.7899C13.2369 21.7899 12.2957 20.8151 12.2957 19.6887C12.2957 18.5623 13.2369 17.5875 14.4747 17.5875C15.7125 17.5875 16.6537 18.5623 16.6537 19.6887ZM18.5214 19.6887C18.5214 21.8807 16.7096 23.6576 14.4747 23.6576C12.2398 23.6576 10.428 21.8807 10.428 19.6887C10.428 17.4968 12.2398 15.7198 14.4747 15.7198C16.7096 15.7198 18.5214 17.4968 18.5214 19.6887ZM25.4475 21.7899C26.6079 21.7899 27.5486 20.8492 27.5486 19.6887C27.5486 18.5283 26.6079 17.5875 25.4475 17.5875C24.287 17.5875 23.3463 18.5283 23.3463 19.6887C23.3463 20.8492 24.287 21.7899 25.4475 21.7899ZM25.4475 23.6576C27.6394 23.6576 29.4163 21.8807 29.4163 19.6887C29.4163 17.4968 27.6394 15.7198 25.4475 15.7198C23.2555 15.7198 21.4786 17.4968 21.4786 19.6887C21.4786 21.8807 23.2555 23.6576 25.4475 23.6576Z" fill="#06847B" - /> -, "Bot") + />, + "Bot" +); export default Bot; diff --git a/src/icons/Draggable.tsx b/src/icons/Draggable.tsx index e263aa752..1c05d4ec1 100644 --- a/src/icons/Draggable.tsx +++ b/src/icons/Draggable.tsx @@ -25,7 +25,8 @@ const Draggable = createSvgIcon( - -, "Draggable") + , + "Draggable" +); export default Draggable; diff --git a/src/icons/Folder.tsx b/src/icons/Folder.tsx index 3267c949b..b3bc4e67a 100644 --- a/src/icons/Folder.tsx +++ b/src/icons/Folder.tsx @@ -6,7 +6,8 @@ const Folder = createSvgIcon( - -, "Folder") + , + "Folder" +); export default Folder; diff --git a/src/icons/HeaderOne.tsx b/src/icons/HeaderOne.tsx index 1926b1e22..ade1cc046 100644 --- a/src/icons/HeaderOne.tsx +++ b/src/icons/HeaderOne.tsx @@ -5,7 +5,8 @@ const HeaderOne = createSvgIcon( <> - -, "HeaderOne") + , + "HeaderOne" +); export default HeaderOne; diff --git a/src/icons/HeaderThree.tsx b/src/icons/HeaderThree.tsx index 145256b38..384da7c14 100644 --- a/src/icons/HeaderThree.tsx +++ b/src/icons/HeaderThree.tsx @@ -5,7 +5,8 @@ const HeaderThree = createSvgIcon( <> - -, "HeaderThree") + , + "HeaderThree" +); export default HeaderThree; diff --git a/src/icons/HeaderTwo.tsx b/src/icons/HeaderTwo.tsx index a73ee3ff4..e2bb6f5f4 100644 --- a/src/icons/HeaderTwo.tsx +++ b/src/icons/HeaderTwo.tsx @@ -5,7 +5,8 @@ const HeaderTwo = createSvgIcon( <> - -, "HeaderTwo") + , + "HeaderTwo" +); export default HeaderTwo; diff --git a/src/icons/Home.tsx b/src/icons/Home.tsx index 3a06e35c4..f29b58519 100644 --- a/src/icons/Home.tsx +++ b/src/icons/Home.tsx @@ -6,7 +6,8 @@ const Home = createSvgIcon( - -, "Home") + , + "Home" +); export default Home; diff --git a/src/icons/Image.tsx b/src/icons/Image.tsx index 85256850b..77589b375 100644 --- a/src/icons/Image.tsx +++ b/src/icons/Image.tsx @@ -20,7 +20,8 @@ const Image = createSvgIcon( - -, "Image") + , + "Image" +); export default Image; diff --git a/src/icons/ItalicIcon.tsx b/src/icons/ItalicIcon.tsx index eaf45abdd..a6824e219 100644 --- a/src/icons/ItalicIcon.tsx +++ b/src/icons/ItalicIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const ItalicIcon = createSvgIcon( <> - -, "ItalicIcon") + , + "ItalicIcon" +); export default ItalicIcon; diff --git a/src/icons/LinkIcon.tsx b/src/icons/LinkIcon.tsx index 280970b39..a45434eba 100644 --- a/src/icons/LinkIcon.tsx +++ b/src/icons/LinkIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const LinkIcon = createSvgIcon( <> - -, "LinkIcon") + , + "LinkIcon" +); export default LinkIcon; diff --git a/src/icons/LocalShipping.tsx b/src/icons/LocalShipping.tsx index c6e54804c..958c65c69 100644 --- a/src/icons/LocalShipping.tsx +++ b/src/icons/LocalShipping.tsx @@ -6,7 +6,8 @@ const LocalShipping = createSvgIcon( - -, "LocalShipping") + , + "LocalShipping" +); export default LocalShipping; diff --git a/src/icons/Monetization.tsx b/src/icons/Monetization.tsx index d8a737c43..5e3c48dd7 100644 --- a/src/icons/Monetization.tsx +++ b/src/icons/Monetization.tsx @@ -8,7 +8,8 @@ const Monetization = createSvgIcon( - -, "Monetization") + , + "Monetization" +); export default Monetization; diff --git a/src/icons/Moon.tsx b/src/icons/Moon.tsx index dbfddea6d..9d666f0ea 100644 --- a/src/icons/Moon.tsx +++ b/src/icons/Moon.tsx @@ -18,7 +18,8 @@ const Moon = createSvgIcon( clipRule="evenodd" d="M14.8213 10.155L15.1675 11.2692C15.2561 11.5543 15.3397 11.6951 15.4313 11.7839C15.5225 11.8722 15.6533 11.9399 15.9059 12.0123L16.9053 12.2987L15.9168 12.6207C15.6441 12.7096 15.5037 12.7913 15.4113 12.8848C15.3196 12.9776 15.2461 13.1115 15.1678 13.3662L14.8759 14.316L14.5618 13.3733C14.4791 13.1249 14.4002 12.9911 14.3039 12.8959C14.2052 12.7982 14.0616 12.7146 13.7979 12.6163L12.9004 12.2815L13.8199 12.0128C14.1052 11.9294 14.2479 11.8528 14.3373 11.7645C14.4227 11.6803 14.4923 11.5526 14.554 11.2907L14.8213 10.155ZM14.8759 12.1156C14.8477 12.151 14.8173 12.1849 14.7844 12.2174C14.7381 12.2631 14.6886 12.3042 14.636 12.3416C14.6762 12.3733 14.7147 12.4071 14.7514 12.4434C14.7883 12.4799 14.8224 12.5179 14.8542 12.5576C14.8862 12.5159 14.9208 12.4758 14.9586 12.4376C14.9986 12.3971 15.0409 12.3599 15.0855 12.3253C15.0521 12.2992 15.0197 12.2712 14.9885 12.2409C14.9479 12.2016 14.9106 12.1599 14.8759 12.1156Z" /> - -, "Moon") + , + "Moon" +); export default Moon; diff --git a/src/icons/Navigation.tsx b/src/icons/Navigation.tsx index c128e30d2..ccd745a76 100644 --- a/src/icons/Navigation.tsx +++ b/src/icons/Navigation.tsx @@ -9,7 +9,8 @@ const Navigation = createSvgIcon( d="M35.9075 11.3232C40.8772 19.931 37.928 30.9378 29.3202 35.9075C20.7123 40.8772 9.70553 37.928 4.7358 29.3201C-0.233933 20.7123 2.71533 9.70553 11.3232 4.7358C19.931 -0.233933 30.9378 2.71533 35.9075 11.3232ZM37.6393 10.3233C43.1612 19.8876 39.8842 32.1173 30.32 37.6393C20.7557 43.1612 8.52596 39.8842 3.00404 30.32C-2.51789 20.7557 0.759069 8.52596 10.3233 3.00404C19.8876 -2.51789 32.1173 0.759069 37.6393 10.3233ZM14.9402 14.5709L31.0335 9.60975L26.0724 25.7031L21.7789 21.4096C22.3117 20.6975 22.2544 19.6836 21.6072 19.0364C20.9599 18.3891 19.946 18.3319 19.2339 18.8647L14.9402 14.5709ZM19.0359 21.6077C18.3884 20.9602 18.3314 19.946 18.8646 19.2338L14.571 14.9402L9.6098 31.0335L25.7032 26.0723L21.4097 21.7789C20.6976 22.3122 19.6833 22.2551 19.0359 21.6077ZM18.7012 15.504L28.0085 12.6348L25.1393 21.9421L18.7012 15.504Z" fill="#06847B" /> - -, "Navigation") + , + "Navigation" +); export default Navigation; diff --git a/src/icons/NoPhoto.tsx b/src/icons/NoPhoto.tsx index 33dda5582..95b206819 100644 --- a/src/icons/NoPhoto.tsx +++ b/src/icons/NoPhoto.tsx @@ -4,7 +4,8 @@ import React from "react"; const NoPhoto = createSvgIcon( - -, "NoPhoto") + , + "NoPhoto" +); export default NoPhoto; diff --git a/src/icons/OrderedListIcon.tsx b/src/icons/OrderedListIcon.tsx index 76517b348..c43e0d490 100644 --- a/src/icons/OrderedListIcon.tsx +++ b/src/icons/OrderedListIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const OrderedListIcon = createSvgIcon( <> - -, "OrderedListIcon") + , + "OrderedListIcon" +); export default OrderedListIcon; diff --git a/src/icons/Orders.tsx b/src/icons/Orders.tsx index aca432220..25d00004d 100644 --- a/src/icons/Orders.tsx +++ b/src/icons/Orders.tsx @@ -9,7 +9,8 @@ const Orders = createSvgIcon( d="M43 13H16V51H43V45.5H41V49H18V15H41V33.5H43V13ZM40 43.9142L48.2071 35.7071L46.7928 34.2929L40 41.0858L36.7071 37.7929L35.2928 39.2071L40 43.9142ZM22 19H25V22H22V19ZM36 19H27V22H36V19ZM22 25H25V28H22V25ZM36 25H27V28H36V25ZM22 31H25V34H22V31ZM36 31H27V34H36V31Z" fill="#06847B" /> - -, "Orders") + , + "Orders" +); export default Orders; diff --git a/src/icons/Pages.tsx b/src/icons/Pages.tsx index c4b010527..6a96abd96 100644 --- a/src/icons/Pages.tsx +++ b/src/icons/Pages.tsx @@ -9,7 +9,8 @@ const Pages = createSvgIcon( d="M18.179 1.20349H32.8068L40 8.39671V34.0421H24.6825V32.0528H38.0107V9.2207L37.79 9H32V3.20999L31.9828 3.19278H20.1683V7.15606H18.179V1.20349ZM0 6.16142H14.6278L21.821 13.3546V39H20.8264H0V6.16142ZM14 8.34692V15H19.8317V37.0107H1.98929V8.15071H13.8038L14 8.34692ZM18 19H4V22H18V19ZM4 24H18V27H4V24ZM35 12H25V15H35V12ZM25 17H35V28H25V17ZM18 29H4V32H18V29Z" fill="#06847B" /> - -, "Pages") + , + "Pages" +); export default Pages; diff --git a/src/icons/Plugins.tsx b/src/icons/Plugins.tsx index ef23371dc..7f6b74439 100644 --- a/src/icons/Plugins.tsx +++ b/src/icons/Plugins.tsx @@ -11,7 +11,8 @@ const Plugins = createSvgIcon( fill="#06847B" /> - -, "Plugins") + , + "Plugins" +); export default Plugins; diff --git a/src/icons/ProductTypes.tsx b/src/icons/ProductTypes.tsx index bdeeea8a9..2c924859f 100644 --- a/src/icons/ProductTypes.tsx +++ b/src/icons/ProductTypes.tsx @@ -9,7 +9,8 @@ const ProductTypes = createSvgIcon( d="M0 6.5V33L20 40L40 33V6.5L20 0L0 6.5ZM2.5 8.69935V31.2263L18.75 36.9138V14.3869L2.5 8.69935ZM21.25 14.3869V36.9138L37.5 31.2263V8.69935L21.25 14.3869ZM34.1436 7.22539L20 2.62872L5.8564 7.22539L20 12.1756L34.1436 7.22539Z" fill="#06847B" /> - -, "ProductTypes") + , + "ProductTypes" +); export default ProductTypes; diff --git a/src/icons/QuotationIcon.tsx b/src/icons/QuotationIcon.tsx index b67a5246b..07849cd2f 100644 --- a/src/icons/QuotationIcon.tsx +++ b/src/icons/QuotationIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const QuotationIcon = createSvgIcon( <> - -, "QuotationIcon") + , + "QuotationIcon" +); export default QuotationIcon; diff --git a/src/icons/Sales.tsx b/src/icons/Sales.tsx index f621216c5..f78f0c361 100644 --- a/src/icons/Sales.tsx +++ b/src/icons/Sales.tsx @@ -9,7 +9,8 @@ const Sales = createSvgIcon( d="M40.1974 14H49.7682V22.7732L45.9287 19.2537L35.0969 30.0855L25.1555 28.0973L15.5364 39.6402L14 38.3598L24.3809 25.9027L34.4395 27.9145L44.453 17.901L40.1974 14ZM21.2682 44H17.2682V49H21.2682V44ZM15.2682 42V51H23.2682V42H15.2682ZM26.2682 34H30.2682V49H26.2682V34ZM24.2682 51V32H32.2682V51H24.2682ZM39.2682 37H35.2682V49H39.2682V37ZM33.2682 35V51H41.2682V35H33.2682ZM44.2682 28H48.2682V49H44.2682V28ZM42.2682 51V26H50.2682V51H42.2682Z" fill="#06847B" /> - -, "Sales") + , + "Sales" +); export default Sales; diff --git a/src/icons/ShippingMethods.tsx b/src/icons/ShippingMethods.tsx index e552267a0..62977adb3 100644 --- a/src/icons/ShippingMethods.tsx +++ b/src/icons/ShippingMethods.tsx @@ -9,7 +9,8 @@ const ShippingMethods = createSvgIcon( d="M0 0H29.3333V12.2666H40V32.9751L32.9752 40H7.4667V19.8248L9.15816 18.1333H0V0ZM27.2 3.35694V12.2666H15.0249L11.2915 16H2.13333V3.07966L14.9333 9.73563L27.2 3.35694ZM24.929 2.13333H4.93756L14.9333 7.33111L24.929 2.13333ZM12.2667 18.1333H12.1752L11.1085 19.2H31.5582L36.3582 14.4H15.9085L12.2667 18.0418V18.1333ZM32.5334 21.2418L37.8667 15.9085V32.0915L32.5334 37.4248V21.2418ZM9.60003 21.3333V37.8666H30.4V21.3333H9.60003ZM18.6667 30.9333H26.6667V28.8H18.6667V30.9333ZM18.6667 34.6666H25.0667V32.5333H18.6667V34.6666Z" fill="#06847B" /> - -, "ShippingMethods") + , + "ShippingMethods" +); export default ShippingMethods; diff --git a/src/icons/Shop.tsx b/src/icons/Shop.tsx index 215f80a0f..6429405c0 100644 --- a/src/icons/Shop.tsx +++ b/src/icons/Shop.tsx @@ -8,7 +8,8 @@ const Shop = createSvgIcon( - -, "Shop") + , + "Shop" +); export default Shop; diff --git a/src/icons/SiteSettings.tsx b/src/icons/SiteSettings.tsx index a161305eb..515109666 100644 --- a/src/icons/SiteSettings.tsx +++ b/src/icons/SiteSettings.tsx @@ -9,7 +9,8 @@ const SiteSettings = createSvgIcon( d="M31.8208 5.55248L30.7926 8.35093L31.545 9.18475C33.147 10.9601 34.3637 13.1054 35.0581 15.4817L35.3837 16.596L38.1395 17.0712V23.1349L35.3838 23.6101L35.0582 24.7244C34.4073 26.9518 33.2976 28.9763 31.8417 30.6834L31.1357 31.5111L32.2146 34.4475L26.7281 37.6084L24.9142 35.4411L23.7814 35.7276C22.572 36.0334 21.3058 36.1961 20 36.1961C18.6942 36.1961 17.428 36.0334 16.2186 35.7276L15.0858 35.4411L13.2719 37.6084L7.78535 34.4475L8.86424 31.5111L8.15831 30.6834C6.70243 28.9763 5.59267 26.9518 4.94182 24.7244L4.61622 23.6101L1.86047 23.1349L1.86047 17.0712L4.61625 16.596L4.94186 15.4817C5.63625 13.1054 6.85296 10.9601 8.45495 9.18475L9.20736 8.35093L8.17916 5.55248L13.6657 2.39164L15.5348 4.62486L16.6397 4.37851C17.7208 4.1375 18.8448 4.01018 20 4.01018C21.1552 4.01018 22.2792 4.1375 23.3603 4.37851L24.4652 4.62486L26.3343 2.39164L31.8208 5.55248ZM40 24.702V15.5042L36.8439 14.9599C36.0699 12.311 34.7134 9.91885 32.9263 7.93836L34.1077 4.72285L25.9098 0L23.7651 2.56262C22.5521 2.2922 21.2924 2.14972 20 2.14972C18.7076 2.14972 17.4479 2.2922 16.2349 2.56262L14.0902 0L5.89227 4.72285L7.07371 7.93836C5.28657 9.91885 3.93009 12.311 3.15607 14.9599L0 15.5042V24.702L3.15603 25.2462C3.88152 27.7291 5.11876 29.9864 6.74273 31.8906L5.49846 35.2772L13.6964 40L15.7625 37.5313C17.1197 37.8744 18.539 38.0565 20 38.0565C21.461 38.0565 22.8803 37.8744 24.2375 37.5313L26.3036 40L34.5015 35.2772L33.2573 31.8906C34.8812 29.9864 36.1185 27.7291 36.844 25.2462L40 24.702ZM28.4425 20C28.4425 24.6627 24.6627 28.4425 20 28.4425C15.3373 28.4425 11.5574 24.6627 11.5574 20C11.5574 15.3373 15.3373 11.5574 20 11.5574C24.6627 11.5574 28.4425 15.3373 28.4425 20ZM30.303 20C30.303 25.6902 25.6902 30.303 20 30.303C14.3097 30.303 9.69693 25.6902 9.69693 20C9.69693 14.3097 14.3097 9.69693 20 9.69693C25.6902 9.69693 30.303 14.3097 30.303 20Z" fill="#06847B" /> - -, "SiteSettings") + , + "SiteSettings" +); export default SiteSettings; diff --git a/src/icons/StaffMembers.tsx b/src/icons/StaffMembers.tsx index 6b1aa270e..fdffb5071 100644 --- a/src/icons/StaffMembers.tsx +++ b/src/icons/StaffMembers.tsx @@ -9,7 +9,8 @@ const StaffMembers = createSvgIcon( d="M20 8C20 11.3137 17.3137 14 14 14C10.6863 14 8 11.3137 8 8C8 4.68629 10.6863 2 14 2C17.3137 2 20 4.68629 20 8ZM22 8C22 12.4183 18.4183 16 14 16C9.58172 16 6 12.4183 6 8C6 3.58172 9.58172 0 14 0C18.4183 0 22 3.58172 22 8ZM2.31344 38L4.94331 20H22.0567L23.0395 26.7268L23 27H23.0794L24.6866 38H2.31344ZM25.1006 27L27 40H0L3.21429 18H23.7857L24.0447 19.7729L25.0238 13H31.5H37.9762L40 27H25.1006ZM31.5 13C28.4624 13 26 10.5376 26 7.5C26 4.46243 28.4624 2 31.5 2C34.5376 2 37 4.46243 37 7.5C37 10.5376 34.5376 13 31.5 13ZM31.5 11C33.433 11 35 9.433 35 7.5C35 5.567 33.433 4 31.5 4C29.567 4 28 5.567 28 7.5C28 9.433 29.567 11 31.5 11ZM25.3099 25L26.7555 15H36.2445L37.6901 25H25.3099Z" fill="#06847B" /> - -, "StaffMembers") + , + "StaffMembers" +); export default StaffMembers; diff --git a/src/icons/StoreMall.tsx b/src/icons/StoreMall.tsx index cacfd4df2..dfcc6ce7a 100644 --- a/src/icons/StoreMall.tsx +++ b/src/icons/StoreMall.tsx @@ -6,7 +6,8 @@ const StoreMall = createSvgIcon( - -, "StoreMall") + , + "StoreMall" +); export default StoreMall; diff --git a/src/icons/StrikethroughIcon.tsx b/src/icons/StrikethroughIcon.tsx index ef9a135b8..b409b4c00 100644 --- a/src/icons/StrikethroughIcon.tsx +++ b/src/icons/StrikethroughIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const HeaderOne = createSvgIcon( <> - -, "HeaderOne") + , + "HeaderOne" +); export default HeaderOne; diff --git a/src/icons/Sun.tsx b/src/icons/Sun.tsx index 2a8b15aa9..68f721cd9 100644 --- a/src/icons/Sun.tsx +++ b/src/icons/Sun.tsx @@ -8,7 +8,8 @@ const Sun = createSvgIcon( clipRule="evenodd" d="M12.6363 5V7.54545H11.3636V5H12.6363ZM11.9999 13.9091C13.0543 13.9091 13.909 13.0544 13.909 12C13.909 10.9456 13.0543 10.0909 11.9999 10.0909C10.9456 10.0909 10.0908 10.9456 10.0908 12C10.0908 13.0544 10.9456 13.9091 11.9999 13.9091ZM11.9999 15.1818C13.7572 15.1818 15.1817 13.7573 15.1817 12C15.1817 10.2427 13.7572 8.81818 11.9999 8.81818C10.2427 8.81818 8.8181 10.2427 8.8181 12C8.8181 13.7573 10.2427 15.1818 11.9999 15.1818ZM14.6998 8.40019L15.5997 9.30014L17.3996 7.50023L16.4997 6.60028L14.6998 8.40019ZM12.6363 16.4545V19H11.3636V16.4545H12.6363ZM6.60019 16.4998L7.50015 17.3997L9.30006 15.5998L8.4001 14.6999L6.60019 16.4998ZM14.6999 15.5998L15.5999 14.6998L17.3998 16.4997L16.4998 17.3997L14.6999 15.5998ZM6.60025 7.5002L8.40016 9.3001L9.30012 8.40015L7.50021 6.60024L6.60025 7.5002ZM19 12.6363H16.4545L16.4545 11.3636H19V12.6363ZM5 12.6364L7.54545 12.6364V11.3637H5V12.6364Z" /> - -, "Sun") + , + "Sun" +); export default Sun; diff --git a/src/icons/Taxes.tsx b/src/icons/Taxes.tsx index 08a77e56f..d2d8d69b1 100644 --- a/src/icons/Taxes.tsx +++ b/src/icons/Taxes.tsx @@ -9,7 +9,8 @@ const Taxes = createSvgIcon( d="M2 0H34.6316V21.0526H32.5263V2.10526H4.10526V37.8947H32.5263V35.2632H34.6316V40H2V0ZM8.31579 20H11.4737V23.1579H8.31579V20ZM16.7368 20H13.5789V23.1579H16.7368V20ZM18.8421 20H22V23.1579H18.8421V20ZM27.2632 20H24.1053V23.1579H27.2632V20ZM8.31579 25.2632H11.4737V28.4211H8.31579V25.2632ZM16.7368 25.2632H13.5789V28.4211H16.7368V25.2632ZM18.8421 25.2632H22V28.4211H18.8421V25.2632ZM11.4737 30.5263H8.31579V33.6842H11.4737V30.5263ZM13.5789 30.5263H16.7368V33.6842H13.5789V30.5263ZM22 30.5263H18.8421V33.6842H22V30.5263ZM26.2105 9.47368H10.4211V14.7368H26.2105V9.47368ZM8.31579 7.36842V16.8421H28.3158V7.36842H8.31579ZM37.7895 30.5263H34.6316V33.6842H37.7895V30.5263ZM28.3158 24.2105H31.4737V27.3684H28.3158V24.2105ZM29.0602 34.4285L38.5339 24.9548L37.0452 23.4662L27.5715 32.9398L29.0602 34.4285Z" fill="#06847B" /> - -, "Taxes") + , + "Taxes" +); export default Taxes; diff --git a/src/icons/Truck.tsx b/src/icons/Truck.tsx index fea266be7..5dadea379 100644 --- a/src/icons/Truck.tsx +++ b/src/icons/Truck.tsx @@ -7,7 +7,8 @@ const Truck = createSvgIcon( d="M20 8.1355H17V4.1355H3C1.9 4.1355 1 5.0355 1 6.1355V17.1355H3C3 18.7955 4.34 20.1355 6 20.1355C7.66 20.1355 9 18.7955 9 17.1355H15C15 18.7955 16.34 20.1355 18 20.1355C19.66 20.1355 21 18.7955 21 17.1355H23V12.1355L20 8.1355ZM19.5 9.6355L21.46 12.1355H17V9.6355H19.5ZM6 18.1355C5.45 18.1355 5 17.6855 5 17.1355C5 16.5855 5.45 16.1355 6 16.1355C6.55 16.1355 7 16.5855 7 17.1355C7 17.6855 6.55 18.1355 6 18.1355ZM8.22 15.1355C7.67 14.5255 6.89 14.1355 6 14.1355C5.11 14.1355 4.33 14.5255 3.78 15.1355H3V6.1355H15V15.1355H8.22ZM18 18.1355C17.45 18.1355 17 17.6855 17 17.1355C17 16.5855 17.45 16.1355 18 16.1355C18.55 16.1355 19 16.5855 19 17.1355C19 17.6855 18.55 18.1355 18 18.1355Z" fill="#616161" /> - -, "Truck") + , + "Truck" +); export default Truck; diff --git a/src/icons/UnorderedListIcon.tsx b/src/icons/UnorderedListIcon.tsx index 7d0242632..e53d421bc 100644 --- a/src/icons/UnorderedListIcon.tsx +++ b/src/icons/UnorderedListIcon.tsx @@ -4,7 +4,8 @@ import React from "react"; const UnorderedListIcon = createSvgIcon( <> - -, "UnorderedListIcon") + , + "UnorderedListIcon" +); export default UnorderedListIcon; diff --git a/src/icons/Unstyled.tsx b/src/icons/Unstyled.tsx index 1a8b9bd8d..3c50c4347 100644 --- a/src/icons/Unstyled.tsx +++ b/src/icons/Unstyled.tsx @@ -8,7 +8,8 @@ const Unstyled = createSvgIcon( clipRule="evenodd" d="M17.5028 0H17.5027H15.0886H11.4673V2.41416L15.0886 2.41416V9.65714H5.43187V7.72803L0 10.8641L5.43187 14.0002V12.0713L17.5025 12.0713V12.0708H17.5028V0Z" /> - -, "Unstyled") + , + "Unstyled" +); export default Unstyled; diff --git a/src/icons/Webhooks.tsx b/src/icons/Webhooks.tsx index 9b8387cbf..b8f44ef36 100644 --- a/src/icons/Webhooks.tsx +++ b/src/icons/Webhooks.tsx @@ -9,7 +9,8 @@ const Webhooks = createSvgIcon( d="M10.188 25.403L14.8603 17.9921C11.5958 15.3023 10.5525 10.9218 12.3952 7.03423C14.4554 2.68805 19.4727 0.911694 23.8632 2.67405C28.3581 4.47829 30.6541 10.5097 28.3722 15.6112L26.9311 14.9665C28.8961 10.5736 26.8313 5.56662 23.2751 4.13916C19.6146 2.66981 15.5043 4.16105 13.8218 7.71045C12.2078 11.1154 13.2502 14.9597 16.3677 17.1575L16.9804 17.5895L11.5587 26.1892C11.9146 26.496 12.2246 26.8684 12.469 27.301C13.6059 29.3129 12.8965 31.8654 10.8847 33.0023C8.87279 34.1392 6.32024 33.4298 5.18339 31.4179C4.04653 29.4061 4.75587 26.8535 6.76775 25.7167C7.85287 25.1035 9.09527 25.0274 10.188 25.403ZM23.2649 10.8173C23.2649 12.256 22.0986 13.4222 20.6599 13.4222C19.2213 13.4222 18.055 12.256 18.055 10.8173C18.055 9.37865 19.2213 8.21239 20.6599 8.21239C22.0986 8.21239 23.2649 9.37865 23.2649 10.8173ZM22.1884 14.713C21.7149 14.8989 21.1994 15.001 20.6599 15.001C18.3494 15.001 16.4763 13.1279 16.4763 10.8173C16.4763 8.50674 18.3494 6.63365 20.6599 6.63365C22.9705 6.63365 24.8436 8.50674 24.8436 10.8173C24.8436 12.0191 24.3368 13.1026 23.5253 13.8657L27.6887 21.6091C31.6202 20.096 35.9283 21.3402 38.3955 24.8467C41.154 28.7675 40.2364 33.995 36.5573 36.9426C32.7897 39.9611 26.4344 38.9945 23.1295 34.5103L24.4003 33.5736C27.2448 37.4331 32.5933 38.0955 35.5702 35.7105C38.6356 33.2546 39.3563 28.956 37.1043 25.7552C34.9442 22.6851 31.1037 21.7052 27.6738 23.3323L26.9957 23.6539L22.1884 14.713ZM28.4266 28.5411C27.7395 29.8054 28.2075 31.3873 29.4718 32.0744C30.7362 32.7614 32.3181 32.2935 33.0051 31.0291C33.6922 29.7648 33.2242 28.1829 31.9599 27.4958C30.6955 26.8088 29.1136 27.2768 28.4266 28.5411ZM26.6391 30.7276C26.8998 31.8533 27.6229 32.8664 28.718 33.4615C30.7485 34.5649 33.2889 33.8134 34.3923 31.7829C35.4956 29.7525 34.7441 27.2121 32.7137 26.1087C30.6832 25.0053 28.1428 25.7569 27.0394 27.7873C26.8022 28.2239 26.6507 28.6841 26.5792 29.1486L16.4131 29.1096L16.3716 29.8582C16.1604 33.6666 13.4532 36.5883 9.71044 37.0246C5.80888 37.4794 2.36564 34.7845 1.67123 30.9016C0.99662 27.1295 4.1478 22.7246 8.91444 22.0623L8.69716 20.4986C3.16177 21.2677 -0.735523 26.4118 0.117155 31.1796C0.950033 35.8367 5.11583 39.1496 9.89322 38.5927C14.1665 38.0946 17.3279 34.8879 17.8783 30.694L26.6391 30.7276ZM11.0946 28.0777C10.3866 26.8249 8.7972 26.3832 7.54443 27.0911C6.29165 27.799 5.84995 29.3885 6.55786 30.6413C7.26577 31.894 8.85522 32.3357 10.108 31.6278C11.3608 30.9199 11.8025 29.3305 11.0946 28.0777Z" fill="#06847B" /> - -, "Webhooks") + , + "Webhooks" +); export default Webhooks; diff --git a/src/index.tsx b/src/index.tsx index 2a60c75cb..d38f2e5ad 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,5 @@ +import Navigator from "@saleor/components/Navigator"; +import useAppState from "@saleor/hooks/useAppState"; import { defaultDataIdFromObject, InMemoryCache } from "apollo-cache-inmemory"; import { ApolloClient } from "apollo-client"; import { ApolloLink } from "apollo-link"; @@ -12,15 +14,13 @@ import ErrorBoundary from "react-error-boundary"; import { useIntl } from "react-intl"; import { BrowserRouter, Route, Switch } from "react-router-dom"; -import Navigator from "@saleor/components/Navigator"; -import useAppState from "@saleor/hooks/useAppState"; import AttributeSection from "./attributes"; import { attributeSection } from "./attributes/urls"; import Auth, { getAuthToken, removeAuthToken } from "./auth"; -import { isJwtError } from "./auth/errors"; import AuthProvider from "./auth/AuthProvider"; import LoginLoading from "./auth/components/LoginLoading/LoginLoading"; import SectionRoute from "./auth/components/SectionRoute"; +import { isJwtError } from "./auth/errors"; import { hasPermission } from "./auth/misc"; import CategorySection from "./categories"; import CollectionSection from "./collections"; @@ -43,10 +43,10 @@ import { navigationSection } from "./navigation/urls"; import { NotFound } from "./NotFound"; import OrdersSection from "./orders"; import PageSection from "./pages"; +import PermissionGroupSection from "./permissionGroups"; import PluginsSection from "./plugins"; import ProductSection from "./products"; import ProductTypesSection from "./productTypes"; -import PermissionGroupSection from "./permissionGroups"; import ServiceSection from "./services"; import { serviceSection } from "./services/urls"; import ShippingSection from "./shipping"; @@ -55,9 +55,9 @@ import StaffSection from "./staff"; import TaxesSection from "./taxes"; import TranslationsSection from "./translations"; import { PermissionEnum } from "./types/globalTypes"; -import WebhooksSection from "./webhooks"; -import { warehouseSection } from "./warehouses/urls"; import WarehouseSection from "./warehouses"; +import { warehouseSection } from "./warehouses/urls"; +import WebhooksSection from "./webhooks"; interface ResponseError extends ErrorResponse { networkError?: Error & { diff --git a/src/misc.ts b/src/misc.ts index 4d51f42fa..4d64e317d 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -7,9 +7,9 @@ import { ConfirmButtonTransitionState } from "./components/ConfirmButton/Confirm import { APP_MOUNT_URI } from "./config"; import { AddressType, AddressTypeInput } from "./customers/types"; import { + MutationResultAdditionalProps, PartialMutationProviderOutput, - UserError, - MutationResultAdditionalProps + UserError } from "./types"; import { AddressInput, diff --git a/src/mutations.tsx b/src/mutations.tsx index f685c6cb8..53e81de84 100644 --- a/src/mutations.tsx +++ b/src/mutations.tsx @@ -4,12 +4,12 @@ import React from "react"; import { Mutation, MutationFunction, MutationResult } from "react-apollo"; import { useIntl } from "react-intl"; +import { isJwtError } from "./auth/errors"; import useNotifier from "./hooks/useNotifier"; +import useUser from "./hooks/useUser"; import { commonMessages } from "./intl"; import { getMutationStatus } from "./misc"; import { MutationResultAdditionalProps } from "./types"; -import { isJwtError } from "./auth/errors"; -import useUser from "./hooks/useUser"; export interface TypedMutationInnerProps { children: ( diff --git a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx index 41c0f9f25..d93292c3b 100644 --- a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx +++ b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx @@ -4,9 +4,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -15,6 +12,8 @@ import { buttonMessages } from "@saleor/intl"; import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getMenuErrorMessage from "@saleor/utils/errors/menu"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface MenuCreateDialogFormData { name: string; diff --git a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx index 8979c0cd5..00802f811 100644 --- a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx +++ b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx @@ -1,7 +1,4 @@ import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -11,6 +8,9 @@ import Grid from "@saleor/components/Grid"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { sectionNames } from "@saleor/intl"; import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { MenuDetails_menu } from "../../types/MenuDetails"; import { MenuItemType } from "../MenuItemDialog"; diff --git a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx index 93f31776d..6c2224b46 100644 --- a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx +++ b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx @@ -5,10 +5,6 @@ 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 isUrl from "is-url"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AutocompleteSelectMenu from "@saleor/components/AutocompleteSelectMenu"; import ConfirmButton, { ConfirmButtonTransitionState @@ -18,13 +14,16 @@ import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { buttonMessages, sectionNames } from "@saleor/intl"; +import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { getMenuItemByValue, IMenu } from "@saleor/utils/menu"; -import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; import { getFieldError, getFormErrors } from "@saleor/utils/errors"; import getMenuErrorMessage from "@saleor/utils/errors/menu"; +import { getMenuItemByValue, IMenu } from "@saleor/utils/menu"; +import isUrl from "is-url"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export type MenuItemType = "category" | "collection" | "link" | "page"; export interface MenuItemData { diff --git a/src/navigation/components/MenuItems/MenuItems.tsx b/src/navigation/components/MenuItems/MenuItems.tsx index 554e71173..bbc5916ec 100644 --- a/src/navigation/components/MenuItems/MenuItems.tsx +++ b/src/navigation/components/MenuItems/MenuItems.tsx @@ -7,15 +7,15 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; +import CardTitle from "@saleor/components/CardTitle"; +import Skeleton from "@saleor/components/Skeleton"; +import useTheme from "@saleor/hooks/useTheme"; +import { buttonMessages } from "@saleor/intl"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import SortableTree, { NodeRendererProps, TreeItem } from "react-sortable-tree"; -import CardTitle from "@saleor/components/CardTitle"; -import Skeleton from "@saleor/components/Skeleton"; -import useTheme from "@saleor/hooks/useTheme"; -import { buttonMessages } from "@saleor/intl"; import Draggable from "../../../icons/Draggable"; import { MenuDetails_menu_items } from "../../types/MenuDetails"; import { MenuItemType } from "../MenuItemDialog"; diff --git a/src/navigation/components/MenuList/MenuList.tsx b/src/navigation/components/MenuList/MenuList.tsx index 8223da51c..c2f161e66 100644 --- a/src/navigation/components/MenuList/MenuList.tsx +++ b/src/navigation/components/MenuList/MenuList.tsx @@ -5,20 +5,20 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import IconButtonTableCell from "@saleor/components/IconButtonTableCell"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; -import { ListActions, ListProps, SortPage } from "@saleor/types"; import { MenuListUrlSortField } from "@saleor/navigation/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListActions, ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { MenuList_menus_edges_node } from "../../types/MenuList"; export interface MenuListProps diff --git a/src/navigation/components/MenuListPage/MenuListPage.tsx b/src/navigation/components/MenuListPage/MenuListPage.tsx index 429545c21..457424ca6 100644 --- a/src/navigation/components/MenuListPage/MenuListPage.tsx +++ b/src/navigation/components/MenuListPage/MenuListPage.tsx @@ -1,14 +1,13 @@ import Button from "@material-ui/core/Button"; - -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; -import { ListActions, PageListProps, SortPage } from "@saleor/types"; import { MenuListUrlSortField } from "@saleor/navigation/urls"; +import { ListActions, PageListProps, SortPage } from "@saleor/types"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { MenuList_menus_edges_node } from "../../types/MenuList"; import MenuList from "../MenuList"; diff --git a/src/navigation/components/MenuProperties/MenuProperties.tsx b/src/navigation/components/MenuProperties/MenuProperties.tsx index d798a4cad..4db982832 100644 --- a/src/navigation/components/MenuProperties/MenuProperties.tsx +++ b/src/navigation/components/MenuProperties/MenuProperties.tsx @@ -1,14 +1,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { commonMessages } from "@saleor/intl"; import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getMenuErrorMessage from "@saleor/utils/errors/menu"; +import React from "react"; +import { useIntl } from "react-intl"; + import { MenuDetailsFormData } from "../MenuDetailsPage"; export interface MenuPropertiesProps { diff --git a/src/navigation/index.tsx b/src/navigation/index.tsx index 39d1559bb..5e42c6dd3 100644 --- a/src/navigation/index.tsx +++ b/src/navigation/index.tsx @@ -1,13 +1,13 @@ +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { asSortParams } from "@saleor/utils/sort"; import { menuListPath, - menuPath, MenuListUrlQueryParams, - MenuListUrlSortField + MenuListUrlSortField, + menuPath } from "./urls"; import MenuDetailsComponent from "./views/MenuDetails"; import MenuListComponent from "./views/MenuList"; diff --git a/src/navigation/mutations.ts b/src/navigation/mutations.ts index 5a43533e2..433844ccb 100644 --- a/src/navigation/mutations.ts +++ b/src/navigation/mutations.ts @@ -1,4 +1,5 @@ import gql from "graphql-tag"; + import { TypedMutation } from "../mutations"; import { menuItemFragment, menuItemNestedFragment } from "./queries"; import { diff --git a/src/navigation/queries.ts b/src/navigation/queries.ts index c03b4db48..8528c4dc4 100644 --- a/src/navigation/queries.ts +++ b/src/navigation/queries.ts @@ -1,5 +1,6 @@ -import gql from "graphql-tag"; import makeQuery from "@saleor/hooks/makeQuery"; +import gql from "graphql-tag"; + import { pageInfoFragment, TypedQuery } from "../queries"; import { MenuDetails, MenuDetailsVariables } from "./types/MenuDetails"; import { MenuList, MenuListVariables } from "./types/MenuList"; diff --git a/src/navigation/views/MenuDetails/index.tsx b/src/navigation/views/MenuDetails/index.tsx index 52d3d7ddd..d33d5ddcc 100644 --- a/src/navigation/views/MenuDetails/index.tsx +++ b/src/navigation/views/MenuDetails/index.tsx @@ -1,7 +1,4 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -9,6 +6,9 @@ import useNotifier from "@saleor/hooks/useNotifier"; import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import usePageSearch from "@saleor/searches/usePageSearch"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { categoryUrl } from "../../../categories/urls"; import { collectionUrl } from "../../../collections/urls"; import { maybe } from "../../../misc"; diff --git a/src/navigation/views/MenuDetails/successHandlers.ts b/src/navigation/views/MenuDetails/successHandlers.ts index 1dce13307..d4efcbf79 100644 --- a/src/navigation/views/MenuDetails/successHandlers.ts +++ b/src/navigation/views/MenuDetails/successHandlers.ts @@ -1,6 +1,6 @@ +import { commonMessages } from "@saleor/intl"; import { IntlShape } from "react-intl"; -import { commonMessages } from "@saleor/intl"; import { UseNavigatorResult } from "../../../hooks/useNavigator"; import { UseNotifierResult } from "../../../hooks/useNotifier"; import { MenuDelete } from "../../types/MenuDelete"; diff --git a/src/navigation/views/MenuList/MenuList.tsx b/src/navigation/views/MenuList/MenuList.tsx index 0b303d83d..0adf1108c 100644 --- a/src/navigation/views/MenuList/MenuList.tsx +++ b/src/navigation/views/MenuList/MenuList.tsx @@ -1,8 +1,5 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -15,8 +12,11 @@ import usePaginator, { import { buttonMessages, commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import MenuCreateDialog from "../../components/MenuCreateDialog"; import MenuListPage from "../../components/MenuListPage"; import { diff --git a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx index 22d7e4279..7a1924db6 100644 --- a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx +++ b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx @@ -4,9 +4,6 @@ import DialogActions from "@material-ui/core/DialogActions"; import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AddressEdit from "@saleor/components/AddressEdit"; import ConfirmButton, { ConfirmButtonTransitionState @@ -18,9 +15,11 @@ import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { buttonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; +import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; import { AddressInput } from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( { diff --git a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx index d8d073963..dca9ac17a 100644 --- a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx +++ b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderBulkCancelDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx index 34748e33b..f2d2f8b70 100644 --- a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx +++ b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx @@ -4,17 +4,16 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import FormSpacer from "@saleor/components/FormSpacer"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import FormSpacer from "@saleor/components/FormSpacer"; import getOrderErrorMessage from "@saleor/utils/errors/order"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderCancelDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx b/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx index b2a515ea2..17b0c3cd0 100644 --- a/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx +++ b/src/orders/components/OrderCannotCancelOrderDialog/OrderCannotCancelOrderDialog.tsx @@ -5,11 +5,10 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import makeStyles from "@material-ui/core/styles/makeStyles"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import { buttonMessages } from "@saleor/intl"; import { DialogProps } from "@saleor/types"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index 999170f0c..ddcfe94df 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -3,9 +3,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ExternalLink from "@saleor/components/ExternalLink"; import Form from "@saleor/components/Form"; @@ -20,6 +17,9 @@ import { SearchCustomers_search_edges_node } from "@saleor/searches/types/Search import { FetchMoreProps, UserPermissionProps } from "@saleor/types"; import { PermissionEnum } from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { customerUrl } from "../../../customers/urls"; import { createHref, maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; diff --git a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx index 84e456ec0..f6a96cb52 100644 --- a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx +++ b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx @@ -1,11 +1,10 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface OrderCustomerNoteProps { note: string; diff --git a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx index 18bc44472..41d023559 100644 --- a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx +++ b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx @@ -1,8 +1,5 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; import { CardSpacer } from "@saleor/components/CardSpacer"; @@ -13,6 +10,9 @@ import PageHeader from "@saleor/components/PageHeader"; import Skeleton from "@saleor/components/Skeleton"; import { sectionNames } from "@saleor/intl"; import { UserPermissionProps } from "@saleor/types"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { OrderStatus } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; diff --git a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx index 7e40705e1..0c8737829 100644 --- a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx +++ b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx @@ -1,13 +1,12 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import FormSpacer from "@saleor/components/FormSpacer"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderDraftCancelDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx index 729552ce9..f495c45b5 100644 --- a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx +++ b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx @@ -1,10 +1,10 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; +import CardTitle from "@saleor/components/CardTitle"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; import { maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; import OrderDraftDetailsProducts, { diff --git a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx index c1e2af9de..a007b21d9 100644 --- a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx @@ -7,9 +7,6 @@ import TableRow from "@material-ui/core/TableRow"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import { DebounceForm } from "@saleor/components/DebounceForm"; import Form from "@saleor/components/Form"; import Money from "@saleor/components/Money"; @@ -18,6 +15,9 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { OrderDetails_order_lines } from "../../types/OrderDetails"; @@ -71,9 +71,7 @@ interface OrderDraftDetailsProductsProps { onOrderLineRemove: (id: string) => void; } -const OrderDraftDetailsProducts: React.FC< - OrderDraftDetailsProductsProps -> = props => { +const OrderDraftDetailsProducts: React.FC = props => { const { lines, onOrderLineChange, onOrderLineRemove } = props; const classes = useStyles(props); diff --git a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx index 93d463280..4bfe8e8c3 100644 --- a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx +++ b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx @@ -1,10 +1,10 @@ import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import Link from "@saleor/components/Link"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -27,9 +27,7 @@ interface OrderDraftDetailsSummaryProps { onShippingMethodEdit: () => void; } -const OrderDraftDetailsSummary: React.FC< - OrderDraftDetailsSummaryProps -> = props => { +const OrderDraftDetailsSummary: React.FC = props => { const { order, onShippingMethodEdit } = props; const classes = useStyles(props); diff --git a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx index a46816752..3d65a8d1f 100644 --- a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx +++ b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx @@ -1,13 +1,12 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, IntlShape, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import FormSpacer from "@saleor/components/FormSpacer"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; export enum OrderDraftFinalizeWarning { NO_SHIPPING, diff --git a/src/orders/components/OrderDraftList/OrderDraftList.tsx b/src/orders/components/OrderDraftList/OrderDraftList.tsx index 1b572d3a6..207e9bb89 100644 --- a/src/orders/components/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/components/OrderDraftList/OrderDraftList.tsx @@ -3,14 +3,12 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { @@ -19,10 +17,12 @@ import { transformOrderStatus, transformPaymentStatus } from "@saleor/misc"; -import { ListActions, ListProps, SortPage } from "@saleor/types"; import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListActions, ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList"; const useStyles = makeStyles( diff --git a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx index 83b6ec50d..a884c6830 100644 --- a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx +++ b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx @@ -1,27 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; - +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; +import { + FilterPageProps, + ListActions, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import { sectionNames } from "@saleor/intl"; -import { - ListActions, - PageListProps, - TabPageProps, - SortPage, - FilterPageProps -} from "@saleor/types"; -import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; -import FilterBar from "@saleor/components/FilterBar"; -import OrderDraftList from "../OrderDraftList"; import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList"; +import OrderDraftList from "../OrderDraftList"; import { - OrderDraftListFilterOpts, + createFilterStructure, OrderDraftFilterKeys, - createFilterStructure + OrderDraftListFilterOpts } from "./filters"; export interface OrderDraftListPageProps diff --git a/src/orders/components/OrderDraftListPage/filters.ts b/src/orders/components/OrderDraftListPage/filters.ts index 9824461f8..6dcb557a9 100644 --- a/src/orders/components/OrderDraftListPage/filters.ts +++ b/src/orders/components/OrderDraftListPage/filters.ts @@ -1,8 +1,7 @@ -import { IntlShape, defineMessages } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; import { FilterOpts, MinMax } from "@saleor/types"; import { createDateField, createTextField } from "@saleor/utils/filters/fields"; -import { IFilter } from "@saleor/components/Filter"; +import { defineMessages, IntlShape } from "react-intl"; export enum OrderDraftFilterKeys { created = "created", diff --git a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx index 2a4de7342..7e1c1e058 100644 --- a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx +++ b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx @@ -1,8 +1,5 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -15,6 +12,9 @@ import Skeleton from "@saleor/components/Skeleton"; import { sectionNames } from "@saleor/intl"; import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; import { FetchMoreProps, UserPermissionProps } from "@saleor/types"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { DraftOrderInput } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx index e348b0cdc..5fd129448 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx @@ -1,11 +1,11 @@ +import Decorator from "@saleor/storybook/Decorator"; +import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; -import { warehouseList } from "@saleor/warehouses/fixtures"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; -import OrderFulfillPage, { OrderFulfillPageProps } from "./OrderFulfillPage"; import { orderToFulfill } from "./fixtures"; +import OrderFulfillPage, { OrderFulfillPageProps } from "./OrderFulfillPage"; const props: OrderFulfillPageProps = { disabled: false, diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx index 9ba8d9c15..b2535e5cb 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx @@ -1,41 +1,40 @@ -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/core/CardActions"; +import { makeStyles, Theme } from "@material-ui/core/styles"; 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 classNames from "classnames"; import Typography from "@material-ui/core/Typography"; - -import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; -import { - OrderFulfillStockInput, - OrderErrorCode -} from "@saleor/types/globalTypes"; -import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; -import TableCellAvatar from "@saleor/components/TableCellAvatar"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { CSSProperties } from "@material-ui/styles"; +import AppHeader from "@saleor/components/AppHeader"; +import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Container from "@saleor/components/Container"; +import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Form from "@saleor/components/Form"; +import PageHeader from "@saleor/components/PageHeader"; +import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import Skeleton from "@saleor/components/Skeleton"; +import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; +import { renderCollection } from "@saleor/misc"; +import { FulfillOrder_orderFulfill_errors } from "@saleor/orders/types/FulfillOrder"; import { OrderFulfillData_order, OrderFulfillData_order_lines } from "@saleor/orders/types/OrderFulfillData"; -import CardTitle from "@saleor/components/CardTitle"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { Theme, makeStyles } from "@material-ui/core/styles"; +import { + OrderErrorCode, + OrderFulfillStockInput +} from "@saleor/types/globalTypes"; import { update } from "@saleor/utils/lists"; -import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; -import { renderCollection } from "@saleor/misc"; -import Skeleton from "@saleor/components/Skeleton"; -import AppHeader from "@saleor/components/AppHeader"; -import { FulfillOrder_orderFulfill_errors } from "@saleor/orders/types/FulfillOrder"; -import { CSSProperties } from "@material-ui/styles"; +import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; type ClassKey = | "actionBar" diff --git a/src/orders/components/OrderFulfillPage/fixtures.ts b/src/orders/components/OrderFulfillPage/fixtures.ts index 06ec729c9..cdeae6a24 100644 --- a/src/orders/components/OrderFulfillPage/fixtures.ts +++ b/src/orders/components/OrderFulfillPage/fixtures.ts @@ -1,8 +1,8 @@ /* eslint-disable sort-keys */ +import * as placeholderImage from "@assets/images/sample-product.jpg"; import { OrderFulfillData_order } from "@saleor/orders/types/OrderFulfillData"; import { warehouseList } from "@saleor/warehouses/fixtures"; -import * as placeholderImage from "@assets/images/sample-product.jpg"; export const orderToFulfill: OrderFulfillData_order = { __typename: "Order", diff --git a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx index c52c85845..5fc0a42b1 100644 --- a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx +++ b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx @@ -7,10 +7,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; -import classNames from "classnames"; - import CardMenu from "@saleor/components/CardMenu"; import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; @@ -20,7 +16,11 @@ import StatusLabel from "@saleor/components/StatusLabel"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; -import { maybe, renderCollection, getStringOrPlaceholder } from "../../../misc"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + +import { getStringOrPlaceholder, maybe, renderCollection } from "../../../misc"; import { FulfillmentStatus } from "../../../types/globalTypes"; import { OrderDetails_order_fulfillments } from "../../types/OrderDetails"; diff --git a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx index 653b865b1..23c8a0244 100644 --- a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx +++ b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx @@ -5,20 +5,19 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; +import FormSpacer from "@saleor/components/FormSpacer"; +import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import FormSpacer from "@saleor/components/FormSpacer"; import getOrderErrorMessage from "@saleor/utils/errors/order"; -import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; -import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; +import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderFulfillmentCancelDialogFormData { warehouseId: string; diff --git a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx index 54183723b..93e0e5665 100644 --- a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx +++ b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx @@ -10,9 +10,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -26,8 +23,11 @@ import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getOrderErrorMessage from "@saleor/utils/errors/order"; -import { OrderDetails_order_lines } from "../../types/OrderDetails"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; +import { OrderDetails_order_lines } from "../../types/OrderDetails"; export interface FormData { lines: number[]; diff --git a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx index 41fa5ac54..734c8a205 100644 --- a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx +++ b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx @@ -5,19 +5,18 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; +import FormSpacer from "@saleor/components/FormSpacer"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; -import getOrderErrorMessage from "@saleor/utils/errors/order"; import { getFormErrors } from "@saleor/utils/errors"; -import FormSpacer from "@saleor/components/FormSpacer"; +import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface FormData { trackingNumber: string; diff --git a/src/orders/components/OrderHistory/OrderHistory.tsx b/src/orders/components/OrderHistory/OrderHistory.tsx index 8c1e84fcc..230093d91 100644 --- a/src/orders/components/OrderHistory/OrderHistory.tsx +++ b/src/orders/components/OrderHistory/OrderHistory.tsx @@ -1,8 +1,5 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, IntlShape, useIntl } from "react-intl"; - import Form from "@saleor/components/Form"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; @@ -12,6 +9,9 @@ import { TimelineEvent, TimelineNote } from "@saleor/components/Timeline"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; + import { OrderEventsEmailsEnum, OrderEventsEnum diff --git a/src/orders/components/OrderList/OrderList.tsx b/src/orders/components/OrderList/OrderList.tsx index b119bf771..7a2dca9a6 100644 --- a/src/orders/components/OrderList/OrderList.tsx +++ b/src/orders/components/OrderList/OrderList.tsx @@ -2,16 +2,14 @@ import { makeStyles } from "@material-ui/core/styles"; 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 TableHead from "@material-ui/core/TableHead"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import TableRow from "@material-ui/core/TableRow"; import { DateTime } from "@saleor/components/Date"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, @@ -19,10 +17,12 @@ import { transformOrderStatus, transformPaymentStatus } from "@saleor/misc"; -import { ListProps, SortPage } from "@saleor/types"; import { OrderListUrlSortField } from "@saleor/orders/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { OrderList_orders_edges_node } from "../../types/OrderList"; const useStyles = makeStyles( diff --git a/src/orders/components/OrderListPage/OrderListPage.tsx b/src/orders/components/OrderListPage/OrderListPage.tsx index aaf2e7141..8eb78de0c 100644 --- a/src/orders/components/OrderListPage/OrderListPage.tsx +++ b/src/orders/components/OrderListPage/OrderListPage.tsx @@ -1,21 +1,20 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; - +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { OrderListUrlSortField } from "@saleor/orders/urls"; +import { FilterPageProps, PageListProps, SortPage } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import { sectionNames } from "@saleor/intl"; -import { FilterPageProps, PageListProps, SortPage } from "@saleor/types"; -import { OrderListUrlSortField } from "@saleor/orders/urls"; -import FilterBar from "@saleor/components/FilterBar"; import { OrderList_orders_edges_node } from "../../types/OrderList"; import OrderList from "../OrderList"; import { createFilterStructure, - OrderListFilterOpts, - OrderFilterKeys + OrderFilterKeys, + OrderListFilterOpts } from "./filters"; export interface OrderListPageProps diff --git a/src/orders/components/OrderListPage/filters.ts b/src/orders/components/OrderListPage/filters.ts index 4403b8ae5..98228311e 100644 --- a/src/orders/components/OrderListPage/filters.ts +++ b/src/orders/components/OrderListPage/filters.ts @@ -1,5 +1,6 @@ -import { defineMessages, IntlShape } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; +import { commonMessages } from "@saleor/intl"; +import { orderStatusMessages } from "@saleor/misc"; import { FilterOpts, MinMax } from "@saleor/types"; import { OrderStatusFilter } from "@saleor/types/globalTypes"; import { @@ -7,9 +8,7 @@ import { createOptionsField, createTextField } from "@saleor/utils/filters/fields"; -import { IFilter } from "@saleor/components/Filter"; -import { orderStatusMessages } from "@saleor/misc"; -import { commonMessages } from "@saleor/intl"; +import { defineMessages, IntlShape } from "react-intl"; export enum OrderFilterKeys { created = "created", diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index 6843a58d3..c71686855 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -1,13 +1,12 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; import FormSpacer from "@saleor/components/FormSpacer"; -import getOrderErrorMessage from "@saleor/utils/errors/order"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; +import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderMarkAsPaidDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index 9f6fc639f..2a8368e30 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -3,14 +3,14 @@ import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/core/CardActions"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; import Money, { subtractMoney } from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, transformPaymentStatus } from "../../../misc"; import { OrderAction, OrderStatus } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 91a06a279..72f5b3ccc 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -5,18 +5,17 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; +import FormSpacer from "@saleor/components/FormSpacer"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import getOrderErrorMessage from "@saleor/utils/errors/order"; import { getFormErrors } from "@saleor/utils/errors"; -import FormSpacer from "@saleor/components/FormSpacer"; +import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface FormData { amount: number; diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 3bc64d55e..7bb7dd6e9 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -4,16 +4,15 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import FormSpacer from "@saleor/components/FormSpacer"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import FormSpacer from "@saleor/components/FormSpacer"; import getOrderErrorMessage from "@saleor/utils/errors/order"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface OrderPaymentVoidDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 004bd4b03..831202d3e 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -10,26 +10,26 @@ 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 React from "react"; -import InfiniteScroll from "react-infinite-scroller"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import FormSpacer from "@saleor/components/FormSpacer"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { maybe, renderCollection } from "@saleor/misc"; -import { FetchMoreProps } from "@saleor/types"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; +import { FetchMoreProps } from "@saleor/types"; import getOrderErrorMessage from "@saleor/utils/errors/order"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; -import FormSpacer from "@saleor/components/FormSpacer"; -import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; +import React from "react"; +import InfiniteScroll from "react-infinite-scroller"; +import { FormattedMessage, useIntl } from "react-intl"; + import { SearchOrderVariant_search_edges_node, SearchOrderVariant_search_edges_node_variants diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index 7eb7c9ded..baaad1842 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -5,21 +5,21 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; +import FormSpacer from "@saleor/components/FormSpacer"; import Money from "@saleor/components/Money"; import { SingleSelectField } from "@saleor/components/SingleSelectField"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { getFormErrors } from "@saleor/utils/errors"; import getOrderErrorMessage from "@saleor/utils/errors/order"; -import FormSpacer from "@saleor/components/FormSpacer"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { OrderDetails_order_availableShippingMethods } from "../../types/OrderDetails"; export interface FormData { diff --git a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx index bd8b6ae5d..b00e30df7 100644 --- a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx +++ b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx @@ -6,9 +6,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -17,6 +14,9 @@ import StatusLabel from "@saleor/components/StatusLabel"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { OrderDetails_order_lines } from "../../types/OrderDetails"; diff --git a/src/orders/fixtures.ts b/src/orders/fixtures.ts index 41279fd34..acd3fc9e2 100644 --- a/src/orders/fixtures.ts +++ b/src/orders/fixtures.ts @@ -1,6 +1,7 @@ import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; -import { MessageDescriptor } from "react-intl"; import { warehouseList } from "@saleor/warehouses/fixtures"; +import { MessageDescriptor } from "react-intl"; + import { transformOrderStatus, transformPaymentStatus } from "../misc"; import { FulfillmentStatus, diff --git a/src/orders/index.tsx b/src/orders/index.tsx index c8db1246e..410c0d17b 100644 --- a/src/orders/index.tsx +++ b/src/orders/index.tsx @@ -1,25 +1,25 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { orderDraftListPath, OrderDraftListUrlQueryParams, + OrderDraftListUrlSortField, + orderFulfillPath, orderListPath, OrderListUrlQueryParams, - orderPath, - OrderUrlQueryParams, - OrderDraftListUrlSortField, OrderListUrlSortField, - orderFulfillPath + orderPath, + OrderUrlQueryParams } from "./urls"; import OrderDetailsComponent from "./views/OrderDetails"; -import OrderFulfillComponent from "./views/OrderFulfill"; import OrderDraftListComponent from "./views/OrderDraftList"; +import OrderFulfillComponent from "./views/OrderFulfill"; import OrderListComponent from "./views/OrderList"; const OrderList: React.FC> = ({ location }) => { diff --git a/src/orders/mutations.ts b/src/orders/mutations.ts index d94c3f8ff..4c32064c2 100644 --- a/src/orders/mutations.ts +++ b/src/orders/mutations.ts @@ -1,12 +1,13 @@ +import makeMutation from "@saleor/hooks/makeMutation"; import gql from "graphql-tag"; -import makeMutation from "@saleor/hooks/makeMutation"; import { TypedMutation } from "../mutations"; import { fragmentAddress, fragmentOrderDetails, fragmentOrderEvent } from "./queries"; +import { FulfillOrder, FulfillOrderVariables } from "./types/FulfillOrder"; import { OrderAddNote, OrderAddNoteVariables } from "./types/OrderAddNote"; import { OrderCancel, OrderCancelVariables } from "./types/OrderCancel"; import { OrderCapture, OrderCaptureVariables } from "./types/OrderCapture"; @@ -14,7 +15,6 @@ import { OrderDraftBulkCancel, OrderDraftBulkCancelVariables } from "./types/OrderDraftBulkCancel"; -import { FulfillOrder, FulfillOrderVariables } from "./types/FulfillOrder"; import { OrderDraftCancel, OrderDraftCancelVariables diff --git a/src/orders/queries.ts b/src/orders/queries.ts index c633515e5..99cd550e1 100644 --- a/src/orders/queries.ts +++ b/src/orders/queries.ts @@ -1,22 +1,22 @@ +import makeQuery from "@saleor/hooks/makeQuery"; +import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import gql from "graphql-tag"; -import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import makeQuery from "@saleor/hooks/makeQuery"; import { TypedQuery } from "../queries"; import { OrderDetails, OrderDetailsVariables } from "./types/OrderDetails"; import { OrderDraftList, OrderDraftListVariables } from "./types/OrderDraftList"; +import { + OrderFulfillData, + OrderFulfillDataVariables +} from "./types/OrderFulfillData"; import { OrderList, OrderListVariables } from "./types/OrderList"; import { SearchOrderVariant as SearchOrderVariantType, SearchOrderVariantVariables } from "./types/SearchOrderVariant"; -import { - OrderFulfillData, - OrderFulfillDataVariables -} from "./types/OrderFulfillData"; export const fragmentOrderEvent = gql` fragment OrderEventFragment on OrderEvent { diff --git a/src/orders/urls.ts b/src/orders/urls.ts index d500f7f12..e4935f6f9 100644 --- a/src/orders/urls.ts +++ b/src/orders/urls.ts @@ -9,8 +9,8 @@ import { FiltersWithMultipleValues, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; const orderSectionUrl = "/orders"; diff --git a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx index a2162928f..1c50415b4 100644 --- a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx +++ b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { useIntl } from "react-intl"; + import { OrderAddNote } from "../../types/OrderAddNote"; import { OrderCancel } from "../../types/OrderCancel"; import { OrderCapture } from "../../types/OrderCapture"; diff --git a/src/orders/views/OrderDetails/index.tsx b/src/orders/views/OrderDetails/index.tsx index 50c369b6c..7696086d2 100644 --- a/src/orders/views/OrderDetails/index.tsx +++ b/src/orders/views/OrderDetails/index.tsx @@ -1,23 +1,23 @@ -import { useIntl } from "react-intl"; -import React from "react"; - +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; import useUser from "@saleor/hooks/useUser"; +import OrderCannotCancelOrderDialog from "@saleor/orders/components/OrderCannotCancelOrderDialog"; import useCustomerSearch from "@saleor/searches/useCustomerSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import { useWarehouseList } from "@saleor/warehouses/queries"; -import OrderCannotCancelOrderDialog from "@saleor/orders/components/OrderCannotCancelOrderDialog"; +import React from "react"; +import { useIntl } from "react-intl"; + import { customerUrl } from "../../../customers/urls"; import { + getStringOrPlaceholder, maybe, - transformAddressToForm, - getStringOrPlaceholder + transformAddressToForm } from "../../../misc"; import { productUrl } from "../../../products/urls"; -import { OrderStatus, FulfillmentStatus } from "../../../types/globalTypes"; +import { FulfillmentStatus, OrderStatus } from "../../../types/globalTypes"; import OrderAddressEditDialog from "../../components/OrderAddressEditDialog"; import OrderCancelDialog from "../../components/OrderCancelDialog"; import OrderDetailsPage from "../../components/OrderDetailsPage"; @@ -37,11 +37,11 @@ import OrderOperations from "../../containers/OrderOperations"; import { TypedOrderDetailsQuery, useOrderVariantSearch } from "../../queries"; import { OrderDetails_order } from "../../types/OrderDetails"; import { + orderFulfillUrl, orderListUrl, orderUrl, - OrderUrlQueryParams, OrderUrlDialog, - orderFulfillUrl + OrderUrlQueryParams } from "../../urls"; import { OrderDetailsMessages } from "./OrderDetailsMessages"; diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index 1b184d5b8..454f24b1c 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -16,13 +13,16 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; import { getSortParams } from "@saleor/utils/sort"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import useShop from "@saleor/hooks/useShop"; -import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import OrderDraftListPage from "../../components/OrderDraftListPage"; import { TypedOrderDraftBulkCancelMutation, @@ -33,19 +33,19 @@ import { OrderDraftBulkCancel } from "../../types/OrderDraftBulkCancel"; import { OrderDraftCreate } from "../../types/OrderDraftCreate"; import { orderDraftListUrl, + OrderDraftListUrlDialog, OrderDraftListUrlQueryParams, - orderUrl, - OrderDraftListUrlDialog + orderUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/orders/views/OrderDraftList/filters.test.ts b/src/orders/views/OrderDraftList/filters.test.ts index bc0bd6e4c..3e84f3ab2 100644 --- a/src/orders/views/OrderDraftList/filters.test.ts +++ b/src/orders/views/OrderDraftList/filters.test.ts @@ -1,13 +1,13 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { OrderDraftListUrlFilters } from "@saleor/orders/urls"; -import { createFilterStructure } from "@saleor/orders/components/OrderDraftListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; import { date } from "@saleor/fixtures"; +import { createFilterStructure } from "@saleor/orders/components/OrderDraftListPage"; +import { OrderDraftListUrlFilters } from "@saleor/orders/urls"; +import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/orders/views/OrderDraftList/filters.ts b/src/orders/views/OrderDraftList/filters.ts index a6814a4e0..6f82a85c3 100644 --- a/src/orders/views/OrderDraftList/filters.ts +++ b/src/orders/views/OrderDraftList/filters.ts @@ -1,15 +1,11 @@ -import { OrderDraftFilterInput } from "@saleor/types/globalTypes"; -import { maybe } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; +import { maybe } from "@saleor/misc"; import { OrderDraftFilterKeys, OrderDraftListFilterOpts } from "@saleor/orders/components/OrderDraftListPage"; -import { - OrderDraftListUrlFilters, - OrderDraftListUrlFiltersEnum, - OrderDraftListUrlQueryParams -} from "../../urls"; +import { OrderDraftFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, @@ -17,6 +13,11 @@ import { getMinMaxQueryParam, getSingleValueQueryParam } from "../../../utils/filters"; +import { + OrderDraftListUrlFilters, + OrderDraftListUrlFiltersEnum, + OrderDraftListUrlQueryParams +} from "../../urls"; export const ORDER_DRAFT_FILTERS_KEY = "orderDraftFilters"; diff --git a/src/orders/views/OrderFulfill/OrderFulfill.tsx b/src/orders/views/OrderFulfill/OrderFulfill.tsx index 39dd898d3..ab1090c4d 100644 --- a/src/orders/views/OrderFulfill/OrderFulfill.tsx +++ b/src/orders/views/OrderFulfill/OrderFulfill.tsx @@ -1,14 +1,13 @@ -import { useIntl } from "react-intl"; -import React from "react"; - -import { useOrderFulfillData } from "@saleor/orders/queries"; -import OrderFulfillPage from "@saleor/orders/components/OrderFulfillPage"; +import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; +import useNotifier from "@saleor/hooks/useNotifier"; +import OrderFulfillPage from "@saleor/orders/components/OrderFulfillPage"; +import { useOrderFulfill } from "@saleor/orders/mutations"; +import { useOrderFulfillData } from "@saleor/orders/queries"; import { orderUrl } from "@saleor/orders/urls"; import { useWarehouseList } from "@saleor/warehouses/queries"; -import { WindowTitle } from "@saleor/components/WindowTitle"; -import { useOrderFulfill } from "@saleor/orders/mutations"; -import useNotifier from "@saleor/hooks/useNotifier"; +import React from "react"; +import { useIntl } from "react-intl"; export interface OrderFulfillProps { orderId: string; diff --git a/src/orders/views/OrderList/OrderList.tsx b/src/orders/views/OrderList/OrderList.tsx index d08881d2b..de5942184 100644 --- a/src/orders/views/OrderList/OrderList.tsx +++ b/src/orders/views/OrderList/OrderList.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData @@ -12,31 +9,34 @@ import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; import useShop from "@saleor/hooks/useShop"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; -import { getSortParams } from "@saleor/utils/sort"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { useIntl } from "react-intl"; + import OrderListPage from "../../components/OrderListPage/OrderListPage"; import { useOrderDraftCreateMutation } from "../../mutations"; import { useOrderListQuery } from "../../queries"; import { OrderDraftCreate } from "../../types/OrderDraftCreate"; import { orderListUrl, + OrderListUrlDialog, OrderListUrlQueryParams, - orderUrl, - OrderListUrlDialog + orderUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, - getFilterTabs, getFilterOpts, + getFilterQueryParam, + getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/orders/views/OrderList/filters.test.ts b/src/orders/views/OrderList/filters.test.ts index b737c70b0..ac0d5f386 100644 --- a/src/orders/views/OrderList/filters.test.ts +++ b/src/orders/views/OrderList/filters.test.ts @@ -1,14 +1,14 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { OrderListUrlFilters } from "@saleor/orders/urls"; -import { createFilterStructure } from "@saleor/orders/components/OrderListPage"; -import { getFilterQueryParams } from "@saleor/utils/filters"; import { date } from "@saleor/fixtures"; +import { createFilterStructure } from "@saleor/orders/components/OrderListPage"; +import { OrderListUrlFilters } from "@saleor/orders/urls"; +import { OrderStatusFilter } from "@saleor/types/globalTypes"; +import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { OrderStatusFilter } from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/orders/views/OrderList/filters.ts b/src/orders/views/OrderList/filters.ts index e84423630..f24b39494 100644 --- a/src/orders/views/OrderList/filters.ts +++ b/src/orders/views/OrderList/filters.ts @@ -1,8 +1,9 @@ -import { findInEnum, maybe, findValueInEnum } from "@saleor/misc"; +import { findInEnum, findValueInEnum, maybe } from "@saleor/misc"; import { - OrderListFilterOpts, - OrderFilterKeys + OrderFilterKeys, + OrderListFilterOpts } from "@saleor/orders/components/OrderListPage/filters"; + import { IFilterElement } from "../../../components/Filter"; import { OrderFilterInput, diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 2682e24df..a43e8161b 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -1,12 +1,3 @@ -import { - ContentState, - convertFromRaw, - convertToRaw, - RawDraftContentState -} from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -20,6 +11,15 @@ import VisibilityCard from "@saleor/components/VisibilityCard"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { sectionNames } from "@saleor/intl"; import { PageErrorFragment } from "@saleor/pages/types/PageErrorFragment"; +import { + ContentState, + convertFromRaw, + convertToRaw, + RawDraftContentState +} from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { PageDetails_page } from "../../types/PageDetails"; import PageInfo from "../PageInfo"; diff --git a/src/pages/components/PageInfo/PageInfo.tsx b/src/pages/components/PageInfo/PageInfo.tsx index d6467cb4f..908e65ede 100644 --- a/src/pages/components/PageInfo/PageInfo.tsx +++ b/src/pages/components/PageInfo/PageInfo.tsx @@ -2,16 +2,16 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor from "@saleor/components/RichTextEditor"; import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; import { PageErrorFragment } from "@saleor/pages/types/PageErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; import getPageErrorMessage from "@saleor/utils/errors/page"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { PageDetails_page } from "../../types/PageDetails"; import { FormData } from "../PageDetailsPage"; diff --git a/src/pages/components/PageList/PageList.tsx b/src/pages/components/PageList/PageList.tsx index 2ab9e07da..06a43dae3 100644 --- a/src/pages/components/PageList/PageList.tsx +++ b/src/pages/components/PageList/PageList.tsx @@ -4,20 +4,20 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; -import { ListActions, ListProps, SortPage } from "@saleor/types"; import { PageListUrlSortField } from "@saleor/pages/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListActions, ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { PageList_pages_edges_node } from "../../types/PageList"; export interface PageListProps diff --git a/src/pages/components/PageListPage/PageListPage.tsx b/src/pages/components/PageListPage/PageListPage.tsx index 1d7b49725..aaf488cc7 100644 --- a/src/pages/components/PageListPage/PageListPage.tsx +++ b/src/pages/components/PageListPage/PageListPage.tsx @@ -1,14 +1,13 @@ import Button from "@material-ui/core/Button"; - -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; -import { ListActions, PageListProps, SortPage } from "@saleor/types"; import { PageListUrlSortField } from "@saleor/pages/urls"; +import { ListActions, PageListProps, SortPage } from "@saleor/types"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { PageList_pages_edges_node } from "../../types/PageList"; import PageList from "../PageList"; diff --git a/src/pages/components/PageSlug/PageSlug.tsx b/src/pages/components/PageSlug/PageSlug.tsx index 9cd191c5b..5b4ff55f6 100644 --- a/src/pages/components/PageSlug/PageSlug.tsx +++ b/src/pages/components/PageSlug/PageSlug.tsx @@ -1,14 +1,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import { PageErrorFragment } from "@saleor/pages/types/PageErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; +import getPageErrorMessage from "@saleor/utils/errors/page"; import React from "react"; import { useIntl } from "react-intl"; import slugify from "slugify"; -import CardTitle from "@saleor/components/CardTitle"; -import { getFormErrors } from "@saleor/utils/errors"; -import getPageErrorMessage from "@saleor/utils/errors/page"; -import { PageErrorFragment } from "@saleor/pages/types/PageErrorFragment"; import { FormData } from "../PageDetailsPage"; export interface PageSlugProps { diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9929240cc..cf98c14ae 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,18 +1,18 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { pageCreatePath, pageListPath, PageListUrlQueryParams, + PageListUrlSortField, pagePath, - PageUrlQueryParams, - PageListUrlSortField + PageUrlQueryParams } from "./urls"; import PageCreate from "./views/PageCreate"; import PageDetailsComponent from "./views/PageDetails"; diff --git a/src/pages/queries.ts b/src/pages/queries.ts index 5623f1273..7cd2ae6db 100644 --- a/src/pages/queries.ts +++ b/src/pages/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { TypedQuery } from "../queries"; import { PageDetails, PageDetailsVariables } from "./types/PageDetails"; import { PageList, PageListVariables } from "./types/PageList"; diff --git a/src/pages/views/PageCreate.tsx b/src/pages/views/PageCreate.tsx index d9f95a34f..4046a338f 100644 --- a/src/pages/views/PageCreate.tsx +++ b/src/pages/views/PageCreate.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import React from "react"; +import { useIntl } from "react-intl"; + import PageDetailsPage from "../components/PageDetailsPage"; import { TypedPageCreate } from "../mutations"; import { PageCreate as PageCreateData } from "../types/PageCreate"; diff --git a/src/pages/views/PageDetails.tsx b/src/pages/views/PageDetails.tsx index 1d02ee9e0..59b5020a9 100644 --- a/src/pages/views/PageDetails.tsx +++ b/src/pages/views/PageDetails.tsx @@ -1,13 +1,13 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "../../misc"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + +import { getStringOrPlaceholder, maybe } from "../../misc"; import { PageInput } from "../../types/globalTypes"; import PageDetailsPage, { FormData } from "../components/PageDetailsPage"; import { TypedPageRemove, TypedPageUpdate } from "../mutations"; diff --git a/src/pages/views/PageList/PageList.tsx b/src/pages/views/PageList/PageList.tsx index 9400ef410..f80a4ee23 100644 --- a/src/pages/views/PageList/PageList.tsx +++ b/src/pages/views/PageList/PageList.tsx @@ -2,9 +2,6 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -16,9 +13,12 @@ import usePaginator, { } from "@saleor/hooks/usePaginator"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import PageListPage from "../../components/PageListPage/PageListPage"; import { TypedPageBulkPublish, TypedPageBulkRemove } from "../../mutations"; import { usePageListQuery } from "../../queries"; diff --git a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.stories.tsx b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.stories.tsx index e4959d136..c2011240e 100644 --- a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.stories.tsx +++ b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.stories.tsx @@ -1,10 +1,10 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import AssignMembersDialog, { AssignMembersDialogProps } from "@saleor/permissionGroups/components/AssignMembersDialog"; import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { users } from "../../fixtures"; const props: AssignMembersDialogProps = { diff --git a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx index 834038fb5..61219ff6b 100644 --- a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx +++ b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx @@ -1,32 +1,31 @@ -import { FormattedMessage, useIntl } from "react-intl"; -import InfiniteScroll from "react-infinite-scroller"; -import classNames from "classnames"; - -import ConfirmButton, { - ConfirmButtonTransitionState -} from "@saleor/components/ConfirmButton"; -import { buttonMessages } from "@saleor/intl"; -import { makeStyles } from "@material-ui/core/styles"; -import { getUserName, getUserInitials } from "@saleor/misc"; -import { DialogProps, FetchMoreProps, SearchPageProps } from "@saleor/types"; -import useElementScroll from "@saleor/hooks/useElementScroll"; +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 React from "react"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import { makeStyles } from "@material-ui/core/styles"; 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 useSearchQuery from "@saleor/hooks/useSearchQuery"; -import { SearchStaffMembers_search_edges_node } from "@saleor/searches/types/SearchStaffMembers"; -import { Checkbox, Typography } from "@material-ui/core"; -import Skeleton from "@saleor/components/Skeleton"; import CardSpacer from "@saleor/components/CardSpacer"; +import ConfirmButton, { + ConfirmButtonTransitionState +} from "@saleor/components/ConfirmButton"; +import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import Skeleton from "@saleor/components/Skeleton"; +import useElementScroll from "@saleor/hooks/useElementScroll"; +import useSearchQuery from "@saleor/hooks/useSearchQuery"; +import { buttonMessages } from "@saleor/intl"; +import { getUserInitials, getUserName } from "@saleor/misc"; +import { SearchStaffMembers_search_edges_node } from "@saleor/searches/types/SearchStaffMembers"; +import { DialogProps, FetchMoreProps, SearchPageProps } from "@saleor/types"; +import classNames from "classnames"; +import React from "react"; +import InfiniteScroll from "react-infinite-scroller"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.stories.tsx b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.stories.tsx index 0ae5c543b..b637cfbea 100644 --- a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.stories.tsx +++ b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.stories.tsx @@ -1,6 +1,7 @@ +import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; + import MembersErrorDialog, { MembersErrorDialogProps } from "./MembersErrorDialog"; diff --git a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx index cc685ec90..d92b9bd9c 100644 --- a/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx +++ b/src/permissionGroups/components/MembersErrorDialog/MembersErrorDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface MembersErrorDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.stories.tsx b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.stories.tsx index 613450145..d6b73207a 100644 --- a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.stories.tsx +++ b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.stories.tsx @@ -1,12 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; import { permissions } from "@saleor/fixtures"; - import PermissionGroupCreatePage, { PermissionGroupCreatePageProps } from "@saleor/permissionGroups/components/PermissionGroupCreatePage"; -import Decorator from "@saleor/storybook/Decorator"; import { errorsOfPermissionGroupCreate } from "@saleor/permissionGroups/fixtures"; +import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const props: PermissionGroupCreatePageProps = { disabled: false, diff --git a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx index 27e22d81d..2ebb9bbda 100644 --- a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx +++ b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx @@ -1,19 +1,20 @@ -import React from "react"; -import { useIntl } from "react-intl"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import AccountPermissions from "@saleor/components/AccountPermissions"; +import AppHeader from "@saleor/components/AppHeader"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import AppHeader from "@saleor/components/AppHeader"; import { sectionNames } from "@saleor/intl"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; +import { PermissionEnum } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; -import PermissionGroupInfo from "../PermissionGroupInfo"; +import React from "react"; +import { useIntl } from "react-intl"; + import { PermissionData } from "../PermissionGroupDetailsPage"; +import PermissionGroupInfo from "../PermissionGroupInfo"; export interface PermissionGroupCreatePageFormData { name: string; diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx index ee5bb800d..6a15328c9 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx @@ -1,12 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import PermissionGroupDeleteDialog, { PermissionDeleteDialogProps } from "@saleor/permissionGroups/components/PermissionGroupDeleteDialog"; -import Decorator from "@saleor/storybook/Decorator"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; +import Decorator from "@saleor/storybook/Decorator"; import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const permissionsError: PermissionGroupErrorFragment = { __typename: "PermissionGroupError", diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx index 930951170..20742f30d 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx @@ -1,13 +1,12 @@ +import { Typography } from "@material-ui/core"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { Typography } from "@material-ui/core"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; -import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; +import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface PermissionDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.stories.tsx b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.stories.tsx index 4b78b6a20..0cc1b5c01 100644 --- a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.stories.tsx +++ b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.stories.tsx @@ -1,15 +1,15 @@ -import React from "react"; import { permissions } from "@saleor/fixtures"; import PermissionGroupDetailsPage, { PermissionGroupDetailsPageProps } from "@saleor/permissionGroups/components/PermissionGroupDetailsPage"; -import Decorator from "@saleor/storybook/Decorator"; -import { storiesOf } from "@storybook/react"; import { emptyPermissionGroup, permissionGroup, users } from "@saleor/permissionGroups/fixtures"; +import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const props: PermissionGroupDetailsPageProps = { disabled: false, diff --git a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx index bfeb88002..d941c3a6f 100644 --- a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx +++ b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx @@ -1,32 +1,32 @@ +import AccountPermissions from "@saleor/components/AccountPermissions"; +import AppHeader from "@saleor/components/AppHeader"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Container from "@saleor/components/Container"; +import Form from "@saleor/components/Form"; +import FormSpacer from "@saleor/components/FormSpacer"; +import Grid from "@saleor/components/Grid"; +import PageHeader from "@saleor/components/PageHeader"; +import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; +import { sectionNames } from "@saleor/intl"; +import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; +import { MembersListUrlSortField } from "@saleor/permissionGroups/urls"; +import { + extractPermissionCodes, + isGroupFullAccess +} from "@saleor/permissionGroups/utils"; +import { ListActions, SortPage } from "@saleor/types"; +import { PermissionEnum } from "@saleor/types/globalTypes"; +import { getFormErrors } from "@saleor/utils/errors"; +import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; import React from "react"; import { useIntl } from "react-intl"; -import FormSpacer from "@saleor/components/FormSpacer"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { PermissionEnum } from "@saleor/types/globalTypes"; -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { ListActions, SortPage } from "@saleor/types"; -import AccountPermissions from "@saleor/components/AccountPermissions"; -import AppHeader from "@saleor/components/AppHeader"; -import PageHeader from "@saleor/components/PageHeader"; -import { sectionNames } from "@saleor/intl"; -import Container from "@saleor/components/Container"; -import Form from "@saleor/components/Form"; -import Grid from "@saleor/components/Grid"; -import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { - isGroupFullAccess, - extractPermissionCodes -} from "@saleor/permissionGroups/utils"; -import { MembersListUrlSortField } from "@saleor/permissionGroups/urls"; -import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; -import { getFormErrors } from "@saleor/utils/errors"; -import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; -import PermissionGroupInfo from "../PermissionGroupInfo"; import { PermissionGroupDetails_permissionGroup, PermissionGroupDetails_permissionGroup_users } from "../../types/PermissionGroupDetails"; +import PermissionGroupInfo from "../PermissionGroupInfo"; import PermissionGroupMemberList from "../PermissionGroupMemberList"; export interface PermissionGroupDetailsPageFormData { diff --git a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx index 650d3426f..195d94af5 100644 --- a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx +++ b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; @@ -10,6 +7,8 @@ import { commonMessages } from "@saleor/intl"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; import { getFieldError, getFormErrors } from "@saleor/utils/errors"; import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; +import React from "react"; +import { useIntl } from "react-intl"; export interface PermissionGroupInfoProps { disabled: boolean; diff --git a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx index 694c696a5..91c826af1 100644 --- a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx @@ -1,3 +1,5 @@ +import { TableHead } from "@material-ui/core"; +import IconButton from "@material-ui/core/IconButton"; import { makeStyles } from "@material-ui/core/styles"; import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; @@ -5,22 +7,17 @@ import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; -import IconButton from "@material-ui/core/IconButton"; -import { TableHead } from "@material-ui/core"; - -import React from "react"; -import { FormattedMessage } from "react-intl"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; -import TablePagination from "@saleor/components/TablePagination"; -import { getArrowDirection } from "@saleor/utils/sort"; import TableCellHeader from "@saleor/components/TableCellHeader"; -import { ListProps, SortPage } from "@saleor/types"; +import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; - import { PermissionGroupList_permissionGroups_edges_node } from "@saleor/permissionGroups/types/PermissionGroupList"; import { PermissionGroupListUrlSortField } from "@saleor/permissionGroups/urls"; +import { ListProps, SortPage } from "@saleor/types"; +import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.stories.tsx b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.stories.tsx index ffbbd6738..473b38497 100644 --- a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.stories.tsx +++ b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.stories.tsx @@ -1,17 +1,16 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; import { listActionsProps, pageListProps, sortPageProps } from "@saleor/fixtures"; - import PermissionGroupListPage, { PermissionGroupListPageProps } from "@saleor/permissionGroups/components/PermissionGroupListPage"; -import Decorator from "@saleor/storybook/Decorator"; -import { PermissionGroupListUrlSortField } from "@saleor/permissionGroups/urls"; import { permissionGroups } from "@saleor/permissionGroups/fixtures"; +import { PermissionGroupListUrlSortField } from "@saleor/permissionGroups/urls"; +import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const props: PermissionGroupListPageProps = { permissionGroups, diff --git a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx index 1c646c0fa..e022a7e83 100644 --- a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx +++ b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx @@ -1,15 +1,15 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; -import { PermissionGroupListUrlSortField } from "../../urls"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { PageListProps, SortPage } from "../../../types"; import { PermissionGroupList_permissionGroups_edges_node } from "../../types/PermissionGroupList"; +import { PermissionGroupListUrlSortField } from "../../urls"; import PermissionGroupList from "../PermissionGroupList"; export interface PermissionGroupListPageProps diff --git a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx index cc4dd3651..fc1448a9a 100644 --- a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx +++ b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx @@ -1,32 +1,31 @@ +import { Button, IconButton } from "@material-ui/core"; import Card from "@material-ui/core/Card"; import { makeStyles } from "@material-ui/core/styles"; import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@saleor/components/TableHead"; import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; -import classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; import DeleteIcon from "@material-ui/icons/Delete"; +import CardTitle from "@saleor/components/CardTitle"; +import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; +import TableHead from "@saleor/components/TableHead"; import { getUserInitials, getUserName, - stopPropagation, - renderCollection + renderCollection, + stopPropagation } from "@saleor/misc"; -import { ListActions, SortPage } from "@saleor/types"; -import TableCellHeader from "@saleor/components/TableCellHeader"; -import Checkbox from "@saleor/components/Checkbox"; - -import { Button, IconButton } from "@material-ui/core"; -import CardTitle from "@saleor/components/CardTitle"; +import { sortMembers } from "@saleor/permissionGroups/sort"; import { PermissionGroupDetails_permissionGroup_users } from "@saleor/permissionGroups/types/PermissionGroupDetails"; import { MembersListUrlSortField } from "@saleor/permissionGroups/urls"; +import { ListActions, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; -import { sortMembers } from "@saleor/permissionGroups/sort"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.stories.tsx b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.stories.tsx index 145388d54..8be26fb0f 100644 --- a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.stories.tsx +++ b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; import UnassignMembersDialog, { UnassignMembersDialogProps } from "@saleor/permissionGroups/components/UnassignMembersDialog"; import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const props: UnassignMembersDialogProps = { confirmButtonState: "default", diff --git a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx index d8e63072c..568c77bab 100644 --- a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx +++ b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface UnassignMembersDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/permissionGroups/fixtures.ts b/src/permissionGroups/fixtures.ts index 1fc235bfb..51f5b5ca3 100644 --- a/src/permissionGroups/fixtures.ts +++ b/src/permissionGroups/fixtures.ts @@ -1,15 +1,15 @@ import * as avatarImg from "@assets/images/avatars/avatar1.png"; import { SearchStaffMembers_search_edges_node } from "@saleor/searches/types/SearchStaffMembers"; +import { StaffMemberDetails_user_permissionGroups } from "@saleor/staff/types/StaffMemberDetails"; /* eslint-disable sort-keys */ import { PermissionEnum, PermissionGroupErrorCode } from "@saleor/types/globalTypes"; -import { StaffMemberDetails_user_permissionGroups } from "@saleor/staff/types/StaffMemberDetails"; import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; -import { PermissionGroupList_permissionGroups_edges_node } from "./types/PermissionGroupList"; import { PermissionGroupErrorFragment } from "./types/PermissionGroupErrorFragment"; +import { PermissionGroupList_permissionGroups_edges_node } from "./types/PermissionGroupList"; export const permissionGroups: PermissionGroupList_permissionGroups_edges_node[] = [ { diff --git a/src/permissionGroups/index.tsx b/src/permissionGroups/index.tsx index da2282d04..04f59d772 100644 --- a/src/permissionGroups/index.tsx +++ b/src/permissionGroups/index.tsx @@ -1,23 +1,23 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { - permissionGroupListPath, - permissionGroupDetailsPath, + MembersListUrlSortField, permissionGroupAddPath, - PermissionGroupListUrlQueryParams, - PermissionGroupListUrlSortField, + permissionGroupDetailsPath, PermissionGroupDetailsUrlQueryParams, - MembersListUrlSortField + permissionGroupListPath, + PermissionGroupListUrlQueryParams, + PermissionGroupListUrlSortField } from "./urls"; -import PermissionGroupListComponent from "./views/PermissionGroupList"; -import PermissionGroupDetailsComponent from "./views/PermissionGroupDetails"; import PermissionGroupCreate from "./views/PermissionGroupCreate"; +import PermissionGroupDetailsComponent from "./views/PermissionGroupDetails"; +import PermissionGroupListComponent from "./views/PermissionGroupList"; const permissionGroupList: React.FC> = ({ location diff --git a/src/permissionGroups/mutations.ts b/src/permissionGroups/mutations.ts index 2dca8eb89..0d6ef8ae8 100644 --- a/src/permissionGroups/mutations.ts +++ b/src/permissionGroups/mutations.ts @@ -1,6 +1,5 @@ -import gql from "graphql-tag"; - import makeMutation from "@saleor/hooks/makeMutation"; +import gql from "graphql-tag"; import { permissionGroupDetailsFragment } from "./queries"; import { diff --git a/src/permissionGroups/queries.ts b/src/permissionGroups/queries.ts index 9050a502a..7bafcfd57 100644 --- a/src/permissionGroups/queries.ts +++ b/src/permissionGroups/queries.ts @@ -1,17 +1,16 @@ -import gql from "graphql-tag"; - import makeQuery from "@saleor/hooks/makeQuery"; import { staffMemberFragment } from "@saleor/staff/queries"; +import gql from "graphql-tag"; import { pageInfoFragment } from "../queries"; -import { - PermissionGroupList, - PermissionGroupListVariables -} from "./types/PermissionGroupList"; import { PermissionGroupDetails, PermissionGroupDetailsVariables } from "./types/PermissionGroupDetails"; +import { + PermissionGroupList, + PermissionGroupListVariables +} from "./types/PermissionGroupList"; export const permissionGroupFragment = gql` fragment PermissionGroupFragment on Group { id diff --git a/src/permissionGroups/sort.ts b/src/permissionGroups/sort.ts index 0eca72665..fa3bb3992 100644 --- a/src/permissionGroups/sort.ts +++ b/src/permissionGroups/sort.ts @@ -1,4 +1,5 @@ import { getUserName } from "@saleor/misc"; + import { PermissionGroupDetails_permissionGroup_users } from "./types/PermissionGroupDetails"; import { MembersListUrlSortField } from "./urls"; diff --git a/src/permissionGroups/urls.ts b/src/permissionGroups/urls.ts index 3cf733c96..3f47a04ff 100644 --- a/src/permissionGroups/urls.ts +++ b/src/permissionGroups/urls.ts @@ -1,14 +1,13 @@ -import { stringify as stringifyQs } from "qs"; -import urlJoin from "url-join"; - import { BulkAction, Dialog, Pagination, - TabActionDialog, + SingleAction, Sort, - SingleAction + TabActionDialog } from "@saleor/types"; +import { stringify as stringifyQs } from "qs"; +import urlJoin from "url-join"; const permissionGroupSection = "/permission-groups/"; diff --git a/src/permissionGroups/utils.ts b/src/permissionGroups/utils.ts index 87030b101..50f251ef9 100644 --- a/src/permissionGroups/utils.ts +++ b/src/permissionGroups/utils.ts @@ -1,9 +1,9 @@ +import { User } from "@saleor/auth/types/User"; +import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; import difference from "lodash-es/difference"; -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { User } from "@saleor/auth/types/User"; -import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; import { PermissionGroupDetailsPageFormData } from "./components/PermissionGroupDetailsPage"; +import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; /** * Will return true if group has all permissions available in shop assigned. diff --git a/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx b/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx index 0acda5ed8..28559a1b7 100644 --- a/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx +++ b/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx @@ -1,15 +1,16 @@ -import React from "react"; -import { useIntl } from "react-intl"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import useUser from "@saleor/hooks/useUser"; import { PermissionData } from "@saleor/permissionGroups/components/PermissionGroupDetailsPage"; -import { PermissionGroupCreate } from "../../types/PermissionGroupCreate"; -import { permissionGroupListUrl, permissionGroupDetailsUrl } from "../../urls"; -import { usePermissionGroupCreate } from "../../mutations"; +import React from "react"; +import { useIntl } from "react-intl"; + import PermissionGroupCreatePage from "../../components/PermissionGroupCreatePage"; +import { usePermissionGroupCreate } from "../../mutations"; +import { PermissionGroupCreate } from "../../types/PermissionGroupCreate"; +import { permissionGroupDetailsUrl, permissionGroupListUrl } from "../../urls"; const PermissionGroupCreateView: React.FC = () => { const navigate = useNavigator(); diff --git a/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx b/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx index 71f12c489..ed9761c28 100644 --- a/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx +++ b/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx @@ -1,37 +1,37 @@ -import React, { useState } from "react"; -import useNavigator from "@saleor/hooks/useNavigator"; -import useShop from "@saleor/hooks/useShop"; -import useBulkActions from "@saleor/hooks/useBulkActions"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import { useIntl } from "react-intl"; -import useNotifier from "@saleor/hooks/useNotifier"; -import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import { Button } from "@material-ui/core"; +import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import useBulkActions from "@saleor/hooks/useBulkActions"; +import useNavigator from "@saleor/hooks/useNavigator"; +import useNotifier from "@saleor/hooks/useNotifier"; +import useShop from "@saleor/hooks/useShop"; +import useStateFromProps from "@saleor/hooks/useStateFromProps"; +import useUser from "@saleor/hooks/useUser"; import { commonMessages } from "@saleor/intl"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import MembersErrorDialog from "@saleor/permissionGroups/components/MembersErrorDialog"; import { arePermissionsExceeded, permissionsDiff, usersDiff } from "@saleor/permissionGroups/utils"; -import useStateFromProps from "@saleor/hooks/useStateFromProps"; import useStaffMemberSearch from "@saleor/searches/useStaffMemberSearch"; -import useUser from "@saleor/hooks/useUser"; -import MembersErrorDialog from "@saleor/permissionGroups/components/MembersErrorDialog"; -import PermissionGroupDetailsPage from "../../components/PermissionGroupDetailsPage"; -import AssignMembersDialog from "../../components/AssignMembersDialog"; -import UnassignMembersDialog from "../../components/UnassignMembersDialog"; -import { usePermissionGroupDetailsQuery } from "../../queries"; -import { usePermissionGroupUpdate } from "../../mutations"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React, { useState } from "react"; +import { useIntl } from "react-intl"; +import AssignMembersDialog from "../../components/AssignMembersDialog"; +import PermissionGroupDetailsPage from "../../components/PermissionGroupDetailsPage"; +import UnassignMembersDialog from "../../components/UnassignMembersDialog"; +import { usePermissionGroupUpdate } from "../../mutations"; +import { usePermissionGroupDetailsQuery } from "../../queries"; +import { PermissionGroupUpdate } from "../../types/PermissionGroupUpdate"; import { permissionGroupDetailsUrl, - PermissionGroupDetailsUrlQueryParams, PermissionGroupDetailsUrlDialog, + PermissionGroupDetailsUrlQueryParams, permissionGroupListUrl } from "../../urls"; -import { PermissionGroupUpdate } from "../../types/PermissionGroupUpdate"; interface PermissionGroupDetailsProps { id: string; diff --git a/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx index b6f602f5d..80743313e 100644 --- a/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx @@ -1,31 +1,30 @@ -import React from "react"; -import { useIntl } from "react-intl"; - +import { configurationMenuUrl } from "@saleor/configuration"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; - +import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; -import { configurationMenuUrl } from "@saleor/configuration"; -import useNotifier from "@saleor/hooks/useNotifier"; -import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getStringOrPlaceholder } from "@saleor/misc"; import PermissionGroupDeleteDialog from "@saleor/permissionGroups/components/PermissionGroupDeleteDialog"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import { usePermissionGroupDelete } from "@saleor/permissionGroups/mutations"; import { usePermissionGroupListQuery } from "@saleor/permissionGroups/queries"; import { PermissionGroupDelete } from "@saleor/permissionGroups/types/PermissionGroupDelete"; -import { usePermissionGroupDelete } from "@saleor/permissionGroups/mutations"; -import { getStringOrPlaceholder } from "@saleor/misc"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; +import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { useIntl } from "react-intl"; + import PermissionGroupListPage from "../../components/PermissionGroupListPage"; import { - permissionGroupListUrl, permissionGroupAddUrl, - PermissionGroupListUrlQueryParams, permissionGroupDetailsUrl, - PermissionGroupListUrlDialog + permissionGroupListUrl, + PermissionGroupListUrlDialog, + PermissionGroupListUrlQueryParams } from "../../urls"; import { getSortQueryVariables } from "./sort"; diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index 3cd38de73..a1b9cbdfb 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -3,15 +3,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import makeStyles from "@material-ui/core/styles/makeStyles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import { buttonMessages } from "@saleor/intl"; import { Plugin_plugin_configuration } from "@saleor/plugins/types/Plugin"; import { isSecretField } from "@saleor/plugins/utils"; import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface PluginAuthorizationProps { fields: Plugin_plugin_configuration[]; diff --git a/src/plugins/components/PluginInfo/PluginInfo.tsx b/src/plugins/components/PluginInfo/PluginInfo.tsx index 8a579701b..794d09297 100644 --- a/src/plugins/components/PluginInfo/PluginInfo.tsx +++ b/src/plugins/components/PluginInfo/PluginInfo.tsx @@ -2,14 +2,14 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import makeStyles from "@material-ui/core/styles/makeStyles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { FormData } from "../PluginsDetailsPage"; interface PluginInfoProps { diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx index 16028559b..d1caef19c 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx @@ -1,7 +1,7 @@ +import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; import Decorator from "../../../storybook/Decorator"; import PluginSecretFieldDialog, { PluginSecretFieldDialogProps diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx index 82bea2488..0cfdda1b2 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx @@ -4,9 +4,6 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -17,6 +14,8 @@ import { maybe } from "@saleor/misc"; import { Plugin_plugin_configuration } from "@saleor/plugins/types/Plugin"; import { DialogProps } from "@saleor/types"; import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface PluginSecretFieldDialogFormData { value: string; diff --git a/src/plugins/components/PluginSettings/PluginSettings.tsx b/src/plugins/components/PluginSettings/PluginSettings.tsx index d14aa9f53..015146edd 100644 --- a/src/plugins/components/PluginSettings/PluginSettings.tsx +++ b/src/plugins/components/PluginSettings/PluginSettings.tsx @@ -4,13 +4,13 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import TextField from "@material-ui/core/TextField"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; +import { Plugin_plugin_configuration } from "@saleor/plugins/types/Plugin"; import { UserError } from "@saleor/types"; import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import { getFieldError } from "@saleor/utils/errors"; import React from "react"; import { useIntl } from "react-intl"; -import { Plugin_plugin_configuration } from "@saleor/plugins/types/Plugin"; -import { getFieldError } from "@saleor/utils/errors"; import { FormData } from "../PluginsDetailsPage"; interface PluginSettingsProps { diff --git a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx index 288b85559..0cbbedfc6 100644 --- a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx +++ b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx @@ -1,23 +1,23 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import Typography from "@material-ui/core/Typography"; import AppHeader from "@saleor/components/AppHeader"; +import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; +import Hr from "@saleor/components/Hr"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { ChangeEvent } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; +import { isSecretField } from "@saleor/plugins/utils"; import { UserError } from "@saleor/types"; import { ConfigurationItemInput } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; -import CardSpacer from "@saleor/components/CardSpacer"; -import Hr from "@saleor/components/Hr"; -import { ChangeEvent } from "@saleor/hooks/useForm"; -import { isSecretField } from "@saleor/plugins/utils"; import { Plugin_plugin } from "../../types/Plugin"; import PluginAuthorization from "../PluginAuthorization"; import PluginInfo from "../PluginInfo"; diff --git a/src/plugins/components/PluginsList/PluginsList.tsx b/src/plugins/components/PluginsList/PluginsList.tsx index 568e88910..37528e7c2 100644 --- a/src/plugins/components/PluginsList/PluginsList.tsx +++ b/src/plugins/components/PluginsList/PluginsList.tsx @@ -5,19 +5,19 @@ import TableFooter from "@material-ui/core/TableFooter"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import EditIcon from "@material-ui/icons/Edit"; -import React from "react"; -import { useIntl } from "react-intl"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; import { translateBoolean } from "@saleor/intl"; import { maybe, renderCollection } from "@saleor/misc"; -import { ListProps, SortPage } from "@saleor/types"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import React from "react"; +import { useIntl } from "react-intl"; + import { Plugins_plugins_edges_node } from "../../types/Plugins"; export interface PluginListProps diff --git a/src/plugins/components/PluginsListPage/PluginsListPage.tsx b/src/plugins/components/PluginsListPage/PluginsListPage.tsx index da4ead724..5075cfc64 100644 --- a/src/plugins/components/PluginsListPage/PluginsListPage.tsx +++ b/src/plugins/components/PluginsListPage/PluginsListPage.tsx @@ -1,19 +1,19 @@ -import React from "react"; import Card from "@material-ui/core/Card"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; +import { PluginListUrlSortField } from "@saleor/plugins/urls"; import { + FilterPageProps, PageListProps, SortPage, - FilterPageProps, TabPageProps } from "@saleor/types"; -import { PluginListUrlSortField } from "@saleor/plugins/urls"; -import FilterBar from "@saleor/components/FilterBar"; +import React from "react"; +import { useIntl } from "react-intl"; + import { Plugins_plugins_edges_node } from "../../types/Plugins"; import PluginsList from "../PluginsList/PluginsList"; import { diff --git a/src/plugins/components/PluginsListPage/filters.ts b/src/plugins/components/PluginsListPage/filters.ts index d4d1a384b..0e1ef8ae6 100644 --- a/src/plugins/components/PluginsListPage/filters.ts +++ b/src/plugins/components/PluginsListPage/filters.ts @@ -1,9 +1,8 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { FilterOpts } from "@saleor/types"; import { IFilter } from "@saleor/components/Filter"; -import { createBooleanField } from "@saleor/utils/filters/fields"; import { commonMessages } from "@saleor/intl"; +import { FilterOpts } from "@saleor/types"; +import { createBooleanField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum PluginFilterKeys { active = "active" diff --git a/src/plugins/fixtures.ts b/src/plugins/fixtures.ts index 17fbf19ba..fd0133132 100644 --- a/src/plugins/fixtures.ts +++ b/src/plugins/fixtures.ts @@ -1,4 +1,5 @@ import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; + import { Plugin_plugin } from "./types/Plugin"; import { Plugins_plugins_edges_node } from "./types/Plugins"; diff --git a/src/plugins/index.tsx b/src/plugins/index.tsx index f88721f37..844ec4f1c 100644 --- a/src/plugins/index.tsx +++ b/src/plugins/index.tsx @@ -1,20 +1,20 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { pluginListPath, PluginListUrlQueryParams, + PluginListUrlSortField, pluginPath, - PluginUrlQueryParams, - PluginListUrlSortField + PluginUrlQueryParams } from "./urls"; -import PluginsDetailsComponent from "./views/PluginsDetails"; import PluginsListComponent from "./views/PluginList"; +import PluginsDetailsComponent from "./views/PluginsDetails"; const PluginList: React.FC> = ({ location }) => { const qs = parseQs(location.search.substr(1)); diff --git a/src/plugins/queries.ts b/src/plugins/queries.ts index c3003fa81..903600dba 100644 --- a/src/plugins/queries.ts +++ b/src/plugins/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { TypedQuery } from "../queries"; import { Plugin, PluginVariables } from "./types/Plugin"; import { Plugins, PluginsVariables } from "./types/Plugins"; diff --git a/src/plugins/urls.ts b/src/plugins/urls.ts index c6be657c5..b5bc8e040 100644 --- a/src/plugins/urls.ts +++ b/src/plugins/urls.ts @@ -2,12 +2,12 @@ import { stringify as stringifyQs } from "qs"; import urlJoin from "url-join"; import { + ActiveTab, Dialog, + Filters, Pagination, SingleAction, Sort, - Filters, - ActiveTab, TabActionDialog } from "../types"; diff --git a/src/plugins/utils.ts b/src/plugins/utils.ts index 5d10d2115..9f7a73eaa 100644 --- a/src/plugins/utils.ts +++ b/src/plugins/utils.ts @@ -1,4 +1,5 @@ import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; + import { Plugin_plugin_configuration } from "./types/Plugin"; export function isSecretField( diff --git a/src/plugins/views/PluginList/PluginList.tsx b/src/plugins/views/PluginList/PluginList.tsx index e46efa943..5e824e97d 100644 --- a/src/plugins/views/PluginList/PluginList.tsx +++ b/src/plugins/views/PluginList/PluginList.tsx @@ -1,41 +1,41 @@ +import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; +import SaveFilterTabDialog, { + SaveFilterTabDialogFormData +} from "@saleor/components/SaveFilterTabDialog"; import { configurationMenuUrl } from "@saleor/configuration"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; import React from "react"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; -import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; -import useShop from "@saleor/hooks/useShop"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import SaveFilterTabDialog, { - SaveFilterTabDialogFormData -} from "@saleor/components/SaveFilterTabDialog"; -import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import PluginsListPage from "../../components/PluginsListPage/PluginsListPage"; import { usePluginsListQuery } from "../../queries"; import { - PluginListUrlQueryParams, pluginListUrl, - pluginUrl, - PluginListUrlDialog + PluginListUrlDialog, + PluginListUrlQueryParams, + pluginUrl } from "../../urls"; -import { getSortQueryVariables } from "./sort"; import { - getFilterQueryParam, - getFilterOpts, - getFilterTabs, areFiltersApplied, - saveFilterTab, - getActiveFilters, deleteFilterTab, - getFilterVariables + getActiveFilters, + getFilterOpts, + getFilterQueryParam, + getFilterTabs, + getFilterVariables, + saveFilterTab } from "./filters"; +import { getSortQueryVariables } from "./sort"; interface PluginsListProps { params: PluginListUrlQueryParams; diff --git a/src/plugins/views/PluginList/filters.test.ts b/src/plugins/views/PluginList/filters.test.ts index fe14aa8b5..f6ad46aac 100644 --- a/src/plugins/views/PluginList/filters.test.ts +++ b/src/plugins/views/PluginList/filters.test.ts @@ -1,12 +1,12 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { PluginListUrlFilters } from "@saleor/plugins/urls"; import { createFilterStructure } from "@saleor/plugins/components/PluginsListPage"; +import { PluginListUrlFilters } from "@saleor/plugins/urls"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/plugins/views/PluginList/filters.ts b/src/plugins/views/PluginList/filters.ts index ae33062e3..297652fdd 100644 --- a/src/plugins/views/PluginList/filters.ts +++ b/src/plugins/views/PluginList/filters.ts @@ -1,20 +1,21 @@ -import { PluginFilterInput } from "@saleor/types/globalTypes"; -import { - PluginListFilterOpts, - PluginFilterKeys -} from "@saleor/plugins/components/PluginsListPage"; -import { maybe, parseBoolean } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; +import { maybe, parseBoolean } from "@saleor/misc"; import { - PluginListUrlFilters, - PluginListUrlFiltersEnum, - PluginListUrlQueryParams -} from "../../urls"; + PluginFilterKeys, + PluginListFilterOpts +} from "@saleor/plugins/components/PluginsListPage"; +import { PluginFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, getSingleValueQueryParam } from "../../../utils/filters"; +import { + PluginListUrlFilters, + PluginListUrlFiltersEnum, + PluginListUrlQueryParams +} from "../../urls"; export const PLUGIN_FILTERS_KEY = "pluginFilters"; diff --git a/src/plugins/views/PluginsDetails.tsx b/src/plugins/views/PluginsDetails.tsx index 8dcf88b13..9ef2fb5c8 100644 --- a/src/plugins/views/PluginsDetails.tsx +++ b/src/plugins/views/PluginsDetails.tsx @@ -1,7 +1,4 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -9,6 +6,9 @@ import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { ConfigurationItemInput } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../misc"; import PluginsDetailsPage from "../components/PluginsDetailsPage"; import PluginSecretFieldDialog from "../components/PluginSecretFieldDialog"; @@ -19,8 +19,8 @@ import { PluginUpdate } from "../types/PluginUpdate"; import { pluginListUrl, pluginUrl, - PluginUrlQueryParams, - PluginUrlDialog + PluginUrlDialog, + PluginUrlQueryParams } from "../urls"; import { isSecretField } from "../utils"; diff --git a/src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx b/src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx index 96f392455..4d73b6f2a 100644 --- a/src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx +++ b/src/productTypes/components/AssignAttributeDialog/AssignAttributeDialog.tsx @@ -11,11 +11,6 @@ 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 classNames from "classnames"; -import React from "react"; -import InfiniteScroll from "react-infinite-scroller"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState @@ -30,6 +25,11 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { maybe, renderCollection } from "@saleor/misc"; import { FetchMoreProps } from "@saleor/types"; +import classNames from "classnames"; +import React from "react"; +import InfiniteScroll from "react-infinite-scroller"; +import { FormattedMessage, useIntl } from "react-intl"; + import { SearchAttributes_productType_availableAttributes_edges_node } from "../../hooks/useAvailableAttributeSearch/types/SearchAttributes"; const useStyles = makeStyles( diff --git a/src/productTypes/components/ProductTypeAttributeEditDialog/ProductTypeAttributeEditDialog.tsx b/src/productTypes/components/ProductTypeAttributeEditDialog/ProductTypeAttributeEditDialog.tsx index 6a444d2f8..ab82300e1 100644 --- a/src/productTypes/components/ProductTypeAttributeEditDialog/ProductTypeAttributeEditDialog.tsx +++ b/src/productTypes/components/ProductTypeAttributeEditDialog/ProductTypeAttributeEditDialog.tsx @@ -4,15 +4,14 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Form from "@saleor/components/Form"; import { FormSpacer } from "@saleor/components/FormSpacer"; import ListField from "@saleor/components/ListField"; import { buttonMessages } from "@saleor/intl"; import { UserError } from "@saleor/types"; import { getFieldError } from "@saleor/utils/errors"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface FormData { name: string; diff --git a/src/productTypes/components/ProductTypeAttributeUnassignDialog/ProductTypeAttributeUnassignDialog.tsx b/src/productTypes/components/ProductTypeAttributeUnassignDialog/ProductTypeAttributeUnassignDialog.tsx index 5a1f2e077..98306692a 100644 --- a/src/productTypes/components/ProductTypeAttributeUnassignDialog/ProductTypeAttributeUnassignDialog.tsx +++ b/src/productTypes/components/ProductTypeAttributeUnassignDialog/ProductTypeAttributeUnassignDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ProductTypeAttributeUnassignDialogProps { attributeName: string; @@ -14,9 +13,7 @@ export interface ProductTypeAttributeUnassignDialogProps { onConfirm: () => void; } -const ProductTypeAttributeUnassignDialog: React.FC< - ProductTypeAttributeUnassignDialogProps -> = ({ +const ProductTypeAttributeUnassignDialog: React.FC = ({ attributeName, confirmButtonState, open, diff --git a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx index 4141ad5d9..c44727b83 100644 --- a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx +++ b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx @@ -5,9 +5,6 @@ import { makeStyles } from "@material-ui/core/styles"; import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -20,6 +17,9 @@ import TableHead from "@saleor/components/TableHead"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ListActions, ReorderAction } from "@saleor/types"; import { AttributeTypeEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ProductTypeDetails_productType_productAttributes, ProductTypeDetails_productType_variantAttributes diff --git a/src/productTypes/components/ProductTypeBulkAttributeUnassignDialog/ProductTypeBulkAttributeUnassignDialog.tsx b/src/productTypes/components/ProductTypeBulkAttributeUnassignDialog/ProductTypeBulkAttributeUnassignDialog.tsx index 234ce3ddb..965901488 100644 --- a/src/productTypes/components/ProductTypeBulkAttributeUnassignDialog/ProductTypeBulkAttributeUnassignDialog.tsx +++ b/src/productTypes/components/ProductTypeBulkAttributeUnassignDialog/ProductTypeBulkAttributeUnassignDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ProductTypeBulkAttributeUnassignDialogProps { attributeQuantity: number; diff --git a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx index 6616baebd..419e7d9e8 100644 --- a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx +++ b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -15,6 +12,9 @@ import { sectionNames } from "@saleor/intl"; import { ProductTypeDetails_taxTypes } from "@saleor/productTypes/types/ProductTypeDetails"; import { UserError } from "@saleor/types"; import { WeightUnitsEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { useIntl } from "react-intl"; + import ProductTypeDetails from "../ProductTypeDetails/ProductTypeDetails"; import ProductTypeShipping from "../ProductTypeShipping/ProductTypeShipping"; import ProductTypeTaxes from "../ProductTypeTaxes/ProductTypeTaxes"; diff --git a/src/productTypes/components/ProductTypeDeleteDialog/ProductTypeDeleteDialog.tsx b/src/productTypes/components/ProductTypeDeleteDialog/ProductTypeDeleteDialog.tsx index fa64b7e1f..482f3ba98 100644 --- a/src/productTypes/components/ProductTypeDeleteDialog/ProductTypeDeleteDialog.tsx +++ b/src/productTypes/components/ProductTypeDeleteDialog/ProductTypeDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ProductTypeDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx index 758fd36e6..abfde6ba6 100644 --- a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx +++ b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx @@ -2,13 +2,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { commonMessages } from "@saleor/intl"; import { UserError } from "@saleor/types"; import { getFieldError } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; const useStyles = makeStyles( { diff --git a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx index d46382479..36d64cbf3 100644 --- a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx +++ b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -16,6 +13,9 @@ import { sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ListActions, ReorderEvent, UserError } from "@saleor/types"; import { AttributeTypeEnum, WeightUnitsEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { useIntl } from "react-intl"; + import { ProductTypeDetails_productType, ProductTypeDetails_taxTypes diff --git a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx index ef748da3f..17023f45c 100644 --- a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx @@ -4,17 +4,17 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; import { getArrowDirection } from "@saleor/utils/sort"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps, SortPage } from "../../../types"; import { ProductTypeList_productTypes_edges_node } from "../../types/ProductTypeList"; diff --git a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx index 647ae7ada..dc1e2482b 100644 --- a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx +++ b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx @@ -1,20 +1,20 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import AppHeader from "@saleor/components/AppHeader"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import AppHeader from "@saleor/components/AppHeader"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; import { + FilterPageProps, ListActions, PageListProps, - FilterPageProps, - TabPageProps, - SortPage + SortPage, + TabPageProps } from "../../../types"; import { ProductTypeList_productTypes_edges_node } from "../../types/ProductTypeList"; import ProductTypeList from "../ProductTypeList"; diff --git a/src/productTypes/components/ProductTypeListPage/filters.ts b/src/productTypes/components/ProductTypeListPage/filters.ts index c6664e09c..0ec157d8b 100644 --- a/src/productTypes/components/ProductTypeListPage/filters.ts +++ b/src/productTypes/components/ProductTypeListPage/filters.ts @@ -1,13 +1,12 @@ -import { defineMessages, IntlShape } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; +import { commonMessages } from "@saleor/intl"; import { FilterOpts } from "@saleor/types"; import { ProductTypeConfigurable, ProductTypeEnum } from "@saleor/types/globalTypes"; -import { IFilter } from "@saleor/components/Filter"; -import { commonMessages } from "@saleor/intl"; import { createOptionsField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum ProductTypeFilterKeys { configurable = "configurable", diff --git a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx index afb146aca..fab8f1721 100644 --- a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx +++ b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx @@ -1,11 +1,11 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; +import CardTitle from "@saleor/components/CardTitle"; +import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import React from "react"; import { useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import { WeightUnitsEnum } from "../../../types/globalTypes"; interface ProductTypeShippingProps { diff --git a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx index b1f972978..7a355520e 100644 --- a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx +++ b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx @@ -1,12 +1,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import { ProductTypeDetails_taxTypes } from "@saleor/productTypes/types/ProductTypeDetails"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { ProductTypeForm } from "../ProductTypeDetailsPage/ProductTypeDetailsPage"; diff --git a/src/productTypes/containers/ProductTypeOperations.tsx b/src/productTypes/containers/ProductTypeOperations.tsx index 6fdc327d3..085073df2 100644 --- a/src/productTypes/containers/ProductTypeOperations.tsx +++ b/src/productTypes/containers/ProductTypeOperations.tsx @@ -1,7 +1,7 @@ +import { AttributeTypeEnum, ReorderInput } from "@saleor/types/globalTypes"; import React from "react"; import { MutationFunction } from "react-apollo"; -import { AttributeTypeEnum, ReorderInput } from "@saleor/types/globalTypes"; import { getMutationProviderData } from "../../misc"; import { PartialMutationProviderOutput } from "../../types"; import { diff --git a/src/productTypes/fixtures.ts b/src/productTypes/fixtures.ts index ffd35d801..126fcdb47 100644 --- a/src/productTypes/fixtures.ts +++ b/src/productTypes/fixtures.ts @@ -2,6 +2,7 @@ import { SearchProductTypes_search_edges_node, SearchProductTypes_search_edges_node_productAttributes } from "@saleor/searches/types/SearchProductTypes"; + import { AttributeInputTypeEnum } from "../types/globalTypes"; import { ProductTypeDetails_productType } from "./types/ProductTypeDetails"; import { ProductTypeList_productTypes_edges_node } from "./types/ProductTypeList"; @@ -468,9 +469,8 @@ export const attributes: SearchProductTypes_search_edges_node_productAttributes[ } ].map(edge => edge.node); -export const productTypes: Array< - SearchProductTypes_search_edges_node & ProductTypeList_productTypes_edges_node -> = [ +export const productTypes: Array = [ { __typename: "ProductType" as "ProductType", hasVariants: true, diff --git a/src/productTypes/hooks/useAvailableAttributeSearch/index.tsx b/src/productTypes/hooks/useAvailableAttributeSearch/index.tsx index 6a3d7037d..cf15ab33a 100644 --- a/src/productTypes/hooks/useAvailableAttributeSearch/index.tsx +++ b/src/productTypes/hooks/useAvailableAttributeSearch/index.tsx @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeSearch from "@saleor/hooks/makeSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchAttributes, SearchAttributesVariables diff --git a/src/productTypes/index.tsx b/src/productTypes/index.tsx index d97a8be5c..7c3cc533d 100644 --- a/src/productTypes/index.tsx +++ b/src/productTypes/index.tsx @@ -1,18 +1,18 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { productTypeAddPath, productTypeListPath, ProductTypeListUrlQueryParams, + ProductTypeListUrlSortField, productTypePath, - ProductTypeUrlQueryParams, - ProductTypeListUrlSortField + ProductTypeUrlQueryParams } from "./urls"; import ProductTypeCreate from "./views/ProductTypeCreate"; import ProductTypeListComponent from "./views/ProductTypeList"; diff --git a/src/productTypes/queries.ts b/src/productTypes/queries.ts index f6bdc47de..f7381809d 100644 --- a/src/productTypes/queries.ts +++ b/src/productTypes/queries.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import { attributeFragment } from "@saleor/attributes/queries"; import makeQuery from "@saleor/hooks/makeQuery"; +import gql from "graphql-tag"; + import { pageInfoFragment, TypedQuery } from "../queries"; import { ProductTypeCreateData } from "./types/ProductTypeCreateData"; import { diff --git a/src/productTypes/urls.ts b/src/productTypes/urls.ts index 5905a7b04..716a4daa2 100644 --- a/src/productTypes/urls.ts +++ b/src/productTypes/urls.ts @@ -8,8 +8,8 @@ import { Filters, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; const productTypeSection = "/product-types/"; diff --git a/src/productTypes/views/ProductTypeCreate.tsx b/src/productTypes/views/ProductTypeCreate.tsx index f116699ca..fa1e5d384 100644 --- a/src/productTypes/views/ProductTypeCreate.tsx +++ b/src/productTypes/views/ProductTypeCreate.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import ProductTypeCreatePage, { ProductTypeForm diff --git a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx index b69bc8662..59636c513 100644 --- a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -16,13 +13,16 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import useShop from "@saleor/hooks/useShop"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { configurationMenuUrl } from "../../../configuration"; import { maybe } from "../../../misc"; import ProductTypeListPage from "../../components/ProductTypeListPage"; @@ -40,11 +40,11 @@ import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterQueryParam, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/productTypes/views/ProductTypeList/filters.test.ts b/src/productTypes/views/ProductTypeList/filters.test.ts index 9911460a0..a8f46393b 100644 --- a/src/productTypes/views/ProductTypeList/filters.test.ts +++ b/src/productTypes/views/ProductTypeList/filters.test.ts @@ -1,16 +1,16 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { ProductTypeListUrlFilters } from "@saleor/productTypes/urls"; import { createFilterStructure } from "@saleor/productTypes/components/ProductTypeListPage"; +import { ProductTypeListUrlFilters } from "@saleor/productTypes/urls"; +import { + ProductTypeConfigurable, + ProductTypeEnum +} from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { - ProductTypeEnum, - ProductTypeConfigurable -} from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/productTypes/views/ProductTypeList/filters.ts b/src/productTypes/views/ProductTypeList/filters.ts index c21c4e426..cbc457b70 100644 --- a/src/productTypes/views/ProductTypeList/filters.ts +++ b/src/productTypes/views/ProductTypeList/filters.ts @@ -1,14 +1,15 @@ -import { - ProductTypeFilterInput, - ProductTypeConfigurable, - ProductTypeEnum -} from "@saleor/types/globalTypes"; import { IFilterElement } from "@saleor/components/Filter"; -import { maybe, findValueInEnum } from "@saleor/misc"; +import { findValueInEnum, maybe } from "@saleor/misc"; import { ProductTypeFilterKeys, ProductTypeListFilterOpts } from "@saleor/productTypes/components/ProductTypeListPage"; +import { + ProductTypeConfigurable, + ProductTypeEnum, + ProductTypeFilterInput +} from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, diff --git a/src/productTypes/views/ProductTypeUpdate/index.tsx b/src/productTypes/views/ProductTypeUpdate/index.tsx index 492320261..b0b170923 100644 --- a/src/productTypes/views/ProductTypeUpdate/index.tsx +++ b/src/productTypes/views/ProductTypeUpdate/index.tsx @@ -1,8 +1,6 @@ import Button from "@material-ui/core/Button"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import { attributeUrl } from "@saleor/attributes/urls"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -13,7 +11,9 @@ import { maybe } from "@saleor/misc"; import AssignAttributeDialog from "@saleor/productTypes/components/AssignAttributeDialog"; import { ReorderEvent } from "@saleor/types"; import { AttributeTypeEnum } from "@saleor/types/globalTypes"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import ProductTypeAttributeUnassignDialog from "../../components/ProductTypeAttributeUnassignDialog"; import ProductTypeBulkAttributeUnassignDialog from "../../components/ProductTypeBulkAttributeUnassignDialog"; import ProductTypeDeleteDialog from "../../components/ProductTypeDeleteDialog"; diff --git a/src/products/components/ProductAttributes/ProductAttributes.tsx b/src/products/components/ProductAttributes/ProductAttributes.tsx index 24617faeb..8a91181a0 100644 --- a/src/products/components/ProductAttributes/ProductAttributes.tsx +++ b/src/products/components/ProductAttributes/ProductAttributes.tsx @@ -4,10 +4,6 @@ import IconButton from "@material-ui/core/IconButton"; import makeStyles from "@material-ui/core/styles/makeStyles"; import Typography from "@material-ui/core/Typography"; import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; -import classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; @@ -21,6 +17,9 @@ import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { maybe } from "@saleor/misc"; import { ProductDetails_product_attributes_attribute_values } from "@saleor/products/types/ProductDetails"; import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ProductAttributeInputData { inputType: AttributeInputTypeEnum; diff --git a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx index ef069da4e..03a0b30cb 100644 --- a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx +++ b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx @@ -1,12 +1,11 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import React from "react"; -import { useIntl } from "react-intl"; - import FormSpacer from "@saleor/components/FormSpacer"; import MultiSelectField from "@saleor/components/MultiSelectField"; import PageHeader from "@saleor/components/PageHeader"; import SingleSelectField from "@saleor/components/SingleSelectField"; +import React from "react"; +import { useIntl } from "react-intl"; interface ProductCategoryAndCollectionsFormProps { categories?: Array<{ value: string; label: string }>; diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 60ef44658..897a41e40 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -1,7 +1,4 @@ -import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -25,10 +22,13 @@ import { import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; import { SearchProductTypes_search_edges_node_productAttributes } from "@saleor/searches/types/SearchProductTypes"; +import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; +import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; + import { FetchMoreProps } from "../../../types"; import { createAttributeChangeHandler, diff --git a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx index 04d3321f4..bce9d852c 100644 --- a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx +++ b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx @@ -1,16 +1,15 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import { RawDraftContentState } from "draft-js"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor from "@saleor/components/RichTextEditor"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import { RawDraftContentState } from "draft-js"; +import React from "react"; +import { useIntl } from "react-intl"; interface ProductDetailsFormProps { data: { diff --git a/src/products/components/ProductImageNavigation/ProductImageNavigation.tsx b/src/products/components/ProductImageNavigation/ProductImageNavigation.tsx index 6868013ff..26229bf43 100644 --- a/src/products/components/ProductImageNavigation/ProductImageNavigation.tsx +++ b/src/products/components/ProductImageNavigation/ProductImageNavigation.tsx @@ -1,13 +1,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; +import CardTitle from "@saleor/components/CardTitle"; +import Skeleton from "@saleor/components/Skeleton"; import classNames from "classnames"; import React from "react"; import { useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import Skeleton from "@saleor/components/Skeleton"; - const useStyles = makeStyles( theme => ({ card: { diff --git a/src/products/components/ProductImagePage/ProductImagePage.tsx b/src/products/components/ProductImagePage/ProductImagePage.tsx index aa00dfb82..55b4b85e2 100644 --- a/src/products/components/ProductImagePage/ProductImagePage.tsx +++ b/src/products/components/ProductImagePage/ProductImagePage.tsx @@ -2,9 +2,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -15,6 +12,9 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import Skeleton from "@saleor/components/Skeleton"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import ProductImageNavigation from "../ProductImageNavigation"; const useStyles = makeStyles( diff --git a/src/products/components/ProductImages/ProductImages.tsx b/src/products/components/ProductImages/ProductImages.tsx index 00e5157c4..e53fa910f 100644 --- a/src/products/components/ProductImages/ProductImages.tsx +++ b/src/products/components/ProductImages/ProductImages.tsx @@ -12,6 +12,7 @@ import classNames from "classnames"; import React from "react"; import { useIntl } from "react-intl"; import { SortableContainer, SortableElement } from "react-sortable-hoc"; + import { ProductDetails_product_images } from "../../types/ProductDetails"; const useStyles = makeStyles( diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 895194939..cbc8e4e37 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -3,10 +3,6 @@ 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 classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -32,6 +28,9 @@ import TDisplayColumn, { DisplayColumnProps } from "@saleor/utils/columns/DisplayColumn"; import { getArrowDirection } from "@saleor/utils/sort"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/products/components/ProductListPage/ProductListPage.tsx b/src/products/components/ProductListPage/ProductListPage.tsx index d0bb14c1d..b762f388b 100644 --- a/src/products/components/ProductListPage/ProductListPage.tsx +++ b/src/products/components/ProductListPage/ProductListPage.tsx @@ -1,13 +1,11 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import makeStyles from "@material-ui/core/styles/makeStyles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ColumnPicker, { ColumnPickerChoice } from "@saleor/components/ColumnPicker"; import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; import { ProductListColumns } from "@saleor/config"; import { sectionNames } from "@saleor/intl"; @@ -23,7 +21,9 @@ import { PageListProps, SortPage } from "@saleor/types"; -import FilterBar from "@saleor/components/FilterBar"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ProductListUrlSortField } from "../../urls"; import ProductList from "../ProductList"; import { diff --git a/src/products/components/ProductListPage/filters.ts b/src/products/components/ProductListPage/filters.ts index 32225b967..50683be68 100644 --- a/src/products/components/ProductListPage/filters.ts +++ b/src/products/components/ProductListPage/filters.ts @@ -1,15 +1,14 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { FilterOpts, MinMax, AutocompleteFilterOpts } from "@saleor/types"; +import { IFilter } from "@saleor/components/Filter"; +import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { sectionNames } from "@saleor/intl"; +import { AutocompleteFilterOpts, FilterOpts, MinMax } from "@saleor/types"; import { StockAvailability } from "@saleor/types/globalTypes"; import { + createAutocompleteField, createOptionsField, - createPriceField, - createAutocompleteField + createPriceField } from "@saleor/utils/filters/fields"; -import { IFilter } from "@saleor/components/Filter"; -import { sectionNames } from "@saleor/intl"; -import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { defineMessages, IntlShape } from "react-intl"; export enum ProductFilterKeys { attributes = "attributes", diff --git a/src/products/components/ProductOrganization/ProductOrganization.tsx b/src/products/components/ProductOrganization/ProductOrganization.tsx index f38b7c8d5..e6712f67b 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.tsx @@ -2,9 +2,7 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { FormSpacer } from "@saleor/components/FormSpacer"; @@ -19,7 +17,8 @@ import { ChangeEvent } from "@saleor/hooks/useForm"; import { maybe } from "@saleor/misc"; import { FetchMoreProps } from "@saleor/types"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface ProductType { hasVariants: boolean; diff --git a/src/products/components/ProductPricing/ProductPricing.tsx b/src/products/components/ProductPricing/ProductPricing.tsx index f39d406ed..c7e7ee5ed 100644 --- a/src/products/components/ProductPricing/ProductPricing.tsx +++ b/src/products/components/ProductPricing/ProductPricing.tsx @@ -1,14 +1,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import PriceField from "@saleor/components/PriceField"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/products/components/ProductStocks/ProductStocks.tsx b/src/products/components/ProductStocks/ProductStocks.tsx index b4d2af73c..189da0a71 100644 --- a/src/products/components/ProductStocks/ProductStocks.tsx +++ b/src/products/components/ProductStocks/ProductStocks.tsx @@ -1,36 +1,35 @@ -import ClickAwayListener from "@material-ui/core/ClickAwayListener"; -import Grow from "@material-ui/core/Grow"; -import Popper from "@material-ui/core/Popper"; -import { fade } from "@material-ui/core/styles/colorManipulator"; -import IconButton from "@material-ui/core/IconButton"; 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 { fade } from "@material-ui/core/styles/colorManipulator"; +import makeStyles from "@material-ui/core/styles/makeStyles"; import Table from "@material-ui/core/Table"; -import TableHead from "@material-ui/core/TableHead"; 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 React from "react"; -import { useIntl, FormattedMessage } from "react-intl"; -import makeStyles from "@material-ui/core/styles/makeStyles"; import AddIcon from "@material-ui/icons/Add"; import DeleteIcon from "@material-ui/icons/Delete"; -import Paper from "@material-ui/core/Paper"; -import MenuItem from "@material-ui/core/MenuItem"; - -import { FormChange } from "@saleor/hooks/useForm"; -import { FormsetChange, FormsetAtomicData } from "@saleor/hooks/useFormset"; import CardTitle from "@saleor/components/CardTitle"; -import { getFieldError } from "@saleor/utils/errors"; -import { UserError } from "@saleor/types"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; +import { FormChange } from "@saleor/hooks/useForm"; +import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { renderCollection } from "@saleor/misc"; import { ICONBUTTON_SIZE } from "@saleor/theme"; +import { UserError } from "@saleor/types"; +import { getFieldError } from "@saleor/utils/errors"; import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export type ProductStockInput = FormsetAtomicData; export interface ProductStockFormData { diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index 0d3a4a28f..fb8b8d7ca 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -1,8 +1,4 @@ -import { convertFromRaw, RawDraftContentState } from "draft-js"; -import { diff } from "fast-array-diff"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -23,8 +19,12 @@ import { SearchCollections_search_edges_node } from "@saleor/searches/types/Sear import { FetchMoreProps, ListActions } from "@saleor/types"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import { convertFromRaw, RawDraftContentState } from "draft-js"; +import { diff } from "fast-array-diff"; +import React from "react"; +import { useIntl } from "react-intl"; + import { ProductDetails_product, ProductDetails_product_images, @@ -35,9 +35,9 @@ import { getChoices, getProductUpdatePageFormData, getSelectedAttributesFromProduct, + getStockInputFromProduct, ProductAttributeValueChoices, - ProductUpdatePageFormData, - getStockInputFromProduct + ProductUpdatePageFormData } from "../../utils/data"; import { createAttributeChangeHandler, @@ -48,8 +48,8 @@ import ProductDetailsForm from "../ProductDetailsForm"; import ProductImages from "../ProductImages"; import ProductOrganization from "../ProductOrganization"; import ProductPricing from "../ProductPricing"; -import ProductVariants from "../ProductVariants"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; +import ProductVariants from "../ProductVariants"; export interface ProductUpdatePageProps extends ListActions { errors: ProductErrorFragment[]; diff --git a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx index b32a7ef2d..42d380748 100644 --- a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx +++ b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx @@ -1,9 +1,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { IntlShape, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; @@ -15,6 +12,9 @@ import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { commonMessages } from "@saleor/intl"; import { VariantCreate_productVariantCreate_errors } from "@saleor/products/types/VariantCreate"; import { ProductErrorCode } from "@saleor/types/globalTypes"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; + import { ProductVariant_attributes_attribute_values } from "../../types/ProductVariant"; export interface VariantAttributeInputData { diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index f768787db..cf2fe1319 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -1,6 +1,4 @@ -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -14,16 +12,18 @@ import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; import { getVariantAttributeInputFromProduct } from "@saleor/products/utils/data"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { ProductVariantCreateData_product } from "../../types/ProductVariantCreateData"; +import ProductStocks, { ProductStockInput } from "../ProductStocks"; import ProductVariantAttributes, { VariantAttributeInputData } from "../ProductVariantAttributes"; import ProductVariantNavigation from "../ProductVariantNavigation"; import ProductVariantPrice from "../ProductVariantPrice"; -import ProductStocks, { ProductStockInput } from "../ProductStocks"; interface ProductVariantCreatePageFormData { costPrice: string; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx index 08986ab6c..fa936506a 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx @@ -1,11 +1,11 @@ +import { attributes } from "@saleor/attributes/fixtures"; +import Container from "@saleor/components/Container"; +import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { attributes } from "@saleor/attributes/fixtures"; -import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; -import Container from "@saleor/components/Container"; -import { warehouseList } from "@saleor/warehouses/fixtures"; import Decorator from "../../../storybook/Decorator"; import { createVariants } from "./createVariants"; import { AllOrAttribute, ProductVariantCreateFormData } from "./form"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx index 0653a0b0b..0451ee6cd 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx @@ -1,9 +1,9 @@ -import React from "react"; - import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; -import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; import { isSelected } from "@saleor/utils/lists"; +import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import React from "react"; + import { ProductVariantCreateFormData } from "./form"; import ProductVariantCreatePriceAndSku from "./ProductVariantCreatorPriceAndSku"; import ProductVariantCreateSummary from "./ProductVariantCreatorSummary"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx index ec1879404..011e60b86 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx @@ -1,23 +1,23 @@ import Button from "@material-ui/core/Button"; -import Typography from "@material-ui/core/Typography"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl, IntlShape } from "react-intl"; - -import useWizard from "@saleor/hooks/useWizard"; -import PageHeader from "@saleor/components/PageHeader"; +import Typography from "@material-ui/core/Typography"; import Container from "@saleor/components/Container"; import Hr from "@saleor/components/Hr"; +import PageHeader from "@saleor/components/PageHeader"; +import useWizard from "@saleor/hooks/useWizard"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; + import { ProductVariantBulkCreateInput } from "../../../types/globalTypes"; import { createInitialForm, ProductVariantCreateFormData } from "./form"; import ProductVariantCreatorContent, { ProductVariantCreatorContentProps } from "./ProductVariantCreatorContent"; +import ProductVariantCreateTabs from "./ProductVariantCreatorTabs"; import reduceProductVariantCreateFormData, { ProductVariantCreateReducerActionType } from "./reducer"; import { ProductVariantCreatorStep } from "./types"; -import ProductVariantCreateTabs from "./ProductVariantCreatorTabs"; const useStyles = makeStyles( theme => ({ diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx index 52ccf460c..b3f72a6f3 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx @@ -1,8 +1,8 @@ +import CardSpacer from "@saleor/components/CardSpacer"; +import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; +import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; import React from "react"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; -import CardSpacer from "@saleor/components/CardSpacer"; -import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; import { ProductVariantCreateFormData, VariantCreatorPricesAndSkuMode diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx index 21ddd1938..31100a0cb 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx @@ -1,20 +1,20 @@ -import FormControlLabel from "@material-ui/core/FormControlLabel"; 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 { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; -import CardTitle from "@saleor/components/CardTitle"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ProductVariantCreateFormData, VariantCreatorPricesAndSkuMode diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx index b087073a9..a2d0a1bac 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx @@ -1,23 +1,23 @@ -import FormControlLabel from "@material-ui/core/FormControlLabel"; 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 { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import CardSpacer from "@saleor/components/CardSpacer"; +import CardTitle from "@saleor/components/CardTitle"; +import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; -import CardTitle from "@saleor/components/CardTitle"; -import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; -import CardSpacer from "@saleor/components/CardSpacer"; -import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { isSelected } from "@saleor/utils/lists"; +import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ProductVariantCreateFormData, VariantCreatorPricesAndSkuMode diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx index 620c7ea31..be08ab185 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx @@ -1,24 +1,24 @@ +import Card from "@material-ui/core/Card"; 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 Card from "@material-ui/core/Card"; import IconButton from "@material-ui/core/IconButton"; import { makeStyles, Theme } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import DeleteIcon from "@material-ui/icons/Delete"; -import classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import CardTitle from "@saleor/components/CardTitle"; +import Hr from "@saleor/components/Hr"; import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; import { ProductVariantBulkCreateInput } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import { getBulkProductErrorMessage } from "@saleor/utils/errors/product"; -import CardTitle from "@saleor/components/CardTitle"; import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; -import Hr from "@saleor/components/Hr"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ProductDetails_product_productType_variantAttributes } from "../../types/ProductDetails"; import { ProductVariantCreateFormData } from "./form"; import { VariantField } from "./reducer"; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx index b482bbd30..3584aa14c 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx @@ -1,15 +1,15 @@ -import makeStyles from "@material-ui/core/styles/makeStyles"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import React from "react"; - +import makeStyles from "@material-ui/core/styles/makeStyles"; +import CardSpacer from "@saleor/components/CardSpacer"; +import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Debounce from "@saleor/components/Debounce"; import Skeleton from "@saleor/components/Skeleton"; import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import { isSelected } from "@saleor/utils/lists"; -import CardTitle from "@saleor/components/CardTitle"; -import CardSpacer from "@saleor/components/CardSpacer"; +import React from "react"; + import { ProductVariantCreateFormData } from "./form"; export interface ProductVariantCreatorValuesProps { diff --git a/src/products/components/ProductVariantCreatorPage/createVariants.ts b/src/products/components/ProductVariantCreatorPage/createVariants.ts index 231ad44a8..75539f55a 100644 --- a/src/products/components/ProductVariantCreatorPage/createVariants.ts +++ b/src/products/components/ProductVariantCreatorPage/createVariants.ts @@ -1,4 +1,5 @@ import { ProductVariantBulkCreateInput } from "@saleor/types/globalTypes"; + import { AllOrAttribute, Attribute, diff --git a/src/products/components/ProductVariantCreatorPage/fixtures.ts b/src/products/components/ProductVariantCreatorPage/fixtures.ts index 41aacbd6b..0fb07ede9 100644 --- a/src/products/components/ProductVariantCreatorPage/fixtures.ts +++ b/src/products/components/ProductVariantCreatorPage/fixtures.ts @@ -1,4 +1,5 @@ import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; + import { createVariants } from "./createVariants"; import { AllOrAttribute, diff --git a/src/products/components/ProductVariantCreatorPage/form.ts b/src/products/components/ProductVariantCreatorPage/form.ts index db3f2c46d..8b80e9d46 100644 --- a/src/products/components/ProductVariantCreatorPage/form.ts +++ b/src/products/components/ProductVariantCreatorPage/form.ts @@ -1,5 +1,6 @@ import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; + import { ProductVariantBulkCreateInput } from "../../../types/globalTypes"; export interface AttributeValue { diff --git a/src/products/components/ProductVariantCreatorPage/reducer.test.ts b/src/products/components/ProductVariantCreatorPage/reducer.test.ts index 7cab43af8..810eb35d5 100644 --- a/src/products/components/ProductVariantCreatorPage/reducer.test.ts +++ b/src/products/components/ProductVariantCreatorPage/reducer.test.ts @@ -6,8 +6,8 @@ import { warehouses } from "./fixtures"; import reducer, { - VariantField, - ProductVariantCreateReducerActionType + ProductVariantCreateReducerActionType, + VariantField } from "./reducer"; function execActions( diff --git a/src/products/components/ProductVariantCreatorPage/reducer.ts b/src/products/components/ProductVariantCreatorPage/reducer.ts index 23b387af7..acc547b46 100644 --- a/src/products/components/ProductVariantCreatorPage/reducer.ts +++ b/src/products/components/ProductVariantCreatorPage/reducer.ts @@ -1,12 +1,13 @@ +import { StockInput } from "@saleor/types/globalTypes"; import { add, remove, removeAtIndex, toggle, - updateAtIndex, - update + update, + updateAtIndex } from "@saleor/utils/lists"; -import { StockInput } from "@saleor/types/globalTypes"; + import { createVariants } from "./createVariants"; import { ProductVariantCreateFormData, diff --git a/src/products/components/ProductVariantCreatorPage/utils.ts b/src/products/components/ProductVariantCreatorPage/utils.ts index eae1a5714..d14daf64b 100644 --- a/src/products/components/ProductVariantCreatorPage/utils.ts +++ b/src/products/components/ProductVariantCreatorPage/utils.ts @@ -1,7 +1,8 @@ import { - ProductDetails_product_productType_variantAttributes_values, - ProductDetails_product_productType_variantAttributes + ProductDetails_product_productType_variantAttributes, + ProductDetails_product_productType_variantAttributes_values } from "@saleor/products/types/ProductDetails"; + import { ProductVariantCreateFormData } from "./form"; export function getPriceAttributeValues( diff --git a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx index d3855fb8c..4ef3a39ee 100644 --- a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx +++ b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx @@ -5,13 +5,12 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { buttonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ @@ -34,9 +33,7 @@ export interface ProductVariantDeleteDialogProps { onConfirm?(); } -const ProductVariantDeleteDialog: React.FC< - ProductVariantDeleteDialogProps -> = props => { +const ProductVariantDeleteDialog: React.FC = props => { const { confirmButtonState, name, open, onConfirm, onClose } = props; const classes = useStyles(props); diff --git a/src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx b/src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx index ba861a096..4d59ac08d 100644 --- a/src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx +++ b/src/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx @@ -4,11 +4,11 @@ import DialogActions from "@material-ui/core/DialogActions"; import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; +import { buttonMessages } from "@saleor/intl"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import { ProductImage } from "../../types/ProductImage"; const useStyles = makeStyles( @@ -56,9 +56,7 @@ interface ProductVariantImageSelectDialogProps { onImageSelect(id: string); } -const ProductVariantImageSelectDialog: React.FC< - ProductVariantImageSelectDialogProps -> = props => { +const ProductVariantImageSelectDialog: React.FC = props => { const { images, open, selectedImages, onClose, onImageSelect } = props; const classes = useStyles(props); diff --git a/src/products/components/ProductVariantImages/ProductVariantImages.tsx b/src/products/components/ProductVariantImages/ProductVariantImages.tsx index 18d8f48b5..55738c30c 100644 --- a/src/products/components/ProductVariantImages/ProductVariantImages.tsx +++ b/src/products/components/ProductVariantImages/ProductVariantImages.tsx @@ -3,11 +3,11 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import CardTitle from "@saleor/components/CardTitle"; +import Skeleton from "@saleor/components/Skeleton"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import CardTitle from "@saleor/components/CardTitle"; -import Skeleton from "@saleor/components/Skeleton"; import { ProductImage } from "../../types/ProductImage"; const useStyles = makeStyles( @@ -49,9 +49,7 @@ interface ProductVariantImagesProps { onImageAdd(); } -export const ProductVariantImages: React.FC< - ProductVariantImagesProps -> = props => { +export const ProductVariantImages: React.FC = props => { const { disabled, images, onImageAdd } = props; const classes = useStyles(props); diff --git a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx index 79a1ac224..89f0e7d55 100644 --- a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx +++ b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx @@ -4,14 +4,14 @@ import { makeStyles } from "@material-ui/core/styles"; import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; -import classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ProductVariantCreateData_product_variants } from "../../types/ProductVariantCreateData"; import { ProductVariantDetails_productVariant } from "../../types/ProductVariantDetails"; @@ -51,9 +51,7 @@ interface ProductVariantNavigationProps { onRowClick: (variantId: string) => void; } -const ProductVariantNavigation: React.FC< - ProductVariantNavigationProps -> = props => { +const ProductVariantNavigation: React.FC = props => { const { current, fallbackThumbnail, variants, onAdd, onRowClick } = props; const classes = useStyles(props); diff --git a/src/products/components/ProductVariantPage/ProductVariantPage.tsx b/src/products/components/ProductVariantPage/ProductVariantPage.tsx index b0ee12928..54fb76fa6 100644 --- a/src/products/components/ProductVariantPage/ProductVariantPage.tsx +++ b/src/products/components/ProductVariantPage/ProductVariantPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { diff } from "fast-array-diff"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -19,8 +16,12 @@ import { getStockInputFromVariant } from "@saleor/products/utils/data"; import { WarehouseFragment } from "@saleor/warehouses/types/WarehouseFragment"; +import { diff } from "fast-array-diff"; +import React from "react"; + import { maybe } from "../../../misc"; import { ProductVariant } from "../../types/ProductVariant"; +import ProductStocks, { ProductStockInput } from "../ProductStocks"; import ProductVariantAttributes, { VariantAttributeInputData } from "../ProductVariantAttributes"; @@ -28,7 +29,6 @@ import ProductVariantImages from "../ProductVariantImages"; import ProductVariantImageSelectDialog from "../ProductVariantImageSelectDialog"; import ProductVariantNavigation from "../ProductVariantNavigation"; import ProductVariantPrice from "../ProductVariantPrice"; -import ProductStocks, { ProductStockInput } from "../ProductStocks"; export interface ProductVariantPageFormData { costPrice: string; diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index 738c3ea04..fee329d52 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -1,13 +1,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; import PriceField from "@saleor/components/PriceField"; -import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; +import React from "react"; +import { useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/products/components/ProductVariants/ProductVariants.tsx b/src/products/components/ProductVariants/ProductVariants.tsx index 869a5facd..aebec84bd 100644 --- a/src/products/components/ProductVariants/ProductVariants.tsx +++ b/src/products/components/ProductVariants/ProductVariants.tsx @@ -7,17 +7,17 @@ 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 React from "react"; -import { FormattedMessage, useIntl, IntlShape } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; +import LinkChoice from "@saleor/components/LinkChoice"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; import TableHead from "@saleor/components/TableHead"; -import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import LinkChoice from "@saleor/components/LinkChoice"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ListActions } from "../../../types"; import { diff --git a/src/products/containers/ProductImagesReorder.tsx b/src/products/containers/ProductImagesReorder.tsx index 8c56ae1d2..c4f019d74 100644 --- a/src/products/containers/ProductImagesReorder.tsx +++ b/src/products/containers/ProductImagesReorder.tsx @@ -19,9 +19,12 @@ interface ProductImagesReorderProviderProps }>; } -const ProductImagesReorderProvider: React.FC< - ProductImagesReorderProviderProps -> = ({ children, productId, productImages, ...mutationProps }) => ( +const ProductImagesReorderProvider: React.FC = ({ + children, + productId, + productImages, + ...mutationProps +}) => ( {(mutate, mutationResult) => children(opts => { diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index 31e6d2818..04d2767e1 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -1,5 +1,6 @@ import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; + import { content } from "../storybook/stories/components/RichTextEditor"; import { ProductDetails_product } from "./types/ProductDetails"; import { ProductList_products_edges_node } from "./types/ProductList"; diff --git a/src/products/index.tsx b/src/products/index.tsx index b80a26e0c..12c1382d4 100644 --- a/src/products/index.tsx +++ b/src/products/index.tsx @@ -1,11 +1,11 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; +import { getArrayQueryParam } from "@saleor/utils/urls"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; -import { getArrayQueryParam } from "@saleor/utils/urls"; import { WindowTitle } from "../components/WindowTitle"; import { productAddPath, @@ -17,9 +17,9 @@ import { productPath, ProductUrlQueryParams, productVariantAddPath, + productVariantCreatorPath, productVariantEditPath, - ProductVariantEditUrlQueryParams, - productVariantCreatorPath + ProductVariantEditUrlQueryParams } from "./urls"; import ProductCreate from "./views/ProductCreate"; import ProductImageComponent from "./views/ProductImage"; diff --git a/src/products/mutations.ts b/src/products/mutations.ts index d877e1b1a..419149b76 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -1,8 +1,17 @@ -import gql from "graphql-tag"; - import { productErrorFragment } from "@saleor/attributes/mutations"; import makeMutation from "@saleor/hooks/makeMutation"; +import gql from "graphql-tag"; + import { TypedMutation } from "../mutations"; +import { fragmentVariant, productFragmentDetails } from "./queries"; +import { + productBulkDelete, + productBulkDeleteVariables +} from "./types/productBulkDelete"; +import { + productBulkPublish, + productBulkPublishVariables +} from "./types/productBulkPublish"; import { ProductCreate, ProductCreateVariables } from "./types/ProductCreate"; import { ProductDelete, ProductDeleteVariables } from "./types/ProductDelete"; import { @@ -22,6 +31,14 @@ import { ProductImageUpdateVariables } from "./types/ProductImageUpdate"; import { ProductUpdate, ProductUpdateVariables } from "./types/ProductUpdate"; +import { + ProductVariantBulkCreate, + ProductVariantBulkCreateVariables +} from "./types/ProductVariantBulkCreate"; +import { + ProductVariantBulkDelete, + ProductVariantBulkDeleteVariables +} from "./types/ProductVariantBulkDelete"; import { SimpleProductUpdate, SimpleProductUpdateVariables @@ -38,24 +55,6 @@ import { } from "./types/VariantImageUnassign"; import { VariantUpdate, VariantUpdateVariables } from "./types/VariantUpdate"; -import { fragmentVariant, productFragmentDetails } from "./queries"; -import { - productBulkDelete, - productBulkDeleteVariables -} from "./types/productBulkDelete"; -import { - productBulkPublish, - productBulkPublishVariables -} from "./types/productBulkPublish"; -import { - ProductVariantBulkCreate, - ProductVariantBulkCreateVariables -} from "./types/ProductVariantBulkCreate"; -import { - ProductVariantBulkDelete, - ProductVariantBulkDeleteVariables -} from "./types/ProductVariantBulkDelete"; - export const bulkProductErrorFragment = gql` fragment BulkProductErrorFragment on BulkProductError { field diff --git a/src/products/queries.ts b/src/products/queries.ts index a614f0318..403bd232d 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -1,12 +1,20 @@ -import gql from "graphql-tag"; - import makeQuery from "@saleor/hooks/makeQuery"; import { warehouseFragment } from "@saleor/warehouses/queries"; +import gql from "graphql-tag"; + import { pageInfoFragment, TypedQuery } from "../queries"; import { AvailableInGridAttributes, AvailableInGridAttributesVariables } from "./types/AvailableInGridAttributes"; +import { + CreateMultipleVariantsData, + CreateMultipleVariantsDataVariables +} from "./types/CreateMultipleVariantsData"; +import { + InitialProductFilterData, + InitialProductFilterDataVariables +} from "./types/InitialProductFilterData"; import { ProductDetails, ProductDetailsVariables @@ -24,14 +32,6 @@ import { ProductVariantDetails, ProductVariantDetailsVariables } from "./types/ProductVariantDetails"; -import { - InitialProductFilterData, - InitialProductFilterDataVariables -} from "./types/InitialProductFilterData"; -import { - CreateMultipleVariantsData, - CreateMultipleVariantsDataVariables -} from "./types/CreateMultipleVariantsData"; export const stockFragment = gql` fragment StockFragment on Stock { diff --git a/src/products/urls.ts b/src/products/urls.ts index 327737745..19bc641fc 100644 --- a/src/products/urls.ts +++ b/src/products/urls.ts @@ -1,18 +1,17 @@ import urlJoin from "url-join"; -import { stringifyQs } from "../utils/urls"; - import { ActiveTab, BulkAction, Dialog, Filters, + FiltersAsDictWithMultipleValues, + FiltersWithMultipleValues, Pagination, Sort, - TabActionDialog, - FiltersWithMultipleValues, - FiltersAsDictWithMultipleValues + TabActionDialog } from "../types"; +import { stringifyQs } from "../utils/urls"; const productSection = "/products/"; diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index e348a6f84..bef934eca 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -1,7 +1,6 @@ -import { RawDraftContentState } from "draft-js"; - import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { FormsetAtomicData } from "@saleor/hooks/useFormset"; import { maybe } from "@saleor/misc"; import { ProductDetails_product, @@ -10,12 +9,13 @@ import { } from "@saleor/products/types/ProductDetails"; import { SearchProductTypes_search_edges_node_productAttributes } from "@saleor/searches/types/SearchProductTypes"; import { StockInput } from "@saleor/types/globalTypes"; -import { FormsetAtomicData } from "@saleor/hooks/useFormset"; +import { RawDraftContentState } from "draft-js"; + import { ProductAttributeInput } from "../components/ProductAttributes"; +import { ProductStockInput } from "../components/ProductStocks"; import { VariantAttributeInput } from "../components/ProductVariantAttributes"; import { ProductVariant } from "../types/ProductVariant"; import { ProductVariantCreateData_product } from "../types/ProductVariantCreateData"; -import { ProductStockInput } from "../components/ProductStocks"; export interface Collection { id: string; diff --git a/src/products/utils/handlers.ts b/src/products/utils/handlers.ts index 7f0dc5071..cba4b3018 100644 --- a/src/products/utils/handlers.ts +++ b/src/products/utils/handlers.ts @@ -2,6 +2,7 @@ import { FormChange } from "@saleor/hooks/useForm"; import { FormsetChange, FormsetData } from "@saleor/hooks/useFormset"; import { maybe } from "@saleor/misc"; import { toggle } from "@saleor/utils/lists"; + import { ProductAttributeInputData } from "../components/ProductAttributes"; import { getAttributeInputFromProductType, diff --git a/src/products/views/ProductCreate.tsx b/src/products/views/ProductCreate.tsx index b9f329070..f7f56ab0d 100644 --- a/src/products/views/ProductCreate.tsx +++ b/src/products/views/ProductCreate.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -10,6 +7,9 @@ import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; import { useWarehouseList } from "@saleor/warehouses/queries"; +import React from "react"; +import { useIntl } from "react-intl"; + import { decimal, maybe } from "../../misc"; import ProductCreatePage, { ProductCreatePageSubmitData diff --git a/src/products/views/ProductImage.tsx b/src/products/views/ProductImage.tsx index 48f49cfca..7179ffb21 100644 --- a/src/products/views/ProductImage.tsx +++ b/src/products/views/ProductImage.tsx @@ -1,11 +1,11 @@ import DialogContentText from "@material-ui/core/DialogContentText"; +import ActionDialog from "@saleor/components/ActionDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; +import useNavigator from "@saleor/hooks/useNavigator"; +import useNotifier from "@saleor/hooks/useNotifier"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import ActionDialog from "@saleor/components/ActionDialog"; -import useNavigator from "@saleor/hooks/useNavigator"; -import useNotifier from "@saleor/hooks/useNotifier"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import { maybe } from "../../misc"; import ProductImagePage from "../components/ProductImagePage"; import { @@ -17,8 +17,8 @@ import { ProductImageUpdate } from "../types/ProductImageUpdate"; import { productImageUrl, ProductImageUrlQueryParams, - productUrl, - productListUrl + productListUrl, + productUrl } from "../urls"; interface ProductImageProps { diff --git a/src/products/views/ProductList/ProductList.tsx b/src/products/views/ProductList/ProductList.tsx index de9ebe432..a2afc38d9 100644 --- a/src/products/views/ProductList/ProductList.tsx +++ b/src/products/views/ProductList/ProductList.tsx @@ -2,19 +2,16 @@ import Button from "@material-ui/core/Button"; import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { - defaultListSettings, - ProductListColumns, + DEFAULT_INITIAL_PAGINATION_DATA, DEFAULT_INITIAL_SEARCH_DATA, - DEFAULT_INITIAL_PAGINATION_DATA + defaultListSettings, + ProductListColumns } from "@saleor/config"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; @@ -26,18 +23,21 @@ import usePaginator, { import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; -import { ProductListVariables } from "@saleor/products/types/ProductList"; -import { ListViews } from "@saleor/types"; -import { getSortUrlVariables } from "@saleor/utils/sort"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; -import useCategorySearch from "@saleor/searches/useCategorySearch"; -import useCollectionSearch from "@saleor/searches/useCollectionSearch"; -import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; import { getAttributeIdFromColumnValue, isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; +import { ProductListVariables } from "@saleor/products/types/ProductList"; +import useCategorySearch from "@saleor/searches/useCategorySearch"; +import useCollectionSearch from "@saleor/searches/useCollectionSearch"; +import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; +import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import { getSortUrlVariables } from "@saleor/utils/sort"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import ProductListPage from "../../components/ProductListPage"; import { TypedProductBulkDeleteMutation, @@ -53,20 +53,20 @@ import { productBulkPublish } from "../../types/productBulkPublish"; import { productAddUrl, productListUrl, + ProductListUrlDialog, ProductListUrlQueryParams, ProductListUrlSortField, - productUrl, - ProductListUrlDialog + productUrl } from "../../urls"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterOpts, - getFilterQueryParam + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/products/views/ProductList/filters.test.ts b/src/products/views/ProductList/filters.test.ts index f5960b563..4a55b212a 100644 --- a/src/products/views/ProductList/filters.test.ts +++ b/src/products/views/ProductList/filters.test.ts @@ -1,13 +1,13 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { ProductListUrlFilters } from "@saleor/products/urls"; import { createFilterStructure } from "@saleor/products/components/ProductListPage"; +import { ProductListUrlFilters } from "@saleor/products/urls"; +import { StockAvailability } from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { StockAvailability } from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; import { productListFilterOpts } from "./fixtures"; describe("Filtering query params", () => { diff --git a/src/products/views/ProductList/filters.ts b/src/products/views/ProductList/filters.ts index 6ec02cd39..cc7c7f7ec 100644 --- a/src/products/views/ProductList/filters.ts +++ b/src/products/views/ProductList/filters.ts @@ -1,22 +1,20 @@ -import isArray from "lodash-es/isArray"; - -import { maybe, findValueInEnum } from "@saleor/misc"; +import { UseSearchResult } from "@saleor/hooks/makeSearch"; +import { findValueInEnum, maybe } from "@saleor/misc"; import { ProductFilterKeys, ProductListFilterOpts, ProductStatus } from "@saleor/products/components/ProductListPage"; -import { UseSearchResult } from "@saleor/hooks/makeSearch"; +import { + InitialProductFilterData_attributes_edges_node, + InitialProductFilterData_categories_edges_node, + InitialProductFilterData_collections_edges_node, + InitialProductFilterData_productTypes_edges_node +} from "@saleor/products/types/InitialProductFilterData"; import { SearchCategories, SearchCategoriesVariables } from "@saleor/searches/types/SearchCategories"; -import { - InitialProductFilterData_categories_edges_node, - InitialProductFilterData_collections_edges_node, - InitialProductFilterData_productTypes_edges_node, - InitialProductFilterData_attributes_edges_node -} from "@saleor/products/types/InitialProductFilterData"; import { SearchCollections, SearchCollectionsVariables @@ -25,6 +23,8 @@ import { SearchProductTypes, SearchProductTypesVariables } from "@saleor/searches/types/SearchProductTypes"; +import isArray from "lodash-es/isArray"; + import { IFilterElement } from "../../../components/Filter"; import { ProductFilterInput, @@ -33,17 +33,17 @@ import { import { createFilterTabUtils, createFilterUtils, + dedupeFilter, getGteLteVariables, getMinMaxQueryParam, - getSingleEnumValueQueryParam, - dedupeFilter, - getMultipleValueQueryParam + getMultipleValueQueryParam, + getSingleEnumValueQueryParam } from "../../../utils/filters"; import { ProductListUrlFilters, ProductListUrlFiltersEnum, - ProductListUrlQueryParams, - ProductListUrlFiltersWithMultipleValues + ProductListUrlFiltersWithMultipleValues, + ProductListUrlQueryParams } from "../../urls"; export const PRODUCT_FILTERS_KEY = "productFilters"; diff --git a/src/products/views/ProductList/fixtures.ts b/src/products/views/ProductList/fixtures.ts index 82c5812f5..ad31a116c 100644 --- a/src/products/views/ProductList/fixtures.ts +++ b/src/products/views/ProductList/fixtures.ts @@ -1,11 +1,11 @@ +import { attributes } from "@saleor/attributes/fixtures"; +import { categories } from "@saleor/categories/fixtures"; +import { collections } from "@saleor/collections/fixtures"; +import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; import { ProductListFilterOpts, ProductStatus } from "@saleor/products/components/ProductListPage"; -import { attributes } from "@saleor/attributes/fixtures"; -import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; -import { categories } from "@saleor/categories/fixtures"; -import { collections } from "@saleor/collections/fixtures"; import { productTypes } from "@saleor/productTypes/fixtures"; import { StockAvailability } from "@saleor/types/globalTypes"; diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index 91d28edd3..7906fb588 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -1,11 +1,9 @@ +import placeholderImg from "@assets/images/placeholder255x255.png"; import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - -import placeholderImg from "@assets/images/placeholder255x255.png"; import ActionDialog from "@saleor/components/ActionDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -15,8 +13,10 @@ import { commonMessages } from "@saleor/intl"; import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import { useWarehouseList } from "@saleor/warehouses/queries"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { getMutationState, maybe } from "../../../misc"; import ProductUpdatePage from "../../components/ProductUpdatePage"; import ProductUpdateOperations from "../../containers/ProductUpdateOperations"; @@ -31,11 +31,11 @@ import { productImageUrl, productListUrl, productUrl, + ProductUrlDialog, ProductUrlQueryParams, productVariantAddUrl, - productVariantEditUrl, - ProductUrlDialog, - productVariantCreatorUrl + productVariantCreatorUrl, + productVariantEditUrl } from "../../urls"; import { createImageReorderHandler, diff --git a/src/products/views/ProductUpdate/handlers.ts b/src/products/views/ProductUpdate/handlers.ts index 3d8f88340..805105203 100644 --- a/src/products/views/ProductUpdate/handlers.ts +++ b/src/products/views/ProductUpdate/handlers.ts @@ -5,9 +5,9 @@ import { ProductImageCreateVariables } from "@saleor/products/types/ProductImage import { ProductImageReorderVariables } from "@saleor/products/types/ProductImageReorder"; import { ProductUpdateVariables } from "@saleor/products/types/ProductUpdate"; import { SimpleProductUpdateVariables } from "@saleor/products/types/SimpleProductUpdate"; +import { mapFormsetStockToStockInput } from "@saleor/products/utils/data"; import { ReorderEvent } from "@saleor/types"; import { arrayMove } from "react-sortable-hoc"; -import { mapFormsetStockToStockInput } from "@saleor/products/utils/data"; export function createUpdateHandler( product: ProductDetails_product, diff --git a/src/products/views/ProductVariant.tsx b/src/products/views/ProductVariant.tsx index 5f9c10584..5891021d7 100644 --- a/src/products/views/ProductVariant.tsx +++ b/src/products/views/ProductVariant.tsx @@ -1,14 +1,14 @@ -import React, { useEffect, useState } from "react"; -import { useIntl } from "react-intl"; - import placeholderImg from "@assets/images/placeholder255x255.png"; +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import { useWarehouseList } from "@saleor/warehouses/queries"; +import React, { useEffect, useState } from "react"; +import { useIntl } from "react-intl"; + import { decimal } from "../../misc"; import ProductVariantDeleteDialog from "../components/ProductVariantDeleteDialog"; import ProductVariantPage, { @@ -24,8 +24,8 @@ import { productUrl, productVariantAddUrl, productVariantEditUrl, - ProductVariantEditUrlQueryParams, - ProductVariantEditUrlDialog + ProductVariantEditUrlDialog, + ProductVariantEditUrlQueryParams } from "../urls"; import { mapFormsetStockToStockInput } from "../utils/data"; diff --git a/src/products/views/ProductVariantCreate.tsx b/src/products/views/ProductVariantCreate.tsx index fce437e40..3598e7ddf 100644 --- a/src/products/views/ProductVariantCreate.tsx +++ b/src/products/views/ProductVariantCreate.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import { useIntl } from "react-intl"; - +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import { commonMessages } from "@saleor/intl"; import { useWarehouseList } from "@saleor/warehouses/queries"; +import React from "react"; +import { useIntl } from "react-intl"; + import { decimal } from "../../misc"; import ProductVariantCreatePage, { ProductVariantCreatePageSubmitData @@ -15,7 +15,7 @@ import ProductVariantCreatePage, { import { TypedVariantCreateMutation } from "../mutations"; import { TypedProductVariantCreateQuery } from "../queries"; import { VariantCreate } from "../types/VariantCreate"; -import { productUrl, productVariantEditUrl, productListUrl } from "../urls"; +import { productListUrl, productUrl, productVariantEditUrl } from "../urls"; interface ProductVariantCreateProps { productId: string; diff --git a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx index b6854c310..2002008db 100644 --- a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx +++ b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx @@ -1,13 +1,13 @@ +import { WindowTitle } from "@saleor/components/WindowTitle"; +import useNavigator from "@saleor/hooks/useNavigator"; +import useNotifier from "@saleor/hooks/useNotifier"; +import useShop from "@saleor/hooks/useShop"; +import { useProductVariantBulkCreateMutation } from "@saleor/products/mutations"; +import { useCreateMultipleVariantsData } from "@saleor/products/queries"; +import { productUrl } from "@saleor/products/urls"; import React from "react"; import { useIntl } from "react-intl"; -import { WindowTitle } from "@saleor/components/WindowTitle"; -import { useCreateMultipleVariantsData } from "@saleor/products/queries"; -import { useProductVariantBulkCreateMutation } from "@saleor/products/mutations"; -import useNavigator from "@saleor/hooks/useNavigator"; -import useNotifier from "@saleor/hooks/useNotifier"; -import { productUrl } from "@saleor/products/urls"; -import useShop from "@saleor/hooks/useShop"; import ProductVariantCreatorPage from "../../components/ProductVariantCreatorPage"; interface ProductVariantCreatorProps { diff --git a/src/queries.tsx b/src/queries.tsx index 708aa27b1..2dc861d5e 100644 --- a/src/queries.tsx +++ b/src/queries.tsx @@ -5,12 +5,12 @@ import React from "react"; import { Query, QueryResult } from "react-apollo"; import { useIntl } from "react-intl"; +import { isJwtError } from "./auth/errors"; import useAppState from "./hooks/useAppState"; import useNotifier from "./hooks/useNotifier"; +import useUser from "./hooks/useUser"; import { commonMessages } from "./intl"; import { maybe, RequireAtLeastOne } from "./misc"; -import { isJwtError } from "./auth/errors"; -import useUser from "./hooks/useUser"; export interface LoadMore { loadMore: ( diff --git a/src/searches/useCategorySearch.ts b/src/searches/useCategorySearch.ts index c8c9f5438..9afd24740 100644 --- a/src/searches/useCategorySearch.ts +++ b/src/searches/useCategorySearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchCategories, SearchCategoriesVariables diff --git a/src/searches/useCollectionSearch.ts b/src/searches/useCollectionSearch.ts index cc58e751f..8c4bf3b87 100644 --- a/src/searches/useCollectionSearch.ts +++ b/src/searches/useCollectionSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchCollections, SearchCollectionsVariables diff --git a/src/searches/useCustomerSearch.ts b/src/searches/useCustomerSearch.ts index a6ac2f0eb..07d890a8e 100644 --- a/src/searches/useCustomerSearch.ts +++ b/src/searches/useCustomerSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchCustomers, SearchCustomersVariables diff --git a/src/searches/usePageSearch.ts b/src/searches/usePageSearch.ts index ec67fd33e..1218a8f77 100644 --- a/src/searches/usePageSearch.ts +++ b/src/searches/usePageSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchPages, SearchPagesVariables } from "./types/SearchPages"; export const searchPages = gql` diff --git a/src/searches/usePermissionGroupSearch.ts b/src/searches/usePermissionGroupSearch.ts index edae98092..d4730b3fd 100644 --- a/src/searches/usePermissionGroupSearch.ts +++ b/src/searches/usePermissionGroupSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchPermissionGroups, SearchPermissionGroupsVariables diff --git a/src/searches/useProductSearch.ts b/src/searches/useProductSearch.ts index d98bad835..295db0da5 100644 --- a/src/searches/useProductSearch.ts +++ b/src/searches/useProductSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchProducts, SearchProductsVariables diff --git a/src/searches/useProductTypeSearch.ts b/src/searches/useProductTypeSearch.ts index 60517f670..9097eb75e 100644 --- a/src/searches/useProductTypeSearch.ts +++ b/src/searches/useProductTypeSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchProductTypes, SearchProductTypesVariables diff --git a/src/searches/useServiceAccountSearch.ts b/src/searches/useServiceAccountSearch.ts index 542e550f3..99b56296e 100644 --- a/src/searches/useServiceAccountSearch.ts +++ b/src/searches/useServiceAccountSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchServiceAccount, SearchServiceAccountVariables diff --git a/src/searches/useStaffMemberSearch.ts b/src/searches/useStaffMemberSearch.ts index 87c007c33..ef1628f91 100644 --- a/src/searches/useStaffMemberSearch.ts +++ b/src/searches/useStaffMemberSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchStaffMembers, SearchStaffMembersVariables diff --git a/src/searches/useWarehouseSearch.ts b/src/searches/useWarehouseSearch.ts index b5b0e6048..c7a21056b 100644 --- a/src/searches/useWarehouseSearch.ts +++ b/src/searches/useWarehouseSearch.ts @@ -1,7 +1,7 @@ -import gql from "graphql-tag"; - import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; import { pageInfoFragment } from "@saleor/queries"; +import gql from "graphql-tag"; + import { SearchWarehouses, SearchWarehousesVariables diff --git a/src/services/components/ServiceCreatePage/ServiceCreatePage.stories.tsx b/src/services/components/ServiceCreatePage/ServiceCreatePage.stories.tsx index 3f0dce218..12f60b22f 100644 --- a/src/services/components/ServiceCreatePage/ServiceCreatePage.stories.tsx +++ b/src/services/components/ServiceCreatePage/ServiceCreatePage.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { permissions } from "@saleor/fixtures"; import Decorator from "@saleor/storybook/Decorator"; import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import ServiceCreatePage, { ServiceCreatePageProps } from "./ServiceCreatePage"; const props: ServiceCreatePageProps = { diff --git a/src/services/components/ServiceCreatePage/ServiceCreatePage.tsx b/src/services/components/ServiceCreatePage/ServiceCreatePage.tsx index 22edb1f59..994ca547a 100644 --- a/src/services/components/ServiceCreatePage/ServiceCreatePage.tsx +++ b/src/services/components/ServiceCreatePage/ServiceCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AccountPermissions from "@saleor/components/AccountPermissions"; import AccountStatus from "@saleor/components/AccountStatus"; import AppHeader from "@saleor/components/AppHeader"; @@ -12,11 +9,14 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { sectionNames } from "@saleor/intl"; import { PermissionEnum } from "@saleor/types/globalTypes"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { useIntl } from "react-intl"; + import ServiceInfo from "../ServiceInfo"; export interface ServiceCreatePageFormData { diff --git a/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.stories.tsx b/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.stories.tsx index c43118c72..ed1798913 100644 --- a/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.stories.tsx +++ b/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.stories.tsx @@ -1,7 +1,7 @@ +import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; import ServiceDeleteDialog, { ServiceDeleteDialogProps } from "./ServiceDeleteDialog"; diff --git a/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.tsx b/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.tsx index ec83a9494..e69723343 100644 --- a/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.tsx +++ b/src/services/components/ServiceDeleteDialog/ServiceDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ServiceDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx b/src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx index f3f705011..d4d22cd0f 100644 --- a/src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx +++ b/src/services/components/ServiceDetailsPage/ServiceDetailsPage.stories.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { permissions } from "@saleor/fixtures"; import Decorator from "@saleor/storybook/Decorator"; import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { service } from "../../fixtures"; import ServiceDetailsPage, { ServiceDetailsPageProps diff --git a/src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx b/src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx index ebd9296ae..b4a3234cd 100644 --- a/src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx +++ b/src/services/components/ServiceDetailsPage/ServiceDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AccountPermissions from "@saleor/components/AccountPermissions"; import AccountStatus from "@saleor/components/AccountStatus"; import AppHeader from "@saleor/components/AppHeader"; @@ -12,13 +9,16 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; +import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { sectionNames } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ServiceDetails_serviceAccount } from "@saleor/services/types/ServiceDetails"; import { PermissionEnum } from "@saleor/types/globalTypes"; -import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { useIntl } from "react-intl"; + import ServiceDefaultToken from "../ServiceDefaultToken"; import ServiceInfo from "../ServiceInfo"; import ServiceTokens from "../ServiceTokens"; diff --git a/src/services/components/ServiceInfo/ServiceInfo.tsx b/src/services/components/ServiceInfo/ServiceInfo.tsx index 1dbdba2c3..bd09460e3 100644 --- a/src/services/components/ServiceInfo/ServiceInfo.tsx +++ b/src/services/components/ServiceInfo/ServiceInfo.tsx @@ -1,14 +1,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; -import { FormChange } from "@saleor/hooks/useForm"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { FormChange } from "@saleor/hooks/useForm"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { useIntl } from "react-intl"; export interface ServiceInfoProps { data: { diff --git a/src/services/components/ServiceList/ServiceList.tsx b/src/services/components/ServiceList/ServiceList.tsx index 0d1ec61ae..ce6d0ae37 100644 --- a/src/services/components/ServiceList/ServiceList.tsx +++ b/src/services/components/ServiceList/ServiceList.tsx @@ -8,17 +8,17 @@ import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; +import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; +import TablePagination from "@saleor/components/TablePagination"; +import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; +import { ServiceListUrlSortField } from "@saleor/services/urls"; +import { ListProps, SortPage } from "@saleor/types"; +import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage } from "react-intl"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import Skeleton from "@saleor/components/Skeleton"; -import TablePagination from "@saleor/components/TablePagination"; -import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; -import { ListProps, SortPage } from "@saleor/types"; -import { ServiceListUrlSortField } from "@saleor/services/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; -import { getArrowDirection } from "@saleor/utils/sort"; import { ServiceList_serviceAccounts_edges_node } from "../../types/ServiceList"; export interface ServiceListProps diff --git a/src/services/components/ServiceListPage/ServiceListPage.stories.tsx b/src/services/components/ServiceListPage/ServiceListPage.stories.tsx index d3f5d74e1..88441c338 100644 --- a/src/services/components/ServiceListPage/ServiceListPage.stories.tsx +++ b/src/services/components/ServiceListPage/ServiceListPage.stories.tsx @@ -1,19 +1,19 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "@saleor/fixtures"; import ServiceListPage, { ServiceListPageProps } from "@saleor/services/components/ServiceListPage"; -import Decorator from "@saleor/storybook/Decorator"; import { ServiceListUrlSortField } from "@saleor/services/urls"; +import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { serviceList } from "../../fixtures"; const props: ServiceListPageProps = { diff --git a/src/services/components/ServiceListPage/ServiceListPage.tsx b/src/services/components/ServiceListPage/ServiceListPage.tsx index e3c6c2dc7..32c8fe559 100644 --- a/src/services/components/ServiceListPage/ServiceListPage.tsx +++ b/src/services/components/ServiceListPage/ServiceListPage.tsx @@ -1,26 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import AppHeader from "@saleor/components/AppHeader"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { ServiceListUrlSortField } from "@saleor/services/urls"; +import { + FilterPageProps, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import AppHeader from "@saleor/components/AppHeader"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - PageListProps, - TabPageProps, - SortPage, - FilterPageProps -} from "@saleor/types"; -import { ServiceListUrlSortField } from "@saleor/services/urls"; import { ServiceList_serviceAccounts_edges_node } from "../../types/ServiceList"; import ServiceList from "../ServiceList"; import { + createFilterStructure, ServiceFilterKeys, - ServiceListFilterOpts, - createFilterStructure + ServiceListFilterOpts } from "./filters"; export interface ServiceListPageProps diff --git a/src/services/components/ServiceListPage/filters.ts b/src/services/components/ServiceListPage/filters.ts index cf864cf54..fac9349ac 100644 --- a/src/services/components/ServiceListPage/filters.ts +++ b/src/services/components/ServiceListPage/filters.ts @@ -1,9 +1,8 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { FilterOpts } from "@saleor/types"; import { IFilter } from "@saleor/components/Filter"; -import { createBooleanField } from "@saleor/utils/filters/fields"; import { commonMessages } from "@saleor/intl"; +import { FilterOpts } from "@saleor/types"; +import { createBooleanField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum ServiceFilterKeys { active = "active" diff --git a/src/services/components/ServiceTokenCreateDialog/ServiceTokenCreateDialog.tsx b/src/services/components/ServiceTokenCreateDialog/ServiceTokenCreateDialog.tsx index 782d1e500..e8e4e707b 100644 --- a/src/services/components/ServiceTokenCreateDialog/ServiceTokenCreateDialog.tsx +++ b/src/services/components/ServiceTokenCreateDialog/ServiceTokenCreateDialog.tsx @@ -5,12 +5,9 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import Paper from "@material-ui/core/Paper"; import { makeStyles } from "@material-ui/core/styles"; +import { fade } from "@material-ui/core/styles/colorManipulator"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - -import { fade } from "@material-ui/core/styles/colorManipulator"; import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton, { ConfirmButtonTransitionState @@ -19,6 +16,8 @@ import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import { buttonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ServiceTokenCreateDialogProps { confirmButtonState: ConfirmButtonTransitionState; @@ -54,9 +53,7 @@ function handleCopy(token: string) { navigator.clipboard.writeText(token); } -const ServiceTokenCreateDialog: React.FC< - ServiceTokenCreateDialogProps -> = props => { +const ServiceTokenCreateDialog: React.FC = props => { const { confirmButtonState, open, token, onClose, onCreate } = props; const [step, setStep] = React.useState("form"); const intl = useIntl(); diff --git a/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.stories.tsx b/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.stories.tsx index d1fcc2641..f1a9ad0f7 100644 --- a/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.stories.tsx +++ b/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.stories.tsx @@ -1,7 +1,7 @@ +import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; import ServiceTokenDeleteDialog, { ServiceTokenDeleteDialogProps } from "./ServiceTokenDeleteDialog"; diff --git a/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.tsx b/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.tsx index a7dd61d86..099aedaa6 100644 --- a/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.tsx +++ b/src/services/components/ServiceTokenDeleteDialog/ServiceTokenDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ServiceTokenDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/services/components/ServiceTokens/ServiceTokens.tsx b/src/services/components/ServiceTokens/ServiceTokens.tsx index e0c6e39a1..07fab1f04 100644 --- a/src/services/components/ServiceTokens/ServiceTokens.tsx +++ b/src/services/components/ServiceTokens/ServiceTokens.tsx @@ -7,14 +7,13 @@ import TableCell from "@material-ui/core/TableCell"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import { maybe, renderCollection } from "@saleor/misc"; import { ServiceDetailsFragment_tokens } from "@saleor/services/types/ServiceDetailsFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ServiceTokensProps { tokens: ServiceDetailsFragment_tokens[]; diff --git a/src/services/index.tsx b/src/services/index.tsx index 7c97a2577..8434da9b2 100644 --- a/src/services/index.tsx +++ b/src/services/index.tsx @@ -1,18 +1,18 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { serviceAddPath, serviceListPath, ServiceListUrlQueryParams, + ServiceListUrlSortField, servicePath, - ServiceUrlQueryParams, - ServiceListUrlSortField + ServiceUrlQueryParams } from "./urls"; import ServiceCreate from "./views/ServiceCreate"; import ServiceDetailsComponent from "./views/ServiceDetails"; diff --git a/src/services/mutations.ts b/src/services/mutations.ts index af9d5db6a..d8230b766 100644 --- a/src/services/mutations.ts +++ b/src/services/mutations.ts @@ -1,6 +1,6 @@ +import { accountErrorFragment } from "@saleor/customers/mutations"; import gql from "graphql-tag"; -import { accountErrorFragment } from "@saleor/customers/mutations"; import { TypedMutation } from "../mutations"; import { serviceDetailsFragment, serviceFragment } from "./queries"; import { ServiceCreate, ServiceCreateVariables } from "./types/ServiceCreate"; diff --git a/src/services/queries.ts b/src/services/queries.ts index c6e224820..1e97f0720 100644 --- a/src/services/queries.ts +++ b/src/services/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { pageInfoFragment, TypedQuery } from "../queries"; import { ServiceDetails, diff --git a/src/services/urls.ts b/src/services/urls.ts index 4f5a29d1d..aef61de6f 100644 --- a/src/services/urls.ts +++ b/src/services/urls.ts @@ -7,8 +7,8 @@ import { Filters, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; export const serviceSection = "/services/"; diff --git a/src/services/views/ServiceCreate/ServiceCreate.tsx b/src/services/views/ServiceCreate/ServiceCreate.tsx index efe6e8b7a..c7dfd1afa 100644 --- a/src/services/views/ServiceCreate/ServiceCreate.tsx +++ b/src/services/views/ServiceCreate/ServiceCreate.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -8,6 +5,9 @@ import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { ServiceCreateMutation } from "@saleor/services/mutations"; import { ServiceCreate as ServiceCreateData } from "@saleor/services/types/ServiceCreate"; +import React from "react"; +import { useIntl } from "react-intl"; + import ServiceCreatePage, { ServiceCreatePageFormData } from "../../components/ServiceCreatePage"; diff --git a/src/services/views/ServiceDetails/ServiceDetails.tsx b/src/services/views/ServiceDetails/ServiceDetails.tsx index 7cbf86008..1c50ee0d9 100644 --- a/src/services/views/ServiceDetails/ServiceDetails.tsx +++ b/src/services/views/ServiceDetails/ServiceDetails.tsx @@ -1,13 +1,11 @@ -import React from "react"; -import { useIntl } from "react-intl"; - +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { API_URI } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import ServiceDeleteDialog from "@saleor/services/components/ServiceDeleteDialog"; import ServiceTokenCreateDialog from "@saleor/services/components/ServiceTokenCreateDialog"; import ServiceTokenDeleteDialog from "@saleor/services/components/ServiceTokenDeleteDialog"; @@ -22,7 +20,9 @@ import { ServiceTokenCreate } from "@saleor/services/types/ServiceTokenCreate"; import { ServiceTokenDelete } from "@saleor/services/types/ServiceTokenDelete"; import { ServiceUpdate } from "@saleor/services/types/ServiceUpdate"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { useIntl } from "react-intl"; + import ServiceDetailsPage, { ServiceDetailsPageFormData } from "../../components/ServiceDetailsPage"; diff --git a/src/services/views/ServiceList/ServiceList.tsx b/src/services/views/ServiceList/ServiceList.tsx index 6c06fde1b..330a79fa3 100644 --- a/src/services/views/ServiceList/ServiceList.tsx +++ b/src/services/views/ServiceList/ServiceList.tsx @@ -1,27 +1,27 @@ -import React from "react"; +import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; +import SaveFilterTabDialog, { + SaveFilterTabDialogFormData +} from "@saleor/components/SaveFilterTabDialog"; +import { configurationMenuUrl } from "@saleor/configuration"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; -import { useIntl } from "react-intl"; - -import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; -import SaveFilterTabDialog, { - SaveFilterTabDialogFormData -} from "@saleor/components/SaveFilterTabDialog"; -import { configurationMenuUrl } from "@saleor/configuration"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import { ServiceDeleteMutation } from "@saleor/services/mutations"; import { ServiceDelete } from "@saleor/services/types/ServiceDelete"; import { ListViews } from "@saleor/types"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import useShop from "@saleor/hooks/useShop"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import React from "react"; +import { useIntl } from "react-intl"; + import ServiceDeleteDialog from "../../components/ServiceDeleteDialog"; import ServiceListPage from "../../components/ServiceListPage"; import { useServiceListQuery } from "../../queries"; @@ -36,11 +36,11 @@ import { areFiltersApplied, deleteFilterTab, getActiveFilters, - getFilterTabs, + getFilterOpts, getFilterQueryParam, + getFilterTabs, getFilterVariables, - saveFilterTab, - getFilterOpts + saveFilterTab } from "./filters"; import { getSortQueryVariables } from "./sort"; diff --git a/src/services/views/ServiceList/filters.test.ts b/src/services/views/ServiceList/filters.test.ts index e52fe2de1..e05e95c53 100644 --- a/src/services/views/ServiceList/filters.test.ts +++ b/src/services/views/ServiceList/filters.test.ts @@ -1,12 +1,12 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { ServiceListUrlFilters } from "@saleor/services/urls"; import { createFilterStructure } from "@saleor/services/components/ServiceListPage"; +import { ServiceListUrlFilters } from "@saleor/services/urls"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/services/views/ServiceList/filters.ts b/src/services/views/ServiceList/filters.ts index f8eaddd18..2ff6f36a5 100644 --- a/src/services/views/ServiceList/filters.ts +++ b/src/services/views/ServiceList/filters.ts @@ -1,20 +1,21 @@ -import { ServiceAccountFilterInput } from "@saleor/types/globalTypes"; -import { - ServiceListFilterOpts, - ServiceFilterKeys -} from "@saleor/services/components/ServiceListPage/filters"; -import { maybe, parseBoolean } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; +import { maybe, parseBoolean } from "@saleor/misc"; import { - ServiceListUrlFilters, - ServiceListUrlFiltersEnum, - ServiceListUrlQueryParams -} from "../../urls"; + ServiceFilterKeys, + ServiceListFilterOpts +} from "@saleor/services/components/ServiceListPage/filters"; +import { ServiceAccountFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, getSingleValueQueryParam } from "../../../utils/filters"; +import { + ServiceListUrlFilters, + ServiceListUrlFiltersEnum, + ServiceListUrlQueryParams +} from "../../urls"; export const STAFF_FILTERS_KEY = "staffFilters"; diff --git a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx index 2b6e6d25f..4d7dec6c5 100644 --- a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx +++ b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx @@ -2,14 +2,14 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Form from "@saleor/components/Form"; import Hr from "@saleor/components/Hr"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { buttonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { WeightUnitsEnum } from "../../../types/globalTypes"; export interface FormData { diff --git a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx index 4315c31c1..e6c9bfefe 100644 --- a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx +++ b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx @@ -3,28 +3,27 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; import makeStyles from "@material-ui/core/styles/makeStyles"; - +import TextField from "@material-ui/core/TextField"; +import CompanyAddressForm from "@saleor/components/CompanyAddressInput/CompanyAddressForm"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import { DialogProps } from "@saleor/types"; -import { AddressTypeInput } from "@saleor/customers/types"; -import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; -import CompanyAddressForm from "@saleor/components/CompanyAddressInput/CompanyAddressForm"; -import { buttonMessages } from "@saleor/intl"; -import Hr from "@saleor/components/Hr"; import Form from "@saleor/components/Form"; -import useAddressValidation from "@saleor/hooks/useAddressValidation"; -import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; -import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import FormSpacer from "@saleor/components/FormSpacer"; +import Hr from "@saleor/components/Hr"; +import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; +import { AddressTypeInput } from "@saleor/customers/types"; +import useAddressValidation from "@saleor/hooks/useAddressValidation"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; +import useStateFromProps from "@saleor/hooks/useStateFromProps"; +import { buttonMessages } from "@saleor/intl"; +import { DialogProps } from "@saleor/types"; +import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface ShippingZoneAddWarehouseDialogSubmitData extends AddressTypeInput { diff --git a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx index a54823b9b..a5b5f59e5 100644 --- a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx +++ b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx @@ -9,10 +9,6 @@ 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 { filter } from "fuzzaldrin"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { ConfirmButtonTransitionState @@ -23,6 +19,9 @@ import Hr from "@saleor/components/Hr"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { buttonMessages } from "@saleor/intl"; +import { filter } from "fuzzaldrin"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface FormData { countries: string[]; @@ -61,9 +60,7 @@ const useStyles = makeStyles( }), { name: "ShippingZoneCountriesAssignDialog" } ); -const ShippingZoneCountriesAssignDialog: React.FC< - ShippingZoneCountriesAssignDialogProps -> = props => { +const ShippingZoneCountriesAssignDialog: React.FC = props => { const { confirmButtonState, isDefault, diff --git a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx index 088f69aa1..de5985a98 100644 --- a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx +++ b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -12,6 +9,9 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { sectionNames } from "@saleor/intl"; import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; + import { CountryFragment } from "../../../taxes/types/CountryFragment"; import ShippingZoneCountriesAssignDialog from "../ShippingZoneCountriesAssignDialog"; import ShippingZoneInfo from "../ShippingZoneInfo"; diff --git a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx index 84167ace5..72d77ee0f 100644 --- a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx +++ b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -8,13 +5,16 @@ import Container from "@saleor/components/Container"; import CountryList from "@saleor/components/CountryList"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; +import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; -import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; +import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { getStringOrPlaceholder } from "../../../misc"; import { FetchMoreProps, SearchProps } from "../../../types"; import { ShippingMethodTypeEnum } from "../../../types/globalTypes"; diff --git a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx index 6aeacf402..4e01737c0 100644 --- a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx +++ b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx @@ -1,14 +1,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import { commonMessages } from "@saleor/intl"; +import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; import { getFormErrors } from "@saleor/utils/errors"; import getShippingErrorMessage from "@saleor/utils/errors/shipping"; -import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; export interface ShippingZoneInfoProps { data: Record<"name", string>; diff --git a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx index 5db9aaed9..c9024c07f 100644 --- a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx +++ b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx @@ -6,9 +6,6 @@ import DialogTitle from "@material-ui/core/DialogTitle"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -17,11 +14,14 @@ import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; -import { buttonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; -import getShippingErrorMessage from "@saleor/utils/errors/shipping"; +import { buttonMessages } from "@saleor/intl"; import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; +import getShippingErrorMessage from "@saleor/utils/errors/shipping"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { ShippingMethodTypeEnum } from "../../../types/globalTypes"; import { ShippingZoneDetailsFragment_shippingMethods } from "../../types/ShippingZoneDetailsFragment"; diff --git a/src/shipping/components/ShippingZoneRateDialog/errors.ts b/src/shipping/components/ShippingZoneRateDialog/errors.ts index a7dda3903..48296b16f 100644 --- a/src/shipping/components/ShippingZoneRateDialog/errors.ts +++ b/src/shipping/components/ShippingZoneRateDialog/errors.ts @@ -1,7 +1,7 @@ -import { IntlShape, defineMessages } from "react-intl"; - import { ShippingErrorCode } from "@saleor/types/globalTypes"; import getShippingErrorMessage from "@saleor/utils/errors/shipping"; +import { defineMessages, IntlShape } from "react-intl"; + import { ShippingErrorFragment } from "../../types/ShippingErrorFragment"; const messages = defineMessages({ diff --git a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx index 7854d0a0c..b6b269b3a 100644 --- a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx +++ b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx @@ -7,9 +7,6 @@ import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import IconButtonTableCell from "@saleor/components/IconButtonTableCell"; import Money from "@saleor/components/Money"; @@ -17,6 +14,9 @@ import MoneyRange from "@saleor/components/MoneyRange"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import WeightRange from "@saleor/components/WeightRange"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { ICONBUTTON_SIZE } from "../../../theme"; import { ShippingZoneDetailsFragment_shippingMethods } from "../../types/ShippingZoneDetailsFragment"; diff --git a/src/shipping/components/ShippingZoneWarehouses/ShippingZoneWarehouses.tsx b/src/shipping/components/ShippingZoneWarehouses/ShippingZoneWarehouses.tsx index e34264660..2db7806bb 100644 --- a/src/shipping/components/ShippingZoneWarehouses/ShippingZoneWarehouses.tsx +++ b/src/shipping/components/ShippingZoneWarehouses/ShippingZoneWarehouses.tsx @@ -1,14 +1,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; -import { FetchMoreProps, SearchProps } from "@saleor/types"; -import { FormChange } from "@saleor/hooks/useForm"; import MultiAutocompleteSelectField, { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { FormChange } from "@saleor/hooks/useForm"; +import { FetchMoreProps, SearchProps } from "@saleor/types"; +import React from "react"; +import { useIntl } from "react-intl"; interface ShippingZoneWarehousesFormData { warehouses: string[]; diff --git a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx index 10295a3fe..08452331f 100644 --- a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx +++ b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx @@ -7,9 +7,6 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import Checkbox from "@saleor/components/Checkbox"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -19,6 +16,9 @@ import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; import { ICONBUTTON_SIZE } from "@saleor/theme"; import { ListActions, ListProps } from "@saleor/types"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { ShippingZoneFragment } from "../../types/ShippingZoneFragment"; export interface ShippingZonesListProps extends ListProps, ListActions { diff --git a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx index 005dcbe34..d723eca7a 100644 --- a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx +++ b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; @@ -9,6 +6,9 @@ import RequirePermissions from "@saleor/components/RequirePermissions"; import { sectionNames } from "@saleor/intl"; import { ListActions, PageListProps, UserPermissionProps } from "@saleor/types"; import { PermissionEnum, WeightUnitsEnum } from "@saleor/types/globalTypes"; +import React from "react"; +import { useIntl } from "react-intl"; + import { ShippingZoneFragment } from "../../types/ShippingZoneFragment"; import ShippingWeightUnitForm from "../ShippingWeightUnitForm"; import ShippingZonesList from "../ShippingZonesList"; diff --git a/src/shipping/index.tsx b/src/shipping/index.tsx index b5f2738fc..32bdd7f7b 100644 --- a/src/shipping/index.tsx +++ b/src/shipping/index.tsx @@ -1,9 +1,9 @@ +import { sectionNames } from "@saleor/intl"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; import { WindowTitle } from "../components/WindowTitle"; import { shippingZoneAddPath, @@ -25,9 +25,9 @@ const ShippingZonesList: React.FC> = ({ location }) => { interface ShippingZoneDetailsRouteProps { id: string; } -const ShippingZoneDetails: React.FC< - RouteComponentProps -> = ({ location, match }) => { +const ShippingZoneDetails: React.FC> = ({ location, match }) => { const qs = parseQs(location.search.substr(1)); const params: ShippingZoneUrlQueryParams = qs; return ( diff --git a/src/shipping/mutations.ts b/src/shipping/mutations.ts index 83ffa811a..cbd974e2d 100644 --- a/src/shipping/mutations.ts +++ b/src/shipping/mutations.ts @@ -1,6 +1,6 @@ +import makeMutation from "@saleor/hooks/makeMutation"; import gql from "graphql-tag"; -import makeMutation from "@saleor/hooks/makeMutation"; import { countryFragment } from "../taxes/queries"; import { shippingMethodFragment, shippingZoneDetailsFragment } from "./queries"; import { diff --git a/src/shipping/queries.ts b/src/shipping/queries.ts index 771a32b3f..cc7bdc146 100644 --- a/src/shipping/queries.ts +++ b/src/shipping/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { pageInfoFragment } from "../queries"; import { ShippingZone, ShippingZoneVariables } from "./types/ShippingZone"; import { ShippingZones, ShippingZonesVariables } from "./types/ShippingZones"; diff --git a/src/shipping/views/ShippingZoneCreate.tsx b/src/shipping/views/ShippingZoneCreate.tsx index 95928cc08..78e27b94e 100644 --- a/src/shipping/views/ShippingZoneCreate.tsx +++ b/src/shipping/views/ShippingZoneCreate.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import ShippingZoneCreatePage from "../components/ShippingZoneCreatePage"; import { useShippingZoneCreate } from "../mutations"; import { shippingZonesListUrl, shippingZoneUrl } from "../urls"; diff --git a/src/shipping/views/ShippingZoneDetails/data.ts b/src/shipping/views/ShippingZoneDetails/data.ts index 0aadca15c..5ad49ce11 100644 --- a/src/shipping/views/ShippingZoneDetails/data.ts +++ b/src/shipping/views/ShippingZoneDetails/data.ts @@ -1,7 +1,8 @@ +import { CreateShippingRateVariables } from "@saleor/shipping/types/CreateShippingRate"; +import { UpdateShippingRateVariables } from "@saleor/shipping/types/UpdateShippingRate"; import { ShippingZoneUrlQueryParams } from "@saleor/shipping/urls"; import { ShippingMethodTypeEnum } from "@saleor/types/globalTypes"; -import { UpdateShippingRateVariables } from "@saleor/shipping/types/UpdateShippingRate"; -import { CreateShippingRateVariables } from "@saleor/shipping/types/CreateShippingRate"; + import { FormData as ShippingZoneRateDialogFormData } from "../../components/ShippingZoneRateDialog"; export function getCreateShippingRateVariables( diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 5bb5f6791..8087fcdd7 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -1,32 +1,32 @@ -import { diff } from "fast-array-diff"; import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; +import NotFoundPage from "@saleor/components/NotFoundPage"; +import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; import useWarehouseSearch from "@saleor/searches/useWarehouseSearch"; -import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import ShippingZoneAddWarehouseDialog from "@saleor/shipping/components/ShippingZoneAddWarehouseDialog"; +import ShippingZoneCountriesAssignDialog from "@saleor/shipping/components/ShippingZoneCountriesAssignDialog"; +import ShippingZoneRateDialog from "@saleor/shipping/components/ShippingZoneRateDialog"; import { useShippingRateCreate, - useShippingRateUpdate, useShippingRateDelete, + useShippingRateUpdate, useShippingZoneDelete, useShippingZoneUpdate } from "@saleor/shipping/mutations"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import ShippingZoneRateDialog from "@saleor/shipping/components/ShippingZoneRateDialog"; -import useShop from "@saleor/hooks/useShop"; -import ShippingZoneCountriesAssignDialog from "@saleor/shipping/components/ShippingZoneCountriesAssignDialog"; -import NotFoundPage from "@saleor/components/NotFoundPage"; -import ShippingZoneAddWarehouseDialog from "@saleor/shipping/components/ShippingZoneAddWarehouseDialog"; import { useWarehouseCreate } from "@saleor/warehouses/mutations"; -import { getStringOrPlaceholder, findValueInEnum } from "../../../misc"; +import { diff } from "fast-array-diff"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + +import { findValueInEnum, getStringOrPlaceholder } from "../../../misc"; import { - ShippingMethodTypeEnum, - CountryCode + CountryCode, + ShippingMethodTypeEnum } from "../../../types/globalTypes"; import ShippingZoneDetailsPage, { FormData @@ -35,8 +35,8 @@ import { useShippingZone } from "../../queries"; import { shippingZonesListUrl, shippingZoneUrl, - ShippingZoneUrlQueryParams, - ShippingZoneUrlDialog + ShippingZoneUrlDialog, + ShippingZoneUrlQueryParams } from "../../urls"; import { getCreateShippingRateVariables, diff --git a/src/shipping/views/ShippingZonesList.tsx b/src/shipping/views/ShippingZonesList.tsx index dd2ab2241..84dc027e9 100644 --- a/src/shipping/views/ShippingZonesList.tsx +++ b/src/shipping/views/ShippingZonesList.tsx @@ -1,9 +1,6 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -16,22 +13,25 @@ import usePaginator, { import useShop from "@saleor/hooks/useShop"; import useUser from "@saleor/hooks/useUser"; import { commonMessages } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import ShippingZonesListPage from "../components/ShippingZonesListPage"; import { + useDefaultWeightUnitUpdate, useShippingZoneBulkDelete, - useShippingZoneDelete, - useDefaultWeightUnitUpdate + useShippingZoneDelete } from "../mutations"; import { useShippingZoneList } from "../queries"; import { shippingZoneAddUrl, shippingZonesListUrl, + ShippingZonesListUrlDialog, ShippingZonesListUrlQueryParams, - shippingZoneUrl, - ShippingZonesListUrlDialog + shippingZoneUrl } from "../urls"; interface ShippingZonesListProps { diff --git a/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx b/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx index 1ab493c03..75d7407f4 100644 --- a/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx +++ b/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.tsx @@ -1,15 +1,15 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; import getShopErrorMessage from "@saleor/utils/errors/shop"; +import React from "react"; +import { useIntl } from "react-intl"; + import { SiteSettingsPageFormData } from "../SiteSettingsPage"; interface SiteSettingsDetailsProps { diff --git a/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.tsx b/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.tsx index 11d394df0..1478fd76f 100644 --- a/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.tsx +++ b/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.tsx @@ -4,17 +4,17 @@ 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 React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Form from "@saleor/components/Form"; import { FormSpacer } from "@saleor/components/FormSpacer"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { buttonMessages } from "@saleor/intl"; +import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; import { DialogProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; -import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; import getShopErrorMessage from "@saleor/utils/errors/shop"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { authorizationKeyTypes } from "../../../misc"; import { AuthorizationKeyType } from "../../../types/globalTypes"; diff --git a/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx b/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx index 5f67358a8..4933c7862 100644 --- a/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx +++ b/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx @@ -7,12 +7,12 @@ import TableCell from "@material-ui/core/TableCell"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { authorizationKeyTypes, maybe, renderCollection } from "../../../misc"; import { ICONBUTTON_SIZE } from "../../../theme"; import { AuthorizationKeyType } from "../../../types/globalTypes"; diff --git a/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx b/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx index 514e724a9..71ed8de36 100644 --- a/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx +++ b/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx @@ -3,15 +3,14 @@ import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; -import { getFormErrors } from "@saleor/utils/errors"; import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; import getShopErrorMessage from "@saleor/utils/errors/shop"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface SiteSettingsMailingFormData { defaultMailSenderName: string; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 7fa681fa7..45f5d4942 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -1,9 +1,7 @@ import { makeStyles } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; +import CompanyAddressInput from "@saleor/components/CompanyAddressInput"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; @@ -14,10 +12,12 @@ import SaveButtonBar from "@saleor/components/SaveButtonBar"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { commonMessages, sectionNames } from "@saleor/intl"; +import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices } from "@saleor/utils/maps"; -import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; -import CompanyAddressInput from "@saleor/components/CompanyAddressInput"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { AuthorizationKeyType } from "../../../types/globalTypes"; import { SiteSettings_shop } from "../../types/SiteSettings"; diff --git a/src/siteSettings/queries.ts b/src/siteSettings/queries.ts index d4e01c203..12364ce05 100644 --- a/src/siteSettings/queries.ts +++ b/src/siteSettings/queries.ts @@ -1,4 +1,5 @@ import gql from "graphql-tag"; + import { fragmentAddress } from "../orders/queries"; import { TypedQuery } from "../queries"; import { SiteSettings } from "./types/SiteSettings"; diff --git a/src/siteSettings/views/index.tsx b/src/siteSettings/views/index.tsx index 2d33440d7..0a6eb29fb 100644 --- a/src/siteSettings/views/index.tsx +++ b/src/siteSettings/views/index.tsx @@ -1,9 +1,8 @@ -import React from "react"; - import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; import { useIntl } from "react-intl"; import { configurationMenuUrl } from "../../configuration"; diff --git a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx index 3d8760900..a229643eb 100644 --- a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx +++ b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import Button from "@material-ui/core/Button"; import Dialog from "@material-ui/core/Dialog"; import DialogActions from "@material-ui/core/DialogActions"; @@ -13,13 +10,15 @@ import ConfirmButton, { } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { buttonMessages, commonMessages } from "@saleor/intl"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; -import { getFormErrors } from "@saleor/utils/errors"; -import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; +import { buttonMessages, commonMessages } from "@saleor/intl"; import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; import { FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { getFormErrors } from "@saleor/utils/errors"; import getStaffErrorMessage from "@saleor/utils/errors/staff"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface AddMemberFormData { email: string; diff --git a/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx b/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx index 0712de9cb..734a55718 100644 --- a/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx +++ b/src/staff/components/StaffDetailsPage/StaffDetailsPage.stories.tsx @@ -1,12 +1,12 @@ import { Omit } from "@material-ui/core"; -import { storiesOf } from "@storybook/react"; -import React from "react"; +import { userPermissionGroups } from "@saleor/permissionGroups/fixtures"; import StaffDetailsPage, { StaffDetailsPageProps } from "@saleor/staff/components/StaffDetailsPage"; import { staffMember } from "@saleor/staff/fixtures"; import Decorator from "@saleor/storybook/Decorator"; -import { userPermissionGroups } from "@saleor/permissionGroups/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; const props: Omit = { availablePermissionGroups: [], diff --git a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx index c90dab0a7..ffec07945 100644 --- a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx +++ b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import { Card, CardContent, Typography } from "@material-ui/core"; import AccountPermissionGroups from "@saleor/components/AccountPermissionGroups"; import AccountStatus from "@saleor/components/AccountStatus"; @@ -19,9 +16,12 @@ import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; import { getUserName } from "@saleor/misc"; import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; import { FetchMoreProps, SearchPageProps } from "@saleor/types"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; -import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; + import { StaffMemberDetails_user } from "../../types/StaffMemberDetails"; import StaffPassword from "../StaffPassword/StaffPassword"; import StaffPreferences from "../StaffPreferences"; diff --git a/src/staff/components/StaffList/StaffList.tsx b/src/staff/components/StaffList/StaffList.tsx index de2232f7d..e00898098 100644 --- a/src/staff/components/StaffList/StaffList.tsx +++ b/src/staff/components/StaffList/StaffList.tsx @@ -5,12 +5,9 @@ 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 classNames from "classnames"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; import { getUserInitials, @@ -18,10 +15,13 @@ import { maybe, renderCollection } from "@saleor/misc"; -import { ListProps, SortPage } from "@saleor/types"; import { StaffListUrlSortField } from "@saleor/staff/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { StaffList_staffUsers_edges_node } from "../../types/StaffList"; const useStyles = makeStyles( diff --git a/src/staff/components/StaffListPage/StaffListPage.stories.tsx b/src/staff/components/StaffListPage/StaffListPage.stories.tsx index 3693ac7b6..ac214d9c7 100644 --- a/src/staff/components/StaffListPage/StaffListPage.stories.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.stories.tsx @@ -1,17 +1,17 @@ +import { + filterPageProps, + pageListProps, + searchPageProps, + sortPageProps, + tabPageProps +} from "@saleor/fixtures"; +import { staffMembers } from "@saleor/staff/fixtures"; +import { StaffListUrlSortField } from "@saleor/staff/urls"; +import Decorator from "@saleor/storybook/Decorator"; +import { StaffMemberStatus } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { StaffListUrlSortField } from "@saleor/staff/urls"; -import { StaffMemberStatus } from "@saleor/types/globalTypes"; -import { - pageListProps, - searchPageProps, - tabPageProps, - sortPageProps, - filterPageProps -} from "@saleor/fixtures"; -import { staffMembers } from "@saleor/staff/fixtures"; -import Decorator from "@saleor/storybook/Decorator"; import StaffListPage, { StaffListPageProps } from "."; const props: StaffListPageProps = { diff --git a/src/staff/components/StaffListPage/StaffListPage.tsx b/src/staff/components/StaffListPage/StaffListPage.tsx index b4faf0728..e637936a6 100644 --- a/src/staff/components/StaffListPage/StaffListPage.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.tsx @@ -1,20 +1,20 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import AppHeader from "@saleor/components/AppHeader"; +import { Container } from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { StaffListUrlSortField } from "@saleor/staff/urls"; +import { + FilterPageProps, + ListProps, + SortPage, + TabPageProps +} from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import AppHeader from "@saleor/components/AppHeader"; -import { Container } from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - ListProps, - FilterPageProps, - TabPageProps, - SortPage -} from "@saleor/types"; -import { StaffListUrlSortField } from "@saleor/staff/urls"; import { StaffList_staffUsers_edges_node } from "../../types/StaffList"; import StaffList from "../StaffList/StaffList"; import { diff --git a/src/staff/components/StaffListPage/filters.ts b/src/staff/components/StaffListPage/filters.ts index 1831f09e2..19f3338f2 100644 --- a/src/staff/components/StaffListPage/filters.ts +++ b/src/staff/components/StaffListPage/filters.ts @@ -1,9 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - +import { IFilter } from "@saleor/components/Filter"; import { FilterOpts } from "@saleor/types"; import { StaffMemberStatus } from "@saleor/types/globalTypes"; -import { IFilter } from "@saleor/components/Filter"; import { createOptionsField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum StaffFilterKeys { status = "status" diff --git a/src/staff/components/StaffPassword/StaffPassword.tsx b/src/staff/components/StaffPassword/StaffPassword.tsx index 1d9582540..fe51fbc2b 100644 --- a/src/staff/components/StaffPassword/StaffPassword.tsx +++ b/src/staff/components/StaffPassword/StaffPassword.tsx @@ -1,11 +1,10 @@ -import React from "react"; 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 { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface StaffPasswordProps { onChangePassword: () => void; diff --git a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx index 8f6afbae8..d45468c26 100644 --- a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx +++ b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx @@ -1,23 +1,22 @@ -import React from "react"; 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 TextField from "@material-ui/core/TextField"; import DialogTitle from "@material-ui/core/DialogTitle"; -import { FormattedMessage, useIntl } from "react-intl"; - -import { DialogProps } from "@saleor/types"; -import { buttonMessages } from "@saleor/intl"; -import Form from "@saleor/components/Form"; +import TextField from "@material-ui/core/TextField"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; +import { buttonMessages } from "@saleor/intl"; +import { DialogProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; import getAccountErrorMessage from "@saleor/utils/errors/account"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface StaffPasswordResetDialogFormData { newPassword: string; diff --git a/src/staff/components/StaffPreferences/StaffPreferences.tsx b/src/staff/components/StaffPreferences/StaffPreferences.tsx index 654140ca2..8191098ed 100644 --- a/src/staff/components/StaffPreferences/StaffPreferences.tsx +++ b/src/staff/components/StaffPreferences/StaffPreferences.tsx @@ -1,14 +1,13 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import { Locale, localeNames } from "@saleor/components/Locale"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import { capitalize } from "@saleor/misc"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; interface StaffPreferencesProps { locale: Locale; diff --git a/src/staff/components/StaffProperties/StaffProperties.tsx b/src/staff/components/StaffProperties/StaffProperties.tsx index 653790629..d429af7a7 100644 --- a/src/staff/components/StaffProperties/StaffProperties.tsx +++ b/src/staff/components/StaffProperties/StaffProperties.tsx @@ -1,18 +1,18 @@ +import photoIcon from "@assets/images/photo-icon.svg"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; +import CardTitle from "@saleor/components/CardTitle"; +import { commonMessages } from "@saleor/intl"; +import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; +import { getFormErrors } from "@saleor/utils/errors"; +import getStaffErrorMessage from "@saleor/utils/errors/staff"; import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage, useIntl } from "react-intl"; -import photoIcon from "@assets/images/photo-icon.svg"; -import CardTitle from "@saleor/components/CardTitle"; -import { commonMessages } from "@saleor/intl"; -import { getFormErrors } from "@saleor/utils/errors"; -import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; -import getStaffErrorMessage from "@saleor/utils/errors/staff"; import { getUserInitials, maybe } from "../../../misc"; import { StaffMemberDetails_user } from "../../types/StaffMemberDetails"; diff --git a/src/staff/fixtures.ts b/src/staff/fixtures.ts index ce002d923..27ddc0081 100644 --- a/src/staff/fixtures.ts +++ b/src/staff/fixtures.ts @@ -1,5 +1,6 @@ import avatarImage from "@assets/images/avatars/avatar1.png"; import { permissions } from "@saleor/fixtures"; + import { StaffList_staffUsers_edges_node } from "./types/StaffList"; import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; diff --git a/src/staff/index.tsx b/src/staff/index.tsx index 71541c889..c28900508 100644 --- a/src/staff/index.tsx +++ b/src/staff/index.tsx @@ -1,17 +1,17 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { staffListPath, StaffListUrlQueryParams, + StaffListUrlSortField, staffMemberDetailsPath, - StaffMemberDetailsUrlQueryParams, - StaffListUrlSortField + StaffMemberDetailsUrlQueryParams } from "./urls"; import StaffDetailsComponent from "./views/StaffDetails"; import StaffListComponent from "./views/StaffList"; diff --git a/src/staff/mutations.ts b/src/staff/mutations.ts index 2987a1f9a..27b1b9615 100644 --- a/src/staff/mutations.ts +++ b/src/staff/mutations.ts @@ -1,6 +1,7 @@ -import gql from "graphql-tag"; -import makeMutation from "@saleor/hooks/makeMutation"; import { accountErrorFragment } from "@saleor/customers/mutations"; +import makeMutation from "@saleor/hooks/makeMutation"; +import gql from "graphql-tag"; + import { TypedMutation } from "../mutations"; import { staffMemberDetailsFragment } from "./queries"; import { diff --git a/src/staff/queries.ts b/src/staff/queries.ts index 8c0015064..11872f7f9 100644 --- a/src/staff/queries.ts +++ b/src/staff/queries.ts @@ -1,5 +1,6 @@ -import gql from "graphql-tag"; import makeQuery from "@saleor/hooks/makeQuery"; +import gql from "graphql-tag"; + import { TypedQuery } from "../queries"; import { StaffList, StaffListVariables } from "./types/StaffList"; import { diff --git a/src/staff/urls.ts b/src/staff/urls.ts index 35ce6c2a4..213d1dc51 100644 --- a/src/staff/urls.ts +++ b/src/staff/urls.ts @@ -7,8 +7,8 @@ import { Dialog, Filters, Pagination, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; const staffSection = "/staff/"; diff --git a/src/staff/utils.ts b/src/staff/utils.ts index b2b870d3f..a2d427a48 100644 --- a/src/staff/utils.ts +++ b/src/staff/utils.ts @@ -1,7 +1,7 @@ import difference from "lodash-es/difference"; -import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; import { StaffDetailsFormData } from "./components/StaffDetailsPage"; +import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; /** * Return lists of groups which have to be added and removed from user. diff --git a/src/staff/views/StaffDetails.tsx b/src/staff/views/StaffDetails.tsx index 73a88b6f8..cfc0abd0a 100644 --- a/src/staff/views/StaffDetails.tsx +++ b/src/staff/views/StaffDetails.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import DialogContentText from "@material-ui/core/DialogContentText"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; @@ -10,8 +7,10 @@ import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useUser from "@saleor/hooks/useUser"; import { commonMessages } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import usePermissionGroupSearch from "@saleor/searches/usePermissionGroupSearch"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import StaffDetailsPage from "../components/StaffDetailsPage/StaffDetailsPage"; import StaffPasswordResetDialog from "../components/StaffPasswordResetDialog"; diff --git a/src/staff/views/StaffList/StaffList.tsx b/src/staff/views/StaffList/StaffList.tsx index 86a5c3c71..3be4c6842 100644 --- a/src/staff/views/StaffList/StaffList.tsx +++ b/src/staff/views/StaffList/StaffList.tsx @@ -1,7 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; -import urlJoin from "url-join"; - import { newPasswordUrl } from "@saleor/auth/urls"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -17,13 +13,16 @@ import usePaginator, { } from "@saleor/hooks/usePaginator"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { getStringOrPlaceholder } from "@saleor/misc"; import usePermissionGroupSearch from "@saleor/searches/usePermissionGroupSearch"; import { ListViews } from "@saleor/types"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; import { getSortParams } from "@saleor/utils/sort"; -import { getStringOrPlaceholder } from "@saleor/misc"; +import React from "react"; +import { useIntl } from "react-intl"; +import urlJoin from "url-join"; import StaffAddMemberDialog, { AddMemberFormData diff --git a/src/staff/views/StaffList/filters.test.ts b/src/staff/views/StaffList/filters.test.ts index 32a812b2d..40739ac1b 100644 --- a/src/staff/views/StaffList/filters.test.ts +++ b/src/staff/views/StaffList/filters.test.ts @@ -1,13 +1,13 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { StaffListUrlFilters } from "@saleor/staff/urls"; import { createFilterStructure } from "@saleor/staff/components/StaffListPage"; +import { StaffListUrlFilters } from "@saleor/staff/urls"; +import { StaffMemberStatus } from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { StaffMemberStatus } from "@saleor/types/globalTypes"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/staff/views/StaffList/filters.ts b/src/staff/views/StaffList/filters.ts index cfb46d078..d38f80090 100644 --- a/src/staff/views/StaffList/filters.ts +++ b/src/staff/views/StaffList/filters.ts @@ -1,10 +1,11 @@ -import { StaffUserInput, StaffMemberStatus } from "@saleor/types/globalTypes"; -import { maybe, findValueInEnum } from "@saleor/misc"; import { IFilterElement } from "@saleor/components/Filter"; +import { findValueInEnum, maybe } from "@saleor/misc"; import { - StaffListFilterOpts, - StaffFilterKeys + StaffFilterKeys, + StaffListFilterOpts } from "@saleor/staff/components/StaffListPage"; +import { StaffMemberStatus, StaffUserInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils, diff --git a/src/storybook/Decorator.tsx b/src/storybook/Decorator.tsx index c8f85751b..4819962cb 100644 --- a/src/storybook/Decorator.tsx +++ b/src/storybook/Decorator.tsx @@ -1,7 +1,7 @@ +import { Locale, RawLocaleProvider } from "@saleor/components/Locale"; import React from "react"; import { IntlProvider } from "react-intl"; -import { Locale, RawLocaleProvider } from "@saleor/components/Locale"; import { Provider as DateProvider } from "../components/Date/DateContext"; import { MessageManager } from "../components/messages"; import ThemeProvider from "../components/Theme"; diff --git a/src/storybook/config.js b/src/storybook/config.js index cc81d2176..c08fe2135 100644 --- a/src/storybook/config.js +++ b/src/storybook/config.js @@ -6,7 +6,7 @@ const req = requireContext("../", true, /.stories.tsx$/); function loadStories() { // Story autodiscovery - req.keys().forEach((filename) => req(filename)); + req.keys().forEach(filename => req(filename)); // Components require("./stories/components/ActionDialog"); diff --git a/src/storybook/mock.tsx b/src/storybook/mock.tsx index 7b7d3e839..f6b5e2d36 100644 --- a/src/storybook/mock.tsx +++ b/src/storybook/mock.tsx @@ -1,7 +1,6 @@ -import React from "react"; - import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent"; import { FetchMoreProps } from "@saleor/types"; +import React from "react"; interface ChoiceProviderProps { children: ( diff --git a/src/storybook/stories/attributes/AttributeListPage.tsx b/src/storybook/stories/attributes/AttributeListPage.tsx index 61bfc3038..7ecaf5af4 100644 --- a/src/storybook/stories/attributes/AttributeListPage.tsx +++ b/src/storybook/stories/attributes/AttributeListPage.tsx @@ -1,19 +1,19 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import AttributeListPage, { AttributeListPageProps } from "@saleor/attributes/components/AttributeListPage"; import { attributes } from "@saleor/attributes/fixtures"; +import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "@saleor/fixtures"; -import { AttributeListUrlSortField } from "@saleor/attributes/urls"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: AttributeListPageProps = { diff --git a/src/storybook/stories/attributes/AttributePage.tsx b/src/storybook/stories/attributes/AttributePage.tsx index 68ddf3930..e7deadcea 100644 --- a/src/storybook/stories/attributes/AttributePage.tsx +++ b/src/storybook/stories/attributes/AttributePage.tsx @@ -1,6 +1,3 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import AttributePage, { AttributePageProps } from "@saleor/attributes/components/AttributePage"; @@ -9,6 +6,9 @@ import { AttributeInputTypeEnum, ProductErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: AttributePageProps = { diff --git a/src/storybook/stories/attributes/AttributeValueEditDialog.tsx b/src/storybook/stories/attributes/AttributeValueEditDialog.tsx index c60d6876f..41acdf671 100644 --- a/src/storybook/stories/attributes/AttributeValueEditDialog.tsx +++ b/src/storybook/stories/attributes/AttributeValueEditDialog.tsx @@ -1,11 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { attribute } from "@saleor/attributes/fixtures"; import { AttributeValueType, ProductErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import AttributeValueEditDialog, { AttributeValueEditDialogProps } from "../../../attributes/components/AttributeValueEditDialog"; diff --git a/src/storybook/stories/categories/CategoryCreatePage.tsx b/src/storybook/stories/categories/CategoryCreatePage.tsx index 991dc324c..456237d69 100644 --- a/src/storybook/stories/categories/CategoryCreatePage.tsx +++ b/src/storybook/stories/categories/CategoryCreatePage.tsx @@ -1,7 +1,7 @@ +import { ProductErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; import CategoryCreatePage, { CategoryCreatePageProps } from "../../../categories/components/CategoryCreatePage"; diff --git a/src/storybook/stories/categories/CategoryListPage.tsx b/src/storybook/stories/categories/CategoryListPage.tsx index cc0536b27..5b1c2b9a5 100644 --- a/src/storybook/stories/categories/CategoryListPage.tsx +++ b/src/storybook/stories/categories/CategoryListPage.tsx @@ -1,18 +1,18 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import CategoryListPage, { CategoryTableProps } from "@saleor/categories/components/CategoryListPage"; import { categories } from "@saleor/categories/fixtures"; +import { CategoryListUrlSortField } from "@saleor/categories/urls"; import { listActionsProps, pageListProps, searchPageProps, - tabPageProps, - sortPageProps + sortPageProps, + tabPageProps } from "@saleor/fixtures"; -import { CategoryListUrlSortField } from "@saleor/categories/urls"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const categoryTableProps: CategoryTableProps = { diff --git a/src/storybook/stories/categories/CategoryUpdatePage.tsx b/src/storybook/stories/categories/CategoryUpdatePage.tsx index f83b85ce2..5ace22e84 100644 --- a/src/storybook/stories/categories/CategoryUpdatePage.tsx +++ b/src/storybook/stories/categories/CategoryUpdatePage.tsx @@ -1,15 +1,14 @@ import placeholderImage from "@assets/images/placeholder255x255.png"; import { Omit } from "@material-ui/core"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; -import { category as categoryFixture } from "../../../categories/fixtures"; - import CategoryUpdatePage, { CategoryPageTab, CategoryUpdatePageProps } from "../../../categories/components/CategoryUpdatePage"; +import { category as categoryFixture } from "../../../categories/fixtures"; import { listActionsProps } from "../../../fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/collections/CollectionCreatePage.tsx b/src/storybook/stories/collections/CollectionCreatePage.tsx index 9f174ad6e..d308b1098 100644 --- a/src/storybook/stories/collections/CollectionCreatePage.tsx +++ b/src/storybook/stories/collections/CollectionCreatePage.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; import CollectionCreatePage, { CollectionCreatePageProps } from "../../../collections/components/CollectionCreatePage"; diff --git a/src/storybook/stories/collections/CollectionDetailsPage.tsx b/src/storybook/stories/collections/CollectionDetailsPage.tsx index 91d976019..af36bf239 100644 --- a/src/storybook/stories/collections/CollectionDetailsPage.tsx +++ b/src/storybook/stories/collections/CollectionDetailsPage.tsx @@ -1,10 +1,10 @@ +import placeholderCollectionImage from "@assets/images/block1.jpg"; +import placeholderProductImage from "@assets/images/placeholder60x60.png"; import { Omit } from "@material-ui/core"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import placeholderCollectionImage from "@assets/images/block1.jpg"; -import placeholderProductImage from "@assets/images/placeholder60x60.png"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; import CollectionDetailsPage, { CollectionDetailsPageProps } from "../../../collections/components/CollectionDetailsPage"; diff --git a/src/storybook/stories/collections/CollectionListPage.tsx b/src/storybook/stories/collections/CollectionListPage.tsx index b5a0c0348..e5c90a5b6 100644 --- a/src/storybook/stories/collections/CollectionListPage.tsx +++ b/src/storybook/stories/collections/CollectionListPage.tsx @@ -1,19 +1,19 @@ +import { CollectionListUrlSortField } from "@saleor/collections/urls"; +import { CollectionPublished } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { CollectionListUrlSortField } from "@saleor/collections/urls"; -import { CollectionPublished } from "@saleor/types/globalTypes"; import CollectionListPage, { CollectionListPageProps } from "../../../collections/components/CollectionListPage"; import { collections } from "../../../collections/fixtures"; import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/ActionDialog.tsx b/src/storybook/stories/components/ActionDialog.tsx index 21f638494..6d5ab6961 100644 --- a/src/storybook/stories/components/ActionDialog.tsx +++ b/src/storybook/stories/components/ActionDialog.tsx @@ -1,7 +1,7 @@ +import ActionDialog from "@saleor/components/ActionDialog"; import { storiesOf } from "@storybook/react"; import React from "react"; -import ActionDialog from "@saleor/components/ActionDialog"; import Decorator from "../../Decorator"; storiesOf("Generics / ActionDialog", module) diff --git a/src/storybook/stories/components/AddressEdit.tsx b/src/storybook/stories/components/AddressEdit.tsx index d216fc222..35b8764b0 100644 --- a/src/storybook/stories/components/AddressEdit.tsx +++ b/src/storybook/stories/components/AddressEdit.tsx @@ -1,9 +1,9 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; +import AddressEdit from "@saleor/components/AddressEdit"; import { storiesOf } from "@storybook/react"; import React from "react"; -import AddressEdit from "@saleor/components/AddressEdit"; import { customer } from "../../../customers/fixtures"; import { transformAddressToForm } from "../../../misc"; import { countries } from "../../../orders/fixtures"; diff --git a/src/storybook/stories/components/AddressFormatter.tsx b/src/storybook/stories/components/AddressFormatter.tsx index 4a60ce6db..eb86052ef 100644 --- a/src/storybook/stories/components/AddressFormatter.tsx +++ b/src/storybook/stories/components/AddressFormatter.tsx @@ -1,7 +1,7 @@ +import AddressFormatter from "@saleor/components/AddressFormatter"; import { storiesOf } from "@storybook/react"; import React from "react"; -import AddressFormatter from "@saleor/components/AddressFormatter"; import { customer } from "../../../customers/fixtures"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/AssignAttributeDialog.tsx b/src/storybook/stories/components/AssignAttributeDialog.tsx index 9cb0462e5..e721abc00 100644 --- a/src/storybook/stories/components/AssignAttributeDialog.tsx +++ b/src/storybook/stories/components/AssignAttributeDialog.tsx @@ -1,12 +1,12 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { attributes } from "@saleor/attributes/fixtures"; import { fetchMoreProps } from "@saleor/fixtures"; import AssignAttributeDialog, { AssignAttributeDialogProps } from "@saleor/productTypes/components/AssignAttributeDialog"; import { formError } from "@saleor/storybook/misc"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: AssignAttributeDialogProps = { diff --git a/src/storybook/stories/components/AssignProductDialog.tsx b/src/storybook/stories/components/AssignProductDialog.tsx index 8199d736e..8898dcf56 100644 --- a/src/storybook/stories/components/AssignProductDialog.tsx +++ b/src/storybook/stories/components/AssignProductDialog.tsx @@ -1,11 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder60x60.png"; import AssignProductDialog, { AssignProductDialogProps } from "@saleor/components/AssignProductDialog"; import { products } from "@saleor/products/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: AssignProductDialogProps = { diff --git a/src/storybook/stories/components/AutocompleteSelectMenu.tsx b/src/storybook/stories/components/AutocompleteSelectMenu.tsx index 2fffc09fb..2cfd33d72 100644 --- a/src/storybook/stories/components/AutocompleteSelectMenu.tsx +++ b/src/storybook/stories/components/AutocompleteSelectMenu.tsx @@ -1,12 +1,12 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import { storiesOf } from "@storybook/react"; -import React from "react"; - import AutocompleteSelectMenu, { AutocompleteSelectMenuProps } from "@saleor/components/AutocompleteSelectMenu"; import Form from "@saleor/components/Form"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { getMenuItemByValue, IMenu } from "../../../utils/menu"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/CardMenu.tsx b/src/storybook/stories/components/CardMenu.tsx index b88ab042d..b9d5db6e4 100644 --- a/src/storybook/stories/components/CardMenu.tsx +++ b/src/storybook/stories/components/CardMenu.tsx @@ -1,7 +1,7 @@ +import CardMenu, { CardMenuItem } from "@saleor/components/CardMenu"; import { storiesOf } from "@storybook/react"; import React from "react"; -import CardMenu, { CardMenuItem } from "@saleor/components/CardMenu"; import Decorator from "../../Decorator"; const menuItems: CardMenuItem[] = [ diff --git a/src/storybook/stories/components/Checkbox.tsx b/src/storybook/stories/components/Checkbox.tsx index 562d6420b..7c922917f 100644 --- a/src/storybook/stories/components/Checkbox.tsx +++ b/src/storybook/stories/components/Checkbox.tsx @@ -1,8 +1,8 @@ +import Checkbox, { CheckboxProps } from "@saleor/components/Checkbox"; +import Form from "@saleor/components/Form"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Checkbox, { CheckboxProps } from "@saleor/components/Checkbox"; -import Form from "@saleor/components/Form"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/Chip.tsx b/src/storybook/stories/components/Chip.tsx index 315b2613b..99ad5c9bf 100644 --- a/src/storybook/stories/components/Chip.tsx +++ b/src/storybook/stories/components/Chip.tsx @@ -1,7 +1,7 @@ +import Chip, { ChipProps } from "@saleor/components/Chip"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Chip, { ChipProps } from "@saleor/components/Chip"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/ColumnPicker.tsx b/src/storybook/stories/components/ColumnPicker.tsx index 18eadb037..ef1123958 100644 --- a/src/storybook/stories/components/ColumnPicker.tsx +++ b/src/storybook/stories/components/ColumnPicker.tsx @@ -1,11 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import ColumnPicker, { ColumnPickerProps } from "@saleor/components/ColumnPicker"; import { ColumnPickerChoice } from "@saleor/components/ColumnPicker/ColumnPickerContent"; import CardDecorator from "@saleor/storybook/CardDecorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const columns: ColumnPickerChoice[] = [ diff --git a/src/storybook/stories/components/Date.tsx b/src/storybook/stories/components/Date.tsx index d805db223..8a738d021 100644 --- a/src/storybook/stories/components/Date.tsx +++ b/src/storybook/stories/components/Date.tsx @@ -1,7 +1,7 @@ +import Date from "@saleor/components/Date"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Date from "@saleor/components/Date"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/DateTime.tsx b/src/storybook/stories/components/DateTime.tsx index 9a2f45a7b..5035e7223 100644 --- a/src/storybook/stories/components/DateTime.tsx +++ b/src/storybook/stories/components/DateTime.tsx @@ -1,7 +1,7 @@ +import { DateTime } from "@saleor/components/Date"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { DateTime } from "@saleor/components/Date"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/DeleteFilterTabDialog.tsx b/src/storybook/stories/components/DeleteFilterTabDialog.tsx index c7fc73b2f..1795e5ca8 100644 --- a/src/storybook/stories/components/DeleteFilterTabDialog.tsx +++ b/src/storybook/stories/components/DeleteFilterTabDialog.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import DeleteFilterTabDialog, { DeleteFilterTabDialogProps } from "@saleor/components/DeleteFilterTabDialog"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: DeleteFilterTabDialogProps = { diff --git a/src/storybook/stories/components/EditableTableCell.tsx b/src/storybook/stories/components/EditableTableCell.tsx index 90b6171d6..c67d4a16a 100644 --- a/src/storybook/stories/components/EditableTableCell.tsx +++ b/src/storybook/stories/components/EditableTableCell.tsx @@ -2,11 +2,11 @@ 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 EditableTableCell from "@saleor/components/EditableTableCell"; +import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { storiesOf } from "@storybook/react"; import React from "react"; -import EditableTableCell from "@saleor/components/EditableTableCell"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/ErrorMessageCard.tsx b/src/storybook/stories/components/ErrorMessageCard.tsx index b8b59c1d6..55135b065 100644 --- a/src/storybook/stories/components/ErrorMessageCard.tsx +++ b/src/storybook/stories/components/ErrorMessageCard.tsx @@ -1,8 +1,7 @@ +import ErrorMessageCard from "@saleor/components/ErrorMessageCard"; import { storiesOf } from "@storybook/react"; import React from "react"; -import ErrorMessageCard from "@saleor/components/ErrorMessageCard"; - storiesOf("Generics / ErrorMessageCard", module).add("default", () => ( )); diff --git a/src/storybook/stories/components/ErrorPage.tsx b/src/storybook/stories/components/ErrorPage.tsx index 833346664..a9b66f288 100644 --- a/src/storybook/stories/components/ErrorPage.tsx +++ b/src/storybook/stories/components/ErrorPage.tsx @@ -1,8 +1,8 @@ +import { Omit } from "@material-ui/core"; +import ErrorPage, { ErrorPageProps } from "@saleor/components/ErrorPage"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { Omit } from "@material-ui/core"; -import ErrorPage, { ErrorPageProps } from "@saleor/components/ErrorPage"; import Decorator from "../../Decorator"; const props: Omit = { diff --git a/src/storybook/stories/components/ExternalLink.tsx b/src/storybook/stories/components/ExternalLink.tsx index 8ffe4304c..cb914903a 100644 --- a/src/storybook/stories/components/ExternalLink.tsx +++ b/src/storybook/stories/components/ExternalLink.tsx @@ -1,7 +1,7 @@ +import ExternalLink from "@saleor/components/ExternalLink"; import { storiesOf } from "@storybook/react"; import React from "react"; -import ExternalLink from "@saleor/components/ExternalLink"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/FileUpload.tsx b/src/storybook/stories/components/FileUpload.tsx index cd7cbab19..91ee4c11a 100644 --- a/src/storybook/stories/components/FileUpload.tsx +++ b/src/storybook/stories/components/FileUpload.tsx @@ -1,7 +1,7 @@ +import FileUpload from "@saleor/components/FileUpload"; import { storiesOf } from "@storybook/react"; import React from "react"; -import FileUpload from "@saleor/components/FileUpload"; import Decorator from "../../Decorator"; storiesOf("Components / FileUpload", module) diff --git a/src/storybook/stories/components/Filter.tsx b/src/storybook/stories/components/Filter.tsx index 5875ebf68..0cff51192 100644 --- a/src/storybook/stories/components/Filter.tsx +++ b/src/storybook/stories/components/Filter.tsx @@ -1,13 +1,13 @@ +import { FilterContent, FilterContentProps } from "@saleor/components/Filter"; +import useFilter from "@saleor/components/Filter/useFilter"; +import { + createDateField, + createOptionsField, + createPriceField +} from "@saleor/utils/filters/fields"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { FilterContent, FilterContentProps } from "@saleor/components/Filter"; -import { - createPriceField, - createDateField, - createOptionsField -} from "@saleor/utils/filters/fields"; -import useFilter from "@saleor/components/Filter/useFilter"; import Decorator from "../../Decorator"; const props: FilterContentProps = { diff --git a/src/storybook/stories/components/Money.tsx b/src/storybook/stories/components/Money.tsx index 04c5d21c5..b03a03364 100644 --- a/src/storybook/stories/components/Money.tsx +++ b/src/storybook/stories/components/Money.tsx @@ -1,7 +1,7 @@ +import Money, { MoneyProps } from "@saleor/components/Money"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Money, { MoneyProps } from "@saleor/components/Money"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/MoneyRange.tsx b/src/storybook/stories/components/MoneyRange.tsx index 128ce7bee..d86ac084b 100644 --- a/src/storybook/stories/components/MoneyRange.tsx +++ b/src/storybook/stories/components/MoneyRange.tsx @@ -1,7 +1,7 @@ +import MoneyRange, { MoneyRangeProps } from "@saleor/components/MoneyRange"; import { storiesOf } from "@storybook/react"; import React from "react"; -import MoneyRange, { MoneyRangeProps } from "@saleor/components/MoneyRange"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/MultiSelectField.tsx b/src/storybook/stories/components/MultiSelectField.tsx index d68921491..ce6692517 100644 --- a/src/storybook/stories/components/MultiSelectField.tsx +++ b/src/storybook/stories/components/MultiSelectField.tsx @@ -1,8 +1,8 @@ +import Form from "@saleor/components/Form"; +import MultiSelectField from "@saleor/components/MultiSelectField"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Form from "@saleor/components/Form"; -import MultiSelectField from "@saleor/components/MultiSelectField"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/NotFoundPage.tsx b/src/storybook/stories/components/NotFoundPage.tsx index 80181d0ba..8109952e5 100644 --- a/src/storybook/stories/components/NotFoundPage.tsx +++ b/src/storybook/stories/components/NotFoundPage.tsx @@ -1,7 +1,7 @@ +import NotFoundPage from "@saleor/components/NotFoundPage"; import { storiesOf } from "@storybook/react"; import React from "react"; -import NotFoundPage from "@saleor/components/NotFoundPage"; import Decorator from "../../Decorator"; storiesOf("Views / Not found error page", module) diff --git a/src/storybook/stories/components/PageHeader.tsx b/src/storybook/stories/components/PageHeader.tsx index 45f10d7f1..58105fcb6 100644 --- a/src/storybook/stories/components/PageHeader.tsx +++ b/src/storybook/stories/components/PageHeader.tsx @@ -1,9 +1,9 @@ import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; +import PageHeader from "@saleor/components/PageHeader"; import { storiesOf } from "@storybook/react"; import React from "react"; -import PageHeader from "@saleor/components/PageHeader"; import Decorator from "../../Decorator"; storiesOf("Generics / PageHeader", module) diff --git a/src/storybook/stories/components/Percent.tsx b/src/storybook/stories/components/Percent.tsx index 517e0651c..9beead514 100644 --- a/src/storybook/stories/components/Percent.tsx +++ b/src/storybook/stories/components/Percent.tsx @@ -1,7 +1,7 @@ +import Percent from "@saleor/components/Percent"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Percent from "@saleor/components/Percent"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/PhoneField.tsx b/src/storybook/stories/components/PhoneField.tsx index 1d43ddbdc..3e5d8bb87 100644 --- a/src/storybook/stories/components/PhoneField.tsx +++ b/src/storybook/stories/components/PhoneField.tsx @@ -1,7 +1,7 @@ +import PhoneField from "@saleor/components/PhoneField"; import { storiesOf } from "@storybook/react"; import React from "react"; -import PhoneField from "@saleor/components/PhoneField"; import { prefixes } from "../../../orders/fixtures"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/PriceField.tsx b/src/storybook/stories/components/PriceField.tsx index 2464223f2..018cd77ce 100644 --- a/src/storybook/stories/components/PriceField.tsx +++ b/src/storybook/stories/components/PriceField.tsx @@ -1,7 +1,7 @@ +import PriceField from "@saleor/components/PriceField"; import { storiesOf } from "@storybook/react"; import React from "react"; -import PriceField from "@saleor/components/PriceField"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/RichTextEditor.tsx b/src/storybook/stories/components/RichTextEditor.tsx index 375129efe..e645acb4f 100644 --- a/src/storybook/stories/components/RichTextEditor.tsx +++ b/src/storybook/stories/components/RichTextEditor.tsx @@ -1,8 +1,8 @@ +import RichTextEditor from "@saleor/components/RichTextEditor"; import { storiesOf } from "@storybook/react"; import { RawDraftContentState } from "draft-js"; import React from "react"; -import RichTextEditor from "@saleor/components/RichTextEditor"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/SaveButtonBar.tsx b/src/storybook/stories/components/SaveButtonBar.tsx index 3bd4ee100..ee944fe4b 100644 --- a/src/storybook/stories/components/SaveButtonBar.tsx +++ b/src/storybook/stories/components/SaveButtonBar.tsx @@ -1,8 +1,8 @@ +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import SaveButtonBar from "@saleor/components/SaveButtonBar"; import Decorator from "../../Decorator"; const props = { diff --git a/src/storybook/stories/components/SaveFilterTabDialog.tsx b/src/storybook/stories/components/SaveFilterTabDialog.tsx index f3feac469..b2ea997f1 100644 --- a/src/storybook/stories/components/SaveFilterTabDialog.tsx +++ b/src/storybook/stories/components/SaveFilterTabDialog.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import SaveFilterTabDialog, { SaveFilterTabDialogProps } from "@saleor/components/SaveFilterTabDialog"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const props: SaveFilterTabDialogProps = { diff --git a/src/storybook/stories/components/SingleSelectField.tsx b/src/storybook/stories/components/SingleSelectField.tsx index ead6afeed..78ce636e9 100644 --- a/src/storybook/stories/components/SingleSelectField.tsx +++ b/src/storybook/stories/components/SingleSelectField.tsx @@ -1,7 +1,7 @@ +import SingleSelectField from "@saleor/components/SingleSelectField"; import { storiesOf } from "@storybook/react"; import React from "react"; -import SingleSelectField from "@saleor/components/SingleSelectField"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/Skeleton.tsx b/src/storybook/stories/components/Skeleton.tsx index eaf8ee47e..8a3c2318a 100644 --- a/src/storybook/stories/components/Skeleton.tsx +++ b/src/storybook/stories/components/Skeleton.tsx @@ -1,7 +1,7 @@ +import Skeleton from "@saleor/components/Skeleton"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Skeleton from "@saleor/components/Skeleton"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/StatusLabel.tsx b/src/storybook/stories/components/StatusLabel.tsx index 755a8633d..d69d531fe 100644 --- a/src/storybook/stories/components/StatusLabel.tsx +++ b/src/storybook/stories/components/StatusLabel.tsx @@ -1,7 +1,7 @@ +import StatusLabel from "@saleor/components/StatusLabel"; import { storiesOf } from "@storybook/react"; import React from "react"; -import StatusLabel from "@saleor/components/StatusLabel"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/TablePagination.tsx b/src/storybook/stories/components/TablePagination.tsx index e25557a7e..d90f34316 100644 --- a/src/storybook/stories/components/TablePagination.tsx +++ b/src/storybook/stories/components/TablePagination.tsx @@ -1,8 +1,8 @@ +import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import TablePagination from "@saleor/components/TablePagination"; import { storiesOf } from "@storybook/react"; import React from "react"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import TablePagination from "@saleor/components/TablePagination"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/Timeline.tsx b/src/storybook/stories/components/Timeline.tsx index adc57548f..41e9126a1 100644 --- a/src/storybook/stories/components/Timeline.tsx +++ b/src/storybook/stories/components/Timeline.tsx @@ -1,10 +1,10 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import Timeline, { TimelineEvent, TimelineNote } from "@saleor/components/Timeline"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; storiesOf("Generics / Timeline", module) diff --git a/src/storybook/stories/components/Weight.tsx b/src/storybook/stories/components/Weight.tsx index 64435de69..145bd7c7e 100644 --- a/src/storybook/stories/components/Weight.tsx +++ b/src/storybook/stories/components/Weight.tsx @@ -1,7 +1,7 @@ +import Weight, { WeightProps } from "@saleor/components/Weight"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Weight, { WeightProps } from "@saleor/components/Weight"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/WeightRange.tsx b/src/storybook/stories/components/WeightRange.tsx index c3b564925..6cfc2a063 100644 --- a/src/storybook/stories/components/WeightRange.tsx +++ b/src/storybook/stories/components/WeightRange.tsx @@ -1,7 +1,7 @@ +import WeightRange, { WeightRangeProps } from "@saleor/components/WeightRange"; import { storiesOf } from "@storybook/react"; import React from "react"; -import WeightRange, { WeightRangeProps } from "@saleor/components/WeightRange"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/components/messages.tsx b/src/storybook/stories/components/messages.tsx index 6e3dbee45..b9be2a065 100644 --- a/src/storybook/stories/components/messages.tsx +++ b/src/storybook/stories/components/messages.tsx @@ -1,8 +1,8 @@ import Button from "@material-ui/core/Button"; +import useNotifier from "@saleor/hooks/useNotifier"; import { storiesOf } from "@storybook/react"; import React from "react"; -import useNotifier from "@saleor/hooks/useNotifier"; import CardDecorator from "../../CardDecorator"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/configuration/ConfigurationPage.tsx b/src/storybook/stories/configuration/ConfigurationPage.tsx index 07dcb15fc..cd3ac54d8 100644 --- a/src/storybook/stories/configuration/ConfigurationPage.tsx +++ b/src/storybook/stories/configuration/ConfigurationPage.tsx @@ -1,12 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; -import { useIntl } from "react-intl"; - import { User } from "@saleor/auth/types/User"; import { createConfigurationMenu } from "@saleor/configuration"; import ConfigurationPage from "@saleor/configuration/ConfigurationPage"; import { staffMember } from "@saleor/staff/fixtures"; import Decorator from "@saleor/storybook/Decorator"; +import { storiesOf } from "@storybook/react"; +import React from "react"; +import { useIntl } from "react-intl"; const user = { __typename: staffMember.__typename, diff --git a/src/storybook/stories/customers/CustomerCreatePage.tsx b/src/storybook/stories/customers/CustomerCreatePage.tsx index 23258a88c..22dd380c3 100644 --- a/src/storybook/stories/customers/CustomerCreatePage.tsx +++ b/src/storybook/stories/customers/CustomerCreatePage.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; import CustomerCreatePage, { CustomerCreatePageFormData, CustomerCreatePageProps diff --git a/src/storybook/stories/customers/CustomerDetailsPage.tsx b/src/storybook/stories/customers/CustomerDetailsPage.tsx index 85c1eedcf..faf7cb10e 100644 --- a/src/storybook/stories/customers/CustomerDetailsPage.tsx +++ b/src/storybook/stories/customers/CustomerDetailsPage.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; import CustomerDetailsPage, { CustomerDetailsPageProps } from "../../../customers/components/CustomerDetailsPage"; diff --git a/src/storybook/stories/customers/CustomerListPage.tsx b/src/storybook/stories/customers/CustomerListPage.tsx index b6d1c2709..275038f90 100644 --- a/src/storybook/stories/customers/CustomerListPage.tsx +++ b/src/storybook/stories/customers/CustomerListPage.tsx @@ -1,18 +1,18 @@ +import { CustomerListUrlSortField } from "@saleor/customers/urls"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { CustomerListUrlSortField } from "@saleor/customers/urls"; import CustomerListPage, { CustomerListPageProps } from "../../../customers/components/CustomerListPage"; import { customerList } from "../../../customers/fixtures"; import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/discounts/SaleCreatePage.tsx b/src/storybook/stories/discounts/SaleCreatePage.tsx index 39c793d2d..83d172e1b 100644 --- a/src/storybook/stories/discounts/SaleCreatePage.tsx +++ b/src/storybook/stories/discounts/SaleCreatePage.tsx @@ -1,7 +1,7 @@ +import { DiscountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; import SaleCreatePage, { SaleCreatePageProps } from "../../../discounts/components/SaleCreatePage"; diff --git a/src/storybook/stories/discounts/SaleDetailsPage.tsx b/src/storybook/stories/discounts/SaleDetailsPage.tsx index 51e1ad3bf..09aca8645 100644 --- a/src/storybook/stories/discounts/SaleDetailsPage.tsx +++ b/src/storybook/stories/discounts/SaleDetailsPage.tsx @@ -1,7 +1,7 @@ +import { DiscountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; import SaleDetailsPage, { SaleDetailsPageProps, SaleDetailsPageTab diff --git a/src/storybook/stories/discounts/SaleListPage.tsx b/src/storybook/stories/discounts/SaleListPage.tsx index 7dfd58feb..3eae217fd 100644 --- a/src/storybook/stories/discounts/SaleListPage.tsx +++ b/src/storybook/stories/discounts/SaleListPage.tsx @@ -1,21 +1,21 @@ +import { SaleListUrlSortField } from "@saleor/discounts/urls"; +import { + DiscountStatusEnum, + DiscountValueTypeEnum +} from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { SaleListUrlSortField } from "@saleor/discounts/urls"; -import { - DiscountValueTypeEnum, - DiscountStatusEnum -} from "@saleor/types/globalTypes"; import SaleListPage, { SaleListPageProps } from "../../../discounts/components/SaleListPage"; import { saleList } from "../../../discounts/fixtures"; import { + filterPageProps, listActionsProps, pageListProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/discounts/VoucherCreatePage.tsx b/src/storybook/stories/discounts/VoucherCreatePage.tsx index ee544169d..e9fe1ec59 100644 --- a/src/storybook/stories/discounts/VoucherCreatePage.tsx +++ b/src/storybook/stories/discounts/VoucherCreatePage.tsx @@ -1,7 +1,7 @@ +import { DiscountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; import VoucherCreatePage, { FormData, VoucherCreatePageProps diff --git a/src/storybook/stories/discounts/VoucherDetailsPage.tsx b/src/storybook/stories/discounts/VoucherDetailsPage.tsx index 4e75b28d6..e94786671 100644 --- a/src/storybook/stories/discounts/VoucherDetailsPage.tsx +++ b/src/storybook/stories/discounts/VoucherDetailsPage.tsx @@ -1,7 +1,7 @@ +import { DiscountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; import VoucherDetailsPage, { FormData, VoucherDetailsPageProps, diff --git a/src/storybook/stories/discounts/VoucherListPage.tsx b/src/storybook/stories/discounts/VoucherListPage.tsx index 89b232735..4b413e3a6 100644 --- a/src/storybook/stories/discounts/VoucherListPage.tsx +++ b/src/storybook/stories/discounts/VoucherListPage.tsx @@ -1,22 +1,22 @@ +import { VoucherListUrlSortField } from "@saleor/discounts/urls"; +import { + DiscountStatusEnum, + VoucherDiscountType +} from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { VoucherListUrlSortField } from "@saleor/discounts/urls"; -import { - VoucherDiscountType, - DiscountStatusEnum -} from "@saleor/types/globalTypes"; import VoucherListPage, { VoucherListPageProps } from "../../../discounts/components/VoucherListPage"; import { voucherList } from "../../../discounts/fixtures"; import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/home/HomePage.tsx b/src/storybook/stories/home/HomePage.tsx index 2f53932d4..44b528c0c 100644 --- a/src/storybook/stories/home/HomePage.tsx +++ b/src/storybook/stories/home/HomePage.tsx @@ -1,10 +1,10 @@ +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 { storiesOf } from "@storybook/react"; import React from "react"; -import placeholderImage from "@assets/images/placeholder60x60.png"; -import { adminUserPermissions } from "@saleor/fixtures"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import HomePage, { HomePageProps } from "../../../home/components/HomePage"; import { shop as shopFixture } from "../../../home/fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/navigation/MenuCreateDialog.tsx b/src/storybook/stories/navigation/MenuCreateDialog.tsx index 65bb9c896..6c076b530 100644 --- a/src/storybook/stories/navigation/MenuCreateDialog.tsx +++ b/src/storybook/stories/navigation/MenuCreateDialog.tsx @@ -1,7 +1,7 @@ +import { MenuErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { MenuErrorCode } from "@saleor/types/globalTypes"; import MenuCreateDialog, { MenuCreateDialogProps } from "../../../navigation/components/MenuCreateDialog"; diff --git a/src/storybook/stories/navigation/MenuDetailsPage.tsx b/src/storybook/stories/navigation/MenuDetailsPage.tsx index 333174a15..b1f5cbf3b 100644 --- a/src/storybook/stories/navigation/MenuDetailsPage.tsx +++ b/src/storybook/stories/navigation/MenuDetailsPage.tsx @@ -1,7 +1,7 @@ +import { MenuErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { MenuErrorCode } from "@saleor/types/globalTypes"; import MenuDetailsPage, { MenuDetailsPageProps } from "../../../navigation/components/MenuDetailsPage"; diff --git a/src/storybook/stories/navigation/MenuItemDialog.tsx b/src/storybook/stories/navigation/MenuItemDialog.tsx index a380e08e5..4b4de6c60 100644 --- a/src/storybook/stories/navigation/MenuItemDialog.tsx +++ b/src/storybook/stories/navigation/MenuItemDialog.tsx @@ -1,7 +1,7 @@ +import { MenuErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { MenuErrorCode } from "@saleor/types/globalTypes"; import MenuItemDialog, { MenuItemDialogProps } from "../../../navigation/components/MenuItemDialog"; diff --git a/src/storybook/stories/navigation/MenuListPage.tsx b/src/storybook/stories/navigation/MenuListPage.tsx index 34b4760db..f67f5bbd0 100644 --- a/src/storybook/stories/navigation/MenuListPage.tsx +++ b/src/storybook/stories/navigation/MenuListPage.tsx @@ -1,7 +1,7 @@ +import { MenuListUrlSortField } from "@saleor/navigation/urls"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { MenuListUrlSortField } from "@saleor/navigation/urls"; import { listActionsProps, pageListProps, diff --git a/src/storybook/stories/orders/OrderCancelDialog.tsx b/src/storybook/stories/orders/OrderCancelDialog.tsx index 530e689b2..778b20884 100644 --- a/src/storybook/stories/orders/OrderCancelDialog.tsx +++ b/src/storybook/stories/orders/OrderCancelDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderCancelDialog, { OrderCancelDialogProps } from "../../../orders/components/OrderCancelDialog"; diff --git a/src/storybook/stories/orders/OrderCustomer.tsx b/src/storybook/stories/orders/OrderCustomer.tsx index dc2db8025..10a8f911a 100644 --- a/src/storybook/stories/orders/OrderCustomer.tsx +++ b/src/storybook/stories/orders/OrderCustomer.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { adminUserPermissions } from "@saleor/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { adminUserPermissions } from "@saleor/fixtures"; import OrderCustomer, { OrderCustomerProps } from "../../../orders/components/OrderCustomer"; diff --git a/src/storybook/stories/orders/OrderDetailsPage.tsx b/src/storybook/stories/orders/OrderDetailsPage.tsx index 47925b654..54e15d8c1 100644 --- a/src/storybook/stories/orders/OrderDetailsPage.tsx +++ b/src/storybook/stories/orders/OrderDetailsPage.tsx @@ -1,9 +1,9 @@ +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"; -import placeholderImage from "@assets/images/placeholder60x60.png"; -import { adminUserPermissions } from "@saleor/fixtures"; import OrderDetailsPage, { OrderDetailsPageProps } from "../../../orders/components/OrderDetailsPage"; diff --git a/src/storybook/stories/orders/OrderDraftCancelDialog.tsx b/src/storybook/stories/orders/OrderDraftCancelDialog.tsx index 994abf797..05ef02d4d 100644 --- a/src/storybook/stories/orders/OrderDraftCancelDialog.tsx +++ b/src/storybook/stories/orders/OrderDraftCancelDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderDraftCancelDialog, { OrderDraftCancelDialogProps } from "../../../orders/components/OrderDraftCancelDialog"; diff --git a/src/storybook/stories/orders/OrderDraftFinalizeDialog.tsx b/src/storybook/stories/orders/OrderDraftFinalizeDialog.tsx index b487466c4..ca31de82a 100644 --- a/src/storybook/stories/orders/OrderDraftFinalizeDialog.tsx +++ b/src/storybook/stories/orders/OrderDraftFinalizeDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderDraftFinalize, { OrderDraftFinalizeDialogProps, OrderDraftFinalizeWarning diff --git a/src/storybook/stories/orders/OrderDraftListPage.tsx b/src/storybook/stories/orders/OrderDraftListPage.tsx index 85d8ffec3..ad5531ccc 100644 --- a/src/storybook/stories/orders/OrderDraftListPage.tsx +++ b/src/storybook/stories/orders/OrderDraftListPage.tsx @@ -1,14 +1,14 @@ +import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import OrderDraftListPage, { OrderDraftListPageProps diff --git a/src/storybook/stories/orders/OrderDraftPage.tsx b/src/storybook/stories/orders/OrderDraftPage.tsx index 84582631c..58e9b9e0b 100644 --- a/src/storybook/stories/orders/OrderDraftPage.tsx +++ b/src/storybook/stories/orders/OrderDraftPage.tsx @@ -1,9 +1,9 @@ +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"; -import placeholderImage from "@assets/images/placeholder60x60.png"; -import { fetchMoreProps, adminUserPermissions } from "@saleor/fixtures"; import OrderDraftPage, { OrderDraftPageProps } from "../../../orders/components/OrderDraftPage"; diff --git a/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx index eb9fd4f3c..94d0b76bd 100644 --- a/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx @@ -1,8 +1,8 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; -import { warehouseList } from "@saleor/warehouses/fixtures"; import OrderFulfillmentCancelDialog, { OrderFulfillmentCancelDialogProps } from "../../../orders/components/OrderFulfillmentCancelDialog"; diff --git a/src/storybook/stories/orders/OrderFulfillmentDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentDialog.tsx index fec327e44..2bb3d4d82 100644 --- a/src/storybook/stories/orders/OrderFulfillmentDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentDialog.tsx @@ -1,9 +1,9 @@ +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"; -import placeholderImage from "@assets/images/placeholder60x60.png"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderFulfillmentDialog, { OrderFulfillmentDialogProps } from "../../../orders/components/OrderFulfillmentDialog"; diff --git a/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx index 0d066b266..712e7b4bd 100644 --- a/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderFulfillmentTrackingDialog, { OrderFulfillmentTrackingDialogProps } from "../../../orders/components/OrderFulfillmentTrackingDialog"; diff --git a/src/storybook/stories/orders/OrderListPage.tsx b/src/storybook/stories/orders/OrderListPage.tsx index 2edfc0a6d..4f4b3ab52 100644 --- a/src/storybook/stories/orders/OrderListPage.tsx +++ b/src/storybook/stories/orders/OrderListPage.tsx @@ -1,11 +1,11 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import OrderListPage, { OrderListPageProps } from "@saleor/orders/components/OrderListPage"; import { OrderListUrlSortField } from "@saleor/orders/urls"; import { OrderStatusFilter } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { filterPageProps, listActionsProps, diff --git a/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx b/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx index 4dd1d6275..d8f7e1497 100644 --- a/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx +++ b/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderMarkAsPaidDialog, { OrderMarkAsPaidDialogProps } from "../../../orders/components/OrderMarkAsPaidDialog"; diff --git a/src/storybook/stories/orders/OrderPaymentDialog.tsx b/src/storybook/stories/orders/OrderPaymentDialog.tsx index fb44b3686..2462aa193 100644 --- a/src/storybook/stories/orders/OrderPaymentDialog.tsx +++ b/src/storybook/stories/orders/OrderPaymentDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderPaymentDialog, { OrderPaymentDialogProps } from "../../../orders/components/OrderPaymentDialog"; diff --git a/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx b/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx index 6b5373cb7..82f5f8c57 100644 --- a/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx +++ b/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderPaymentVoidDialog, { OrderPaymentVoidDialogProps } from "../../../orders/components/OrderPaymentVoidDialog"; diff --git a/src/storybook/stories/orders/OrderProductAddDialog.tsx b/src/storybook/stories/orders/OrderProductAddDialog.tsx index 736d66da1..4cdefc003 100644 --- a/src/storybook/stories/orders/OrderProductAddDialog.tsx +++ b/src/storybook/stories/orders/OrderProductAddDialog.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder60x60.png"; import { fetchMoreProps } from "@saleor/fixtures"; import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import OrderProductAddDialog, { OrderProductAddDialogProps } from "../../../orders/components/OrderProductAddDialog"; diff --git a/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx b/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx index eef78df7e..10d323b52 100644 --- a/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx +++ b/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx @@ -1,7 +1,7 @@ +import { OrderErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import OrderShippingMethodEditDialog, { OrderShippingMethodEditDialogProps } from "../../../orders/components/OrderShippingMethodEditDialog"; diff --git a/src/storybook/stories/pages/PageDetailsPage.tsx b/src/storybook/stories/pages/PageDetailsPage.tsx index 45ca25f69..67bd9b3f6 100644 --- a/src/storybook/stories/pages/PageDetailsPage.tsx +++ b/src/storybook/stories/pages/PageDetailsPage.tsx @@ -1,7 +1,7 @@ +import { PageErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { PageErrorCode } from "@saleor/types/globalTypes"; import PageDetailsPage, { FormData, PageDetailsPageProps diff --git a/src/storybook/stories/pages/PageListPage.tsx b/src/storybook/stories/pages/PageListPage.tsx index 8451be720..29ab6f46a 100644 --- a/src/storybook/stories/pages/PageListPage.tsx +++ b/src/storybook/stories/pages/PageListPage.tsx @@ -1,7 +1,7 @@ +import { PageListUrlSortField } from "@saleor/pages/urls"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { PageListUrlSortField } from "@saleor/pages/urls"; import { listActionsProps, pageListProps, diff --git a/src/storybook/stories/plugins/PluginsListPage.tsx b/src/storybook/stories/plugins/PluginsListPage.tsx index c53139c68..b5c171f9e 100644 --- a/src/storybook/stories/plugins/PluginsListPage.tsx +++ b/src/storybook/stories/plugins/PluginsListPage.tsx @@ -1,11 +1,11 @@ +import { PluginListUrlSortField } from "@saleor/plugins/urls"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { PluginListUrlSortField } from "@saleor/plugins/urls"; import { + filterPageProps, pageListProps, - sortPageProps, - filterPageProps + sortPageProps } from "../../../fixtures"; import PluginsListPage, { PluginsListPageProps diff --git a/src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx b/src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx index 8da8e9d68..e8e276e2e 100644 --- a/src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx +++ b/src/storybook/stories/productTypes/ProductTypeAttributeEditDialog.tsx @@ -1,7 +1,7 @@ +import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { formError } from "@saleor/storybook/misc"; import ProductTypeAttributeEditDialog, { ProductTypeAttributeEditDialogProps } from "../../../productTypes/components/ProductTypeAttributeEditDialog"; diff --git a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx index e4e2b6ac0..a8e84a1f6 100644 --- a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { formError } from "@saleor/storybook/misc"; import ProductTypeCreatePage, { ProductTypeCreatePageProps, ProductTypeForm diff --git a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx index da2c83493..8f82d30bd 100644 --- a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx @@ -1,9 +1,9 @@ import { Omit } from "@material-ui/core"; +import { listActionsProps } from "@saleor/fixtures"; +import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { listActionsProps } from "@saleor/fixtures"; -import { formError } from "@saleor/storybook/misc"; import ProductTypeDetailsPage, { ProductTypeDetailsPageProps, ProductTypeForm diff --git a/src/storybook/stories/productTypes/ProductTypeListPage.tsx b/src/storybook/stories/productTypes/ProductTypeListPage.tsx index e4c3fa604..2e42afba0 100644 --- a/src/storybook/stories/productTypes/ProductTypeListPage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeListPage.tsx @@ -1,18 +1,18 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; import { ProductTypeConfigurable, ProductTypeEnum } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "../../../fixtures"; import ProductTypeListPage, { ProductTypeListPageProps diff --git a/src/storybook/stories/products/ProductCreatePage.tsx b/src/storybook/stories/products/ProductCreatePage.tsx index 145b5759b..9aaa25526 100644 --- a/src/storybook/stories/products/ProductCreatePage.tsx +++ b/src/storybook/stories/products/ProductCreatePage.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { fetchMoreProps } from "@saleor/fixtures"; import { ProductErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import ProductCreatePage, { ProductCreatePageSubmitData } from "../../../products/components/ProductCreatePage"; diff --git a/src/storybook/stories/products/ProductImagePage.tsx b/src/storybook/stories/products/ProductImagePage.tsx index 5df07bd61..1da8095b6 100644 --- a/src/storybook/stories/products/ProductImagePage.tsx +++ b/src/storybook/stories/products/ProductImagePage.tsx @@ -1,7 +1,7 @@ +import placeholder from "@assets/images/placeholder1080x1080.png"; import { storiesOf } from "@storybook/react"; import React from "react"; -import placeholder from "@assets/images/placeholder1080x1080.png"; import ProductImagePage from "../../../products/components/ProductImagePage"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/products/ProductListPage.tsx b/src/storybook/stories/products/ProductListPage.tsx index 98ba42fd4..07be01dd8 100644 --- a/src/storybook/stories/products/ProductListPage.tsx +++ b/src/storybook/stories/products/ProductListPage.tsx @@ -1,13 +1,13 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder255x255.png"; import { defaultListSettings } from "@saleor/config"; import { products as productListFixture } from "@saleor/products/fixtures"; import { ProductListUrlSortField } from "@saleor/products/urls"; +import { productListFilterOpts } from "@saleor/products/views/ProductList/fixtures"; import { attributes } from "@saleor/productTypes/fixtures"; import { ListViews } from "@saleor/types"; -import { productListFilterOpts } from "@saleor/products/views/ProductList/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { fetchMoreProps, filterPageProps, diff --git a/src/storybook/stories/products/ProductUpdatePage.tsx b/src/storybook/stories/products/ProductUpdatePage.tsx index 9bc5478f7..aec849dd5 100644 --- a/src/storybook/stories/products/ProductUpdatePage.tsx +++ b/src/storybook/stories/products/ProductUpdatePage.tsx @@ -1,6 +1,3 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder255x255.png"; import { collections } from "@saleor/collections/fixtures"; import { fetchMoreProps, listActionsProps } from "@saleor/fixtures"; @@ -11,6 +8,9 @@ import { product as productFixture } from "@saleor/products/fixtures"; import { ProductUpdatePageFormData } from "@saleor/products/utils/data"; import { ProductErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import Decorator from "../../Decorator"; const product = productFixture(placeholderImage); diff --git a/src/storybook/stories/products/ProductVariantCreatePage.tsx b/src/storybook/stories/products/ProductVariantCreatePage.tsx index d5ef0ac0b..613818bd3 100644 --- a/src/storybook/stories/products/ProductVariantCreatePage.tsx +++ b/src/storybook/stories/products/ProductVariantCreatePage.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder255x255.png"; import { ProductErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import ProductVariantCreatePage from "../../../products/components/ProductVariantCreatePage"; import { product as productFixture } from "../../../products/fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/products/ProductVariantImageSelectDialog.tsx b/src/storybook/stories/products/ProductVariantImageSelectDialog.tsx index 380b801ee..3ad245a62 100644 --- a/src/storybook/stories/products/ProductVariantImageSelectDialog.tsx +++ b/src/storybook/stories/products/ProductVariantImageSelectDialog.tsx @@ -1,7 +1,7 @@ +import placeholderImage from "@assets/images/placeholder255x255.png"; import { storiesOf } from "@storybook/react"; import React from "react"; -import placeholderImage from "@assets/images/placeholder255x255.png"; import ProductVariantImageSelectDialog from "../../../products/components/ProductVariantImageSelectDialog"; import { variantImages as variantImagesFixture, diff --git a/src/storybook/stories/products/ProductVariantPage.tsx b/src/storybook/stories/products/ProductVariantPage.tsx index 91a12b654..5294b7f15 100644 --- a/src/storybook/stories/products/ProductVariantPage.tsx +++ b/src/storybook/stories/products/ProductVariantPage.tsx @@ -1,9 +1,9 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import placeholderImage from "@assets/images/placeholder60x60.png"; import { ProductErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import ProductVariantPage from "../../../products/components/ProductVariantPage"; import { variant as variantFixture } from "../../../products/fixtures"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx b/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx index 079cb381e..d9ac6d850 100644 --- a/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx +++ b/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx @@ -1,7 +1,7 @@ +import { ShippingErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; import ShippingZoneCreatePage, { ShippingZoneCreatePageProps } from "../../../shipping/components/ShippingZoneCreatePage"; diff --git a/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx b/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx index d510de60f..83a869d59 100644 --- a/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx +++ b/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx @@ -1,9 +1,9 @@ +import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; +import { ShippingErrorCode } from "@saleor/types/globalTypes"; +import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; -import { warehouseList } from "@saleor/warehouses/fixtures"; -import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; import ShippingZoneDetailsPage, { ShippingZoneDetailsPageProps } from "../../../shipping/components/ShippingZoneDetailsPage"; diff --git a/src/storybook/stories/shipping/ShippingZoneRateDialog.tsx b/src/storybook/stories/shipping/ShippingZoneRateDialog.tsx index 420ba4563..a2988283d 100644 --- a/src/storybook/stories/shipping/ShippingZoneRateDialog.tsx +++ b/src/storybook/stories/shipping/ShippingZoneRateDialog.tsx @@ -6,8 +6,8 @@ import ShippingZoneRateDialog, { } from "../../../shipping/components/ShippingZoneRateDialog"; import { shippingZone } from "../../../shipping/fixtures"; import { - ShippingMethodTypeEnum, - ShippingErrorCode + ShippingErrorCode, + ShippingMethodTypeEnum } from "../../../types/globalTypes"; import Decorator from "../../Decorator"; diff --git a/src/storybook/stories/shipping/ShippingZonesListPage.tsx b/src/storybook/stories/shipping/ShippingZonesListPage.tsx index 479d64402..308fbcc50 100644 --- a/src/storybook/stories/shipping/ShippingZonesListPage.tsx +++ b/src/storybook/stories/shipping/ShippingZonesListPage.tsx @@ -2,9 +2,9 @@ import { storiesOf } from "@storybook/react"; import React from "react"; import { + adminUserPermissions, listActionsProps, - pageListProps, - adminUserPermissions + pageListProps } from "../../../fixtures"; import ShippingZonesListPage, { ShippingZonesListPageProps diff --git a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx index 12fce49ac..ce17e65ca 100644 --- a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx +++ b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx @@ -1,8 +1,8 @@ import { Omit } from "@material-ui/core"; +import { ShopErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import { ShopErrorCode } from "@saleor/types/globalTypes"; import SiteSettingsPage, { SiteSettingsPageProps } from "../../../siteSettings/components/SiteSettingsPage"; diff --git a/src/taxes/components/CountryList/CountryList.tsx b/src/taxes/components/CountryList/CountryList.tsx index 5cd6b39c1..9397d022a 100644 --- a/src/taxes/components/CountryList/CountryList.tsx +++ b/src/taxes/components/CountryList/CountryList.tsx @@ -4,12 +4,12 @@ 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 ResponsiveTable from "@saleor/components/ResponsiveTable"; +import Skeleton from "@saleor/components/Skeleton"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import Skeleton from "@saleor/components/Skeleton"; import { maybe, renderCollection } from "../../../misc"; import { CountryList_shop_countries } from "../../types/CountryList"; diff --git a/src/taxes/components/CountryListPage/CountryListPage.tsx b/src/taxes/components/CountryListPage/CountryListPage.tsx index 332114a4c..42680f1c7 100644 --- a/src/taxes/components/CountryListPage/CountryListPage.tsx +++ b/src/taxes/components/CountryListPage/CountryListPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { Container } from "@saleor/components/Container"; @@ -9,6 +6,9 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { CountryList_shop } from "../../types/CountryList"; import CountryList from "../CountryList"; diff --git a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx index e3baff1af..4cf1ccf5f 100644 --- a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx +++ b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx @@ -4,9 +4,6 @@ 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 React from "react"; -import { FormattedMessage, IntlShape, useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import { Container } from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; @@ -15,6 +12,9 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import { sectionNames } from "@saleor/intl"; import { TaxRateType } from "@saleor/types/globalTypes"; +import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; import { CountryList_shop_countries_vat_reducedRates } from "../../types/CountryList"; diff --git a/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx b/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx index 24171125a..0b142d520 100644 --- a/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx +++ b/src/taxes/components/TaxConfiguration/TaxConfiguration.tsx @@ -3,14 +3,14 @@ import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/core/CardActions"; import CardContent from "@material-ui/core/CardContent"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { FormData } from "../CountryListPage"; interface TaxConfigurationProps { diff --git a/src/taxes/index.tsx b/src/taxes/index.tsx index c6cf5822a..f124749f1 100644 --- a/src/taxes/index.tsx +++ b/src/taxes/index.tsx @@ -1,8 +1,8 @@ +import { sectionNames } from "@saleor/intl"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; import { WindowTitle } from "../components/WindowTitle"; import { countryListPath, countryTaxRatesPath } from "./urls"; import CountryList from "./views/CountryList"; diff --git a/src/taxes/queries.ts b/src/taxes/queries.ts index a0b2bf314..836478c91 100644 --- a/src/taxes/queries.ts +++ b/src/taxes/queries.ts @@ -1,4 +1,5 @@ import gql from "graphql-tag"; + import { TypedQuery } from "../queries"; import { CountryList } from "./types/CountryList"; diff --git a/src/taxes/views/CountryList.tsx b/src/taxes/views/CountryList.tsx index 904374d5b..8c24f9b16 100644 --- a/src/taxes/views/CountryList.tsx +++ b/src/taxes/views/CountryList.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { configurationMenuUrl } from "../../configuration"; import { maybe } from "../../misc"; import CountryListPage from "../components/CountryListPage"; diff --git a/src/taxes/views/CountryTaxes.tsx b/src/taxes/views/CountryTaxes.tsx index 854c3d0ef..d8f328606 100644 --- a/src/taxes/views/CountryTaxes.tsx +++ b/src/taxes/views/CountryTaxes.tsx @@ -1,6 +1,6 @@ +import useNavigator from "@saleor/hooks/useNavigator"; import React from "react"; -import useNavigator from "@saleor/hooks/useNavigator"; import { maybe } from "../../misc"; import CountryTaxesPage from "../components/CountryTaxesPage"; import { TypedCountryListQuery } from "../queries"; diff --git a/src/translations/components/TranslationFields/TranslationFields.tsx b/src/translations/components/TranslationFields/TranslationFields.tsx index 966eb0aa6..1b82272ab 100644 --- a/src/translations/components/TranslationFields/TranslationFields.tsx +++ b/src/translations/components/TranslationFields/TranslationFields.tsx @@ -10,11 +10,11 @@ import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; +import { buttonMessages } from "@saleor/intl"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { buttonMessages } from "@saleor/intl"; import TranslationFieldsLong from "./TranslationFieldsLong"; import TranslationFieldsRich from "./TranslationFieldsRich"; import TranslationFieldsShort from "./TranslationFieldsShort"; diff --git a/src/translations/components/TranslationFields/TranslationFieldsLong.tsx b/src/translations/components/TranslationFields/TranslationFieldsLong.tsx index 9a4d865ed..95abf631e 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsLong.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsLong.tsx @@ -1,10 +1,10 @@ import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Form from "@saleor/components/Form"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import Form from "@saleor/components/Form"; import TranslationFieldsSave from "./TranslationFieldsSave"; interface TranslationFieldsLongProps { diff --git a/src/translations/components/TranslationFields/TranslationFieldsRich.tsx b/src/translations/components/TranslationFields/TranslationFieldsRich.tsx index e9b3c82ee..1a940fc45 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsRich.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsRich.tsx @@ -1,11 +1,11 @@ import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import DraftRenderer from "@saleor/components/DraftRenderer"; import Form from "@saleor/components/Form"; import RichTextEditor from "@saleor/components/RichTextEditor"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import TranslationFieldsSave from "./TranslationFieldsSave"; interface TranslationFieldsRichProps { diff --git a/src/translations/components/TranslationFields/TranslationFieldsSave.tsx b/src/translations/components/TranslationFields/TranslationFieldsSave.tsx index f055971e0..ab2a40b02 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsSave.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsSave.tsx @@ -1,12 +1,11 @@ import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; -import React from "react"; -import { FormattedMessage } from "react-intl"; - import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { buttonMessages } from "@saleor/intl"; +import React from "react"; +import { FormattedMessage } from "react-intl"; interface TranslationFieldsSaveProps { saveButtonState: ConfirmButtonTransitionState; diff --git a/src/translations/components/TranslationFields/TranslationFieldsShort.tsx b/src/translations/components/TranslationFields/TranslationFieldsShort.tsx index 2d02261ac..861174375 100644 --- a/src/translations/components/TranslationFields/TranslationFieldsShort.tsx +++ b/src/translations/components/TranslationFields/TranslationFieldsShort.tsx @@ -1,10 +1,10 @@ import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Form from "@saleor/components/Form"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import Form from "@saleor/components/Form"; import TranslationFieldsSave from "./TranslationFieldsSave"; interface TranslationFieldsShortProps { diff --git a/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx b/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx index 85995b1df..ce5bf47b8 100644 --- a/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx +++ b/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { CategoryTranslationFragment } from "../../types/CategoryTranslationFragment"; diff --git a/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx b/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx index 32df566dc..fb9f4e7ab 100644 --- a/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx +++ b/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { CollectionTranslationFragment } from "../../types/CollectionTranslationFragment"; @@ -25,9 +25,7 @@ export const fieldNames = { seoTitle: "seoTitle" }; -const TranslationsCollectionsPage: React.FC< - TranslationsCollectionsPageProps -> = ({ +const TranslationsCollectionsPage: React.FC = ({ activeField, disabled, languageCode, diff --git a/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx b/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx index 22cd550ad..28e5832e3 100644 --- a/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx +++ b/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.tsx @@ -5,15 +5,15 @@ 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 ResponsiveTable from "@saleor/components/ResponsiveTable"; +import Skeleton from "@saleor/components/Skeleton"; +import TablePagination from "@saleor/components/TablePagination"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import TablePagination from "@saleor/components/TablePagination"; -import Skeleton from "@saleor/components/Skeleton"; -import { ListProps } from "../../../types"; import { maybe, renderCollection } from "../../../misc"; +import { ListProps } from "../../../types"; export interface TranslatableEntity { id: string; @@ -44,9 +44,7 @@ const useStyles = makeStyles( }, { name: "TranslationsEntitiesList" } ); -const TranslationsEntitiesList: React.FC< - TranslationsEntitiesListProps -> = props => { +const TranslationsEntitiesList: React.FC = props => { const { disabled, entities, diff --git a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx index e9352f64f..d05cd0616 100644 --- a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx +++ b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx @@ -1,16 +1,16 @@ import Card from "@material-ui/core/Card"; -import React from "react"; -import { IntlShape, useIntl } from "react-intl"; import makeStyles from "@material-ui/core/styles/makeStyles"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; -import SearchInput from "@saleor/components/SearchBar/SearchInput"; import PageHeader from "@saleor/components/PageHeader"; +import SearchInput from "@saleor/components/SearchBar/SearchInput"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import FilterTabs, { FilterTab } from "@saleor/components/TableFilter"; import { maybe } from "@saleor/misc"; import { SearchPageProps } from "@saleor/types"; +import React from "react"; +import { IntlShape, useIntl } from "react-intl"; + import { TranslatableEntities } from "../../urls"; export interface TranslationsEntitiesListPageProps extends SearchPageProps { diff --git a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx index 0175dc59f..3957ee575 100644 --- a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx +++ b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx @@ -4,12 +4,12 @@ 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 React from "react"; -import { FormattedMessage } from "react-intl"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import Skeleton from "@saleor/components/Skeleton"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + import { maybe, renderCollection } from "../../../misc"; export interface TranslationsLanguageListProps { @@ -29,9 +29,7 @@ const useStyles = makeStyles( { name: "TranslationsLanguageList" } ); -const TranslationsLanguageList: React.FC< - TranslationsLanguageListProps -> = props => { +const TranslationsLanguageList: React.FC = props => { const { languages, onRowClick } = props; const classes = useStyles(props); diff --git a/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx b/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx index c331e225c..0b7721dda 100644 --- a/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx +++ b/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; // tslint:disable no-submodule-imports import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; +import React from "react"; +import { useIntl } from "react-intl"; + import TranslationsLanguageList from "../TranslationsLanguageList"; export interface TranslationsLanguageListPageProps { @@ -13,9 +13,10 @@ export interface TranslationsLanguageListPageProps { onRowClick: (code: string) => void; } -const TranslationsLanguageListPage: React.FC< - TranslationsLanguageListPageProps -> = ({ languages, onRowClick }) => { +const TranslationsLanguageListPage: React.FC = ({ + languages, + onRowClick +}) => { const intl = useIntl(); return ( diff --git a/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx b/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx index 096cf49c0..1633a75b6 100644 --- a/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx +++ b/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { PageTranslationFragment } from "../../types/PageTranslationFragment"; diff --git a/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx b/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx index 5676e66cc..7c59cc4d3 100644 --- a/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx +++ b/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { ProductTypeTranslationFragment } from "../../types/ProductTypeTranslationFragment"; @@ -23,9 +23,7 @@ export const fieldNames = { value: "attributeValue" }; -const TranslationsProductTypesPage: React.FC< - TranslationsProductTypesPageProps -> = ({ +const TranslationsProductTypesPage: React.FC = ({ activeField, disabled, languages, diff --git a/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx b/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx index b24d38b08..4db7ad6ae 100644 --- a/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx +++ b/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { ProductTranslationFragment } from "../../types/ProductTranslationFragment"; diff --git a/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx b/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx index 939da5477..97d16688f 100644 --- a/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx +++ b/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { SaleTranslationFragment } from "../../types/SaleTranslationFragment"; diff --git a/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx b/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx index 7afe15bff..4bf3096d4 100644 --- a/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx +++ b/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { commonMessages, sectionNames } from "@saleor/intl"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../../misc"; import { LanguageCodeEnum } from "../../../types/globalTypes"; import { TranslationsEntitiesPageProps } from "../../types/TranslationsEntitiesPage"; diff --git a/src/translations/index.tsx b/src/translations/index.tsx index 0863ae1bc..7b975fb08 100644 --- a/src/translations/index.tsx +++ b/src/translations/index.tsx @@ -1,9 +1,9 @@ +import { sectionNames } from "@saleor/intl"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; import { WindowTitle } from "../components/WindowTitle"; import { LanguageCodeEnum } from "../types/globalTypes"; import { diff --git a/src/translations/urls.ts b/src/translations/urls.ts index d21254bfc..ed5241312 100644 --- a/src/translations/urls.ts +++ b/src/translations/urls.ts @@ -1,7 +1,7 @@ +import { Pagination } from "@saleor/types"; import { stringify as stringifyQs } from "qs"; import urlJoin from "url-join"; -import { Pagination } from "@saleor/types"; import { TranslationsEntitiesListFilterTab } from "./components/TranslationsEntitiesListPage"; export enum TranslatableEntities { diff --git a/src/translations/views/TranslationsCategories.tsx b/src/translations/views/TranslationsCategories.tsx index ab11f748a..f8ca84457 100644 --- a/src/translations/views/TranslationsCategories.tsx +++ b/src/translations/views/TranslationsCategories.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import TranslationsCategoriesPage, { diff --git a/src/translations/views/TranslationsCollections.tsx b/src/translations/views/TranslationsCollections.tsx index 73df76600..5a82c881b 100644 --- a/src/translations/views/TranslationsCollections.tsx +++ b/src/translations/views/TranslationsCollections.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import TranslationsCollectionsPage, { diff --git a/src/translations/views/TranslationsEntities.tsx b/src/translations/views/TranslationsEntities.tsx index 30f47d8bf..5a69d36c2 100644 --- a/src/translations/views/TranslationsEntities.tsx +++ b/src/translations/views/TranslationsEntities.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; - import useNavigator from "@saleor/hooks/useNavigator"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; import useShop from "@saleor/hooks/useShop"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; + import { PAGINATE_BY } from "../../config"; import { maybe } from "../../misc"; import TranslationsEntitiesList from "../components/TranslationsEntitiesList"; diff --git a/src/translations/views/TranslationsLanguageList.tsx b/src/translations/views/TranslationsLanguageList.tsx index fc3f010c2..6b5b33343 100644 --- a/src/translations/views/TranslationsLanguageList.tsx +++ b/src/translations/views/TranslationsLanguageList.tsx @@ -1,7 +1,7 @@ -import React from "react"; - import useNavigator from "@saleor/hooks/useNavigator"; import useShop from "@saleor/hooks/useShop"; +import React from "react"; + import { maybe } from "../../misc"; import TranslationsLanguageListPage from "../components/TranslationsLanguageListPage"; import { languageEntitiesUrl } from "../urls"; diff --git a/src/translations/views/TranslationsPages.tsx b/src/translations/views/TranslationsPages.tsx index 46270788d..ae978b4e5 100644 --- a/src/translations/views/TranslationsPages.tsx +++ b/src/translations/views/TranslationsPages.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, diff --git a/src/translations/views/TranslationsProductTypes.tsx b/src/translations/views/TranslationsProductTypes.tsx index eb768d537..ffd07f374 100644 --- a/src/translations/views/TranslationsProductTypes.tsx +++ b/src/translations/views/TranslationsProductTypes.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { getMutationState, maybe } from "../../misc"; import { LanguageCodeEnum, diff --git a/src/translations/views/TranslationsProducts.tsx b/src/translations/views/TranslationsProducts.tsx index 2f4365983..d9e0ee47e 100644 --- a/src/translations/views/TranslationsProducts.tsx +++ b/src/translations/views/TranslationsProducts.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import TranslationsProductsPage, { diff --git a/src/translations/views/TranslationsSales.tsx b/src/translations/views/TranslationsSales.tsx index df213b769..79ca83b87 100644 --- a/src/translations/views/TranslationsSales.tsx +++ b/src/translations/views/TranslationsSales.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, diff --git a/src/translations/views/TranslationsVouchers.tsx b/src/translations/views/TranslationsVouchers.tsx index 8faa0e47c..3579f63b3 100644 --- a/src/translations/views/TranslationsVouchers.tsx +++ b/src/translations/views/TranslationsVouchers.tsx @@ -1,11 +1,11 @@ -import { stringify as stringifyQs } from "qs"; -import React from "react"; -import { useIntl } from "react-intl"; - import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; +import { stringify as stringifyQs } from "qs"; +import React from "react"; +import { useIntl } from "react-intl"; + import { maybe } from "../../misc"; import { LanguageCodeEnum, diff --git a/src/utils/errors/account.ts b/src/utils/errors/account.ts index 551f849ce..165d57cc0 100644 --- a/src/utils/errors/account.ts +++ b/src/utils/errors/account.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - -import { AccountErrorCode } from "@saleor/types/globalTypes"; -import { commonMessages } from "@saleor/intl"; import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment"; +import { commonMessages } from "@saleor/intl"; +import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/discounts.ts b/src/utils/errors/discounts.ts index 5641330ee..a12638311 100644 --- a/src/utils/errors/discounts.ts +++ b/src/utils/errors/discounts.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - import { DiscountErrorFragment } from "@saleor/discounts/types/DiscountErrorFragment"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; +import { DiscountErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/menu.ts b/src/utils/errors/menu.ts index 1793282bf..2203c420c 100644 --- a/src/utils/errors/menu.ts +++ b/src/utils/errors/menu.ts @@ -1,8 +1,8 @@ -import { IntlShape } from "react-intl"; - -import { MenuErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; import { MenuErrorFragment } from "@saleor/navigation/types/MenuErrorFragment"; +import { MenuErrorCode } from "@saleor/types/globalTypes"; +import { IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; function getMenuErrorMessage( diff --git a/src/utils/errors/order.ts b/src/utils/errors/order.ts index af80e1044..4eb52efca 100644 --- a/src/utils/errors/order.ts +++ b/src/utils/errors/order.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - -import { OrderErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment"; +import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/page.ts b/src/utils/errors/page.ts index 01cda4817..68d1ba019 100644 --- a/src/utils/errors/page.ts +++ b/src/utils/errors/page.ts @@ -1,8 +1,8 @@ -import { IntlShape } from "react-intl"; - +import { commonMessages } from "@saleor/intl"; import { PageErrorFragment } from "@saleor/pages/types/PageErrorFragment"; import { PageErrorCode } from "@saleor/types/globalTypes"; -import { commonMessages } from "@saleor/intl"; +import { IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; function getPageErrorMessage( diff --git a/src/utils/errors/permissionGroups.ts b/src/utils/errors/permissionGroups.ts index f4d85a826..6e70a13b6 100644 --- a/src/utils/errors/permissionGroups.ts +++ b/src/utils/errors/permissionGroups.ts @@ -1,8 +1,7 @@ -import { defineMessages, IntlShape } from "react-intl"; - import { commonMessages } from "@saleor/intl"; import { PermissionGroupErrorFragment } from "@saleor/permissionGroups/types/PermissionGroupErrorFragment"; import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; import commonErrorMessages from "./common"; diff --git a/src/utils/errors/product.ts b/src/utils/errors/product.ts index 0886770ec..30ccfdedc 100644 --- a/src/utils/errors/product.ts +++ b/src/utils/errors/product.ts @@ -1,9 +1,9 @@ -import { IntlShape, defineMessages } from "react-intl"; - import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; import { BulkProductErrorFragment } from "@saleor/products/types/BulkProductErrorFragment"; +import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/shipping.ts b/src/utils/errors/shipping.ts index 3e02cef60..4cdb1b8de 100644 --- a/src/utils/errors/shipping.ts +++ b/src/utils/errors/shipping.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - +import { commonMessages } from "@saleor/intl"; import { ShippingErrorFragment } from "@saleor/shipping/types/ShippingErrorFragment"; import { ShippingErrorCode } from "@saleor/types/globalTypes"; -import { commonMessages } from "@saleor/intl"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/shop.ts b/src/utils/errors/shop.ts index 7e74f7843..7bb9efd99 100644 --- a/src/utils/errors/shop.ts +++ b/src/utils/errors/shop.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - +import { commonMessages } from "@saleor/intl"; import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment"; import { ShopErrorCode } from "@saleor/types/globalTypes"; -import { commonMessages } from "@saleor/intl"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/staff.ts b/src/utils/errors/staff.ts index cc94a7801..cd529e758 100644 --- a/src/utils/errors/staff.ts +++ b/src/utils/errors/staff.ts @@ -1,5 +1,6 @@ -import { IntlShape } from "react-intl"; import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment"; +import { IntlShape } from "react-intl"; + import getAccountErrorMessage from "./account"; function getStaffErrorMessage( diff --git a/src/utils/errors/stock.ts b/src/utils/errors/stock.ts index 6bf4d1da9..6307630d0 100644 --- a/src/utils/errors/stock.ts +++ b/src/utils/errors/stock.ts @@ -1,9 +1,9 @@ -import { IntlShape, defineMessages } from "react-intl"; - -import { StockErrorFragment } from "@saleor/products/types/StockErrorFragment"; -import { StockErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; import { BulkStockErrorFragment } from "@saleor/products/types/BulkStockErrorFragment"; +import { StockErrorFragment } from "@saleor/products/types/StockErrorFragment"; +import { StockErrorCode } from "@saleor/types/globalTypes"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; import getProductErrorMessage from "./product"; diff --git a/src/utils/errors/warehouse.ts b/src/utils/errors/warehouse.ts index ee45e04a3..828c0d132 100644 --- a/src/utils/errors/warehouse.ts +++ b/src/utils/errors/warehouse.ts @@ -1,8 +1,8 @@ -import { IntlShape, defineMessages } from "react-intl"; - -import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; -import { WarehouseErrorCode } from "@saleor/types/globalTypes"; import { commonMessages } from "@saleor/intl"; +import { WarehouseErrorCode } from "@saleor/types/globalTypes"; +import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import { defineMessages, IntlShape } from "react-intl"; + import commonErrorMessages from "./common"; const messages = defineMessages({ diff --git a/src/utils/errors/webhooks.ts b/src/utils/errors/webhooks.ts index 5c9a555a8..faacbce18 100644 --- a/src/utils/errors/webhooks.ts +++ b/src/utils/errors/webhooks.ts @@ -1,8 +1,8 @@ +import { commonMessages } from "@saleor/intl"; +import { WebhookErrorCode } from "@saleor/types/globalTypes"; +import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; import { IntlShape } from "react-intl"; -import { WebhookErrorCode } from "@saleor/types/globalTypes"; -import { commonMessages } from "@saleor/intl"; -import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; import commonErrorMessages from "./common"; function getWebhookErrorMessage( diff --git a/src/utils/filters/fields.ts b/src/utils/filters/fields.ts index a46473bbe..993c1165b 100644 --- a/src/utils/filters/fields.ts +++ b/src/utils/filters/fields.ts @@ -1,6 +1,6 @@ -import { IFilterElement, FieldType } from "@saleor/components/Filter"; +import { FieldType, IFilterElement } from "@saleor/components/Filter"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { MinMax, FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { FetchMoreProps, MinMax, SearchPageProps } from "@saleor/types"; export function createPriceField( name: T, diff --git a/src/utils/filters/filters.ts b/src/utils/filters/filters.ts index 59979161b..5711c414b 100644 --- a/src/utils/filters/filters.ts +++ b/src/utils/filters/filters.ts @@ -1,7 +1,6 @@ -import isArray from "lodash-es/isArray"; - -import { IFilterElement, IFilter } from "@saleor/components/Filter"; +import { IFilter, IFilterElement } from "@saleor/components/Filter"; import { findValueInEnum } from "@saleor/misc"; +import isArray from "lodash-es/isArray"; function createFilterUtils< TQueryParams extends object, diff --git a/src/utils/handlers/dialogActionHandlers.ts b/src/utils/handlers/dialogActionHandlers.ts index 3980e59fa..6b4e6a87b 100644 --- a/src/utils/handlers/dialogActionHandlers.ts +++ b/src/utils/handlers/dialogActionHandlers.ts @@ -1,5 +1,5 @@ import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; -import { Dialog, BulkAction, SingleAction } from "@saleor/types"; +import { BulkAction, Dialog, SingleAction } from "@saleor/types"; type Url> = (params: T) => string; type CreateCloseModal< diff --git a/src/utils/handlers/filterHandlers.ts b/src/utils/handlers/filterHandlers.ts index 60c4dbc3c..4ce072f7f 100644 --- a/src/utils/handlers/filterHandlers.ts +++ b/src/utils/handlers/filterHandlers.ts @@ -1,7 +1,8 @@ import { IFilter } from "@saleor/components/Filter"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; -import { Sort, Pagination, ActiveTab, Search } from "@saleor/types"; -import { getFilterQueryParams, GetFilterQueryParam } from "../filters"; +import { ActiveTab, Pagination, Search, Sort } from "@saleor/types"; + +import { GetFilterQueryParam, getFilterQueryParams } from "../filters"; type RequiredParams = ActiveTab & Search & Sort & Pagination; type CreateUrl = (params: RequiredParams) => string; diff --git a/src/utils/handlers/sortHandler.ts b/src/utils/handlers/sortHandler.ts index 206bccf3a..d331194c4 100644 --- a/src/utils/handlers/sortHandler.ts +++ b/src/utils/handlers/sortHandler.ts @@ -1,6 +1,7 @@ +import { DEFAULT_INITIAL_PAGINATION_DATA } from "@saleor/config"; import { UseNavigatorResult } from "@saleor/hooks/useNavigator"; import { Sort } from "@saleor/types"; -import { DEFAULT_INITIAL_PAGINATION_DATA } from "@saleor/config"; + import { getSortUrlVariables } from "../sort"; type CreateUrl = (params: Sort) => string; diff --git a/src/utils/menu/menu.ts b/src/utils/menu/menu.ts index 55fba25ba..4dc736ad3 100644 --- a/src/utils/menu/menu.ts +++ b/src/utils/menu/menu.ts @@ -131,10 +131,10 @@ function _toFlat( flatMenuItem, ...menuItem.children .map((child, childIndex) => _toFlat(child, childIndex, id)) - .reduce((acc, curr) => [...acc, ...curr], [] as IFlatMenu< - TMenuData, - TValue - >) + .reduce( + (acc, curr) => [...acc, ...curr], + [] as IFlatMenu + ) ]; } export function toFlat( @@ -142,10 +142,10 @@ export function toFlat( ): IFlatMenu { return menu .map((menuItem, menuItemIndex) => _toFlat(menuItem, menuItemIndex, null)) - .reduce((acc, curr) => [...acc, ...curr], [] as IFlatMenu< - TMenuData, - TValue - >); + .reduce( + (acc, curr) => [...acc, ...curr], + [] as IFlatMenu + ); } function _fromFlat( diff --git a/src/utils/sort.ts b/src/utils/sort.ts index 0a12f26af..ef9bb055e 100644 --- a/src/utils/sort.ts +++ b/src/utils/sort.ts @@ -1,4 +1,5 @@ -import { parseBoolean, findValueInEnum } from "@saleor/misc"; +import { findValueInEnum, parseBoolean } from "@saleor/misc"; + import { TableCellHeaderArrowDirection } from "../components/TableCellHeader"; import { Sort } from "../types"; import { OrderDirection } from "../types/globalTypes"; diff --git a/src/utils/urls.ts b/src/utils/urls.ts index 11791432d..45826fc23 100644 --- a/src/utils/urls.ts +++ b/src/utils/urls.ts @@ -1,5 +1,5 @@ -import { stringify } from "qs"; import isArray from "lodash-es/isArray"; +import { stringify } from "qs"; export function stringifyQs(params: object): string { return stringify(params, { diff --git a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx index 2dcb9ca69..f34fb35af 100644 --- a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx +++ b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx @@ -1,12 +1,12 @@ +import { countries } from "@saleor/fixtures"; +import Decorator from "@saleor/storybook/Decorator"; +import { WarehouseErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; -import { countries } from "@saleor/fixtures"; -import { WarehouseErrorCode } from "@saleor/types/globalTypes"; import WarehouseCreatePage, { - WarehouseCreatePageProps, - WarehouseCreatePageFormData + WarehouseCreatePageFormData, + WarehouseCreatePageProps } from "./WarehouseCreatePage"; const props: WarehouseCreatePageProps = { diff --git a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx index b49e010f2..605032785 100644 --- a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx +++ b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx @@ -1,23 +1,23 @@ -import React from "react"; -import { useIntl, FormattedMessage } from "react-intl"; - -import Container from "@saleor/components/Container"; -import Form from "@saleor/components/Form"; -import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import Grid from "@saleor/components/Grid"; +import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import CompanyAddressInput from "@saleor/components/CompanyAddressInput"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Container from "@saleor/components/Container"; +import Form from "@saleor/components/Form"; +import Grid from "@saleor/components/Grid"; +import PageHeader from "@saleor/components/PageHeader"; +import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; -import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { mapCountriesToChoices } from "@saleor/utils/maps"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; -import AppHeader from "@saleor/components/AppHeader"; -import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; +import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; +import { mapCountriesToChoices } from "@saleor/utils/maps"; import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import WarehouseInfo from "../WarehouseInfo"; export interface WarehouseCreatePageFormData extends AddressTypeInput { diff --git a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx index 224a2c36e..df8e450a7 100644 --- a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx +++ b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx @@ -1,9 +1,8 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface WarehouseDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx index bf7e9ab4f..aa1de917c 100644 --- a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx +++ b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx @@ -1,13 +1,13 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { address, countries } from "@saleor/fixtures"; import Decorator from "@saleor/storybook/Decorator"; import { WarehouseErrorCode } from "@saleor/types/globalTypes"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { warehouseList } from "../../fixtures"; import WarehouseDetailsPage, { - WarehouseDetailsPageProps, - WarehouseDetailsPageFormData + WarehouseDetailsPageFormData, + WarehouseDetailsPageProps } from "./WarehouseDetailsPage"; const props: WarehouseDetailsPageProps = { diff --git a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx index c4c53c811..47173d474 100644 --- a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx +++ b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx @@ -1,28 +1,28 @@ -import React from "react"; -import { useIntl, FormattedMessage } from "react-intl"; - -import Container from "@saleor/components/Container"; -import Form from "@saleor/components/Form"; -import SaveButtonBar from "@saleor/components/SaveButtonBar"; -import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import Grid from "@saleor/components/Grid"; +import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import CompanyAddressInput from "@saleor/components/CompanyAddressInput"; +import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; +import Container from "@saleor/components/Container"; +import Form from "@saleor/components/Form"; +import Grid from "@saleor/components/Grid"; +import PageHeader from "@saleor/components/PageHeader"; +import SaveButtonBar from "@saleor/components/SaveButtonBar"; +import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; -import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { mapCountriesToChoices } from "@saleor/utils/maps"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { maybe, findValueInEnum } from "@saleor/misc"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; -import AppHeader from "@saleor/components/AppHeader"; -import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; +import { findValueInEnum, maybe } from "@saleor/misc"; import { CountryCode } from "@saleor/types/globalTypes"; +import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; +import { mapCountriesToChoices } from "@saleor/utils/maps"; import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + +import { WarehouseDetails_warehouse } from "../../types/WarehouseDetails"; import WarehouseInfo from "../WarehouseInfo"; import WarehouseZones from "../WarehouseZones"; -import { WarehouseDetails_warehouse } from "../../types/WarehouseDetails"; export interface WarehouseDetailsPageFormData extends AddressTypeInput { name: string; diff --git a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx index 1dde8858a..779411183 100644 --- a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx +++ b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx @@ -1,15 +1,14 @@ -import React from "react"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; -import { commonMessages } from "@saleor/intl"; import { FormChange } from "@saleor/hooks/useForm"; +import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; -import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; import getWarehouseErrorMessage from "@saleor/utils/errors/warehouse"; +import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; export interface WarehouseInfoProps { data: Record<"name", string>; diff --git a/src/warehouses/components/WarehouseList/WarehouseList.tsx b/src/warehouses/components/WarehouseList/WarehouseList.tsx index 68602fb33..3bfc9cc73 100644 --- a/src/warehouses/components/WarehouseList/WarehouseList.tsx +++ b/src/warehouses/components/WarehouseList/WarehouseList.tsx @@ -1,24 +1,23 @@ +import IconButton from "@material-ui/core/IconButton"; import { makeStyles } from "@material-ui/core/styles"; 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 TableHead from "@material-ui/core/TableHead"; -import React from "react"; -import { FormattedMessage } from "react-intl"; -import IconButton from "@material-ui/core/IconButton"; +import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ListProps, SortPage } from "@saleor/types"; -import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; import { WarehouseWithShippingFragment } from "@saleor/warehouses/types/WarehouseWithShippingFragment"; +import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; +import React from "react"; +import { FormattedMessage } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/warehouses/components/WarehouseListPage/WarehouseListPage.stories.tsx b/src/warehouses/components/WarehouseListPage/WarehouseListPage.stories.tsx index 6fbaaeac5..42f304c76 100644 --- a/src/warehouses/components/WarehouseListPage/WarehouseListPage.stories.tsx +++ b/src/warehouses/components/WarehouseListPage/WarehouseListPage.stories.tsx @@ -1,17 +1,17 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { pageListProps, - tabPageProps, + searchPageProps, sortPageProps, - searchPageProps + tabPageProps } from "@saleor/fixtures"; +import Decorator from "@saleor/storybook/Decorator"; import WarehouseListPage, { WarehouseListPageProps } from "@saleor/warehouses/components/WarehouseListPage"; -import Decorator from "@saleor/storybook/Decorator"; import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { warehouseList } from "../../fixtures"; const props: WarehouseListPageProps = { diff --git a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx index dc3d0b257..f81ea5455 100644 --- a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx +++ b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx @@ -1,8 +1,6 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - +import AppHeader from "@saleor/components/AppHeader"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import SearchBar from "@saleor/components/SearchBar"; @@ -10,12 +8,14 @@ import { sectionNames } from "@saleor/intl"; import { PageListProps, SearchPageProps, - TabPageProps, - SortPage + SortPage, + TabPageProps } from "@saleor/types"; -import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; -import AppHeader from "@saleor/components/AppHeader"; import { WarehouseWithShippingFragment } from "@saleor/warehouses/types/WarehouseWithShippingFragment"; +import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import WarehouseList from "../WarehouseList"; export interface WarehouseListPageProps diff --git a/src/warehouses/components/WarehouseZones/WarehouseZones.tsx b/src/warehouses/components/WarehouseZones/WarehouseZones.tsx index b4fe1cb2d..4a27cbdf3 100644 --- a/src/warehouses/components/WarehouseZones/WarehouseZones.tsx +++ b/src/warehouses/components/WarehouseZones/WarehouseZones.tsx @@ -1,15 +1,14 @@ -import React from "react"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import Typography from "@material-ui/core/Typography"; -import { useIntl, FormattedMessage } from "react-intl"; import makeStyles from "@material-ui/core/styles/makeStyles"; - +import Typography from "@material-ui/core/Typography"; import CardTitle from "@saleor/components/CardTitle"; -import { WarehouseDetails_warehouse_shippingZones_edges_node } from "@saleor/warehouses/types/WarehouseDetails"; -import { renderCollection, maybe } from "@saleor/misc"; import Link from "@saleor/components/Link"; import Skeleton from "@saleor/components/Skeleton"; +import { maybe, renderCollection } from "@saleor/misc"; +import { WarehouseDetails_warehouse_shippingZones_edges_node } from "@saleor/warehouses/types/WarehouseDetails"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface WarehouseInfoProps { zones: WarehouseDetails_warehouse_shippingZones_edges_node[]; diff --git a/src/warehouses/index.tsx b/src/warehouses/index.tsx index b94af8c1a..95a0a3c60 100644 --- a/src/warehouses/index.tsx +++ b/src/warehouses/index.tsx @@ -1,22 +1,22 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; +import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { useIntl } from "react-intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { + warehouseAddPath, warehouseListPath, WarehouseListUrlQueryParams, - warehousePath, - WarehouseUrlQueryParams, WarehouseListUrlSortField, - warehouseAddPath + warehousePath, + WarehouseUrlQueryParams } from "./urls"; +import WarehouseCreate from "./views/WarehouseCreate"; import WarehouseDetailsComponent from "./views/WarehouseDetails"; import WarehouseListComponent from "./views/WarehouseList"; -import WarehouseCreate from "./views/WarehouseCreate"; const WarehouseList: React.FC = ({ location }) => { const qs = parseQs(location.search.substr(1)); diff --git a/src/warehouses/mutations.ts b/src/warehouses/mutations.ts index 343f1bb50..b41cd413d 100644 --- a/src/warehouses/mutations.ts +++ b/src/warehouses/mutations.ts @@ -1,19 +1,19 @@ +import makeMutation from "@saleor/hooks/makeMutation"; import gql from "graphql-tag"; -import makeMutation from "@saleor/hooks/makeMutation"; +import { warehouseDetailsFragment } from "./queries"; import { WarehouseCreate, WarehouseCreateVariables } from "./types/WarehouseCreate"; -import { - WarehouseUpdate, - WarehouseUpdateVariables -} from "./types/WarehouseUpdate"; import { WarehouseDelete, WarehouseDeleteVariables } from "./types/WarehouseDelete"; -import { warehouseDetailsFragment } from "./queries"; +import { + WarehouseUpdate, + WarehouseUpdateVariables +} from "./types/WarehouseUpdate"; export const warehouseErrorFragment = gql` fragment WarehouseErrorFragment on WarehouseError { diff --git a/src/warehouses/queries.ts b/src/warehouses/queries.ts index 8075c0ee0..3f4ee4ff6 100644 --- a/src/warehouses/queries.ts +++ b/src/warehouses/queries.ts @@ -1,13 +1,13 @@ +import makeQuery from "@saleor/hooks/makeQuery"; +import { fragmentAddress } from "@saleor/orders/queries"; +import { pageInfoFragment } from "@saleor/queries"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { pageInfoFragment } from "@saleor/queries"; -import { fragmentAddress } from "@saleor/orders/queries"; -import { WarehouseList, WarehouseListVariables } from "./types/WarehouseList"; import { WarehouseDetails, WarehouseDetailsVariables } from "./types/WarehouseDetails"; +import { WarehouseList, WarehouseListVariables } from "./types/WarehouseList"; export const warehouseFragment = gql` fragment WarehouseFragment on Warehouse { diff --git a/src/warehouses/urls.ts b/src/warehouses/urls.ts index d84d2266a..83877066b 100644 --- a/src/warehouses/urls.ts +++ b/src/warehouses/urls.ts @@ -7,8 +7,8 @@ import { Filters, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; export const warehouseSection = "/warehouses/"; diff --git a/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx b/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx index bb98e6444..ceb77e22d 100644 --- a/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx +++ b/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx @@ -1,16 +1,15 @@ -import React from "react"; -import { useIntl } from "react-intl"; - -import WarehouseCreatePage from "@saleor/warehouses/components/WarehouseCreatePage"; +import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; -import { warehouseListUrl, warehouseUrl } from "@saleor/warehouses/urls"; -import { useWarehouseCreate } from "@saleor/warehouses/mutations"; -import { commonMessages } from "@saleor/intl"; import useNotifier from "@saleor/hooks/useNotifier"; +import useShop from "@saleor/hooks/useShop"; +import { commonMessages } from "@saleor/intl"; import { findValueInEnum, getMutationStatus } from "@saleor/misc"; import { CountryCode } from "@saleor/types/globalTypes"; -import useShop from "@saleor/hooks/useShop"; -import { WindowTitle } from "@saleor/components/WindowTitle"; +import WarehouseCreatePage from "@saleor/warehouses/components/WarehouseCreatePage"; +import { useWarehouseCreate } from "@saleor/warehouses/mutations"; +import { warehouseListUrl, warehouseUrl } from "@saleor/warehouses/urls"; +import React from "react"; +import { useIntl } from "react-intl"; const WarehouseCreate: React.FC = () => { const intl = useIntl(); diff --git a/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx b/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx index b8655ef00..623d51df9 100644 --- a/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx +++ b/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx @@ -1,32 +1,31 @@ -import React from "react"; -import { useIntl } from "react-intl"; - -import WarehouseDetailsPage from "@saleor/warehouses/components/WarehouseDetailsPage"; +import NotFoundPage from "@saleor/components/NotFoundPage"; +import { WindowTitle } from "@saleor/components/WindowTitle"; import useNavigator from "@saleor/hooks/useNavigator"; -import { - warehouseListUrl, - WarehouseUrlQueryParams, - warehouseUrl -} from "@saleor/warehouses/urls"; -import { useWarehouseDetails } from "@saleor/warehouses/queries"; -import { commonMessages } from "@saleor/intl"; import useNotifier from "@saleor/hooks/useNotifier"; +import useShop from "@saleor/hooks/useShop"; +import { commonMessages } from "@saleor/intl"; import { findValueInEnum, getMutationStatus, getStringOrPlaceholder } from "@saleor/misc"; -import { CountryCode } from "@saleor/types/globalTypes"; -import useShop from "@saleor/hooks/useShop"; -import { WindowTitle } from "@saleor/components/WindowTitle"; -import { - useWarehouseUpdate, - useWarehouseDelete -} from "@saleor/warehouses/mutations"; import { shippingZoneUrl } from "@saleor/shipping/urls"; -import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; +import { CountryCode } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; +import WarehouseDetailsPage from "@saleor/warehouses/components/WarehouseDetailsPage"; +import { + useWarehouseDelete, + useWarehouseUpdate +} from "@saleor/warehouses/mutations"; +import { useWarehouseDetails } from "@saleor/warehouses/queries"; +import { + warehouseListUrl, + warehouseUrl, + WarehouseUrlQueryParams +} from "@saleor/warehouses/urls"; +import React from "react"; +import { useIntl } from "react-intl"; export interface WarehouseDetailsProps { id: string; diff --git a/src/warehouses/views/WarehouseList/WarehouseList.tsx b/src/warehouses/views/WarehouseList/WarehouseList.tsx index 4609456a6..49d0edca1 100644 --- a/src/warehouses/views/WarehouseList/WarehouseList.tsx +++ b/src/warehouses/views/WarehouseList/WarehouseList.tsx @@ -1,45 +1,45 @@ +import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; +import SaveFilterTabDialog, { + SaveFilterTabDialogFormData +} from "@saleor/components/SaveFilterTabDialog"; +import { WindowTitle } from "@saleor/components/WindowTitle"; +import { configurationMenuUrl } from "@saleor/configuration"; +import useListSettings from "@saleor/hooks/useListSettings"; +import useNavigator from "@saleor/hooks/useNavigator"; +import useNotifier from "@saleor/hooks/useNotifier"; +import usePaginator, { + createPaginationState +} from "@saleor/hooks/usePaginator"; +import { commonMessages, sectionNames } from "@saleor/intl"; +import { getMutationStatus, maybe } from "@saleor/misc"; +import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; +import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; +import WarehouseListPage from "@saleor/warehouses/components/WarehouseListPage"; +import { useWarehouseDelete } from "@saleor/warehouses/mutations"; +import { useWarehouseList } from "@saleor/warehouses/queries"; +import { + warehouseAddUrl, + warehouseListUrl, + WarehouseListUrlDialog, + WarehouseListUrlQueryParams, + warehouseUrl +} from "@saleor/warehouses/urls"; import React from "react"; import { useIntl } from "react-intl"; import { - WarehouseListUrlQueryParams, - warehouseUrl, - WarehouseListUrlDialog, - warehouseListUrl, - warehouseAddUrl -} from "@saleor/warehouses/urls"; -import useNavigator from "@saleor/hooks/useNavigator"; -import { useWarehouseList } from "@saleor/warehouses/queries"; -import usePaginator, { - createPaginationState -} from "@saleor/hooks/usePaginator"; -import useNotifier from "@saleor/hooks/useNotifier"; -import useListSettings from "@saleor/hooks/useListSettings"; -import { ListViews } from "@saleor/types"; -import { WindowTitle } from "@saleor/components/WindowTitle"; -import { sectionNames, commonMessages } from "@saleor/intl"; -import WarehouseListPage from "@saleor/warehouses/components/WarehouseListPage"; -import SaveFilterTabDialog, { - SaveFilterTabDialogFormData -} from "@saleor/components/SaveFilterTabDialog"; -import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; -import { maybe, getMutationStatus } from "@saleor/misc"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; -import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import { configurationMenuUrl } from "@saleor/configuration"; -import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; -import { useWarehouseDelete } from "@saleor/warehouses/mutations"; -import { getSortQueryVariables } from "./sort"; -import { - getFilterVariables, - getFilterTabs, areFiltersApplied, deleteFilterTab, - saveFilterTab, - getActiveFilters + getActiveFilters, + getFilterTabs, + getFilterVariables, + saveFilterTab } from "./filters"; +import { getSortQueryVariables } from "./sort"; export interface WarehouseListProps { params: WarehouseListUrlQueryParams; diff --git a/src/warehouses/views/WarehouseList/filters.ts b/src/warehouses/views/WarehouseList/filters.ts index f0e6a19f3..3bb609cbc 100644 --- a/src/warehouses/views/WarehouseList/filters.ts +++ b/src/warehouses/views/WarehouseList/filters.ts @@ -1,4 +1,5 @@ import { WarehouseFilterInput } from "@saleor/types/globalTypes"; + import { createFilterTabUtils, createFilterUtils diff --git a/src/warehouses/views/WarehouseList/sort.ts b/src/warehouses/views/WarehouseList/sort.ts index ccf74b0fb..f346c6492 100644 --- a/src/warehouses/views/WarehouseList/sort.ts +++ b/src/warehouses/views/WarehouseList/sort.ts @@ -1,6 +1,6 @@ -import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; import { WarehouseSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; +import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; export function getSortQueryField( sort: WarehouseListUrlSortField diff --git a/src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx b/src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx index 222dbbd5c..7cd407acd 100644 --- a/src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx +++ b/src/webhooks/components/WebhookCreatePage/WebhookCreatePage.tsx @@ -13,9 +13,9 @@ import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/single import WebhookEvents from "@saleor/webhooks/components/WebhookEvents"; import WebhookInfo from "@saleor/webhooks/components/WebhookInfo"; import WebhookStatus from "@saleor/webhooks/components/WebhookStatus"; +import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; import React from "react"; import { useIntl } from "react-intl"; -import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; export interface FormData { events: WebhookEventTypeEnum[]; diff --git a/src/webhooks/components/WebhookCreatePage/WebhooksCreatePage.stories.tsx b/src/webhooks/components/WebhookCreatePage/WebhooksCreatePage.stories.tsx index 03927625f..5c8cce0c0 100644 --- a/src/webhooks/components/WebhookCreatePage/WebhooksCreatePage.stories.tsx +++ b/src/webhooks/components/WebhookCreatePage/WebhooksCreatePage.stories.tsx @@ -1,8 +1,8 @@ +import Decorator from "@saleor/storybook/Decorator"; +import { WebhookErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; -import { WebhookErrorCode } from "@saleor/types/globalTypes"; import WebhookCreatePage, { WebhookCreatePageProps } from "./WebhookCreatePage"; const props: WebhookCreatePageProps = { diff --git a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.stories.tsx b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.stories.tsx index 928ec2a72..36655fb91 100644 --- a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.stories.tsx +++ b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.stories.tsx @@ -1,7 +1,7 @@ +import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; import WebhookDeleteDialog, { WebhookDeleteDialogProps } from "./WebhookDeleteDialog"; diff --git a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx index 5c0b5807f..de9ce5d50 100644 --- a/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx +++ b/src/webhooks/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx @@ -1,10 +1,9 @@ import DialogContentText from "@material-ui/core/DialogContentText"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { getStringOrPlaceholder } from "@saleor/misc"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; export interface WebhookDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; diff --git a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx index dec1e0ca6..0b3f0975b 100644 --- a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx +++ b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx @@ -3,9 +3,6 @@ import CardContent from "@material-ui/core/CardContent"; import makeStyles from "@material-ui/core/styles/makeStyles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; -import React from "react"; -import { useIntl } from "react-intl"; - import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; @@ -17,6 +14,9 @@ import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getWebhookErrorMessage from "@saleor/utils/errors/webhooks"; import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; +import React from "react"; +import { useIntl } from "react-intl"; + import { FormData } from "../WebhooksDetailsPage"; interface WebhookInfoProps { diff --git a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.stories.tsx b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.stories.tsx index 63839d99d..79dfe2cca 100644 --- a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.stories.tsx +++ b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.stories.tsx @@ -1,8 +1,8 @@ +import Decorator from "@saleor/storybook/Decorator"; +import { WebhookErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; -import Decorator from "@saleor/storybook/Decorator"; -import { WebhookErrorCode } from "@saleor/types/globalTypes"; import { webhook } from "../../fixtures"; import WebhooksDetailsPage, { WebhooksDetailsPageProps diff --git a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx index 2bde60fd9..c2d7c7ebb 100644 --- a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx +++ b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx @@ -1,6 +1,3 @@ -import React from "react"; -import { useIntl } from "react-intl"; - import AppHeader from "@saleor/components/AppHeader"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; @@ -11,7 +8,7 @@ import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import { SearchServiceAccount_search_edges_node } from "@saleor/searches/types/SearchServiceAccount"; import { WebhookEventTypeEnum } from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; @@ -21,6 +18,8 @@ import WebhookStatus from "@saleor/webhooks/components/WebhookStatus"; import { WebhookDetails_webhook } from "@saleor/webhooks/types/WebhookDetails"; import { WebhookErrorFragment } from "@saleor/webhooks/types/WebhookErrorFragment"; import { isUnnamed } from "@saleor/webhooks/utils"; +import React from "react"; +import { useIntl } from "react-intl"; export interface FormData { events: WebhookEventTypeEnum[]; diff --git a/src/webhooks/components/WebhooksList/WebhooksList.tsx b/src/webhooks/components/WebhooksList/WebhooksList.tsx index d54ba1fc2..3afda1d44 100644 --- a/src/webhooks/components/WebhooksList/WebhooksList.tsx +++ b/src/webhooks/components/WebhooksList/WebhooksList.tsx @@ -7,19 +7,19 @@ import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import DeleteIcon from "@material-ui/icons/Delete"; import EditIcon from "@material-ui/icons/Edit"; -import React from "react"; -import { useIntl, FormattedMessage } from "react-intl"; -import classNames from "classnames"; - import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; import { renderCollection, stopPropagation } from "@saleor/misc"; import { ListProps, SortPage } from "@saleor/types"; -import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; -import TableCellHeader from "@saleor/components/TableCellHeader"; import { getArrowDirection } from "@saleor/utils/sort"; +import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; import { isUnnamed } from "@saleor/webhooks/utils"; +import classNames from "classnames"; +import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; + import { Webhooks_webhooks_edges_node } from "../../types/Webhooks"; export interface WebhooksListProps diff --git a/src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx b/src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx index 077ed6ddf..f15f9bbd6 100644 --- a/src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx +++ b/src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx @@ -1,16 +1,16 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; - import { + filterPageProps, listActionsProps, pageListProps, searchPageProps, - tabPageProps, sortPageProps, - filterPageProps + tabPageProps } from "@saleor/fixtures"; import Decorator from "@saleor/storybook/Decorator"; import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; +import { storiesOf } from "@storybook/react"; +import React from "react"; + import { webhookList } from "../../fixtures"; import WebhooksListPage, { WebhooksListPageProps } from "./WebhooksListPage"; diff --git a/src/webhooks/components/WebhooksListPage/WebhooksListPage.tsx b/src/webhooks/components/WebhooksListPage/WebhooksListPage.tsx index 53ad7f01e..15b8e8aa7 100644 --- a/src/webhooks/components/WebhooksListPage/WebhooksListPage.tsx +++ b/src/webhooks/components/WebhooksListPage/WebhooksListPage.tsx @@ -1,26 +1,26 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; +import AppHeader from "@saleor/components/AppHeader"; +import Container from "@saleor/components/Container"; +import FilterBar from "@saleor/components/FilterBar"; +import PageHeader from "@saleor/components/PageHeader"; +import { sectionNames } from "@saleor/intl"; +import { + FilterPageProps, + PageListProps, + SortPage, + TabPageProps +} from "@saleor/types"; +import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import AppHeader from "@saleor/components/AppHeader"; -import Container from "@saleor/components/Container"; -import PageHeader from "@saleor/components/PageHeader"; -import FilterBar from "@saleor/components/FilterBar"; -import { sectionNames } from "@saleor/intl"; -import { - PageListProps, - FilterPageProps, - TabPageProps, - SortPage -} from "@saleor/types"; -import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; import { Webhooks_webhooks_edges_node } from "../../types/Webhooks"; import WebhooksList from "../WebhooksList"; import { + createFilterStructure, WebhookFilterKeys, - WebhookListFilterOpts, - createFilterStructure + WebhookListFilterOpts } from "./filters"; export interface WebhooksListPageProps diff --git a/src/webhooks/components/WebhooksListPage/filters.ts b/src/webhooks/components/WebhooksListPage/filters.ts index 511e2d847..b4e9fa024 100644 --- a/src/webhooks/components/WebhooksListPage/filters.ts +++ b/src/webhooks/components/WebhooksListPage/filters.ts @@ -1,9 +1,8 @@ -import { defineMessages, IntlShape } from "react-intl"; - -import { FilterOpts } from "@saleor/types"; -import { createBooleanField } from "@saleor/utils/filters/fields"; import { IFilter } from "@saleor/components/Filter"; import { commonMessages } from "@saleor/intl"; +import { FilterOpts } from "@saleor/types"; +import { createBooleanField } from "@saleor/utils/filters/fields"; +import { defineMessages, IntlShape } from "react-intl"; export enum WebhookFilterKeys { isActive = "isActive" diff --git a/src/webhooks/index.tsx b/src/webhooks/index.tsx index 8595aaf50..74e8afca9 100644 --- a/src/webhooks/index.tsx +++ b/src/webhooks/index.tsx @@ -1,22 +1,22 @@ +import { sectionNames } from "@saleor/intl"; +import { asSortParams } from "@saleor/utils/sort"; import { parse as parseQs } from "qs"; import React from "react"; import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; -import { sectionNames } from "@saleor/intl"; -import { asSortParams } from "@saleor/utils/sort"; import { WindowTitle } from "../components/WindowTitle"; import { webhookAddUrl, webhookListPath, WebhookListUrlQueryParams, + WebhookListUrlSortField, webhookPath, - WebhookUrlQueryParams, - WebhookListUrlSortField + WebhookUrlQueryParams } from "./urls"; +import WebhooksList from "./views/WebhookList"; import WebhookCreate from "./views/WebhooksCreate"; import WebhooksDetails from "./views/WebhooksDetails"; -import WebhooksList from "./views/WebhookList"; const WebhookList: React.FC> = ({ location }) => { const qs = parseQs(location.search.substr(1)); diff --git a/src/webhooks/queries.ts b/src/webhooks/queries.ts index e0e2ab190..59333a398 100644 --- a/src/webhooks/queries.ts +++ b/src/webhooks/queries.ts @@ -1,6 +1,6 @@ +import makeQuery from "@saleor/hooks/makeQuery"; import gql from "graphql-tag"; -import makeQuery from "@saleor/hooks/makeQuery"; import { TypedQuery } from "../queries"; import { WebhookDetails, diff --git a/src/webhooks/urls.ts b/src/webhooks/urls.ts index b01c39865..cb2f13412 100644 --- a/src/webhooks/urls.ts +++ b/src/webhooks/urls.ts @@ -7,8 +7,8 @@ import { Filters, Pagination, SingleAction, - TabActionDialog, - Sort + Sort, + TabActionDialog } from "../types"; export const webhookSection = "/webhooks/"; diff --git a/src/webhooks/views/WebhookList/WebhookList.tsx b/src/webhooks/views/WebhookList/WebhookList.tsx index fad6d45ec..7bf85a4c8 100644 --- a/src/webhooks/views/WebhookList/WebhookList.tsx +++ b/src/webhooks/views/WebhookList/WebhookList.tsx @@ -9,40 +9,40 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; +import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; -import { maybe, getStringOrPlaceholder } from "@saleor/misc"; +import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; +import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; +import createSortHandler from "@saleor/utils/handlers/sortHandler"; +import { getSortParams } from "@saleor/utils/sort"; import WebhookDeleteDialog from "@saleor/webhooks/components/WebhookDeleteDialog"; import { WebhookDelete } from "@saleor/webhooks/types/WebhookDelete"; import React from "react"; import { useIntl } from "react-intl"; -import { getSortParams } from "@saleor/utils/sort"; -import createSortHandler from "@saleor/utils/handlers/sortHandler"; -import useShop from "@saleor/hooks/useShop"; -import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import WebhooksListPage from "../../components/WebhooksListPage/WebhooksListPage"; import { TypedWebhookDelete } from "../../mutations"; import { useWebhooksListQuery } from "../../queries"; import { - WebhookListUrlDialog, webhookAddUrl, webhookListUrl, + WebhookListUrlDialog, WebhookListUrlQueryParams, webhookUrl } from "../../urls"; -import { getSortQueryVariables } from "./sort"; import { areFiltersApplied, deleteFilterTab, getActiveFilters, + getFilterOpts, + getFilterQueryParam, getFilterTabs, getFilterVariables, - getFilterQueryParam, - saveFilterTab, - getFilterOpts + saveFilterTab } from "./filters"; +import { getSortQueryVariables } from "./sort"; interface WebhooksListProps { params: WebhookListUrlQueryParams; diff --git a/src/webhooks/views/WebhookList/filters.test.ts b/src/webhooks/views/WebhookList/filters.test.ts index 2aa937136..c3c537d7a 100644 --- a/src/webhooks/views/WebhookList/filters.test.ts +++ b/src/webhooks/views/WebhookList/filters.test.ts @@ -1,12 +1,12 @@ -import { createIntl } from "react-intl"; -import { stringify as stringifyQs } from "qs"; - -import { WebhookListUrlFilters } from "@saleor/webhooks/urls"; -import { createFilterStructure } from "@saleor/webhooks/components/WebhooksListPage"; import { getFilterQueryParams } from "@saleor/utils/filters"; +import { createFilterStructure } from "@saleor/webhooks/components/WebhooksListPage"; +import { WebhookListUrlFilters } from "@saleor/webhooks/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; import { config } from "@test/intl"; -import { getFilterVariables, getFilterQueryParam } from "./filters"; +import { stringify as stringifyQs } from "qs"; +import { createIntl } from "react-intl"; + +import { getFilterQueryParam, getFilterVariables } from "./filters"; describe("Filtering query params", () => { it("should be empty object if no params given", () => { diff --git a/src/webhooks/views/WebhookList/filters.ts b/src/webhooks/views/WebhookList/filters.ts index d8026e2f4..40197426c 100644 --- a/src/webhooks/views/WebhookList/filters.ts +++ b/src/webhooks/views/WebhookList/filters.ts @@ -1,15 +1,16 @@ +import { IFilterElement } from "@saleor/components/Filter"; +import { maybe, parseBoolean } from "@saleor/misc"; import { WebhookFilterInput } from "@saleor/types/globalTypes"; import { createFilterTabUtils, createFilterUtils, getSingleValueQueryParam } from "@saleor/utils/filters"; -import { IFilterElement } from "@saleor/components/Filter"; import { - WebhookListFilterOpts, - WebhookFilterKeys + WebhookFilterKeys, + WebhookListFilterOpts } from "@saleor/webhooks/components/WebhooksListPage"; -import { parseBoolean, maybe } from "@saleor/misc"; + import { WebhookListUrlFilters, WebhookListUrlFiltersEnum, diff --git a/src/webhooks/views/WebhookList/sort.ts b/src/webhooks/views/WebhookList/sort.ts index c0ccfc064..c28020753 100644 --- a/src/webhooks/views/WebhookList/sort.ts +++ b/src/webhooks/views/WebhookList/sort.ts @@ -1,6 +1,6 @@ -import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; import { WebhookSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; +import { WebhookListUrlSortField } from "@saleor/webhooks/urls"; export function getSortQueryField( sort: WebhookListUrlSortField diff --git a/src/webhooks/views/WebhooksCreate.tsx b/src/webhooks/views/WebhooksCreate.tsx index 63272b056..fb8e4dccc 100644 --- a/src/webhooks/views/WebhooksCreate.tsx +++ b/src/webhooks/views/WebhooksCreate.tsx @@ -8,6 +8,7 @@ import { WebhookEventTypeEnum } from "@saleor/types/globalTypes"; import { WebhookCreate as WebhookCreateData } from "@saleor/webhooks/types/WebhookCreate"; import React from "react"; import { useIntl } from "react-intl"; + import WebhookCreatePage, { FormData } from "../components/WebhookCreatePage"; import { TypedWebhookCreate } from "../mutations"; import { webhookListUrl, WebhookListUrlQueryParams, webhookUrl } from "../urls"; diff --git a/src/webhooks/views/WebhooksDetails.tsx b/src/webhooks/views/WebhooksDetails.tsx index 077ae4b14..c9941c0bb 100644 --- a/src/webhooks/views/WebhooksDetails.tsx +++ b/src/webhooks/views/WebhooksDetails.tsx @@ -1,6 +1,4 @@ -import React from "react"; -import { useIntl } from "react-intl"; - +import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -8,11 +6,13 @@ import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import useServiceAccountSearch from "@saleor/searches/useServiceAccountSearch"; import { WebhookEventTypeEnum } from "@saleor/types/globalTypes"; +import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import WebhookDeleteDialog from "@saleor/webhooks/components/WebhookDeleteDialog"; import { WebhookDelete } from "@saleor/webhooks/types/WebhookDelete"; import { WebhookUpdate } from "@saleor/webhooks/types/WebhookUpdate"; -import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import NotFoundPage from "@saleor/components/NotFoundPage"; +import React from "react"; +import { useIntl } from "react-intl"; + import { getStringOrPlaceholder } from "../../misc"; import WebhooksDetailsPage from "../components/WebhooksDetailsPage"; import { TypedWebhookDelete, TypedWebhookUpdate } from "../mutations";