From a82de30309e5840820da892a927bec3d526759fa Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Thu, 14 May 2020 11:30:32 +0200 Subject: [PATCH 001/294] 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"; From 75efb26aa859fb4b65e23369056bec9466eaf12a Mon Sep 17 00:00:00 2001 From: AlicjaSzu Date: Fri, 15 May 2020 17:19:51 +0200 Subject: [PATCH 002/294] add discount to Order details view --- locale/defaultMessages.json | 4 ++++ .../components/OrderPayment/OrderPayment.tsx | 14 ++++++++++++++ src/orders/queries.ts | 4 ++++ src/orders/types/FulfillOrder.ts | 7 +++++++ src/orders/types/OrderCancel.ts | 7 +++++++ src/orders/types/OrderCapture.ts | 7 +++++++ src/orders/types/OrderDetails.ts | 7 +++++++ src/orders/types/OrderDetailsFragment.ts | 7 +++++++ src/orders/types/OrderDraftCancel.ts | 7 +++++++ src/orders/types/OrderDraftFinalize.ts | 7 +++++++ src/orders/types/OrderDraftUpdate.ts | 7 +++++++ src/orders/types/OrderFulfillmentCancel.ts | 7 +++++++ src/orders/types/OrderFulfillmentUpdateTracking.ts | 7 +++++++ src/orders/types/OrderLineDelete.ts | 7 +++++++ src/orders/types/OrderLineUpdate.ts | 7 +++++++ src/orders/types/OrderLinesAdd.ts | 7 +++++++ src/orders/types/OrderMarkAsPaid.ts | 7 +++++++ src/orders/types/OrderRefund.ts | 7 +++++++ src/orders/types/OrderVoid.ts | 7 +++++++ 19 files changed, 134 insertions(+) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index efb382289..b94bb5e2f 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -2749,6 +2749,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index 2a8368e30..968ac7385 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -159,6 +159,20 @@ const OrderPayment: React.FC = props => { )} + {maybe(() => order && order.discount.amount !== 0) ? ( + + + + + + + - + + + ) : null} Date: Fri, 15 May 2020 18:09:14 +0200 Subject: [PATCH 003/294] update orderes fixtures --- src/orders/fixtures.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/orders/fixtures.ts b/src/orders/fixtures.ts index acd3fc9e2..a881d9769 100644 --- a/src/orders/fixtures.ts +++ b/src/orders/fixtures.ts @@ -810,6 +810,7 @@ export const order = (placeholder: string): OrderDetails_order => ({ canFinalize: true, created: "2018-09-11T09:37:28.185874+00:00", customerNote: "Lorem ipsum dolor sit amet", + discount: null, events: [ { __typename: "OrderEvent", @@ -1043,6 +1044,7 @@ export const draftOrder = (placeholder: string): OrderDetails_order => ({ customerNote: "Lorem ipsum dolor sit", events: [], fulfillments: [], + discount: null, id: "T3JkZXI6MjQ=", lines: [ { From f55d3b4c98d35558c2ca1032a7f02ed22cc9e607 Mon Sep 17 00:00:00 2001 From: Mirek Mencel Date: Tue, 19 May 2020 10:50:15 +0200 Subject: [PATCH 004/294] Update Dashboard preview image in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24fa36f56..6e57baf97 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Saleor Dashboard -![1 copy 2x](https://user-images.githubusercontent.com/5421321/47799917-8afd7a00-dd2b-11e8-88c7-63588e25bcea.png) +![Saleor Dashboard](https://user-images.githubusercontent.com/249912/82305745-5c52fd00-99be-11ea-9ac6-cc04a6f28c91.png) A GraphQL-powered, single-page dashboard application for [Saleor](https://github.com/mirumee/saleor/). From 170ea623c1a9ec8758fc2be91f20f67c84e74f44 Mon Sep 17 00:00:00 2001 From: Mirek Mencel Date: Tue, 19 May 2020 10:52:44 +0200 Subject: [PATCH 005/294] Update README footer --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6e57baf97..158a54afd 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,5 @@ To build the application bundle run: ``` $ npm run build ``` + +#### Crafted with ❤️ by [Mirumee Software](https://mirumee.com) From aefb339861e3867b898cb656865f1d60b1d2d492 Mon Sep 17 00:00:00 2001 From: AlicjaSzu Date: Tue, 19 May 2020 11:34:01 +0200 Subject: [PATCH 006/294] fix orders fixture error --- src/orders/components/OrderPayment/OrderPayment.tsx | 4 ++-- src/orders/fixtures.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index 968ac7385..dcdaa71f9 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -159,7 +159,7 @@ const OrderPayment: React.FC = props => { )} - {maybe(() => order && order.discount.amount !== 0) ? ( + {maybe(() => order && order.discount.amount !== 0) && ( = props => { - - ) : null} + )} ({ canFinalize: true, created: "2018-09-20T23:23:39.811428+00:00", customerNote: "Lorem ipsum dolor sit", + discount: null, events: [], fulfillments: [], - discount: null, id: "T3JkZXI6MjQ=", lines: [ { From 1047762aa67564f642e4f8d01ecc5b97da2bedbc Mon Sep 17 00:00:00 2001 From: AlicjaSzu Date: Tue, 19 May 2020 13:10:11 +0200 Subject: [PATCH 007/294] OrderPayment - update discount condition --- src/orders/components/OrderPayment/OrderPayment.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index dcdaa71f9..48a1c1992 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -159,7 +159,7 @@ const OrderPayment: React.FC = props => { )} - {maybe(() => order && order.discount.amount !== 0) && ( + {order?.discount?.amount > 0 && ( Date: Mon, 25 May 2020 11:59:23 +0200 Subject: [PATCH 008/294] Add sku column to fulfillment cards --- .../OrderFulfillment/OrderFulfillment.tsx | 16 +- .../OrderUnfulfilledItems.tsx | 14 + .../__snapshots__/Stories.test.ts.snap | 444 ++++++++++++++++++ 3 files changed, 473 insertions(+), 1 deletion(-) diff --git a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx index 5fc0a42b1..f0445f870 100644 --- a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx +++ b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx @@ -43,6 +43,11 @@ const useStyles = makeStyles( textAlign: "center", width: 120 }, + colSku: { + textAlign: "right", + textOverflow: "ellipsis", + width: 120 + }, colTotal: { textAlign: "right", width: 120 @@ -165,6 +170,12 @@ const OrderFulfillment: React.FC = props => { /> + + + = props => { > {maybe(() => line.orderLine.productName) || } + + {line?.orderLine.productSku || } + - {maybe(() => line.quantity) || } + {line?.quantity || } {maybe(() => line.orderLine.unitPrice.gross) ? ( diff --git a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx index b00e30df7..47634f897 100644 --- a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx +++ b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx @@ -40,6 +40,11 @@ const useStyles = makeStyles( textAlign: "center", width: 120 }, + colSku: { + textAlign: "right", + textOverflow: "ellipsis", + width: 120 + }, colTotal: { textAlign: "right", width: 120 @@ -97,6 +102,12 @@ const OrderUnfulfilledItems: React.FC = props => { /> + + + = props => { > {maybe(() => line.productName) || } + + {line?.productSku || } + {maybe(() => line.quantity - line.quantityFulfilled) || ( diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index ae0c2bc8f..52aaa5a23 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -66148,6 +66148,12 @@ exports[`Storyshots Views / Orders / Order details cancelled 1`] = ` Product + + SKU +
+ + 59-1337 + @@ -66270,6 +66281,12 @@ exports[`Storyshots Views / Orders / Order details cancelled 1`] = ` Product + + SKU + + + 5-1337 + @@ -66414,6 +66436,12 @@ exports[`Storyshots Views / Orders / Order details cancelled 1`] = ` Product + + SKU + + + 5-1337 + @@ -67011,6 +67044,12 @@ exports[`Storyshots Views / Orders / Order details default 1`] = ` Product + + SKU + + + 59-1337 + @@ -67174,6 +67218,12 @@ exports[`Storyshots Views / Orders / Order details default 1`] = ` Product + + SKU + + + 5-1337 + @@ -67359,6 +67414,12 @@ exports[`Storyshots Views / Orders / Order details default 1`] = ` Product + + SKU + + + 5-1337 + @@ -68037,6 +68103,12 @@ exports[`Storyshots Views / Orders / Order details fulfilled 1`] = ` Product + + SKU + + + 59-1337 + @@ -68200,6 +68277,12 @@ exports[`Storyshots Views / Orders / Order details fulfilled 1`] = ` Product + + SKU + + + 5-1337 + @@ -68385,6 +68473,12 @@ exports[`Storyshots Views / Orders / Order details fulfilled 1`] = ` Product + + SKU + + + 5-1337 + @@ -69066,6 +69165,12 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` Product + + SKU + + + + ‌ + + @@ -69633,6 +69747,12 @@ exports[`Storyshots Views / Orders / Order details no customer note 1`] = ` Product + + SKU + + + 59-1337 + @@ -69796,6 +69921,12 @@ exports[`Storyshots Views / Orders / Order details no customer note 1`] = ` Product + + SKU + + + 5-1337 + @@ -69981,6 +70117,12 @@ exports[`Storyshots Views / Orders / Order details no customer note 1`] = ` Product + + SKU + + + 5-1337 + @@ -70659,6 +70806,12 @@ exports[`Storyshots Views / Orders / Order details no payment 1`] = ` Product + + SKU + + + 59-1337 + @@ -70822,6 +70980,12 @@ exports[`Storyshots Views / Orders / Order details no payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -71007,6 +71176,12 @@ exports[`Storyshots Views / Orders / Order details no payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -71685,6 +71865,12 @@ exports[`Storyshots Views / Orders / Order details no shipping address 1`] = ` Product + + SKU + + + 59-1337 + @@ -71848,6 +72039,12 @@ exports[`Storyshots Views / Orders / Order details no shipping address 1`] = ` Product + + SKU + + + 5-1337 + @@ -72033,6 +72235,12 @@ exports[`Storyshots Views / Orders / Order details no shipping address 1`] = ` Product + + SKU + + + 5-1337 + @@ -72711,6 +72924,12 @@ exports[`Storyshots Views / Orders / Order details partially fulfilled 1`] = ` Product + + SKU + + + 59-1337 + @@ -72874,6 +73098,12 @@ exports[`Storyshots Views / Orders / Order details partially fulfilled 1`] = ` Product + + SKU + + + 5-1337 + @@ -73059,6 +73294,12 @@ exports[`Storyshots Views / Orders / Order details partially fulfilled 1`] = ` Product + + SKU + + + 5-1337 + @@ -73737,6 +73983,12 @@ exports[`Storyshots Views / Orders / Order details payment confirmed 1`] = ` Product + + SKU + + + 59-1337 + @@ -73900,6 +74157,12 @@ exports[`Storyshots Views / Orders / Order details payment confirmed 1`] = ` Product + + SKU + + + 5-1337 + @@ -74085,6 +74353,12 @@ exports[`Storyshots Views / Orders / Order details payment confirmed 1`] = ` Product + + SKU + + + 5-1337 + @@ -74763,6 +75042,12 @@ exports[`Storyshots Views / Orders / Order details payment error 1`] = ` Product + + SKU + + + 59-1337 + @@ -74926,6 +75216,12 @@ exports[`Storyshots Views / Orders / Order details payment error 1`] = ` Product + + SKU + + + 5-1337 + @@ -75111,6 +75412,12 @@ exports[`Storyshots Views / Orders / Order details payment error 1`] = ` Product + + SKU + + + 5-1337 + @@ -75789,6 +76101,12 @@ exports[`Storyshots Views / Orders / Order details pending payment 1`] = ` Product + + SKU + + + 59-1337 + @@ -75952,6 +76275,12 @@ exports[`Storyshots Views / Orders / Order details pending payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -76137,6 +76471,12 @@ exports[`Storyshots Views / Orders / Order details pending payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -76815,6 +77160,12 @@ exports[`Storyshots Views / Orders / Order details refunded payment 1`] = ` Product + + SKU + + + 59-1337 + @@ -76978,6 +77334,12 @@ exports[`Storyshots Views / Orders / Order details refunded payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -77163,6 +77530,12 @@ exports[`Storyshots Views / Orders / Order details refunded payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -77841,6 +78219,12 @@ exports[`Storyshots Views / Orders / Order details rejected payment 1`] = ` Product + + SKU + + + 59-1337 + @@ -78004,6 +78393,12 @@ exports[`Storyshots Views / Orders / Order details rejected payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -78189,6 +78589,12 @@ exports[`Storyshots Views / Orders / Order details rejected payment 1`] = ` Product + + SKU + + + 5-1337 + @@ -78867,6 +79278,12 @@ exports[`Storyshots Views / Orders / Order details unfulfilled 1`] = ` Product + + SKU + + + 59-1337 + @@ -79030,6 +79452,12 @@ exports[`Storyshots Views / Orders / Order details unfulfilled 1`] = ` Product + + SKU + + + 5-1337 + @@ -79215,6 +79648,12 @@ exports[`Storyshots Views / Orders / Order details unfulfilled 1`] = ` Product + + SKU + + + 5-1337 + From 539f72150d4ef8179fa2540b0e88d3717be5c08a Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 25 May 2020 12:06:37 +0200 Subject: [PATCH 009/294] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56c31ece8..0eea309f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +- Add sku column to fulfillment cards - #538 by @dominik-zeglen + ## 2.10.0 - Fix minor bugs - #244 by @dominik-zeglen From 93c89f2a4cb7f2fe7877569e3a1c5f3d532742bd Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 25 May 2020 12:07:45 +0200 Subject: [PATCH 010/294] Update messages --- locale/defaultMessages.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index b94bb5e2f..2d255cd00 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -2532,6 +2532,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2813,6 +2817,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" From 47bd37e6ad0351c4697c4789b2ab29ea12ad5751 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 24 Oct 2019 16:05:53 +0200 Subject: [PATCH 011/294] Add default credentials --- src/auth/components/LoginPage/LoginPage.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index 4ef242773..4faa17853 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -54,7 +54,13 @@ const LoginCard: React.FC = props => { const intl = useIntl(); return ( -
+ {({ change: handleChange, data, submit: handleSubmit }) => ( <> {error && ( From b673c12eeabaec34102c8fdea9647b2f2151ecfd Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Fri, 25 Oct 2019 14:35:48 +0200 Subject: [PATCH 012/294] Let user know that he's in demo --- src/auth/AuthProvider.tsx | 65 +++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/src/auth/AuthProvider.tsx b/src/auth/AuthProvider.tsx index 060da3ab4..8cbe0b6df 100644 --- a/src/auth/AuthProvider.tsx +++ b/src/auth/AuthProvider.tsx @@ -1,10 +1,13 @@ import { maybe } from "@saleor/misc"; +import React from "react"; +import { useIntl } from "react-intl"; + +import useNotifier from "@saleor/hooks/useNotifier"; import { isSupported as isCredentialsManagementAPISupported, login as loginWithCredentialsManagementAPI, saveCredentials } from "@saleor/utils/credentialsManagement"; -import React from "react"; import { MutationFunction, MutationResult } from "react-apollo"; import { UserContext } from "./"; @@ -30,27 +33,41 @@ interface AuthProviderOperationsProps { } const AuthProviderOperations: React.FC = ({ children -}) => ( - - {(...tokenAuth) => ( - - {(...tokenVerify) => ( - - {(...tokenRefresh) => ( - - {children} - - )} - - )} - - )} - -); +}) => { + const intl = useIntl(); + const notify = useNotifier(); + + const handleLogin = () => + notify({ + text: intl.formatMessage({ + defaultMessage: + "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }) + }); + + return ( + + {(...tokenAuth) => ( + + {(...tokenVerify) => ( + + {(...tokenRefresh) => ( + + {children} + + )} + + )} + + )} + + ); +}; interface AuthProviderProps { children: (props: { @@ -72,6 +89,7 @@ interface AuthProviderProps { MutationFunction, MutationResult ]; + onLogin: () => void; } interface AuthProviderState { @@ -130,11 +148,12 @@ class AuthProvider extends React.Component< } login = async (email: string, password: string) => { - const { tokenAuth } = this.props; + const { tokenAuth, onLogin } = this.props; const [tokenAuthFn] = tokenAuth; tokenAuthFn({ variables: { email, password } }).then(result => { if (result && !result.data.tokenCreate.errors.length) { + onLogin(); saveCredentials(result.data.tokenCreate.user, password); } }); From 53b6c5ca5c244540f25a33308aa7b858e7cb3d6d Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Tue, 26 May 2020 01:36:56 +0200 Subject: [PATCH 013/294] Add GTM --- package-lock.json | 5 +++++ package.json | 1 + src/index.tsx | 11 ++++++++--- webpack.config.js | 14 ++++++++------ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index dcdde831a..421499f39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17951,6 +17951,11 @@ "react-clientside-effect": "^1.2.0" } }, + "react-gtm-module": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/react-gtm-module/-/react-gtm-module-2.0.8.tgz", + "integrity": "sha512-OU5FwAHC3gWnnxJ+MLwBMLZO1Pmn1DiVCGHqptwDnNojE3QRrNxjqozkW5cNS4Zp+C6HZ8a4ZIt0QPNlpzua4Q==" + }, "react-helmet": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.1.tgz", diff --git a/package.json b/package.json index 784d95fd5..780ac8970 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "react-dom": "^16.9.0", "react-dropzone": "^8.2.0", "react-error-boundary": "^1.2.5", + "react-gtm-module": "^2.0.8", "react-helmet": "^5.2.1", "react-infinite-scroller": "^1.2.4", "react-inlinesvg": "^0.8.4", diff --git a/src/index.tsx b/src/index.tsx index d38f2e5ad..0b99b5ff7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,3 @@ -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"; @@ -14,6 +12,9 @@ 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 TagManager from "react-gtm-module"; import AttributeSection from "./attributes"; import { attributeSection } from "./attributes/urls"; import Auth, { getAuthToken, removeAuthToken } from "./auth"; @@ -31,7 +32,7 @@ import { MessageManager } from "./components/messages"; import { ShopProvider } from "./components/Shop"; import ThemeProvider from "./components/Theme"; import { WindowTitle } from "./components/WindowTitle"; -import { API_URI, APP_MOUNT_URI } from "./config"; +import { API_URI, APP_MOUNT_URI, GTM_ID } from "./config"; import ConfigurationSection, { createConfigurationMenu } from "./configuration"; import AppStateProvider from "./containers/AppState"; import { CustomerSection } from "./customers"; @@ -66,6 +67,10 @@ interface ResponseError extends ErrorResponse { }; } +if (process.env.GTM_ID !== undefined) { + TagManager.initialize({ gtmId: GTM_ID }); +} + const invalidTokenLink = onError((error: ResponseError) => { if ( (error.networkError && error.networkError.statusCode === 401) || diff --git a/webpack.config.js b/webpack.config.js index ad8a00efb..db1920d20 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,10 +22,12 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({ hash: true, template: "./src/index.html" }); -const environmentPlugin = new webpack.EnvironmentPlugin([ - "APP_MOUNT_URI", - "API_URI" -]); +const environmentPlugin = new webpack.EnvironmentPlugin({ + API_URI: "", + APP_MOUNT_URI: "/", + DEMO_MODE: false, + GTM_ID: "" +}); const dashboardBuildPath = "build/dashboard/"; @@ -35,8 +37,8 @@ module.exports = (env, argv) => { let fileLoaderPath; let output; - if(!process.env.API_URI) { - throw new Error("Environment variable API_URI not set") + if (!process.env.API_URI) { + throw new Error("Environment variable API_URI not set"); } if (!devMode) { From 375762a1440f747f05912c4cf738b8b6375f7d33 Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Tue, 26 May 2020 01:38:52 +0200 Subject: [PATCH 014/294] Conditional demo mode --- locale/defaultMessages.json | 4 +++ src/auth/AuthProvider.tsx | 33 ++++++++++++--------- src/auth/components/LoginPage/LoginPage.tsx | 17 ++++++----- src/auth/utils.ts | 13 ++++++++ src/config.ts | 4 ++- src/index.tsx | 6 ++-- src/intl.ts | 5 ++++ 7 files changed, 57 insertions(+), 25 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 2d255cd00..988d08276 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Description" }, diff --git a/src/auth/AuthProvider.tsx b/src/auth/AuthProvider.tsx index 8cbe0b6df..e5e470b0d 100644 --- a/src/auth/AuthProvider.tsx +++ b/src/auth/AuthProvider.tsx @@ -1,14 +1,14 @@ -import { maybe } from "@saleor/misc"; -import React from "react"; -import { useIntl } from "react-intl"; - +import { DEMO_MODE } from "@saleor/config"; import useNotifier from "@saleor/hooks/useNotifier"; +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 { useIntl } from "react-intl"; import { UserContext } from "./"; import { @@ -20,7 +20,12 @@ 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 { + displayDemoMessage, + getAuthToken, + removeAuthToken, + setAuthToken +} from "./utils"; interface AuthProviderOperationsProps { children: (props: { @@ -37,13 +42,11 @@ const AuthProviderOperations: React.FC = ({ const intl = useIntl(); const notify = useNotifier(); - const handleLogin = () => - notify({ - text: intl.formatMessage({ - defaultMessage: - "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." - }) - }); + const handleLogin = () => { + if (DEMO_MODE) { + displayDemoMessage(intl, notify); + } + }; return ( @@ -89,7 +92,7 @@ interface AuthProviderProps { MutationFunction, MutationResult ]; - onLogin: () => void; + onLogin?: () => void; } interface AuthProviderState { @@ -153,7 +156,9 @@ class AuthProvider extends React.Component< tokenAuthFn({ variables: { email, password } }).then(result => { if (result && !result.data.tokenCreate.errors.length) { - onLogin(); + if (!!onLogin) { + onLogin(); + } saveCredentials(result.data.tokenCreate.user, password); } }); diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index 4faa17853..60f1d9d19 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -4,6 +4,7 @@ import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import Form from "@saleor/components/Form"; import { FormSpacer } from "@saleor/components/FormSpacer"; +import { DEMO_MODE } from "@saleor/config"; import { commonMessages } from "@saleor/intl"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -53,14 +54,16 @@ const LoginCard: React.FC = props => { const classes = useStyles(props); const intl = useIntl(); + let initialFormData = { email: "", password: "" }; + if (DEMO_MODE) { + initialFormData = { + email: "admin@example.com", + password: "admin" + }; + } + return ( - + {({ change: handleChange, data, submit: handleSubmit }) => ( <> {error && ( diff --git a/src/auth/utils.ts b/src/auth/utils.ts index f2ed57e85..72ebf3a45 100644 --- a/src/auth/utils.ts +++ b/src/auth/utils.ts @@ -1,3 +1,7 @@ +import { UseNotifierResult } from "@saleor/hooks/useNotifier"; +import { commonMessages } from "@saleor/intl"; +import { IntlShape } from "react-intl"; + const TOKEN_STORAGE_KEY = "dashboardAuth"; export const getAuthToken = () => @@ -13,3 +17,12 @@ export const removeAuthToken = () => { localStorage.removeItem(TOKEN_STORAGE_KEY); sessionStorage.removeItem(TOKEN_STORAGE_KEY); }; + +export const displayDemoMessage = ( + intl: IntlShape, + notify: UseNotifierResult +) => { + notify({ + text: intl.formatMessage(commonMessages.demo) + }); +}; diff --git a/src/config.ts b/src/config.ts index 90b81e7c8..6dee3beb2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -2,7 +2,7 @@ import packageInfo from "../package.json"; import { SearchVariables } from "./hooks/makeSearch"; import { ListSettings, ListViews, Pagination } from "./types"; -export const APP_MOUNT_URI = process.env.APP_MOUNT_URI || "/"; +export const APP_MOUNT_URI = process.env.APP_MOUNT_URI; export const API_URI = process.env.API_URI; export const DEFAULT_INITIAL_SEARCH_DATA: SearchVariables = { @@ -90,3 +90,5 @@ export const defaultListSettings: AppListViewSettings = { }; export const APP_VERSION = packageInfo.version; +export const DEMO_MODE = process.env.DEMO_MODE === "true"; +export const GTM_ID = process.env.GTM_ID; diff --git a/src/index.tsx b/src/index.tsx index 0b99b5ff7..45625ac19 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"; @@ -9,12 +11,10 @@ import React from "react"; import { ApolloProvider } from "react-apollo"; import { render } from "react-dom"; import ErrorBoundary from "react-error-boundary"; +import TagManager from "react-gtm-module"; 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 TagManager from "react-gtm-module"; import AttributeSection from "./attributes"; import { attributeSection } from "./attributes/urls"; import Auth, { getAuthToken, removeAuthToken } from "./auth"; diff --git a/src/intl.ts b/src/intl.ts index 479b630dc..43c150b65 100644 --- a/src/intl.ts +++ b/src/intl.ts @@ -10,6 +10,11 @@ export const commonMessages = defineMessages({ dashboard: { defaultMessage: "Dashboard" }, + demo: { + defaultMessage: + "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes.", + description: "notification message after log in" + }, description: { defaultMessage: "Description" }, From 94c1bee44ccc1061af518266a0c902a70b90156a Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Mon, 8 Jun 2020 13:50:47 +0200 Subject: [PATCH 015/294] Add gh actions --- .circleci/config.yml | 6 ---- .github/workflows/test.yml | 71 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index d600bff95..7cd104157 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,12 +22,6 @@ jobs: - 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..118feae95 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,71 @@ +name: QA + +on: + pull_request: + branches: ["*"] + +jobs: + check-lock: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Validate lock file + run: | + npx lockfile-lint --path package-lock.json --allowed-hosts npm yarn + + tsc-and-linters: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-qa-${{ env.cache-name }}- + ${{ runner.os }}-qa- + ${{ runner.os }}- + + - name: Install deps + run: | + npm ci + + - name: Run tsc + run: | + npm run tsc + + - name: Run lint + run: | + npm run lint + + jest-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-qa-${{ env.cache-name }}- + ${{ runner.os }}-qa- + ${{ runner.os }}- + + - name: Install deps + run: | + npm ci + + - name: Run jest + run: | + npm run test From 0b099e882c2d4a869cc1a61095aa7615ffa6602f Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Mon, 8 Jun 2020 13:47:53 +0200 Subject: [PATCH 016/294] Remove base price from product create page --- .../ProductCreatePage/ProductCreatePage.tsx | 13 --- .../ProductPricing/ProductPricing.tsx | 86 ------------------- .../components/ProductPricing/index.ts | 2 - .../ProductUpdatePage/ProductUpdatePage.tsx | 10 --- src/products/mutations.ts | 4 - src/products/types/ProductCreate.ts | 1 - src/products/types/SimpleProductUpdate.ts | 1 - src/products/views/ProductCreate.tsx | 6 +- .../stories/products/ProductCreatePage.tsx | 3 - .../stories/products/ProductUpdatePage.tsx | 1 - 10 files changed, 1 insertion(+), 126 deletions(-) delete mode 100644 src/products/components/ProductPricing/ProductPricing.tsx delete mode 100644 src/products/components/ProductPricing/index.ts diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 897a41e40..f07e91605 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -41,11 +41,9 @@ import ProductAttributes, { } from "../ProductAttributes"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductOrganization from "../ProductOrganization"; -import ProductPricing from "../ProductPricing"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; interface FormData { - basePrice: number; publicationDate: string; category: string; collections: string[]; @@ -69,7 +67,6 @@ interface ProductCreatePageProps { errors: ProductErrorFragment[]; collections: SearchCollections_search_edges_node[]; categories: SearchCategories_search_edges_node[]; - currency: string; disabled: boolean; fetchMoreCategories: FetchMoreProps; fetchMoreCollections: FetchMoreProps; @@ -91,7 +88,6 @@ interface ProductCreatePageProps { } export const ProductCreatePage: React.FC = ({ - currency, disabled, categories: categoryChoiceList, collections: collectionChoiceList, @@ -130,7 +126,6 @@ export const ProductCreatePage: React.FC = ({ convertToRaw(ContentState.createFromText("")) ); const initialData: FormData = { - basePrice: 0, category: "", chargeTaxes: false, collections: [], @@ -232,14 +227,6 @@ export const ProductCreatePage: React.FC = ({ /> )} - - {!!productType && !productType.hasVariants && ( <> ({ - root: { - display: "grid", - gridColumnGap: theme.spacing(2), - gridTemplateColumns: "1fr 1fr" - } - }), - { name: "ProductPricing" } -); - -interface ProductPricingProps { - currency?: string; - data: { - chargeTaxes: boolean; - basePrice: number; - }; - disabled: boolean; - errors: ProductErrorFragment[]; - onChange: (event: React.ChangeEvent) => void; -} - -const ProductPricing: React.FC = props => { - const { currency, data, disabled, errors, onChange } = props; - - const classes = useStyles(props); - const intl = useIntl(); - - const formErrors = getFormErrors(["basePrice"], errors); - - return ( - - - - - -
- -
-
-
- ); -}; -ProductPricing.displayName = "ProductPricing"; -export default ProductPricing; diff --git a/src/products/components/ProductPricing/index.ts b/src/products/components/ProductPricing/index.ts deleted file mode 100644 index 4a41ac8e5..000000000 --- a/src/products/components/ProductPricing/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from "./ProductPricing"; -export * from "./ProductPricing"; diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index fb8b8d7ca..a97951bb6 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -47,7 +47,6 @@ import ProductAttributes, { ProductAttributeInput } from "../ProductAttributes"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductImages from "../ProductImages"; import ProductOrganization from "../ProductOrganization"; -import ProductPricing from "../ProductPricing"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; import ProductVariants from "../ProductVariants"; @@ -159,7 +158,6 @@ export const ProductUpdatePage: React.FC = ({ const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); - const currency = maybe(() => product.basePrice.currency); const hasVariants = maybe(() => product.productType.hasVariants, false); const handleSubmit = (data: ProductUpdatePageFormData) => { @@ -246,14 +244,6 @@ export const ProductUpdatePage: React.FC = ({ /> )} - - {hasVariants ? ( { const navigate = useNavigator(); const notify = useNotifier(); - const shop = useShop(); const intl = useIntl(); const { loadMore: loadMoreCategories, @@ -74,7 +72,6 @@ export const ProductCreateView: React.FC = () => { id: attribute.id, values: attribute.value })), - basePrice: decimal(formData.basePrice), category: formData.category, chargeTaxes: formData.chargeTaxes, collections: formData.collections, @@ -109,7 +106,6 @@ export const ProductCreateView: React.FC = () => { })} /> shop.defaultCurrency)} categories={maybe( () => searchCategoryOpts.data.search.edges, [] diff --git a/src/storybook/stories/products/ProductCreatePage.tsx b/src/storybook/stories/products/ProductCreatePage.tsx index 9aaa25526..e387cb31e 100644 --- a/src/storybook/stories/products/ProductCreatePage.tsx +++ b/src/storybook/stories/products/ProductCreatePage.tsx @@ -17,7 +17,6 @@ storiesOf("Views / Products / Create product", module) .addDecorator(Decorator) .add("default", () => ( ( ( Date: Mon, 8 Jun 2020 14:27:56 +0200 Subject: [PATCH 017/294] Add action for translation messages --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 118feae95..ef20f7ab8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,3 +69,30 @@ jobs: - name: Run jest run: | npm run test + + translation-messages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-qa-${{ env.cache-name }}- + ${{ runner.os }}-qa- + ${{ runner.os }}- + + - name: Install deps + run: | + npm ci + + - name: Check message extraction + run: | + npm run extract-messages + git diff ./locale From 0205ac1609706733d9a99eee181c63ded9775f26 Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Mon, 8 Jun 2020 15:58:15 +0200 Subject: [PATCH 018/294] Update actions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef20f7ab8..fac65e198 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: - name: Run tsc run: | - npm run tsc + npm run check-types - name: Run lint run: | @@ -95,4 +95,4 @@ jobs: - name: Check message extraction run: | npm run extract-messages - git diff ./locale + git diff --exit-code ./locale From 598e1af563023d8c9d134757a7b9b9f45b5c86eb Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Mon, 8 Jun 2020 17:00:39 +0200 Subject: [PATCH 019/294] Bump node version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cd104157..0e1d28804 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build-lint-benchmark: docker: - - image: circleci/node:10.7.0-browsers + - image: circleci/node:14.4.0-browsers steps: - checkout - restore_cache: From 65e5539173d9419800589450d33c32510cdde905 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 10 Jun 2020 15:39:10 +0200 Subject: [PATCH 020/294] Remove basePrice from schema --- schema.graphql | 54 ++++++++++++------- src/categories/queries.ts | 4 -- src/categories/types/CategoryDetails.ts | 7 --- src/components/Shop/types/ShopInfo.ts | 2 +- src/customers/types/CustomerCreateData.ts | 2 +- src/orders/types/OrderDetails.ts | 2 +- src/products/mutations.ts | 4 +- src/products/queries.ts | 13 +---- .../types/CreateMultipleVariantsData.ts | 7 --- src/products/types/Product.ts | 11 +--- src/products/types/ProductCreate.ts | 11 +--- src/products/types/ProductDetails.ts | 11 +--- src/products/types/ProductFragment.ts | 7 --- src/products/types/ProductImageCreate.ts | 11 +--- src/products/types/ProductImageUpdate.ts | 11 +--- src/products/types/ProductList.ts | 7 --- src/products/types/ProductUpdate.ts | 11 +--- src/products/types/ProductVariant.ts | 4 +- src/products/types/ProductVariantDetails.ts | 4 +- src/products/types/SimpleProductUpdate.ts | 27 ++++------ src/products/types/VariantCreate.ts | 4 +- src/products/types/VariantImageAssign.ts | 4 +- src/products/types/VariantImageUnassign.ts | 4 +- src/products/types/VariantUpdate.ts | 10 ++-- src/siteSettings/types/AuthorizationKeyAdd.ts | 2 +- .../types/AuthorizationKeyDelete.ts | 2 +- src/siteSettings/types/ShopFragment.ts | 2 +- src/siteSettings/types/ShopSettingsUpdate.ts | 2 +- src/siteSettings/types/SiteSettings.ts | 2 +- src/taxes/types/CountryList.ts | 2 +- src/taxes/types/FetchTaxes.ts | 2 +- src/types/globalTypes.ts | 12 +++-- 32 files changed, 94 insertions(+), 164 deletions(-) diff --git a/schema.graphql b/schema.graphql index 98993d3bb..05f5358fe 100644 --- a/schema.graphql +++ b/schema.graphql @@ -290,6 +290,12 @@ input AppTokenInput { app: ID! } +type AppTokenVerify { + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + valid: Boolean! + appErrors: [AppError!]! +} + type AppUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") appErrors: [AppError!]! @@ -502,7 +508,7 @@ type AttributeValue implements Node { id: ID! name: String slug: String - type: AttributeValueType + type: AttributeValueType @deprecated(reason: "Use the `inputType` field to determine the type of attribute's value. This field will be removed after 2020-07-31.") translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation inputType: AttributeInputTypeEnum } @@ -757,7 +763,6 @@ type Checkout implements Node & ObjectWithMetadata { created: DateTime! lastChange: DateTime! user: User - token: UUID! quantity: Int! billingAddress: Address shippingAddress: Address @@ -774,12 +779,13 @@ type Checkout implements Node & ObjectWithMetadata { privateMeta: [MetaStore]! @deprecated(reason: "Use the `privetaMetadata` field. This field will be removed after 2020-07-31.") meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") availableShippingMethods: [ShippingMethod]! - availablePaymentGateways: [PaymentGateway]! + availablePaymentGateways: [PaymentGateway!]! email: String! isShippingRequired: Boolean! lines: [CheckoutLine] shippingPrice: TaxedMoney subtotalPrice: TaxedMoney + token: UUID! totalPrice: TaxedMoney } @@ -867,6 +873,7 @@ enum CheckoutErrorCode { BILLING_ADDRESS_NOT_SET CHECKOUT_NOT_FULLY_PAID GRAPHQL_ERROR + PRODUCT_NOT_PUBLISHED INSUFFICIENT_STOCK INVALID INVALID_SHIPPING_METHOD @@ -1609,12 +1616,12 @@ input DigitalContentUploadInput { } type DigitalContentUrl implements Node { - token: UUID! content: DigitalContent! created: DateTime! downloadNum: Int! id: ID! url: String + token: UUID! } type DigitalContentUrlCreate { @@ -1955,6 +1962,7 @@ enum LanguageCodeEnum { ES_CO ET FA + FI FR HI HU @@ -1974,10 +1982,12 @@ enum LanguageCodeEnum { RO RU SK + SL SQ SR - SW SV + SW + TA TH TR UK @@ -2465,6 +2475,7 @@ type Mutation { appDelete(id: ID!): AppDelete appTokenCreate(input: AppTokenInput!): AppTokenCreate appTokenDelete(id: ID!): AppTokenDelete + appTokenVerify(token: String!): AppTokenVerify requestPasswordReset(email: String!, redirectUrl: String!): RequestPasswordReset confirmAccount(email: String!, token: String!): ConfirmAccount setPassword(token: String!, email: String!, password: String!): SetPassword @@ -2669,6 +2680,7 @@ enum OrderErrorCode { FULFILL_ORDER_LINE GRAPHQL_ERROR INVALID + PRODUCT_NOT_PUBLISHED NOT_FOUND ORDER_NO_SHIPPING_ADDRESS PAYMENT_ERROR @@ -3094,6 +3106,9 @@ enum PaymentErrorCode { INVALID NOT_FOUND PARTIAL_PAYMENT_NOT_ALLOWED + SHIPPING_ADDRESS_NOT_SET + INVALID_SHIPPING_METHOD + SHIPPING_METHOD_NOT_SET PAYMENT_ERROR REQUIRED UNIQUE @@ -3101,6 +3116,7 @@ enum PaymentErrorCode { type PaymentGateway { name: String! + id: ID! config: [GatewayConfigLine!]! } @@ -3310,7 +3326,6 @@ type Product implements Node & ObjectWithMetadata { thumbnail(size: Int): Image pricing: ProductPricingInfo isAvailable: Boolean - basePrice: Money minimalVariantPrice: Money taxType: TaxType attributes: [SelectedAttribute!]! @@ -3382,12 +3397,12 @@ input ProductCreateInput { isPublished: Boolean name: String slug: String - basePrice: Decimal taxCode: String seo: SeoInput weight: WeightScalar sku: String trackInventory: Boolean + basePrice: Decimal productType: ID! stocks: [StockInput!] } @@ -3424,12 +3439,12 @@ input ProductFilterInput { collections: [ID] categories: [ID] hasCategory: Boolean - price: PriceRangeInput attributes: [AttributeInput] stockAvailability: StockAvailability productType: ID stocks: ProductStockFilterInput search: String + price: PriceRangeInput minimalPrice: PriceRangeInput productTypes: [ID] } @@ -3496,12 +3511,12 @@ input ProductInput { isPublished: Boolean name: String slug: String - basePrice: Decimal taxCode: String seo: SeoInput weight: WeightScalar sku: String trackInventory: Boolean + basePrice: Decimal } input ProductOrder { @@ -3716,8 +3731,8 @@ type ProductVariant implements Node & ObjectWithMetadata { meta: [MetaStore]! @deprecated(reason: "Use the `metadata` field. This field will be removed after 2020-07-31.") quantity: Int! @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") quantityAllocated: Int @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") - stockQuantity: Int! @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") - priceOverride: Money + stockQuantity: Int! @deprecated(reason: "Use the quantityAvailable field instead. This field will be removed after 2020-07-31.") + price: Money pricing: VariantPricingInfo isAvailable: Boolean @deprecated(reason: "Use the stock field instead. This field will be removed after 2020-07-31.") attributes: [SelectedAttribute!]! @@ -3729,6 +3744,7 @@ type ProductVariant implements Node & ObjectWithMetadata { translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation digitalContent: DigitalContent stocks(countryCode: CountryCode): [Stock] + quantityAvailable(countryCode: CountryCode): Int! } type ProductVariantBulkCreate { @@ -3741,7 +3757,7 @@ type ProductVariantBulkCreate { input ProductVariantBulkCreateInput { attributes: [AttributeValueInput]! costPrice: Decimal - priceOverride: Decimal + price: Decimal sku: String! trackInventory: Boolean weight: WeightScalar @@ -3786,7 +3802,7 @@ type ProductVariantCreate { input ProductVariantCreateInput { attributes: [AttributeValueInput]! costPrice: Decimal - priceOverride: Decimal + price: Decimal sku: String trackInventory: Boolean weight: WeightScalar @@ -3803,7 +3819,7 @@ type ProductVariantDelete { input ProductVariantInput { attributes: [AttributeValueInput] costPrice: Decimal - priceOverride: Decimal + price: Decimal sku: String trackInventory: Boolean weight: WeightScalar @@ -3883,10 +3899,10 @@ type Query { attributes(filter: AttributeFilterInput, sortBy: AttributeSortingInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection attribute(id: ID!): Attribute categories(filter: CategoryFilterInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnection - category(id: ID!): Category - collection(id: ID!): Collection + category(id: ID, slug: String): Category + collection(id: ID, slug: String): Collection collections(filter: CollectionFilterInput, sortBy: CollectionSortingInput, before: String, after: String, first: Int, last: Int): CollectionCountableConnection - product(id: ID!): Product + product(id: ID, slug: String): Product products(filter: ProductFilterInput, sortBy: ProductOrder, stockAvailability: StockAvailability, before: String, after: String, first: Int, last: Int): ProductCountableConnection productType(id: ID!): ProductType productTypes(filter: ProductTypeFilterInput, sortBy: ProductTypeSortingInput, before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection @@ -4352,9 +4368,10 @@ input ShippingZoneUpdateInput { } type Shop { + availablePaymentGateways: [PaymentGateway!]! geolocalization: Geolocalization authorizationKeys: [AuthorizationKey]! - countries(languageCode: LanguageCodeEnum): [CountryDisplay]! + countries(languageCode: LanguageCodeEnum): [CountryDisplay!]! currencies: [String]! defaultCurrency: String! defaultCountry: CountryDisplay @@ -4561,7 +4578,6 @@ type Stock implements Node { productVariant: ProductVariant! quantity: Int! id: ID! - stockQuantity: Int! quantityAllocated: Int! } diff --git a/src/categories/queries.ts b/src/categories/queries.ts index 0cb1a7361..76b0efe6a 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -104,10 +104,6 @@ export const categoryDetails = gql` node { id name - basePrice { - amount - currency - } isAvailable thumbnail { url diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index bcdf4f7ce..21a0b0a5d 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -62,12 +62,6 @@ export interface CategoryDetails_category_products_pageInfo { startCursor: string | null; } -export interface CategoryDetails_category_products_edges_node_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CategoryDetails_category_products_edges_node_thumbnail { __typename: "Image"; url: string; @@ -83,7 +77,6 @@ export interface CategoryDetails_category_products_edges_node { __typename: "Product"; id: string; name: string; - basePrice: CategoryDetails_category_products_edges_node_basePrice | null; isAvailable: boolean | null; thumbnail: CategoryDetails_category_products_edges_node_thumbnail | null; productType: CategoryDetails_category_products_edges_node_productType; diff --git a/src/components/Shop/types/ShopInfo.ts b/src/components/Shop/types/ShopInfo.ts index f0f99ecfc..685af9f96 100644 --- a/src/components/Shop/types/ShopInfo.ts +++ b/src/components/Shop/types/ShopInfo.ts @@ -40,7 +40,7 @@ export interface ShopInfo_shop_permissions { export interface ShopInfo_shop { __typename: "Shop"; - countries: (ShopInfo_shop_countries | null)[]; + countries: ShopInfo_shop_countries[]; defaultCountry: ShopInfo_shop_defaultCountry | null; defaultCurrency: string; defaultWeightUnit: WeightUnitsEnum | null; diff --git a/src/customers/types/CustomerCreateData.ts b/src/customers/types/CustomerCreateData.ts index 7ca532d09..a6e641a56 100644 --- a/src/customers/types/CustomerCreateData.ts +++ b/src/customers/types/CustomerCreateData.ts @@ -14,7 +14,7 @@ export interface CustomerCreateData_shop_countries { export interface CustomerCreateData_shop { __typename: "Shop"; - countries: (CustomerCreateData_shop_countries | null)[]; + countries: CustomerCreateData_shop_countries[]; } export interface CustomerCreateData { diff --git a/src/orders/types/OrderDetails.ts b/src/orders/types/OrderDetails.ts index c752aab4c..944958c59 100644 --- a/src/orders/types/OrderDetails.ts +++ b/src/orders/types/OrderDetails.ts @@ -282,7 +282,7 @@ export interface OrderDetails_shop_countries { export interface OrderDetails_shop { __typename: "Shop"; - countries: (OrderDetails_shop_countries | null)[]; + countries: OrderDetails_shop_countries[]; defaultWeightUnit: WeightUnitsEnum | null; } diff --git a/src/products/mutations.ts b/src/products/mutations.ts index 36655db70..8fe0f6aec 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -351,7 +351,7 @@ export const variantUpdateMutation = gql` $id: ID! $attributes: [AttributeValueInput] $costPrice: Decimal - $priceOverride: Decimal + $price: Decimal $sku: String $trackInventory: Boolean! $stocks: [StockInput!]! @@ -361,7 +361,7 @@ export const variantUpdateMutation = gql` input: { attributes: $attributes costPrice: $costPrice - priceOverride: $priceOverride + price: $price sku: $sku trackInventory: $trackInventory } diff --git a/src/products/queries.ts b/src/products/queries.ts index 403bd232d..3cdf7ef4d 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -71,9 +71,6 @@ export const productFragment = gql` } isAvailable isPublished - basePrice { - ...Money - } productType { id name @@ -137,9 +134,6 @@ export const productFragmentDetails = gql` id name } - basePrice { - ...Money - } margin { start stop @@ -177,7 +171,7 @@ export const productFragmentDetails = gql` id sku name - priceOverride { + price { ...Money } margin @@ -226,7 +220,7 @@ export const fragmentVariant = gql` url } name - priceOverride { + price { ...Money } product { @@ -487,9 +481,6 @@ const createMultipleVariantsData = gql` query CreateMultipleVariantsData($id: ID!) { product(id: $id) { ...ProductVariantAttributesFragment - basePrice { - ...Money - } } warehouses(first: 20) { edges { diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts index 086d657b7..3f85fa10e 100644 --- a/src/products/types/CreateMultipleVariantsData.ts +++ b/src/products/types/CreateMultipleVariantsData.ts @@ -58,18 +58,11 @@ export interface CreateMultipleVariantsData_product_productType { variantAttributes: (CreateMultipleVariantsData_product_productType_variantAttributes | null)[] | null; } -export interface CreateMultipleVariantsData_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CreateMultipleVariantsData_product { __typename: "Product"; id: string; attributes: CreateMultipleVariantsData_product_attributes[]; productType: CreateMultipleVariantsData_product_productType; - basePrice: CreateMultipleVariantsData_product_basePrice | null; } export interface CreateMultipleVariantsData_warehouses_edges_node { diff --git a/src/products/types/Product.ts b/src/products/types/Product.ts index a1c8c7696..05a3a4233 100644 --- a/src/products/types/Product.ts +++ b/src/products/types/Product.ts @@ -72,12 +72,6 @@ export interface Product_collections { name: string; } -export interface Product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface Product_margin { __typename: "Margin"; start: number | null; @@ -143,7 +137,7 @@ export interface Product_images { url: string; } -export interface Product_variants_priceOverride { +export interface Product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -168,7 +162,7 @@ export interface Product_variants { id: string; sku: string; name: string; - priceOverride: Product_variants_priceOverride | null; + price: Product_variants_price | null; margin: number | null; stocks: (Product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -185,7 +179,6 @@ export interface Product { seoDescription: string | null; category: Product_category | null; collections: (Product_collections | null)[] | null; - basePrice: Product_basePrice | null; margin: Product_margin | null; purchaseCost: Product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index d624081d5..16f0a07ce 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -78,12 +78,6 @@ export interface ProductCreate_productCreate_product_collections { name: string; } -export interface ProductCreate_productCreate_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductCreate_productCreate_product_margin { __typename: "Margin"; start: number | null; @@ -149,7 +143,7 @@ export interface ProductCreate_productCreate_product_images { url: string; } -export interface ProductCreate_productCreate_product_variants_priceOverride { +export interface ProductCreate_productCreate_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -174,7 +168,7 @@ export interface ProductCreate_productCreate_product_variants { id: string; sku: string; name: string; - priceOverride: ProductCreate_productCreate_product_variants_priceOverride | null; + price: ProductCreate_productCreate_product_variants_price | null; margin: number | null; stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -191,7 +185,6 @@ export interface ProductCreate_productCreate_product { seoDescription: string | null; category: ProductCreate_productCreate_product_category | null; collections: (ProductCreate_productCreate_product_collections | null)[] | null; - basePrice: ProductCreate_productCreate_product_basePrice | null; margin: ProductCreate_productCreate_product_margin | null; purchaseCost: ProductCreate_productCreate_product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index 2c5913c5a..7c9b45b77 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -72,12 +72,6 @@ export interface ProductDetails_product_collections { name: string; } -export interface ProductDetails_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductDetails_product_margin { __typename: "Margin"; start: number | null; @@ -143,7 +137,7 @@ export interface ProductDetails_product_images { url: string; } -export interface ProductDetails_product_variants_priceOverride { +export interface ProductDetails_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -168,7 +162,7 @@ export interface ProductDetails_product_variants { id: string; sku: string; name: string; - priceOverride: ProductDetails_product_variants_priceOverride | null; + price: ProductDetails_product_variants_price | null; margin: number | null; stocks: (ProductDetails_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -185,7 +179,6 @@ export interface ProductDetails_product { seoDescription: string | null; category: ProductDetails_product_category | null; collections: (ProductDetails_product_collections | null)[] | null; - basePrice: ProductDetails_product_basePrice | null; margin: ProductDetails_product_margin | null; purchaseCost: ProductDetails_product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductFragment.ts b/src/products/types/ProductFragment.ts index 61306e93d..f5045a36d 100644 --- a/src/products/types/ProductFragment.ts +++ b/src/products/types/ProductFragment.ts @@ -11,12 +11,6 @@ export interface ProductFragment_thumbnail { url: string; } -export interface ProductFragment_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductFragment_productType { __typename: "ProductType"; id: string; @@ -30,6 +24,5 @@ export interface ProductFragment { thumbnail: ProductFragment_thumbnail | null; isAvailable: boolean | null; isPublished: boolean; - basePrice: ProductFragment_basePrice | null; productType: ProductFragment_productType; } diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index 49cd57bda..b4c67bef1 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -78,12 +78,6 @@ export interface ProductImageCreate_productImageCreate_product_collections { name: string; } -export interface ProductImageCreate_productImageCreate_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductImageCreate_productImageCreate_product_margin { __typename: "Margin"; start: number | null; @@ -149,7 +143,7 @@ export interface ProductImageCreate_productImageCreate_product_images { url: string; } -export interface ProductImageCreate_productImageCreate_product_variants_priceOverride { +export interface ProductImageCreate_productImageCreate_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -174,7 +168,7 @@ export interface ProductImageCreate_productImageCreate_product_variants { id: string; sku: string; name: string; - priceOverride: ProductImageCreate_productImageCreate_product_variants_priceOverride | null; + price: ProductImageCreate_productImageCreate_product_variants_price | null; margin: number | null; stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -191,7 +185,6 @@ export interface ProductImageCreate_productImageCreate_product { seoDescription: string | null; category: ProductImageCreate_productImageCreate_product_category | null; collections: (ProductImageCreate_productImageCreate_product_collections | null)[] | null; - basePrice: ProductImageCreate_productImageCreate_product_basePrice | null; margin: ProductImageCreate_productImageCreate_product_margin | null; purchaseCost: ProductImageCreate_productImageCreate_product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index abb5401cb..602cdeefa 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -78,12 +78,6 @@ export interface ProductImageUpdate_productImageUpdate_product_collections { name: string; } -export interface ProductImageUpdate_productImageUpdate_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductImageUpdate_productImageUpdate_product_margin { __typename: "Margin"; start: number | null; @@ -149,7 +143,7 @@ export interface ProductImageUpdate_productImageUpdate_product_images { url: string; } -export interface ProductImageUpdate_productImageUpdate_product_variants_priceOverride { +export interface ProductImageUpdate_productImageUpdate_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -174,7 +168,7 @@ export interface ProductImageUpdate_productImageUpdate_product_variants { id: string; sku: string; name: string; - priceOverride: ProductImageUpdate_productImageUpdate_product_variants_priceOverride | null; + price: ProductImageUpdate_productImageUpdate_product_variants_price | null; margin: number | null; stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -191,7 +185,6 @@ export interface ProductImageUpdate_productImageUpdate_product { seoDescription: string | null; category: ProductImageUpdate_productImageUpdate_product_category | null; collections: (ProductImageUpdate_productImageUpdate_product_collections | null)[] | null; - basePrice: ProductImageUpdate_productImageUpdate_product_basePrice | null; margin: ProductImageUpdate_productImageUpdate_product_margin | null; purchaseCost: ProductImageUpdate_productImageUpdate_product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts index 7931b98d2..4f0fb7058 100644 --- a/src/products/types/ProductList.ts +++ b/src/products/types/ProductList.ts @@ -13,12 +13,6 @@ export interface ProductList_products_edges_node_thumbnail { url: string; } -export interface ProductList_products_edges_node_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductList_products_edges_node_productType { __typename: "ProductType"; id: string; @@ -49,7 +43,6 @@ export interface ProductList_products_edges_node { thumbnail: ProductList_products_edges_node_thumbnail | null; isAvailable: boolean | null; isPublished: boolean; - basePrice: ProductList_products_edges_node_basePrice | null; productType: ProductList_products_edges_node_productType; attributes: ProductList_products_edges_node_attributes[]; } diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 9ea3e5fd8..b7c9c8b10 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -78,12 +78,6 @@ export interface ProductUpdate_productUpdate_product_collections { name: string; } -export interface ProductUpdate_productUpdate_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductUpdate_productUpdate_product_margin { __typename: "Margin"; start: number | null; @@ -149,7 +143,7 @@ export interface ProductUpdate_productUpdate_product_images { url: string; } -export interface ProductUpdate_productUpdate_product_variants_priceOverride { +export interface ProductUpdate_productUpdate_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -174,7 +168,7 @@ export interface ProductUpdate_productUpdate_product_variants { id: string; sku: string; name: string; - priceOverride: ProductUpdate_productUpdate_product_variants_priceOverride | null; + price: ProductUpdate_productUpdate_product_variants_price | null; margin: number | null; stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -191,7 +185,6 @@ export interface ProductUpdate_productUpdate_product { seoDescription: string | null; category: ProductUpdate_productUpdate_product_category | null; collections: (ProductUpdate_productUpdate_product_collections | null)[] | null; - basePrice: ProductUpdate_productUpdate_product_basePrice | null; margin: ProductUpdate_productUpdate_product_margin | null; purchaseCost: ProductUpdate_productUpdate_product_purchaseCost | null; isAvailable: boolean | null; diff --git a/src/products/types/ProductVariant.ts b/src/products/types/ProductVariant.ts index ec79ea8ed..4a6b1d939 100644 --- a/src/products/types/ProductVariant.ts +++ b/src/products/types/ProductVariant.ts @@ -47,7 +47,7 @@ export interface ProductVariant_images { url: string; } -export interface ProductVariant_priceOverride { +export interface ProductVariant_price { __typename: "Money"; amount: number; currency: string; @@ -110,7 +110,7 @@ export interface ProductVariant { costPrice: ProductVariant_costPrice | null; images: (ProductVariant_images | null)[] | null; name: string; - priceOverride: ProductVariant_priceOverride | null; + price: ProductVariant_price | null; product: ProductVariant_product; sku: string; stocks: (ProductVariant_stocks | null)[] | null; diff --git a/src/products/types/ProductVariantDetails.ts b/src/products/types/ProductVariantDetails.ts index 3e7de3718..6ab4b9e59 100644 --- a/src/products/types/ProductVariantDetails.ts +++ b/src/products/types/ProductVariantDetails.ts @@ -47,7 +47,7 @@ export interface ProductVariantDetails_productVariant_images { url: string; } -export interface ProductVariantDetails_productVariant_priceOverride { +export interface ProductVariantDetails_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -110,7 +110,7 @@ export interface ProductVariantDetails_productVariant { costPrice: ProductVariantDetails_productVariant_costPrice | null; images: (ProductVariantDetails_productVariant_images | null)[] | null; name: string; - priceOverride: ProductVariantDetails_productVariant_priceOverride | null; + price: ProductVariantDetails_productVariant_price | null; product: ProductVariantDetails_productVariant_product; sku: string; stocks: (ProductVariantDetails_productVariant_stocks | null)[] | null; diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index 860e6c6a5..e31c03f42 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -78,12 +78,6 @@ export interface SimpleProductUpdate_productUpdate_product_collections { name: string; } -export interface SimpleProductUpdate_productUpdate_product_basePrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface SimpleProductUpdate_productUpdate_product_margin { __typename: "Margin"; start: number | null; @@ -149,7 +143,7 @@ export interface SimpleProductUpdate_productUpdate_product_images { url: string; } -export interface SimpleProductUpdate_productUpdate_product_variants_priceOverride { +export interface SimpleProductUpdate_productUpdate_product_variants_price { __typename: "Money"; amount: number; currency: string; @@ -174,7 +168,7 @@ export interface SimpleProductUpdate_productUpdate_product_variants { id: string; sku: string; name: string; - priceOverride: SimpleProductUpdate_productUpdate_product_variants_priceOverride | null; + price: SimpleProductUpdate_productUpdate_product_variants_price | null; margin: number | null; stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; trackInventory: boolean; @@ -191,7 +185,6 @@ export interface SimpleProductUpdate_productUpdate_product { seoDescription: string | null; category: SimpleProductUpdate_productUpdate_product_category | null; collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null; - basePrice: SimpleProductUpdate_productUpdate_product_basePrice | null; margin: SimpleProductUpdate_productUpdate_product_margin | null; purchaseCost: SimpleProductUpdate_productUpdate_product_purchaseCost | null; isAvailable: boolean | null; @@ -256,7 +249,7 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_images url: string; } -export interface SimpleProductUpdate_productVariantUpdate_productVariant_priceOverride { +export interface SimpleProductUpdate_productVariantUpdate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -319,7 +312,7 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant { costPrice: SimpleProductUpdate_productVariantUpdate_productVariant_costPrice | null; images: (SimpleProductUpdate_productVariantUpdate_productVariant_images | null)[] | null; name: string; - priceOverride: SimpleProductUpdate_productVariantUpdate_productVariant_priceOverride | null; + price: SimpleProductUpdate_productVariantUpdate_productVariant_price | null; product: SimpleProductUpdate_productVariantUpdate_productVariant_product; sku: string; stocks: (SimpleProductUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; @@ -380,7 +373,7 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_i url: string; } -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_priceOverride { +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -443,7 +436,7 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant { costPrice: SimpleProductUpdate_productVariantStocksCreate_productVariant_costPrice | null; images: (SimpleProductUpdate_productVariantStocksCreate_productVariant_images | null)[] | null; name: string; - priceOverride: SimpleProductUpdate_productVariantStocksCreate_productVariant_priceOverride | null; + price: SimpleProductUpdate_productVariantStocksCreate_productVariant_price | null; product: SimpleProductUpdate_productVariantStocksCreate_productVariant_product; sku: string; stocks: (SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks | null)[] | null; @@ -503,7 +496,7 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_i url: string; } -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_priceOverride { +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -566,7 +559,7 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant { costPrice: SimpleProductUpdate_productVariantStocksDelete_productVariant_costPrice | null; images: (SimpleProductUpdate_productVariantStocksDelete_productVariant_images | null)[] | null; name: string; - priceOverride: SimpleProductUpdate_productVariantStocksDelete_productVariant_priceOverride | null; + price: SimpleProductUpdate_productVariantStocksDelete_productVariant_price | null; product: SimpleProductUpdate_productVariantStocksDelete_productVariant_product; sku: string; stocks: (SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks | null)[] | null; @@ -627,7 +620,7 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_i url: string; } -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_priceOverride { +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -690,7 +683,7 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant { costPrice: SimpleProductUpdate_productVariantStocksUpdate_productVariant_costPrice | null; images: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_images | null)[] | null; name: string; - priceOverride: SimpleProductUpdate_productVariantStocksUpdate_productVariant_priceOverride | null; + price: SimpleProductUpdate_productVariantStocksUpdate_productVariant_price | null; product: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product; sku: string; stocks: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; diff --git a/src/products/types/VariantCreate.ts b/src/products/types/VariantCreate.ts index 6d8e19e5c..1770067a7 100644 --- a/src/products/types/VariantCreate.ts +++ b/src/products/types/VariantCreate.ts @@ -55,7 +55,7 @@ export interface VariantCreate_productVariantCreate_productVariant_images { url: string; } -export interface VariantCreate_productVariantCreate_productVariant_priceOverride { +export interface VariantCreate_productVariantCreate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -118,7 +118,7 @@ export interface VariantCreate_productVariantCreate_productVariant { costPrice: VariantCreate_productVariantCreate_productVariant_costPrice | null; images: (VariantCreate_productVariantCreate_productVariant_images | null)[] | null; name: string; - priceOverride: VariantCreate_productVariantCreate_productVariant_priceOverride | null; + price: VariantCreate_productVariantCreate_productVariant_price | null; product: VariantCreate_productVariantCreate_productVariant_product; sku: string; stocks: (VariantCreate_productVariantCreate_productVariant_stocks | null)[] | null; diff --git a/src/products/types/VariantImageAssign.ts b/src/products/types/VariantImageAssign.ts index fad6f55d6..96e0d5f98 100644 --- a/src/products/types/VariantImageAssign.ts +++ b/src/products/types/VariantImageAssign.ts @@ -55,7 +55,7 @@ export interface VariantImageAssign_variantImageAssign_productVariant_images { url: string; } -export interface VariantImageAssign_variantImageAssign_productVariant_priceOverride { +export interface VariantImageAssign_variantImageAssign_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -118,7 +118,7 @@ export interface VariantImageAssign_variantImageAssign_productVariant { costPrice: VariantImageAssign_variantImageAssign_productVariant_costPrice | null; images: (VariantImageAssign_variantImageAssign_productVariant_images | null)[] | null; name: string; - priceOverride: VariantImageAssign_variantImageAssign_productVariant_priceOverride | null; + price: VariantImageAssign_variantImageAssign_productVariant_price | null; product: VariantImageAssign_variantImageAssign_productVariant_product; sku: string; stocks: (VariantImageAssign_variantImageAssign_productVariant_stocks | null)[] | null; diff --git a/src/products/types/VariantImageUnassign.ts b/src/products/types/VariantImageUnassign.ts index 51b14b8c0..f373d96d7 100644 --- a/src/products/types/VariantImageUnassign.ts +++ b/src/products/types/VariantImageUnassign.ts @@ -55,7 +55,7 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_images url: string; } -export interface VariantImageUnassign_variantImageUnassign_productVariant_priceOverride { +export interface VariantImageUnassign_variantImageUnassign_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -118,7 +118,7 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant { costPrice: VariantImageUnassign_variantImageUnassign_productVariant_costPrice | null; images: (VariantImageUnassign_variantImageUnassign_productVariant_images | null)[] | null; name: string; - priceOverride: VariantImageUnassign_variantImageUnassign_productVariant_priceOverride | null; + price: VariantImageUnassign_variantImageUnassign_productVariant_price | null; product: VariantImageUnassign_variantImageUnassign_productVariant_product; sku: string; stocks: (VariantImageUnassign_variantImageUnassign_productVariant_stocks | null)[] | null; diff --git a/src/products/types/VariantUpdate.ts b/src/products/types/VariantUpdate.ts index 4ed244606..69abc6cea 100644 --- a/src/products/types/VariantUpdate.ts +++ b/src/products/types/VariantUpdate.ts @@ -55,7 +55,7 @@ export interface VariantUpdate_productVariantUpdate_productVariant_images { url: string; } -export interface VariantUpdate_productVariantUpdate_productVariant_priceOverride { +export interface VariantUpdate_productVariantUpdate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -118,7 +118,7 @@ export interface VariantUpdate_productVariantUpdate_productVariant { costPrice: VariantUpdate_productVariantUpdate_productVariant_costPrice | null; images: (VariantUpdate_productVariantUpdate_productVariant_images | null)[] | null; name: string; - priceOverride: VariantUpdate_productVariantUpdate_productVariant_priceOverride | null; + price: VariantUpdate_productVariantUpdate_productVariant_price | null; product: VariantUpdate_productVariantUpdate_productVariant_product; sku: string; stocks: (VariantUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; @@ -179,7 +179,7 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_images url: string; } -export interface VariantUpdate_productVariantStocksUpdate_productVariant_priceOverride { +export interface VariantUpdate_productVariantStocksUpdate_productVariant_price { __typename: "Money"; amount: number; currency: string; @@ -242,7 +242,7 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant { costPrice: VariantUpdate_productVariantStocksUpdate_productVariant_costPrice | null; images: (VariantUpdate_productVariantStocksUpdate_productVariant_images | null)[] | null; name: string; - priceOverride: VariantUpdate_productVariantStocksUpdate_productVariant_priceOverride | null; + price: VariantUpdate_productVariantStocksUpdate_productVariant_price | null; product: VariantUpdate_productVariantStocksUpdate_productVariant_product; sku: string; stocks: (VariantUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; @@ -333,7 +333,7 @@ export interface VariantUpdateVariables { id: string; attributes?: (AttributeValueInput | null)[] | null; costPrice?: any | null; - priceOverride?: any | null; + price?: any | null; sku?: string | null; trackInventory: boolean; stocks: StockInput[]; diff --git a/src/siteSettings/types/AuthorizationKeyAdd.ts b/src/siteSettings/types/AuthorizationKeyAdd.ts index 258aabf71..33bf3f2d2 100644 --- a/src/siteSettings/types/AuthorizationKeyAdd.ts +++ b/src/siteSettings/types/AuthorizationKeyAdd.ts @@ -57,7 +57,7 @@ export interface AuthorizationKeyAdd_authorizationKeyAdd_shop { __typename: "Shop"; authorizationKeys: (AuthorizationKeyAdd_authorizationKeyAdd_shop_authorizationKeys | null)[]; companyAddress: AuthorizationKeyAdd_authorizationKeyAdd_shop_companyAddress | null; - countries: (AuthorizationKeyAdd_authorizationKeyAdd_shop_countries | null)[]; + countries: AuthorizationKeyAdd_authorizationKeyAdd_shop_countries[]; customerSetPasswordUrl: string | null; defaultMailSenderAddress: string | null; defaultMailSenderName: string | null; diff --git a/src/siteSettings/types/AuthorizationKeyDelete.ts b/src/siteSettings/types/AuthorizationKeyDelete.ts index ccf4f5ba8..ed491f0ea 100644 --- a/src/siteSettings/types/AuthorizationKeyDelete.ts +++ b/src/siteSettings/types/AuthorizationKeyDelete.ts @@ -57,7 +57,7 @@ export interface AuthorizationKeyDelete_authorizationKeyDelete_shop { __typename: "Shop"; authorizationKeys: (AuthorizationKeyDelete_authorizationKeyDelete_shop_authorizationKeys | null)[]; companyAddress: AuthorizationKeyDelete_authorizationKeyDelete_shop_companyAddress | null; - countries: (AuthorizationKeyDelete_authorizationKeyDelete_shop_countries | null)[]; + countries: AuthorizationKeyDelete_authorizationKeyDelete_shop_countries[]; customerSetPasswordUrl: string | null; defaultMailSenderAddress: string | null; defaultMailSenderName: string | null; diff --git a/src/siteSettings/types/ShopFragment.ts b/src/siteSettings/types/ShopFragment.ts index aaf4326c9..19e601c27 100644 --- a/src/siteSettings/types/ShopFragment.ts +++ b/src/siteSettings/types/ShopFragment.ts @@ -51,7 +51,7 @@ export interface ShopFragment { __typename: "Shop"; authorizationKeys: (ShopFragment_authorizationKeys | null)[]; companyAddress: ShopFragment_companyAddress | null; - countries: (ShopFragment_countries | null)[]; + countries: ShopFragment_countries[]; customerSetPasswordUrl: string | null; defaultMailSenderAddress: string | null; defaultMailSenderName: string | null; diff --git a/src/siteSettings/types/ShopSettingsUpdate.ts b/src/siteSettings/types/ShopSettingsUpdate.ts index acc2e1bf1..b604b98f5 100644 --- a/src/siteSettings/types/ShopSettingsUpdate.ts +++ b/src/siteSettings/types/ShopSettingsUpdate.ts @@ -57,7 +57,7 @@ export interface ShopSettingsUpdate_shopSettingsUpdate_shop { __typename: "Shop"; authorizationKeys: (ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys | null)[]; companyAddress: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress | null; - countries: (ShopSettingsUpdate_shopSettingsUpdate_shop_countries | null)[]; + countries: ShopSettingsUpdate_shopSettingsUpdate_shop_countries[]; customerSetPasswordUrl: string | null; defaultMailSenderAddress: string | null; defaultMailSenderName: string | null; diff --git a/src/siteSettings/types/SiteSettings.ts b/src/siteSettings/types/SiteSettings.ts index bc9abeea1..6b81087c2 100644 --- a/src/siteSettings/types/SiteSettings.ts +++ b/src/siteSettings/types/SiteSettings.ts @@ -51,7 +51,7 @@ export interface SiteSettings_shop { __typename: "Shop"; authorizationKeys: (SiteSettings_shop_authorizationKeys | null)[]; companyAddress: SiteSettings_shop_companyAddress | null; - countries: (SiteSettings_shop_countries | null)[]; + countries: SiteSettings_shop_countries[]; customerSetPasswordUrl: string | null; defaultMailSenderAddress: string | null; defaultMailSenderName: string | null; diff --git a/src/taxes/types/CountryList.ts b/src/taxes/types/CountryList.ts index 2d9e75eef..37f99b82f 100644 --- a/src/taxes/types/CountryList.ts +++ b/src/taxes/types/CountryList.ts @@ -32,7 +32,7 @@ export interface CountryList_shop { chargeTaxesOnShipping: boolean; includeTaxesInPrices: boolean; displayGrossPrices: boolean; - countries: (CountryList_shop_countries | null)[]; + countries: CountryList_shop_countries[]; } export interface CountryList { diff --git a/src/taxes/types/FetchTaxes.ts b/src/taxes/types/FetchTaxes.ts index 4a6269b8e..d2fc7e2c8 100644 --- a/src/taxes/types/FetchTaxes.ts +++ b/src/taxes/types/FetchTaxes.ts @@ -20,7 +20,7 @@ export interface FetchTaxes_shopFetchTaxRates_shop_countries { export interface FetchTaxes_shopFetchTaxRates_shop { __typename: "Shop"; - countries: (FetchTaxes_shopFetchTaxRates_shop_countries | null)[]; + countries: FetchTaxes_shopFetchTaxRates_shop_countries[]; } export interface FetchTaxes_shopFetchTaxRates { diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index 37cfba865..b1ea252b1 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -390,6 +390,7 @@ export enum LanguageCodeEnum { ES_CO = "ES_CO", ET = "ET", FA = "FA", + FI = "FI", FR = "FR", HI = "HI", HU = "HU", @@ -409,10 +410,12 @@ export enum LanguageCodeEnum { RO = "RO", RU = "RU", SK = "SK", + SL = "SL", SQ = "SQ", SR = "SR", SV = "SV", SW = "SW", + TA = "TA", TH = "TH", TR = "TR", UK = "UK", @@ -467,6 +470,7 @@ export enum OrderErrorCode { ORDER_NO_SHIPPING_ADDRESS = "ORDER_NO_SHIPPING_ADDRESS", PAYMENT_ERROR = "PAYMENT_ERROR", PAYMENT_MISSING = "PAYMENT_MISSING", + PRODUCT_NOT_PUBLISHED = "PRODUCT_NOT_PUBLISHED", REQUIRED = "REQUIRED", SHIPPING_METHOD_NOT_APPLICABLE = "SHIPPING_METHOD_NOT_APPLICABLE", SHIPPING_METHOD_REQUIRED = "SHIPPING_METHOD_REQUIRED", @@ -1180,12 +1184,12 @@ export interface ProductFilterInput { collections?: (string | null)[] | null; categories?: (string | null)[] | null; hasCategory?: boolean | null; - price?: PriceRangeInput | null; attributes?: (AttributeInput | null)[] | null; stockAvailability?: StockAvailability | null; productType?: string | null; stocks?: ProductStockFilterInput | null; search?: string | null; + price?: PriceRangeInput | null; minimalPrice?: PriceRangeInput | null; productTypes?: (string | null)[] | null; } @@ -1228,7 +1232,7 @@ export interface ProductTypeSortingInput { export interface ProductVariantBulkCreateInput { attributes: (AttributeValueInput | null)[]; costPrice?: any | null; - priceOverride?: any | null; + price?: any | null; sku: string; trackInventory?: boolean | null; weight?: any | null; @@ -1238,7 +1242,7 @@ export interface ProductVariantBulkCreateInput { export interface ProductVariantCreateInput { attributes: (AttributeValueInput | null)[]; costPrice?: any | null; - priceOverride?: any | null; + price?: any | null; sku?: string | null; trackInventory?: boolean | null; weight?: any | null; @@ -1249,7 +1253,7 @@ export interface ProductVariantCreateInput { export interface ProductVariantInput { attributes?: (AttributeValueInput | null)[] | null; costPrice?: any | null; - priceOverride?: any | null; + price?: any | null; sku?: string | null; trackInventory?: boolean | null; weight?: any | null; From 8fa7eb2b8accb45b0ba6766e9613d31c8972dcba Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Fri, 12 Jun 2020 12:17:17 +0200 Subject: [PATCH 021/294] Revert "Remove base price from product create page" This reverts commit 0b099e882c2d4a869cc1a61095aa7615ffa6602f. --- .../ProductCreatePage/ProductCreatePage.tsx | 13 +++ .../ProductPricing/ProductPricing.tsx | 86 +++++++++++++++++++ .../components/ProductPricing/index.ts | 2 + .../ProductUpdatePage/ProductUpdatePage.tsx | 10 +++ src/products/mutations.ts | 4 + src/products/types/ProductCreate.ts | 1 + src/products/types/SimpleProductUpdate.ts | 1 + src/products/views/ProductCreate.tsx | 6 +- .../stories/products/ProductCreatePage.tsx | 3 + .../stories/products/ProductUpdatePage.tsx | 1 + 10 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 src/products/components/ProductPricing/ProductPricing.tsx create mode 100644 src/products/components/ProductPricing/index.ts diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index f07e91605..897a41e40 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -41,9 +41,11 @@ import ProductAttributes, { } from "../ProductAttributes"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductOrganization from "../ProductOrganization"; +import ProductPricing from "../ProductPricing"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; interface FormData { + basePrice: number; publicationDate: string; category: string; collections: string[]; @@ -67,6 +69,7 @@ interface ProductCreatePageProps { errors: ProductErrorFragment[]; collections: SearchCollections_search_edges_node[]; categories: SearchCategories_search_edges_node[]; + currency: string; disabled: boolean; fetchMoreCategories: FetchMoreProps; fetchMoreCollections: FetchMoreProps; @@ -88,6 +91,7 @@ interface ProductCreatePageProps { } export const ProductCreatePage: React.FC = ({ + currency, disabled, categories: categoryChoiceList, collections: collectionChoiceList, @@ -126,6 +130,7 @@ export const ProductCreatePage: React.FC = ({ convertToRaw(ContentState.createFromText("")) ); const initialData: FormData = { + basePrice: 0, category: "", chargeTaxes: false, collections: [], @@ -227,6 +232,14 @@ export const ProductCreatePage: React.FC = ({ /> )} + + {!!productType && !productType.hasVariants && ( <> ({ + root: { + display: "grid", + gridColumnGap: theme.spacing(2), + gridTemplateColumns: "1fr 1fr" + } + }), + { name: "ProductPricing" } +); + +interface ProductPricingProps { + currency?: string; + data: { + chargeTaxes: boolean; + basePrice: number; + }; + disabled: boolean; + errors: ProductErrorFragment[]; + onChange: (event: React.ChangeEvent) => void; +} + +const ProductPricing: React.FC = props => { + const { currency, data, disabled, errors, onChange } = props; + + const classes = useStyles(props); + const intl = useIntl(); + + const formErrors = getFormErrors(["basePrice"], errors); + + return ( + + + + + +
+ +
+
+
+ ); +}; +ProductPricing.displayName = "ProductPricing"; +export default ProductPricing; diff --git a/src/products/components/ProductPricing/index.ts b/src/products/components/ProductPricing/index.ts new file mode 100644 index 000000000..4a41ac8e5 --- /dev/null +++ b/src/products/components/ProductPricing/index.ts @@ -0,0 +1,2 @@ +export { default } from "./ProductPricing"; +export * from "./ProductPricing"; diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index a97951bb6..fb8b8d7ca 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -47,6 +47,7 @@ import ProductAttributes, { ProductAttributeInput } from "../ProductAttributes"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductImages from "../ProductImages"; import ProductOrganization from "../ProductOrganization"; +import ProductPricing from "../ProductPricing"; import ProductStocks, { ProductStockInput } from "../ProductStocks"; import ProductVariants from "../ProductVariants"; @@ -158,6 +159,7 @@ export const ProductUpdatePage: React.FC = ({ const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); + const currency = maybe(() => product.basePrice.currency); const hasVariants = maybe(() => product.productType.hasVariants, false); const handleSubmit = (data: ProductUpdatePageFormData) => { @@ -244,6 +246,14 @@ export const ProductUpdatePage: React.FC = ({ /> )} + + {hasVariants ? ( { const navigate = useNavigator(); const notify = useNotifier(); + const shop = useShop(); const intl = useIntl(); const { loadMore: loadMoreCategories, @@ -72,6 +74,7 @@ export const ProductCreateView: React.FC = () => { id: attribute.id, values: attribute.value })), + basePrice: decimal(formData.basePrice), category: formData.category, chargeTaxes: formData.chargeTaxes, collections: formData.collections, @@ -106,6 +109,7 @@ export const ProductCreateView: React.FC = () => { })} /> shop.defaultCurrency)} categories={maybe( () => searchCategoryOpts.data.search.edges, [] diff --git a/src/storybook/stories/products/ProductCreatePage.tsx b/src/storybook/stories/products/ProductCreatePage.tsx index e387cb31e..9aaa25526 100644 --- a/src/storybook/stories/products/ProductCreatePage.tsx +++ b/src/storybook/stories/products/ProductCreatePage.tsx @@ -17,6 +17,7 @@ storiesOf("Views / Products / Create product", module) .addDecorator(Decorator) .add("default", () => ( ( ( Date: Fri, 12 Jun 2020 12:35:38 +0200 Subject: [PATCH 022/294] Removed Pricing card for configurable products --- .../ProductCreatePage/ProductCreatePage.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 897a41e40..19a017726 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -232,16 +232,16 @@ export const ProductCreatePage: React.FC = ({ /> )} - - {!!productType && !productType.hasVariants && ( <> + + Date: Fri, 12 Jun 2020 12:42:19 +0200 Subject: [PATCH 023/294] Update product queries --- src/products/queries.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/products/queries.ts b/src/products/queries.ts index 3cdf7ef4d..64971fb93 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -62,7 +62,6 @@ export const fragmentProductImage = gql` `; export const productFragment = gql` - ${fragmentMoney} fragment ProductFragment on Product { id name @@ -475,7 +474,6 @@ export const AvailableInGridAttributesQuery = TypedQuery< >(availableInGridAttributes); const createMultipleVariantsData = gql` - ${fragmentMoney} ${productVariantAttributesFragment} ${warehouseFragment} query CreateMultipleVariantsData($id: ID!) { From 43aeff8e68801ca4cd8018bd36d66e81ea8eff42 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Fri, 12 Jun 2020 13:19:44 +0200 Subject: [PATCH 024/294] Update product variant creator --- .../ProductVariantCreatePage.tsx | 6 +- .../ProductVariantCreatorSummary.tsx | 8 +- .../__snapshots__/reducer.test.ts.snap | 96 +++--- .../createVariants.test.ts | 8 +- .../createVariants.ts | 4 +- .../ProductVariantCreatorPage/reducer.test.ts | 6 +- .../ProductVariantCreatorPage/reducer.ts | 2 +- .../ProductVariantPage/ProductVariantPage.tsx | 10 +- .../ProductVariantPrice.tsx | 17 +- .../ProductVariants/ProductVariants.tsx | 4 +- src/products/fixtures.ts | 6 +- src/products/views/ProductVariant.tsx | 2 +- src/products/views/ProductVariantCreate.tsx | 2 +- .../__snapshots__/Stories.test.ts.snap | 317 +----------------- 14 files changed, 89 insertions(+), 399 deletions(-) diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index cf2fe1319..7af12ed0b 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -28,7 +28,7 @@ import ProductVariantPrice from "../ProductVariantPrice"; interface ProductVariantCreatePageFormData { costPrice: string; images: string[]; - priceOverride: string; + price: string; quantity: string; sku: string; trackInventory: boolean; @@ -83,7 +83,7 @@ const ProductVariantCreatePage: React.FC = ({ const initialForm: ProductVariantCreatePageFormData = { costPrice: "", images: maybe(() => product.images.map(image => image.id)), - priceOverride: "", + price: "", quantity: "0", sku: "", trackInventory: true @@ -130,7 +130,7 @@ const ProductVariantCreatePage: React.FC = ({ error => error.index === variantIndex ); const variantFormErrors = getFormErrors( - ["priceOverride", "quantity", "sku"], + ["price", "quantity", "sku"], variantErrors ); @@ -234,9 +234,9 @@ const ProductVariantCreatorSummary: React.FC endAdornment: currencySymbol }} className={classes.input} - error={!!variantFormErrors.priceOverride} + error={!!variantFormErrors.price} helperText={getBulkProductErrorMessage( - variantFormErrors.priceOverride, + variantFormErrors.price, intl )} inputProps={{ @@ -244,7 +244,7 @@ const ProductVariantCreatorSummary: React.FC type: "number" }} fullWidth - value={variant.priceOverride} + value={variant.price} onChange={event => onVariantDataChange( variantIndex, diff --git a/src/products/components/ProductVariantCreatorPage/__snapshots__/reducer.test.ts.snap b/src/products/components/ProductVariantCreatorPage/__snapshots__/reducer.test.ts.snap index 32a195361..23447aca2 100644 --- a/src/products/components/ProductVariantCreatorPage/__snapshots__/reducer.test.ts.snap +++ b/src/products/components/ProductVariantCreatorPage/__snapshots__/reducer.test.ts.snap @@ -87,7 +87,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -129,7 +129,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -171,7 +171,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -213,7 +213,7 @@ Object { ], }, ], - "priceOverride": "49.99", + "price": "49.99", "sku": "", "stocks": Array [ Object { @@ -255,7 +255,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -297,7 +297,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -339,7 +339,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -381,7 +381,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -499,7 +499,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -541,7 +541,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -583,7 +583,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -625,7 +625,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -667,7 +667,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -709,7 +709,7 @@ Object { ], }, ], - "priceOverride": "24.99", + "price": "24.99", "sku": "", "stocks": Array [ Object { @@ -751,7 +751,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -793,7 +793,7 @@ Object { ], }, ], - "priceOverride": "26.99", + "price": "26.99", "sku": "", "stocks": Array [ Object { @@ -930,7 +930,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -972,7 +972,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1014,7 +1014,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1056,7 +1056,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1098,7 +1098,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1140,7 +1140,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1182,7 +1182,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1224,7 +1224,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1328,7 +1328,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1370,7 +1370,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1412,7 +1412,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1454,7 +1454,7 @@ Object { ], }, ], - "priceOverride": "45.99", + "price": "45.99", "sku": "", "stocks": Array [ Object { @@ -1496,7 +1496,7 @@ Object { ], }, ], - "priceOverride": "51.99", + "price": "51.99", "sku": "", "stocks": Array [ Object { @@ -1538,7 +1538,7 @@ Object { ], }, ], - "priceOverride": "51.99", + "price": "51.99", "sku": "", "stocks": Array [ Object { @@ -1580,7 +1580,7 @@ Object { ], }, ], - "priceOverride": "51.99", + "price": "51.99", "sku": "", "stocks": Array [ Object { @@ -1622,7 +1622,7 @@ Object { ], }, ], - "priceOverride": "51.99", + "price": "51.99", "sku": "", "stocks": Array [ Object { @@ -1717,7 +1717,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1759,7 +1759,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1801,7 +1801,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1843,7 +1843,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1885,7 +1885,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1927,7 +1927,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -1969,7 +1969,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2011,7 +2011,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2119,7 +2119,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2149,7 +2149,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2179,7 +2179,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2209,7 +2209,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2239,7 +2239,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2269,7 +2269,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2299,7 +2299,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { @@ -2329,7 +2329,7 @@ Object { ], }, ], - "priceOverride": "10.99", + "price": "10.99", "sku": "", "stocks": Array [ Object { diff --git a/src/products/components/ProductVariantCreatorPage/createVariants.test.ts b/src/products/components/ProductVariantCreatorPage/createVariants.test.ts index 9fbcd609d..e0319c1ab 100644 --- a/src/products/components/ProductVariantCreatorPage/createVariants.test.ts +++ b/src/products/components/ProductVariantCreatorPage/createVariants.test.ts @@ -43,7 +43,7 @@ describe("Creates variant matrix", () => { ); variants.forEach(variant => { - expect(variant.priceOverride).toBe(price); + expect(variant.price).toBe(price); variant.stocks.forEach((_, stockIndex) => { expect(variant.stocks[stockIndex].quantity).toBe(stock[stockIndex]); }); @@ -98,7 +98,7 @@ describe("Creates variant matrix", () => { ).values[0] === attributeValue ) .forEach(variant => { - expect(variant.priceOverride).toBe( + expect(variant.price).toBe( (price * (attributeValueIndex + 1)).toString() ); }); @@ -141,7 +141,7 @@ describe("Creates variant matrix", () => { ); variants.forEach(variant => { - expect(variant.priceOverride).toBe(price); + expect(variant.price).toBe(price); }); attribute.values.forEach((attributeValue, attributeValueIndex) => { @@ -210,7 +210,7 @@ describe("Creates variant matrix", () => { ).values[0] === attributeValue ) .forEach(variant => { - expect(variant.priceOverride).toBe( + expect(variant.price).toBe( (price * (attributeValueIndex + 1)).toString() ); }); diff --git a/src/products/components/ProductVariantCreatorPage/createVariants.ts b/src/products/components/ProductVariantCreatorPage/createVariants.ts index 75539f55a..462be5760 100644 --- a/src/products/components/ProductVariantCreatorPage/createVariants.ts +++ b/src/products/components/ProductVariantCreatorPage/createVariants.ts @@ -46,7 +46,7 @@ function createVariant( data: ProductVariantCreateFormData, attributes: CreateVariantInput ): ProductVariantBulkCreateInput { - const priceOverride = getValueFromMode(attributes, data.price, "0"); + const price = getValueFromMode(attributes, data.price, "0"); const stocks = getValueFromMode( attributes, data.stock, @@ -58,7 +58,7 @@ function createVariant( id: attribute.attributeId, values: [attribute.attributeValueSlug] })), - priceOverride, + price, sku: "", stocks: stocks.map((quantity, stockIndex) => ({ quantity, diff --git a/src/products/components/ProductVariantCreatorPage/reducer.test.ts b/src/products/components/ProductVariantCreatorPage/reducer.test.ts index 810eb35d5..ce6f8debf 100644 --- a/src/products/components/ProductVariantCreatorPage/reducer.test.ts +++ b/src/products/components/ProductVariantCreatorPage/reducer.test.ts @@ -250,9 +250,9 @@ describe("Reducer is able to", () => { } ]); - expect(state.variants[variantIndex].priceOverride).toBe(value); - expect(state.variants[variantIndex - 1].priceOverride).toBe( - fourthStep.variants[variantIndex - 1].priceOverride + expect(state.variants[variantIndex].price).toBe(value); + expect(state.variants[variantIndex - 1].price).toBe( + fourthStep.variants[variantIndex - 1].price ); expect(state).toMatchSnapshot(); }); diff --git a/src/products/components/ProductVariantCreatorPage/reducer.ts b/src/products/components/ProductVariantCreatorPage/reducer.ts index acc547b46..5f702218c 100644 --- a/src/products/components/ProductVariantCreatorPage/reducer.ts +++ b/src/products/components/ProductVariantCreatorPage/reducer.ts @@ -301,7 +301,7 @@ function changeVariantData( ...state.variants[variantIndex] }; if (field === "price") { - variant.priceOverride = value; + variant.price = value; } else if (field === "sku") { variant.sku = value; } diff --git a/src/products/components/ProductVariantPage/ProductVariantPage.tsx b/src/products/components/ProductVariantPage/ProductVariantPage.tsx index 54fb76fa6..a1d66af03 100644 --- a/src/products/components/ProductVariantPage/ProductVariantPage.tsx +++ b/src/products/components/ProductVariantPage/ProductVariantPage.tsx @@ -32,7 +32,7 @@ import ProductVariantPrice from "../ProductVariantPrice"; export interface ProductVariantPageFormData { costPrice: string; - priceOverride: string; + price: string; sku: string; trackInventory: boolean; } @@ -110,7 +110,7 @@ const ProductVariantPage: React.FC = ({ const initialForm: ProductVariantPageFormData = { costPrice: maybe(() => variant.costPrice.amount.toString(), ""), - priceOverride: maybe(() => variant.priceOverride.amount.toString(), ""), + price: maybe(() => variant.price.amount.toString(), ""), sku: maybe(() => variant.sku, ""), trackInventory: variant?.trackInventory }; @@ -182,10 +182,10 @@ const ProductVariantPage: React.FC = ({ = props => { - const { - currencySymbol, - costPrice, - errors, - priceOverride, - loading, - onChange - } = props; + const { currencySymbol, costPrice, errors, price, loading, onChange } = props; const classes = useStyles(props); const intl = useIntl(); @@ -56,7 +49,7 @@ const ProductVariantPrice: React.FC = props => {
= props => { intl.formatMessage({ defaultMessage: "Optional", description: "optional field", - id: "productVariantPriceOptionalPriceOverrideField" + id: "productVariantPriceOptionalPriceField" }) } - value={priceOverride} + value={price} currencySymbol={currencySymbol} onChange={onChange} disabled={loading} diff --git a/src/products/components/ProductVariants/ProductVariants.tsx b/src/products/components/ProductVariants/ProductVariants.tsx index aebec84bd..2370235dd 100644 --- a/src/products/components/ProductVariants/ProductVariants.tsx +++ b/src/products/components/ProductVariants/ProductVariants.tsx @@ -327,8 +327,8 @@ export const ProductVariants: React.FC = props => { {variant ? ( - variant.priceOverride ? ( - + variant.price ? ( + ) : fallbackPrice ? ( ) : ( diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index 04d2767e1..5d960fda2 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -256,7 +256,7 @@ export const product: ( ], margin: 2, name: "Cordoba Oro", - priceOverride: { + price: { __typename: "Money", amount: 678.78, currency: "USD" @@ -297,7 +297,7 @@ export const product: ( ], margin: 7, name: "silver", - priceOverride: null, + price: null, sku: "69055-15190", stocks: [ { @@ -1121,7 +1121,7 @@ export const variant = (placeholderImage: string): ProductVariant => ({ } ], name: "Extended Hard", - priceOverride: { + price: { __typename: "Money", amount: 100, currency: "USD" diff --git a/src/products/views/ProductVariant.tsx b/src/products/views/ProductVariant.tsx index 5891021d7..f339f80d2 100644 --- a/src/products/views/ProductVariant.tsx +++ b/src/products/views/ProductVariant.tsx @@ -155,7 +155,7 @@ export const ProductVariant: React.FC = ({ })), costPrice: decimal(data.costPrice), id: variantId, - priceOverride: decimal(data.priceOverride), + price: decimal(data.price), removeStocks: data.removeStocks, sku: data.sku, stocks: data.updateStocks.map( diff --git a/src/products/views/ProductVariantCreate.tsx b/src/products/views/ProductVariantCreate.tsx index 3598e7ddf..94178a6d2 100644 --- a/src/products/views/ProductVariantCreate.tsx +++ b/src/products/views/ProductVariantCreate.tsx @@ -75,7 +75,7 @@ export const ProductVariant: React.FC = ({ values: [attribute.value] })), costPrice: decimal(formData.costPrice), - priceOverride: decimal(formData.priceOverride), + price: decimal(formData.price), product: productId, sku: formData.sku, stocks: formData.stocks.map(stock => ({ diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 52aaa5a23..fef36ba5a 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -105754,109 +105754,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- USD -
-
- -
-
-
-
-
-
@@ -106719,106 +106616,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- USD -
-
- -
-
-
-
-
-
@@ -107680,106 +107477,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- USD -
-
- -
-
-
-
-
-
@@ -108490,7 +108187,7 @@ exports[`Storyshots Views / Products / Create product variant add first variant @@ -109084,7 +108781,7 @@ exports[`Storyshots Views / Products / Create product variant default 1`] = ` @@ -109601,7 +109298,7 @@ exports[`Storyshots Views / Products / Create product variant when loading data aria-invalid="false" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" disabled="" - name="priceOverride" + name="price" type="number" value="" /> @@ -110212,7 +109909,7 @@ exports[`Storyshots Views / Products / Create product variant with errors 1`] = @@ -129831,7 +129528,7 @@ exports[`Storyshots Views / Products / Product variant details attribute errors @@ -130723,7 +130420,7 @@ exports[`Storyshots Views / Products / Product variant details when loaded data @@ -131396,7 +131093,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data aria-invalid="false" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" disabled="" - name="priceOverride" + name="price" type="number" value="" /> From b001c74af26e7cf44378f8365db2f0a873a1d4c8 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Fri, 12 Jun 2020 14:39:51 +0200 Subject: [PATCH 025/294] Display variant price range in product list --- .../components/ProductList/ProductList.tsx | 50 ++++++++++++++++--- .../components/ProductListPage/utils.ts | 20 ++++++++ src/products/queries.ts | 6 +++ src/products/types/ProductList.ts | 12 +++++ 4 files changed, 81 insertions(+), 7 deletions(-) diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index cbc8e4e37..8a0e48cd6 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -18,6 +18,7 @@ import { ProductListColumns } from "@saleor/config"; import { maybe, renderCollection } from "@saleor/misc"; import { getAttributeIdFromColumnValue, + getProductPriceRange, isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; import { AvailableInGridAttributes_grid_edges_node } from "@saleor/products/types/AvailableInGridAttributes"; @@ -372,13 +373,48 @@ export const ProductList: React.FC = props => { displayColumns={settings.columns} > - {maybe(() => product.basePrice) && - maybe(() => product.basePrice.amount) !== undefined && - maybe(() => product.basePrice.currency) !== undefined ? ( - - ) : ( - - )} + {maybe(() => { + const { max, min } = getProductPriceRange( + product.variants + ); + const currency = product.variants[0].price.currency; + + if (max === min) { + return ( + + ); + } else { + return ( + <> + {intl.formatMessage({ + defaultMessage: "From", + description: "from" + })}{" "} + {" "} + {intl.formatMessage({ + defaultMessage: "to", + description: "to" + })}{" "} + + + ); + } + }, )} diff --git a/src/products/components/ProductListPage/utils.ts b/src/products/components/ProductListPage/utils.ts index 2f0735182..9032fb8e0 100644 --- a/src/products/components/ProductListPage/utils.ts +++ b/src/products/components/ProductListPage/utils.ts @@ -1,3 +1,5 @@ +import { ProductList_products_edges_node_variants } from "@saleor/products/types/ProductList"; + const prefix = "attribute"; export function getAttributeColumnValue(id: string) { @@ -11,3 +13,21 @@ export function isAttributeColumnValue(value: string) { export function getAttributeIdFromColumnValue(value: string) { return value.substr(prefix.length + 1); } + +export function getProductPriceRange( + productVariants: ProductList_products_edges_node_variants[] +) { + let max = productVariants[0].price.amount; + let min = productVariants[0].price.amount; + + for (let i = 1, len = productVariants.length; i < len; i++) { + const price = productVariants[i].price; + max = price.amount > max ? price.amount : max; + min = price.amount < min ? price.amount : min; + } + + return { + max, + min + }; +} diff --git a/src/products/queries.ts b/src/products/queries.ts index 64971fb93..9e0f7c911 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -330,6 +330,12 @@ const productListQuery = gql` name } } + variants { + price { + amount + currency + } + } } } pageInfo { diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts index 4f0fb7058..fc63e6d08 100644 --- a/src/products/types/ProductList.ts +++ b/src/products/types/ProductList.ts @@ -36,6 +36,17 @@ export interface ProductList_products_edges_node_attributes { values: (ProductList_products_edges_node_attributes_values | null)[]; } +export interface ProductList_products_edges_node_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductList_products_edges_node_variants { + __typename: "ProductVariant"; + price: ProductList_products_edges_node_variants_price | null; +} + export interface ProductList_products_edges_node { __typename: "Product"; id: string; @@ -45,6 +56,7 @@ export interface ProductList_products_edges_node { isPublished: boolean; productType: ProductList_products_edges_node_productType; attributes: ProductList_products_edges_node_attributes[]; + variants: (ProductList_products_edges_node_variants | null)[] | null; } export interface ProductList_products_edges { From 1e93827deb7d9a53172835fb65b76b163f10e22d Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Fri, 12 Jun 2020 16:44:35 +0200 Subject: [PATCH 026/294] Update product list tests --- .../ProductVariantPrice.tsx | 6 +- src/products/fixtures.ts | 660 ++++++++++++++---- .../__snapshots__/Stories.test.ts.snap | 80 +-- 3 files changed, 583 insertions(+), 163 deletions(-) diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index 9483b7328..487683719 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -34,7 +34,7 @@ const ProductVariantPrice: React.FC = props => { const classes = useStyles(props); const intl = useIntl(); - const formErrors = getFormErrors(["price_override", "cost_price"], errors); + const formErrors = getFormErrors(["price", "cost_price"], errors); return ( @@ -48,13 +48,13 @@ const ProductVariantPrice: React.FC = props => {
- $15.00 + From $15.00 to $49.00 - $15.00 + From $15.00 to $49.00 - $15.00 + From $15.00 to $49.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $20.00 + From $3.00 to $7.00 @@ -127398,7 +127398,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - $15.00 + From $15.00 to $49.00 - $15.00 + From $15.00 to $49.00 - $3.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $20.00 + From $3.00 to $7.00 @@ -128124,7 +128124,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - $15.00 + From $15.00 to $49.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $3.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 - $30.00 + From $3.00 to $7.00 From 2fdda2db5512e36913a653dece98e255e63cfba6 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Tue, 16 Jun 2020 12:48:57 +0200 Subject: [PATCH 027/294] Update product list UI --- .../components/ProductList/ProductList.tsx | 35 +- src/products/fixtures.ts | 20 + src/products/queries.ts | 1 + src/products/types/ProductFragment.ts | 1 + src/products/types/ProductList.ts | 1 + .../__snapshots__/Stories.test.ts.snap | 600 +++++++++++++++--- 6 files changed, 568 insertions(+), 90 deletions(-) diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 8a0e48cd6..043ac7584 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -62,9 +62,17 @@ const useStyles = makeStyles( } }, colNameFixed: {}, + colNameGrid: { + display: "grid", + gridColumn: 1 + }, colNameHeader: { marginLeft: AVATAR_MARGIN }, + colNameType: { + color: theme.palette.text.secondary, + fontSize: "0.8rem" + }, colPrice: { textAlign: "right" }, @@ -297,7 +305,21 @@ export const ProductList: React.FC = props => { thumbnail={maybe(() => product.thumbnail.url)} data-tc="name" > - {maybe(() => product.name, )} + {maybe( + () => ( +
+ {product.name} + {product && product.productType && ( + + {product.productType.hasVariants + ? "Configurable" + : "Simple"} + + )} +
+ ), + + )} = props => { } else { return ( <> - {intl.formatMessage({ - defaultMessage: "From", - description: "from" - })}{" "} {" "} - {intl.formatMessage({ - defaultMessage: "to", - description: "to" - })}{" "} + /> + {" - "} - Nebula Night Sky Paint +
+ + Nebula Night Sky Paint + + + Configurable + +
@@ -124803,7 +124814,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Light Speed Yellow Paint +
+ + Light Speed Yellow Paint + + + Configurable + +
@@ -124868,7 +124890,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Hyperspace Turquoise Paint +
+ + Hyperspace Turquoise Paint + + + Configurable + +
@@ -124933,7 +124966,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Pineapple Juice +
+ + Pineapple Juice + + + Configurable + +
@@ -124998,7 +125042,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Coconut Juice +
+ + Coconut Juice + + + Configurable + +
@@ -125063,7 +125118,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Apple Juice +
+ + Apple Juice + + + Configurable + +
@@ -125128,7 +125194,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Orange Juice +
+ + Orange Juice + + + Configurable + +
@@ -125193,7 +125270,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Banana Juice +
+ + Banana Juice + + + Configurable + +
@@ -125258,7 +125346,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Bean Juice +
+ + Bean Juice + + + Configurable + +
@@ -125323,7 +125422,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Carrot Juice +
+ + Carrot Juice + + + Configurable + +
@@ -125388,7 +125498,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Green Juice +
+ + Green Juice + + + Configurable + +
@@ -125453,7 +125574,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Code Division T-shirt +
+ + Code Division T-shirt + + + Configurable + +
@@ -125518,7 +125650,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -125583,7 +125726,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -125648,7 +125802,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -125713,7 +125878,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -125778,7 +125954,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Black Hoodie +
+ + Black Hoodie + + + Configurable + +
@@ -125843,7 +126030,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Blue Hoodie +
+ + Blue Hoodie + + + Configurable + +
@@ -125908,7 +126106,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Mustard Hoodie +
+ + Mustard Hoodie + + + Configurable + +
@@ -125973,7 +126182,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Colored Parrot Cushion +
+ + Colored Parrot Cushion + + + Configurable + +
@@ -126038,7 +126258,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 @@ -127374,7 +127594,18 @@ exports[`Storyshots Views / Products / Product list not published 1`] = `
- Light Speed Yellow Paint +
+ + Light Speed Yellow Paint + + + Configurable + +
@@ -127398,7 +127629,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Hyperspace Turquoise Paint +
+ + Hyperspace Turquoise Paint + + + Configurable + +
@@ -127463,7 +127705,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Bean Juice +
+ + Bean Juice + + + Configurable + +
@@ -127528,7 +127781,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Black Hoodie +
+ + Black Hoodie + + + Configurable + +
@@ -127593,7 +127857,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Colored Parrot Cushion +
+ + Colored Parrot Cushion + + + Configurable + +
@@ -127658,7 +127933,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 @@ -128100,7 +128375,18 @@ exports[`Storyshots Views / Products / Product list published 1`] = `
- Nebula Night Sky Paint +
+ + Nebula Night Sky Paint + + + Configurable + +
@@ -128124,7 +128410,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $15.00 to $49.00 + $15.00 - $49.00 - Pineapple Juice +
+ + Pineapple Juice + + + Configurable + +
@@ -128189,7 +128486,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Coconut Juice +
+ + Coconut Juice + + + Configurable + +
@@ -128254,7 +128562,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Apple Juice +
+ + Apple Juice + + + Configurable + +
@@ -128319,7 +128638,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Orange Juice +
+ + Orange Juice + + + Configurable + +
@@ -128384,7 +128714,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Banana Juice +
+ + Banana Juice + + + Configurable + +
@@ -128449,7 +128790,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Carrot Juice +
+ + Carrot Juice + + + Configurable + +
@@ -128514,7 +128866,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Green Juice +
+ + Green Juice + + + Configurable + +
@@ -128579,7 +128942,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Code Division T-shirt +
+ + Code Division T-shirt + + + Configurable + +
@@ -128644,7 +129018,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -128709,7 +129094,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -128774,7 +129170,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -128839,7 +129246,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Polo Shirt +
+ + Polo Shirt + + + Configurable + +
@@ -128904,7 +129322,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Blue Hoodie +
+ + Blue Hoodie + + + Configurable + +
@@ -128969,7 +129398,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 - Mustard Hoodie +
+ + Mustard Hoodie + + + Configurable + +
@@ -129034,7 +129474,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - From $3.00 to $7.00 + $3.00 - $7.00 From 2d9385554ba43eb96d03c78c529aadd5f328b4bf Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Tue, 16 Jun 2020 13:13:10 +0200 Subject: [PATCH 028/294] Update category product list --- .../CategoryProductList.tsx | 43 ++- src/categories/fixtures.ts | 250 +++++++++++++----- src/categories/queries.ts | 6 + src/categories/types/CategoryDetails.ts | 12 + .../__snapshots__/Stories.test.ts.snap | 20 +- 5 files changed, 254 insertions(+), 77 deletions(-) diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 5aaaf8728..ed1c432f0 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -14,6 +14,7 @@ import TableCellAvatar, { import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; +import { getProductPriceRange } from "@saleor/products/components/ProductListPage/utils"; import { ListActions, ListProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -207,13 +208,41 @@ export const CategoryProductList: React.FC = props => )} - {maybe(() => product.basePrice) && - maybe(() => product.basePrice.amount) !== undefined && - maybe(() => product.basePrice.currency) !== undefined ? ( - - ) : ( - - )} + {maybe(() => { + const { max, min } = getProductPriceRange( + product.variants + ); + const currency = product.variants[0].price.currency; + + if (max === min) { + return ( + + ); + } else { + return ( + <> + + {" - "} + + + ); + } + }, )} ); diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index 89ab0441f..c4317e829 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -117,11 +117,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjA=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 83.3, - currency: "USD" - }, id: "UHJvZHVjdDoyMQ==", isAvailable: true, name: "Gardner-Schultz", @@ -130,7 +125,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -138,11 +151,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjE=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 68.27, - currency: "USD" - }, id: "UHJvZHVjdDoyMg==", isAvailable: true, name: "James, Martinez and Murray", @@ -151,7 +159,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -159,11 +185,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjI=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 21.43, - currency: "USD" - }, id: "UHJvZHVjdDoyMw==", isAvailable: true, name: "Curtis, Joyce and Turner", @@ -172,7 +193,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -180,11 +219,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjM=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 62.76, - currency: "USD" - }, id: "UHJvZHVjdDoyNA==", isAvailable: true, name: "Davis, Brown and Ray", @@ -193,7 +227,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -201,11 +253,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjQ=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 7.13, - currency: "USD" - }, id: "UHJvZHVjdDoyNQ==", isAvailable: true, name: "Gallegos Ltd", @@ -214,7 +261,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -222,11 +287,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjU=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 48.82, - currency: "USD" - }, id: "UHJvZHVjdDoyNg==", isAvailable: true, name: "Franklin Inc", @@ -235,7 +295,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -243,11 +321,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjY=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 27.34, - currency: "USD" - }, id: "UHJvZHVjdDoyNw==", isAvailable: true, name: "Williams-Taylor", @@ -256,7 +329,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -264,11 +355,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjc=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 75.42, - currency: "USD" - }, id: "UHJvZHVjdDoyOA==", isAvailable: true, name: "Riddle, Evans and Hicks", @@ -277,7 +363,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -285,11 +389,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjg=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 86.62, - currency: "USD" - }, id: "UHJvZHVjdDoyOQ==", isAvailable: true, name: "Hebert-Sherman", @@ -298,7 +397,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } }, { @@ -306,11 +423,6 @@ export const category: ( cursor: "YXJyYXljb25uZWN0aW9uOjk=", node: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 48.66, - currency: "USD" - }, id: "UHJvZHVjdDozMA==", isAvailable: true, name: "Carter and Sons", @@ -319,7 +431,25 @@ export const category: ( id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage } + thumbnail: { __typename: "Image", url: placeholderImage }, + variants: [ + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 5, + currency: "USD" + } + }, + { + __typename: "ProductVariant" as "ProductVariant", + price: { + __typename: "Money" as "Money", + amount: 10, + currency: "USD" + } + } + ] } } ], diff --git a/src/categories/queries.ts b/src/categories/queries.ts index 76b0efe6a..e89afa141 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -112,6 +112,12 @@ export const categoryDetails = gql` id name } + variants { + price { + amount + currency + } + } } } } diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index 21a0b0a5d..8be554dc3 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -73,6 +73,17 @@ export interface CategoryDetails_category_products_edges_node_productType { name: string; } +export interface CategoryDetails_category_products_edges_node_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CategoryDetails_category_products_edges_node_variants { + __typename: "ProductVariant"; + price: CategoryDetails_category_products_edges_node_variants_price | null; +} + export interface CategoryDetails_category_products_edges_node { __typename: "Product"; id: string; @@ -80,6 +91,7 @@ export interface CategoryDetails_category_products_edges_node { isAvailable: boolean | null; thumbnail: CategoryDetails_category_products_edges_node_thumbnail | null; productType: CategoryDetails_category_products_edges_node_productType; + variants: (CategoryDetails_category_products_edges_node_variants | null)[] | null; } export interface CategoryDetails_category_products_edges { diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 3de6622f5..50d81bc57 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -25221,7 +25221,7 @@ Ctrl + K" - $83.30 + $5.00 - $10.00 - $68.27 + $5.00 - $10.00 - $21.43 + $5.00 - $10.00 - $62.76 + $5.00 - $10.00 - $7.13 + $5.00 - $10.00 - $48.82 + $5.00 - $10.00 - $27.34 + $5.00 - $10.00 - $75.42 + $5.00 - $10.00 - $86.62 + $5.00 - $10.00 - $48.66 + $5.00 - $10.00 From cdfac6de6b457d21f49248b83b030a123fafcfa4 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Tue, 16 Jun 2020 14:57:22 +0200 Subject: [PATCH 029/294] Update product update page --- .../ProductUpdatePage/ProductUpdatePage.tsx | 26 ++++++++++++------- src/products/utils/data.ts | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index fb8b8d7ca..cff3c653c 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -159,7 +159,7 @@ export const ProductUpdatePage: React.FC = ({ const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); - const currency = maybe(() => product.basePrice.currency); + const currency = maybe(() => product.variants[0].price.currency); const hasVariants = maybe(() => product.productType.hasVariants, false); const handleSubmit = (data: ProductUpdatePageFormData) => { @@ -246,19 +246,25 @@ export const ProductUpdatePage: React.FC = ({ /> )} - - + {!!product?.productType && !hasVariants && ( + <> + + + + )} {hasVariants ? ( product.basePrice.amount, 0), + basePrice: maybe(() => product.variants[0].price.amount, 0), category: maybe(() => product.category.id, ""), chargeTaxes: maybe(() => product.chargeTaxes, false), collections: maybe( From eaa85bc795e1a8997cae6b9be8800b588b33cb41 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Tue, 16 Jun 2020 15:16:08 +0200 Subject: [PATCH 030/294] Update product variant creator --- src/products/queries.ts | 6 ++ .../types/CreateMultipleVariantsData.ts | 12 ++++ src/products/types/Product.ts | 64 +++++++++---------- src/products/types/ProductCreate.ts | 64 +++++++++---------- src/products/types/ProductDetails.ts | 64 +++++++++---------- src/products/types/ProductImageCreate.ts | 64 +++++++++---------- src/products/types/ProductImageUpdate.ts | 64 +++++++++---------- src/products/types/ProductUpdate.ts | 64 +++++++++---------- .../types/ProductVariantAttributesFragment.ts | 12 ++++ src/products/types/SimpleProductUpdate.ts | 64 +++++++++---------- .../ProductVariantCreator.tsx | 2 +- 11 files changed, 255 insertions(+), 225 deletions(-) diff --git a/src/products/queries.ts b/src/products/queries.ts index 47dba63fc..32945bdd0 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -112,6 +112,12 @@ const productVariantAttributesFragment = gql` } } } + variants { + price { + amount + currency + } + } } `; diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts index 3f85fa10e..183a294eb 100644 --- a/src/products/types/CreateMultipleVariantsData.ts +++ b/src/products/types/CreateMultipleVariantsData.ts @@ -58,11 +58,23 @@ export interface CreateMultipleVariantsData_product_productType { variantAttributes: (CreateMultipleVariantsData_product_productType_variantAttributes | null)[] | null; } +export interface CreateMultipleVariantsData_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CreateMultipleVariantsData_product_variants { + __typename: "ProductVariant"; + price: CreateMultipleVariantsData_product_variants_price | null; +} + export interface CreateMultipleVariantsData_product { __typename: "Product"; id: string; attributes: CreateMultipleVariantsData_product_attributes[]; productType: CreateMultipleVariantsData_product_productType; + variants: (CreateMultipleVariantsData_product_variants | null)[] | null; } export interface CreateMultipleVariantsData_warehouses_edges_node { diff --git a/src/products/types/Product.ts b/src/products/types/Product.ts index 05a3a4233..7c7424d58 100644 --- a/src/products/types/Product.ts +++ b/src/products/types/Product.ts @@ -60,6 +60,37 @@ export interface Product_productType { hasVariants: boolean; } +export interface Product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface Product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface Product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: Product_variants_stocks_warehouse; +} + +export interface Product_variants { + __typename: "ProductVariant"; + price: Product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (Product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface Product_category { __typename: "Category"; id: string; @@ -137,42 +168,12 @@ export interface Product_images { url: string; } -export interface Product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface Product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: Product_variants_stocks_warehouse; -} - -export interface Product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: Product_variants_price | null; - margin: number | null; - stocks: (Product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface Product { __typename: "Product"; id: string; attributes: Product_attributes[]; productType: Product_productType; + variants: (Product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -187,5 +188,4 @@ export interface Product { publicationDate: any | null; pricing: Product_pricing | null; images: (Product_images | null)[] | null; - variants: (Product_variants | null)[] | null; } diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index 9adee43f3..97e1b0976 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -66,6 +66,37 @@ export interface ProductCreate_productCreate_product_productType { hasVariants: boolean; } +export interface ProductCreate_productCreate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductCreate_productCreate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductCreate_productCreate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductCreate_productCreate_product_variants_stocks_warehouse; +} + +export interface ProductCreate_productCreate_product_variants { + __typename: "ProductVariant"; + price: ProductCreate_productCreate_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductCreate_productCreate_product_category { __typename: "Category"; id: string; @@ -143,42 +174,12 @@ export interface ProductCreate_productCreate_product_images { url: string; } -export interface ProductCreate_productCreate_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductCreate_productCreate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductCreate_productCreate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductCreate_productCreate_product_variants_stocks_warehouse; -} - -export interface ProductCreate_productCreate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: ProductCreate_productCreate_product_variants_price | null; - margin: number | null; - stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface ProductCreate_productCreate_product { __typename: "Product"; id: string; attributes: ProductCreate_productCreate_product_attributes[]; productType: ProductCreate_productCreate_product_productType; + variants: (ProductCreate_productCreate_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -193,7 +194,6 @@ export interface ProductCreate_productCreate_product { publicationDate: any | null; pricing: ProductCreate_productCreate_product_pricing | null; images: (ProductCreate_productCreate_product_images | null)[] | null; - variants: (ProductCreate_productCreate_product_variants | null)[] | null; } export interface ProductCreate_productCreate { diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index 7c9b45b77..d4e71183c 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -60,6 +60,37 @@ export interface ProductDetails_product_productType { hasVariants: boolean; } +export interface ProductDetails_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductDetails_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductDetails_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductDetails_product_variants_stocks_warehouse; +} + +export interface ProductDetails_product_variants { + __typename: "ProductVariant"; + price: ProductDetails_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (ProductDetails_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductDetails_product_category { __typename: "Category"; id: string; @@ -137,42 +168,12 @@ export interface ProductDetails_product_images { url: string; } -export interface ProductDetails_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductDetails_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductDetails_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductDetails_product_variants_stocks_warehouse; -} - -export interface ProductDetails_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: ProductDetails_product_variants_price | null; - margin: number | null; - stocks: (ProductDetails_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface ProductDetails_product { __typename: "Product"; id: string; attributes: ProductDetails_product_attributes[]; productType: ProductDetails_product_productType; + variants: (ProductDetails_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -187,7 +188,6 @@ export interface ProductDetails_product { publicationDate: any | null; pricing: ProductDetails_product_pricing | null; images: (ProductDetails_product_images | null)[] | null; - variants: (ProductDetails_product_variants | null)[] | null; } export interface ProductDetails { diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index b4c67bef1..60386f6c7 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -66,6 +66,37 @@ export interface ProductImageCreate_productImageCreate_product_productType { hasVariants: boolean; } +export interface ProductImageCreate_productImageCreate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageCreate_productImageCreate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductImageCreate_productImageCreate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; +} + +export interface ProductImageCreate_productImageCreate_product_variants { + __typename: "ProductVariant"; + price: ProductImageCreate_productImageCreate_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductImageCreate_productImageCreate_product_category { __typename: "Category"; id: string; @@ -143,42 +174,12 @@ export interface ProductImageCreate_productImageCreate_product_images { url: string; } -export interface ProductImageCreate_productImageCreate_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; -} - -export interface ProductImageCreate_productImageCreate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: ProductImageCreate_productImageCreate_product_variants_price | null; - margin: number | null; - stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface ProductImageCreate_productImageCreate_product { __typename: "Product"; id: string; attributes: ProductImageCreate_productImageCreate_product_attributes[]; productType: ProductImageCreate_productImageCreate_product_productType; + variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -193,7 +194,6 @@ export interface ProductImageCreate_productImageCreate_product { publicationDate: any | null; pricing: ProductImageCreate_productImageCreate_product_pricing | null; images: (ProductImageCreate_productImageCreate_product_images | null)[] | null; - variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; } export interface ProductImageCreate_productImageCreate { diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index 602cdeefa..d78778fa7 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -66,6 +66,37 @@ export interface ProductImageUpdate_productImageUpdate_product_productType { hasVariants: boolean; } +export interface ProductImageUpdate_productImageUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants { + __typename: "ProductVariant"; + price: ProductImageUpdate_productImageUpdate_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductImageUpdate_productImageUpdate_product_category { __typename: "Category"; id: string; @@ -143,42 +174,12 @@ export interface ProductImageUpdate_productImageUpdate_product_images { url: string; } -export interface ProductImageUpdate_productImageUpdate_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: ProductImageUpdate_productImageUpdate_product_variants_price | null; - margin: number | null; - stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface ProductImageUpdate_productImageUpdate_product { __typename: "Product"; id: string; attributes: ProductImageUpdate_productImageUpdate_product_attributes[]; productType: ProductImageUpdate_productImageUpdate_product_productType; + variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -193,7 +194,6 @@ export interface ProductImageUpdate_productImageUpdate_product { publicationDate: any | null; pricing: ProductImageUpdate_productImageUpdate_product_pricing | null; images: (ProductImageUpdate_productImageUpdate_product_images | null)[] | null; - variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; } export interface ProductImageUpdate_productImageUpdate { diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index b7c9c8b10..76a64660d 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -66,6 +66,37 @@ export interface ProductUpdate_productUpdate_product_productType { hasVariants: boolean; } +export interface ProductUpdate_productUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductUpdate_productUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; +} + +export interface ProductUpdate_productUpdate_product_variants { + __typename: "ProductVariant"; + price: ProductUpdate_productUpdate_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductUpdate_productUpdate_product_category { __typename: "Category"; id: string; @@ -143,42 +174,12 @@ export interface ProductUpdate_productUpdate_product_images { url: string; } -export interface ProductUpdate_productUpdate_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; -} - -export interface ProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: ProductUpdate_productUpdate_product_variants_price | null; - margin: number | null; - stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface ProductUpdate_productUpdate_product { __typename: "Product"; id: string; attributes: ProductUpdate_productUpdate_product_attributes[]; productType: ProductUpdate_productUpdate_product_productType; + variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -193,7 +194,6 @@ export interface ProductUpdate_productUpdate_product { publicationDate: any | null; pricing: ProductUpdate_productUpdate_product_pricing | null; images: (ProductUpdate_productUpdate_product_images | null)[] | null; - variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; } export interface ProductUpdate_productUpdate { diff --git a/src/products/types/ProductVariantAttributesFragment.ts b/src/products/types/ProductVariantAttributesFragment.ts index 02d1e7847..5a07c9b09 100644 --- a/src/products/types/ProductVariantAttributesFragment.ts +++ b/src/products/types/ProductVariantAttributesFragment.ts @@ -58,9 +58,21 @@ export interface ProductVariantAttributesFragment_productType { variantAttributes: (ProductVariantAttributesFragment_productType_variantAttributes | null)[] | null; } +export interface ProductVariantAttributesFragment_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantAttributesFragment_variants { + __typename: "ProductVariant"; + price: ProductVariantAttributesFragment_variants_price | null; +} + export interface ProductVariantAttributesFragment { __typename: "Product"; id: string; attributes: ProductVariantAttributesFragment_attributes[]; productType: ProductVariantAttributesFragment_productType; + variants: (ProductVariantAttributesFragment_variants | null)[] | null; } diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index 084a4f3ba..d1320f6c9 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -66,6 +66,37 @@ export interface SimpleProductUpdate_productUpdate_product_productType { hasVariants: boolean; } +export interface SimpleProductUpdate_productUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface SimpleProductUpdate_productUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; +} + +export interface SimpleProductUpdate_productUpdate_product_variants { + __typename: "ProductVariant"; + price: SimpleProductUpdate_productUpdate_product_variants_price | null; + id: string; + sku: string; + name: string; + margin: number | null; + stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface SimpleProductUpdate_productUpdate_product_category { __typename: "Category"; id: string; @@ -143,42 +174,12 @@ export interface SimpleProductUpdate_productUpdate_product_images { url: string; } -export interface SimpleProductUpdate_productUpdate_product_variants_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; -} - -export interface SimpleProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - price: SimpleProductUpdate_productUpdate_product_variants_price | null; - margin: number | null; - stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; -} - export interface SimpleProductUpdate_productUpdate_product { __typename: "Product"; id: string; attributes: SimpleProductUpdate_productUpdate_product_attributes[]; productType: SimpleProductUpdate_productUpdate_product_productType; + variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -193,7 +194,6 @@ export interface SimpleProductUpdate_productUpdate_product { publicationDate: any | null; pricing: SimpleProductUpdate_productUpdate_product_pricing | null; images: (SimpleProductUpdate_productUpdate_product_images | null)[] | null; - variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; } export interface SimpleProductUpdate_productUpdate { diff --git a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx index 2002008db..807631002 100644 --- a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx +++ b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx @@ -51,7 +51,7 @@ const ProductVariantCreator: React.FC = ({ })} /> Date: Tue, 16 Jun 2020 15:19:30 +0200 Subject: [PATCH 031/294] update snapshots --- .../__snapshots__/Stories.test.ts.snap | 512 +----------------- 1 file changed, 6 insertions(+), 506 deletions(-) diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 50d81bc57..53224126f 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -111266,111 +111266,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- NZD -
-
- -
-

- Invalid value -

-
-
-
-
-
@@ -112832,106 +112727,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- NZD -
-
- -
-
-
-
-
-
@@ -114708,7 +114503,7 @@ Ctrl + K" min="0" name="basePrice" type="number" - value="339.39" + value="678.78" />
- NZD + USD
- NZD + USD
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- NZD -
-
- -
-
-
-
-
-
@@ -119591,101 +119286,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- - - -
-
-
-
-
-
@@ -121266,106 +120866,6 @@ Ctrl + K"
-
-
- - Pricing - -
-
-
- -
-
-
-
-
- -
- -
-
- NZD -
-
- -
-
-
-
-
-
@@ -123142,7 +122642,7 @@ Ctrl + K" min="0" name="basePrice" type="number" - value="339.39" + value="678.78" />
- NZD + USD
Date: Tue, 16 Jun 2020 18:42:56 +0200 Subject: [PATCH 032/294] Update translations --- locale/ar.json | 93 +-- locale/az.json | 47 +- locale/bg.json | 47 +- locale/bn.json | 47 +- locale/ca.json | 47 +- locale/cs.json | 47 +- locale/da.json | 47 +- locale/de.json | 47 +- locale/defaultMessages.json | 2 +- locale/el.json | 47 +- locale/es.json | 47 +- locale/es_CO.json | 47 +- locale/et.json | 47 +- locale/fa.json | 47 +- locale/fr.json | 223 ++++---- locale/hi.json | 47 +- locale/hu.json | 47 +- locale/hy.json | 47 +- locale/id.json | 47 +- locale/is.json | 47 +- locale/it.json | 47 +- locale/ja.json | 47 +- locale/ko.json | 47 +- locale/mn.json | 121 ++-- locale/nb.json | 47 +- locale/nl.json | 47 +- locale/pl.json | 57 +- locale/pt.json | 255 +++++---- locale/pt_BR.json | 47 +- locale/ro.json | 47 +- locale/ru.json | 161 +++--- locale/sk.json | 65 ++- locale/sl.json | 47 +- locale/sq.json | 47 +- locale/sr.json | 47 +- locale/sv.json | 47 +- locale/th.json | 47 +- locale/tr.json | 75 +-- locale/uk.json | 1079 ++++++++++++++++++----------------- locale/vi.json | 47 +- locale/zh-Hans.json | 633 ++++++++++---------- locale/zh-Hant.json | 47 +- 42 files changed, 2295 insertions(+), 1926 deletions(-) diff --git a/locale/ar.json b/locale/ar.json index 7e2c6a727..b24a869f0 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -560,7 +560,7 @@ }, "src_dot_back": { "context": "button", - "string": "Back" + "string": "عودة" }, "src_dot_cancel": { "context": "button", @@ -738,11 +738,11 @@ }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_1815688500": { "context": "collection", - "string": "since {date}" + "string": "منذ {date}" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_2001551496": { "context": "collection", - "string": "will be visible from {date}" + "string": "ستكون ظاهر من {date}" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_946315389": { "string": "أضف عنوان محرك البحث و وصفه لتسهيل العثور على هذه الفئة" @@ -753,11 +753,11 @@ }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_1815688500": { "context": "collection", - "string": "since {date}" + "string": "منذ {date}" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_2001551496": { "context": "collection", - "string": "will be visible from {date}" + "string": "ستكون ظاهر من {date}" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_2906897537": { "context": "switch button", @@ -1076,7 +1076,7 @@ }, "src_dot_components_dot_ErrorPage_dot_1723676032": { "context": "button", - "string": "Back to home" + "string": "العودة إلى الصفحة الرئيسية" }, "src_dot_components_dot_ErrorPage_dot_2736139139": { "string": "Ooops!..." @@ -1114,7 +1114,7 @@ }, "src_dot_components_dot_Filter_dot_2683154806": { "context": "is filter range or value", - "string": "equal to" + "string": "يساوي" }, "src_dot_components_dot_Filter_dot_2779594451": { "context": "filter range separator", @@ -1126,7 +1126,7 @@ }, "src_dot_components_dot_Filter_dot_773313536": { "context": "is filter range or value", - "string": "between" + "string": "ما بين" }, "src_dot_components_dot_Filter_dot_996289613": { "string": "فلاتر" @@ -1145,7 +1145,7 @@ }, "src_dot_components_dot_MoneyRange_dot_12301532": { "context": "money", - "string": "to {money}" + "string": "إلى {money}" }, "src_dot_components_dot_MoneyRange_dot_1316359951": { "context": "money", @@ -1153,7 +1153,7 @@ }, "src_dot_components_dot_MoneyRange_dot_3729849657": { "context": "money", - "string": "from {money}" + "string": "من {money}" }, "src_dot_components_dot_MultiAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", @@ -1406,19 +1406,19 @@ }, "src_dot_components_dot_WeightRange_dot_264731940": { "context": "weight", - "string": "to {value} {unit}" + "string": "إلى {unit} {value}" }, "src_dot_components_dot_WeightRange_dot_2892071052": { "context": "weight", - "string": "{fromValue} {fromUnit} - {toValue} {toUnit}" + "string": "{toValue} {toUnit} - {fromValue} {fromUnit}" }, "src_dot_components_dot_WeightRange_dot_4256193688": { "context": "weight", - "string": "from {value} {unit}" + "string": "من {unit} {value}" }, "src_dot_components_dot_Weight_dot_2781622322": { "context": "weight", - "string": "{value} {وحدات}" + "string": "إلى {unit} {value}" }, "src_dot_configuration": { "context": "configuration section name", @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "الوصف" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "وحدة حفظ الأوراق المالية" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "خصم" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "المجموع" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "وحدة حفظ الأوراق المالية" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "المجموع" @@ -2902,14 +2918,14 @@ }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1815688500": { "context": "page", - "string": "since {date}" + "string": "منذ {date}" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1996767833": { "string": "أضف عنوان محرك البحث و وصفه لتسهيل العثور على هذه الصفحة" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_2001551496": { "context": "page", - "string": "will be visible from {date}" + "string": "ستكون ظاهر من {date}" }, "src_dot_pages_dot_components_dot_PageInfo_dot_1116746286": { "context": "page content", @@ -3460,11 +3476,11 @@ }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_1815688500": { "context": "product", - "string": "since {date}" + "string": "منذ {date}" }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_2001551496": { "context": "product", - "string": "will be visible from {date}" + "string": "ستكون ظاهر من {date}" }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_2706108815": { "string": "أضف عنوان محرك البحث و وصفه لتسهيل العثور على هذا المنتج" @@ -3522,7 +3538,7 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_available": { "context": "product status", - "string": "Available" + "string": "متوفر" }, "src_dot_products_dot_components_dot_ProductListPage_dot_hidden": { "context": "product is hidden", @@ -3621,27 +3637,24 @@ "context": "header", "string": "عدد" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_1815688500": { "context": "product", - "string": "since {date}" + "string": "منذ {date}" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2001551496": { "context": "product", - "string": "will be visible from {date}" + "string": "ستكون ظاهر من {date}" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2706108815": { "string": "أضف عنوان محرك البحث و وصفه لتسهيل العثور على هذا المنتج" @@ -3671,7 +3684,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_168343345": { "context": "variant attribute", - "string": "Attribute" + "string": "ميزة" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_1808330403": { "context": "variant attribute", @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "متغير" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4083,7 +4089,7 @@ }, "src_dot_services_dot_components_dot_ServiceList_dot_3239722049": { "context": "account status", - "string": "inactive" + "string": "غير فعال" }, "src_dot_services_dot_components_dot_ServiceList_dot_636461959": { "context": "service name", @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/az.json b/locale/az.json index 16324901d..7e7f16b19 100644 --- a/locale/az.json +++ b/locale/az.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Ətraflı məlumat" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Miqdarı" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/bg.json b/locale/bg.json index d7b5b95b4..f3fe78a64 100644 --- a/locale/bg.json +++ b/locale/bg.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Описание" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Отстъпка" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Субсидирана сума" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Тотал" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Тотал" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Количество" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Вариант" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/bn.json b/locale/bn.json index bc6bd4948..8598dc63b 100644 --- a/locale/bn.json +++ b/locale/bn.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "বিবরণ" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "পরিমাণ" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/ca.json b/locale/ca.json index f203728b1..26dcd7956 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descripció" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Descompte" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Quantitat pre-autoritzada" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Quantitat" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/cs.json b/locale/cs.json index 40d8ad92f..1a5e089f2 100644 --- a/locale/cs.json +++ b/locale/cs.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Popis" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Zrušit zpracování" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Sleva" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Paušální částka" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Celkem" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Celkem" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Množství" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Varianta" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/da.json b/locale/da.json index f8501b365..81c0add82 100644 --- a/locale/da.json +++ b/locale/da.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Beskrivelse" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Annuller pakning" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Rabat" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preautoriseret beløb" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Kvantitet" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/de.json b/locale/de.json index 855fccecc..b74e76f13 100644 --- a/locale/de.json +++ b/locale/de.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Löschen" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Beschreibung" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "Artikelnummer" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Auftragsabwicklung abbrechen" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Rabatt" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Autorisierter Betrag" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Gesamtsumme" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Produkt erstellen" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "Artikelnummer" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Gesamtsumme" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Menge" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variante" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Produkt erstellen" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 988d08276..6a898913a 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, diff --git a/locale/el.json b/locale/el.json index 46d182355..172ea2bda 100644 --- a/locale/el.json +++ b/locale/el.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Περιγραφή" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Έκπτωση" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Προεγκεκριμένο ποσό" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Σύνολο" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Σύνολο" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Ποσότητα" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Παραλλαγή" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/es.json b/locale/es.json index 9a388d9eb..ad5bbd0d0 100644 --- a/locale/es.json +++ b/locale/es.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Opcional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Opcional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Borrar" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descripción" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "({quantity}) cancelados" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancelar envío" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Saldo pendiente" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Descuento" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Monto preautorizado" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Crear producto" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Buscar por nombre de producto, atributo, tipo de producto, etc." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Agregar Producto" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Buscar Productos" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "No cumplido ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Cantidad" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "Este producto no tiene stock. Puedes agregarlo aquí." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Editar almacenes" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Seguimiento de inventario" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "El seguimiento de inventario activo calculará automáticamente los cambios de stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variante" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Editar almacenes" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Seleccione los almacenes que tienen el producto seleccionado." - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Crear producto" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Crear cuenta de servicio" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Métodos de envío" diff --git a/locale/es_CO.json b/locale/es_CO.json index ef4ada859..a2ec729f5 100644 --- a/locale/es_CO.json +++ b/locale/es_CO.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descripción" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Cantidad" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/et.json b/locale/et.json index ede6f6401..fadf1025d 100644 --- a/locale/et.json +++ b/locale/et.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Valikuline" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Valikuline" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Kirjeldus" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "Tootekood" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Tühista Saadetis" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Allahindlus" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Eelnevalt kinnitatud summa" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Kokku" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Lisa Toode" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Otsi tooteid" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Täitmata ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "Tootekood" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Kokku" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Kogus" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/fa.json b/locale/fa.json index 733529938..e99e528b1 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "حذف" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "توضیحات" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "واحد انبار داری" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "لغو پردازش" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "تراز" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "تخفیف" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "مقدار پیش پرداخت" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "مجموع کل" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "ایجاد محصول" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "افزودن محصول" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "واحد انبار داری" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "مجموع کل" @@ -3621,17 +3637,14 @@ "context": "header", "string": "تعداد" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "نوع" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "ایجاد محصول" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "ساخت حساب خدمت" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "روش ارسال" diff --git a/locale/fr.json b/locale/fr.json index 1f3dd7122..af8f2168e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -13,7 +13,7 @@ "string": "Gérer et ajouter des pages" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "Gérez vos groupes de permissions et leurs permissions" }, "configurationMenuProductTypes": { "string": "Définir les types de produits vendu" @@ -31,7 +31,7 @@ "string": "Gérer les taxes de votre magasin" }, "configurationMenuWarehouses": { - "string": "Manage and update your warehouse information" + "string": "Gérez et mettez à jour les informations de votre entrepôt" }, "configurationPluginsPages": { "string": "Visualiser et mettre à jour vos plugins et leurs paramètres " @@ -244,13 +244,13 @@ }, "productVariantCreatorWarehouseSectionHeader": { "context": "header", - "string": "Warehouses" + "string": "Entrepôts" }, "productVariantPriceOptionalCostPriceField": { "context": "optional field", "string": "Optionnel" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optionnel" }, @@ -288,7 +288,7 @@ }, "shippingZoneWarehouses_dot_autocomplete_dot_label": { "context": "autocomplete select label", - "string": "Warehouse" + "string": "Entrepôt" }, "siteSettingsMailingHelperText": { "context": "helper text", @@ -296,17 +296,17 @@ }, "src_dot_accept": { "context": "button", - "string": "Accept" + "string": "J'accepte" }, "src_dot_attributes": { "context": "attributes section name", "string": "Attributs" }, "src_dot_attributes_dot_attributeSlugUnique": { - "string": "Attribute with this slug already exists" + "string": "L'attribut avec ce slug existe déjà" }, "src_dot_attributes_dot_attributeValueAlreadyExists": { - "string": "This value already exists within this attribute" + "string": "Cette valeur existe déjà dans cet attribut" }, "src_dot_attributes_dot_components_dot_AttributeBulkDeleteDialog_dot_1184518529": { "context": "dialog content", @@ -913,19 +913,19 @@ "string": "Effacer les collections" }, "src_dot_components_dot_AccountPermissionGroups_dot_2836633439": { - "string": "Permission groups" + "string": "Groupes de permissions" }, "src_dot_components_dot_AccountPermissions_dot_2690176844": { "context": "dialog header", - "string": "Droits" + "string": "Permissions" }, "src_dot_components_dot_AccountPermissions_dot_2731975416": { "context": "card section description", - "string": "Available permissions" + "string": "Permissions disponibles" }, "src_dot_components_dot_AccountPermissions_dot_2853621891": { "context": "exceeded permissions description", - "string": "This groups permissions exceeds your own. You are able only to manage permissions that you have." + "string": "Les permissions de ce groupe dépassent les vôtres. Vous ne pouvez gérer que les permissions dont vous disposez." }, "src_dot_components_dot_AccountPermissions_dot_3674526441": { "context": "permission list item description", @@ -1237,7 +1237,7 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_createPermissionGroup": { "context": "button", - "string": "Create Permission Group" + "string": "Créer un groupe de permissions" }, "src_dot_components_dot_Navigator_dot_modes_dot_createProduct": { "context": "button", @@ -1428,7 +1428,7 @@ "string": "Divers" }, "src_dot_configuration_dot_1440737903": { - "string": "Shipping Settings" + "string": "Paramètres de livraison" }, "src_dot_configuration_dot_1639245766": { "string": "Consultez et modifiez les Webhooks et leurs paramètres" @@ -1675,6 +1675,10 @@ "context": "button", "string": "Effacer" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Description" }, @@ -2227,7 +2231,7 @@ }, "src_dot_ok": { "context": "button", - "string": "OK" + "string": "D'accord" }, "src_dot_optionalField": { "context": "field is optional", @@ -2257,7 +2261,7 @@ }, "src_dot_orders_dot_components_dot_OrderCannotCancelOrderDialog_dot_1561587911": { "context": "dialog header", - "string": "Saleor couldn’t cancel order" + "string": "Saleor n'a pas pu annuler la commande" }, "src_dot_orders_dot_components_dot_OrderCannotCancelOrderDialog_dot_775268031": { "string": "There are still fulfillments created for this order. Cancel the fulfillments first before you cancel the order." @@ -2443,11 +2447,11 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_2588284040": { "context": "no variant stock in warehouse", - "string": "No Stock" + "string": "Pas de stock" }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_3244948255": { "context": "header", - "string": "Items ready to ship" + "string": "Articles prêts à être expédiés" }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_3620521256": { "context": "page header", @@ -2462,7 +2466,7 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_580490159": { "context": "page header with order number", - "string": "Order #{orderNumber}" + "string": "Commande #{orderNumber}" }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_693960049": { "context": "product's sku", @@ -2473,7 +2477,7 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillmentCancelDialog_dot_46197273": { "context": "select warehouse to restock items", - "string": "Select Warehouse" + "string": "Sélectionner un entrepôt" }, "src_dot_orders_dot_components_dot_OrderFulfillmentCancelDialog_dot_732594284": { "context": "dialog header", @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "UGS (Unité de Gestion de Stock)" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Annuler le traitement" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Solde exceptionnel " }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Remise" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Montant pré-autorisé" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Créer produit" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "UGS {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Recherche par nom de produit, attribut, type de produit, etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Ajouter un produit" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Rechercher dans les produits" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Non traitées ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "UGS (Unité de Gestion de Stock)" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -2848,7 +2864,7 @@ }, "src_dot_orders_dot_views_dot_OrderDetails_dot_580490159": { "context": "window title", - "string": "Order #{orderNumber}" + "string": "Commande #{orderNumber}" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_617145655": { "string": "La méthode de livraison a été mise à jour avec succès" @@ -2858,7 +2874,7 @@ }, "src_dot_orders_dot_views_dot_OrderDetails_dot_694622335": { "context": "window title", - "string": "Draft Order #{orderNumber}" + "string": "Commande brouillonne #{orderNumber}" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_927945225": { "string": "Le traitement a été annulé" @@ -3029,7 +3045,7 @@ }, "src_dot_permissionGroups": { "context": "permission groups section name", - "string": "Permission Groups" + "string": "Groupes de permissions" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1004218338": { "context": "staff member status", @@ -3037,25 +3053,25 @@ }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1731102929": { "context": "button", - "string": "Assign" + "string": "Affecter" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_2986043376": { "context": "dialog header", - "string": "Assign Staff Members" + "string": "Affecter des membres du personnel" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_3111990517": { - "string": "Search by name, email, etc..." + "string": "Recherche par nom, email, etc ..." }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_3247064221": { "context": "staff member status", "string": "Activé" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_3532084010": { - "string": "Search Staff Members" + "string": "Rechercher des membres du personnel" }, "src_dot_permissionGroups_dot_components_dot_MembersErrorDialog_dot_3005518110": { "context": "dialog title", - "string": "Unassign users" + "string": "Annuler l'attribution des utilisateurs" }, "src_dot_permissionGroups_dot_components_dot_MembersErrorDialog_dot_334280454": { "context": "dialog content", @@ -3063,7 +3079,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupCreatePage_dot_3765873075": { "context": "checkbox label", - "string": "Group has full access to the store" + "string": "Le groupe a un accès complet au magasin" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupCreatePage_dot_3920591233": { "context": "card description", @@ -3075,7 +3091,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_3528974446": { "context": "dialog title", - "string": "Delete permission group" + "string": "Supprimer le groupe de permissions" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_956177443": { "context": "deletion error message", @@ -3083,7 +3099,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDetailsPage_dot_3765873075": { "context": "checkbox label", - "string": "Group has full access to the store" + "string": "Le groupe a un accès complet au magasin" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDetailsPage_dot_3920591233": { "context": "card description", @@ -3091,24 +3107,24 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupInfo_dot_2081191949": { "context": "text field label", - "string": "Group name" + "string": "Nom du groupe" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupListPage_dot_613749311": { "context": "button", - "string": "create permission group" + "string": "Créer un groupe de permissions" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_2011544055": { "context": "permission group name", - "string": "Permission Group Name" + "string": "Nom du groupe de permission" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_2734377620": { - "string": "Members" + "string": "Membres" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_4190792473": { "string": "Actions" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_425941108": { - "string": "No permission groups found" + "string": "Aucun groupe de permissions trouvé" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1004218338": { "context": "staff member status", @@ -3119,14 +3135,14 @@ "string": "You haven’t assigned any member to this permission group yet." }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1512872240": { - "string": "No members found" + "string": "Aucun membre trouvé" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1789607185": { "string": "Adresse e-mail" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_2457011428": { "context": "button", - "string": "Assign members" + "string": "Affecter des membres" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_2652621342": { "context": "empty list message", @@ -3138,7 +3154,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_3397233744": { "context": "header", - "string": "Group members" + "string": "Les membres du groupe" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_4190792473": { "string": "Actions" @@ -3149,7 +3165,7 @@ }, "src_dot_permissionGroups_dot_components_dot_UnassignMembersDialog_dot_3005518110": { "context": "dialog title", - "string": "Unassign users" + "string": "Annuler l'attribution des utilisateurs" }, "src_dot_permissionGroups_dot_components_dot_UnassignMembersDialog_dot_778652830": { "context": "dialog content", @@ -3160,14 +3176,14 @@ "string": "Créer une catégorie" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupCreate_dot_3930588328": { - "string": "Permission group created" + "string": "Groupe de permissions créé" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupDetails_dot_870815507": { "context": "button title", "string": "Désassigner" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupList_dot_92979760": { - "string": "Permission Group Deleted" + "string": "Groupe de permission supprimé" }, "src_dot_plugins": { "context": "plugins section name", @@ -3611,27 +3627,24 @@ }, "src_dot_products_dot_components_dot_ProductStocks_dot_2622674857": { "context": "tabel column header", - "string": "Warehouse Name" + "string": "Nom de l'entrepôt" }, "src_dot_products_dot_components_dot_ProductStocks_dot_2729628316": { "context": "tabel column header", - "string": "Quantity Available" + "string": "Quantité disponible" }, "src_dot_products_dot_components_dot_ProductStocks_dot_2796503714": { "context": "header", "string": "Quantité" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Attribuer un entrepôt" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3675,19 +3688,19 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_1808330403": { "context": "variant attribute", - "string": "Select Attribute" + "string": "Sélectionnez un attribut" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2002684673": { "context": "page title", - "string": "Price and SKUs" + "string": "Prix et UGS" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2020618004": { "context": "variant stock, header", - "string": "Stock and Warehousing" + "string": "Stock et entreposage" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2158649399": { "context": "product attribute values, page title", - "string": "Choose Values" + "string": "Choisissez des valeurs" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2478977538": { "context": "attribute values, variant creation step", @@ -3721,7 +3734,7 @@ "string": "Here is the summary of variants that will be created. You can change prices, stocks an SKU for each one created." }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_3896519183": { - "string": "Skip stock for now" + "string": "Ignorer le stock pour l'instant" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_4120989039": { "context": "create multiple variants, button", @@ -3729,7 +3742,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_520980261": { "context": "variant creator summary card header", - "string": "Created Variants" + "string": "Variantes créées" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_551319747": { "string": "Based on your selections we will create {numberOfProducts} products. Use this step to customize price and stocks for your new products" @@ -3819,7 +3832,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_1614793985": { "context": "variant stock status", - "string": "Available inventory at:" + "string": "Inventaire disponible à:" }, "src_dot_products_dot_components_dot_ProductVariants_dot_1721716102": { "context": "button", @@ -3838,7 +3851,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_3203451491": { "context": "filtering option", - "string": "All Warehouses" + "string": "Tous les entrepôts" }, "src_dot_products_dot_components_dot_ProductVariants_dot_3490038570": { "context": "product variant inventory status", @@ -3850,7 +3863,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_4017567521": { "context": "product variant inventory", - "string": "Not stocked" + "string": "non stocké" }, "src_dot_products_dot_components_dot_ProductVariants_dot_693960049": { "string": "UGS (Unité de Gestion de Stock)" @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variation" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Créer produit" @@ -3952,7 +3958,7 @@ }, "src_dot_products_dot_views_dot_ProductVariantCreator_dot_830692292": { "context": "window title", - "string": "Create Variants" + "string": "Créer une variante" }, "src_dot_properties": { "string": "Propriétés" @@ -3962,11 +3968,11 @@ }, "src_dot_readyToCapture": { "context": "order status", - "string": "Ready to capture" + "string": "Prêt à capturer" }, "src_dot_readyToFulfill": { "context": "order status", - "string": "Ready to fulfill" + "string": "Prêt à traitée" }, "src_dot_refunded": { "context": "payment status", @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Créer un compte service" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Méthodes de livraison" @@ -4158,11 +4167,11 @@ "string": "Unité du poids de la livraison " }, "src_dot_shipping_dot_components_dot_ShippingZoneAddWarehouseDialog_dot_2622674857": { - "string": "Warehouse Name" + "string": "Nom de l'entrepôt" }, "src_dot_shipping_dot_components_dot_ShippingZoneAddWarehouseDialog_dot_3173942020": { "context": "header, dialog", - "string": "Create New Warehouse" + "string": "Créer un nouvel entrepôt" }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_1003092716": { "string": "Le reste du monde" @@ -4336,18 +4345,18 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_1221560277": { "context": "section header", - "string": "Warehouse" + "string": "Entrepôt" }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_2304484478": { "context": "button", - "string": "Add New Warehouse" + "string": "Ajouter un nouvel entrepôt" }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_3852102652": { "string": "Select warehouse from which you will ship products for this shipping zone. This warehouse address will also be used to calculate taxes." }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_46197273": { "context": "input placeholder", - "string": "Select Warehouse" + "string": "Sélectionner un entrepôt" }, "src_dot_shipping_dot_components_dot_ShippingZonesListPage_dot_1325966144": { "context": "header", @@ -5031,7 +5040,7 @@ "string": "Authorization key with this type already exists" }, "src_dot_utils_dot_errors_dot_assignNonStaffMember": { - "string": "Only staff members can be assigned" + "string": "Seuls les membres du personnel peuvent être affectés" }, "src_dot_utils_dot_errors_dot_attributeAlreadyAssigned": { "string": "This attribute has already been assigned to this product type" @@ -5044,7 +5053,7 @@ }, "src_dot_utils_dot_errors_dot_billingNotSet": { "context": "error message", - "string": "Billing address is not set" + "string": "L'adresse de facturation n'est pas définie" }, "src_dot_utils_dot_errors_dot_cannotCancelFulfillment": { "context": "error message", @@ -5080,10 +5089,10 @@ "string": "API error" }, "src_dot_utils_dot_errors_dot_invalid": { - "string": "Invalid value" + "string": "Valeur invalide" }, "src_dot_utils_dot_errors_dot_invalidPassword": { - "string": "Invalid password" + "string": "Mot de passe incorrect" }, "src_dot_utils_dot_errors_dot_noShippingAddress": { "context": "error message", @@ -5119,29 +5128,29 @@ }, "src_dot_utils_dot_errors_dot_skuUnique": { "context": "bulk variant create error", - "string": "SKUs must be unique" + "string": "Les UGSs doivent être uniques" }, "src_dot_utils_dot_errors_dot_slugUnique": { "context": "error message", - "string": "Slug must be unique for each warehouse" + "string": "Le slug doit être unique pour chaque entrepôt" }, "src_dot_utils_dot_errors_dot_tooCommon": { - "string": "This password is too commonly used" + "string": "Ce mot de passe est trop couramment utilisé" }, "src_dot_utils_dot_errors_dot_tooShort": { - "string": "This password is too short" + "string": "Ce mot de passe est trop court" }, "src_dot_utils_dot_errors_dot_tooSimilar": { - "string": "These passwords are too similar" + "string": "Ces mots de passe sont trop similaires" }, "src_dot_utils_dot_errors_dot_unique": { - "string": "This needs to be unique" + "string": "Cela doit être unique" }, "src_dot_utils_dot_errors_dot_unknownError": { - "string": "Unknown error" + "string": "Erreur inconnue" }, "src_dot_utils_dot_errors_dot_variantNoDigitalContent": { - "string": "This variant does not have any digital content" + "string": "Cette variante n'a pas de contenu numérique" }, "src_dot_vouchers": { "context": "vouchers section name", @@ -5149,7 +5158,7 @@ }, "src_dot_warehouses": { "context": "warehouses section name", - "string": "Warehouses" + "string": "Entrepôts" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_1967111456": { "context": "warehouse", @@ -5157,39 +5166,39 @@ }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_934572530": { "context": "header", - "string": "Create Warehouse" + "string": "Créer un entrepôt" }, "src_dot_warehouses_dot_components_dot_WarehouseDeleteDialog_dot_1355303260": { "context": "dialog content", - "string": "Are you sure you want to delete {warehouseName}?" + "string": "Etes-vous sûr que vous voulez supprimer {warehouseName}?" }, "src_dot_warehouses_dot_components_dot_WarehouseDeleteDialog_dot_3857661071": { "context": "dialog title", - "string": "Delete Warehouse" + "string": "Supprimer l'entrepôt" }, "src_dot_warehouses_dot_components_dot_WarehouseDetailsPage_dot_1967111456": { "context": "warehouse", "string": "Informations d'adresse" }, "src_dot_warehouses_dot_components_dot_WarehouseInfo_dot_2622674857": { - "string": "Warehouse Name" + "string": "Nom de l'entrepôt" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_2304765290": { - "string": "Search Warehouse" + "string": "Rechercher entrepôt" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_3203451491": { "context": "tab name", - "string": "All Warehouses" + "string": "Tous les entrepôts" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_934572530": { "context": "button", - "string": "Create Warehouse" + "string": "Créer un entrepôt" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_1225932315": { - "string": "Shipping Zones" + "string": "Zones d'expédition" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_3787396469": { - "string": "No warehouses found" + "string": "Aucun entrepôt trouvé" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_4190792473": { "string": "Actions" @@ -5200,14 +5209,14 @@ }, "src_dot_warehouses_dot_components_dot_WarehouseZones_dot_1225932315": { "context": "zones that warehouse sends to", - "string": "Shipping Zones" + "string": "Zones d'expédition" }, "src_dot_warehouses_dot_components_dot_WarehouseZones_dot_2423245141": { - "string": "This warehouse has no shipping zones assigned." + "string": "Cet entrepôt n'a aucune zone de livraison assignée." }, "src_dot_warehouses_dot_views_dot_WarehouseCreate_dot_934572530": { "context": "header", - "string": "Create Warehouse" + "string": "Créer un entrepôt" }, "src_dot_webhooks": { "context": "webhooks section name", @@ -5219,7 +5228,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_216945727": { "context": "delete webhook", - "string": "Are you sure you want to delete this webhook?" + "string": "Voulez-vous vraiment supprimer ce webhook?" }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_2297471173": { "context": "delete webhook", @@ -5322,7 +5331,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhooksDetailsPage_dot_1595053355": { "context": "header", - "string": "Unnamed Webhook Details" + "string": "Détails du Webhook sans nom" }, "src_dot_webhooks_dot_components_dot_WebhooksDetailsPage_dot_408706360": { "context": "header", @@ -5359,7 +5368,7 @@ "string": "Action" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_618422799": { - "string": "Unnamed webhook" + "string": "Webhook sans nom" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_636461959": { "context": "webhook name", diff --git a/locale/hi.json b/locale/hi.json index a5e250f1a..f3f077b97 100644 --- a/locale/hi.json +++ b/locale/hi.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "वर्णन" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "मात्रा" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "प्रकार" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/hu.json b/locale/hu.json index 3c290d844..10727d259 100644 --- a/locale/hu.json +++ b/locale/hu.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Leírás" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Teljesítés elvetése" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Kedvezmény" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Előzetesen jóváhagyott összeg" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Összesen" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Összesen" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Mennyiség" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Változat" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/hy.json b/locale/hy.json index a29ff02d0..2e8dbb7d8 100644 --- a/locale/hy.json +++ b/locale/hy.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Նկարագրություն" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "ՊՊՄ" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Ընդհանուր" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "ՊՊՄ" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Ընդհանուր" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Քանակ" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Տարբերակ" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/id.json b/locale/id.json index 5779b301b..754fcf819 100644 --- a/locale/id.json +++ b/locale/id.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Deskripsi" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Batalkan Pemenuhan" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Diskon" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Jumlah yang diotorisasi" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Jumlah" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variasi" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/is.json b/locale/is.json index cd6e0a130..8b30ddafa 100644 --- a/locale/is.json +++ b/locale/is.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Lýsing" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "VN" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Afsláttur" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Samtals" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "VN" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Samtals" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Magn" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Afbrigði" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/it.json b/locale/it.json index 57e9cd47d..26effc63a 100644 --- a/locale/it.json +++ b/locale/it.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Facoltativo" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Facoltativo" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Elimina" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descrizione" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Annulla evasione " @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Saldo in sospeso" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Sconto" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Importo pre-autorizzato" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Totale" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Crea Prodotto" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Cerca per nome prodotto, attributo, tipologia di prodotto, etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Cerca Prodotti" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Non evasi ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Totale" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Quantità" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variante" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Crea Prodotto" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Crea Account Servizio" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Metodi di Spedizione" diff --git a/locale/ja.json b/locale/ja.json index 90538e721..1d92e4889 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "説明" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "割引" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "合計" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "合計" @@ -3621,17 +3637,14 @@ "context": "header", "string": "数量" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/ko.json b/locale/ko.json index 424004e93..bbe560655 100644 --- a/locale/ko.json +++ b/locale/ko.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "삭제" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "설명" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "재고 관리 코드" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "할인" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "사전승인된 금액" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "합계" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "재고 관리 코드" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "합계" @@ -3621,17 +3637,14 @@ "context": "header", "string": "수량" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "옵션" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/mn.json b/locale/mn.json index 974a80f3e..3c8a27d8e 100644 --- a/locale/mn.json +++ b/locale/mn.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Заавал биш" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Заавал биш" }, @@ -292,7 +292,7 @@ }, "siteSettingsMailingHelperText": { "context": "helper text", - "string": "Mailing Configuration" + "string": "Имэйлийн тохиргоо" }, "src_dot_accept": { "context": "button", @@ -369,11 +369,11 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_filterableInDashboard": { "context": "use attribute in filtering", - "string": "Filterable in Dashboard" + "string": "Dashboard дээрээс шүүх боломжтой" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_filterableInStorefront": { "context": "use attribute in filtering", - "string": "Filterable in Storefront" + "string": "Storefront дээрээс шүүх боломжтой" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_isVariantOnly": { "context": "attribute can be used only in variants", @@ -1106,7 +1106,7 @@ "string": "Хайлтыг хадгалах" }, "src_dot_components_dot_FilterCard_dot_996289613": { - "string": "Filters" + "string": "Шүүлтүүр" }, "src_dot_components_dot_Filter_dot_2332404293": { "context": "search", @@ -1129,11 +1129,11 @@ "string": "хооронд" }, "src_dot_components_dot_Filter_dot_996289613": { - "string": "Filters" + "string": "Шүүлтүүр" }, "src_dot_components_dot_ImageUpload_dot_1731007575": { "context": "image upload", - "string": "Drop here to upload" + "string": "Энд файлаа хуулна уу" }, "src_dot_components_dot_LanguageSwitch_dot_4150219184": { "context": "button", @@ -1609,7 +1609,7 @@ }, "src_dot_customers_dot_components_dot_CustomerOrders_dot_2889196282": { "context": "number of order", - "string": "No. of Order" + "string": "Захиалгын дугаар" }, "src_dot_customers_dot_components_dot_CustomerOrders_dot_3029139173": { "context": "button", @@ -1675,6 +1675,10 @@ "context": "button", "string": "Устгах" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Тайлбар" }, @@ -1912,11 +1916,11 @@ "string": "Код үүсгэх" }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_2215544659": { - "string": "Limit number of times this discount can be used in total" + "string": "Нийт ашиглах боломжтой тоо" }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_3459612469": { "context": "limit voucher", - "string": "Limit to one use per customer" + "string": "1 хэрэглэгчийн ашиглах хязгаар" }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_3751756157": { "context": "voucher usage limit, header", @@ -1924,7 +1928,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_557552777": { "context": "voucher", - "string": "Limit of Uses" + "string": "Ашиглах хязгаар" }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_1112241061": { "context": "tab name", @@ -2162,7 +2166,7 @@ }, "src_dot_done": { "context": "button", - "string": "Done" + "string": "Дууссан" }, "src_dot_draft": { "context": "order status", @@ -2170,10 +2174,10 @@ }, "src_dot_draftOrders": { "context": "draft orders section name", - "string": "Draft Orders" + "string": "Ноорог захиалгууд" }, "src_dot_drafts": { - "string": "Drafts" + "string": "Нооргууд" }, "src_dot_edit": { "context": "button", @@ -2193,7 +2197,7 @@ }, "src_dot_fulfilled": { "context": "order status", - "string": "Fulfilled" + "string": "Биелүүлсэн" }, "src_dot_generalInformations": { "string": "Ерөнхий мэдээлэл" @@ -2357,7 +2361,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_1161061962": { "context": "dialog header", - "string": "Finalize Draft Order" + "string": "Ноорог захиалгыг дуусгах" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_1297434244": { "string": "No user information" @@ -2370,7 +2374,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_2725265632": { "context": "button", - "string": "Finalize" + "string": "Дуусгах" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_2824936338": { "string": "Shipping method provided, but no product requires it" @@ -2383,7 +2387,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_678764806": { "context": "button", - "string": "Finalize anyway" + "string": "Дуусгах" }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_2826235371": { "context": "button", @@ -2408,7 +2412,7 @@ "string": "Биелэгдээхгүй захиалгууд олдсонгүй" }, "src_dot_orders_dot_components_dot_OrderDraftList_dot_2889196282": { - "string": "No. of Order" + "string": "Захиалгын дугаар" }, "src_dot_orders_dot_components_dot_OrderDraftList_dot_3426593715": { "string": "Хэрэглэгч" @@ -2427,7 +2431,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftPage_dot_2725265632": { "context": "button", - "string": "Finalize" + "string": "Дуусгах" }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_1608534452": { "context": "page header", @@ -2439,7 +2443,7 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_2095687440": { "context": "fulfill order, button", - "string": "Fulfill" + "string": "Биелүүлэх" }, "src_dot_orders_dot_components_dot_OrderFulfillPage_dot_2588284040": { "context": "no variant stock in warehouse", @@ -2526,12 +2530,16 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_3494686506": { "context": "section header", - "string": "Fulfilled ({quantity})" + "string": "Биелүүлсэн ({quantity})" }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_4039425374": { "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2550,7 +2558,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1521936480": { "context": "order history message", - "string": "Fulfilled {quantity} items" + "string": "Биелүүлэгдсэн {quantity} ширхэг захиалга байна" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1527620381": { "context": "order history message", @@ -2562,7 +2570,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1867847329": { "context": "order history message", - "string": "Links to the order's digital goods were sent" + "string": "Дижитал бүтээгдэхүүнийг ашиглах заавар хэрэглэгч рүү илгээгдсэн" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1964864749": { "context": "order history message", @@ -2598,11 +2606,11 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_3081292385": { "context": "order history message", - "string": "Fulfillment confirmation was sent to customer" + "string": "Захиалга баталгаажсан тухай хэрэглэгчид мэдэгдсэн" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_3095247195": { "context": "order history message", - "string": "Draft order was created" + "string": "Ноорог захиалга амжилттай үүсгэгдлээ" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_3328124376": { "context": "order history message", @@ -2667,14 +2675,14 @@ "string": "Үүсгэгдлээ" }, "src_dot_orders_dot_components_dot_OrderList_dot_1198046928": { - "string": "Fulfillment status" + "string": "Төлөв" }, "src_dot_orders_dot_components_dot_OrderList_dot_2743232155": { "context": "payment status", "string": "Төлбөр" }, "src_dot_orders_dot_components_dot_OrderList_dot_2889196282": { - "string": "No. of Order" + "string": "Захиалгын дугаар" }, "src_dot_orders_dot_components_dot_OrderList_dot_3426593715": { "context": "e-mail or full name", @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Үлдэгдэл" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Хямдрал" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Нийт" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Бүтээгдэхүүн үүсгэх" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Бүтээгдэхүүнүүдээс хайх" }, @@ -2799,7 +2811,7 @@ }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_2095687440": { "context": "button", - "string": "Fulfill" + "string": "Биелүүлэх" }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_2796503714": { "context": "ordered products", @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Нийт" @@ -2817,13 +2833,13 @@ "string": "Payment successfully captured" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_1435191432": { - "string": "Draft order successfully finalized" + "string": "Ноорог захиалгыг амжилттай дуусгалаа" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_1468420349": { "string": "Order line deleted" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_1475565380": { - "string": "Fulfillment successfully updated" + "string": "Амжилттай шинэчлэгдлээ" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_1632861387": { "string": "Order line updated" @@ -2838,7 +2854,7 @@ "string": "Захиалга амжилттай цуцлагдлаа" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_3178394068": { - "string": "Note successfully added" + "string": "Амжилттай нэмэгдлээ" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_3280942553": { "string": "Order payment successfully voided" @@ -2861,7 +2877,7 @@ "string": "Draft Order #{orderNumber}" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_927945225": { - "string": "Fulfillment successfully cancelled" + "string": "Амжилттай цуцлагдаа" }, "src_dot_orders_dot_views_dot_OrderDraftList_dot_1161115149": { "context": "dialog header", @@ -3621,17 +3637,14 @@ "context": "header", "string": "Тоо хэмжээ" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Бүтээгдэхүүн үүсгэх" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" @@ -4465,7 +4474,7 @@ "string": "No keys" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_1124962330": { - "string": "Mailing email address" + "string": "Имэйл хаяг" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_1672275992": { "context": "email sender", @@ -4473,7 +4482,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "Имэйлийн тохиргоо" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_297689661": { "string": "Configurate your email address from which all automatic emails will be sent to your customers." @@ -4488,7 +4497,7 @@ "string": "Веб Хаяг" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_70179174": { - "string": "Mailing email sender" + "string": "Илгээгч" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_1004240342": { "string": "This adress will be used to generate invoices and calculate shipping rates." @@ -4506,7 +4515,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "Имэйлийн тохиргоо" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_3657173399": { "string": "Таны энд оруулсан имэйл хаягийг таны харилцагчдын холбоо барих хаяг болгон ашиглах болно." @@ -4830,7 +4839,7 @@ }, "src_dot_translations_dot_components_dot_TranslationFields_dot_363646127": { "context": "button", - "string": "Discard" + "string": "Болих" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_3793796047": { "string": "No translation yet" diff --git a/locale/nb.json b/locale/nb.json index 86a1af60a..c996e9d99 100644 --- a/locale/nb.json +++ b/locale/nb.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Valgfritt" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Valgfritt" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Slett" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Beskrivelse" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Kanseller forsendelse" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Utestående beløp" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Rabatt" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Forhåndsautorisert beløp" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Opprett Produkt" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Søk etter produktnavn, attributt, produkttype, osv..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Søk i Produkter" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Ikke sendt ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Antall" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Opprett Produkt" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Opprett Servicekonto" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Fraktmetoder" diff --git a/locale/nl.json b/locale/nl.json index 8fbe1e3c9..016ce9b57 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Verwijder" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Omschrijving" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Korting" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Vooraf goedgekeurd bedrag" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Totaal" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Totaal" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Hoeveelheid" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Productversie" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/pl.json b/locale/pl.json index 876068bb8..5742b9790 100644 --- a/locale/pl.json +++ b/locale/pl.json @@ -4,19 +4,19 @@ "string": "Anuluj zamówienie" }, "configurationMenuAttributes": { - "string": "Determine attributes used to create product types" + "string": "Określa atrybuty do stworzenia produktu" }, "configurationMenuNavigation": { - "string": "Define how users can navigate through your store" + "string": "Zdefiniuj jak użytkownicy mogą poruszać się po twoim sklepie" }, "configurationMenuPages": { - "string": "Manage and add additional pages" + "string": "Zarządzaj i dodaj nowe strony" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "Zarządzaj grupami uprawnień i ich uprawnieniami" }, "configurationMenuProductTypes": { - "string": "Define types of products you sell" + "string": "Definiuje typy produktów, które sprzedajesz" }, "configurationMenuShipping": { "string": "Manage how you ship out orders" @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Usuń" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Opis" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Anuluj realizację" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Zniżka" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Kwota zablokowana" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Suma" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Suma" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Ilość" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Wariant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/pt.json b/locale/pt.json index 3ce20c904..e8f1f258c 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -4,88 +4,88 @@ "string": "Cancelar Pedido" }, "configurationMenuAttributes": { - "string": "Determine attributes used to create product types" + "string": "Identifique atributos usados para criar tipos de produtos" }, "configurationMenuNavigation": { - "string": "Define how users can navigate through your store" + "string": "Defina com os utilizadores navegam pela loja" }, "configurationMenuPages": { - "string": "Manage and add additional pages" + "string": "Modifique e adicione páginas adicionais" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "Modifique grupos e as suas permissões" }, "configurationMenuProductTypes": { - "string": "Define types of products you sell" + "string": "Defina os tipos de produtos que vende" }, "configurationMenuShipping": { - "string": "Manage how you ship out orders" + "string": "Defina como envia as encomendas" }, "configurationMenuSiteSettings": { - "string": "View and update your site settings" + "string": "Veja e edite as opções do site" }, "configurationMenuStaff": { - "string": "Manage your employees and their permissions" + "string": "Defina empregados e as suas permissões" }, "configurationMenuTaxes": { - "string": "Manage how your store charges tax" + "string": "Defina como a loja gere os impostos" }, "configurationMenuWarehouses": { - "string": "Manage and update your warehouse information" + "string": "Defina a informação de armazém" }, "configurationPluginsPages": { - "string": "View and update your plugins and their settings." + "string": "Veja e edite os plugins e as suas opções" }, "homeActivityCardHeader": { "context": "header", - "string": "Activity" + "string": "Actividade" }, "homeActivityCardNoActivities": { - "string": "No activities found" + "string": "Nenhuma actividade encontrada" }, "homeAnalyticsCardHeader": { "string": "Hoje" }, "homeHeaderText": { "context": "header", - "string": "Hello there, {userName}" + "string": "Olá, {userName}" }, "homeHeaderTextCaption": { "context": "subheader", - "string": "Here is some information we gathered about your store" + "string": "Aqui está alguma informação que reunimos acerca da sua loja" }, "homeNotificationTableNoOrders": { - "string": "No orders ready to fulfill" + "string": "Nenhum pedido pronto a ser realizado" }, "homeNotificationTableOrders": { - "string": "{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}" + "string": "{amount, plural,one {Um pedido pronto a ser realizado} other {{amount} Pedidos prontos a serem realizados.}}" }, "homeNotificationTablePayments": { - "string": "{amount, plural,one {One payment to capture} other {{amount} Payments to capture}}" + "string": "{amount, plural,one {Um pagamento a capturar} other {{amount} Pagamentos a capturar}}" }, "homeNotificationTableProducts": { - "string": "{amount, plural,one {One product out of stock} other {{amount} Products out of stock}}" + "string": "{amount, plural,one {Um produto esgotado} other {{amount} Produtos esgotados}}" }, "homeNotificationsNoPayments": { - "string": "No payments waiting for capture" + "string": "Nenhum pagamento a capturar" }, "homeNotificationsTableNoProducts": { - "string": "No products out of stock" + "string": "Nenhum produto esgotado" }, "homeProductListCardOrders": { "context": "number of ordered products", - "string": "{amount, plural,one {One ordered} other {{amount} Ordered}}" + "string": "{amount, plural,one {Um pedido} other {{amount} Pedidos}}" }, "homeProductsListCardHeader": { "context": "header", - "string": "Top Products" + "string": "Top de produtos" }, "homeProductsListCardNoProducts": { - "string": "No products found" + "string": "Nenhum produto encontrado" }, "homeScreenDisclaimer": { "context": "header", - "string": "Disclaimer" + "string": "Aviso legal" }, "homeScreenDisclaimerText1": { "string": "The new dashboard and the GraphQL API are preview-quality software." @@ -95,21 +95,21 @@ }, "homeScreenHeader": { "context": "header", - "string": "Hello there, {userName}" + "string": "Olá, {userName}" }, "menuCreateDialogHeader": { "context": "dialog header", - "string": "Create Menu" + "string": "Criar Menu" }, "menuCreateDialogMenuTitleLabel": { - "string": "Menu Title" + "string": "Título do Menu" }, "menuDetailsDeleteMenuContent": { - "string": "Are you sure you want to delete menu {menuName}?" + "string": "Tem a certeza que pretende apagar o menu {menuName}?" }, "menuDetailsDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Apagar Menu" }, "menuDetailsPageHelperText": { "string": "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" @@ -120,7 +120,7 @@ }, "menuItemDialogAddLink": { "context": "add link to navigation", - "string": "Link to: {url}" + "string": "Link para: {url}" }, "menuItemDialogEditItem": { "context": "edit menu item, header", @@ -131,7 +131,7 @@ "string": "Link" }, "menuItemDialogLinkPlaceholder": { - "string": "Start typing to begin search..." + "string": "Escreva para começar a procura..." }, "menuItemDialogNameLabel": { "context": "menu item name", @@ -156,7 +156,7 @@ }, "menuListDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Apagar Menu" }, "menuListDeleteMenusContent": { "string": "{counter,plural,one {Are you sure you want to delete this menu?} other {Are you sure you want to delete {displayQuantity} menus?}}" @@ -173,17 +173,17 @@ "string": "Items" }, "menuListMenutitle": { - "string": "Menu Title" + "string": "Título do Menu" }, "menuListNoMenus": { "string": "No menus found" }, "menuListPageAddMenu": { "context": "button", - "string": "Create Menu" + "string": "Criar Menu" }, "menuPropertiesMenuTitle": { - "string": "Menu Title" + "string": "Título do Menu" }, "orderCustomerBillingAddressNotSet": { "context": "no address is set in draft order", @@ -215,11 +215,11 @@ }, "productTypeCreateHeader": { "context": "window title", - "string": "Create Product Type" + "string": "Criar tipo de produto" }, "productTypeCreatePageHeader": { "context": "header", - "string": "Create Product Type" + "string": "Criar tipo de produto" }, "productTypeTaxesHeader": { "context": "section header", @@ -244,59 +244,59 @@ }, "productVariantCreatorWarehouseSectionHeader": { "context": "header", - "string": "Warehouses" + "string": "Armazéns" }, "productVariantPriceOptionalCostPriceField": { "context": "optional field", - "string": "Optional" + "string": "Opcional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", - "string": "Optional" + "string": "Opcional" }, "saleDetailsPageCategoriesQuantity": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "Categorias ({quantity})" }, "saleDetailsPageCollectionsQuantity": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "Colecções ({quantity})" }, "saleDetailsPageProductsQuantity": { "context": "number of products", - "string": "Products ({quantity})" + "string": "Produtos ({quantity})" }, "saleDetailsUnassignCategory": { "context": "unassign category from sale, button", - "string": "Unassign" + "string": "Desatribuir" }, "saleDetailsUnassignCollection": { "context": "unassign collection from sale, button", - "string": "Unassign" + "string": "Desatribuir" }, "saleDetailsUnassignProduct": { "context": "unassign product from sale, button", - "string": "Unassign" + "string": "Desatribuir" }, "shippingZoneDetailsDialogsDeleteShippingMethod": { "context": "delete shipping method", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "shippingZoneDetailsDialogsDeleteShippingZone": { "context": "delete shipping zone", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "shippingZoneWarehouses_dot_autocomplete_dot_label": { "context": "autocomplete select label", - "string": "Warehouse" + "string": "Armazém" }, "siteSettingsMailingHelperText": { "context": "helper text", - "string": "Mailing Configuration" + "string": "Configuração de listas de e-mail" }, "src_dot_accept": { "context": "button", - "string": "Accept" + "string": "Aceitar" }, "src_dot_attributes": { "context": "attributes section name", @@ -334,46 +334,46 @@ }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_2592224946": { "context": "check to require attribute to have value", - "string": "Value Required" + "string": "É necessário o valor" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3334509011": { "context": "product attribute type", - "string": "Multiple Select" + "string": "Selecção múltipla" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3605174225": { "context": "attribute's slug short code label", - "string": "Attribute Code" + "string": "Código de atributo" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_4107478955": { "context": "attribute slug input field helper text", - "string": "This is used internally. Make sure you don’t use spaces" + "string": "Isto é utilizado internamente. Não utilizar espaços" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_691600601": { "context": "attribute's label", - "string": "Default Label" + "string": "Etiqueta por omissão" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_2417065806": { "context": "tab name", - "string": "All Attributes" + "string": "Todos os atributos" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_3824684885": { "context": "button", - "string": "Create attribute" + "string": "Criar atributo" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_3916653510": { - "string": "Search Attribute" + "string": "Procurar atributo" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_availableInGrid": { "context": "attribute can be column in product list table", - "string": "Can be used as column" + "string": "Pode ser utilizado como coluna" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_filterableInDashboard": { "context": "use attribute in filtering", - "string": "Filterable in Dashboard" + "string": "Pode ser filtrado no painel de controlo" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_filterableInStorefront": { "context": "use attribute in filtering", - "string": "Filterable in Storefront" + "string": "Pode ser filtrado na loja" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_isVariantOnly": { "context": "attribute can be used only in variants", @@ -381,14 +381,14 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_valueRequired": { "context": "attribute value is required", - "string": "Value Required" + "string": "É necessário o valor" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_visibleInStorefront": { "context": "attribute", - "string": "Visible on Product Page in Storefront" + "string": "Visível na página de produto na loja" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_1192828581": { - "string": "No attributes found" + "string": "Nenhum atributo encontrado" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_2186555805": { "context": "attribute can be searched in storefront", @@ -396,22 +396,22 @@ }, "src_dot_attributes_dot_components_dot_AttributeList_dot_2235596452": { "context": "attribute can be searched in dashboard", - "string": "Searchable" + "string": "Pode ser procurado" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_3605174225": { - "string": "Attribute Code" + "string": "Código de atributo" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_643174786": { "context": "attribute is visible", - "string": "Visible" + "string": "Visível" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_691600601": { "context": "attribute's label'", - "string": "Default Label" + "string": "Etiqueta por omissão" }, "src_dot_attributes_dot_components_dot_AttributePage_dot_2855501559": { "context": "page title", - "string": "Create New Attribute" + "string": "Criar novo atributo" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1318123158": { "context": "attribute is filterable in storefront", @@ -419,11 +419,11 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1877630205": { "context": "attribute properties regarding storefront", - "string": "Storefront Properties" + "string": "Propriedades da loja" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_26409543": { "context": "attribute properties regarding dashboard", - "string": "Dashboard Properties" + "string": "Propriedades do painel de controlo" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_3590282519": { "context": "attribute position in storefront filters", @@ -431,10 +431,10 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_3876764312": { "context": "attribute", - "string": "Visible on Product Page in Storefront" + "string": "Visível na página de produto na loja" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_4048785456": { - "string": "If enabled this attribute can be used as a column in product table." + "string": "Se activo, este atributo pode ser usado como coluna na tabela de produto" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_673770329": { "context": "add attribute as column in product list table", @@ -639,7 +639,7 @@ "string": "Preço" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1657559629": { - "string": "No products found" + "string": "Nenhum produto encontrado" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1952810469": { "context": "product type", @@ -819,7 +819,7 @@ "string": "Publicado " }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1657559629": { - "string": "No products found" + "string": "Nenhum produto encontrado" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1952810469": { "context": "product type", @@ -877,7 +877,7 @@ }, "src_dot_collections_dot_views_dot_870815507": { "context": "unassign product from collection, button", - "string": "Unassign" + "string": "Desatribuir" }, "src_dot_collections_dot_views_dot_942133001": { "context": "dialog title", @@ -1399,7 +1399,7 @@ "string": "Set publication date" }, "src_dot_components_dot_VisibilityCard_dot_643174786": { - "string": "Visible" + "string": "Visível" }, "src_dot_components_dot_VisibilityCard_dot_77815154": { "string": "Oculto" @@ -1669,12 +1669,16 @@ "string": "Delete Customers" }, "src_dot_dashboard": { - "string": "Painel de controle" + "string": "Painel de controlo" }, "src_dot_delete": { "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descrição" }, @@ -1749,7 +1753,7 @@ "string": "Active Dates" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_1657559629": { - "string": "No products found" + "string": "Nenhum produto encontrado" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_2100305525": { "context": "button", @@ -1894,15 +1898,15 @@ }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_346170541": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "Categorias ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_3673147015": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "Colecções ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_846927739": { "context": "number of products", - "string": "Products ({quantity})" + "string": "Produtos ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherInfo_dot_1262795626": { "string": "Discount Code" @@ -2231,7 +2235,7 @@ }, "src_dot_optionalField": { "context": "field is optional", - "string": "Optional" + "string": "Opcional" }, "src_dot_orders": { "context": "orders section name", @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancelar processo" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Desconto" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Quantidade pré-autorizada" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3071,7 +3087,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_2297471173": { "context": "dialog content", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_3528974446": { "context": "dialog title", @@ -3164,7 +3180,7 @@ }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupDetails_dot_870815507": { "context": "button title", - "string": "Unassign" + "string": "Desatribuir" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupList_dot_92979760": { "string": "Permission Group Deleted" @@ -3294,7 +3310,7 @@ "string": "Are you sure you want to unassign {attributeName} from {productTypeName}?" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_1192828581": { - "string": "No attributes found" + "string": "Nenhum atributo encontrado" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_1228425832": { "string": "Attribute name" @@ -3325,7 +3341,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeDeleteDialog_dot_2297471173": { "context": "delete product type", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_productTypes_dot_components_dot_ProductTypeDeleteDialog_dot_924066985": { "context": "dialog header", @@ -3426,7 +3442,7 @@ }, "src_dot_productTypes_dot_views_dot_ProductTypeUpdate_dot_870815507": { "context": "unassign attribute from product type, button", - "string": "Unassign" + "string": "Desatribuir" }, "src_dot_products": { "context": "products section name", @@ -3479,7 +3495,7 @@ }, "src_dot_products_dot_components_dot_ProductImagePage_dot_1905082483": { "context": "field is optional", - "string": "Optional" + "string": "Opcional" }, "src_dot_products_dot_components_dot_ProductImagePage_dot_2546267317": { "context": "header", @@ -3545,14 +3561,14 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_visible": { "context": "product is visible", - "string": "Visible" + "string": "Visível" }, "src_dot_products_dot_components_dot_ProductList_dot_1134347598": { "context": "product price", "string": "Preço" }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { - "string": "No products found" + "string": "Nenhum produto encontrado" }, "src_dot_products_dot_components_dot_ProductList_dot_1952810469": { "context": "product type", @@ -3621,17 +3637,14 @@ "context": "header", "string": "Quantidade" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3758,7 +3771,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantDeleteDialog_dot_2297471173": { "context": "delete product variant", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_products_dot_components_dot_ProductVariantDeleteDialog_dot_3726089650": { "context": "dialog header", @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variante" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -3937,7 +3943,7 @@ }, "src_dot_products_dot_views_dot_ProductUpdate_dot_2297471173": { "context": "delete product", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_products_dot_views_dot_ProductUpdate_dot_4108890645": { "string": "Product removed" @@ -4033,7 +4039,7 @@ }, "src_dot_services_dot_components_dot_ServiceDeleteDialog_dot_2297471173": { "context": "delete service account", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_services_dot_components_dot_ServiceDetailsPage_dot_1848599267": { "context": "checkbox label", @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" @@ -4336,7 +4345,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_1221560277": { "context": "section header", - "string": "Warehouse" + "string": "Armazém" }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_2304484478": { "context": "button", @@ -4473,7 +4482,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "Configuração de listas de e-mail" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_297689661": { "string": "Configurate your email address from which all automatic emails will be sent to your customers." @@ -4506,7 +4515,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "Configuração de listas de e-mail" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_3657173399": { "string": "Email adress you provide here will be used as a contact adress for your customers." @@ -5149,7 +5158,7 @@ }, "src_dot_warehouses": { "context": "warehouses section name", - "string": "Warehouses" + "string": "Armazéns" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_1967111456": { "context": "warehouse", @@ -5223,7 +5232,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_2297471173": { "context": "delete webhook", - "string": "Are you sure you want to delete {name}?" + "string": "Tem a certeza que pretende apagar {name}?" }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_3514087611": { "context": "dialog header", @@ -5374,14 +5383,14 @@ }, "voucherDetailsUnassignCategory": { "context": "unassign category from voucher, button", - "string": "Unassign" + "string": "Desatribuir" }, "voucherDetailsUnassignCollection": { "context": "unassign collection from voucher, button", - "string": "Unassign" + "string": "Desatribuir" }, "voucherDetailsUnassignProduct": { "context": "unassign product from voucher, button", - "string": "Unassign" + "string": "Desatribuir" } } \ No newline at end of file diff --git a/locale/pt_BR.json b/locale/pt_BR.json index a037d8263..22da06452 100644 --- a/locale/pt_BR.json +++ b/locale/pt_BR.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Excluir" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descrição" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancelar faturamento" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Desconto" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Quantidade pré-autorizada" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Criar Produto" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Quantidade" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variante" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Criar Produto" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Métodos de Envio" diff --git a/locale/ro.json b/locale/ro.json index 9c6511d60..062e9f960 100644 --- a/locale/ro.json +++ b/locale/ro.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Descriere" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Anulează Livrarea" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Reducere" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Sumă prea mare" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Cantitate" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variantă" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/ru.json b/locale/ru.json index c60c4616a..0421d2424 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -4,28 +4,28 @@ "string": "Отменить заказ" }, "configurationMenuAttributes": { - "string": "Determine attributes used to create product types" + "string": "Определить атрибуты, используемые для создания типов товаров" }, "configurationMenuNavigation": { - "string": "Define how users can navigate through your store" + "string": "Задать как пользователи могут перемещаться по вашему магазину" }, "configurationMenuPages": { - "string": "Manage and add additional pages" + "string": "Управление и добавление дополнительных страниц" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "Управление группами разрешений и их разрешениями" }, "configurationMenuProductTypes": { - "string": "Define types of products you sell" + "string": "Задать типы продаваемых товаров" }, "configurationMenuShipping": { - "string": "Manage how you ship out orders" + "string": "Управление доставкой заказов" }, "configurationMenuSiteSettings": { - "string": "View and update your site settings" + "string": "Просмотр и обновление настроек вашего сайта" }, "configurationMenuStaff": { - "string": "Manage your employees and their permissions" + "string": "Управление сотрудниками и их правами" }, "configurationMenuTaxes": { "string": "Manage how your store charges tax" @@ -41,24 +41,24 @@ "string": "Активность" }, "homeActivityCardNoActivities": { - "string": "No activities found" + "string": "Никаких действий не найдено" }, "homeAnalyticsCardHeader": { "string": "Сегодня" }, "homeHeaderText": { "context": "header", - "string": "Hello there, {userName}" + "string": "Привет, {userName}" }, "homeHeaderTextCaption": { "context": "subheader", - "string": "Here is some information we gathered about your store" + "string": "Вот некоторые сведения, которые мы собрали о вашем магазине" }, "homeNotificationTableNoOrders": { "string": "No orders ready to fulfill" }, "homeNotificationTableOrders": { - "string": "{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}" + "string": "{amount, plural,one {Один заказ готов к исполнению} few {{amount} заказа готовы к исполнению} many {{amount} заказов готовы к исполнению} other {{amount} заказов готовы к исполнению}}" }, "homeNotificationTablePayments": { "string": "{amount, plural,one {One payment to capture} other {{amount} Payments to capture}}" @@ -70,7 +70,7 @@ "string": "No payments waiting for capture" }, "homeNotificationsTableNoProducts": { - "string": "No products out of stock" + "string": "Нет продуктов с малым остатком на складе" }, "homeProductListCardOrders": { "context": "number of ordered products", @@ -78,14 +78,14 @@ }, "homeProductsListCardHeader": { "context": "header", - "string": "Top Products" + "string": "Лучшие товары" }, "homeProductsListCardNoProducts": { - "string": "No products found" + "string": "Товары не найдены" }, "homeScreenDisclaimer": { "context": "header", - "string": "Disclaimer" + "string": "Предупреждение" }, "homeScreenDisclaimerText1": { "string": "The new dashboard and the GraphQL API are preview-quality software." @@ -95,24 +95,24 @@ }, "homeScreenHeader": { "context": "header", - "string": "Hello there, {userName}" + "string": "Привет, {userName}" }, "menuCreateDialogHeader": { "context": "dialog header", - "string": "Create Menu" + "string": "Создать меню" }, "menuCreateDialogMenuTitleLabel": { - "string": "Menu Title" + "string": "Заголовок меню" }, "menuDetailsDeleteMenuContent": { "string": "Вы уверены, что хотите удалить menu {menuName}?" }, "menuDetailsDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Удалить меню" }, "menuDetailsPageHelperText": { - "string": "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" + "string": "Создание структуры навигации выполняется путем перетаскивания. Просто создайте новый пункт меню, а затем перетащите его в предназначенное ему место. Вы можете перемещать элементы на друг друга для создания древовидной структуры и перетаскивать элементы вверх и вниз для создания иерархии" }, "menuItemDialogAddItem": { "context": "create new menu item, header", @@ -120,11 +120,11 @@ }, "menuItemDialogAddLink": { "context": "add link to navigation", - "string": "Link to: {url}" + "string": "Ссылка на: {url}" }, "menuItemDialogEditItem": { "context": "edit menu item, header", - "string": "Edit Item" + "string": "Редактировать элемент" }, "menuItemDialogLinkLabel": { "context": "label", @@ -139,11 +139,11 @@ }, "menuItemsAddItem": { "context": "add new menu item", - "string": "Create new item" + "string": "Создать новый элемент" }, "menuItemsHeader": { "context": "header", - "string": "Menu Items" + "string": "Элементы меню" }, "menuItemsPlaceholder": { "string": "Добавьте новый пункт, чтобы начать создавать меню." @@ -152,11 +152,11 @@ "string": "Created menu" }, "menuListDeleteMenuContent": { - "string": "Are you sure you want to delete {menuName}?" + "string": "Вы уверены, что хотите удалить {menuName}?" }, "menuListDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Удалить меню" }, "menuListDeleteMenusContent": { "string": "{counter,plural,one {Are you sure you want to delete this menu?} other {Are you sure you want to delete {displayQuantity} menus?}}" @@ -170,20 +170,20 @@ }, "menuListItems": { "context": "number of menu items", - "string": "Items" + "string": "Элементы" }, "menuListMenutitle": { - "string": "Menu Title" + "string": "Заголовок меню" }, "menuListNoMenus": { "string": "No menus found" }, "menuListPageAddMenu": { "context": "button", - "string": "Create Menu" + "string": "Создать меню" }, "menuPropertiesMenuTitle": { - "string": "Menu Title" + "string": "Заголовок меню" }, "orderCustomerBillingAddressNotSet": { "context": "no address is set in draft order", @@ -215,11 +215,11 @@ }, "productTypeCreateHeader": { "context": "window title", - "string": "Create Product Type" + "string": "Создать тип продукта" }, "productTypeCreatePageHeader": { "context": "header", - "string": "Create Product Type" + "string": "Создать тип продукта" }, "productTypeTaxesHeader": { "context": "section header", @@ -244,13 +244,13 @@ }, "productVariantCreatorWarehouseSectionHeader": { "context": "header", - "string": "Warehouses" + "string": "Склады" }, "productVariantPriceOptionalCostPriceField": { "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -288,7 +288,7 @@ }, "shippingZoneWarehouses_dot_autocomplete_dot_label": { "context": "autocomplete select label", - "string": "Warehouse" + "string": "Склад" }, "siteSettingsMailingHelperText": { "context": "helper text", @@ -314,7 +314,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeBulkDeleteDialog_dot_1655187315": { "context": "dialog title", - "string": "Delete attributes" + "string": "Удалить атрибуты" }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_1889602489": { "context": "dialog title", @@ -322,7 +322,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_3738429348": { "context": "dialog content", - "string": "Are you sure you want to delete {attributeName}?" + "string": "Вы уверены, что Вы хотите удалить { attributeName }?" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_1005562666": { "context": "attribute's editor component", @@ -403,7 +403,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeList_dot_643174786": { "context": "attribute is visible", - "string": "Visible" + "string": "Видимый" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_691600601": { "context": "attribute's label'", @@ -419,11 +419,11 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1877630205": { "context": "attribute properties regarding storefront", - "string": "Storefront Properties" + "string": "Свойства витрины" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_26409543": { "context": "attribute properties regarding dashboard", - "string": "Dashboard Properties" + "string": "Свойства дашборда" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_3590282519": { "context": "attribute position in storefront filters", @@ -560,7 +560,7 @@ }, "src_dot_back": { "context": "button", - "string": "Back" + "string": "Назад" }, "src_dot_cancel": { "context": "button", @@ -639,11 +639,11 @@ "string": "Цена" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1657559629": { - "string": "No products found" + "string": "Товары не найдены" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_2341910657": { "context": "product", @@ -663,7 +663,7 @@ }, "src_dot_categories_dot_components_dot_CategoryProducts_dot_4164156574": { "context": "header", - "string": "Products in {categoryName}" + "string": "Товаров в {categoryName}" }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_2159874182": { "context": "number of subcategories in category", @@ -682,7 +682,7 @@ }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_770296100": { "context": "button", - "string": "Create subcategory" + "string": "Создать подкатегорию" }, "src_dot_categories_dot_views_dot_1140231710": { "context": "window title", @@ -819,11 +819,11 @@ "string": "Опубликовано" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1657559629": { - "string": "No products found" + "string": "Товары не найдены" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_2341910657": { "context": "product is not published", @@ -1399,7 +1399,7 @@ "string": "Set publication date" }, "src_dot_components_dot_VisibilityCard_dot_643174786": { - "string": "Visible" + "string": "Видимый" }, "src_dot_components_dot_VisibilityCard_dot_77815154": { "string": "Скрыто" @@ -1675,6 +1675,10 @@ "context": "button", "string": "Удалить" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Описание" }, @@ -1749,7 +1753,7 @@ "string": "Время активности" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_1657559629": { - "string": "No products found" + "string": "Товары не найдены" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_2100305525": { "context": "button", @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "Единица складского учёта" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Отменить пополнение" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Скидка" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Авторизованное число" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Сумма" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Добавить товар" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "Единица складского учёта" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Сумма" @@ -3363,7 +3379,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_type": { "context": "product type is digital or physical", - "string": "Type" + "string": "Тип" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_1126553969": { "string": "No product types found" @@ -3378,7 +3394,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_1952810469": { "context": "product type is either simple or configurable", - "string": "Type" + "string": "Тип" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_2253986440": { "context": "product type name", @@ -3507,7 +3523,7 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_products_dot_components_dot_ProductListPage_dot_3550330425": { "string": "Search Products..." @@ -3545,18 +3561,18 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_visible": { "context": "product is visible", - "string": "Visible" + "string": "Видимый" }, "src_dot_products_dot_components_dot_ProductList_dot_1134347598": { "context": "product price", "string": "Цена" }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { - "string": "No products found" + "string": "Товары не найдены" }, "src_dot_products_dot_components_dot_ProductList_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_products_dot_components_dot_ProductList_dot_2341910657": { "context": "product status", @@ -3621,17 +3637,14 @@ "context": "header", "string": "Количество" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Варианты" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" @@ -4336,7 +4345,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_1221560277": { "context": "section header", - "string": "Warehouse" + "string": "Склад" }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_2304484478": { "context": "button", @@ -5149,7 +5158,7 @@ }, "src_dot_warehouses": { "context": "warehouses section name", - "string": "Warehouses" + "string": "Склады" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_1967111456": { "context": "warehouse", diff --git a/locale/sk.json b/locale/sk.json index d8f5d6299..bdfaa70cc 100644 --- a/locale/sk.json +++ b/locale/sk.json @@ -48,11 +48,11 @@ }, "homeHeaderText": { "context": "header", - "string": "Hello there, {userName}" + "string": "Ahoj {userName}" }, "homeHeaderTextCaption": { "context": "subheader", - "string": "Here is some information we gathered about your store" + "string": "Tu je zopár informácií, čo sme zozbierali o tvojom obchode" }, "homeNotificationTableNoOrders": { "string": "No orders ready to fulfill" @@ -78,7 +78,7 @@ }, "homeProductsListCardHeader": { "context": "header", - "string": "Top Products" + "string": "Top Produkty" }, "homeProductsListCardNoProducts": { "string": "No products found" @@ -95,11 +95,11 @@ }, "homeScreenHeader": { "context": "header", - "string": "Hello there, {userName}" + "string": "Ahoj {userName}" }, "menuCreateDialogHeader": { "context": "dialog header", - "string": "Create Menu" + "string": "Vytvoriť menu" }, "menuCreateDialogMenuTitleLabel": { "string": "Menu Title" @@ -109,7 +109,7 @@ }, "menuDetailsDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Vymazať menu" }, "menuDetailsPageHelperText": { "string": "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" @@ -156,7 +156,7 @@ }, "menuListDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Vymazať menu" }, "menuListDeleteMenusContent": { "string": "{counter,plural,one {Are you sure you want to delete this menu?} other {Are you sure you want to delete {displayQuantity} menus?}}" @@ -180,7 +180,7 @@ }, "menuListPageAddMenu": { "context": "button", - "string": "Create Menu" + "string": "Vytvoriť menu" }, "menuPropertiesMenuTitle": { "string": "Menu Title" @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -296,7 +296,7 @@ }, "src_dot_accept": { "context": "button", - "string": "Accept" + "string": "Potvrdiť" }, "src_dot_attributes": { "context": "attributes section name", @@ -1675,6 +1675,10 @@ "context": "button", "string": "Vymazať" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Popis" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "Skladová jednotka " + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Zrušiť naplnenie" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Zľava" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Povolená čiastka" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Celkom" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "Skladová jednotka " + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Celkom" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Počet" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Varianta" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/sl.json b/locale/sl.json index 8e6827a3d..164343b39 100644 --- a/locale/sl.json +++ b/locale/sl.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Opis" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU - številka izdelka" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Skupna vsota" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU - številka izdelka" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Skupna vsota" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Količina" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Različica" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/sq.json b/locale/sq.json index 63d90102d..0852476eb 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Pershkrimi" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Anullo perfundimin" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Zbritje" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Shuma e autorizuar me pare" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Totali" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Totali" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Sasia" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/sr.json b/locale/sr.json index 6886b2995..efe8c4ce7 100644 --- a/locale/sr.json +++ b/locale/sr.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Opis" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Količina" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/sv.json b/locale/sv.json index 105db22f6..50d98c31d 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Beskrivning" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Avbryt köp" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Rabatt" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Summa för automatisk betalning" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Totalsumma" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Totalsumma" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Antal" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/th.json b/locale/th.json index 0090da814..8e0227856 100644 --- a/locale/th.json +++ b/locale/th.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "คำอธิบายา" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "รหัสสินค้า" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "ส่วนลด" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "รวมทั้งหมด" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "รหัสสินค้า" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "รวมทั้งหมด" @@ -3621,17 +3637,14 @@ "context": "header", "string": "จำนวน" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Variant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" diff --git a/locale/tr.json b/locale/tr.json index 810c07f18..6e48b201a 100644 --- a/locale/tr.json +++ b/locale/tr.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "İsteğe bağlı" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "İsteğe bağlı" }, @@ -296,7 +296,7 @@ }, "src_dot_accept": { "context": "button", - "string": "Accept" + "string": "Kabul et" }, "src_dot_attributes": { "context": "attributes section name", @@ -338,7 +338,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3334509011": { "context": "product attribute type", - "string": "Multiple Select" + "string": "Çoklu Seçim" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3605174225": { "context": "attribute's slug short code label", @@ -568,10 +568,10 @@ }, "src_dot_cancelled": { "context": "order status", - "string": "Cancelled" + "string": "İptal Edildi" }, "src_dot_catalog": { - "string": "Catalog" + "string": "Katalog" }, "src_dot_categories": { "context": "categories section name", @@ -587,7 +587,7 @@ }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_236319840": { "context": "page header", - "string": "Create New Category" + "string": "Yeni Kategori Oluştur" }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_2563994280": { "string": "Add search engine title and description to make this category easier to find" @@ -608,7 +608,7 @@ }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_1140231710": { "context": "button", - "string": "Create category" + "string": "Kategori oluştur" }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_3841025483": { "string": "Search Category" @@ -682,11 +682,11 @@ }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_770296100": { "context": "button", - "string": "Create subcategory" + "string": "Alt kategori oluştur" }, "src_dot_categories_dot_views_dot_1140231710": { "context": "window title", - "string": "Create category" + "string": "Kategori oluştur" }, "src_dot_categories_dot_views_dot_1204353135": { "string": "{counter,plural,one {Are you sure you want to delete this product?} other {Are you sure you want to delete {displayQuantity} products?}}" @@ -1187,7 +1187,7 @@ }, "src_dot_components_dot_Navigator_dot_2935523260": { "context": "navigator placeholder", - "string": "Search in Catalog" + "string": "Katalogta ara" }, "src_dot_components_dot_Navigator_dot_3060198201": { "context": "navigator section header", @@ -1256,7 +1256,7 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_helpCatalogMode": { "context": "navigator catalog mode description", - "string": "Search in Catalog" + "string": "Katalogta ara" }, "src_dot_components_dot_Navigator_dot_modes_dot_helpCommandsMode": { "context": "navigator command mode description", @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Açıklama" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "Barkod" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "İndirim" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Preauthorized amount" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Toplam" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "Barkod" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Toplam" @@ -3157,7 +3173,7 @@ }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupCreate_dot_1140231710": { "context": "window title", - "string": "Create category" + "string": "Kategori oluştur" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupCreate_dot_3930588328": { "string": "Permission group created" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Adet" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Varyant" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" @@ -4817,7 +4826,7 @@ }, "src_dot_translations": { "context": "translations section name", - "string": "Translations" + "string": "Çeviriler" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_1308081812": { "string": "{numberOfFields} Translations, {numberOfTranslatedFields} Completed" @@ -4883,7 +4892,7 @@ }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_2460580333": { "context": "header", - "string": "Translations to {language}" + "string": "{language} Çeviriler" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_2559018090": { "string": "Search Page" @@ -4923,7 +4932,7 @@ "string": "No translatable entities found" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_49462429": { - "string": "Completed Translations" + "string": "Tamamlanmış Çeviriler" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_636461959": { "context": "entity (product, collection, shipping method) name", diff --git a/locale/uk.json b/locale/uk.json index 01a1c5170..d8ef664df 100644 --- a/locale/uk.json +++ b/locale/uk.json @@ -1,47 +1,47 @@ { "OrderCancelDialogHeader": { "context": "dialog header", - "string": "Відмінити замовлення" + "string": "Скасувати замовлення" }, "configurationMenuAttributes": { - "string": "Determine attributes used to create product types" + "string": "Визначте атрибути, які використовуються для створення типів товарів" }, "configurationMenuNavigation": { - "string": "Define how users can navigate through your store" + "string": "Визначте, які користувачі можуть переміщатися по вашому магазину" }, "configurationMenuPages": { - "string": "Manage and add additional pages" + "string": "Управління та додавання допоміжних сторінок" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "Управління групами дозволів та їх дозволами" }, "configurationMenuProductTypes": { - "string": "Define types of products you sell" + "string": "Визначте типи товарів, які ви продаєте" }, "configurationMenuShipping": { - "string": "Manage how you ship out orders" + "string": "Управління, як ви відправляєте замовлення" }, "configurationMenuSiteSettings": { - "string": "View and update your site settings" + "string": "Перегляд та оновлення налаштувань вашого сайту" }, "configurationMenuStaff": { - "string": "Manage your employees and their permissions" + "string": "Управління співробітниками та їх дозволами" }, "configurationMenuTaxes": { - "string": "Manage how your store charges tax" + "string": "Управління, як ваш магазин стягує податок" }, "configurationMenuWarehouses": { - "string": "Manage and update your warehouse information" + "string": "Управління та оновлення інформації про ваш склад" }, "configurationPluginsPages": { - "string": "View and update your plugins and their settings." + "string": "Перегляд та оновлення плагінів та їх налаштувань" }, "homeActivityCardHeader": { "context": "header", "string": "Активність" }, "homeActivityCardNoActivities": { - "string": "No activities found" + "string": "Не знайдено діяльності" }, "homeAnalyticsCardHeader": { "string": "Сьогодні" @@ -52,13 +52,13 @@ }, "homeHeaderTextCaption": { "context": "subheader", - "string": "Here is some information we gathered about your store" + "string": "Ось деякі відомості, які ми зібрали про ваш магазин" }, "homeNotificationTableNoOrders": { - "string": "No orders ready to fulfill" + "string": "Замовлення не готові до виконання" }, "homeNotificationTableOrders": { - "string": "{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}" + "string": "{amount, plural,one {Замовлення готове до виконання} few {{amount} Замовлення готові до виконання} many {{amount} Замовлень готові до виконання} other {{amount} Замовлення готові до виконання}}" }, "homeNotificationTablePayments": { "string": "{amount, plural,one {One payment to capture} other {{amount} Payments to capture}}" @@ -70,7 +70,7 @@ "string": "No payments waiting for capture" }, "homeNotificationsTableNoProducts": { - "string": "No products out of stock" + "string": "Немає товарів на складі" }, "homeProductListCardOrders": { "context": "number of ordered products", @@ -78,10 +78,10 @@ }, "homeProductsListCardHeader": { "context": "header", - "string": "Top Products" + "string": "Популярні товари" }, "homeProductsListCardNoProducts": { - "string": "No products found" + "string": "Не знайдено жодного товару" }, "homeScreenDisclaimer": { "context": "header", @@ -99,17 +99,17 @@ }, "menuCreateDialogHeader": { "context": "dialog header", - "string": "Create Menu" + "string": "Створити меню" }, "menuCreateDialogMenuTitleLabel": { "string": "Menu Title" }, "menuDetailsDeleteMenuContent": { - "string": "Are you sure you want to delete menu {menuName}?" + "string": "Ви впевнені, що хочете видалити меню {menuName}?" }, "menuDetailsDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Видалити меню" }, "menuDetailsPageHelperText": { "string": "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" @@ -120,18 +120,18 @@ }, "menuItemDialogAddLink": { "context": "add link to navigation", - "string": "Link to: {url}" + "string": "Посилання до: {url}" }, "menuItemDialogEditItem": { "context": "edit menu item, header", - "string": "Edit Item" + "string": "Редагувати елемент" }, "menuItemDialogLinkLabel": { "context": "label", "string": "Посилання" }, "menuItemDialogLinkPlaceholder": { - "string": "Start typing to begin search..." + "string": "Почніть вводити текст, щоб розпочати пошук..." }, "menuItemDialogNameLabel": { "context": "menu item name", @@ -139,34 +139,34 @@ }, "menuItemsAddItem": { "context": "add new menu item", - "string": "Create new item" + "string": "Створити новий елемент" }, "menuItemsHeader": { "context": "header", - "string": "Menu Items" + "string": "Пункти меню" }, "menuItemsPlaceholder": { "string": "Додати новий пункт меню, щоб розпочати роботу з меню" }, "menuListCreatedMenu": { - "string": "Created menu" + "string": "Меню створено" }, "menuListDeleteMenuContent": { - "string": "Are you sure you want to delete {menuName}?" + "string": "Ви впевнені, що хочете видалити {menuName}?" }, "menuListDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "Видалити меню" }, "menuListDeleteMenusContent": { "string": "{counter,plural,one {Are you sure you want to delete this menu?} other {Are you sure you want to delete {displayQuantity} menus?}}" }, "menuListDeleteMenusHeader": { "context": "dialog header", - "string": "Delete Menus" + "string": "Видалити меню" }, "menuListDeletedMenu": { - "string": "Deleted menu" + "string": "Видалити меню" }, "menuListItems": { "context": "number of menu items", @@ -180,7 +180,7 @@ }, "menuListPageAddMenu": { "context": "button", - "string": "Create Menu" + "string": "Створити меню" }, "menuPropertiesMenuTitle": { "string": "Menu Title" @@ -199,11 +199,11 @@ }, "orderPaymentShippingDoesNotApply": { "context": "order does not require shipping", - "string": "does not apply" + "string": "не застосовується" }, "orderPaymentVATDoesNotApply": { "context": "vat not included in order price", - "string": "does not apply" + "string": "не застосовується" }, "productStatusLabel": { "context": "product", @@ -215,18 +215,18 @@ }, "productTypeCreateHeader": { "context": "window title", - "string": "Create Product Type" + "string": "Створіть тип товару" }, "productTypeCreatePageHeader": { "context": "header", - "string": "Create Product Type" + "string": "Створіть тип товару" }, "productTypeTaxesHeader": { "context": "section header", - "string": "Taxes" + "string": "Податки" }, "productTypeTaxesInputLabel": { - "string": "Taxes" + "string": "Податки" }, "productVariantCreatePricesPriceInputLabel": { "string": "Ціна" @@ -244,23 +244,23 @@ }, "productVariantCreatorWarehouseSectionHeader": { "context": "header", - "string": "Warehouses" + "string": "Склади" }, "productVariantPriceOptionalCostPriceField": { "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, "saleDetailsPageCategoriesQuantity": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "Категорії ({quantity})" }, "saleDetailsPageCollectionsQuantity": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "Колекції ({quantity})" }, "saleDetailsPageProductsQuantity": { "context": "number of products", @@ -268,15 +268,15 @@ }, "saleDetailsUnassignCategory": { "context": "unassign category from sale, button", - "string": "Unassign" + "string": "Скасувати" }, "saleDetailsUnassignCollection": { "context": "unassign collection from sale, button", - "string": "Unassign" + "string": "Скасувати" }, "saleDetailsUnassignProduct": { "context": "unassign product from sale, button", - "string": "Unassign" + "string": "Скасувати" }, "shippingZoneDetailsDialogsDeleteShippingMethod": { "context": "delete shipping method", @@ -314,7 +314,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeBulkDeleteDialog_dot_1655187315": { "context": "dialog title", - "string": "Delete attributes" + "string": "Видалити атрибути" }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_1889602489": { "context": "dialog title", @@ -322,7 +322,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_3738429348": { "context": "dialog content", - "string": "Are you sure you want to delete {attributeName}?" + "string": "Ви впевнені, що хочете видалити {attributeName}?" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_1005562666": { "context": "attribute's editor component", @@ -334,7 +334,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_2592224946": { "context": "check to require attribute to have value", - "string": "Value Required" + "string": "Необхідне значення" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3334509011": { "context": "product attribute type", @@ -342,7 +342,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3605174225": { "context": "attribute's slug short code label", - "string": "Attribute Code" + "string": "Код атрибуту" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_4107478955": { "context": "attribute slug input field helper text", @@ -350,7 +350,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_691600601": { "context": "attribute's label", - "string": "Default Label" + "string": "Мітка за замовчуванням" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_2417065806": { "context": "tab name", @@ -358,7 +358,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_3824684885": { "context": "button", - "string": "Create attribute" + "string": "Створити атрибут" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_3916653510": { "string": "Search Attribute" @@ -377,45 +377,45 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_isVariantOnly": { "context": "attribute can be used only in variants", - "string": "Variant Only" + "string": "Тільки варіант" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_valueRequired": { "context": "attribute value is required", - "string": "Value Required" + "string": "Необхідне значення" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_visibleInStorefront": { "context": "attribute", - "string": "Visible on Product Page in Storefront" + "string": "Відомий на сторінці продукту у вітрині" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_1192828581": { "string": "No attributes found" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_2186555805": { "context": "attribute can be searched in storefront", - "string": "Use in faceted search" + "string": "Використовувати при багатофункціональному пошуку" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_2235596452": { "context": "attribute can be searched in dashboard", "string": "Searchable" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_3605174225": { - "string": "Attribute Code" + "string": "Код атрибуту" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_643174786": { "context": "attribute is visible", - "string": "Visible" + "string": "Видимий" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_691600601": { "context": "attribute's label'", - "string": "Default Label" + "string": "Мітка за замовчуванням" }, "src_dot_attributes_dot_components_dot_AttributePage_dot_2855501559": { "context": "page title", - "string": "Create New Attribute" + "string": "Створити новий атрибут" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1318123158": { "context": "attribute is filterable in storefront", - "string": "Use in Faceted Navigation" + "string": "Використовувати в багатоаспектній навігації" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1877630205": { "context": "attribute properties regarding storefront", @@ -423,7 +423,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_26409543": { "context": "attribute properties regarding dashboard", - "string": "Dashboard Properties" + "string": "Властивості інформаційної панелі" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_3590282519": { "context": "attribute position in storefront filters", @@ -431,7 +431,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_3876764312": { "context": "attribute", - "string": "Visible on Product Page in Storefront" + "string": "Відомий на сторінці продукту у вітрині" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_4048785456": { "string": "If enabled this attribute can be used as a column in product table." @@ -442,21 +442,21 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_714335445": { "context": "use attribute in filtering", - "string": "Use in Filtering" + "string": "Використання у фільтруванні" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_787251583": { "string": "If enabled, you’ll be able to use this attribute to filter products in product list." }, "src_dot_attributes_dot_components_dot_AttributeValueDeleteDialog_dot_1326420604": { "context": "delete attribute value", - "string": "Are you sure you want to delete \"{name}\" value?" + "string": "Ви впевнені, що хочете видалити \"{name}\" значення?" }, "src_dot_attributes_dot_components_dot_AttributeValueDeleteDialog_dot_203246037": { "context": "dialog title", - "string": "Delete attribute value" + "string": "Видалити значення атрибута" }, "src_dot_attributes_dot_components_dot_AttributeValueDeleteDialog_dot_4031078167": { - "string": "Are you sure you want to delete \"{name}\" value? If you delete it you won’t be able to assign it to any of the products with \"{attributeName}\" attribute." + "string": "Ви впевнені, що хочете видалити \"{name}\" значення? Якщо ви видалите його, ви не зможете призначити його жодному з продуктів з \"{attributeName}\" властивістю." }, "src_dot_attributes_dot_components_dot_AttributeValueEditDialog_dot_1395607402": { "context": "edit attribute value", @@ -472,11 +472,11 @@ }, "src_dot_attributes_dot_components_dot_AttributeValues_dot_1397696159": { "context": "attribute values list: name column header", - "string": "Default Store View" + "string": "Перегляд магазину за замовчуванням" }, "src_dot_attributes_dot_components_dot_AttributeValues_dot_1565474525": { "context": "attribute values list: slug column header", - "string": "Admin" + "string": "Адміністратор" }, "src_dot_attributes_dot_components_dot_AttributeValues_dot_2054206599": { "context": "No attribute values found", @@ -484,21 +484,21 @@ }, "src_dot_attributes_dot_components_dot_AttributeValues_dot_224159874": { "context": "section header", - "string": "Attribute Values" + "string": "Значення атрибуту" }, "src_dot_attributes_dot_components_dot_AttributeValues_dot_351422234": { "context": "assign attribute value button", - "string": "Assign value" + "string": "Призначити значення" }, "src_dot_attributes_dot_views_dot_AttributeCreate_dot_11941964": { "string": "Successfully created attribute" }, "src_dot_attributes_dot_views_dot_AttributeDetails_dot_423042761": { "context": "attribute value deleted", - "string": "Value deleted" + "string": "Значення видалено" }, "src_dot_attributes_dot_views_dot_AttributeDetails_dot_499456739": { - "string": "Attribute deleted" + "string": "Атрибут видалено" }, "src_dot_attributes_dot_views_dot_AttributeDetails_dot_634268988": { "context": "added new attribute value", @@ -506,7 +506,7 @@ }, "src_dot_attributes_dot_views_dot_AttributeList_dot_3218248395": { "context": "deleted multiple attributes", - "string": "Attributes successfully delete" + "string": "Атрибути успішно видаляються" }, "src_dot_auth_dot_components_dot_LoginPage_dot_109182747": { "context": "button", @@ -533,7 +533,7 @@ "string": "Set new password" }, "src_dot_auth_dot_components_dot_NewPasswordPage_dot_2799926859": { - "string": "Confirm Password" + "string": "Підтвердіть пароль" }, "src_dot_auth_dot_components_dot_NewPasswordPage_dot_4253911811": { "string": "Passwords do not match" @@ -547,7 +547,7 @@ }, "src_dot_auth_dot_components_dot_ResetPasswordSuccessPage_dot_2245157344": { "context": "button", - "string": "Back to login" + "string": "Повернутися до авторизації" }, "src_dot_auth_dot_components_dot_ResetPasswordSuccessPage_dot_4066297200": { "string": "Success! In a few minutes you’ll receive a message with instructions on how to reset your password." @@ -556,11 +556,11 @@ "string": "Provided email address does not exist in our database." }, "src_dot_availability": { - "string": "Availability" + "string": "Доступність" }, "src_dot_back": { "context": "button", - "string": "Back" + "string": "Назад" }, "src_dot_cancel": { "context": "button", @@ -579,7 +579,7 @@ }, "src_dot_categories_dot_components_dot_CategoryBackground_dot_2224943474": { "context": "section header", - "string": "Background Image (optional)" + "string": "Фонове зображення (необов’язково)" }, "src_dot_categories_dot_components_dot_CategoryBackground_dot_3289097895": { "context": "field is optional", @@ -587,7 +587,7 @@ }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_236319840": { "context": "page header", - "string": "Create New Category" + "string": "Створити нову категорію" }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_2563994280": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цієї категорії" @@ -598,17 +598,17 @@ }, "src_dot_categories_dot_components_dot_CategoryDeleteDialog_dot_847492725": { "context": "delete category", - "string": "Are you sure you want to delete {categoryName}?" + "string": "Ви впевнені, що хочете видалити {categoryName}?" }, "src_dot_categories_dot_components_dot_CategoryDetailsForm_dot_1214235329": { - "string": "Category Name" + "string": "Назва категорії" }, "src_dot_categories_dot_components_dot_CategoryDetailsForm_dot_4037703468": { - "string": "Category Description" + "string": "Опис категорії" }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_1140231710": { "context": "button", - "string": "Create category" + "string": "Створити категорію" }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_3841025483": { "string": "Search Category" @@ -618,7 +618,7 @@ "string": "Всі категорії" }, "src_dot_categories_dot_components_dot_CategoryList_dot_1214235329": { - "string": "Category Name" + "string": "Назва категорії" }, "src_dot_categories_dot_components_dot_CategoryList_dot_2054128296": { "string": "No categories found" @@ -639,11 +639,11 @@ "string": "Ціна" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1657559629": { - "string": "No products found" + "string": "Не знайдено жодного товару" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_2341910657": { "context": "product", @@ -682,17 +682,17 @@ }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_770296100": { "context": "button", - "string": "Create subcategory" + "string": "Створити підкатегорію" }, "src_dot_categories_dot_views_dot_1140231710": { "context": "window title", - "string": "Create category" + "string": "Створити категорію" }, "src_dot_categories_dot_views_dot_1204353135": { "string": "{counter,plural,one {Are you sure you want to delete this product?} other {Are you sure you want to delete {displayQuantity} products?}}" }, "src_dot_categories_dot_views_dot_1754466114": { - "string": "Category created" + "string": "Категорія створена" }, "src_dot_categories_dot_views_dot_1823337870": { "string": "{counter,plural,one {Are you sure you want to delete this category?} other {Are you sure you want to delete {displayQuantity} categories?}}" @@ -702,21 +702,21 @@ "string": "Видалити категорію" }, "src_dot_categories_dot_views_dot_2189424032": { - "string": "Category deleted" + "string": "Категорія видалена" }, "src_dot_categories_dot_views_dot_2507763081": { "context": "dialog title", - "string": "Delete products" + "string": "Видалити товари" }, "src_dot_categories_dot_views_dot_3488150607": { "string": "Remember this will also delete all products assigned to this category." }, "src_dot_categories_dot_views_dot_712767046": { "context": "dialog title", - "string": "Delete categories" + "string": "Видалити категорії" }, "src_dot_categories_dot_views_dot_847492725": { - "string": "Are you sure you want to delete {categoryName}?" + "string": "Ви впевнені, що хочете видалити {categoryName}?" }, "src_dot_categories_dot_views_dot_CategoryList_dot_1823337870": { "string": "{counter,plural,one {Are you sure you want to delete this category?} other {Are you sure you want to delete {displayQuantity} categories?}}" @@ -726,7 +726,7 @@ }, "src_dot_categories_dot_views_dot_CategoryList_dot_712767046": { "context": "dialog title", - "string": "Delete categories" + "string": "Видалити категорії" }, "src_dot_clear": { "context": "button", @@ -738,11 +738,11 @@ }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_1815688500": { "context": "collection", - "string": "since {date}" + "string": "розміщено з {date}" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_2001551496": { "context": "collection", - "string": "will be visible from {date}" + "string": "буде видно з {date}" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_946315389": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цієї колекції" @@ -753,15 +753,15 @@ }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_1815688500": { "context": "collection", - "string": "since {date}" + "string": "розміщено з {date}" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_2001551496": { "context": "collection", - "string": "will be visible from {date}" + "string": "буде видно з {date}" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_2906897537": { "context": "switch button", - "string": "Feature on Homepage" + "string": "Функції на головній сторінці" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_946315389": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цієї колекції" @@ -772,7 +772,7 @@ }, "src_dot_collections_dot_components_dot_CollectionImage_dot_2224943474": { "context": "section header", - "string": "Background Image (optional)" + "string": "Фонове зображення (необов’язково)" }, "src_dot_collections_dot_components_dot_CollectionImage_dot_3289097895": { "context": "field is optional", @@ -787,7 +787,7 @@ }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_686910896": { "context": "button", - "string": "Create collection" + "string": "Створити колекцію" }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_hidden": { "context": "collection", @@ -808,22 +808,22 @@ "string": "No. of Products" }, "src_dot_collections_dot_components_dot_CollectionList_dot_2759199473": { - "string": "Collection Name" + "string": "Назва колекції" }, "src_dot_collections_dot_components_dot_CollectionList_dot_3326160357": { "context": "collection availability", - "string": "Availability" + "string": "Доступність" }, "src_dot_collections_dot_components_dot_CollectionList_dot_3640454975": { "context": "collection is published", "string": "Опубліковано" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1657559629": { - "string": "No products found" + "string": "Не знайдено жодного товару" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_2341910657": { "context": "product is not published", @@ -839,7 +839,7 @@ }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_460524544": { "context": "button", - "string": "Assign product" + "string": "Призначити товар" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_636461959": { "context": "product name", @@ -852,32 +852,32 @@ "string": "Товар доданий до колекції" }, "src_dot_collections_dot_views_dot_2402899582": { - "string": "Are you sure you want to delete collection's image?" + "string": "Ви впевнені, що хочете видалити зображення колекції?" }, "src_dot_collections_dot_views_dot_3215481647": { "string": "{counter,plural,one {Are you sure you want to unassign this product?} other {Are you sure you want to unassign {displayQuantity} products?}}" }, "src_dot_collections_dot_views_dot_3482612628": { - "string": "Deleted product from collection" + "string": "Видалений товар із колекції" }, "src_dot_collections_dot_views_dot_3791354625": { "context": "dialog title", "string": "Unassign products from collection" }, "src_dot_collections_dot_views_dot_523939418": { - "string": "Are you sure you want to delete {collectionName}?" + "string": "Ви впевнені, що хочете видалити {collectionName}?" }, "src_dot_collections_dot_views_dot_686910896": { "context": "window title", - "string": "Create collection" + "string": "Створити колекцію" }, "src_dot_collections_dot_views_dot_699514132": { "context": "dialog title", - "string": "Delete Collection" + "string": "Видалити колекцію" }, "src_dot_collections_dot_views_dot_870815507": { "context": "unassign product from collection, button", - "string": "Unassign" + "string": "Скасувати" }, "src_dot_collections_dot_views_dot_942133001": { "context": "dialog title", @@ -899,7 +899,7 @@ }, "src_dot_collections_dot_views_dot_CollectionList_dot_2637364047": { "context": "dialog title", - "string": "Unpublish collections" + "string": "Скасувати публікацію колекцій" }, "src_dot_collections_dot_views_dot_CollectionList_dot_2756013640": { "string": "{counter,plural,one {Are you sure you want to publish this collection?} other {Are you sure you want to publish {displayQuantity} collections?}}" @@ -910,7 +910,7 @@ }, "src_dot_collections_dot_views_dot_CollectionList_dot_3817188998": { "context": "dialog title", - "string": "Delete collections" + "string": "Видалити колекції" }, "src_dot_components_dot_AccountPermissionGroups_dot_2836633439": { "string": "Permission groups" @@ -951,13 +951,13 @@ "string": "місто" }, "src_dot_components_dot_AddressEdit_dot_2965971965": { - "string": "ZIP / Postal code" + "string": "Поштовий індекс" }, "src_dot_components_dot_AddressEdit_dot_3121963259": { "string": "Адреса 2" }, "src_dot_components_dot_AddressEdit_dot_3570415321": { - "string": "Company" + "string": "Компанія" }, "src_dot_components_dot_AddressEdit_dot_944851093": { "string": "Country area" @@ -975,32 +975,32 @@ }, "src_dot_components_dot_AssignCategoryDialog_dot_190977792": { "context": "dialog header", - "string": "Assign Categories" + "string": "Призначити категорії" }, "src_dot_components_dot_AssignCategoryDialog_dot_3690273268": { "string": "Search by category name, etc..." }, "src_dot_components_dot_AssignCategoryDialog_dot_3973677075": { "context": "button", - "string": "Assign categories" + "string": "Призначити категорії" }, "src_dot_components_dot_AssignCollectionDialog_dot_1035511604": { "context": "button", - "string": "Assign collections" + "string": "Призначити колекції" }, "src_dot_components_dot_AssignCollectionDialog_dot_2605414502": { "string": "Search by collection name, etc..." }, "src_dot_components_dot_AssignCollectionDialog_dot_3992923611": { "context": "dialog header", - "string": "Assign Collection" + "string": "Призначити колекцю" }, "src_dot_components_dot_AssignCollectionDialog_dot_4057224233": { "string": "Search Collection" }, "src_dot_components_dot_AssignProductDialog_dot_2100305525": { "context": "button", - "string": "Assign products" + "string": "Призначити товари" }, "src_dot_components_dot_AssignProductDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." @@ -1010,7 +1010,7 @@ }, "src_dot_components_dot_AssignProductDialog_dot_649693468": { "context": "dialog header", - "string": "Assign Product" + "string": "Призначити товар" }, "src_dot_components_dot_AutocompleteSelectMenu_dot_2332404293": { "string": "No results" @@ -1025,7 +1025,7 @@ }, "src_dot_components_dot_ColumnPicker_dot_2715399461": { "context": "pick columns to display", - "string": "{numberOfSelected} columns selected out of {numberOfTotal}" + "string": "{numberOfSelected} стовпців обрано з {numberOfTotal}" }, "src_dot_components_dot_CompanyAddressInput_dot_1139500589": { "string": "Країна" @@ -1040,13 +1040,13 @@ "string": "місто" }, "src_dot_components_dot_CompanyAddressInput_dot_2965971965": { - "string": "ZIP / Postal code" + "string": "Поштовий індекс" }, "src_dot_components_dot_CompanyAddressInput_dot_3121963259": { "string": "Адреса 2" }, "src_dot_components_dot_CompanyAddressInput_dot_3570415321": { - "string": "Company" + "string": "Компанія" }, "src_dot_components_dot_CompanyAddressInput_dot_944851093": { "string": "Country area" @@ -1057,18 +1057,18 @@ }, "src_dot_components_dot_CountryList_dot_2460766407": { "context": "number of countries", - "string": "{number} Countries" + "string": "Країни {number}" }, "src_dot_components_dot_CountryList_dot_2747492886": { "context": "button", - "string": "Assign countries" + "string": "Призначити країни" }, "src_dot_components_dot_DeleteFilterTabDialog_dot_2173195312": { "context": "custom search delete, dialog header", - "string": "Delete Search" + "string": "Видалити пошук" }, "src_dot_components_dot_DeleteFilterTabDialog_dot_71479100": { - "string": "Are you sure you want to delete {name} search tab?" + "string": "Ви впевнені, що хочете видалити {name} вкладку пошуку?" }, "src_dot_components_dot_ErrorMessageCard_dot_2845142593": { "context": "header", @@ -1076,7 +1076,7 @@ }, "src_dot_components_dot_ErrorPage_dot_1723676032": { "context": "button", - "string": "Back to home" + "string": "Повернутися на головну" }, "src_dot_components_dot_ErrorPage_dot_2736139139": { "string": "Ooops!..." @@ -1085,21 +1085,21 @@ "string": "Помилка" }, "src_dot_components_dot_ErrorPage_dot_3090161573": { - "string": "Don't worry, everything is gonna be fine" + "string": "Не хвилюйтесь, все буде добре" }, "src_dot_components_dot_ErrorPage_dot_3182212440": { - "string": "We've encountered a problem..." + "string": "Ми зіткнулися з проблемою..." }, "src_dot_components_dot_FileUpload_dot_3050254265": { "context": "upload file, button", - "string": "Upload" + "string": "Завантажити" }, "src_dot_components_dot_FilterBar_dot_2173195312": { "context": "button", - "string": "Delete Search" + "string": "Видалити пошук" }, "src_dot_components_dot_FilterBar_dot_2340527467": { - "string": "Custom Filter" + "string": "Спеціальний фільтр" }, "src_dot_components_dot_FilterBar_dot_3268463180": { "context": "button", @@ -1114,11 +1114,11 @@ }, "src_dot_components_dot_Filter_dot_2683154806": { "context": "is filter range or value", - "string": "equal to" + "string": "дорівнює" }, "src_dot_components_dot_Filter_dot_2779594451": { "context": "filter range separator", - "string": "and" + "string": "та" }, "src_dot_components_dot_Filter_dot_4190318230": { "context": "search results", @@ -1126,7 +1126,7 @@ }, "src_dot_components_dot_Filter_dot_773313536": { "context": "is filter range or value", - "string": "between" + "string": "між" }, "src_dot_components_dot_Filter_dot_996289613": { "string": "Фільтр" @@ -1145,7 +1145,7 @@ }, "src_dot_components_dot_MoneyRange_dot_12301532": { "context": "money", - "string": "to {money}" + "string": "до {money}" }, "src_dot_components_dot_MoneyRange_dot_1316359951": { "context": "money", @@ -1153,7 +1153,7 @@ }, "src_dot_components_dot_MoneyRange_dot_3729849657": { "context": "money", - "string": "from {money}" + "string": "від {money}" }, "src_dot_components_dot_MultiAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", @@ -1171,7 +1171,7 @@ }, "src_dot_components_dot_Navigator_dot_1167695965": { "context": "navigator placeholder", - "string": "Type Command" + "string": "Введіть команду" }, "src_dot_components_dot_Navigator_dot_1643417013": { "context": "navigator placeholder", @@ -1183,7 +1183,7 @@ }, "src_dot_components_dot_Navigator_dot_2874620973": { "context": "navigator placeholder", - "string": "Type {key} to see available actions" + "string": "Введіть {key}, щоб переглянути доступні дії" }, "src_dot_components_dot_Navigator_dot_2935523260": { "context": "navigator placeholder", @@ -1221,19 +1221,19 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_createCategory": { "context": "button", - "string": "Create Category" + "string": "Створити категорію" }, "src_dot_components_dot_Navigator_dot_modes_dot_createCollection": { "context": "button", - "string": "Create Collection" + "string": "Створити колекцію" }, "src_dot_components_dot_Navigator_dot_modes_dot_createCustomer": { "context": "button", - "string": "Create Customer" + "string": "Створити клієнта" }, "src_dot_components_dot_Navigator_dot_modes_dot_createOrder": { "context": "button", - "string": "Create Order" + "string": "Створити замовлення" }, "src_dot_components_dot_Navigator_dot_modes_dot_createPermissionGroup": { "context": "button", @@ -1241,11 +1241,11 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_createProduct": { "context": "button", - "string": "Create Product" + "string": "Створити товар" }, "src_dot_components_dot_Navigator_dot_modes_dot_createVoucher": { "context": "button", - "string": "Create Voucher" + "string": "Створити купон" }, "src_dot_components_dot_Navigator_dot_modes_dot_customerWithName": { "string": "{firstName} {lastName}" @@ -1272,7 +1272,7 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_helpMode": { "context": "navigator help mode description", - "string": "Display Help" + "string": "Показати довідку" }, "src_dot_components_dot_Navigator_dot_modes_dot_helpOrdersMode": { "context": "navigator order mode description", @@ -1317,7 +1317,7 @@ "string": "Invalid content" }, "src_dot_components_dot_RichTextEditor_dot_2925475978": { - "string": "URL Linked" + "string": "URL-адреса" }, "src_dot_components_dot_RichTextEditor_dot_4035057905": { "string": "Image URL" @@ -1335,10 +1335,10 @@ }, "src_dot_components_dot_SearchBar_dot_2173195312": { "context": "button", - "string": "Delete Search" + "string": "Видалити пошук" }, "src_dot_components_dot_SearchBar_dot_2340527467": { - "string": "Custom Filter" + "string": "Спеціальний фільтр" }, "src_dot_components_dot_SearchBar_dot_3268463180": { "context": "button", @@ -1351,7 +1351,7 @@ "string": "Search engine description" }, "src_dot_components_dot_SeoForm_dot_2378618579": { - "string": "If empty, the preview shows what will be autogenerated." + "string": "Якщо порожньо, попередній перегляд покаже, що буде створено автоматично" }, "src_dot_components_dot_SeoForm_dot_3198271020": { "context": "button", @@ -1362,7 +1362,7 @@ }, "src_dot_components_dot_SeoForm_dot_3877274856": { "context": "character limit", - "string": "{numberOfCharacters} of {maxCharacters} characters" + "string": "{numberOfCharacters} з {maxCharacters} символів" }, "src_dot_components_dot_SingleAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", @@ -1389,7 +1389,7 @@ }, "src_dot_components_dot_VisibilityCard_dot_1459686496": { "context": "section header", - "string": "Visibility" + "string": "Видимість" }, "src_dot_components_dot_VisibilityCard_dot_2060790769": { "context": "publish on date", @@ -1399,14 +1399,14 @@ "string": "Set publication date" }, "src_dot_components_dot_VisibilityCard_dot_643174786": { - "string": "Visible" + "string": "Видимий" }, "src_dot_components_dot_VisibilityCard_dot_77815154": { "string": "Hidden" }, "src_dot_components_dot_WeightRange_dot_264731940": { "context": "weight", - "string": "to {value} {unit}" + "string": "до {value} {unit}" }, "src_dot_components_dot_WeightRange_dot_2892071052": { "context": "weight", @@ -1414,7 +1414,7 @@ }, "src_dot_components_dot_WeightRange_dot_4256193688": { "context": "weight", - "string": "from {value} {unit}" + "string": "від {value} {unit}" }, "src_dot_components_dot_Weight_dot_2781622322": { "context": "weight", @@ -1431,10 +1431,10 @@ "string": "Shipping Settings" }, "src_dot_configuration_dot_1639245766": { - "string": "View and update your webhook and their settings" + "string": "Перегляд та оновлення вебхуків та їх налаштувань" }, "src_dot_configuration_dot_2326418019": { - "string": "Attributes and Product Typess" + "string": "Атрибути та типи продуктів" }, "src_dot_configuration_dot_2387898569": { "string": "Manage external integrations accounts" @@ -1447,7 +1447,7 @@ }, "src_dot_confirm": { "context": "button", - "string": "Confirm" + "string": "Підтвердіть" }, "src_dot_create": { "context": "button", @@ -1467,7 +1467,7 @@ }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_1090326769": { "context": "customer's address book, header", - "string": "{fullName}'s Address Book" + "string": "{fullName} Адресна книга" }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_1428369222": { "string": "This customer doesn’t have any adresses added to his address book. You can add address using the button below." @@ -1481,13 +1481,13 @@ }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_489918044": { "context": "customer details, header", - "string": "{fullName} Details" + "string": "{fullName} Деталі" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_1224809208": { - "string": "Default Address" + "string": "Адреса за замовчуванням" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_1578192486": { - "string": "Default Billing Address" + "string": "Платіжна адреса за замовчуванням" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_2131178753": { "context": "button", @@ -1498,7 +1498,7 @@ "string": "Set as default billing address" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_4109348993": { - "string": "Default Shipping Address" + "string": "Адреса доставки за замовчуванням" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_1967111456": { "context": "header", @@ -1513,11 +1513,11 @@ "string": "Адреса" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_3870425261": { - "string": "This customer has no addresses yet" + "string": "Цей клієнт ще не має адреси" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_4282475982": { "context": "subsection header", - "string": "Billing Address" + "string": "Адреса виставлення рахунку" }, "src_dot_customers_dot_components_dot_CustomerCreateAddress_dot_1751533141": { "context": "page header", @@ -1528,7 +1528,7 @@ }, "src_dot_customers_dot_components_dot_CustomerCreateDetails_dot_3063084773": { "context": "header", - "string": "Customer Overview" + "string": "Огляд клієнта" }, "src_dot_customers_dot_components_dot_CustomerCreateNote_dot_1520756907": { "context": "notes about customer header", @@ -1543,15 +1543,15 @@ }, "src_dot_customers_dot_components_dot_CustomerCreatePage_dot_4025686004": { "context": "page header", - "string": "Create Customer" + "string": "Створити клієнта" }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_2968565128": { "context": "check to mark this account as active", - "string": "User account active" + "string": "Обліковий запис користувача активний" }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_3298169382": { "context": "section subheader", - "string": "Active member since {date}" + "string": "Активний учасник з {date}" }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_577013340": { "context": "note about customer", @@ -1563,14 +1563,14 @@ }, "src_dot_customers_dot_components_dot_CustomerInfo_dot_778526801": { "context": "customer contact section, header", - "string": "Contact Informations" + "string": "Контактна інформація" }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_1643417013": { "string": "Search Customer" }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_2859116187": { "context": "button", - "string": "Create customer" + "string": "Створити клієнта" }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_477293306": { "context": "tab name", @@ -1594,10 +1594,10 @@ "string": "No customers found" }, "src_dot_customers_dot_components_dot_CustomerList_dot_2339105195": { - "string": "Customer Email" + "string": "Електронна пошта клієнта" }, "src_dot_customers_dot_components_dot_CustomerList_dot_4154265139": { - "string": "Customer Name" + "string": "Ім'я клієнта" }, "src_dot_customers_dot_components_dot_CustomerOrders_dot_1756106276": { "context": "order status", @@ -1613,7 +1613,7 @@ }, "src_dot_customers_dot_components_dot_CustomerOrders_dot_3029139173": { "context": "button", - "string": "View all orders" + "string": "Переглянути всі замовлення" }, "src_dot_customers_dot_components_dot_CustomerOrders_dot_4205493358": { "context": "order placement date", @@ -1634,15 +1634,15 @@ }, "src_dot_customers_dot_components_dot_CustomerStats_dot_2543847016": { "context": "section header", - "string": "Customer History" + "string": "Історія клієнта" }, "src_dot_customers_dot_views_dot_1927691511": { "context": "delete customer, dialog content", - "string": "Are you sure you want to delete {email}?" + "string": "Ви впевнені, що хочете видалити {email}?" }, "src_dot_customers_dot_views_dot_1998583641": { "context": "dialog header", - "string": "Delete Customer" + "string": "Видалити клієнта" }, "src_dot_customers_dot_views_dot_2657976015": { "context": "dialog header", @@ -1650,23 +1650,23 @@ }, "src_dot_customers_dot_views_dot_2859116187": { "context": "window title", - "string": "Create customer" + "string": "Створити клієнта" }, "src_dot_customers_dot_views_dot_3689332763": { - "string": "Are you sure you want to delete this address from users address book?" + "string": "Ви впевнені, що хочете видалити цю адресу з адресної книги користувачів?" }, "src_dot_customers_dot_views_dot_3901579344": { - "string": "Customer Removed" + "string": "Клієнта видалено" }, "src_dot_customers_dot_views_dot_3970234993": { - "string": "Customer created" + "string": "Клієнт створений" }, "src_dot_customers_dot_views_dot_CustomerList_dot_1932444813": { "string": "{counter,plural,one {Are you sure you want to delete this customer?} other {Are you sure you want to delete {displayQuantity} customers?}}" }, "src_dot_customers_dot_views_dot_CustomerList_dot_2136923553": { "context": "dialog header", - "string": "Delete Customers" + "string": "Видалити клієнтів" }, "src_dot_dashboard": { "string": "Центр керування " @@ -1675,6 +1675,10 @@ "context": "button", "string": "Видалити" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Опис" }, @@ -1682,7 +1686,7 @@ "string": "Знижки " }, "src_dot_discounts_dot_components_dot_DiscountCategories_dot_1567318211": { - "string": "Category name" + "string": "Назва категорії" }, "src_dot_discounts_dot_components_dot_DiscountCategories_dot_1681512341": { "context": "section header", @@ -1697,11 +1701,11 @@ }, "src_dot_discounts_dot_components_dot_DiscountCategories_dot_3973677075": { "context": "button", - "string": "Assign categories" + "string": "Призначити категорії" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_1035511604": { "context": "button", - "string": "Assign collections" + "string": "Призначити колекції" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_2137803833": { "string": "No collections found" @@ -1711,7 +1715,7 @@ "string": "Продукти" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_3011396316": { - "string": "Collection name" + "string": "Назва колекції" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_452750900": { "context": "section header", @@ -1719,7 +1723,7 @@ }, "src_dot_discounts_dot_components_dot_DiscountCountrySelectDialog_dot_1585396479": { "context": "dialog header", - "string": "Assign Countries" + "string": "Призначити країни" }, "src_dot_discounts_dot_components_dot_DiscountCountrySelectDialog_dot_2110418881": { "context": "search box placeholder", @@ -1734,11 +1738,11 @@ }, "src_dot_discounts_dot_components_dot_DiscountCountrySelectDialog_dot_2747492886": { "context": "button", - "string": "Assign countries" + "string": "Призначити країни" }, "src_dot_discounts_dot_components_dot_DiscountCountrySelectDialog_dot_2777439857": { "context": "country selection", - "string": "Countries A to Z" + "string": "Країни від А до Я" }, "src_dot_discounts_dot_components_dot_DiscountDates_dot_1596226028": { "context": "voucher end date, switch button", @@ -1749,11 +1753,11 @@ "string": "Активні дати" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_1657559629": { - "string": "No products found" + "string": "Не знайдено жодного товару" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_2100305525": { "context": "button", - "string": "Assign products" + "string": "Призначити товари" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_2341910657": { "context": "product is not published", @@ -1775,7 +1779,7 @@ }, "src_dot_discounts_dot_components_dot_SaleCreatePage_dot_3866518732": { "context": "page header", - "string": "Create Sale" + "string": "Створити розпродаж" }, "src_dot_discounts_dot_components_dot_SaleInfo_dot_636461959": { "context": "sale name", @@ -1786,7 +1790,7 @@ }, "src_dot_discounts_dot_components_dot_SaleListPage_dot_3866518732": { "context": "button", - "string": "Create Sale" + "string": "Створити розпродаж" }, "src_dot_discounts_dot_components_dot_SaleListPage_dot_3907768880": { "context": "tab name", @@ -1821,7 +1825,7 @@ "string": "Статус" }, "src_dot_discounts_dot_components_dot_SaleListPage_dot_type": { - "string": "Discount Type" + "string": "Тип знижки" }, "src_dot_discounts_dot_components_dot_SaleList_dot_1148029984": { "context": "sale value", @@ -1852,7 +1856,7 @@ }, "src_dot_discounts_dot_components_dot_SaleType_dot_3216816841": { "context": "percentage or fixed, header", - "string": "Discount Type" + "string": "Тип знижки" }, "src_dot_discounts_dot_components_dot_SaleType_dot_3688224049": { "context": "discount type", @@ -1868,11 +1872,11 @@ }, "src_dot_discounts_dot_components_dot_SaleValue_dot_1205967018": { "context": "sale discount", - "string": "Discount Value" + "string": "Значення знижки" }, "src_dot_discounts_dot_components_dot_VoucherCreatePage_dot_1357216572": { "context": "page header", - "string": "Create Voucher" + "string": "Створити купон" }, "src_dot_discounts_dot_components_dot_VoucherDates_dot_1596226028": { "context": "voucher end date, switch button", @@ -1883,10 +1887,10 @@ "string": "Активні дати" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_2071139683": { - "string": "Voucher applies to all countries" + "string": "Купони поширюються на всі країни" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_2102960822": { - "string": "Voucher is limited to these countries" + "string": "Купони обмежуються цими країнами" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_3109712047": { "context": "voucher country range", @@ -1894,18 +1898,18 @@ }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_346170541": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "Категорії ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_3673147015": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "Колекції ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_846927739": { "context": "number of products", "string": "Products ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherInfo_dot_1262795626": { - "string": "Discount Code" + "string": "Код знижки" }, "src_dot_discounts_dot_components_dot_VoucherInfo_dot_1944363009": { "context": "voucher code, button", @@ -1920,7 +1924,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_3751756157": { "context": "voucher usage limit, header", - "string": "Usage Limit" + "string": "Обмеження використання" }, "src_dot_discounts_dot_components_dot_VoucherLimits_dot_557552777": { "context": "voucher", @@ -1935,7 +1939,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_614836274": { "context": "button", - "string": "Create voucher" + "string": "Створити купон" }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_active": { "context": "voucher status", @@ -1967,10 +1971,10 @@ }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_timesUsed": { "context": "voucher", - "string": "Times used" + "string": "Використовувані часи" }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_type": { - "string": "Discount Type" + "string": "Тип знижки" }, "src_dot_discounts_dot_components_dot_VoucherList_dot_1148029984": { "context": "voucher value", @@ -1986,7 +1990,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherList_dot_3917820600": { "context": "voucher uses", - "string": "Uses" + "string": "Використовується" }, "src_dot_discounts_dot_components_dot_VoucherList_dot_47059407": { "context": "voucher is active from date", @@ -2025,11 +2029,11 @@ }, "src_dot_discounts_dot_components_dot_VoucherSummary_dot_2735425668": { "context": "voucher", - "string": "Applies to" + "string": "Відноситься до" }, "src_dot_discounts_dot_components_dot_VoucherSummary_dot_3751756157": { "context": "voucher value requirement", - "string": "Usage Limit" + "string": "Обмеження використання" }, "src_dot_discounts_dot_components_dot_VoucherSummary_dot_78726751": { "context": "voucher code", @@ -2037,7 +2041,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherTypes_dot_3216816841": { "context": "header", - "string": "Discount Type" + "string": "Тип знижки" }, "src_dot_discounts_dot_components_dot_VoucherTypes_dot_3289659291": { "context": "voucher discount type", @@ -2056,14 +2060,14 @@ "string": "Значення" }, "src_dot_discounts_dot_components_dot_VoucherValue_dot_1205967018": { - "string": "Discount Value" + "string": "Значення знижки" }, "src_dot_discounts_dot_components_dot_VoucherValue_dot_1492866942": { "context": "voucher application, switch button", "string": "Only once per order" }, "src_dot_discounts_dot_components_dot_VoucherValue_dot_1960678372": { - "string": "Voucher Specific Information" + "string": "Конкретна інформація по купону" }, "src_dot_discounts_dot_components_dot_VoucherValue_dot_4189095909": { "string": "If this option is disabled, discount will be counted for every eligible product" @@ -2081,7 +2085,7 @@ "string": "Відправлення " }, "src_dot_discounts_dot_views_dot_1162257691": { - "string": "Deleted voucher" + "string": "Видалений купон" }, "src_dot_discounts_dot_views_dot_1402402714": { "context": "dialog header", @@ -2089,7 +2093,7 @@ }, "src_dot_discounts_dot_views_dot_1457489953": { "context": "dialog content", - "string": "Are you sure you want to delete {saleName}?" + "string": "Ви впевнені, що хочете видалити {saleName}?" }, "src_dot_discounts_dot_views_dot_1827854264": { "context": "dialog header", @@ -2120,7 +2124,7 @@ }, "src_dot_discounts_dot_views_dot_3261917848": { "context": "dialog content", - "string": "Are you sure you want to delete {voucherCode}?" + "string": "Ви впевнені, що хочете видалити {voucherCode}?" }, "src_dot_discounts_dot_views_dot_3395246518": { "context": "dialog header", @@ -2131,7 +2135,7 @@ }, "src_dot_discounts_dot_views_dot_506030254": { "context": "dialog header", - "string": "Delete Sale" + "string": "Видалити розпродаж" }, "src_dot_discounts_dot_views_dot_655651329": { "string": "Successfully created voucher" @@ -2142,11 +2146,11 @@ }, "src_dot_discounts_dot_views_dot_895379508": { "context": "dialog header", - "string": "Delete Voucher" + "string": "Видалити купон" }, "src_dot_discounts_dot_views_dot_SaleList_dot_2809303671": { "context": "dialog header", - "string": "Delete Sales" + "string": "Видалити розпродажі" }, "src_dot_discounts_dot_views_dot_SaleList_dot_372098008": { "context": "dialog content", @@ -2158,7 +2162,7 @@ }, "src_dot_discounts_dot_views_dot_VoucherList_dot_367317371": { "context": "dialog header", - "string": "Delete Vouchers" + "string": "Видалити купони" }, "src_dot_done": { "context": "button", @@ -2170,17 +2174,17 @@ }, "src_dot_draftOrders": { "context": "draft orders section name", - "string": "Draft Orders" + "string": "Чернетка замовлень" }, "src_dot_drafts": { - "string": "Drafts" + "string": "Чернетки" }, "src_dot_edit": { "context": "button", "string": "Редагувати" }, "src_dot_email": { - "string": "E-mail Address" + "string": "Електронна адреса" }, "src_dot_endDate": { "string": "End Date" @@ -2200,7 +2204,7 @@ }, "src_dot_home": { "context": "home section name", - "string": "Дім " + "string": "Головна" }, "src_dot_home_dot_components_dot_HomeActivityCard_dot_draft": { "string": "Order #{orderId} was placed from draft by {userEmail}" @@ -2247,7 +2251,7 @@ }, "src_dot_orders_dot_components_dot_OrderBulkCancelDialog_dot_1528036340": { "context": "dialog header", - "string": "Cancel Orders" + "string": "Скасувати замовлення" }, "src_dot_orders_dot_components_dot_OrderBulkCancelDialog_dot_4224885638": { "string": "{counter,plural,one {Are you sure you want to cancel this order?} other {Are you sure you want to cancel {displayQuantity} orders?}}" @@ -2271,14 +2275,14 @@ }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2312694610": { "context": "subheader", - "string": "Contact Information" + "string": "Контактна інформація" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2433460203": { "string": "Search Customers" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2672803871": { "context": "link", - "string": "View Profile" + "string": "Переглянути профіль" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2758581442": { "string": "Shipping Address" @@ -2292,10 +2296,10 @@ "string": "Same as shipping address" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_4172383244": { - "string": "Anonymous user" + "string": "Анонімний користувач" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_4282475982": { - "string": "Billing Address" + "string": "Адреса виставлення рахунку" }, "src_dot_orders_dot_components_dot_OrderDetailsPage_dot_1854613983": { "context": "button", @@ -2303,10 +2307,10 @@ }, "src_dot_orders_dot_components_dot_OrderDraftCancelDialog_dot_1961675716": { "context": "dialog header", - "string": "Delete Daft Order" + "string": "Видалити чернетку замовлення" }, "src_dot_orders_dot_components_dot_OrderDraftCancelDialog_dot_66064347": { - "string": "Are you sure you want to delete draft #{orderNumber}?" + "string": "Ви впевнені, що хочете видалити чернетку #{orderNumber}?" }, "src_dot_orders_dot_components_dot_OrderDraftDetailsProducts_dot_1134347598": { "context": "price or ordered products", @@ -2353,7 +2357,7 @@ "string": "Додати товари" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_115822814": { - "string": "No billing address" + "string": "Платіжна адреса відсутня" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_1161061962": { "context": "dialog header", @@ -2379,7 +2383,7 @@ "string": "Some products require shipping, but no method provided" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_3358029330": { - "string": "Are you sure you want to finalize draft #{orderNumber}?" + "string": "Ви впевнені, що хочете завершити чернетку #{orderNumber}?" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_678764806": { "context": "button", @@ -2387,7 +2391,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_2826235371": { "context": "button", - "string": "Create order" + "string": "Створити замовлення" }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_551325728": { "context": "tab name", @@ -2398,7 +2402,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_created": { "context": "draft order", - "string": "Created" + "string": "Створено" }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_customer": { "context": "draft order", @@ -2477,7 +2481,7 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillmentCancelDialog_dot_732594284": { "context": "dialog header", - "string": "Cancel Fulfillment" + "string": "Скасувати виконання" }, "src_dot_orders_dot_components_dot_OrderFulfillmentDialog_dot_2796503714": { "context": "quantity of fulfilled products", @@ -2522,7 +2526,7 @@ "string": "Кількість" }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_3254150098": { - "string": "Tracking Number: {trackingNumber}" + "string": "Номер відслідковування: {trackingNumber}" }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_3494686506": { "context": "section header", @@ -2532,9 +2536,13 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", - "string": "Cancel Fulfillment" + "string": "Скасувати виконання" }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_77179533": { "context": "fulfillment group", @@ -2590,7 +2598,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_2655541129": { "context": "order history message", - "string": "Order was fully paid" + "string": "Замовлення було повністю оплачено" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_2770854455": { "context": "order history message", @@ -2602,7 +2610,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_3095247195": { "context": "order history message", - "string": "Draft order was created" + "string": "Чернетку замовлення створено" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_3328124376": { "context": "order history message", @@ -2649,7 +2657,7 @@ }, "src_dot_orders_dot_components_dot_OrderListPage_dot_2826235371": { "context": "button", - "string": "Create order" + "string": "Створити замовлення" }, "src_dot_orders_dot_components_dot_OrderListPage_dot_355376157": { "string": "Search Orders..." @@ -2664,7 +2672,7 @@ }, "src_dot_orders_dot_components_dot_OrderListPage_dot_placed": { "context": "order", - "string": "Created" + "string": "Створено" }, "src_dot_orders_dot_components_dot_OrderList_dot_1198046928": { "string": "Fulfillment status" @@ -2692,7 +2700,7 @@ "string": "No orders found" }, "src_dot_orders_dot_components_dot_OrderMarkAsPaidDialog_dot_2823153104": { - "string": "Are you sure you want to mark this order as paid?" + "string": "Ви впевнені, що хочете позначити це замовлення як оплачене?" }, "src_dot_orders_dot_components_dot_OrderMarkAsPaidDialog_dot_4196844912": { "context": "dialog header", @@ -2700,7 +2708,7 @@ }, "src_dot_orders_dot_components_dot_OrderPaymentDialog_dot_1466130374": { "context": "dialog header", - "string": "Capture Payment" + "string": "Зарахувати платіж" }, "src_dot_orders_dot_components_dot_OrderPaymentDialog_dot_250371749": { "context": "dialog header", @@ -2711,11 +2719,11 @@ "string": "Обсяг" }, "src_dot_orders_dot_components_dot_OrderPaymentVoidDialog_dot_2217048637": { - "string": "Are you sure you want to void this payment?" + "string": "Ви впевнені, що хочете відмінити цей платіж?" }, "src_dot_orders_dot_components_dot_OrderPaymentVoidDialog_dot_3089049828": { "context": "dialog header", - "string": "Void Payment" + "string": "Відмінити платіж" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_1325966144": { "context": "order shipping method name", @@ -2723,11 +2731,11 @@ }, "src_dot_orders_dot_components_dot_OrderPayment_dot_1817306106": { "context": "vat included in order price", - "string": "VAT included" + "string": "ПДВ включено" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_2183023165": { "context": "ordered products", - "string": "{quantity} items" + "string": "{quantity} предметів" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_2320183694": { "context": "order payment", @@ -2735,7 +2743,7 @@ }, "src_dot_orders_dot_components_dot_OrderPayment_dot_2444197639": { "context": "void payment, button", - "string": "Void" + "string": "Відмінити" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_2845258362": { "context": "button", @@ -2749,12 +2757,16 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Знижка " + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Попередньо авторизована оплата" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3955023266": { - "string": "Taxes" + "string": "Податки" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_4211710217": { "context": "capture payment, button", @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Разом" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Додати продукт" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2807,7 +2819,11 @@ }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_2886647373": { "context": "section header", - "string": "Unfulfilled ({quantity})" + "string": "Невиконано ({quantity})" + }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", @@ -2865,10 +2881,10 @@ }, "src_dot_orders_dot_views_dot_OrderDraftList_dot_1161115149": { "context": "dialog header", - "string": "Delete Order Drafts" + "string": "Видалити чернетки замовлень" }, "src_dot_orders_dot_views_dot_OrderDraftList_dot_1648805446": { - "string": "Deleted draft orders" + "string": "Видалити чернутки замовлень" }, "src_dot_orders_dot_views_dot_OrderDraftList_dot_1738939038": { "string": "Order draft successfully created" @@ -2898,18 +2914,18 @@ }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1068617485": { "context": "page header", - "string": "Create Page" + "string": "Створити сторінку" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1815688500": { "context": "page", - "string": "since {date}" + "string": "розміщено з {date}" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1996767833": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цієї сторінки" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_2001551496": { "context": "page", - "string": "will be visible from {date}" + "string": "буде видно з {date}" }, "src_dot_pages_dot_components_dot_PageInfo_dot_1116746286": { "context": "page content", @@ -2921,7 +2937,7 @@ }, "src_dot_pages_dot_components_dot_PageListPage_dot_3785394515": { "context": "button", - "string": "Create page" + "string": "Створити замовлення" }, "src_dot_pages_dot_components_dot_PageList_dot_1124600214": { "context": "dialog header", @@ -2929,14 +2945,14 @@ }, "src_dot_pages_dot_components_dot_PageList_dot_1459686496": { "context": "page status", - "string": "Visibility" + "string": "Видимість" }, "src_dot_pages_dot_components_dot_PageList_dot_2489163252": { "string": "No pages found" }, "src_dot_pages_dot_components_dot_PageList_dot_3478065224": { "context": "page internal name", - "string": "Slug" + "string": "Описова частина" }, "src_dot_pages_dot_components_dot_PageList_dot_3640454975": { "context": "page status", @@ -2951,25 +2967,25 @@ }, "src_dot_pages_dot_components_dot_PageSlug_dot_3478065224": { "context": "page internal name", - "string": "Slug" + "string": "Описова частина" }, "src_dot_pages_dot_components_dot_PageSlug_dot_4210828158": { "string": "If empty, URL will be autogenerated from Page Name" }, "src_dot_pages_dot_views_dot_1068617485": { "context": "header", - "string": "Create Page" + "string": "Створити сторінку" }, "src_dot_pages_dot_views_dot_2680158037": { "string": "Successfully created new page" }, "src_dot_pages_dot_views_dot_3246254285": { "context": "dialog header", - "string": "Delete Page" + "string": "Видалити замовлення" }, "src_dot_pages_dot_views_dot_754348000": { "context": "delete page", - "string": "Are you sure you want to delete {title}?" + "string": "Ви впевнені, що хочете видалити {title}?" }, "src_dot_pages_dot_views_dot_PageList_dot_1080715663": { "context": "notification", @@ -2981,7 +2997,7 @@ }, "src_dot_pages_dot_views_dot_PageList_dot_158565417": { "context": "dialog header", - "string": "Unpublish Pages" + "string": "Скасувати публікацію торінки" }, "src_dot_pages_dot_views_dot_PageList_dot_1640740095": { "context": "dialog content", @@ -3009,7 +3025,7 @@ }, "src_dot_pages_dot_views_dot_PageList_dot_2782958373": { "context": "dialog header", - "string": "Delete Pages" + "string": "Видалити сторінки" }, "src_dot_paid": { "context": "payment status", @@ -3033,7 +3049,7 @@ }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1731102929": { "context": "button", @@ -3112,7 +3128,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_136112637": { "context": "empty list message", @@ -3157,14 +3173,14 @@ }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupCreate_dot_1140231710": { "context": "window title", - "string": "Create category" + "string": "Створити категорію" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupCreate_dot_3930588328": { "string": "Permission group created" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupDetails_dot_870815507": { "context": "button title", - "string": "Unassign" + "string": "Скасувати" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupList_dot_92979760": { "string": "Permission Group Deleted" @@ -3175,7 +3191,7 @@ }, "src_dot_plugins_dot_components_dot_PluginAuthorization_dot_768575093": { "context": "section header", - "string": "Authorization" + "string": "Авторизація" }, "src_dot_plugins_dot_components_dot_PluginInfo_dot_1049131348": { "context": "plugin name", @@ -3194,7 +3210,7 @@ }, "src_dot_plugins_dot_components_dot_PluginSecretFieldDialog_dot_3032939398": { "context": "header", - "string": "Add Value to Authorization Field" + "string": "Додати значення в полі авторизації" }, "src_dot_plugins_dot_components_dot_PluginSecretFieldDialog_dot_4269236107": { "context": "header", @@ -3210,7 +3226,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsDetailsPage_dot_3352026836": { "context": "header", - "string": "{pluginName} Details" + "string": "Деталі {pluginName}" }, "src_dot_plugins_dot_components_dot_PluginsDetailsPage_dot_3425535100": { "context": "section header", @@ -3227,7 +3243,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_3523826683": { "context": "tab name", - "string": "All Plugins" + "string": "Всі плагіни" }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_active": { "context": "plugin", @@ -3235,7 +3251,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_deactivated": { "context": "plugin", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_plugins_dot_components_dot_PluginsList_dot_3247064221": { "context": "plugin status", @@ -3254,7 +3270,7 @@ }, "src_dot_plugins_dot_views_dot_1096544448": { "context": "header", - "string": "Authorization Field Delete" + "string": "Видалити поле авторизації" }, "src_dot_plugins_dot_views_dot_955370043": { "string": "The plugin may stop working after this field is cleared. Are you sure you want to proceed?" @@ -3265,11 +3281,11 @@ }, "src_dot_productTypes_dot_components_dot_AssignAttributeDialog_dot_2173976534": { "context": "button", - "string": "Assign attributes" + "string": "Призначити атрибути" }, "src_dot_productTypes_dot_components_dot_AssignAttributeDialog_dot_3922579741": { "context": "dialog header", - "string": "Assign Attribute" + "string": "Призначити атрибут" }, "src_dot_productTypes_dot_components_dot_AssignAttributeDialog_dot_4205644805": { "string": "No results found" @@ -3281,7 +3297,7 @@ "string": "Search Attributes" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributeEditDialog_dot_1228425832": { - "string": "Attribute name" + "string": "Назва атрибуту" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributeEditDialog_dot_335542212": { "string": "Значення атрибутів" @@ -3291,21 +3307,21 @@ "string": "Unassign Attribute From Product Type" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributeUnassignDialog_dot_722498450": { - "string": "Are you sure you want to unassign {attributeName} from {productTypeName}?" + "string": "Ви впевнені, що хочете скасувати призначення {attributeName} з {productTypeName}?" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_1192828581": { "string": "No attributes found" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_1228425832": { - "string": "Attribute name" + "string": "Назва атрибуту" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_1656462109": { "context": "button", - "string": "Assign attribute" + "string": "Призначити атрибут" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_3478065224": { "context": "attribute internal name", - "string": "Slug" + "string": "Описова частина" }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_3559259966": { "context": "section header", @@ -3313,7 +3329,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeAttributes_dot_888493112": { "context": "section header", - "string": "Variant Attributes" + "string": "Варіантні атрибутів" }, "src_dot_productTypes_dot_components_dot_ProductTypeBulkAttributeUnassignDialog_dot_2646729060": { "context": "unassign multiple attributes from product type", @@ -3329,7 +3345,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeDeleteDialog_dot_924066985": { "context": "dialog header", - "string": "Delete Product Type" + "string": "Видалити тип товару" }, "src_dot_productTypes_dot_components_dot_ProductTypeDetailsPage_dot_1217376589": { "context": "switch button", @@ -3347,11 +3363,11 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_3479705616": { "context": "button", - "string": "create product type" + "string": "створити тип товару" }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_configurable": { "context": "product type", - "string": "Configurable" + "string": "Налаштовується" }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_digital": { "context": "product", @@ -3363,7 +3379,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_type": { "context": "product type is digital or physical", - "string": "Type" + "string": "Тип" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_1126553969": { "string": "No product types found" @@ -3378,15 +3394,15 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_1952810469": { "context": "product type is either simple or configurable", - "string": "Type" + "string": "Тип" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_2253986440": { "context": "product type name", - "string": "Type Name" + "string": "Введіть назву" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_2754779425": { "context": "product type", - "string": "Configurable" + "string": "Налаштовується" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_881286562": { "context": "product type", @@ -3405,17 +3421,17 @@ "string": "Is this product shippable?" }, "src_dot_productTypes_dot_components_dot_ProductTypeShipping_dot_2927891783": { - "string": "Used to calculate rates for shipping for products of this product type, when specific weight is not given" + "string": "Використовується для обчислення тарифів на доставку продукції цього типу товару, коли конкретна вага не наводиться" }, "src_dot_productTypes_dot_components_dot_ProductTypeShipping_dot_746695941": { - "string": "Weight" + "string": "Вага" }, "src_dot_productTypes_dot_views_dot_3822478981": { "string": "Successfully created product type" }, "src_dot_productTypes_dot_views_dot_ProductTypeList_dot_4080551769": { "context": "dialog header", - "string": "Delete Product Types" + "string": "Видалити типи товарів" }, "src_dot_productTypes_dot_views_dot_ProductTypeList_dot_4269954457": { "context": "dialog content", @@ -3426,7 +3442,7 @@ }, "src_dot_productTypes_dot_views_dot_ProductTypeUpdate_dot_870815507": { "context": "unassign attribute from product type, button", - "string": "Unassign" + "string": "Скасувати" }, "src_dot_products": { "context": "products section name", @@ -3434,7 +3450,7 @@ }, "src_dot_products_dot_components_dot_ProductAttributes_dot_1071548120": { "context": "number of product attributes", - "string": "{number} Attributes" + "string": "{number} Властивості" }, "src_dot_products_dot_components_dot_ProductAttributes_dot_1148029984": { "context": "attribute value", @@ -3460,11 +3476,11 @@ }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_1815688500": { "context": "product", - "string": "since {date}" + "string": "розміщено з {date}" }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_2001551496": { "context": "product", - "string": "will be visible from {date}" + "string": "буде видно з {date}" }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_2706108815": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цього товару" @@ -3503,11 +3519,11 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_1542417144": { "context": "button", - "string": "Create Product" + "string": "Створити товар" }, "src_dot_products_dot_components_dot_ProductListPage_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_products_dot_components_dot_ProductListPage_dot_3550330425": { "string": "Search Products..." @@ -3522,7 +3538,7 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_available": { "context": "product status", - "string": "Available" + "string": "Доступні" }, "src_dot_products_dot_components_dot_ProductListPage_dot_hidden": { "context": "product is hidden", @@ -3541,22 +3557,22 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_visibility": { "context": "product visibility", - "string": "Visibility" + "string": "Видимість" }, "src_dot_products_dot_components_dot_ProductListPage_dot_visible": { "context": "product is visible", - "string": "Visible" + "string": "Видимий" }, "src_dot_products_dot_components_dot_ProductList_dot_1134347598": { "context": "product price", "string": "Ціна" }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { - "string": "No products found" + "string": "Не знайдено жодного товару" }, "src_dot_products_dot_components_dot_ProductList_dot_1952810469": { "context": "product type", - "string": "Type" + "string": "Тип" }, "src_dot_products_dot_components_dot_ProductList_dot_2341910657": { "context": "product status", @@ -3586,7 +3602,7 @@ }, "src_dot_products_dot_components_dot_ProductOrganization_dot_2754779425": { "context": "product is configurable", - "string": "Configurable" + "string": "Налаштовується" }, "src_dot_products_dot_components_dot_ProductOrganization_dot_2805838453": { "context": "field is optional", @@ -3611,7 +3627,7 @@ }, "src_dot_products_dot_components_dot_ProductStocks_dot_2622674857": { "context": "tabel column header", - "string": "Warehouse Name" + "string": "Назва складу" }, "src_dot_products_dot_components_dot_ProductStocks_dot_2729628316": { "context": "tabel column header", @@ -3621,38 +3637,35 @@ "context": "header", "string": "Кількість" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_1815688500": { "context": "product", - "string": "since {date}" + "string": "розміщено з {date}" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2001551496": { "context": "product", - "string": "will be visible from {date}" + "string": "буде видно з {date}" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2706108815": { "string": "Додати заголовок та опис для пошукової системи, щоб полегшити пошук цього товару" }, "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_1536841622": { "context": "product attribute error", - "string": "All attributes should have value" + "string": "Всі атрибути повинні мати значення" }, "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_258966189": { "context": "product attribute error", - "string": "This variant already exists" + "string": "Цей варіант вже існує" }, "src_dot_products_dot_components_dot_ProductVariantCreatePage_dot_2853608829": { "context": "button", @@ -3660,7 +3673,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatePage_dot_3726089650": { "context": "button", - "string": "Delete Variant" + "string": "Видалити варіант" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_1134347598": { "context": "variant price", @@ -3671,7 +3684,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_168343345": { "context": "variant attribute", - "string": "Attribute" + "string": "Атрибут" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_1808330403": { "context": "variant attribute", @@ -3702,16 +3715,16 @@ "string": "Підсумок" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2783195765": { - "string": "Apply single price to all SKUs" + "string": "Застосовуйте єдину ціну до всіх SKU" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_3387090508": { - "string": "Apply unique stock by attribute to each SKU" + "string": "Застосовуйте унікальний запас за властивісню до кожного SKU" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_3570949907": { - "string": "Apply unique prices by attribute to each SKU" + "string": "Застосовуйте унікальні ціни за властивостями до кожного SKU" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_3601538615": { - "string": "Apply single stock to all SKUs" + "string": "Застосовуйте одиночний запас до всіх SKU" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_3673120330": { "context": "button", @@ -3762,7 +3775,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantDeleteDialog_dot_3726089650": { "context": "dialog header", - "string": "Delete Variant" + "string": "Видалити варіант" }, "src_dot_products_dot_components_dot_ProductVariantImageSelectDialog_dot_3196043669": { "context": "dialog header", @@ -3799,7 +3812,7 @@ "string": "Cost price override" }, "src_dot_products_dot_components_dot_ProductVariantPrice_dot_2238565650": { - "string": "Selling price override" + "string": "Ціна продажу перевищена" }, "src_dot_products_dot_components_dot_ProductVariants_dot_1001303107": { "context": "product variant inventory", @@ -3807,7 +3820,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_1033175132": { "context": "product variant inventory", - "string": "Unavailable" + "string": "Недоступний" }, "src_dot_products_dot_components_dot_ProductVariants_dot_1134347598": { "context": "product variant price", @@ -3823,7 +3836,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_1721716102": { "context": "button", - "string": "Create variants" + "string": "Створіть варіанти" }, "src_dot_products_dot_components_dot_ProductVariants_dot_2153006789": { "context": "section header", @@ -3834,11 +3847,11 @@ "string": "{numLocations,plural,one {{numAvailable} available at {numLocations} location} other {{numAvailable} available at {numLocations} locations}}" }, "src_dot_products_dot_components_dot_ProductVariants_dot_277989856": { - "string": "Use variants for products that come in a variety of versions for example different sizes or colors" + "string": "Використовуйте варіанти для товарів, які випускаються в різних версіях, наприклад, різних розмірів або кольорів" }, "src_dot_products_dot_components_dot_ProductVariants_dot_3203451491": { "context": "filtering option", - "string": "All Warehouses" + "string": "Всі склади" }, "src_dot_products_dot_components_dot_ProductVariants_dot_3490038570": { "context": "product variant inventory status", @@ -3846,7 +3859,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_3989383405": { "context": "button", - "string": "Create variant" + "string": "Створіть варіант" }, "src_dot_products_dot_components_dot_ProductVariants_dot_4017567521": { "context": "product variant inventory", @@ -3859,16 +3872,9 @@ "context": "product variant name", "string": "Варіант" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", - "string": "Create Product" + "string": "Створити товар" }, "src_dot_products_dot_views_dot_1591632382": { "context": "page header", @@ -3876,24 +3882,24 @@ }, "src_dot_products_dot_views_dot_1731766393": { "context": "dialog header", - "string": "Delete Image" + "string": "Видалити зображення" }, "src_dot_products_dot_views_dot_2279302139": { - "string": "Variant removed" + "string": "Варіант видалено" }, "src_dot_products_dot_views_dot_2362587265": { "context": "header", - "string": "Create Variant" + "string": "Створити купон" }, "src_dot_products_dot_views_dot_2880386427": { - "string": "Are you sure you want to delete this image?" + "string": "Ви впевнені, що хочете видалити це зображення?" }, "src_dot_products_dot_views_dot_2899821092": { - "string": "Product created" + "string": "Товар створено" }, "src_dot_products_dot_views_dot_3989383405": { "context": "window title", - "string": "Create variant" + "string": "Створіть варіант" }, "src_dot_products_dot_views_dot_ProductList_dot_1204353135": { "context": "dialog content", @@ -3917,7 +3923,7 @@ }, "src_dot_products_dot_views_dot_ProductList_dot_3362608461": { "context": "dialog header", - "string": "Unpublish Products" + "string": "Скасувати публікацію товару" }, "src_dot_products_dot_views_dot_ProductList_dot_3518737068": { "context": "dialog content", @@ -3925,7 +3931,7 @@ }, "src_dot_products_dot_views_dot_ProductList_dot_400629795": { "context": "dialog header", - "string": "Delete Products" + "string": "Видалити товари" }, "src_dot_products_dot_views_dot_ProductUpdate_dot_1177237881": { "context": "dialog content", @@ -3933,7 +3939,7 @@ }, "src_dot_products_dot_views_dot_ProductUpdate_dot_1454532689": { "context": "dialog header", - "string": "Delete Product Variants" + "string": "Видалити варіанти товарів" }, "src_dot_products_dot_views_dot_ProductUpdate_dot_2297471173": { "context": "delete product", @@ -3944,7 +3950,7 @@ }, "src_dot_products_dot_views_dot_ProductUpdate_dot_879305849": { "context": "dialog header", - "string": "Delete Product" + "string": "Видалити товар" }, "src_dot_products_dot_views_dot_ProductVariantCreator_dot_2292700443": { "context": "success message", @@ -3977,7 +3983,7 @@ "string": "Видалити" }, "src_dot_requiredField": { - "string": "This field is required" + "string": "Це поле є обов'язковим" }, "src_dot_sales": { "context": "sales section name", @@ -3996,11 +4002,11 @@ }, "src_dot_services_dot_components_dot_ServiceCreatePage_dot_1848599267": { "context": "checkbox label", - "string": "User has full access to the store" + "string": "Користувач має повний доступ до магазину" }, "src_dot_services_dot_components_dot_ServiceCreatePage_dot_248507553": { "context": "header", - "string": "Create New Account" + "string": "Створити новій обліковий запис" }, "src_dot_services_dot_components_dot_ServiceCreatePage_dot_27827485": { "context": "checkbox label", @@ -4011,25 +4017,25 @@ "string": "Expand or restrict user's permissions to access certain part of saleor system." }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_1336855942": { - "string": "Generated Token" + "string": "Створено ідентифікаційний знак" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_2080322626": { - "string": "This token gives you access to your shop's API, which you'll find here: {url}" + "string": "Цей ідентифікаційний знак надає вам доступ до API вашого магазину, який ви знайдете тут: {url}" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_2864204643": { "context": "button", - "string": "Copied" + "string": "Скопійовано" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_3406541221": { "context": "button", - "string": "Copy token" + "string": "Скопіювати токен" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_4189999598": { - "string": "We’ve created your default token. Make sure to copy your new personal access token now. You won’t be able to see it again." + "string": "Ми створили ваш ідентифікаційний знак за замовчуванням. Не забудьте скопіювати свій новий особистий ідентифікаційний знак доступу зараз. Ви більше не зможете його побачити." }, "src_dot_services_dot_components_dot_ServiceDeleteDialog_dot_1534767622": { "context": "dialog header", - "string": "Delete Service Account" + "string": "Видалити службовий обліковий запис" }, "src_dot_services_dot_components_dot_ServiceDeleteDialog_dot_2297471173": { "context": "delete service account", @@ -4037,7 +4043,7 @@ }, "src_dot_services_dot_components_dot_ServiceDetailsPage_dot_1848599267": { "context": "checkbox label", - "string": "User has full access to the store" + "string": "Користувач має повний доступ до магазину" }, "src_dot_services_dot_components_dot_ServiceDetailsPage_dot_27827485": { "context": "checkbox label", @@ -4064,7 +4070,7 @@ }, "src_dot_services_dot_components_dot_ServiceListPage_dot_624280156": { "context": "button", - "string": "Create account" + "string": "Створити обліковий запис" }, "src_dot_services_dot_components_dot_ServiceListPage_dot_active": { "context": "service account", @@ -4072,7 +4078,7 @@ }, "src_dot_services_dot_components_dot_ServiceListPage_dot_deactivated": { "context": "service account", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_services_dot_components_dot_ServiceList_dot_1342308051": { "string": "No service accounts found" @@ -4083,31 +4089,31 @@ }, "src_dot_services_dot_components_dot_ServiceList_dot_3239722049": { "context": "account status", - "string": "inactive" + "string": "неактивний" }, "src_dot_services_dot_components_dot_ServiceList_dot_636461959": { "context": "service name", "string": "Назва" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_1336855942": { - "string": "Generated Token" + "string": "Створено ідентифікаційний знак" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_2530792168": { "string": "Токен доступу використовується для автентифікації в акаунтах сервісів" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_3009959880": { - "string": "We’ve created your token. Make sure to copy your new personal access token now. You won’t be able to see it again." + "string": "Ми створили ваш ідентифікаційний знак. Не забудьте скопіювати свій новий особистий ідентифікаційний знак доступу зараз. Ви більше не зможете його побачити." }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_3406541221": { "context": "button", - "string": "Copy token" + "string": "Скопіювати токен" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_3875340101": { "context": "header", - "string": "Create Token" + "string": "Створити токен" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_4017491013": { - "string": "Token Note" + "string": "Примітка токену" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_4120989039": { "context": "create service token, button", @@ -4115,25 +4121,25 @@ }, "src_dot_services_dot_components_dot_ServiceTokenDeleteDialog_dot_1534767622": { "context": "dialog title", - "string": "Delete Service Account" + "string": "Видалити службовий обліковий запис" }, "src_dot_services_dot_components_dot_ServiceTokenDeleteDialog_dot_981802752": { "context": "delete token", - "string": "Are you sure you want to delete token {token}?" + "string": "Ви впевнені, що хочете видалити токен {token}?" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_2446088470": { "context": "service account key", "string": "Ключ" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_2639089057": { - "string": "No tokens found" + "string": "Не знайдено ідентифікаційного знаку" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_3875340101": { "context": "button", - "string": "Create Token" + "string": "Створити токен" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_4017491013": { - "string": "Token Note" + "string": "Примітка токену" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_4190792473": { "context": "table actions", @@ -4145,20 +4151,23 @@ }, "src_dot_services_dot_views_dot_ServiceCreate_dot_3167211165": { "context": "window title", - "string": "Create Service Account" + "string": "Створити сервісний обліковий запис" + }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" }, "src_dot_shipping_dot_components_dot_ShippingWeightUnitForm_dot_2863708228": { - "string": "This unit will be used as default shipping weight" + "string": "Ця одиниця буде використовуватися як вага доставки за замовчуванням" }, "src_dot_shipping_dot_components_dot_ShippingWeightUnitForm_dot_549146363": { "string": "Shipping Weight Unit" }, "src_dot_shipping_dot_components_dot_ShippingZoneAddWarehouseDialog_dot_2622674857": { - "string": "Warehouse Name" + "string": "Назва складу" }, "src_dot_shipping_dot_components_dot_ShippingZoneAddWarehouseDialog_dot_3173942020": { "context": "header, dialog", @@ -4172,7 +4181,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_1585396479": { "context": "dialog header", - "string": "Assign Countries" + "string": "Призначити країни" }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_1818089229": { "string": "If selected, this will add all of the countries not selected to other shipping zones" @@ -4185,11 +4194,11 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_2747492886": { "context": "button", - "string": "Assign countries" + "string": "Призначити країни" }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_2777439857": { "context": "country selection", - "string": "Countries A to Z" + "string": "Країни від А до Я" }, "src_dot_shipping_dot_components_dot_ShippingZoneCountriesAssignDialog_dot_3510295703": { "string": "Search Countries" @@ -4202,7 +4211,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneCreatePage_dot_4049462680": { "context": "header", - "string": "Create New Shipping Zone" + "string": "Створити нову зону доставки" }, "src_dot_shipping_dot_components_dot_ShippingZoneCreatePage_dot_4270729636": { "string": "This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones" @@ -4237,11 +4246,11 @@ "string": "Rate Price" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_1486599614": { - "string": "This will be shown to customers at checkout" + "string": "Це буде показано клієнтам при оформленні замовлення" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_1542600502": { "context": "button", - "string": "Update rate" + "string": "Частота оновлення" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_16061680": { "context": "button", @@ -4252,15 +4261,15 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_2215090771": { "context": "shipping method, switch button", - "string": "This is free shipping" + "string": "Це безкоштовна доставка" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_2324036635": { "context": "order weight range", - "string": "Weight range" + "string": "Ваговий діапазон" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_2533614652": { "context": "order price range", - "string": "Value range" + "string": "Діапазон значень" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_2892088870": { "context": "dialog header", @@ -4313,7 +4322,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneRates_dot_1923873558": { "context": "shipping method price range", - "string": "Value Range" + "string": "Діапазон значень" }, "src_dot_shipping_dot_components_dot_ShippingZoneRates_dot_1961493435": { "string": "No shipping rates found" @@ -4324,11 +4333,11 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneRates_dot_2600677138": { "context": "shipping method weight range", - "string": "Weight Range" + "string": "Діапазон ваги" }, "src_dot_shipping_dot_components_dot_ShippingZoneRates_dot_383202459": { "context": "weight based shipping methods, section header", - "string": "Weight Based Rates" + "string": "Тарифи на основі ваги" }, "src_dot_shipping_dot_components_dot_ShippingZoneRates_dot_636461959": { "context": "shipping method name", @@ -4359,7 +4368,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZonesList_dot_2673544109": { "context": "button", - "string": "Create shipping zone" + "string": "Створити зону доставки" }, "src_dot_shipping_dot_components_dot_ShippingZonesList_dot_3109712047": { "string": "Країни" @@ -4372,15 +4381,15 @@ "string": "No shipping zones found" }, "src_dot_shipping_dot_views_dot_1005071028": { - "string": "Are you sure you want to delete {shippingZoneName} shipping zone?" + "string": "Ви впевнені, що хочете видалити {shippingZoneName} зону доставки?" }, "src_dot_shipping_dot_views_dot_1010705153": { "context": "dialog header", - "string": "Delete Shipping Zone" + "string": "Видалити зону доставки" }, "src_dot_shipping_dot_views_dot_1711385401": { "context": "dialog header", - "string": "Delete Shipping Zones" + "string": "Видалити зони доставки" }, "src_dot_shipping_dot_views_dot_725201918": { "context": "dialog content", @@ -4388,19 +4397,19 @@ }, "src_dot_shipping_dot_views_dot_ShippingZoneDetails_dot_1010705153": { "context": "dialog header", - "string": "Delete Shipping Zone" + "string": "Видалити зону доставки" }, "src_dot_shipping_dot_views_dot_ShippingZoneDetails_dot_131963671": { "context": "unassign country", - "string": "Are you sure you want to delete {countryName} from this shipping zone?" + "string": "Ви впевнені, що хочете видалити {countryName} з цієї зони доставки?" }, "src_dot_shipping_dot_views_dot_ShippingZoneDetails_dot_1502359905": { "context": "dialog header", - "string": "Delete Shipping Method" + "string": "Видалити спосіб доставки" }, "src_dot_shipping_dot_views_dot_ShippingZoneDetails_dot_3133838427": { "context": "unassign country, dialog header", - "string": "Delete from Shipping Zone" + "string": "Видалити із зони доставки" }, "src_dot_show": { "context": "button", @@ -4420,7 +4429,7 @@ "string": "Name of your store" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_3808773492": { - "string": "URL of your online store" + "string": "URL-адреса вашого інтернет-магазину" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_529433178": { "string": "Store description is shown on taskbar after your store name" @@ -4438,7 +4447,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeyDialog_dot_3039841202": { "context": "authentication provider name", - "string": "Authentication type" + "string": "Тип аутентифікації" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeyDialog_dot_50561933": { "context": "button", @@ -4450,11 +4459,11 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeys_dot_1270286507": { "context": "authentication provider name", - "string": "Authentication Type" + "string": "Тип аутентифікації" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeys_dot_226491688": { "context": "section header", - "string": "Authentication Keys" + "string": "Ключі аутентифікації" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeys_dot_2446088470": { "context": "authentication provider API key", @@ -4476,16 +4485,16 @@ "string": "Mailing Configuration" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_297689661": { - "string": "Configurate your email address from which all automatic emails will be sent to your customers." + "string": "Налаштуйте свою електронну адресу, з якої всі автоматичні електронні листи будуть відправлені вашим клієнтам." }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_3211348653": { - "string": "Customer password reset URL" + "string": "URL-адреса відновлення пароля клієнта" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_3447841451": { "string": "This URL will be used as a main URL for password resets. It will be sent via email." }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_50742153": { - "string": "URL address" + "string": "URL-адреса" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_70179174": { "string": "Mailing email sender" @@ -4494,7 +4503,7 @@ "string": "This adress will be used to generate invoices and calculate shipping rates." }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_1214877701": { - "string": "Authentication method defines additional ways that customers can log in to your ecommerce." + "string": "Спосіб аутентифікації визначає додаткові способи, за якими клієнти можуть увійти у до ващої електронної комерції." }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_229184360": { "context": "section header", @@ -4502,7 +4511,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_2768400497": { "context": "section header", - "string": "Company Information" + "string": "Інформація про компанію" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_280712237": { "context": "section header", @@ -4516,7 +4525,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_4088830385": { "context": "section header", - "string": "Authentication Methods" + "string": "Способи аутентифікації" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_866304242": { "string": "This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails." @@ -4565,7 +4574,7 @@ }, "src_dot_staff_dot_components_dot_StaffListPage_dot_deactivated": { "context": "staff member's account", - "string": "Deactivated" + "string": "Деактивовано" }, "src_dot_staff_dot_components_dot_StaffListPage_dot_status": { "context": "staff member's account", @@ -4573,7 +4582,7 @@ }, "src_dot_staff_dot_components_dot_StaffList_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_staff_dot_components_dot_StaffList_dot_1789607185": { "string": "Email Address" @@ -4605,11 +4614,11 @@ "string": "Previous Password" }, "src_dot_staff_dot_components_dot_StaffPassword_dot_1274006906": { - "string": "You should change your password every month to avoid security issues." + "string": "Ви повинні змінювати свій пароль щомісяця, щоб уникнути проблем з безпекою." }, "src_dot_staff_dot_components_dot_StaffPassword_dot_1434811103": { "context": "button", - "string": "Change your password" + "string": "Змінити пароль" }, "src_dot_staff_dot_components_dot_StaffPassword_dot_2237029987": { "context": "header", @@ -4634,25 +4643,25 @@ }, "src_dot_staff_dot_components_dot_StaffProperties_dot_2771097267": { "context": "button", - "string": "Change photo" + "string": "Змінити фото" }, "src_dot_staff_dot_components_dot_StaffProperties_dot_457748370": { "context": "button", - "string": "Delete photo" + "string": "Видалити фотографію" }, "src_dot_staff_dot_views_dot_1308770978": { "context": "dialog header", - "string": "delete Staff User" + "string": "видалити Користувача персоналу" }, "src_dot_staff_dot_views_dot_3945766678": { - "string": "Are you sure you want to remove {email} avatar?" + "string": "Ви впевнені, що хочете видалити {email} аватар?" }, "src_dot_staff_dot_views_dot_701332676": { "context": "dialog header", - "string": "Delete Staff User Avatar" + "string": "Видалити aватар користувача персоналу" }, "src_dot_staff_dot_views_dot_8878988": { - "string": "Are you sure you want to delete {email} from staff members?" + "string": "Ви впевнені, що хочете видалити {email} зі співробітників?" }, "src_dot_startDate": { "string": "Start Date" @@ -4668,11 +4677,11 @@ }, "src_dot_taxes": { "context": "taxes section name", - "string": "Taxes" + "string": "Податки" }, "src_dot_taxes_dot_components_dot_CountryListPage_dot_3955023266": { "context": "header", - "string": "Taxes" + "string": "Податки" }, "src_dot_taxes_dot_components_dot_CountryList_dot_110033143": { "string": "No countries found" @@ -4681,10 +4690,10 @@ "string": "Reduced Tax Rates" }, "src_dot_taxes_dot_components_dot_CountryList_dot_4039455144": { - "string": "Country Code" + "string": "Код країни" }, "src_dot_taxes_dot_components_dot_CountryList_dot_577035076": { - "string": "Country Name" + "string": "Назва країни" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1040021611": { "context": "tax rate", @@ -4696,7 +4705,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1323923780": { "context": "tax rate", - "string": "Bikes" + "string": "Велосипеди" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1451721797": { "context": "tax rate", @@ -4710,11 +4719,11 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2185495435": { "context": "tax rate", - "string": "Admission to cultural events" + "string": "Прийом на культурні заходи" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2201910191": { "context": "tax rate", - "string": "Baby foodstuffs" + "string": "Дитячі продукти харчування" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_231341634": { "context": "tax rate", @@ -4726,11 +4735,11 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2394675125": { "context": "tax rate", - "string": "Books" + "string": "Книги" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2465450918": { "context": "tax rate", - "string": "Agricultural supplies" + "string": "Сільськогосподарські приналежності" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2482229874": { "context": "tax rate", @@ -4742,7 +4751,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2557534380": { "context": "tax rate", - "string": "Admission to entertainment events" + "string": "Прийом на розважальні заходи" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2584490289": { "context": "tax rate", @@ -4750,7 +4759,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2616794607": { "context": "tax rate", - "string": "Admission to sporting events" + "string": "Прийом на спортивні заходи" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2737618795": { "context": "header", @@ -4777,11 +4786,11 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_3525010870": { "context": "tax rate", - "string": "Water" + "string": "Вода" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_3911019760": { "context": "tax rate", - "string": "Advertising" + "string": "Реклама" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_4199760668": { "context": "tax rate", @@ -4789,7 +4798,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_752780599": { "context": "tax rate", - "string": "Wine" + "string": "Вино" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_776474251": { "context": "tax rate", @@ -4800,13 +4809,13 @@ "string": "Pharmaceuticals" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_142803418": { - "string": "All products prices are entered with tax included" + "string": "Всі ціни на товари вводяться з урахуванням податку" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_2102582640": { "string": "Показувати валові ціни клієнтам у магазині" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_2654711891": { - "string": "Charge taxes on shipping rates" + "string": "Стягнення податків на тарифи на доставку" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_3375540052": { "context": "button", @@ -4817,16 +4826,16 @@ }, "src_dot_translations": { "context": "translations section name", - "string": "Translations" + "string": "Переклади" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_1308081812": { - "string": "{numberOfFields} Translations, {numberOfTranslatedFields} Completed" + "string": "{numberOfFields} Перекладів, {numberOfTranslatedFields} Завершено" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_1348655672": { "string": "Original String" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_2481190613": { - "string": "Translation" + "string": "Переклад" }, "src_dot_translations_dot_components_dot_TranslationFields_dot_363646127": { "context": "button", @@ -4836,13 +4845,13 @@ "string": "No translation yet" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_1214235329": { - "string": "Category Name" + "string": "Назва категорії" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_1406947243": { "string": "Search Engine Description" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_1611537010": { - "string": "Translation Category \"{categoryName}\" - {languageCode}" + "string": "Переклад категорії \"{categoryName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_2496919463": { "string": "Search Engine Title" @@ -4857,11 +4866,11 @@ "string": "Search Engine Title" }, "src_dot_translations_dot_components_dot_TranslationsCollectionsPage_dot_2759199473": { - "string": "Collection Name" + "string": "Назва колекції" }, "src_dot_translations_dot_components_dot_TranslationsCollectionsPage_dot_3055443821": { "context": "header", - "string": "Translation Collection \"{collectionName}\" - {languageCode}" + "string": "Переклад колекції \"{collectionName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsCollectionsPage_dot_3468022343": { "string": "Search Engine Preview" @@ -4883,7 +4892,7 @@ }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_2460580333": { "context": "header", - "string": "Translations to {language}" + "string": "Переклади на {language}" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_2559018090": { "string": "Search Page" @@ -4917,13 +4926,13 @@ }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_1136143456": { "context": "translation progress", - "string": "{current} of {max}" + "string": "{current} до {max}" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_4176487406": { "string": "No translatable entities found" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_49462429": { - "string": "Completed Translations" + "string": "Завершені переклади" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_636461959": { "context": "entity (product, collection, shipping method) name", @@ -4950,7 +4959,7 @@ }, "src_dot_translations_dot_components_dot_TranslationsPagesPage_dot_2806429775": { "context": "header", - "string": "Translation Page \"{pageName}\" - {languageCode}" + "string": "Переклад сторінки \"{pageName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsPagesPage_dot_3468022343": { "string": "Search Engine Preview" @@ -4960,22 +4969,22 @@ }, "src_dot_translations_dot_components_dot_TranslationsProductTypesPage_dot_1281101905": { "context": "header", - "string": "Translation Product Type \"{productTypeName}\" - {languageCode}" + "string": "Переклад типу товару \"{productTypeName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsProductTypesPage_dot_1567737068": { "context": "attribute values", - "string": "Value {number}" + "string": "Значення {number}" }, "src_dot_translations_dot_components_dot_TranslationsProductTypesPage_dot_2510190956": { "context": "header", "string": "Product Attribute ({attributeName})" }, "src_dot_translations_dot_components_dot_TranslationsProductTypesPage_dot_2642976392": { - "string": "Attribute Name" + "string": "Назва атрибуту" }, "src_dot_translations_dot_components_dot_TranslationsProductTypesPage_dot_3538502409": { "context": "header", - "string": "Variant Attribute ({attributeName})" + "string": "Варіант атрибутів ({attributeName})" }, "src_dot_translations_dot_components_dot_TranslationsProductsPage_dot_1406947243": { "string": "Search Engine Description" @@ -4988,7 +4997,7 @@ }, "src_dot_translations_dot_components_dot_TranslationsProductsPage_dot_2713974050": { "context": "header", - "string": "Translation Product \"{productName}\" - {languageCode}" + "string": "Переклад товару \"{productName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsProductsPage_dot_3374163063": { "string": "Опис" @@ -4998,33 +5007,33 @@ }, "src_dot_translations_dot_components_dot_TranslationsSalesPage_dot_3731955064": { "context": "header", - "string": "Translation Sale \"{saleName}\" - {languageCode}" + "string": "Переклад розпродажу \"{saleName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsSalesPage_dot_898281424": { "string": "Sale Name" }, "src_dot_translations_dot_components_dot_TranslationsVouchersPage_dot_2447510181": { "context": "header", - "string": "Translation Voucher \"{voucherName}\" - {languageCode}" + "string": "Переклад купону \"{voucherName}\" - {languageCode}" }, "src_dot_translations_dot_components_dot_TranslationsVouchersPage_dot_2599922713": { - "string": "Voucher Name" + "string": "Назва" }, "src_dot_undo": { "context": "button", - "string": "Undo" + "string": "Скасувати" }, "src_dot_unfulfilled": { "context": "order status", - "string": "Unfulfilled" + "string": "Невиконано" }, "src_dot_unpaid": { "context": "payment status", - "string": "Unpaid" + "string": "Неоплачений" }, "src_dot_uploadImage": { "context": "button", - "string": "Upload image" + "string": "Завантажити зображення" }, "src_dot_utils_dot_errors_dot_alreadyExists": { "context": "add authorization key error", @@ -5060,54 +5069,54 @@ }, "src_dot_utils_dot_errors_dot_cannotRefund": { "context": "error message", - "string": "Manual payments can not be refunded" + "string": "Оплата в ручному режимі не може бути повернена" }, "src_dot_utils_dot_errors_dot_cannotRemoveFromLastGroup": { - "string": "Cannot remove user from last group" + "string": "Неможливо видалити користувача з останньої групи" }, "src_dot_utils_dot_errors_dot_cannotVoid": { "context": "error message", - "string": "Only pre-authorized payments can be voided" + "string": "Тільки попередньо авторизовані платежі можуть бути анульовані" }, "src_dot_utils_dot_errors_dot_captureInactive": { "context": "error message", "string": "Лише попередньо авторизовані оплати можуть бути прийняті" }, "src_dot_utils_dot_errors_dot_duplicatedInputItem": { - "string": "Cannot add and remove group the same time" + "string": "Неможливо додати та видалити групу одночасно" }, "src_dot_utils_dot_errors_dot_graphqlError": { - "string": "API error" + "string": "Помилка API" }, "src_dot_utils_dot_errors_dot_invalid": { - "string": "Invalid value" + "string": "Неприпустиме значення" }, "src_dot_utils_dot_errors_dot_invalidPassword": { - "string": "Invalid password" + "string": "Неправильний пароль" }, "src_dot_utils_dot_errors_dot_noShippingAddress": { "context": "error message", - "string": "Cannot choose a shipping method for an order without the shipping address" + "string": "Неможливо вибрати спосіб доставки для замовлення без адреси доставки" }, "src_dot_utils_dot_errors_dot_notEditable": { "context": "error message", - "string": "Only draft orders can be edited" + "string": "Редагувати можуть лише чернетки замовлень" }, "src_dot_utils_dot_errors_dot_outOfScopeGroup": { - "string": "Group is out of your permission scope" + "string": "Група виходить за межі вашого дозволу" }, "src_dot_utils_dot_errors_dot_outOfScopeUser": { - "string": "User is out of your permissions scope" + "string": "Користувач виходить за межі вашого дозволу" }, "src_dot_utils_dot_errors_dot_passwordNumeric": { - "string": "Password cannot be entirely numeric" + "string": "Пароль не може бути повністю з цифр" }, "src_dot_utils_dot_errors_dot_paymentMissing": { "context": "error message", - "string": "There's no payment associated with the order" + "string": "Немає оплати, пов'язаної із замовленням" }, "src_dot_utils_dot_errors_dot_permissionOutOfScope": { - "string": "Those permissions are out of your scope" + "string": "Ці дозволи не входять у ваш обсяг" }, "src_dot_utils_dot_errors_dot_shippingNotApplicable": { "context": "error message", @@ -5115,33 +5124,33 @@ }, "src_dot_utils_dot_errors_dot_shippingRequired": { "context": "error message", - "string": "Shipping method is required for this order" + "string": "Для цього замовлення необхідний спосіб доставки" }, "src_dot_utils_dot_errors_dot_skuUnique": { "context": "bulk variant create error", - "string": "SKUs must be unique" + "string": "Код товару повинен бути унікальним" }, "src_dot_utils_dot_errors_dot_slugUnique": { "context": "error message", - "string": "Slug must be unique for each warehouse" + "string": "Службове поле повинно бути унікальним для кожного складу" }, "src_dot_utils_dot_errors_dot_tooCommon": { - "string": "This password is too commonly used" + "string": "Цей пароль занадто часто використовується" }, "src_dot_utils_dot_errors_dot_tooShort": { - "string": "This password is too short" + "string": "Цей пароль занадто короткий" }, "src_dot_utils_dot_errors_dot_tooSimilar": { - "string": "These passwords are too similar" + "string": "Ці паролі занадто схожі" }, "src_dot_utils_dot_errors_dot_unique": { - "string": "This needs to be unique" + "string": "Це повинно бути унікальним" }, "src_dot_utils_dot_errors_dot_unknownError": { - "string": "Unknown error" + "string": "Невідома помилка" }, "src_dot_utils_dot_errors_dot_variantNoDigitalContent": { - "string": "This variant does not have any digital content" + "string": "Цей варіант не має жодного вмісту" }, "src_dot_vouchers": { "context": "vouchers section name", @@ -5149,7 +5158,7 @@ }, "src_dot_warehouses": { "context": "warehouses section name", - "string": "Warehouses" + "string": "Склади" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_1967111456": { "context": "warehouse", @@ -5157,39 +5166,39 @@ }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_934572530": { "context": "header", - "string": "Create Warehouse" + "string": "Створити склад" }, "src_dot_warehouses_dot_components_dot_WarehouseDeleteDialog_dot_1355303260": { "context": "dialog content", - "string": "Are you sure you want to delete {warehouseName}?" + "string": "Ви впевнені, що хочете видалити {warehouseName}?" }, "src_dot_warehouses_dot_components_dot_WarehouseDeleteDialog_dot_3857661071": { "context": "dialog title", - "string": "Delete Warehouse" + "string": "Видалити склад" }, "src_dot_warehouses_dot_components_dot_WarehouseDetailsPage_dot_1967111456": { "context": "warehouse", "string": "Інформація про адресу" }, "src_dot_warehouses_dot_components_dot_WarehouseInfo_dot_2622674857": { - "string": "Warehouse Name" + "string": "Назва складу" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_2304765290": { - "string": "Search Warehouse" + "string": "Пошук складу" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_3203451491": { "context": "tab name", - "string": "All Warehouses" + "string": "Всі склади" }, "src_dot_warehouses_dot_components_dot_WarehouseListPage_dot_934572530": { "context": "button", - "string": "Create Warehouse" + "string": "Створити склад" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_1225932315": { - "string": "Shipping Zones" + "string": "Зони доставки" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_3787396469": { - "string": "No warehouses found" + "string": "Складів не знайдено" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_4190792473": { "string": "Дії" @@ -5200,26 +5209,26 @@ }, "src_dot_warehouses_dot_components_dot_WarehouseZones_dot_1225932315": { "context": "zones that warehouse sends to", - "string": "Shipping Zones" + "string": "Зони доставки" }, "src_dot_warehouses_dot_components_dot_WarehouseZones_dot_2423245141": { - "string": "This warehouse has no shipping zones assigned." + "string": "На цьому складі не призначені зони доставки." }, "src_dot_warehouses_dot_views_dot_WarehouseCreate_dot_934572530": { "context": "header", - "string": "Create Warehouse" + "string": "Створити склад" }, "src_dot_webhooks": { "context": "webhooks section name", - "string": "Webhooks" + "string": "Система сповіщення подій" }, "src_dot_webhooks_dot_components_dot_WebhookCreatePage_dot_3493926696": { "context": "header", - "string": "Create Webhook" + "string": "Створити вебхук" }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_216945727": { "context": "delete webhook", - "string": "Are you sure you want to delete this webhook?" + "string": "Ви впевнені, що хочете видалити цюй вебхук?" }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_2297471173": { "context": "delete webhook", @@ -5227,27 +5236,27 @@ }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_3514087611": { "context": "dialog header", - "string": "Delete Webhook" + "string": "Видалити вебхук" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1436364351": { "context": "section header", - "string": "Events" + "string": "Події" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1606361075": { "context": "event", - "string": "Order updated" + "string": "Замовлення оновлено" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2454751033": { "context": "event", - "string": "All events" + "string": "Всі події" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2899821092": { "context": "event", - "string": "Product created" + "string": "Товар створено" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3051538277": { "context": "webhook events", - "string": "Expand or restrict webhooks permissions to register certain events in Saleor system." + "string": "Розширюйте або обмежуйте дозволи вебхуків для реєстрації подій у системі Saleor." }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3345061702": { "context": "event", @@ -5255,89 +5264,89 @@ }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3400883706": { "context": "event", - "string": "Order created" + "string": "Замовлення створено" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3617444329": { "context": "event", - "string": "Order cancelled" + "string": "Замовлення скасовано" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3907151399": { "context": "event", - "string": "Order fulfilled" + "string": "Замовлення виконано" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3970234993": { "context": "event", - "string": "Customer created" + "string": "Клієнт створений" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_40035964": { "context": "event", - "string": "Changed quantity in checkout" + "string": "Змінено кількість в замовленні" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_4281441551": { "context": "event", - "string": "Fulfillment created" + "string": "Виконання створено" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_1690209105": { "context": "webhook", - "string": "Target URL" + "string": "Ціль URL-адреси" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_1826224431": { "context": "webhook", - "string": "Webhook Name" + "string": "Назва" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_330298209": { "context": "section header", - "string": "Webhook Information" + "string": "Інформація" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_3763861707": { "context": "webhook target url help text", - "string": "This URL will receive webhook POST requests" + "string": "Ця URL-адреса отримуватиме вебхук POST запити" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_3809115222": { "context": "webhook secret key help text", - "string": "secret key is used to create a hash signature with each payload. *optional field" + "string": "секретний ключ використовується для створення хеш-підпису з кожним корисним навантаженням. *необов’язкове поле" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_3995417850": { "context": "webhook", - "string": "Secrect Key" + "string": "Секретний ключ" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_4194304040": { "context": "webhook specific information", - "string": "Webhook specific information" + "string": "Спеціально інформація системи сповіщення подій" }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_819389696": { - "string": "Assign to Service Account" + "string": "Призначити службовий обліковий запис" }, "src_dot_webhooks_dot_components_dot_WebhookStatus_dot_2772025990": { "context": "webhooks active", - "string": "Webhook is active" + "string": "Система сповіщення подій активна" }, "src_dot_webhooks_dot_components_dot_WebhookStatus_dot_313090629": { "context": "webhook active", - "string": "If you want to disable this webhook please uncheck the box below." + "string": "Якщо ви хочете відключити цей вебхук, зніміть прапорець нижче." }, "src_dot_webhooks_dot_components_dot_WebhookStatus_dot_596557805": { "context": "section header", - "string": "Webhook Status" + "string": "Статус системи сповіщення подій" }, "src_dot_webhooks_dot_components_dot_WebhooksDetailsPage_dot_1595053355": { "context": "header", - "string": "Unnamed Webhook Details" + "string": "Деталі вебхуку без назви" }, "src_dot_webhooks_dot_components_dot_WebhooksDetailsPage_dot_408706360": { "context": "header", - "string": "{webhookName} Details" + "string": "Деталі {webhookName}" }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_1432828311": { - "string": "Search Webhooks" + "string": "Пошук вебхуку" }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_2295583901": { "context": "button", - "string": "Create webhook" + "string": "Створіть вебхук" }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_3300314452": { "context": "tab name", - "string": "All Webhooks" + "string": "Всі вебхуки" }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_active": { "context": "webhook", @@ -5345,21 +5354,21 @@ }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_inactive": { "context": "webhook", - "string": "Inactive" + "string": "Неактивний" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_1153324159": { - "string": "No webhooks found" + "string": "Вебхук не знайдено" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_2487865635": { "context": "webhook service account", - "string": "Service Account" + "string": "Обліковий запис служби" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_4120604650": { "context": "user action bar", "string": "Дія" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_618422799": { - "string": "Unnamed webhook" + "string": "Вебхук без назви" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_636461959": { "context": "webhook name", @@ -5367,21 +5376,21 @@ }, "src_dot_webhooks_dot_views_dot_3493926696": { "context": "window title", - "string": "Create Webhook" + "string": "Створити вебхук" }, "src_dot_yes": { "string": "Так " }, "voucherDetailsUnassignCategory": { "context": "unassign category from voucher, button", - "string": "Unassign" + "string": "Скасувати" }, "voucherDetailsUnassignCollection": { "context": "unassign collection from voucher, button", - "string": "Unassign" + "string": "Скасувати" }, "voucherDetailsUnassignProduct": { "context": "unassign product from voucher, button", - "string": "Unassign" + "string": "Скасувати" } } \ No newline at end of file diff --git a/locale/vi.json b/locale/vi.json index 5432578b7..f3097b0ee 100644 --- a/locale/vi.json +++ b/locale/vi.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Không bắt buộc" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Không bắt buộc" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Xoá" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "Mô tả" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Huỷ Giao Hàng" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Số tiền cần xử lý" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "Số tiền đã được uỷ quyền" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Tổng" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Tạo Sản Phẩm" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Tìm bằng tên sản phẩm, thuộc tính, chủng loại, ..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Tìm Các Sản Phẩm" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Chưa Đáp Ứng ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "SKU" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Tổng" @@ -3621,17 +3637,14 @@ "context": "header", "string": "Số lượng" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "Biến Thể" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Tạo Sản Phẩm" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Tạo Tài Khoản Dịch Vụ" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Cách Thức Vận Chuyển" diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json index 805e40347..9f4349055 100644 --- a/locale/zh-Hans.json +++ b/locale/zh-Hans.json @@ -4,134 +4,134 @@ "string": "取消订单" }, "configurationMenuAttributes": { - "string": "Determine attributes used to create product types" + "string": "确认创建产品类型的属性" }, "configurationMenuNavigation": { - "string": "Define how users can navigate through your store" + "string": "定义用户如何浏览您的商店" }, "configurationMenuPages": { - "string": "Manage and add additional pages" + "string": "管理和添加其它的页面" }, "configurationMenuPermissionGroups": { - "string": "Manage your permission groups and their permissions" + "string": "管理您的权限及组权限" }, "configurationMenuProductTypes": { - "string": "Define types of products you sell" + "string": "定义您销售的产品类型" }, "configurationMenuShipping": { - "string": "Manage how you ship out orders" + "string": "管理您的发货方式" }, "configurationMenuSiteSettings": { - "string": "View and update your site settings" + "string": "查看和更新您的网站设置" }, "configurationMenuStaff": { - "string": "Manage your employees and their permissions" + "string": "管理您的员工及其权限" }, "configurationMenuTaxes": { - "string": "Manage how your store charges tax" + "string": "管理店铺如何收税" }, "configurationMenuWarehouses": { - "string": "Manage and update your warehouse information" + "string": "管理和更新您的仓库信息" }, "configurationPluginsPages": { - "string": "View and update your plugins and their settings." + "string": "查看和更新您的插件及其设置" }, "homeActivityCardHeader": { "context": "header", - "string": "Activity" + "string": " 活动" }, "homeActivityCardNoActivities": { - "string": "No activities found" + "string": "没有促销活动" }, "homeAnalyticsCardHeader": { "string": "今天" }, "homeHeaderText": { "context": "header", - "string": "Hello there, {userName}" + "string": "您好, {userName}" }, "homeHeaderTextCaption": { "context": "subheader", - "string": "Here is some information we gathered about your store" + "string": "这是我们收集的有关您商店的一些信息" }, "homeNotificationTableNoOrders": { - "string": "No orders ready to fulfill" + "string": "没有进行中的订单" }, "homeNotificationTableOrders": { - "string": "{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}" + "string": "{amount, plural,other {{amount}个订单进行中}}" }, "homeNotificationTablePayments": { - "string": "{amount, plural,one {One payment to capture} other {{amount} Payments to capture}}" + "string": "{amount, plural,other {需付款{amount} }}" }, "homeNotificationTableProducts": { - "string": "{amount, plural,one {One product out of stock} other {{amount} Products out of stock}}" + "string": "{amount, plural,other {{amount} 产品缺货}}" }, "homeNotificationsNoPayments": { - "string": "No payments waiting for capture" + "string": "没有未付款的订单" }, "homeNotificationsTableNoProducts": { - "string": "No products out of stock" + "string": "没有产品缺货" }, "homeProductListCardOrders": { "context": "number of ordered products", - "string": "{amount, plural,one {One ordered} other {{amount} Ordered}}" + "string": "{amount, plural,other {{amount} 下订单}}" }, "homeProductsListCardHeader": { "context": "header", - "string": "Top Products" + "string": "热销产品" }, "homeProductsListCardNoProducts": { - "string": "No products found" + "string": "没有产品" }, "homeScreenDisclaimer": { "context": "header", - "string": "Disclaimer" + "string": "声明" }, "homeScreenDisclaimerText1": { - "string": "The new dashboard and the GraphQL API are preview-quality software." + "string": "新的仪表板和GraphQL API是预览版本的软件。" }, "homeScreenDisclaimerText2": { - "string": "The GraphQL API is beta quality. It is not fully optimized and some mutations or queries may be missing." + "string": "GraphQL API为beta质量。 尚未完全优化,可能会缺少某些突变或查询。" }, "homeScreenHeader": { "context": "header", - "string": "Hello there, {userName}" + "string": "您好, {userName}" }, "menuCreateDialogHeader": { "context": "dialog header", - "string": "Create Menu" + "string": "新建菜单" }, "menuCreateDialogMenuTitleLabel": { - "string": "Menu Title" + "string": "菜单标题" }, "menuDetailsDeleteMenuContent": { - "string": "Are you sure you want to delete menu {menuName}?" + "string": "您确认要删除菜单 {menuName}?" }, "menuDetailsDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "删除菜单" }, "menuDetailsPageHelperText": { - "string": "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" + "string": "通过拖放来创建导航结构。 只需创建一个新菜单项,然后将其拖动到其预定位置即可。 您可以相互移动项目以创建树结构,并上下拖动项目以创建层次结构" }, "menuItemDialogAddItem": { "context": "create new menu item, header", - "string": "Add Item" + "string": "添加物品" }, "menuItemDialogAddLink": { "context": "add link to navigation", - "string": "Link to: {url}" + "string": "链接:{url}" }, "menuItemDialogEditItem": { "context": "edit menu item, header", - "string": "Edit Item" + "string": "编辑宝贝" }, "menuItemDialogLinkLabel": { "context": "label", "string": "链接" }, "menuItemDialogLinkPlaceholder": { - "string": "Start typing to begin search..." + "string": "输入内容搜索" }, "menuItemDialogNameLabel": { "context": "menu item name", @@ -139,71 +139,71 @@ }, "menuItemsAddItem": { "context": "add new menu item", - "string": "Create new item" + "string": "创建新的宝贝" }, "menuItemsHeader": { "context": "header", - "string": "Menu Items" + "string": "菜单条目" }, "menuItemsPlaceholder": { - "string": "Add new menu item to begin creating menu" + "string": "添加新的菜单至开始菜单" }, "menuListCreatedMenu": { - "string": "Created menu" + "string": "已创建的菜单" }, "menuListDeleteMenuContent": { - "string": "Are you sure you want to delete {menuName}?" + "string": "您确认要删除菜单 {menuName}?" }, "menuListDeleteMenuHeader": { "context": "dialog header", - "string": "Delete Menu" + "string": "删除菜单" }, "menuListDeleteMenusContent": { - "string": "{counter,plural,one {Are you sure you want to delete this menu?} other {Are you sure you want to delete {displayQuantity} menus?}}" + "string": "{counter,plural,other {确认要删除{displayQuantity}菜单?}}" }, "menuListDeleteMenusHeader": { "context": "dialog header", - "string": "Delete Menus" + "string": "删除菜单" }, "menuListDeletedMenu": { - "string": "Deleted menu" + "string": "已删除菜单" }, "menuListItems": { "context": "number of menu items", - "string": "Items" + "string": "宝贝" }, "menuListMenutitle": { - "string": "Menu Title" + "string": "菜单标题" }, "menuListNoMenus": { - "string": "No menus found" + "string": "没有菜单" }, "menuListPageAddMenu": { "context": "button", - "string": "Create Menu" + "string": "新建菜单" }, "menuPropertiesMenuTitle": { - "string": "Menu Title" + "string": "菜单标题" }, "orderCustomerBillingAddressNotSet": { "context": "no address is set in draft order", - "string": "Not set" + "string": "没有设置" }, "orderCustomerCustomerNotSet": { "context": "customer is not set in draft order", - "string": "Not set" + "string": "没有设置" }, "orderCustomerShippingAddressNotSet": { "context": "shipping address is not set in draft order", - "string": "Not set" + "string": "没有设置" }, "orderPaymentShippingDoesNotApply": { "context": "order does not require shipping", - "string": "does not apply" + "string": "没有生效" }, "orderPaymentVATDoesNotApply": { "context": "vat not included in order price", - "string": "does not apply" + "string": "没有生效" }, "productStatusLabel": { "context": "product", @@ -211,15 +211,15 @@ }, "productStockHeader": { "context": "product stock, section header", - "string": "Inventory" + "string": "库存" }, "productTypeCreateHeader": { "context": "window title", - "string": "Create Product Type" + "string": "新建产品类型" }, "productTypeCreatePageHeader": { "context": "header", - "string": "Create Product Type" + "string": "新建产品类型" }, "productTypeTaxesHeader": { "context": "section header", @@ -236,113 +236,113 @@ "string": "价格" }, "productVariantCreatePricesStockInputLabel": { - "string": "Stock" + "string": "库存" }, "productVariantCreatorStockSectionHeader": { "context": "variant stock, header", - "string": "Stock" + "string": "存货" }, "productVariantCreatorWarehouseSectionHeader": { "context": "header", - "string": "Warehouses" + "string": "货仓" }, "productVariantPriceOptionalCostPriceField": { "context": "optional field", - "string": "Optional" + "string": "可选" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", - "string": "Optional" + "string": "可选" }, "saleDetailsPageCategoriesQuantity": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "分类({quantity})" }, "saleDetailsPageCollectionsQuantity": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "系列 ({quantity})" }, "saleDetailsPageProductsQuantity": { "context": "number of products", - "string": "Products ({quantity})" + "string": "产品 ({quantity})" }, "saleDetailsUnassignCategory": { "context": "unassign category from sale, button", - "string": "Unassign" + "string": "取消分配" }, "saleDetailsUnassignCollection": { "context": "unassign collection from sale, button", - "string": "Unassign" + "string": "取消分配" }, "saleDetailsUnassignProduct": { "context": "unassign product from sale, button", - "string": "Unassign" + "string": "取消分配" }, "shippingZoneDetailsDialogsDeleteShippingMethod": { "context": "delete shipping method", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "shippingZoneDetailsDialogsDeleteShippingZone": { "context": "delete shipping zone", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "shippingZoneWarehouses_dot_autocomplete_dot_label": { "context": "autocomplete select label", - "string": "Warehouse" + "string": "货仓" }, "siteSettingsMailingHelperText": { "context": "helper text", - "string": "Mailing Configuration" + "string": "邮件配置" }, "src_dot_accept": { "context": "button", - "string": "Accept" + "string": "接受" }, "src_dot_attributes": { "context": "attributes section name", "string": "属性" }, "src_dot_attributes_dot_attributeSlugUnique": { - "string": "Attribute with this slug already exists" + "string": "此条属性已存在" }, "src_dot_attributes_dot_attributeValueAlreadyExists": { - "string": "This value already exists within this attribute" + "string": "此值已存在于此属性中" }, "src_dot_attributes_dot_components_dot_AttributeBulkDeleteDialog_dot_1184518529": { "context": "dialog content", - "string": "{counter,plural,one {Are you sure you want to delete this attribute?} other {Are you sure you want to delete {displayQuantity} attributes?}}" + "string": "{counter,plural,other {确认要删除{displayQuantity}属性?}}" }, "src_dot_attributes_dot_components_dot_AttributeBulkDeleteDialog_dot_1655187315": { "context": "dialog title", - "string": "Delete attributes" + "string": "删除属性" }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_1889602489": { "context": "dialog title", - "string": "Delete attribute" + "string": "删除属性" }, "src_dot_attributes_dot_components_dot_AttributeDeleteDialog_dot_3738429348": { "context": "dialog content", - "string": "Are you sure you want to delete {attributeName}?" + "string": "确认要删除{attributeName}属性?" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_1005562666": { "context": "attribute's editor component", - "string": "Catalog Input type for Store Owner" + "string": "商店所有者的目录输入类型" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_1336738461": { "context": "product attribute type", - "string": "Dropdown" + "string": "下拉" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_2592224946": { "context": "check to require attribute to have value", - "string": "Value Required" + "string": "所需值" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3334509011": { "context": "product attribute type", - "string": "Multiple Select" + "string": "多选" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_3605174225": { "context": "attribute's slug short code label", - "string": "Attribute Code" + "string": "属性码" }, "src_dot_attributes_dot_components_dot_AttributeDetails_dot_4107478955": { "context": "attribute slug input field helper text", @@ -354,7 +354,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_2417065806": { "context": "tab name", - "string": "All Attributes" + "string": "所有属性" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_3824684885": { "context": "button", @@ -381,7 +381,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_valueRequired": { "context": "attribute value is required", - "string": "Value Required" + "string": "所需值" }, "src_dot_attributes_dot_components_dot_AttributeListPage_dot_visibleInStorefront": { "context": "attribute", @@ -399,7 +399,7 @@ "string": "Searchable" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_3605174225": { - "string": "Attribute Code" + "string": "属性码" }, "src_dot_attributes_dot_components_dot_AttributeList_dot_643174786": { "context": "attribute is visible", @@ -411,7 +411,7 @@ }, "src_dot_attributes_dot_components_dot_AttributePage_dot_2855501559": { "context": "page title", - "string": "Create New Attribute" + "string": "新建新属性" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_1318123158": { "context": "attribute is filterable in storefront", @@ -438,7 +438,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_673770329": { "context": "add attribute as column in product list table", - "string": "Add to Column Options" + "string": "添加列选项" }, "src_dot_attributes_dot_components_dot_AttributeProperties_dot_714335445": { "context": "use attribute in filtering", @@ -464,7 +464,7 @@ }, "src_dot_attributes_dot_components_dot_AttributeValueEditDialog_dot_1841790893": { "context": "add attribute value", - "string": "Add Value" + "string": "添加值" }, "src_dot_attributes_dot_components_dot_AttributeValueEditDialog_dot_636461959": { "context": "attribute name", @@ -502,7 +502,7 @@ }, "src_dot_attributes_dot_views_dot_AttributeDetails_dot_634268988": { "context": "added new attribute value", - "string": "Added new value" + "string": "添加新的值" }, "src_dot_attributes_dot_views_dot_AttributeList_dot_3218248395": { "context": "deleted multiple attributes", @@ -533,7 +533,7 @@ "string": "Set new password" }, "src_dot_auth_dot_components_dot_NewPasswordPage_dot_2799926859": { - "string": "Confirm Password" + "string": "密码确认" }, "src_dot_auth_dot_components_dot_NewPasswordPage_dot_4253911811": { "string": "Passwords do not match" @@ -547,7 +547,7 @@ }, "src_dot_auth_dot_components_dot_ResetPasswordSuccessPage_dot_2245157344": { "context": "button", - "string": "Back to login" + "string": "返回登录" }, "src_dot_auth_dot_components_dot_ResetPasswordSuccessPage_dot_4066297200": { "string": "Success! In a few minutes you’ll receive a message with instructions on how to reset your password." @@ -560,7 +560,7 @@ }, "src_dot_back": { "context": "button", - "string": "Back" + "string": "返回" }, "src_dot_cancel": { "context": "button", @@ -568,10 +568,10 @@ }, "src_dot_cancelled": { "context": "order status", - "string": "Cancelled" + "string": "取消" }, "src_dot_catalog": { - "string": "Catalog" + "string": "分类" }, "src_dot_categories": { "context": "categories section name", @@ -579,18 +579,18 @@ }, "src_dot_categories_dot_components_dot_CategoryBackground_dot_2224943474": { "context": "section header", - "string": "Background Image (optional)" + "string": "北京台(可选)" }, "src_dot_categories_dot_components_dot_CategoryBackground_dot_3289097895": { "context": "field is optional", - "string": "(Optional)" + "string": "(可选)" }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_236319840": { "context": "page header", - "string": "Create New Category" + "string": "新建新分类" }, "src_dot_categories_dot_components_dot_CategoryCreatePage_dot_2563994280": { - "string": "Add search engine title and description to make this category easier to find" + "string": "添加关键字使得这个分类更容易被搜索引擎找到" }, "src_dot_categories_dot_components_dot_CategoryDeleteDialog_dot_2004894945": { "context": "dialog title", @@ -601,10 +601,10 @@ "string": "Are you sure you want to delete {categoryName}?" }, "src_dot_categories_dot_components_dot_CategoryDetailsForm_dot_1214235329": { - "string": "Category Name" + "string": "分类名" }, "src_dot_categories_dot_components_dot_CategoryDetailsForm_dot_4037703468": { - "string": "Category Description" + "string": "分类描述" }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_1140231710": { "context": "button", @@ -615,10 +615,10 @@ }, "src_dot_categories_dot_components_dot_CategoryListPage_dot_4294878092": { "context": "tab name", - "string": "All Categories" + "string": "所有分类" }, "src_dot_categories_dot_components_dot_CategoryList_dot_1214235329": { - "string": "Category Name" + "string": "分类名" }, "src_dot_categories_dot_components_dot_CategoryList_dot_2054128296": { "string": "No categories found" @@ -639,7 +639,7 @@ "string": "价格" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1657559629": { - "string": "No products found" + "string": "没有产品" }, "src_dot_categories_dot_components_dot_CategoryProductList_dot_1952810469": { "context": "product type", @@ -670,7 +670,7 @@ "string": "Subcategories" }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_2563994280": { - "string": "Add search engine title and description to make this category easier to find" + "string": "添加关键字使得这个分类更容易被搜索引擎找到" }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_2968663655": { "context": "number of products in category", @@ -678,7 +678,7 @@ }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_3229914152": { "context": "section header", - "string": "All Subcategories" + "string": "全部子类" }, "src_dot_categories_dot_components_dot_CategoryUpdatePage_dot_770296100": { "context": "button", @@ -692,7 +692,7 @@ "string": "{counter,plural,one {Are you sure you want to delete this product?} other {Are you sure you want to delete {displayQuantity} products?}}" }, "src_dot_categories_dot_views_dot_1754466114": { - "string": "Category created" + "string": "分类已新建" }, "src_dot_categories_dot_views_dot_1823337870": { "string": "{counter,plural,one {Are you sure you want to delete this category?} other {Are you sure you want to delete {displayQuantity} categories?}}" @@ -702,7 +702,7 @@ "string": "Delete category" }, "src_dot_categories_dot_views_dot_2189424032": { - "string": "Category deleted" + "string": "分类已删除" }, "src_dot_categories_dot_views_dot_2507763081": { "context": "dialog title", @@ -745,11 +745,11 @@ "string": "will be visible from {date}" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_946315389": { - "string": "Add search engine title and description to make this collection easier to find" + "string": "添加关键字使得这个系列更容易被搜索引擎找到" }, "src_dot_collections_dot_components_dot_CollectionCreatePage_dot_951411809": { "context": "page header", - "string": "Add Collection" + "string": "添加系列" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_1815688500": { "context": "collection", @@ -764,7 +764,7 @@ "string": "Feature on Homepage" }, "src_dot_collections_dot_components_dot_CollectionDetailsPage_dot_946315389": { - "string": "Add search engine title and description to make this collection easier to find" + "string": "添加关键字使得这个系列更容易被搜索引擎找到" }, "src_dot_collections_dot_components_dot_CollectionDetails_dot_636461959": { "context": "collection name", @@ -772,15 +772,15 @@ }, "src_dot_collections_dot_components_dot_CollectionImage_dot_2224943474": { "context": "section header", - "string": "Background Image (optional)" + "string": "北京台(可选)" }, "src_dot_collections_dot_components_dot_CollectionImage_dot_3289097895": { "context": "field is optional", - "string": "(Optional)" + "string": "(可选)" }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_1631917001": { "context": "tab name", - "string": "All Collections" + "string": "所有系列" }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_4057224233": { "string": "Search Collection" @@ -791,7 +791,7 @@ }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_hidden": { "context": "collection", - "string": "Hidden" + "string": "隐藏" }, "src_dot_collections_dot_components_dot_CollectionListPage_dot_published": { "context": "collection", @@ -808,7 +808,7 @@ "string": "No. of Products" }, "src_dot_collections_dot_components_dot_CollectionList_dot_2759199473": { - "string": "Collection Name" + "string": "系列名" }, "src_dot_collections_dot_components_dot_CollectionList_dot_3326160357": { "context": "collection availability", @@ -819,7 +819,7 @@ "string": "已发布" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1657559629": { - "string": "No products found" + "string": "没有产品" }, "src_dot_collections_dot_components_dot_CollectionProducts_dot_1952810469": { "context": "product type", @@ -849,7 +849,7 @@ "string": "删除套餐" }, "src_dot_collections_dot_views_dot_2001540731": { - "string": "Added product to collection" + "string": "将产品添加到系列" }, "src_dot_collections_dot_views_dot_2402899582": { "string": "Are you sure you want to delete collection's image?" @@ -877,7 +877,7 @@ }, "src_dot_collections_dot_views_dot_870815507": { "context": "unassign product from collection, button", - "string": "Unassign" + "string": "取消分配" }, "src_dot_collections_dot_views_dot_942133001": { "context": "dialog title", @@ -933,7 +933,7 @@ }, "src_dot_components_dot_AccountStatus_dot_2183517419": { "context": "section header", - "string": "Account Status" + "string": "账户状态" }, "src_dot_components_dot_AccountStatus_dot_2683780981": { "string": "If you want to disable this account uncheck the box below" @@ -945,7 +945,7 @@ "string": "Phone" }, "src_dot_components_dot_AddressEdit_dot_1363074570": { - "string": "Address line 1" + "string": "地址行1" }, "src_dot_components_dot_AddressEdit_dot_253031977": { "string": "城市" @@ -954,13 +954,13 @@ "string": "ZIP / Postal code" }, "src_dot_components_dot_AddressEdit_dot_3121963259": { - "string": "Address line 2" + "string": "地址行2" }, "src_dot_components_dot_AddressEdit_dot_3570415321": { - "string": "Company" + "string": "公司" }, "src_dot_components_dot_AddressEdit_dot_944851093": { - "string": "Country area" + "string": "国家地区" }, "src_dot_components_dot_AppLayout_dot_21332146": { "context": "button", @@ -968,7 +968,7 @@ }, "src_dot_components_dot_AppLayout_dot_248888005": { "context": "button", - "string": "Account Settings" + "string": "账户设置" }, "src_dot_components_dot_AssignCategoryDialog_dot_1305061437": { "string": "Search Categories" @@ -1034,7 +1034,7 @@ "string": "Phone" }, "src_dot_components_dot_CompanyAddressInput_dot_1363074570": { - "string": "Address line 1" + "string": "地址行1" }, "src_dot_components_dot_CompanyAddressInput_dot_253031977": { "string": "城市" @@ -1043,17 +1043,17 @@ "string": "ZIP / Postal code" }, "src_dot_components_dot_CompanyAddressInput_dot_3121963259": { - "string": "Address line 2" + "string": "地址行2" }, "src_dot_components_dot_CompanyAddressInput_dot_3570415321": { - "string": "Company" + "string": "公司" }, "src_dot_components_dot_CompanyAddressInput_dot_944851093": { - "string": "Country area" + "string": "国家地区" }, "src_dot_components_dot_ConfirmButton_dot_2845142593": { "context": "button", - "string": "Error" + "string": "错误" }, "src_dot_components_dot_CountryList_dot_2460766407": { "context": "number of countries", @@ -1072,17 +1072,17 @@ }, "src_dot_components_dot_ErrorMessageCard_dot_2845142593": { "context": "header", - "string": "Error" + "string": "错误" }, "src_dot_components_dot_ErrorPage_dot_1723676032": { "context": "button", - "string": "Back to home" + "string": "返回首页" }, "src_dot_components_dot_ErrorPage_dot_2736139139": { - "string": "Ooops!..." + "string": "噢!..." }, "src_dot_components_dot_ErrorPage_dot_2845142593": { - "string": "Error" + "string": "错误" }, "src_dot_components_dot_ErrorPage_dot_3090161573": { "string": "Don't worry, everything is gonna be fine" @@ -1157,7 +1157,7 @@ }, "src_dot_components_dot_MultiAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", - "string": "Add new value: {value}" + "string": "添加新的值:{value}" }, "src_dot_components_dot_MultiAutocompleteSelectField_dot_4205644805": { "string": "No results found" @@ -1221,19 +1221,19 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_createCategory": { "context": "button", - "string": "Create Category" + "string": "新建分类" }, "src_dot_components_dot_Navigator_dot_modes_dot_createCollection": { "context": "button", - "string": "Create Collection" + "string": "新建系列" }, "src_dot_components_dot_Navigator_dot_modes_dot_createCustomer": { "context": "button", - "string": "Create Customer" + "string": "新建客户" }, "src_dot_components_dot_Navigator_dot_modes_dot_createOrder": { "context": "button", - "string": "Create Order" + "string": "新建订单" }, "src_dot_components_dot_Navigator_dot_modes_dot_createPermissionGroup": { "context": "button", @@ -1241,7 +1241,7 @@ }, "src_dot_components_dot_Navigator_dot_modes_dot_createProduct": { "context": "button", - "string": "Create Product" + "string": "新建产品" }, "src_dot_components_dot_Navigator_dot_modes_dot_createVoucher": { "context": "button", @@ -1285,7 +1285,7 @@ "string": "产品" }, "src_dot_components_dot_NotFoundPage_dot_2736139139": { - "string": "Ooops!..." + "string": "噢!..." }, "src_dot_components_dot_NotFoundPage_dot_4036415297": { "string": "Something's missing" @@ -1302,7 +1302,7 @@ }, "src_dot_components_dot_RichTextEditor_dot_1603794322": { "context": "dialog header", - "string": "Add Image Link" + "string": "添加图片链接" }, "src_dot_components_dot_RichTextEditor_dot_2049070632": { "context": "replace image, button", @@ -1310,7 +1310,7 @@ }, "src_dot_components_dot_RichTextEditor_dot_2160163587": { "context": "button", - "string": "Add or Edit Link" + "string": "添加或编辑链接" }, "src_dot_components_dot_RichTextEditor_dot_286109898": { "context": "rich text error", @@ -1320,7 +1320,7 @@ "string": "URL Linked" }, "src_dot_components_dot_RichTextEditor_dot_4035057905": { - "string": "Image URL" + "string": "图片URL" }, "src_dot_components_dot_RowNumberSelect_dot_1154361791": { "string": "No of Rows:" @@ -1366,7 +1366,7 @@ }, "src_dot_components_dot_SingleAutocompleteSelectField_dot_1477537381": { "context": "add custom select input option", - "string": "Add new value: {value}" + "string": "添加新的值:{value}" }, "src_dot_components_dot_SingleAutocompleteSelectField_dot_3069107721": { "string": "None" @@ -1402,7 +1402,7 @@ "string": "Visible" }, "src_dot_components_dot_VisibilityCard_dot_77815154": { - "string": "Hidden" + "string": "隐藏" }, "src_dot_components_dot_WeightRange_dot_264731940": { "context": "weight", @@ -1447,7 +1447,7 @@ }, "src_dot_confirm": { "context": "button", - "string": "Confirm" + "string": "确认" }, "src_dot_create": { "context": "button", @@ -1459,11 +1459,11 @@ }, "src_dot_customers_dot_components_dot_CustomerAddressDialog_dot_2364475135": { "context": "dialog title", - "string": "Edit Address" + "string": "编辑地址" }, "src_dot_customers_dot_components_dot_CustomerAddressDialog_dot_3769321414": { "context": "dialog title", - "string": "Add Address" + "string": "添加地址" }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_1090326769": { "context": "customer's address book, header", @@ -1477,36 +1477,36 @@ }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_3623935073": { "context": "button", - "string": "Add address" + "string": "添加地址" }, "src_dot_customers_dot_components_dot_CustomerAddressListPage_dot_489918044": { "context": "customer details, header", "string": "{fullName} Details" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_1224809208": { - "string": "Default Address" + "string": "默认地址" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_1578192486": { - "string": "Default Billing Address" + "string": "默认账单地址" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_2131178753": { "context": "button", - "string": "Set as default shipping address" + "string": "设为默认配送地址" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_3096438859": { "context": "button", - "string": "Set as default billing address" + "string": "设为默认账单地址" }, "src_dot_customers_dot_components_dot_CustomerAddress_dot_4109348993": { - "string": "Default Shipping Address" + "string": "默认配送地址" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_1967111456": { "context": "header", - "string": "Address Information" + "string": "地址信息" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_2758581442": { "context": "subsection header", - "string": "Shipping Address" + "string": "配送地址" }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_359810770": { "context": "subsection header", @@ -1517,14 +1517,14 @@ }, "src_dot_customers_dot_components_dot_CustomerAddresses_dot_4282475982": { "context": "subsection header", - "string": "Billing Address" + "string": "账单地址" }, "src_dot_customers_dot_components_dot_CustomerCreateAddress_dot_1751533141": { "context": "page header", - "string": "Primary Address" + "string": "首要地址" }, "src_dot_customers_dot_components_dot_CustomerCreateAddress_dot_401345057": { - "string": "The primary address of this customer." + "string": "这个客户的主要地址" }, "src_dot_customers_dot_components_dot_CustomerCreateDetails_dot_3063084773": { "context": "header", @@ -1543,7 +1543,7 @@ }, "src_dot_customers_dot_components_dot_CustomerCreatePage_dot_4025686004": { "context": "page header", - "string": "Create Customer" + "string": "新建客户" }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_2968565128": { "context": "check to mark this account as active", @@ -1551,7 +1551,7 @@ }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_3298169382": { "context": "section subheader", - "string": "Active member since {date}" + "string": "从 {date} 起的活跃用户" }, "src_dot_customers_dot_components_dot_CustomerDetails_dot_577013340": { "context": "note about customer", @@ -1563,7 +1563,7 @@ }, "src_dot_customers_dot_components_dot_CustomerInfo_dot_778526801": { "context": "customer contact section, header", - "string": "Contact Informations" + "string": "联系人信息" }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_1643417013": { "string": "Search Customer" @@ -1574,7 +1574,7 @@ }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_477293306": { "context": "tab name", - "string": "All Customers" + "string": "所有客户" }, "src_dot_customers_dot_components_dot_CustomerListPage_dot_joinDate": { "context": "customer", @@ -1646,14 +1646,14 @@ }, "src_dot_customers_dot_views_dot_2657976015": { "context": "dialog header", - "string": "Delete Address" + "string": "删除地址" }, "src_dot_customers_dot_views_dot_2859116187": { "context": "window title", "string": "Create customer" }, "src_dot_customers_dot_views_dot_3689332763": { - "string": "Are you sure you want to delete this address from users address book?" + "string": "你确定要把这个地址从地址薄中删除吗?" }, "src_dot_customers_dot_views_dot_3901579344": { "string": "Customer Removed" @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "描述" }, @@ -1682,7 +1686,7 @@ "string": "折扣" }, "src_dot_discounts_dot_components_dot_DiscountCategories_dot_1567318211": { - "string": "Category name" + "string": "分类名" }, "src_dot_discounts_dot_components_dot_DiscountCategories_dot_1681512341": { "context": "section header", @@ -1711,7 +1715,7 @@ "string": "产品" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_3011396316": { - "string": "Collection name" + "string": "系列名" }, "src_dot_discounts_dot_components_dot_DiscountCollections_dot_452750900": { "context": "section header", @@ -1749,7 +1753,7 @@ "string": "Active Dates" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_1657559629": { - "string": "No products found" + "string": "没有产品" }, "src_dot_discounts_dot_components_dot_DiscountProducts_dot_2100305525": { "context": "button", @@ -1798,7 +1802,7 @@ }, "src_dot_discounts_dot_components_dot_SaleListPage_dot_expired": { "context": "sale status", - "string": "Expired" + "string": "已过期" }, "src_dot_discounts_dot_components_dot_SaleListPage_dot_fixed": { "context": "discount type", @@ -1894,15 +1898,15 @@ }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_346170541": { "context": "number of categories", - "string": "Categories ({quantity})" + "string": "分类({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_3673147015": { "context": "number of collections", - "string": "Collections ({quantity})" + "string": "系列 ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherDetailsPage_dot_846927739": { "context": "number of products", - "string": "Products ({quantity})" + "string": "产品 ({quantity})" }, "src_dot_discounts_dot_components_dot_VoucherInfo_dot_1262795626": { "string": "Discount Code" @@ -1928,7 +1932,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_1112241061": { "context": "tab name", - "string": "All Vouchers" + "string": "所有代币券" }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_1930485532": { "string": "Search Voucher" @@ -1943,7 +1947,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_expired": { "context": "voucher status", - "string": "Expired" + "string": "已过期" }, "src_dot_discounts_dot_components_dot_VoucherListPage_dot_fixed": { "context": "discount type", @@ -2025,7 +2029,7 @@ }, "src_dot_discounts_dot_components_dot_VoucherSummary_dot_2735425668": { "context": "voucher", - "string": "Applies to" + "string": "应用到" }, "src_dot_discounts_dot_components_dot_VoucherSummary_dot_3751756157": { "context": "voucher value requirement", @@ -2180,7 +2184,7 @@ "string": "编辑" }, "src_dot_email": { - "string": "E-mail Address" + "string": "电子邮箱" }, "src_dot_endDate": { "string": "End Date" @@ -2231,7 +2235,7 @@ }, "src_dot_optionalField": { "context": "field is optional", - "string": "Optional" + "string": "可选" }, "src_dot_orders": { "context": "orders section name", @@ -2239,15 +2243,15 @@ }, "src_dot_orders_dot_components_dot_OrderAddressEditDialog_dot_3278396777": { "context": "dialog header", - "string": "Edit Shipping Address" + "string": "编辑配送地址" }, "src_dot_orders_dot_components_dot_OrderAddressEditDialog_dot_3982060155": { "context": "dialog header", - "string": "Edit Billing Address" + "string": "编辑账单地址" }, "src_dot_orders_dot_components_dot_OrderBulkCancelDialog_dot_1528036340": { "context": "dialog header", - "string": "Cancel Orders" + "string": "取消订单" }, "src_dot_orders_dot_components_dot_OrderBulkCancelDialog_dot_4224885638": { "string": "{counter,plural,one {Are you sure you want to cancel this order?} other {Are you sure you want to cancel {displayQuantity} orders?}}" @@ -2271,7 +2275,7 @@ }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2312694610": { "context": "subheader", - "string": "Contact Information" + "string": "联系人信息" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2433460203": { "string": "Search Customers" @@ -2281,7 +2285,7 @@ "string": "View Profile" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_2758581442": { - "string": "Shipping Address" + "string": "配送地址" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_3426593715": { "context": "section header", @@ -2289,13 +2293,13 @@ }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_3912924864": { "context": "billing address", - "string": "Same as shipping address" + "string": "和配送地址相同" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_4172383244": { - "string": "Anonymous user" + "string": "不知名用户" }, "src_dot_orders_dot_components_dot_OrderCustomer_dot_4282475982": { - "string": "Billing Address" + "string": "账单地址" }, "src_dot_orders_dot_components_dot_OrderDetailsPage_dot_1854613983": { "context": "button", @@ -2320,7 +2324,7 @@ "string": "数量" }, "src_dot_orders_dot_components_dot_OrderDraftDetailsProducts_dot_546865199": { - "string": "No Products added to Order" + "string": "没有产品添加到订单" }, "src_dot_orders_dot_components_dot_OrderDraftDetailsProducts_dot_878013594": { "context": "total price of ordered products", @@ -2328,7 +2332,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftDetailsSummary_dot_2429341469": { "context": "button", - "string": "Add shipping carrier" + "string": "添加快递公司" }, "src_dot_orders_dot_components_dot_OrderDraftDetailsSummary_dot_3202709354": { "string": "Taxes (VAT included)" @@ -2338,7 +2342,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftDetailsSummary_dot_781550514": { "context": "subtotal price or an order", - "string": "Subtotal" + "string": "小计" }, "src_dot_orders_dot_components_dot_OrderDraftDetailsSummary_dot_878013594": { "context": "total price of an order", @@ -2350,10 +2354,10 @@ }, "src_dot_orders_dot_components_dot_OrderDraftDetails_dot_2528459381": { "context": "button", - "string": "Add products" + "string": "添加多个产品" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_115822814": { - "string": "No billing address" + "string": "没有账单地址" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_1161061962": { "context": "dialog header", @@ -2366,7 +2370,7 @@ "string": "There are missing or incorrect informations about this order:" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_2430492151": { - "string": "No shipping address" + "string": "无配送地址" }, "src_dot_orders_dot_components_dot_OrderDraftFinalizeDialog_dot_2725265632": { "context": "button", @@ -2391,7 +2395,7 @@ }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_551325728": { "context": "tab name", - "string": "All Drafts" + "string": "草稿箱" }, "src_dot_orders_dot_components_dot_OrderDraftListPage_dot_77765281": { "string": "Search Draft" @@ -2405,7 +2409,7 @@ "string": "客户" }, "src_dot_orders_dot_components_dot_OrderDraftList_dot_2177368638": { - "string": "No draft orders found" + "string": "未付款订单" }, "src_dot_orders_dot_components_dot_OrderDraftList_dot_2889196282": { "string": "No. of Order" @@ -2507,7 +2511,7 @@ }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_1119771899": { "context": "fulfillment group tracking number", - "string": "Add tracking" + "string": "添加追踪" }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_1134347598": { "context": "product price", @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "库存单位" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2546,7 +2554,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1230178536": { "context": "order history message", - "string": "Order address was updated" + "string": "订单地址已更新" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_1521936480": { "context": "order history message", @@ -2578,7 +2586,7 @@ }, "src_dot_orders_dot_components_dot_OrderHistory_dot_2304318421": { "context": "order history message", - "string": "Note was added to the order" + "string": "备注被添加到订单" }, "src_dot_orders_dot_components_dot_OrderHistory_dot_2369495522": { "context": "order history message", @@ -2656,7 +2664,7 @@ }, "src_dot_orders_dot_components_dot_OrderListPage_dot_875489544": { "context": "tab name", - "string": "All Orders" + "string": "全部订单" }, "src_dot_orders_dot_components_dot_OrderListPage_dot_customer": { "context": "order", @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "折扣" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "预授权金额" @@ -2762,16 +2774,12 @@ }, "src_dot_orders_dot_components_dot_OrderPayment_dot_781550514": { "context": "order subtotal price", - "string": "Subtotal" + "string": "小计" }, "src_dot_orders_dot_components_dot_OrderPayment_dot_878013594": { "context": "order total price", "string": "总数" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "库存单位" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "总数" @@ -2838,7 +2854,7 @@ "string": "Order successfully cancelled" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_3178394068": { - "string": "Note successfully added" + "string": "备注成功添加" }, "src_dot_orders_dot_views_dot_OrderDetails_dot_3280942553": { "string": "Order payment successfully voided" @@ -2898,14 +2914,14 @@ }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1068617485": { "context": "page header", - "string": "Create Page" + "string": "新建页面" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1815688500": { "context": "page", "string": "since {date}" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_1996767833": { - "string": "Add search engine title and description to make this page easier to find" + "string": "添加标题和描述使得这个页面更容易被搜索引擎找到" }, "src_dot_pages_dot_components_dot_PageDetailsPage_dot_2001551496": { "context": "page", @@ -2958,7 +2974,7 @@ }, "src_dot_pages_dot_views_dot_1068617485": { "context": "header", - "string": "Create Page" + "string": "新建页面" }, "src_dot_pages_dot_views_dot_2680158037": { "string": "Successfully created new page" @@ -3033,7 +3049,7 @@ }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "不活跃" }, "src_dot_permissionGroups_dot_components_dot_AssignMembersDialog_dot_1731102929": { "context": "button", @@ -3071,7 +3087,7 @@ }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_2297471173": { "context": "dialog content", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupDeleteDialog_dot_3528974446": { "context": "dialog title", @@ -3105,14 +3121,14 @@ "string": "Members" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_4190792473": { - "string": "Actions" + "string": "动作" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupList_dot_425941108": { "string": "No permission groups found" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "不活跃" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_136112637": { "context": "empty list message", @@ -3122,7 +3138,7 @@ "string": "No members found" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_1789607185": { - "string": "Email Address" + "string": " 电子邮箱" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_2457011428": { "context": "button", @@ -3141,7 +3157,7 @@ "string": "Group members" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_4190792473": { - "string": "Actions" + "string": "动作" }, "src_dot_permissionGroups_dot_components_dot_PermissionGroupMemberList_dot_636461959": { "context": "staff member full name", @@ -3164,7 +3180,7 @@ }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupDetails_dot_870815507": { "context": "button title", - "string": "Unassign" + "string": "取消分配" }, "src_dot_permissionGroups_dot_views_dot_PermissionGroupList_dot_92979760": { "string": "Permission Group Deleted" @@ -3194,7 +3210,7 @@ }, "src_dot_plugins_dot_components_dot_PluginSecretFieldDialog_dot_3032939398": { "context": "header", - "string": "Add Value to Authorization Field" + "string": "添加值至授权区域" }, "src_dot_plugins_dot_components_dot_PluginSecretFieldDialog_dot_4269236107": { "context": "header", @@ -3227,7 +3243,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_3523826683": { "context": "tab name", - "string": "All Plugins" + "string": "所有插件" }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_active": { "context": "plugin", @@ -3235,7 +3251,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsListPage_dot_deactivated": { "context": "plugin", - "string": "Inactive" + "string": "不活跃" }, "src_dot_plugins_dot_components_dot_PluginsList_dot_3247064221": { "context": "plugin status", @@ -3243,7 +3259,7 @@ }, "src_dot_plugins_dot_components_dot_PluginsList_dot_4120604650": { "context": "user action bar", - "string": "Action" + "string": "动作" }, "src_dot_plugins_dot_components_dot_PluginsList_dot_636461959": { "context": "plugin name", @@ -3325,7 +3341,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeDeleteDialog_dot_2297471173": { "context": "delete product type", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_productTypes_dot_components_dot_ProductTypeDeleteDialog_dot_924066985": { "context": "dialog header", @@ -3340,7 +3356,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_1776073799": { "context": "tab name", - "string": "All Product Types" + "string": "全部产品类型" }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_3420445375": { "string": "Search Product Type" @@ -3351,7 +3367,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_configurable": { "context": "product type", - "string": "Configurable" + "string": "可配置" }, "src_dot_productTypes_dot_components_dot_ProductTypeListPage_dot_digital": { "context": "product", @@ -3386,7 +3402,7 @@ }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_2754779425": { "context": "product type", - "string": "Configurable" + "string": "可配置" }, "src_dot_productTypes_dot_components_dot_ProductTypeList_dot_881286562": { "context": "product type", @@ -3426,7 +3442,7 @@ }, "src_dot_productTypes_dot_views_dot_ProductTypeUpdate_dot_870815507": { "context": "unassign attribute from product type, button", - "string": "Unassign" + "string": "取消分配" }, "src_dot_products": { "context": "products section name", @@ -3467,7 +3483,7 @@ "string": "will be visible from {date}" }, "src_dot_products_dot_components_dot_ProductCreatePage_dot_2706108815": { - "string": "Add search engine title and description to make this product easier to find" + "string": "添加标题和描述使得这个产品更容易被搜索引擎找到" }, "src_dot_products_dot_components_dot_ProductDetailsForm_dot_636461959": { "context": "product name", @@ -3475,11 +3491,11 @@ }, "src_dot_products_dot_components_dot_ProductImageNavigation_dot_3060635772": { "context": "section header", - "string": "All Photos" + "string": "所有照片" }, "src_dot_products_dot_components_dot_ProductImagePage_dot_1905082483": { "context": "field is optional", - "string": "Optional" + "string": "可选" }, "src_dot_products_dot_components_dot_ProductImagePage_dot_2546267317": { "context": "header", @@ -3503,7 +3519,7 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_1542417144": { "context": "button", - "string": "Create Product" + "string": "新建产品" }, "src_dot_products_dot_components_dot_ProductListPage_dot_1952810469": { "context": "product type", @@ -3518,15 +3534,15 @@ }, "src_dot_products_dot_components_dot_ProductListPage_dot_821159718": { "context": "tab name", - "string": "All Products" + "string": "全部产品" }, "src_dot_products_dot_components_dot_ProductListPage_dot_available": { "context": "product status", - "string": "Available" + "string": "可用" }, "src_dot_products_dot_components_dot_ProductListPage_dot_hidden": { "context": "product is hidden", - "string": "Hidden" + "string": "隐藏" }, "src_dot_products_dot_components_dot_ProductListPage_dot_outOfStock": { "context": "product status", @@ -3552,7 +3568,7 @@ "string": "价格" }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { - "string": "No products found" + "string": "没有产品" }, "src_dot_products_dot_components_dot_ProductList_dot_1952810469": { "context": "product type", @@ -3586,11 +3602,11 @@ }, "src_dot_products_dot_components_dot_ProductOrganization_dot_2754779425": { "context": "product is configurable", - "string": "Configurable" + "string": "可配置" }, "src_dot_products_dot_components_dot_ProductOrganization_dot_2805838453": { "context": "field is optional", - "string": "*Optional. Adding product to collection helps users find it." + "string": "*可选.添加产品至系列帮助用户找到它" }, "src_dot_products_dot_components_dot_ProductOrganization_dot_4257289053": { "string": "Product Type" @@ -3621,17 +3637,14 @@ "context": "header", "string": "数量" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3644,11 +3657,11 @@ "string": "will be visible from {date}" }, "src_dot_products_dot_components_dot_ProductUpdatePage_dot_2706108815": { - "string": "Add search engine title and description to make this product easier to find" + "string": "添加标题和描述使得这个产品更容易被搜索引擎找到" }, "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_1536841622": { "context": "product attribute error", - "string": "All attributes should have value" + "string": "所有属性不能为空" }, "src_dot_products_dot_components_dot_ProductVariantAttributes_dot_258966189": { "context": "product attribute error", @@ -3695,7 +3708,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2670525734": { "context": "variant attribute", - "string": "Choose attribute" + "string": "选择属性" }, "src_dot_products_dot_components_dot_ProductVariantCreatorPage_dot_2745385064": { "context": "variant creation step", @@ -3758,7 +3771,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantDeleteDialog_dot_2297471173": { "context": "delete product variant", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_products_dot_components_dot_ProductVariantDeleteDialog_dot_3726089650": { "context": "dialog header", @@ -3777,7 +3790,7 @@ }, "src_dot_products_dot_components_dot_ProductVariantImages_dot_989683980": { "context": "button", - "string": "Choose photos" + "string": "选择图片" }, "src_dot_products_dot_components_dot_ProductVariantNavigation_dot_2153006789": { "context": "section header", @@ -3842,7 +3855,7 @@ }, "src_dot_products_dot_components_dot_ProductVariants_dot_3490038570": { "context": "product variant inventory status", - "string": "Inventory" + "string": "库存" }, "src_dot_products_dot_components_dot_ProductVariants_dot_3989383405": { "context": "button", @@ -3859,16 +3872,9 @@ "context": "product variant name", "string": "变种" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", - "string": "Create Product" + "string": "新建产品" }, "src_dot_products_dot_views_dot_1591632382": { "context": "page header", @@ -3937,7 +3943,7 @@ }, "src_dot_products_dot_views_dot_ProductUpdate_dot_2297471173": { "context": "delete product", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_products_dot_views_dot_ProductUpdate_dot_4108890645": { "string": "Product removed" @@ -4000,7 +4006,7 @@ }, "src_dot_services_dot_components_dot_ServiceCreatePage_dot_248507553": { "context": "header", - "string": "Create New Account" + "string": "新建用户" }, "src_dot_services_dot_components_dot_ServiceCreatePage_dot_27827485": { "context": "checkbox label", @@ -4018,11 +4024,11 @@ }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_2864204643": { "context": "button", - "string": "Copied" + "string": "已复制" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_3406541221": { "context": "button", - "string": "Copy token" + "string": "复制" }, "src_dot_services_dot_components_dot_ServiceDefaultToken_dot_4189999598": { "string": "We’ve created your default token. Make sure to copy your new personal access token now. You won’t be able to see it again." @@ -4033,7 +4039,7 @@ }, "src_dot_services_dot_components_dot_ServiceDeleteDialog_dot_2297471173": { "context": "delete service account", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_services_dot_components_dot_ServiceDetailsPage_dot_1848599267": { "context": "checkbox label", @@ -4049,7 +4055,7 @@ }, "src_dot_services_dot_components_dot_ServiceInfo_dot_3789449123": { "context": "service account", - "string": "Account Name" + "string": "用户名" }, "src_dot_services_dot_components_dot_ServiceInfo_dot_426959482": { "context": "header", @@ -4060,7 +4066,7 @@ }, "src_dot_services_dot_components_dot_ServiceListPage_dot_4040605455": { "context": "tab name", - "string": "All Service Accounts" + "string": "全部服务账号" }, "src_dot_services_dot_components_dot_ServiceListPage_dot_624280156": { "context": "button", @@ -4072,7 +4078,7 @@ }, "src_dot_services_dot_components_dot_ServiceListPage_dot_deactivated": { "context": "service account", - "string": "Inactive" + "string": "不活跃" }, "src_dot_services_dot_components_dot_ServiceList_dot_1342308051": { "string": "No service accounts found" @@ -4100,7 +4106,7 @@ }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_3406541221": { "context": "button", - "string": "Copy token" + "string": "复制" }, "src_dot_services_dot_components_dot_ServiceTokenCreateDialog_dot_3875340101": { "context": "header", @@ -4137,7 +4143,7 @@ }, "src_dot_services_dot_components_dot_ServiceTokens_dot_4190792473": { "context": "table actions", - "string": "Actions" + "string": "动作" }, "src_dot_services_dot_components_dot_ServiceTokens_dot_426959482": { "context": "header", @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" @@ -4202,7 +4211,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneCreatePage_dot_4049462680": { "context": "header", - "string": "Create New Shipping Zone" + "string": "新建新的配送区域" }, "src_dot_shipping_dot_components_dot_ShippingZoneCreatePage_dot_4270729636": { "string": "This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones" @@ -4230,7 +4239,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_1397795758": { "context": "add weight based shipping method, dialog header", - "string": "Add Weight Rate" + "string": "添加每公斤收费" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_1403365734": { "context": "shipping method price", @@ -4264,7 +4273,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_2892088870": { "context": "dialog header", - "string": "Add Price Rate" + "string": "添加优惠利率" }, "src_dot_shipping_dot_components_dot_ShippingZoneRateDialog_dot_3213611593": { "context": "shipping method", @@ -4336,7 +4345,7 @@ }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_1221560277": { "context": "section header", - "string": "Warehouse" + "string": "货仓" }, "src_dot_shipping_dot_components_dot_ShippingZoneWarehouses_dot_2304484478": { "context": "button", @@ -4427,7 +4436,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeyDialog_dot_1238948746": { "context": "dialog header", - "string": "Add New Authorization Key" + "string": "添加新的授权密钥" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeyDialog_dot_2237029987": { "string": "密码" @@ -4442,11 +4451,11 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeyDialog_dot_50561933": { "context": "button", - "string": "Add authentication" + "string": "添加认证" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeys_dot_1114030884": { "context": "button", - "string": "Add key" + "string": "添加键" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsKeys_dot_1270286507": { "context": "authentication provider name", @@ -4473,7 +4482,7 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "邮件配置" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsMailing_dot_297689661": { "string": "Configurate your email address from which all automatic emails will be sent to your customers." @@ -4502,11 +4511,11 @@ }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_2768400497": { "context": "section header", - "string": "Company Information" + "string": "公司信息" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_280712237": { "context": "section header", - "string": "Mailing Configuration" + "string": "邮件配置" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsPage_dot_3657173399": { "string": "Email adress you provide here will be used as a contact adress for your customers." @@ -4550,7 +4559,7 @@ }, "src_dot_staff_dot_components_dot_StaffListPage_dot_2852350932": { "context": "tab name", - "string": "All Staff Members" + "string": "全部员工" }, "src_dot_staff_dot_components_dot_StaffListPage_dot_61043583": { "string": "Search Staff Member" @@ -4573,10 +4582,10 @@ }, "src_dot_staff_dot_components_dot_StaffList_dot_1004218338": { "context": "staff member status", - "string": "Inactive" + "string": "不活跃" }, "src_dot_staff_dot_components_dot_StaffList_dot_1789607185": { - "string": "Email Address" + "string": " 电子邮箱" }, "src_dot_staff_dot_components_dot_StaffList_dot_3247064221": { "context": "staff member status", @@ -4609,7 +4618,7 @@ }, "src_dot_staff_dot_components_dot_StaffPassword_dot_1434811103": { "context": "button", - "string": "Change your password" + "string": "修改密码" }, "src_dot_staff_dot_components_dot_StaffPassword_dot_2237029987": { "context": "header", @@ -4634,7 +4643,7 @@ }, "src_dot_staff_dot_components_dot_StaffProperties_dot_2771097267": { "context": "button", - "string": "Change photo" + "string": "更换图片" }, "src_dot_staff_dot_components_dot_StaffProperties_dot_457748370": { "context": "button", @@ -4681,14 +4690,14 @@ "string": "Reduced Tax Rates" }, "src_dot_taxes_dot_components_dot_CountryList_dot_4039455144": { - "string": "Country Code" + "string": "国家代码" }, "src_dot_taxes_dot_components_dot_CountryList_dot_577035076": { - "string": "Country Name" + "string": "国家名字" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1040021611": { "context": "tax rate", - "string": "Accommodation" + "string": "住处" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1260218997": { "context": "tax rate", @@ -4696,7 +4705,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1323923780": { "context": "tax rate", - "string": "Bikes" + "string": "单车" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_1451721797": { "context": "tax rate", @@ -4714,7 +4723,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2201910191": { "context": "tax rate", - "string": "Baby foodstuffs" + "string": "婴儿食物" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_231341634": { "context": "tax rate", @@ -4726,11 +4735,11 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2394675125": { "context": "tax rate", - "string": "Books" + "string": "书籍" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2465450918": { "context": "tax rate", - "string": "Agricultural supplies" + "string": "农业供给" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2482229874": { "context": "tax rate", @@ -4746,7 +4755,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2584490289": { "context": "tax rate", - "string": "Children's clothing" + "string": "童衫" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_2616794607": { "context": "tax rate", @@ -4765,7 +4774,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_331632763": { "context": "tax rate", - "string": "Hotels" + "string": "酒店" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_331757068": { "context": "tax rate", @@ -4781,7 +4790,7 @@ }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_3911019760": { "context": "tax rate", - "string": "Advertising" + "string": "广告" }, "src_dot_taxes_dot_components_dot_CountryTaxesPage_dot_4199760668": { "context": "tax rate", @@ -4800,7 +4809,7 @@ "string": "Pharmaceuticals" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_142803418": { - "string": "All products prices are entered with tax included" + "string": "所有商品的价格已包含税" }, "src_dot_taxes_dot_components_dot_TaxConfiguration_dot_2102582640": { "string": "Show gross prices to customers in the storefront" @@ -4836,7 +4845,7 @@ "string": "No translation yet" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_1214235329": { - "string": "Category Name" + "string": "分类名" }, "src_dot_translations_dot_components_dot_TranslationsCategoriesPage_dot_1406947243": { "string": "Search Engine Description" @@ -4857,7 +4866,7 @@ "string": "Search Engine Title" }, "src_dot_translations_dot_components_dot_TranslationsCollectionsPage_dot_2759199473": { - "string": "Collection Name" + "string": "系列名" }, "src_dot_translations_dot_components_dot_TranslationsCollectionsPage_dot_3055443821": { "context": "header", @@ -4867,7 +4876,7 @@ "string": "Search Engine Preview" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_1163855804": { - "string": "Languages" + "string": "语言" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesListPage_dot_1866913828": { "string": "Search Sale" @@ -4923,20 +4932,20 @@ "string": "No translatable entities found" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_49462429": { - "string": "Completed Translations" + "string": "完整翻译" }, "src_dot_translations_dot_components_dot_TranslationsEntitiesList_dot_636461959": { "context": "entity (product, collection, shipping method) name", "string": "名字" }, "src_dot_translations_dot_components_dot_TranslationsLanguageListPage_dot_1163855804": { - "string": "Languages" + "string": "语言" }, "src_dot_translations_dot_components_dot_TranslationsLanguageList_dot_2966651157": { "string": "No languages found" }, "src_dot_translations_dot_components_dot_TranslationsLanguageList_dot_604081953": { - "string": "Language" + "string": "语言" }, "src_dot_translations_dot_components_dot_TranslationsPagesPage_dot_1116746286": { "context": "page content", @@ -5149,11 +5158,11 @@ }, "src_dot_warehouses": { "context": "warehouses section name", - "string": "Warehouses" + "string": "货仓" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_1967111456": { "context": "warehouse", - "string": "Address Information" + "string": "地址信息" }, "src_dot_warehouses_dot_components_dot_WarehouseCreatePage_dot_934572530": { "context": "header", @@ -5169,7 +5178,7 @@ }, "src_dot_warehouses_dot_components_dot_WarehouseDetailsPage_dot_1967111456": { "context": "warehouse", - "string": "Address Information" + "string": "地址信息" }, "src_dot_warehouses_dot_components_dot_WarehouseInfo_dot_2622674857": { "string": "Warehouse Name" @@ -5192,7 +5201,7 @@ "string": "No warehouses found" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_4190792473": { - "string": "Actions" + "string": "动作" }, "src_dot_warehouses_dot_components_dot_WarehouseList_dot_636461959": { "context": "warehouse", @@ -5223,7 +5232,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_2297471173": { "context": "delete webhook", - "string": "Are you sure you want to delete {name}?" + "string": "您确认想要删除 {name}??" }, "src_dot_webhooks_dot_components_dot_WebhookDeleteDialog_dot_3514087611": { "context": "dialog header", @@ -5239,7 +5248,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2454751033": { "context": "event", - "string": "All events" + "string": "全部事件" }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2899821092": { "context": "event", @@ -5337,7 +5346,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_3300314452": { "context": "tab name", - "string": "All Webhooks" + "string": "所有Webhooks" }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_active": { "context": "webhook", @@ -5345,7 +5354,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhooksListPage_dot_inactive": { "context": "webhook", - "string": "Inactive" + "string": "不活跃" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_1153324159": { "string": "No webhooks found" @@ -5356,7 +5365,7 @@ }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_4120604650": { "context": "user action bar", - "string": "Action" + "string": "动作" }, "src_dot_webhooks_dot_components_dot_WebhooksList_dot_618422799": { "string": "Unnamed webhook" @@ -5374,14 +5383,14 @@ }, "voucherDetailsUnassignCategory": { "context": "unassign category from voucher, button", - "string": "Unassign" + "string": "取消分配" }, "voucherDetailsUnassignCollection": { "context": "unassign collection from voucher, button", - "string": "Unassign" + "string": "取消分配" }, "voucherDetailsUnassignProduct": { "context": "unassign product from voucher, button", - "string": "Unassign" + "string": "取消分配" } } \ No newline at end of file diff --git a/locale/zh-Hant.json b/locale/zh-Hant.json index 41b86f20c..1e229ddf4 100644 --- a/locale/zh-Hant.json +++ b/locale/zh-Hant.json @@ -250,7 +250,7 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceOverrideField": { + "productVariantPriceOptionalPriceField": { "context": "optional field", "string": "Optional" }, @@ -1675,6 +1675,10 @@ "context": "button", "string": "Delete" }, + "src_dot_demo": { + "context": "notification message after log in", + "string": "Just to let you know... You're in demo mode. You can play around with the dashboard but can't save changes." + }, "src_dot_description": { "string": "描述" }, @@ -2532,6 +2536,10 @@ "context": "cancelled fulfillment, section header", "string": "Cancelled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderFulfillment_dot_693960049": { + "context": "ordered product sku", + "string": "庫存單位" + }, "src_dot_orders_dot_components_dot_OrderFulfillment_dot_732594284": { "context": "button", "string": "Cancel Fulfillment" @@ -2749,6 +2757,10 @@ "context": "order payment", "string": "Outstanding Balance" }, + "src_dot_orders_dot_components_dot_OrderPayment_dot_3720114122": { + "context": "order discount", + "string": "Discount" + }, "src_dot_orders_dot_components_dot_OrderPayment_dot_3768782744": { "context": "order payment", "string": "預先授權金額" @@ -2768,10 +2780,6 @@ "context": "order total price", "string": "Total" }, - "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_1542417144": { - "context": "dialog header", - "string": "Create Product" - }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2272209368": { "context": "variant sku", "string": "SKU {sku}" @@ -2779,6 +2787,10 @@ "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2336947364": { "string": "Search by product name, attribute, product type etc..." }, + "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2775402904": { + "context": "dialog header", + "string": "Add Product" + }, "src_dot_orders_dot_components_dot_OrderProductAddDialog_dot_2850255786": { "string": "Search Products" }, @@ -2809,6 +2821,10 @@ "context": "section header", "string": "Unfulfilled ({quantity})" }, + "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_693960049": { + "context": "ordered product sku", + "string": "庫存單位" + }, "src_dot_orders_dot_components_dot_OrderUnfulfilledItems_dot_878013594": { "context": "order line total price", "string": "Total" @@ -3621,17 +3637,14 @@ "context": "header", "string": "庫存" }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3143542809": { - "string": "This product doesn't have any stock. You can add it here." - }, - "src_dot_products_dot_components_dot_ProductStocks_dot_3482985373": { - "context": "button", - "string": "Edit Warehouses" - }, "src_dot_products_dot_components_dot_ProductStocks_dot_3633706025": { "context": "product inventory, checkbox", "string": "Track Inventory" }, + "src_dot_products_dot_components_dot_ProductStocks_dot_3857433664": { + "context": "button", + "string": "Assign Warehouse" + }, "src_dot_products_dot_components_dot_ProductStocks_dot_849869830": { "string": "Active inventory tracking will automatically calculate changes of stock" }, @@ -3859,13 +3872,6 @@ "context": "product variant name", "string": "複合式" }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_3482985373": { - "context": "dialog header", - "string": "Edit Warehouses" - }, - "src_dot_products_dot_components_dot_ProductWarehousesDialog_dot_4112406382": { - "string": "Select warehouses that stock selected product" - }, "src_dot_products_dot_views_dot_1542417144": { "context": "window title", "string": "Create Product" @@ -4147,6 +4153,9 @@ "context": "window title", "string": "Create Service Account" }, + "src_dot_sessionExpired": { + "string": "Your session has expired. Please log in again to continue." + }, "src_dot_shipping": { "context": "shipping section name", "string": "Shipping Methods" From 2d55cb85e1704a01da262f5b35feaa5c487489ec Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Tue, 16 Jun 2020 18:46:43 +0200 Subject: [PATCH 033/294] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eea309f0..0982e9674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] - Add sku column to fulfillment cards - #538 by @dominik-zeglen +- Migrate product base price to variant prices - #555 by @orzechdev ## 2.10.0 From 576c7e1b35724816cb19c737fa1a967b95f57d32 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 10:31:33 +0200 Subject: [PATCH 034/294] Update queries types --- src/categories/fixtures.ts | 20 +++++++ src/categories/queries.ts | 1 + src/categories/types/CategoryDetails.ts | 1 + src/products/fixtures.ts | 60 +++++++++++++++++++ src/products/queries.ts | 10 ++-- .../types/CreateMultipleVariantsData.ts | 1 + src/products/types/Product.ts | 2 +- src/products/types/ProductCreate.ts | 2 +- src/products/types/ProductDetails.ts | 2 +- src/products/types/ProductImageCreate.ts | 2 +- src/products/types/ProductImageUpdate.ts | 2 +- src/products/types/ProductList.ts | 1 + src/products/types/ProductUpdate.ts | 2 +- .../types/ProductVariantAttributesFragment.ts | 1 + src/products/types/SimpleProductUpdate.ts | 2 +- 15 files changed, 98 insertions(+), 11 deletions(-) diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index c4317e829..6e680a223 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -129,6 +129,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -137,6 +138,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -163,6 +165,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -171,6 +174,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -197,6 +201,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -205,6 +210,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -231,6 +237,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -239,6 +246,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -265,6 +273,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -273,6 +282,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -299,6 +309,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -307,6 +318,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -333,6 +345,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -341,6 +354,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -367,6 +381,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -375,6 +390,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -401,6 +417,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -409,6 +426,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, @@ -435,6 +453,7 @@ export const category: ( variants: [ { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 5, @@ -443,6 +462,7 @@ export const category: ( }, { __typename: "ProductVariant" as "ProductVariant", + id: "pv70010", price: { __typename: "Money" as "Money", amount: 10, diff --git a/src/categories/queries.ts b/src/categories/queries.ts index e89afa141..0d90be86e 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -113,6 +113,7 @@ export const categoryDetails = gql` name } variants { + id price { amount currency diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index 8be554dc3..43f1daf35 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -81,6 +81,7 @@ export interface CategoryDetails_category_products_edges_node_variants_price { export interface CategoryDetails_category_products_edges_node_variants { __typename: "ProductVariant"; + id: string; price: CategoryDetails_category_products_edges_node_variants_price | null; } diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index aed113474..6cc5b351c 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -335,6 +335,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 15, @@ -343,6 +344,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 35, @@ -351,6 +353,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 49, @@ -379,6 +382,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 15, @@ -387,6 +391,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 30, @@ -395,6 +400,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 49, @@ -423,6 +429,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 15, @@ -431,6 +438,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 30, @@ -439,6 +447,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 49, @@ -482,6 +491,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -490,6 +500,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -498,6 +509,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -541,6 +553,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -549,6 +562,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -557,6 +571,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -600,6 +615,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -608,6 +624,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -616,6 +633,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -659,6 +677,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -667,6 +686,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -675,6 +695,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -718,6 +739,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -726,6 +748,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -734,6 +757,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -777,6 +801,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -785,6 +810,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -793,6 +819,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -836,6 +863,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -844,6 +872,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -852,6 +881,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -895,6 +925,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -903,6 +934,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -911,6 +943,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -954,6 +987,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -962,6 +996,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -970,6 +1005,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1013,6 +1049,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1021,6 +1058,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1029,6 +1067,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1072,6 +1111,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1080,6 +1120,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1088,6 +1129,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1131,6 +1173,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1139,6 +1182,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1147,6 +1191,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1190,6 +1235,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1198,6 +1244,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1206,6 +1253,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1249,6 +1297,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1257,6 +1306,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1265,6 +1315,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1308,6 +1359,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1316,6 +1368,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1324,6 +1377,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1367,6 +1421,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1375,6 +1430,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1383,6 +1439,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, @@ -1426,6 +1483,7 @@ export const products = ( variants: [ { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 5, @@ -1434,6 +1492,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 7, @@ -1442,6 +1501,7 @@ export const products = ( }, { __typename: "ProductVariant", + id: "pv70010", price: { __typename: "Money", amount: 3, diff --git a/src/products/queries.ts b/src/products/queries.ts index 32945bdd0..a98bedbc3 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -79,6 +79,7 @@ export const productFragment = gql` `; const productVariantAttributesFragment = gql` + ${fragmentMoney} fragment ProductVariantAttributesFragment on Product { id attributes { @@ -113,9 +114,9 @@ const productVariantAttributesFragment = gql` } } variants { + id price { - amount - currency + ...Money } } } @@ -308,6 +309,7 @@ export const useInitialProductFilterDataQuery = makeQuery< >(initialProductFilterDataQuery); const productListQuery = gql` + ${fragmentMoney} ${productFragment} query ProductList( $first: Int @@ -338,9 +340,9 @@ const productListQuery = gql` } } variants { + id price { - amount - currency + ...Money } } } diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts index 183a294eb..5654a5d23 100644 --- a/src/products/types/CreateMultipleVariantsData.ts +++ b/src/products/types/CreateMultipleVariantsData.ts @@ -66,6 +66,7 @@ export interface CreateMultipleVariantsData_product_variants_price { export interface CreateMultipleVariantsData_product_variants { __typename: "ProductVariant"; + id: string; price: CreateMultipleVariantsData_product_variants_price | null; } diff --git a/src/products/types/Product.ts b/src/products/types/Product.ts index 7c7424d58..d1e6f806b 100644 --- a/src/products/types/Product.ts +++ b/src/products/types/Product.ts @@ -82,8 +82,8 @@ export interface Product_variants_stocks { export interface Product_variants { __typename: "ProductVariant"; - price: Product_variants_price | null; id: string; + price: Product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index 97e1b0976..9ec93107a 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -88,8 +88,8 @@ export interface ProductCreate_productCreate_product_variants_stocks { export interface ProductCreate_productCreate_product_variants { __typename: "ProductVariant"; - price: ProductCreate_productCreate_product_variants_price | null; id: string; + price: ProductCreate_productCreate_product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index d4e71183c..28469777d 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -82,8 +82,8 @@ export interface ProductDetails_product_variants_stocks { export interface ProductDetails_product_variants { __typename: "ProductVariant"; - price: ProductDetails_product_variants_price | null; id: string; + price: ProductDetails_product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index 60386f6c7..dcd9ecca8 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -88,8 +88,8 @@ export interface ProductImageCreate_productImageCreate_product_variants_stocks { export interface ProductImageCreate_productImageCreate_product_variants { __typename: "ProductVariant"; - price: ProductImageCreate_productImageCreate_product_variants_price | null; id: string; + price: ProductImageCreate_productImageCreate_product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index d78778fa7..7d5e39197 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -88,8 +88,8 @@ export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { export interface ProductImageUpdate_productImageUpdate_product_variants { __typename: "ProductVariant"; - price: ProductImageUpdate_productImageUpdate_product_variants_price | null; id: string; + price: ProductImageUpdate_productImageUpdate_product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts index 61bcdb103..002a38712 100644 --- a/src/products/types/ProductList.ts +++ b/src/products/types/ProductList.ts @@ -45,6 +45,7 @@ export interface ProductList_products_edges_node_variants_price { export interface ProductList_products_edges_node_variants { __typename: "ProductVariant"; + id: string; price: ProductList_products_edges_node_variants_price | null; } diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 76a64660d..0bf0f7184 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -88,8 +88,8 @@ export interface ProductUpdate_productUpdate_product_variants_stocks { export interface ProductUpdate_productUpdate_product_variants { __typename: "ProductVariant"; - price: ProductUpdate_productUpdate_product_variants_price | null; id: string; + price: ProductUpdate_productUpdate_product_variants_price | null; sku: string; name: string; margin: number | null; diff --git a/src/products/types/ProductVariantAttributesFragment.ts b/src/products/types/ProductVariantAttributesFragment.ts index 5a07c9b09..334fa66fd 100644 --- a/src/products/types/ProductVariantAttributesFragment.ts +++ b/src/products/types/ProductVariantAttributesFragment.ts @@ -66,6 +66,7 @@ export interface ProductVariantAttributesFragment_variants_price { export interface ProductVariantAttributesFragment_variants { __typename: "ProductVariant"; + id: string; price: ProductVariantAttributesFragment_variants_price | null; } diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index d1320f6c9..b745c08f9 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -88,8 +88,8 @@ export interface SimpleProductUpdate_productUpdate_product_variants_stocks { export interface SimpleProductUpdate_productUpdate_product_variants { __typename: "ProductVariant"; - price: SimpleProductUpdate_productUpdate_product_variants_price | null; id: string; + price: SimpleProductUpdate_productUpdate_product_variants_price | null; sku: string; name: string; margin: number | null; From 0f5a49ab48d1cc2ee8d9e4f161dfcde31977e524 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 11:37:11 +0200 Subject: [PATCH 035/294] Update getProductPriceRange --- src/products/components/ProductListPage/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/products/components/ProductListPage/utils.ts b/src/products/components/ProductListPage/utils.ts index 9032fb8e0..eeaf40224 100644 --- a/src/products/components/ProductListPage/utils.ts +++ b/src/products/components/ProductListPage/utils.ts @@ -21,9 +21,9 @@ export function getProductPriceRange( let min = productVariants[0].price.amount; for (let i = 1, len = productVariants.length; i < len; i++) { - const price = productVariants[i].price; - max = price.amount > max ? price.amount : max; - min = price.amount < min ? price.amount : min; + const curr = productVariants[i].price.amount; + max = curr > max ? curr : max; + min = curr < min ? curr : min; } return { From 3f2a75e159b2257e062e9b98b772bf59113b2aa7 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 12:03:06 +0200 Subject: [PATCH 036/294] Replace maybe with optional chaining --- .../CategoryProductList.tsx | 85 ++++++++------ .../components/ProductList/ProductList.tsx | 110 ++++++++++-------- .../ProductUpdatePage/ProductUpdatePage.tsx | 7 +- 3 files changed, 115 insertions(+), 87 deletions(-) diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index ed1c432f0..404a37cc6 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -19,7 +19,10 @@ 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"; +import { + CategoryDetails_category_products_edges_node, + CategoryDetails_category_products_edges_node_variants +} from "../../types/CategoryDetails"; const useStyles = makeStyles( theme => ({ @@ -95,6 +98,46 @@ export const CategoryProductList: React.FC = props => const numberOfColumns = 5; + const getProductPrice = ( + variants: CategoryDetails_category_products_edges_node_variants[] + ) => { + if (!variants.length) { + return null; + } + + const { max, min } = getProductPriceRange(variants); + const currency = variants[0].price.currency; + + if (max === min) { + return ( + + ); + } else { + return ( + <> + + {" - "} + + + ); + } + }; + return (
@@ -208,41 +251,11 @@ export const CategoryProductList: React.FC = props => )} - {maybe(() => { - const { max, min } = getProductPriceRange( - product.variants - ); - const currency = product.variants[0].price.currency; - - if (max === min) { - return ( - - ); - } else { - return ( - <> - - {" - "} - - - ); - } - }, )} + {product?.variants ? ( + getProductPrice(product.variants) + ) : ( + + )} ); diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 043ac7584..57e5bbdd1 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -22,7 +22,10 @@ import { isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; import { AvailableInGridAttributes_grid_edges_node } from "@saleor/products/types/AvailableInGridAttributes"; -import { ProductList_products_edges_node } from "@saleor/products/types/ProductList"; +import { + ProductList_products_edges_node, + ProductList_products_edges_node_variants +} from "@saleor/products/types/ProductList"; import { ProductListUrlSortField } from "@saleor/products/urls"; import { ListActions, ListProps, SortPage } from "@saleor/types"; import TDisplayColumn, { @@ -139,6 +142,46 @@ export const ProductList: React.FC = props => { ); const numberOfColumns = 2 + settings.columns.length; + const getProductPrice = ( + variants: ProductList_products_edges_node_variants[] + ) => { + if (!variants.length) { + return null; + } + + const { max, min } = getProductPriceRange(variants); + const currency = variants[0].price.currency; + + if (max === min) { + return ( + + ); + } else { + return ( + <> + + {" - "} + + + ); + } + }; + return (
@@ -305,19 +348,18 @@ export const ProductList: React.FC = props => { thumbnail={maybe(() => product.thumbnail.url)} data-tc="name" > - {maybe( - () => ( -
- {product.name} - {product && product.productType && ( - - {product.productType.hasVariants - ? "Configurable" - : "Simple"} - - )} -
- ), + {product?.productType ? ( +
+ {product.name} + {product && product.productType && ( + + {product.productType.hasVariants + ? "Configurable" + : "Simple"} + + )} +
+ ) : ( )} @@ -395,41 +437,11 @@ export const ProductList: React.FC = props => { displayColumns={settings.columns} > - {maybe(() => { - const { max, min } = getProductPriceRange( - product.variants - ); - const currency = product.variants[0].price.currency; - - if (max === min) { - return ( - - ); - } else { - return ( - <> - - {" - "} - - - ); - } - }, )} + {product?.variants ? ( + getProductPrice(product.variants) + ) : ( + + )} diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index cff3c653c..ec2d7df57 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -159,7 +159,8 @@ export const ProductUpdatePage: React.FC = ({ const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); - const currency = maybe(() => product.variants[0].price.currency); + const currency = + product?.variants?.length && product.variants[0].price.currency; const hasVariants = maybe(() => product.productType.hasVariants, false); const handleSubmit = (data: ProductUpdatePageFormData) => { @@ -263,7 +264,9 @@ export const ProductUpdatePage: React.FC = ({ disabled={disabled} variants={variants} fallbackPrice={ - product ? product.variants[0].price : undefined + product?.variants?.length + ? product.variants[0].price + : undefined } onRowClick={onVariantShow} onVariantAdd={onVariantAdd} From e450dd4c4daec5eb11ca0d0ab61637c9d48bbf10 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 12:12:37 +0200 Subject: [PATCH 037/294] Update product type in product list --- locale/defaultMessages.json | 6 + .../components/ProductList/ProductList.tsx | 24 +- .../__snapshots__/Stories.test.ts.snap | 320 +++++++++--------- 3 files changed, 177 insertions(+), 173 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 6a898913a..138d64a53 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -3567,6 +3567,9 @@ "context": "product price", "string": "Price" }, + "src_dot_products_dot_components_dot_ProductList_dot_150865454": { + "string": "Simple" + }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { "string": "No products found" }, @@ -3578,6 +3581,9 @@ "context": "product status", "string": "Not published" }, + "src_dot_products_dot_components_dot_ProductList_dot_2754779425": { + "string": "Configurable" + }, "src_dot_products_dot_components_dot_ProductList_dot_3640454975": { "context": "product status", "string": "Published" diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 57e5bbdd1..83d0031c8 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -3,6 +3,7 @@ import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; +import Typography from "@material-ui/core/Typography"; import Checkbox from "@saleor/components/Checkbox"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; @@ -65,16 +66,11 @@ const useStyles = makeStyles( } }, colNameFixed: {}, - colNameGrid: { - display: "grid", - gridColumn: 1 - }, colNameHeader: { marginLeft: AVATAR_MARGIN }, - colNameType: { - color: theme.palette.text.secondary, - fontSize: "0.8rem" + colNameWrapper: { + display: "block" }, colPrice: { textAlign: "right" @@ -349,14 +345,16 @@ export const ProductList: React.FC = props => { data-tc="name" > {product?.productType ? ( -
+
{product.name} {product && product.productType && ( - - {product.productType.hasVariants - ? "Configurable" - : "Simple"} - + + {product.productType.hasVariants ? ( + + ) : ( + + )} + )}
) : ( diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 53224126f..9167259d6 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -124280,16 +124280,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Nebula Night Sky Paint - Configurable - +
@@ -124356,16 +124356,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Light Speed Yellow Paint - Configurable - +
@@ -124432,16 +124432,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Hyperspace Turquoise Paint - Configurable - +
@@ -124508,16 +124508,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Pineapple Juice - Configurable - +
@@ -124584,16 +124584,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Coconut Juice - Configurable - +
@@ -124660,16 +124660,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Apple Juice - Configurable - +
@@ -124736,16 +124736,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Orange Juice - Configurable - +
@@ -124812,16 +124812,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Banana Juice - Configurable - +
@@ -124888,16 +124888,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Bean Juice - Configurable - +
@@ -124964,16 +124964,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Carrot Juice - Configurable - +
@@ -125040,16 +125040,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Green Juice - Configurable - +
@@ -125116,16 +125116,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Code Division T-shirt - Configurable - +
@@ -125192,16 +125192,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -125268,16 +125268,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -125344,16 +125344,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -125420,16 +125420,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -125496,16 +125496,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Black Hoodie - Configurable - +
@@ -125572,16 +125572,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Blue Hoodie - Configurable - +
@@ -125648,16 +125648,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Mustard Hoodie - Configurable - +
@@ -125724,16 +125724,16 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` class="TableCellAvatar-children-id" >
Colored Parrot Cushion - Configurable - +
@@ -127095,16 +127095,16 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` class="TableCellAvatar-children-id" >
Light Speed Yellow Paint - Configurable - +
@@ -127171,16 +127171,16 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` class="TableCellAvatar-children-id" >
Hyperspace Turquoise Paint - Configurable - +
@@ -127247,16 +127247,16 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` class="TableCellAvatar-children-id" >
Bean Juice - Configurable - +
@@ -127323,16 +127323,16 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` class="TableCellAvatar-children-id" >
Black Hoodie - Configurable - +
@@ -127399,16 +127399,16 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` class="TableCellAvatar-children-id" >
Colored Parrot Cushion - Configurable - +
@@ -127876,16 +127876,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Nebula Night Sky Paint - Configurable - +
@@ -127952,16 +127952,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Pineapple Juice - Configurable - +
@@ -128028,16 +128028,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Coconut Juice - Configurable - +
@@ -128104,16 +128104,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Apple Juice - Configurable - +
@@ -128180,16 +128180,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Orange Juice - Configurable - +
@@ -128256,16 +128256,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Banana Juice - Configurable - +
@@ -128332,16 +128332,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Carrot Juice - Configurable - +
@@ -128408,16 +128408,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Green Juice - Configurable - +
@@ -128484,16 +128484,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Code Division T-shirt - Configurable - +
@@ -128560,16 +128560,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -128636,16 +128636,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -128712,16 +128712,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -128788,16 +128788,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Polo Shirt - Configurable - +
@@ -128864,16 +128864,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Blue Hoodie - Configurable - +
@@ -128940,16 +128940,16 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` class="TableCellAvatar-children-id" >
Mustard Hoodie - Configurable - +
From 79b49ea4069f9e9c626c0bdf78807c35089ef9ed Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 14:11:31 +0200 Subject: [PATCH 038/294] Update product list style --- .../components/CategoryProductList/CategoryProductList.tsx | 2 +- src/products/components/ProductList/ProductList.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 404a37cc6..1fc85f9e6 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -31,7 +31,7 @@ const useStyles = makeStyles( width: "auto" }, colPrice: { - width: 200 + width: 300 }, colPublished: { width: 200 diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 83d0031c8..3b986db99 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -44,7 +44,7 @@ const useStyles = makeStyles( width: "auto" }, colPrice: { - width: 200 + width: 300 }, colPublished: { width: 200 From ea407432cc64393fab6e625cb698e69d99c09ca6 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 18:13:33 +0200 Subject: [PATCH 039/294] Fix locale default messages --- locale/defaultMessages.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 138d64a53..ea3bf6970 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -3568,6 +3568,7 @@ "string": "Price" }, "src_dot_products_dot_components_dot_ProductList_dot_150865454": { + "context": "product type", "string": "Simple" }, "src_dot_products_dot_components_dot_ProductList_dot_1657559629": { @@ -3582,6 +3583,7 @@ "string": "Not published" }, "src_dot_products_dot_components_dot_ProductList_dot_2754779425": { + "context": "product type", "string": "Configurable" }, "src_dot_products_dot_components_dot_ProductList_dot_3640454975": { @@ -5399,4 +5401,4 @@ "context": "unassign product from voucher, button", "string": "Unassign" } -} \ No newline at end of file +} From 055d3e63ddd65cf5ae353ebcd3bebec6f2eb66ae Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Wed, 17 Jun 2020 18:14:50 +0200 Subject: [PATCH 040/294] Fix optional chaining --- src/products/components/ProductList/ProductList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 3b986db99..f20d90f23 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -347,7 +347,7 @@ export const ProductList: React.FC = props => { {product?.productType ? (
{product.name} - {product && product.productType && ( + {product?.productType && ( {product.productType.hasVariants ? ( From a29ac065a3d23244aacda8e65f6586c76be0b29a Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Thu, 18 Jun 2020 11:37:55 +0200 Subject: [PATCH 041/294] Update locale default messages --- locale/defaultMessages.json | 2 +- src/products/components/ProductList/ProductList.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index ea3bf6970..b10a8815f 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -5401,4 +5401,4 @@ "context": "unassign product from voucher, button", "string": "Unassign" } -} +} \ No newline at end of file diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index f20d90f23..23c81b913 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -350,9 +350,15 @@ export const ProductList: React.FC = props => { {product?.productType && ( {product.productType.hasVariants ? ( - + ) : ( - + )} )} From 9e66d99dca22fbab29f66a69f8557060372c5f26 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Thu, 18 Jun 2020 16:53:07 +0200 Subject: [PATCH 042/294] Use productRangeUndiscounted instead of calculating variant prices range --- .../CategoryProductList.tsx | 34 +- src/categories/fixtures.ts | 440 +++---- src/categories/queries.ts | 25 +- src/categories/types/CategoryDetails.ts | 33 +- .../components/ProductList/ProductList.tsx | 36 +- .../components/ProductListPage/utils.ts | 20 - src/products/fixtures.ts | 1080 ++++++++--------- src/products/queries.ts | 38 +- .../types/CreateMultipleVariantsData.ts | 33 +- src/products/types/Product.ts | 110 +- src/products/types/ProductCreate.ts | 110 +- src/products/types/ProductDetails.ts | 110 +- src/products/types/ProductImageCreate.ts | 110 +- src/products/types/ProductImageUpdate.ts | 110 +- src/products/types/ProductList.ts | 33 +- src/products/types/ProductUpdate.ts | 110 +- .../types/ProductVariantAttributesFragment.ts | 33 +- src/products/types/SimpleProductUpdate.ts | 110 +- .../ProductVariantCreator.tsx | 2 +- .../__snapshots__/Stories.test.ts.snap | 100 +- 20 files changed, 1340 insertions(+), 1337 deletions(-) diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 1fc85f9e6..3959c3bb6 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -14,14 +14,13 @@ import TableCellAvatar, { import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import { maybe, renderCollection } from "@saleor/misc"; -import { getProductPriceRange } from "@saleor/products/components/ProductListPage/utils"; import { ListActions, ListProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { CategoryDetails_category_products_edges_node, - CategoryDetails_category_products_edges_node_variants + CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted } from "../../types/CategoryDetails"; const useStyles = makeStyles( @@ -99,21 +98,26 @@ export const CategoryProductList: React.FC = props => const numberOfColumns = 5; const getProductPrice = ( - variants: CategoryDetails_category_products_edges_node_variants[] + priceRangeUndiscounted: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted ) => { - if (!variants.length) { + if (!priceRangeUndiscounted) { return null; } - const { max, min } = getProductPriceRange(variants); - const currency = variants[0].price.currency; + const { start, stop } = priceRangeUndiscounted; + const { + gross: { amount: startAmount } + } = start; + const { + gross: { amount: stopAmount } + } = stop; - if (max === min) { + if (startAmount === stopAmount) { return ( ); @@ -122,15 +126,15 @@ export const CategoryProductList: React.FC = props => <> {" - "} @@ -251,8 +255,8 @@ export const CategoryProductList: React.FC = props => )} - {product?.variants ? ( - getProductPrice(product.variants) + {product?.pricing?.priceRangeUndiscounted ? ( + getProductPrice(product?.pricing?.priceRangeUndiscounted) ) : ( )} diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index 6e680a223..60537288d 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -120,32 +120,34 @@ export const category: ( id: "UHJvZHVjdDoyMQ==", isAvailable: true, name: "Gardner-Schultz", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -156,32 +158,34 @@ export const category: ( id: "UHJvZHVjdDoyMg==", isAvailable: true, name: "James, Martinez and Murray", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -192,32 +196,34 @@ export const category: ( id: "UHJvZHVjdDoyMw==", isAvailable: true, name: "Curtis, Joyce and Turner", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -228,32 +234,34 @@ export const category: ( id: "UHJvZHVjdDoyNA==", isAvailable: true, name: "Davis, Brown and Ray", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -264,32 +272,34 @@ export const category: ( id: "UHJvZHVjdDoyNQ==", isAvailable: true, name: "Gallegos Ltd", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -300,32 +310,34 @@ export const category: ( id: "UHJvZHVjdDoyNg==", isAvailable: true, name: "Franklin Inc", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -336,32 +348,34 @@ export const category: ( id: "UHJvZHVjdDoyNw==", isAvailable: true, name: "Williams-Taylor", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -372,32 +386,34 @@ export const category: ( id: "UHJvZHVjdDoyOA==", isAvailable: true, name: "Riddle, Evans and Hicks", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -408,32 +424,34 @@ export const category: ( id: "UHJvZHVjdDoyOQ==", isAvailable: true, name: "Hebert-Sherman", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } }, { @@ -444,32 +462,34 @@ export const category: ( id: "UHJvZHVjdDozMA==", isAvailable: true, name: "Carter and Sons", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", id: "UHJvZHVjdFR5cGU6Mw==", name: "Coffee" }, - thumbnail: { __typename: "Image", url: placeholderImage }, - variants: [ - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant" as "ProductVariant", - id: "pv70010", - price: { - __typename: "Money" as "Money", - amount: 10, - currency: "USD" - } - } - ] + thumbnail: { __typename: "Image", url: placeholderImage } } } ], diff --git a/src/categories/queries.ts b/src/categories/queries.ts index 0d90be86e..ffa0feeee 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -8,6 +8,13 @@ import { } from "./types/CategoryDetails"; import { RootCategories } from "./types/RootCategories"; +export const fragmentMoney = gql` + fragment Money on Money { + amount + currency + } +`; + export const categoryFragment = gql` fragment CategoryFragment on Category { id @@ -73,6 +80,7 @@ export const useRootCategoriesQuery = makeQuery( ); export const categoryDetails = gql` + ${fragmentMoney} ${categoryFragment} ${categoryDetailsFragment} ${pageInfoFragment} @@ -112,11 +120,18 @@ export const categoryDetails = gql` id name } - variants { - id - price { - amount - currency + pricing { + priceRangeUndiscounted { + start { + gross { + ...Money + } + } + stop { + gross { + ...Money + } + } } } } diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index 43f1daf35..40c0869d9 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -73,16 +73,37 @@ export interface CategoryDetails_category_products_edges_node_productType { name: string; } -export interface CategoryDetails_category_products_edges_node_variants_price { +export interface CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface CategoryDetails_category_products_edges_node_variants { - __typename: "ProductVariant"; - id: string; - price: CategoryDetails_category_products_edges_node_variants_price | null; +export interface CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_start_gross; +} + +export interface CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_start | null; + stop: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted_stop | null; +} + +export interface CategoryDetails_category_products_edges_node_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: CategoryDetails_category_products_edges_node_pricing_priceRangeUndiscounted | null; } export interface CategoryDetails_category_products_edges_node { @@ -92,7 +113,7 @@ export interface CategoryDetails_category_products_edges_node { isAvailable: boolean | null; thumbnail: CategoryDetails_category_products_edges_node_thumbnail | null; productType: CategoryDetails_category_products_edges_node_productType; - variants: (CategoryDetails_category_products_edges_node_variants | null)[] | null; + pricing: CategoryDetails_category_products_edges_node_pricing | null; } export interface CategoryDetails_category_products_edges { diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 23c81b913..a3649c39a 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -19,13 +19,12 @@ import { ProductListColumns } from "@saleor/config"; import { maybe, renderCollection } from "@saleor/misc"; import { getAttributeIdFromColumnValue, - getProductPriceRange, isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; import { AvailableInGridAttributes_grid_edges_node } from "@saleor/products/types/AvailableInGridAttributes"; import { ProductList_products_edges_node, - ProductList_products_edges_node_variants + ProductList_products_edges_node_pricing_priceRangeUndiscounted } from "@saleor/products/types/ProductList"; import { ProductListUrlSortField } from "@saleor/products/urls"; import { ListActions, ListProps, SortPage } from "@saleor/types"; @@ -139,21 +138,26 @@ export const ProductList: React.FC = props => { const numberOfColumns = 2 + settings.columns.length; const getProductPrice = ( - variants: ProductList_products_edges_node_variants[] + priceRangeUndiscounted: ProductList_products_edges_node_pricing_priceRangeUndiscounted ) => { - if (!variants.length) { + if (!priceRangeUndiscounted) { return null; } - const { max, min } = getProductPriceRange(variants); - const currency = variants[0].price.currency; + const { start, stop } = priceRangeUndiscounted; + const { + gross: { amount: startAmount } + } = start; + const { + gross: { amount: stopAmount } + } = stop; - if (max === min) { + if (startAmount === stopAmount) { return ( ); @@ -162,15 +166,15 @@ export const ProductList: React.FC = props => { <> {" - "} @@ -441,8 +445,10 @@ export const ProductList: React.FC = props => { displayColumns={settings.columns} > - {product?.variants ? ( - getProductPrice(product.variants) + {product?.pricing?.priceRangeUndiscounted ? ( + getProductPrice( + product?.pricing?.priceRangeUndiscounted + ) ) : ( )} diff --git a/src/products/components/ProductListPage/utils.ts b/src/products/components/ProductListPage/utils.ts index eeaf40224..2f0735182 100644 --- a/src/products/components/ProductListPage/utils.ts +++ b/src/products/components/ProductListPage/utils.ts @@ -1,5 +1,3 @@ -import { ProductList_products_edges_node_variants } from "@saleor/products/types/ProductList"; - const prefix = "attribute"; export function getAttributeColumnValue(id: string) { @@ -13,21 +11,3 @@ export function isAttributeColumnValue(value: string) { export function getAttributeIdFromColumnValue(value: string) { return value.substr(prefix.length + 1); } - -export function getProductPriceRange( - productVariants: ProductList_products_edges_node_variants[] -) { - let max = productVariants[0].price.amount; - let min = productVariants[0].price.amount; - - for (let i = 1, len = productVariants.length; i < len; i++) { - const curr = productVariants[i].price.amount; - max = curr > max ? curr : max; - min = curr < min ? curr : min; - } - - return { - max, - min - }; -} diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index 6cc5b351c..f9f6c161a 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -153,7 +153,7 @@ export const product: ( name: "Ergonomic Plastic Bacon", pricing: { __typename: "ProductPricingInfo", - priceRange: { + priceRangeUndiscounted: { __typename: "TaxedMoneyRange", start: { __typename: "TaxedMoney", @@ -322,6 +322,28 @@ export const products = ( isAvailable: true, isPublished: true, name: "Nebula Night Sky Paint", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -331,36 +353,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 15, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 35, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 49, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -369,6 +362,28 @@ export const products = ( isAvailable: true, isPublished: false, name: "Light Speed Yellow Paint", + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -378,36 +393,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 15, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 30, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 49, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -416,6 +402,29 @@ export const products = ( isAvailable: true, isPublished: false, name: "Hyperspace Turquoise Paint", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -425,36 +434,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 15, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 30, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 49, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -478,6 +458,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Pineapple Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -487,36 +490,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -540,6 +514,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Coconut Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -549,36 +546,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -602,6 +570,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Apple Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -611,36 +602,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -664,6 +626,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Orange Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -673,36 +658,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -726,6 +682,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Banana Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -735,36 +714,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -788,6 +738,29 @@ export const products = ( isAvailable: true, isPublished: false, name: "Bean Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -797,36 +770,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -850,6 +794,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Carrot Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -859,36 +826,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -912,6 +850,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Green Juice", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -921,36 +882,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -974,6 +906,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Code Division T-shirt", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -983,36 +938,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1036,6 +962,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Polo Shirt", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1045,36 +994,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1098,6 +1018,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Polo Shirt", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1107,36 +1050,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1160,6 +1074,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Polo Shirt", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1169,36 +1106,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1222,6 +1130,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Polo Shirt", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1231,36 +1162,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1284,6 +1186,29 @@ export const products = ( isAvailable: true, isPublished: false, name: "Black Hoodie", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1293,36 +1218,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1346,6 +1242,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Blue Hoodie", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1355,36 +1274,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1408,6 +1298,29 @@ export const products = ( isAvailable: true, isPublished: true, name: "Mustard Hoodie", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1417,36 +1330,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } }, { __typename: "Product", @@ -1470,6 +1354,29 @@ export const products = ( isAvailable: true, isPublished: false, name: "Colored Parrot Cushion", + + pricing: { + __typename: "ProductPricingInfo", + priceRangeUndiscounted: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 3, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + gross: { + __typename: "Money", + amount: 8, + currency: "USD" + } + } + } + }, productType: { __typename: "ProductType", hasVariants: true, @@ -1479,36 +1386,7 @@ export const products = ( thumbnail: { __typename: "Image", url: placeholderImage - }, - variants: [ - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 5, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 7, - currency: "USD" - } - }, - { - __typename: "ProductVariant", - id: "pv70010", - price: { - __typename: "Money", - amount: 3, - currency: "USD" - } - } - ] + } } ]; diff --git a/src/products/queries.ts b/src/products/queries.ts index a98bedbc3..ae361b59f 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -113,10 +113,18 @@ const productVariantAttributesFragment = gql` } } } - variants { - id - price { - ...Money + pricing { + priceRangeUndiscounted { + start { + gross { + ...Money + } + } + stop { + gross { + ...Money + } + } } } } @@ -158,14 +166,14 @@ export const productFragmentDetails = gql` chargeTaxes publicationDate pricing { - priceRange { + priceRangeUndiscounted { start { - net { + gross { ...Money } } stop { - net { + gross { ...Money } } @@ -339,10 +347,18 @@ const productListQuery = gql` name } } - variants { - id - price { - ...Money + pricing { + priceRangeUndiscounted { + start { + gross { + ...Money + } + } + stop { + gross { + ...Money + } + } } } } diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts index 5654a5d23..ea2d1909f 100644 --- a/src/products/types/CreateMultipleVariantsData.ts +++ b/src/products/types/CreateMultipleVariantsData.ts @@ -58,16 +58,37 @@ export interface CreateMultipleVariantsData_product_productType { variantAttributes: (CreateMultipleVariantsData_product_productType_variantAttributes | null)[] | null; } -export interface CreateMultipleVariantsData_product_variants_price { +export interface CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface CreateMultipleVariantsData_product_variants { - __typename: "ProductVariant"; - id: string; - price: CreateMultipleVariantsData_product_variants_price | null; +export interface CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_start_gross; +} + +export interface CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_start | null; + stop: CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface CreateMultipleVariantsData_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: CreateMultipleVariantsData_product_pricing_priceRangeUndiscounted | null; } export interface CreateMultipleVariantsData_product { @@ -75,7 +96,7 @@ export interface CreateMultipleVariantsData_product { id: string; attributes: CreateMultipleVariantsData_product_attributes[]; productType: CreateMultipleVariantsData_product_productType; - variants: (CreateMultipleVariantsData_product_variants | null)[] | null; + pricing: CreateMultipleVariantsData_product_pricing | null; } export interface CreateMultipleVariantsData_warehouses_edges_node { diff --git a/src/products/types/Product.ts b/src/products/types/Product.ts index d1e6f806b..cf2a0e75d 100644 --- a/src/products/types/Product.ts +++ b/src/products/types/Product.ts @@ -60,35 +60,37 @@ export interface Product_productType { hasVariants: boolean; } -export interface Product_variants_price { +export interface Product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface Product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface Product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: Product_pricing_priceRangeUndiscounted_start_gross; } -export interface Product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: Product_variants_stocks_warehouse; +export interface Product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface Product_variants { - __typename: "ProductVariant"; - id: string; - price: Product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (Product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface Product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: Product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface Product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: Product_pricing_priceRangeUndiscounted_start | null; + stop: Product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface Product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: Product_pricing_priceRangeUndiscounted | null; } export interface Product_category { @@ -127,39 +129,6 @@ export interface Product_purchaseCost { stop: Product_purchaseCost_stop | null; } -export interface Product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: Product_pricing_priceRange_start_net; -} - -export interface Product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: Product_pricing_priceRange_stop_net; -} - -export interface Product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: Product_pricing_priceRange_start | null; - stop: Product_pricing_priceRange_stop | null; -} - -export interface Product_pricing { - __typename: "ProductPricingInfo"; - priceRange: Product_pricing_priceRange | null; -} - export interface Product_images { __typename: "ProductImage"; id: string; @@ -168,12 +137,43 @@ export interface Product_images { url: string; } +export interface Product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface Product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface Product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: Product_variants_stocks_warehouse; +} + +export interface Product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: Product_variants_price | null; + margin: number | null; + stocks: (Product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface Product { __typename: "Product"; id: string; attributes: Product_attributes[]; productType: Product_productType; - variants: (Product_variants | null)[] | null; + pricing: Product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -186,6 +186,6 @@ export interface Product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: Product_pricing | null; images: (Product_images | null)[] | null; + variants: (Product_variants | null)[] | null; } diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index 9ec93107a..7c169bb7b 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -66,35 +66,37 @@ export interface ProductCreate_productCreate_product_productType { hasVariants: boolean; } -export interface ProductCreate_productCreate_product_variants_price { +export interface ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductCreate_productCreate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_start_gross; } -export interface ProductCreate_productCreate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductCreate_productCreate_product_variants_stocks_warehouse; +export interface ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface ProductCreate_productCreate_product_variants { - __typename: "ProductVariant"; - id: string; - price: ProductCreate_productCreate_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductCreate_productCreate_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_start | null; + stop: ProductCreate_productCreate_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductCreate_productCreate_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductCreate_productCreate_product_pricing_priceRangeUndiscounted | null; } export interface ProductCreate_productCreate_product_category { @@ -133,39 +135,6 @@ export interface ProductCreate_productCreate_product_purchaseCost { stop: ProductCreate_productCreate_product_purchaseCost_stop | null; } -export interface ProductCreate_productCreate_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductCreate_productCreate_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductCreate_productCreate_product_pricing_priceRange_start_net; -} - -export interface ProductCreate_productCreate_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductCreate_productCreate_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductCreate_productCreate_product_pricing_priceRange_stop_net; -} - -export interface ProductCreate_productCreate_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductCreate_productCreate_product_pricing_priceRange_start | null; - stop: ProductCreate_productCreate_product_pricing_priceRange_stop | null; -} - -export interface ProductCreate_productCreate_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductCreate_productCreate_product_pricing_priceRange | null; -} - export interface ProductCreate_productCreate_product_images { __typename: "ProductImage"; id: string; @@ -174,12 +143,43 @@ export interface ProductCreate_productCreate_product_images { url: string; } +export interface ProductCreate_productCreate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductCreate_productCreate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductCreate_productCreate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductCreate_productCreate_product_variants_stocks_warehouse; +} + +export interface ProductCreate_productCreate_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: ProductCreate_productCreate_product_variants_price | null; + margin: number | null; + stocks: (ProductCreate_productCreate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductCreate_productCreate_product { __typename: "Product"; id: string; attributes: ProductCreate_productCreate_product_attributes[]; productType: ProductCreate_productCreate_product_productType; - variants: (ProductCreate_productCreate_product_variants | null)[] | null; + pricing: ProductCreate_productCreate_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -192,8 +192,8 @@ export interface ProductCreate_productCreate_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: ProductCreate_productCreate_product_pricing | null; images: (ProductCreate_productCreate_product_images | null)[] | null; + variants: (ProductCreate_productCreate_product_variants | null)[] | null; } export interface ProductCreate_productCreate { diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index 28469777d..6182eb1bf 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -60,35 +60,37 @@ export interface ProductDetails_product_productType { hasVariants: boolean; } -export interface ProductDetails_product_variants_price { +export interface ProductDetails_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductDetails_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface ProductDetails_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductDetails_product_pricing_priceRangeUndiscounted_start_gross; } -export interface ProductDetails_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductDetails_product_variants_stocks_warehouse; +export interface ProductDetails_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface ProductDetails_product_variants { - __typename: "ProductVariant"; - id: string; - price: ProductDetails_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (ProductDetails_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface ProductDetails_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductDetails_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductDetails_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductDetails_product_pricing_priceRangeUndiscounted_start | null; + stop: ProductDetails_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductDetails_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductDetails_product_pricing_priceRangeUndiscounted | null; } export interface ProductDetails_product_category { @@ -127,39 +129,6 @@ export interface ProductDetails_product_purchaseCost { stop: ProductDetails_product_purchaseCost_stop | null; } -export interface ProductDetails_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductDetails_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductDetails_product_pricing_priceRange_start_net; -} - -export interface ProductDetails_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductDetails_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductDetails_product_pricing_priceRange_stop_net; -} - -export interface ProductDetails_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductDetails_product_pricing_priceRange_start | null; - stop: ProductDetails_product_pricing_priceRange_stop | null; -} - -export interface ProductDetails_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductDetails_product_pricing_priceRange | null; -} - export interface ProductDetails_product_images { __typename: "ProductImage"; id: string; @@ -168,12 +137,43 @@ export interface ProductDetails_product_images { url: string; } +export interface ProductDetails_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductDetails_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductDetails_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductDetails_product_variants_stocks_warehouse; +} + +export interface ProductDetails_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: ProductDetails_product_variants_price | null; + margin: number | null; + stocks: (ProductDetails_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductDetails_product { __typename: "Product"; id: string; attributes: ProductDetails_product_attributes[]; productType: ProductDetails_product_productType; - variants: (ProductDetails_product_variants | null)[] | null; + pricing: ProductDetails_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -186,8 +186,8 @@ export interface ProductDetails_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: ProductDetails_product_pricing | null; images: (ProductDetails_product_images | null)[] | null; + variants: (ProductDetails_product_variants | null)[] | null; } export interface ProductDetails { diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index dcd9ecca8..5e9d14d45 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -66,35 +66,37 @@ export interface ProductImageCreate_productImageCreate_product_productType { hasVariants: boolean; } -export interface ProductImageCreate_productImageCreate_product_variants_price { +export interface ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductImageCreate_productImageCreate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_start_gross; } -export interface ProductImageCreate_productImageCreate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; +export interface ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface ProductImageCreate_productImageCreate_product_variants { - __typename: "ProductVariant"; - id: string; - price: ProductImageCreate_productImageCreate_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_start | null; + stop: ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductImageCreate_productImageCreate_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductImageCreate_productImageCreate_product_pricing_priceRangeUndiscounted | null; } export interface ProductImageCreate_productImageCreate_product_category { @@ -133,39 +135,6 @@ export interface ProductImageCreate_productImageCreate_product_purchaseCost { stop: ProductImageCreate_productImageCreate_product_purchaseCost_stop | null; } -export interface ProductImageCreate_productImageCreate_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductImageCreate_productImageCreate_product_pricing_priceRange_start_net; -} - -export interface ProductImageCreate_productImageCreate_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductImageCreate_productImageCreate_product_pricing_priceRange_stop_net; -} - -export interface ProductImageCreate_productImageCreate_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductImageCreate_productImageCreate_product_pricing_priceRange_start | null; - stop: ProductImageCreate_productImageCreate_product_pricing_priceRange_stop | null; -} - -export interface ProductImageCreate_productImageCreate_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductImageCreate_productImageCreate_product_pricing_priceRange | null; -} - export interface ProductImageCreate_productImageCreate_product_images { __typename: "ProductImage"; id: string; @@ -174,12 +143,43 @@ export interface ProductImageCreate_productImageCreate_product_images { url: string; } +export interface ProductImageCreate_productImageCreate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageCreate_productImageCreate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductImageCreate_productImageCreate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; +} + +export interface ProductImageCreate_productImageCreate_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: ProductImageCreate_productImageCreate_product_variants_price | null; + margin: number | null; + stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductImageCreate_productImageCreate_product { __typename: "Product"; id: string; attributes: ProductImageCreate_productImageCreate_product_attributes[]; productType: ProductImageCreate_productImageCreate_product_productType; - variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; + pricing: ProductImageCreate_productImageCreate_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -192,8 +192,8 @@ export interface ProductImageCreate_productImageCreate_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: ProductImageCreate_productImageCreate_product_pricing | null; images: (ProductImageCreate_productImageCreate_product_images | null)[] | null; + variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; } export interface ProductImageCreate_productImageCreate { diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index 7d5e39197..a21a344e0 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -66,35 +66,37 @@ export interface ProductImageUpdate_productImageUpdate_product_productType { hasVariants: boolean; } -export interface ProductImageUpdate_productImageUpdate_product_variants_price { +export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_start_gross; } -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; +export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface ProductImageUpdate_productImageUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - price: ProductImageUpdate_productImageUpdate_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_start | null; + stop: ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductImageUpdate_productImageUpdate_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductImageUpdate_productImageUpdate_product_pricing_priceRangeUndiscounted | null; } export interface ProductImageUpdate_productImageUpdate_product_category { @@ -133,39 +135,6 @@ export interface ProductImageUpdate_productImageUpdate_product_purchaseCost { stop: ProductImageUpdate_productImageUpdate_product_purchaseCost_stop | null; } -export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductImageUpdate_productImageUpdate_product_pricing_priceRange_start_net; -} - -export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductImageUpdate_productImageUpdate_product_pricing_priceRange_stop_net; -} - -export interface ProductImageUpdate_productImageUpdate_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductImageUpdate_productImageUpdate_product_pricing_priceRange_start | null; - stop: ProductImageUpdate_productImageUpdate_product_pricing_priceRange_stop | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductImageUpdate_productImageUpdate_product_pricing_priceRange | null; -} - export interface ProductImageUpdate_productImageUpdate_product_images { __typename: "ProductImage"; id: string; @@ -174,12 +143,43 @@ export interface ProductImageUpdate_productImageUpdate_product_images { url: string; } +export interface ProductImageUpdate_productImageUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; +} + +export interface ProductImageUpdate_productImageUpdate_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: ProductImageUpdate_productImageUpdate_product_variants_price | null; + margin: number | null; + stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductImageUpdate_productImageUpdate_product { __typename: "Product"; id: string; attributes: ProductImageUpdate_productImageUpdate_product_attributes[]; productType: ProductImageUpdate_productImageUpdate_product_productType; - variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; + pricing: ProductImageUpdate_productImageUpdate_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -192,8 +192,8 @@ export interface ProductImageUpdate_productImageUpdate_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: ProductImageUpdate_productImageUpdate_product_pricing | null; images: (ProductImageUpdate_productImageUpdate_product_images | null)[] | null; + variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; } export interface ProductImageUpdate_productImageUpdate { diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts index 002a38712..78ec749fb 100644 --- a/src/products/types/ProductList.ts +++ b/src/products/types/ProductList.ts @@ -37,16 +37,37 @@ export interface ProductList_products_edges_node_attributes { values: (ProductList_products_edges_node_attributes_values | null)[]; } -export interface ProductList_products_edges_node_variants_price { +export interface ProductList_products_edges_node_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductList_products_edges_node_variants { - __typename: "ProductVariant"; - id: string; - price: ProductList_products_edges_node_variants_price | null; +export interface ProductList_products_edges_node_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductList_products_edges_node_pricing_priceRangeUndiscounted_start_gross; +} + +export interface ProductList_products_edges_node_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductList_products_edges_node_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductList_products_edges_node_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductList_products_edges_node_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductList_products_edges_node_pricing_priceRangeUndiscounted_start | null; + stop: ProductList_products_edges_node_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductList_products_edges_node_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductList_products_edges_node_pricing_priceRangeUndiscounted | null; } export interface ProductList_products_edges_node { @@ -58,7 +79,7 @@ export interface ProductList_products_edges_node { isPublished: boolean; productType: ProductList_products_edges_node_productType; attributes: ProductList_products_edges_node_attributes[]; - variants: (ProductList_products_edges_node_variants | null)[] | null; + pricing: ProductList_products_edges_node_pricing | null; } export interface ProductList_products_edges { diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 0bf0f7184..b8667ff60 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -66,35 +66,37 @@ export interface ProductUpdate_productUpdate_product_productType { hasVariants: boolean; } -export interface ProductUpdate_productUpdate_product_variants_price { +export interface ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start_gross; } -export interface ProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; +export interface ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface ProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - price: ProductUpdate_productUpdate_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start | null; + stop: ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductUpdate_productUpdate_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted | null; } export interface ProductUpdate_productUpdate_product_category { @@ -133,39 +135,6 @@ export interface ProductUpdate_productUpdate_product_purchaseCost { stop: ProductUpdate_productUpdate_product_purchaseCost_stop | null; } -export interface ProductUpdate_productUpdate_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductUpdate_productUpdate_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductUpdate_productUpdate_product_pricing_priceRange_start_net; -} - -export interface ProductUpdate_productUpdate_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductUpdate_productUpdate_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductUpdate_productUpdate_product_pricing_priceRange_stop_net; -} - -export interface ProductUpdate_productUpdate_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductUpdate_productUpdate_product_pricing_priceRange_start | null; - stop: ProductUpdate_productUpdate_product_pricing_priceRange_stop | null; -} - -export interface ProductUpdate_productUpdate_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductUpdate_productUpdate_product_pricing_priceRange | null; -} - export interface ProductUpdate_productUpdate_product_images { __typename: "ProductImage"; id: string; @@ -174,12 +143,43 @@ export interface ProductUpdate_productUpdate_product_images { url: string; } +export interface ProductUpdate_productUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface ProductUpdate_productUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; +} + +export interface ProductUpdate_productUpdate_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: ProductUpdate_productUpdate_product_variants_price | null; + margin: number | null; + stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface ProductUpdate_productUpdate_product { __typename: "Product"; id: string; attributes: ProductUpdate_productUpdate_product_attributes[]; productType: ProductUpdate_productUpdate_product_productType; - variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; + pricing: ProductUpdate_productUpdate_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -192,8 +192,8 @@ export interface ProductUpdate_productUpdate_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: ProductUpdate_productUpdate_product_pricing | null; images: (ProductUpdate_productUpdate_product_images | null)[] | null; + variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; } export interface ProductUpdate_productUpdate { diff --git a/src/products/types/ProductVariantAttributesFragment.ts b/src/products/types/ProductVariantAttributesFragment.ts index 334fa66fd..0349fd386 100644 --- a/src/products/types/ProductVariantAttributesFragment.ts +++ b/src/products/types/ProductVariantAttributesFragment.ts @@ -58,16 +58,37 @@ export interface ProductVariantAttributesFragment_productType { variantAttributes: (ProductVariantAttributesFragment_productType_variantAttributes | null)[] | null; } -export interface ProductVariantAttributesFragment_variants_price { +export interface ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface ProductVariantAttributesFragment_variants { - __typename: "ProductVariant"; - id: string; - price: ProductVariantAttributesFragment_variants_price | null; +export interface ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_start_gross; +} + +export interface ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface ProductVariantAttributesFragment_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_start | null; + stop: ProductVariantAttributesFragment_pricing_priceRangeUndiscounted_stop | null; +} + +export interface ProductVariantAttributesFragment_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: ProductVariantAttributesFragment_pricing_priceRangeUndiscounted | null; } export interface ProductVariantAttributesFragment { @@ -75,5 +96,5 @@ export interface ProductVariantAttributesFragment { id: string; attributes: ProductVariantAttributesFragment_attributes[]; productType: ProductVariantAttributesFragment_productType; - variants: (ProductVariantAttributesFragment_variants | null)[] | null; + pricing: ProductVariantAttributesFragment_pricing | null; } diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index b745c08f9..c0f7f7aef 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -66,35 +66,37 @@ export interface SimpleProductUpdate_productUpdate_product_productType { hasVariants: boolean; } -export interface SimpleProductUpdate_productUpdate_product_variants_price { +export interface SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start_gross { __typename: "Money"; amount: number; currency: string; } -export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; +export interface SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start { + __typename: "TaxedMoney"; + gross: SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start_gross; } -export interface SimpleProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; +export interface SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop_gross { + __typename: "Money"; + amount: number; + currency: string; } -export interface SimpleProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - price: SimpleProductUpdate_productUpdate_product_variants_price | null; - sku: string; - name: string; - margin: number | null; - stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; +export interface SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop { + __typename: "TaxedMoney"; + gross: SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop_gross; +} + +export interface SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_start | null; + stop: SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted_stop | null; +} + +export interface SimpleProductUpdate_productUpdate_product_pricing { + __typename: "ProductPricingInfo"; + priceRangeUndiscounted: SimpleProductUpdate_productUpdate_product_pricing_priceRangeUndiscounted | null; } export interface SimpleProductUpdate_productUpdate_product_category { @@ -133,39 +135,6 @@ export interface SimpleProductUpdate_productUpdate_product_purchaseCost { stop: SimpleProductUpdate_productUpdate_product_purchaseCost_stop | null; } -export interface SimpleProductUpdate_productUpdate_product_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productUpdate_product_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: SimpleProductUpdate_productUpdate_product_pricing_priceRange_start_net; -} - -export interface SimpleProductUpdate_productUpdate_product_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productUpdate_product_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: SimpleProductUpdate_productUpdate_product_pricing_priceRange_stop_net; -} - -export interface SimpleProductUpdate_productUpdate_product_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: SimpleProductUpdate_productUpdate_product_pricing_priceRange_start | null; - stop: SimpleProductUpdate_productUpdate_product_pricing_priceRange_stop | null; -} - -export interface SimpleProductUpdate_productUpdate_product_pricing { - __typename: "ProductPricingInfo"; - priceRange: SimpleProductUpdate_productUpdate_product_pricing_priceRange | null; -} - export interface SimpleProductUpdate_productUpdate_product_images { __typename: "ProductImage"; id: string; @@ -174,12 +143,43 @@ export interface SimpleProductUpdate_productUpdate_product_images { url: string; } +export interface SimpleProductUpdate_productUpdate_product_variants_price { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse { + __typename: "Warehouse"; + id: string; + name: string; +} + +export interface SimpleProductUpdate_productUpdate_product_variants_stocks { + __typename: "Stock"; + id: string; + quantity: number; + quantityAllocated: number; + warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; +} + +export interface SimpleProductUpdate_productUpdate_product_variants { + __typename: "ProductVariant"; + id: string; + sku: string; + name: string; + price: SimpleProductUpdate_productUpdate_product_variants_price | null; + margin: number | null; + stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; + trackInventory: boolean; +} + export interface SimpleProductUpdate_productUpdate_product { __typename: "Product"; id: string; attributes: SimpleProductUpdate_productUpdate_product_attributes[]; productType: SimpleProductUpdate_productUpdate_product_productType; - variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; + pricing: SimpleProductUpdate_productUpdate_product_pricing | null; name: string; descriptionJson: any; seoTitle: string | null; @@ -192,8 +192,8 @@ export interface SimpleProductUpdate_productUpdate_product { isPublished: boolean; chargeTaxes: boolean; publicationDate: any | null; - pricing: SimpleProductUpdate_productUpdate_product_pricing | null; images: (SimpleProductUpdate_productUpdate_product_images | null)[] | null; + variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; } export interface SimpleProductUpdate_productUpdate { diff --git a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx index 807631002..cfff9a11c 100644 --- a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx +++ b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx @@ -51,7 +51,7 @@ const ProductVariantCreator: React.FC = ({ })} /> - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 - $5.00 - $10.00 + $3.00 - $8.00 @@ -124314,7 +124314,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - $15.00 - $49.00 + $3.00 - $8.00 - $15.00 - $49.00 + $3.00 - $8.00 - $15.00 - $49.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 @@ -127129,7 +127129,7 @@ exports[`Storyshots Views / Products / Product list not published 1`] = ` - $15.00 - $49.00 + $3.00 - $8.00 - $15.00 - $49.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 @@ -127910,7 +127910,7 @@ exports[`Storyshots Views / Products / Product list published 1`] = ` - $15.00 - $49.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 - $3.00 - $7.00 + $3.00 - $8.00 From 504ff433768144f3b363c99f06e0f4b73407c6e1 Mon Sep 17 00:00:00 2001 From: Dawid Tarasiuk Date: Fri, 19 Jun 2020 12:31:17 +0200 Subject: [PATCH 043/294] Update queries imports --- src/categories/queries.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/categories/queries.ts b/src/categories/queries.ts index ffa0feeee..1f6592a94 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -1,4 +1,5 @@ import makeQuery from "@saleor/hooks/makeQuery"; +import { fragmentMoney } from "@saleor/products/queries"; import gql from "graphql-tag"; import { pageInfoFragment } from "../queries"; @@ -8,13 +9,6 @@ import { } from "./types/CategoryDetails"; import { RootCategories } from "./types/RootCategories"; -export const fragmentMoney = gql` - fragment Money on Money { - amount - currency - } -`; - export const categoryFragment = gql` fragment CategoryFragment on Category { id From 2a6334cb7475f84e63eec822c198570c1839a57a Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Thu, 25 Jun 2020 08:47:54 +0200 Subject: [PATCH 044/294] Dont open browser on npm start (#577) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 780ac8970..9c25281c6 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "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", + "start": "webpack-dev-server -d", "storybook": "start-storybook -p 3000 -c src/storybook/", "test-e2e": "testcafe 'chrome:headless' .testcafe", "test": "jest src/", From 44688578563cf97e9cf6c347b2e04d5d2849f311 Mon Sep 17 00:00:00 2001 From: natalia Date: Thu, 25 Jun 2020 10:18:46 +0300 Subject: [PATCH 045/294] Fix updating shipping rates (#565) --- .../ShippingZoneRateDialog.tsx | 7 +++++-- src/shipping/views/ShippingZoneDetails/data.ts | 14 +++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx index c9024c07f..d94b8fab9 100644 --- a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx +++ b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx @@ -37,6 +37,7 @@ export interface FormData { maxValue: string; isFree: boolean; price: string; + type: ShippingMethodTypeEnum; } export interface ShippingZoneRateDialogProps { @@ -104,7 +105,8 @@ const ShippingZoneRateDialog: React.FC = props => { minValue: "", name: "", noLimits: false, - price: "" + price: "", + type: null } : { isFree: maybe(() => rate.price.amount === 0, false), @@ -118,7 +120,8 @@ const ShippingZoneRateDialog: React.FC = props => { : maybe(() => rate.minimumOrderWeight.value.toString(), ""), name: maybe(() => rate.name, ""), noLimits: false, - price: maybe(() => rate.price.amount.toString(), "") + price: maybe(() => rate.price.amount.toString(), ""), + type: variant }; if (action === "edit") { initialForm.noLimits = !initialForm.maxValue && !initialForm.minValue; diff --git a/src/shipping/views/ShippingZoneDetails/data.ts b/src/shipping/views/ShippingZoneDetails/data.ts index 5ad49ce11..b4d714ea6 100644 --- a/src/shipping/views/ShippingZoneDetails/data.ts +++ b/src/shipping/views/ShippingZoneDetails/data.ts @@ -50,14 +50,22 @@ export function getUpdateShippingRateVariables( params: ShippingZoneUrlQueryParams, id: string ): UpdateShippingRateVariables { + const isPriceType = data.type === ShippingMethodTypeEnum.PRICE + const parsedMinValue = parseFloat(data.minValue) + const parsedMaxValue = parseFloat(data.maxValue) + const isPriceSet = !data.noLimits && isPriceType + const isWeightSet = !data.noLimits && !isPriceType return { id: params.id, input: { - maximumOrderPrice: data.noLimits ? null : parseFloat(data.maxValue), - minimumOrderPrice: data.noLimits ? null : parseFloat(data.minValue), + maximumOrderPrice: isPriceSet ? parsedMaxValue : null, + maximumOrderWeight: isWeightSet ? parsedMaxValue : null, + minimumOrderPrice: isPriceSet ? parsedMinValue : null, + minimumOrderWeight: isWeightSet ? parsedMinValue : null, name: data.name, price: data.isFree ? 0 : parseFloat(data.price), - shippingZone: id + shippingZone: id, + type: data.type } }; } From 7a2a18a1d4bffedaf77ce4f610ed10ffe62587d5 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Fri, 19 Jun 2020 12:42:29 +0200 Subject: [PATCH 046/294] Add background task manager --- .../BackgroundTasksProvider.test.tsx | 109 ++++++++++++++++++ .../BackgroundTasksProvider.tsx | 58 ++++++++++ src/containers/BackgroundTasks/context.ts | 7 ++ src/containers/BackgroundTasks/index.ts | 2 + src/containers/BackgroundTasks/tasks.ts | 42 +++++++ src/containers/BackgroundTasks/types.ts | 21 ++++ 6 files changed, 239 insertions(+) create mode 100644 src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx create mode 100644 src/containers/BackgroundTasks/BackgroundTasksProvider.tsx create mode 100644 src/containers/BackgroundTasks/context.ts create mode 100644 src/containers/BackgroundTasks/index.ts create mode 100644 src/containers/BackgroundTasks/tasks.ts create mode 100644 src/containers/BackgroundTasks/types.ts diff --git a/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx new file mode 100644 index 000000000..72c57cbae --- /dev/null +++ b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx @@ -0,0 +1,109 @@ +import { renderHook } from "@testing-library/react-hooks"; + +import { + backgroundTasksRefreshTime, + useBackgroundTasks +} from "./BackgroundTasksProvider"; +import { Task, TaskData } from "./types"; + +jest.useFakeTimers(); + +describe("Background task provider", () => { + it("can queue a task", () => { + const onCompleted = jest.fn(); + const onError = jest.fn(); + + const { result } = renderHook(useBackgroundTasks); + + const taskId = result.current.queue(Task.CUSTOM, { + handle: () => true, + onCompleted, + onError + }); + expect(taskId).toBe(1); + expect(onCompleted).not.toHaveBeenCalled(); + expect(onError).not.toHaveBeenCalled(); + + jest.runOnlyPendingTimers(); + + expect(onCompleted).toHaveBeenCalled(); + expect(onError).not.toHaveBeenCalled(); + }); + + it("can handle task error", () => { + const onCompleted = jest.fn(); + const onError = jest.fn(); + + const { result } = renderHook(useBackgroundTasks); + + result.current.queue(Task.CUSTOM, { + handle: () => { + throw new Error("dummy error"); + }, + onCompleted, + onError + }); + + jest.runOnlyPendingTimers(); + + expect(onCompleted).not.toHaveBeenCalled(); + expect(onError).toHaveBeenCalled(); + }); + + it("can cancel task", () => { + const onCompleted = jest.fn(); + + const { result } = renderHook(useBackgroundTasks); + + const taskId = result.current.queue(Task.CUSTOM, { + handle: () => true, + onCompleted + }); + + jest.advanceTimersByTime(backgroundTasksRefreshTime - 1000); + result.current.cancel(taskId); + + jest.runOnlyPendingTimers(); + + expect(onCompleted).not.toHaveBeenCalled(); + }); + + it("can queue multiple tasks", () => { + const responses = [ + { + finished: false + }, + { + finished: false + } + ]; + + const tasks: TaskData[] = responses.map(response => ({ + handle: () => response.finished, + onCompleted: jest.fn() + })); + + const { result } = renderHook(useBackgroundTasks); + + tasks.forEach(task => result.current.queue(Task.CUSTOM, task)); + + jest.runOnlyPendingTimers(); + + expect(tasks[0].onCompleted).not.toHaveBeenCalled(); + expect(tasks[1].onCompleted).not.toHaveBeenCalled(); + + responses[0].finished = true; + + jest.runOnlyPendingTimers(); + + expect(tasks[0].onCompleted).toHaveBeenCalled(); + expect(tasks[1].onCompleted).not.toHaveBeenCalled(); + + responses[1].finished = true; + + jest.runOnlyPendingTimers(); + + expect(tasks[1].onCompleted).toHaveBeenCalled(); + expect(tasks[1].onCompleted).toHaveBeenCalled(); + }); +}); diff --git a/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx b/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx new file mode 100644 index 000000000..7a1b34007 --- /dev/null +++ b/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx @@ -0,0 +1,58 @@ +import React from "react"; + +import BackgroundTasksContext from "./context"; +import { handleTask, queueCustom } from "./tasks"; +import { QueuedTask, Task, TaskData } from "./types"; + +export const backgroundTasksRefreshTime = 15 * 1000; + +export function useBackgroundTasks() { + const idCounter = React.useRef(0); + const tasks = React.useRef([]); + + React.useEffect(() => { + const intervalId = setInterval(() => { + tasks.current = tasks.current.filter(task => !handleTask(task)); + }, backgroundTasksRefreshTime); + + return () => clearInterval(intervalId); + }); + + function cancel(id: number) { + tasks.current = tasks.current.filter(task => task.id !== id); + } + + function queue(type: Task, data?: TaskData) { + idCounter.current += 1; + + switch (type) { + case Task.CUSTOM: + queueCustom(idCounter.current, tasks, data); + } + + return idCounter.current; + } + + return { + cancel, + queue + }; +} + +const BackgroundTasksProvider: React.FC = ({ children }) => { + const { cancel, queue } = useBackgroundTasks(); + + return ( + + {children} + + ); +}; + +BackgroundTasksProvider.displayName = "BackgroundTasksProvider"; +export default BackgroundTasksProvider; diff --git a/src/containers/BackgroundTasks/context.ts b/src/containers/BackgroundTasks/context.ts new file mode 100644 index 000000000..985da8963 --- /dev/null +++ b/src/containers/BackgroundTasks/context.ts @@ -0,0 +1,7 @@ +import { createContext } from "React"; + +import { BackgroundTasksContextType } from "./types"; + +const BackgroundTasksContext = createContext(null); + +export default BackgroundTasksContext; diff --git a/src/containers/BackgroundTasks/index.ts b/src/containers/BackgroundTasks/index.ts new file mode 100644 index 000000000..3525dcf82 --- /dev/null +++ b/src/containers/BackgroundTasks/index.ts @@ -0,0 +1,2 @@ +export * from "./BackgroundTasksProvider"; +export { default } from "./BackgroundTasksProvider"; diff --git a/src/containers/BackgroundTasks/tasks.ts b/src/containers/BackgroundTasks/tasks.ts new file mode 100644 index 000000000..61a488e94 --- /dev/null +++ b/src/containers/BackgroundTasks/tasks.ts @@ -0,0 +1,42 @@ +import { QueuedTask, TaskData } from "./types"; + +export function handleTask(task: QueuedTask) { + let ok: boolean; + try { + ok = task.handle(); + } catch (error) { + task.onError(error); + } + + if (ok) { + task.onCompleted(); + } + + return ok; +} + +export function handleError(error: Error) { + throw error; +} + +export function queueCustom( + id: number, + tasks: React.MutableRefObject, + data: TaskData +) { + (["handle", "onCompleted"] as Array) + .filter(field => !data[field]) + .forEach(field => { + throw new Error(`${field} is required when creating custom task`); + }); + + tasks.current = [ + ...tasks.current, + { + handle: data.handle, + id, + onCompleted: data.onCompleted, + onError: data.onError || handleError + } + ]; +} diff --git a/src/containers/BackgroundTasks/types.ts b/src/containers/BackgroundTasks/types.ts new file mode 100644 index 000000000..719a6df2c --- /dev/null +++ b/src/containers/BackgroundTasks/types.ts @@ -0,0 +1,21 @@ +export enum Task { + CUSTOM +} + +export interface QueuedTask { + id: number; + handle: () => boolean; + onCompleted: () => void; + onError: (error: Error) => void; +} + +export interface TaskData { + handle?: () => boolean; + onCompleted?: () => void; + onError?: () => void; +} + +export interface BackgroundTasksContextType { + cancel: (id: number) => void; + queue: (type: Task, data?: TaskData) => void; +} From bdf90039b503da9ac6f21ce3c5c7269a92f489f7 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Sun, 21 Jun 2020 17:31:33 +0200 Subject: [PATCH 047/294] Handle asynchronous tasks --- .../BackgroundTasksProvider.test.tsx | 100 ++++++++++++------ .../BackgroundTasksProvider.tsx | 31 +++++- src/containers/BackgroundTasks/tasks.ts | 18 ++-- src/containers/BackgroundTasks/types.ts | 9 +- 4 files changed, 110 insertions(+), 48 deletions(-) diff --git a/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx index 72c57cbae..23f29b4d5 100644 --- a/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx +++ b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx @@ -9,77 +9,100 @@ import { Task, TaskData } from "./types"; jest.useFakeTimers(); describe("Background task provider", () => { - it("can queue a task", () => { + it("can queue a task", done => { + const handle = jest.fn, []>( + () => new Promise(resolve => resolve(true)) + ); const onCompleted = jest.fn(); const onError = jest.fn(); const { result } = renderHook(useBackgroundTasks); const taskId = result.current.queue(Task.CUSTOM, { - handle: () => true, + handle, onCompleted, onError }); expect(taskId).toBe(1); + expect(handle).not.toHaveBeenCalled(); expect(onCompleted).not.toHaveBeenCalled(); expect(onError).not.toHaveBeenCalled(); jest.runOnlyPendingTimers(); - expect(onCompleted).toHaveBeenCalled(); - expect(onError).not.toHaveBeenCalled(); + setImmediate(() => { + expect(handle).toHaveBeenCalled(); + expect(onCompleted).toHaveBeenCalled(); + expect(onError).not.toHaveBeenCalled(); + + done(); + }); }); - it("can handle task error", () => { + it("can handle task error", done => { + const handle = jest.fn, []>( + () => + new Promise(() => { + throw new Error("dummy error"); + }) + ); const onCompleted = jest.fn(); const onError = jest.fn(); const { result } = renderHook(useBackgroundTasks); result.current.queue(Task.CUSTOM, { - handle: () => { - throw new Error("dummy error"); - }, + handle, onCompleted, onError }); jest.runOnlyPendingTimers(); - expect(onCompleted).not.toHaveBeenCalled(); - expect(onError).toHaveBeenCalled(); + setImmediate(() => { + expect(handle).toHaveBeenCalled(); + expect(onCompleted).not.toHaveBeenCalled(); + expect(onError).toHaveBeenCalled(); + + done(); + }); }); - it("can cancel task", () => { + it("can cancel task", done => { const onCompleted = jest.fn(); const { result } = renderHook(useBackgroundTasks); const taskId = result.current.queue(Task.CUSTOM, { - handle: () => true, + handle: () => new Promise(resolve => resolve(true)), onCompleted }); - jest.advanceTimersByTime(backgroundTasksRefreshTime - 1000); + // Cancel task before executing it + jest.advanceTimersByTime(backgroundTasksRefreshTime * 0.9); result.current.cancel(taskId); jest.runOnlyPendingTimers(); - expect(onCompleted).not.toHaveBeenCalled(); + setImmediate(() => { + expect(onCompleted).not.toHaveBeenCalled(); + + done(); + }); }); - it("can queue multiple tasks", () => { - const responses = [ - { - finished: false - }, - { - finished: false - } + it("can queue multiple tasks", done => { + const responses: Array> = [ + new Promise(resolve => + setTimeout(() => resolve(true), backgroundTasksRefreshTime * 1.4) + ), + new Promise(resolve => + setTimeout(() => resolve(true), backgroundTasksRefreshTime * 2.1) + ) ]; const tasks: TaskData[] = responses.map(response => ({ - handle: () => response.finished, + handle: () => response, onCompleted: jest.fn() })); @@ -87,23 +110,30 @@ describe("Background task provider", () => { tasks.forEach(task => result.current.queue(Task.CUSTOM, task)); - jest.runOnlyPendingTimers(); + // Set time to backgroundTasksRefreshTime + jest.advanceTimersByTime(backgroundTasksRefreshTime + 100); - expect(tasks[0].onCompleted).not.toHaveBeenCalled(); - expect(tasks[1].onCompleted).not.toHaveBeenCalled(); + setImmediate(() => { + expect(tasks[0].onCompleted).not.toHaveBeenCalled(); + expect(tasks[1].onCompleted).not.toHaveBeenCalled(); - responses[0].finished = true; + // Set time to backgroundTasksRefreshTime * 2 + jest.advanceTimersByTime(backgroundTasksRefreshTime); - jest.runOnlyPendingTimers(); + setImmediate(() => { + expect(tasks[0].onCompleted).toHaveBeenCalled(); + expect(tasks[1].onCompleted).not.toHaveBeenCalled(); - expect(tasks[0].onCompleted).toHaveBeenCalled(); - expect(tasks[1].onCompleted).not.toHaveBeenCalled(); + // Set time to backgroundTasksRefreshTime * 3 + jest.advanceTimersByTime(backgroundTasksRefreshTime); - responses[1].finished = true; + setImmediate(() => { + expect(tasks[1].onCompleted).toHaveBeenCalled(); + expect(tasks[1].onCompleted).toHaveBeenCalled(); - jest.runOnlyPendingTimers(); - - expect(tasks[1].onCompleted).toHaveBeenCalled(); - expect(tasks[1].onCompleted).toHaveBeenCalled(); + done(); + }); + }); + }); }); }); diff --git a/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx b/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx index 7a1b34007..7199956d9 100644 --- a/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx +++ b/src/containers/BackgroundTasks/BackgroundTasksProvider.tsx @@ -2,7 +2,7 @@ import React from "react"; import BackgroundTasksContext from "./context"; import { handleTask, queueCustom } from "./tasks"; -import { QueuedTask, Task, TaskData } from "./types"; +import { QueuedTask, Task, TaskData, TaskStatus } from "./types"; export const backgroundTasksRefreshTime = 15 * 1000; @@ -12,7 +12,34 @@ export function useBackgroundTasks() { React.useEffect(() => { const intervalId = setInterval(() => { - tasks.current = tasks.current.filter(task => !handleTask(task)); + const queue = async () => { + tasks.current = tasks.current.filter( + task => task.status !== TaskStatus.ENDED + ); + try { + await Promise.all( + tasks.current.map(async task => { + let hasFinished: boolean; + + try { + hasFinished = await handleTask(task); + } catch (error) { + throw error; + } + if (hasFinished) { + const taskIndex = tasks.current.findIndex( + t => t.id === task.id + ); + tasks.current[taskIndex].status = TaskStatus.ENDED; + } + }) + ); + } catch (error) { + throw error; + } + }; + + queue(); }, backgroundTasksRefreshTime); return () => clearInterval(intervalId); diff --git a/src/containers/BackgroundTasks/tasks.ts b/src/containers/BackgroundTasks/tasks.ts index 61a488e94..5fea73b44 100644 --- a/src/containers/BackgroundTasks/tasks.ts +++ b/src/containers/BackgroundTasks/tasks.ts @@ -1,17 +1,16 @@ -import { QueuedTask, TaskData } from "./types"; +import { QueuedTask, TaskData, TaskStatus } from "./types"; -export function handleTask(task: QueuedTask) { - let ok: boolean; +export async function handleTask(task: QueuedTask): Promise { + let ok = false; try { - ok = task.handle(); + ok = await task.handle(); + if (ok) { + task.onCompleted(); + } } catch (error) { task.onError(error); } - if (ok) { - task.onCompleted(); - } - return ok; } @@ -36,7 +35,8 @@ export function queueCustom( handle: data.handle, id, onCompleted: data.onCompleted, - onError: data.onError || handleError + onError: data.onError || handleError, + status: TaskStatus.PENDING } ]; } diff --git a/src/containers/BackgroundTasks/types.ts b/src/containers/BackgroundTasks/types.ts index 719a6df2c..a4e328e0e 100644 --- a/src/containers/BackgroundTasks/types.ts +++ b/src/containers/BackgroundTasks/types.ts @@ -1,16 +1,21 @@ export enum Task { CUSTOM } +export enum TaskStatus { + PENDING, + ENDED +} export interface QueuedTask { id: number; - handle: () => boolean; + handle: () => Promise; + status: TaskStatus; onCompleted: () => void; onError: (error: Error) => void; } export interface TaskData { - handle?: () => boolean; + handle?: () => Promise; onCompleted?: () => void; onError?: () => void; } From e80ef22f0d78c8aa58d2a4a2f3a248921db94c86 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 23 Jun 2020 14:31:27 +0200 Subject: [PATCH 048/294] Add context to project root --- src/hooks/useBackgroundTask.ts | 6 ++++++ src/index.tsx | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 src/hooks/useBackgroundTask.ts diff --git a/src/hooks/useBackgroundTask.ts b/src/hooks/useBackgroundTask.ts new file mode 100644 index 000000000..eb477706f --- /dev/null +++ b/src/hooks/useBackgroundTask.ts @@ -0,0 +1,6 @@ +import BackgroundTasksContext from "@saleor/containers/BackgroundTasks/context"; +import { useContext } from "react"; + +const useBackgroundTask = useContext(BackgroundTasksContext); + +export default useBackgroundTask; diff --git a/src/index.tsx b/src/index.tsx index 45625ac19..2c30b3571 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -35,6 +35,7 @@ import { WindowTitle } from "./components/WindowTitle"; import { API_URI, APP_MOUNT_URI, GTM_ID } from "./config"; import ConfigurationSection, { createConfigurationMenu } from "./configuration"; import AppStateProvider from "./containers/AppState"; +import BackgroundTasksProvider from "./containers/BackgroundTasks"; import { CustomerSection } from "./customers"; import DiscountSection from "./discounts"; import HomePage from "./home"; @@ -135,11 +136,13 @@ const App: React.FC = () => { - - - - - + + + + + + + From c57598fb09c3351f508327e56ee39a1a5de436d4 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 23 Jun 2020 14:33:11 +0200 Subject: [PATCH 049/294] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0982e9674..7598ac2d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ All notable, unreleased changes to this project will be documented in this file. - Update product stock management to newest design - #515 by @dominik-zeglen - Handle untracked products - #523 by @dominik-zeglen - Display correct error if there were no graphql errors - #525 by @dominik-zeglen +- Add background task manager - #574 by @dominik-zeglen ## 2.0.0 From 25e7ca8aa7328f92dc972df9c75007d1406d2d1c Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 23 Jun 2020 15:24:45 +0200 Subject: [PATCH 050/294] Fix useBackgroundTask hook --- src/hooks/useBackgroundTask.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useBackgroundTask.ts b/src/hooks/useBackgroundTask.ts index eb477706f..9ec45f163 100644 --- a/src/hooks/useBackgroundTask.ts +++ b/src/hooks/useBackgroundTask.ts @@ -1,6 +1,8 @@ import BackgroundTasksContext from "@saleor/containers/BackgroundTasks/context"; import { useContext } from "react"; -const useBackgroundTask = useContext(BackgroundTasksContext); +function useBackgroundTask() { + return useContext(BackgroundTasksContext); +} export default useBackgroundTask; From 6aa53c67759518eb74fce0d12c184526fe65fdff Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 23 Jun 2020 17:36:47 +0200 Subject: [PATCH 051/294] Fix case --- src/containers/BackgroundTasks/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/BackgroundTasks/context.ts b/src/containers/BackgroundTasks/context.ts index 985da8963..13f49e3ba 100644 --- a/src/containers/BackgroundTasks/context.ts +++ b/src/containers/BackgroundTasks/context.ts @@ -1,4 +1,4 @@ -import { createContext } from "React"; +import { createContext } from "react"; import { BackgroundTasksContextType } from "./types"; From 278be8a0bb3485e5e85293c7072e3c3333520bf1 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Fri, 26 Jun 2020 12:47:37 +0200 Subject: [PATCH 052/294] Fix index --- src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx index 23f29b4d5..51e20fb1f 100644 --- a/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx +++ b/src/containers/BackgroundTasks/BackgroundTasksProvider.test.tsx @@ -128,7 +128,7 @@ describe("Background task provider", () => { jest.advanceTimersByTime(backgroundTasksRefreshTime); setImmediate(() => { - expect(tasks[1].onCompleted).toHaveBeenCalled(); + expect(tasks[0].onCompleted).toHaveBeenCalled(); expect(tasks[1].onCompleted).toHaveBeenCalled(); done(); From f5ac7b28ba5a91a9c703cffbf8e5b4fa88f0c897 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2020 12:47:41 +0200 Subject: [PATCH 053/294] [Security] Bump websocket-extensions from 0.1.3 to 0.1.4 (#551) Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. **This update includes a security fix.** - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 421499f39..46769d8b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22668,9 +22668,9 @@ } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "whatwg-encoding": { From 7e11db8c52da9219eb74b329ee93c773e9c3f970 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Wed, 1 Jul 2020 13:11:08 +0200 Subject: [PATCH 054/294] Fix refresh token --- schema.graphql | 65 +++++++++++++++++++++++----------- src/auth/mutations.ts | 3 +- src/auth/types/RefreshToken.ts | 1 - src/types/globalTypes.ts | 6 ++++ 4 files changed, 51 insertions(+), 24 deletions(-) diff --git a/schema.graphql b/schema.graphql index 05f5358fe..4925d28f5 100644 --- a/schema.graphql +++ b/schema.graphql @@ -62,6 +62,11 @@ enum AccountErrorCode { PASSWORD_TOO_SIMILAR REQUIRED UNIQUE + JWT_SIGNATURE_EXPIRED + JWT_INVALID_TOKEN + JWT_DECODE_ERROR + JWT_MISSING_TOKEN + JWT_INVALID_CSRF_TOKEN } input AccountInput { @@ -1443,10 +1448,12 @@ type CountryDisplay { } type CreateToken { - token: String errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - accountErrors: [AccountError!]! + token: String + refreshToken: String + csrfToken: String user: User + accountErrors: [AccountError!]! } type CreditCard { @@ -1540,6 +1547,11 @@ input DateTimeRangeInput { lte: DateTime } +type DeactivateAllUserTokens { + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") + accountErrors: [AccountError!]! +} + scalar Decimal type DeleteMetadata { @@ -2449,9 +2461,6 @@ type Mutation { voucherCataloguesAdd(id: ID!, input: CatalogueInput!): VoucherAddCatalogues voucherCataloguesRemove(id: ID!, input: CatalogueInput!): VoucherRemoveCatalogues voucherTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): VoucherTranslate - tokenCreate(email: String!, password: String!): CreateToken - tokenRefresh(token: String!): RefreshToken - tokenVerify(token: String!): VerifyToken checkoutAddPromoCode(checkoutId: ID!, promoCode: String!): CheckoutAddPromoCode checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdate checkoutComplete(checkoutId: ID!, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete @@ -2476,9 +2485,13 @@ type Mutation { appTokenCreate(input: AppTokenInput!): AppTokenCreate appTokenDelete(id: ID!): AppTokenDelete appTokenVerify(token: String!): AppTokenVerify + tokenCreate(email: String!, password: String!): CreateToken + tokenRefresh(csrfToken: String, refreshToken: String): RefreshToken + tokenVerify(token: String!): VerifyToken + tokensDeactivateAll: DeactivateAllUserTokens requestPasswordReset(email: String!, redirectUrl: String!): RequestPasswordReset confirmAccount(email: String!, token: String!): ConfirmAccount - setPassword(token: String!, email: String!, password: String!): SetPassword + setPassword(email: String!, password: String!, token: String!): SetPassword passwordChange(newPassword: String!, oldPassword: String!): PasswordChange requestEmailChange(newEmail: String!, password: String!, redirectUrl: String!): RequestEmailChange confirmEmailChange(token: String!): ConfirmEmailChange @@ -2753,6 +2766,7 @@ enum OrderEventsEnum { ORDER_FULLY_PAID UPDATED_ADDRESS EMAIL_SENT + PAYMENT_AUTHORIZED PAYMENT_CAPTURED PAYMENT_REFUNDED PAYMENT_VOIDED @@ -3105,19 +3119,21 @@ enum PaymentErrorCode { GRAPHQL_ERROR INVALID NOT_FOUND + REQUIRED + UNIQUE PARTIAL_PAYMENT_NOT_ALLOWED SHIPPING_ADDRESS_NOT_SET INVALID_SHIPPING_METHOD SHIPPING_METHOD_NOT_SET PAYMENT_ERROR - REQUIRED - UNIQUE + NOT_SUPPORTED_GATEWAY } type PaymentGateway { name: String! id: ID! config: [GatewayConfigLine!]! + currencies: [String]! } input PaymentInput { @@ -3176,8 +3192,8 @@ enum PermissionEnum { type PermissionGroupCreate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - group: Group permissionGroupErrors: [PermissionGroupError!]! + group: Group } input PermissionGroupCreateInput { @@ -3226,8 +3242,8 @@ input PermissionGroupSortingInput { type PermissionGroupUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - group: Group permissionGroupErrors: [PermissionGroupError!]! + group: Group } input PermissionGroupUpdateInput { @@ -3958,8 +3974,10 @@ type ReducedRate { } type RefreshToken { + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") token: String - payload: GenericScalar + user: User + accountErrors: [AccountError!]! } input ReorderInput { @@ -4209,10 +4227,12 @@ type ServiceAccountUpdatePrivateMeta { } type SetPassword { - token: String errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - accountErrors: [AccountError!]! + token: String + refreshToken: String + csrfToken: String user: User + accountErrors: [AccountError!]! } type ShippingError { @@ -4336,8 +4356,8 @@ type ShippingZoneCountableEdge { type ShippingZoneCreate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - shippingZone: ShippingZone shippingErrors: [ShippingError!]! + shippingZone: ShippingZone } input ShippingZoneCreateInput { @@ -4355,8 +4375,8 @@ type ShippingZoneDelete { type ShippingZoneUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - shippingZone: ShippingZone shippingErrors: [ShippingError!]! + shippingZone: ShippingZone } input ShippingZoneUpdateInput { @@ -4368,7 +4388,7 @@ input ShippingZoneUpdateInput { } type Shop { - availablePaymentGateways: [PaymentGateway!]! + availablePaymentGateways(currency: String): [PaymentGateway!]! geolocalization: Geolocalization authorizationKeys: [AuthorizationKey]! countries(languageCode: LanguageCodeEnum): [CountryDisplay!]! @@ -4904,8 +4924,11 @@ type VariantPricingInfo { } type VerifyToken { - payload: GenericScalar + errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") user: User + isValid: Boolean! + payload: GenericScalar + accountErrors: [AccountError!]! } type Voucher implements Node { @@ -5125,14 +5148,14 @@ input WarehouseFilterInput { type WarehouseShippingZoneAssign { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - warehouse: Warehouse warehouseErrors: [WarehouseError!]! + warehouse: Warehouse } type WarehouseShippingZoneUnassign { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - warehouse: Warehouse warehouseErrors: [WarehouseError!]! + warehouse: Warehouse } enum WarehouseSortField { @@ -5198,8 +5221,8 @@ input WebhookCreateInput { type WebhookDelete { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - webhook: Webhook webhookErrors: [WebhookError!]! + webhook: Webhook } type WebhookError { @@ -5265,8 +5288,8 @@ input WebhookSortingInput { type WebhookUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - webhook: Webhook webhookErrors: [WebhookError!]! + webhook: Webhook } input WebhookUpdateInput { diff --git a/src/auth/mutations.ts b/src/auth/mutations.ts index 42a1a0020..c2d794085 100644 --- a/src/auth/mutations.ts +++ b/src/auth/mutations.ts @@ -102,9 +102,8 @@ export const SetPasswordMutation = TypedMutation< const refreshToken = gql` mutation RefreshToken($token: String!) { - tokenRefresh(token: $token) { + tokenRefresh(csrfToken: $token) { token - payload } } `; diff --git a/src/auth/types/RefreshToken.ts b/src/auth/types/RefreshToken.ts index cbd3679b9..f4efc60fd 100644 --- a/src/auth/types/RefreshToken.ts +++ b/src/auth/types/RefreshToken.ts @@ -9,7 +9,6 @@ export interface RefreshToken_tokenRefresh { __typename: "RefreshToken"; token: string | null; - payload: any | null; } export interface RefreshToken { diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index b1ea252b1..cab528969 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -20,6 +20,11 @@ export enum AccountErrorCode { INVALID = "INVALID", INVALID_CREDENTIALS = "INVALID_CREDENTIALS", INVALID_PASSWORD = "INVALID_PASSWORD", + JWT_DECODE_ERROR = "JWT_DECODE_ERROR", + JWT_INVALID_CSRF_TOKEN = "JWT_INVALID_CSRF_TOKEN", + JWT_INVALID_TOKEN = "JWT_INVALID_TOKEN", + JWT_MISSING_TOKEN = "JWT_MISSING_TOKEN", + JWT_SIGNATURE_EXPIRED = "JWT_SIGNATURE_EXPIRED", LEFT_NOT_MANAGEABLE_PERMISSION = "LEFT_NOT_MANAGEABLE_PERMISSION", NOT_FOUND = "NOT_FOUND", OUT_OF_SCOPE_GROUP = "OUT_OF_SCOPE_GROUP", @@ -502,6 +507,7 @@ export enum OrderEventsEnum { ORDER_MARKED_AS_PAID = "ORDER_MARKED_AS_PAID", OTHER = "OTHER", OVERSOLD_ITEMS = "OVERSOLD_ITEMS", + PAYMENT_AUTHORIZED = "PAYMENT_AUTHORIZED", PAYMENT_CAPTURED = "PAYMENT_CAPTURED", PAYMENT_FAILED = "PAYMENT_FAILED", PAYMENT_REFUNDED = "PAYMENT_REFUNDED", From f4d570c7e5a703b12dc58b3fe2830df14c3bca89 Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Thu, 2 Jul 2020 12:59:09 +0200 Subject: [PATCH 055/294] Fix warnings and better test tag (#582) * Resolve test warnings * Tename data-tc to data-test * Update src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx --- .testcafe/Models/homePageModel.js | 6 +- .testcafe/Models/loginPageModel.js | 6 +- .../AttributeList/AttributeList.tsx | 22 +- src/auth/components/LoginPage/LoginPage.tsx | 6 +- .../NewPasswordPage/NewPasswordPage.tsx | 4 +- .../ResetPasswordPage/ResetPasswordPage.tsx | 2 +- .../components/CategoryList/CategoryList.tsx | 6 +- .../CollectionList/CollectionList.tsx | 10 +- .../AccountPermissionGroups.tsx | 2 +- src/components/AppLayout/MenuList.tsx | 2 +- src/components/AppLayout/MenuNested.tsx | 4 +- .../CompanyAddressForm.tsx | 2 +- src/components/ImageTile/ImageTile.tsx | 2 +- src/components/LinkChoice/LinkChoice.tsx | 2 +- .../MultiAutocompleteSelectFieldContent.tsx | 10 +- .../SaveButtonBar/SaveButtonBar.tsx | 6 +- .../SingleAutocompleteSelectFieldContent.tsx | 10 +- .../TablePaginationActions.tsx | 4 +- src/components/messages/MessageManager.tsx | 4 +- src/home/components/HomeHeader/HomeHeader.tsx | 2 +- .../OrderCancelDialog/OrderCancelDialog.tsx | 6 +- .../OrderDraftCancelDialog.tsx | 6 +- .../OrderDraftFinalizeDialog.tsx | 4 +- .../OrderFulfillPage/OrderFulfillPage.tsx | 13 +- .../OrderFulfillmentCancelDialog.tsx | 4 +- .../OrderFulfillmentDialog.tsx | 6 +- .../OrderFulfillmentTrackingDialog.tsx | 4 +- .../OrderMarkAsPaidDialog.tsx | 4 +- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 4 +- .../OrderPaymentVoidDialog.tsx | 4 +- .../OrderProductAddDialog.tsx | 4 +- .../OrderShippingMethodEditDialog.tsx | 4 +- .../PermissionGroupList.tsx | 10 +- .../ProductTypeAttributes.tsx | 10 +- .../ProductTypeList/ProductTypeList.tsx | 6 +- .../ProductAttributes/ProductAttributes.tsx | 6 +- .../ProductImages/ProductImages.tsx | 2 +- .../components/ProductList/ProductList.tsx | 16 +- .../ProductListPage/ProductListPage.tsx | 2 +- .../ProductOrganization.tsx | 6 +- .../ProductVariantAttributes.tsx | 2 +- .../ProductVariants/ProductVariants.tsx | 12 +- .../components/ServiceList/ServiceList.tsx | 4 +- .../__snapshots__/Stories.test.ts.snap | 1861 +++++++++-------- .../WarehouseList/WarehouseList.tsx | 8 +- 45 files changed, 1068 insertions(+), 1052 deletions(-) diff --git a/.testcafe/Models/homePageModel.js b/.testcafe/Models/homePageModel.js index 8e400c7e6..5416a9738 100644 --- a/.testcafe/Models/homePageModel.js +++ b/.testcafe/Models/homePageModel.js @@ -2,10 +2,10 @@ import { Selector, t } from "testcafe"; export default class HomePage { constructor() { - this.header = Selector('[data-tc="home-header"]'); - this.catalogMenu = Selector('[data-tc="Catalog"]'); + this.header = Selector('[data-test="home-header"]'); + this.catalogMenu = Selector('[data-test="Catalog"]'); this.productsSubMenu = Selector( - '[data-tc="catalogue"]>[aria-label="products"]' + '[data-test="catalogue"]>[aria-label="products"]' ); } } diff --git a/.testcafe/Models/loginPageModel.js b/.testcafe/Models/loginPageModel.js index 5447a6fdb..117ac9e32 100644 --- a/.testcafe/Models/loginPageModel.js +++ b/.testcafe/Models/loginPageModel.js @@ -2,9 +2,9 @@ import { Selector, t } from "testcafe"; export default class LoginPage { constructor() { - this.email = Selector('[data-tc="email"]'); - this.password = Selector('[data-tc="password"]'); - this.submitButton = Selector('[data-tc="submit"]'); + this.email = Selector('[data-test="email"]'); + this.password = Selector('[data-test="password"]'); + this.submitButton = Selector('[data-test="submit"]'); } async performLogin(putEmail, putPassword) { diff --git a/src/attributes/components/AttributeList/AttributeList.tsx b/src/attributes/components/AttributeList/AttributeList.tsx index bf29ea4d9..211c374ce 100644 --- a/src/attributes/components/AttributeList/AttributeList.tsx +++ b/src/attributes/components/AttributeList/AttributeList.tsx @@ -193,9 +193,9 @@ const AttributeList: React.FC = ({ key={attribute ? attribute.id : "skeleton"} onClick={attribute && onRowClick(attribute.id)} className={classes.link} - data-tc="id" - data-tc-id={maybe(() => attribute.id)} - data-tc-values={JSON.stringify( + data-test="id" + data-test-id={maybe(() => attribute.id)} + data-test-values={JSON.stringify( maybe(() => attribute.values, []) )} > @@ -207,16 +207,16 @@ const AttributeList: React.FC = ({ onChange={() => toggle(attribute.id)} /> - + {attribute ? attribute.slug : } - + {attribute ? attribute.name : } attribute.visibleInStorefront)} + data-test="visible" + data-test-visible={maybe(() => attribute.visibleInStorefront)} > {attribute ? ( translateBoolean(attribute.visibleInStorefront, intl) @@ -226,8 +226,8 @@ const AttributeList: React.FC = ({ attribute.filterableInDashboard )} > @@ -239,8 +239,8 @@ const AttributeList: React.FC = ({ attribute.filterableInStorefront )} > diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index 60f1d9d19..2e4221fa2 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -82,7 +82,7 @@ const LoginCard: React.FC = props => { onChange={handleChange} value={data.email} inputProps={{ - "data-tc": "email" + "data-test": "email" }} /> @@ -97,7 +97,7 @@ const LoginCard: React.FC = props => { type="password" value={data.password} inputProps={{ - "data-tc": "password" + "data-test": "password" }} /> @@ -109,7 +109,7 @@ const LoginCard: React.FC = props => { variant="contained" onClick={handleSubmit} type="submit" - data-tc="submit" + data-test="submit" > diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx index 1f9e9617c..ba9966675 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx @@ -86,7 +86,7 @@ const NewPasswordPage: React.FC = props => { type="password" value={data.password} inputProps={{ - "data-tc": "password" + "data-test": "password" }} /> @@ -109,7 +109,7 @@ const NewPasswordPage: React.FC = props => { }) } inputProps={{ - "data-tc": "confirm-password" + "data-test": "confirm-password" }} /> diff --git a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx index d7f297011..7502ec631 100644 --- a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx +++ b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx @@ -68,7 +68,7 @@ const ResetPasswordPage: React.FC = props => { onChange={handleChange} value={data.email} inputProps={{ - "data-tc": "email" + "data-test": "email" }} /> diff --git a/src/categories/components/CategoryList/CategoryList.tsx b/src/categories/components/CategoryList/CategoryList.tsx index 48c79af01..39d1d8d28 100644 --- a/src/categories/components/CategoryList/CategoryList.tsx +++ b/src/categories/components/CategoryList/CategoryList.tsx @@ -165,8 +165,8 @@ const CategoryList: React.FC = props => { onClick={category ? onRowClick(category.id) : undefined} key={category ? category.id : "skeleton"} selected={isSelected} - data-tc="id" - data-tc-id={maybe(() => category.id)} + data-test="id" + data-test-id={maybe(() => category.id)} > = props => { onChange={() => toggle(category.id)} /> - + {category && category.name ? category.name : } diff --git a/src/collections/components/CollectionList/CollectionList.tsx b/src/collections/components/CollectionList/CollectionList.tsx index 34f9fb65f..d46c53de0 100644 --- a/src/collections/components/CollectionList/CollectionList.tsx +++ b/src/collections/components/CollectionList/CollectionList.tsx @@ -150,8 +150,8 @@ const CollectionList: React.FC = props => { onClick={collection ? onRowClick(collection.id) : undefined} key={collection ? collection.id : "skeleton"} selected={isSelected} - data-tc="id" - data-tc-id={maybe(() => collection.id)} + data-test="id" + data-test-id={maybe(() => collection.id)} > = props => { onChange={() => toggle(collection.id)} /> - + {maybe(() => collection.name, )} @@ -172,8 +172,8 @@ const CollectionList: React.FC = props => { collection.isPublished)} + data-test="published" + data-test-published={maybe(() => collection.isPublished)} > {maybe( () => ( diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx index f3b783e3b..3c294de5e 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx @@ -59,7 +59,7 @@ const AccountPermissionGroups: React.FC = props => value={formData?.permissionGroups} onChange={onChange} fetchChoices={onSearchChange} - data-tc="permissionGroups" + data-test="permissionGroups" onFetchMore={onFetchMore} hasMore={hasMore} loading={loading} diff --git a/src/components/AppLayout/MenuList.tsx b/src/components/AppLayout/MenuList.tsx index 035c9f2c0..3fd970828 100644 --- a/src/components/AppLayout/MenuList.tsx +++ b/src/components/AppLayout/MenuList.tsx @@ -264,7 +264,7 @@ const MenuList: React.FC = props => { menuItem.ariaLabel === activeSubMenu.label && activeSubMenu.isActive })} - data-tc={menuItem.label} + data-test={menuItem.label} onClick={() => handleSubMenu(menuItem.ariaLabel)} > = props => { className={classNames(classes.menuListNestedClose, { [classes.menuListNestedCloseDark]: isDark })} - data-tc={ariaLabel} + data-test={ariaLabel} onClick={() => closeSubMenu({ isActive: false, @@ -178,7 +178,7 @@ const MenuNested: React.FC = props => { closeMenu(item.url, event)} key={item.label} > diff --git a/src/components/CompanyAddressInput/CompanyAddressForm.tsx b/src/components/CompanyAddressInput/CompanyAddressForm.tsx index 53d4f3ac5..d5252a310 100644 --- a/src/components/CompanyAddressInput/CompanyAddressForm.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressForm.tsx @@ -160,7 +160,7 @@ const CompanyAddressForm: React.FC = props => { choices={countries} InputProps={{ inputProps: { - autocomplete: "plsdontautocomplete" // Somehow it shuts it down + autoComplete: "none" } }} /> diff --git a/src/components/ImageTile/ImageTile.tsx b/src/components/ImageTile/ImageTile.tsx index dcd20a2f4..f6bb80d2b 100644 --- a/src/components/ImageTile/ImageTile.tsx +++ b/src/components/ImageTile/ImageTile.tsx @@ -70,7 +70,7 @@ const ImageTile: React.FC = props => { const classes = useStyles(props); return ( -
+
= ({ selected={choice.value === value} key={choice.value} onClick={() => handleChange(choice.value)} - data-tc="select-option" + data-test="select-option" > {choice.label} diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx index 2a69f20cd..a68f71221 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx @@ -210,7 +210,7 @@ const MultiAutocompleteSelectFieldContent: React.FC @@ -225,7 +225,7 @@ const MultiAutocompleteSelectFieldContent: React.FC diff --git a/src/components/SaveButtonBar/SaveButtonBar.tsx b/src/components/SaveButtonBar/SaveButtonBar.tsx index c4ada8be0..31944dfe1 100644 --- a/src/components/SaveButtonBar/SaveButtonBar.tsx +++ b/src/components/SaveButtonBar/SaveButtonBar.tsx @@ -104,7 +104,7 @@ export const SaveButtonBar: React.FC = props => { variant="contained" onClick={onDelete} className={classes.deleteButton} - data-tc="button-bar-delete" + data-test="button-bar-delete" > {labels && labels.delete ? labels.delete @@ -116,7 +116,7 @@ export const SaveButtonBar: React.FC = props => { className={classes.cancelButton} variant="text" onClick={onCancel} - data-tc="button-bar-cancel" + data-test="button-bar-cancel" > {maybe( () => labels.cancel, @@ -127,7 +127,7 @@ export const SaveButtonBar: React.FC = props => { disabled={disabled} onClick={onSave} transitionState={state} - data-tc="button-bar-confirm" + data-test="button-bar-confirm" > {maybe( () => labels.save, diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx index 5453b90e1..9a6794d65 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx @@ -175,7 +175,7 @@ const SingleAutocompleteSelectFieldContent: React.FC @@ -189,7 +189,7 @@ const SingleAutocompleteSelectFieldContent: React.FC @@ -205,7 +205,7 @@ const SingleAutocompleteSelectFieldContent: React.FC {suggestion.label} @@ -256,7 +256,7 @@ const SingleAutocompleteSelectFieldContent: React.FC diff --git a/src/components/TablePagination/TablePaginationActions.tsx b/src/components/TablePagination/TablePaginationActions.tsx index 8d83749e3..0fd037f77 100644 --- a/src/components/TablePagination/TablePaginationActions.tsx +++ b/src/components/TablePagination/TablePaginationActions.tsx @@ -87,7 +87,7 @@ export const TablePaginationActions: React.FC = pro })} onClick={onPreviousPage} disabled={!hasPreviousPage} - data-tc="button-pagination-back" + data-test="button-pagination-back" {...backIconButtonProps} > {direction === "rtl" ? : } @@ -99,7 +99,7 @@ export const TablePaginationActions: React.FC = pro })} onClick={onNextPage} disabled={!hasNextPage} - data-tc="button-pagination-next" + data-test="button-pagination-next" {...nextIconButtonProps} > {direction === "rtl" ? : } diff --git a/src/components/messages/MessageManager.tsx b/src/components/messages/MessageManager.tsx index cbc604c71..27b4b0210 100644 --- a/src/components/messages/MessageManager.tsx +++ b/src/components/messages/MessageManager.tsx @@ -73,7 +73,7 @@ export class MessageManager extends React.Component<{}, MessageManagerState> { "aria-describedby": "message-id" }} message={ - + {title && ( {title} @@ -90,7 +90,7 @@ export class MessageManager extends React.Component<{}, MessageManagerState> { color="secondary" size="small" onClick={this.handleClose as any} - data-tc="button-undo" + data-test="button-undo" > UNDO diff --git a/src/home/components/HomeHeader/HomeHeader.tsx b/src/home/components/HomeHeader/HomeHeader.tsx index 579f0d63a..31a57a4ae 100644 --- a/src/home/components/HomeHeader/HomeHeader.tsx +++ b/src/home/components/HomeHeader/HomeHeader.tsx @@ -29,7 +29,7 @@ const HomeOrdersCard: React.FC = props => { const classes = useStyles(props); return ( -
+
{userName ? ( = props => { /> - + = props => { {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx index 0c8737829..ff22afe31 100644 --- a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx +++ b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx @@ -40,7 +40,7 @@ const OrderDraftCancelDialog: React.FC = ({ })} variant="delete" > - + = ({ {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx index 3d65a8d1f..58a569efe 100644 --- a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx +++ b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx @@ -109,8 +109,8 @@ const OrderDraftFinalizeDialog: React.FC = ({ {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx index b2535e5cb..dee9de540 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx @@ -260,7 +260,7 @@ const OrderFulfillPage: React.FC = props => { (line, lineIndex) => { if (!line) { return ( - + @@ -326,6 +326,7 @@ const OrderFulfillPage: React.FC = props => { if (!warehouseStock) { return ( = props => { .variant.trackInventory } ), - max: + max: ( line.variant.trackInventory && - warehouseStock.quantity, + warehouseStock.quantity + ).toString(), min: 0, style: { textAlign: "right" } }} @@ -409,7 +411,10 @@ const OrderFulfillPage: React.FC = props => { ); })} - + {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx index 93e0e5665..32fb30a4e 100644 --- a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx +++ b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx @@ -164,7 +164,7 @@ const OrderFulfillmentDialog: React.FC = props => { = props => { {errors .filter(err => !formFields.includes(err.field)) - .map(err => ( - + .map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx index 734c8a205..d6b32e1d8 100644 --- a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx +++ b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx @@ -76,8 +76,8 @@ const OrderFulfillmentTrackingDialog: React.FC {errors .filter(err => !formFields.includes(err.field)) - .map(err => ( - + .map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index c71686855..3cf3eaed8 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -43,8 +43,8 @@ const OrderMarkAsPaidDialog: React.FC = ({ {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 72f5b3ccc..d4e59c1bc 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -88,8 +88,8 @@ const OrderPaymentDialog: React.FC = ({ {errors .filter(err => !formFields.includes(err.field)) - .map(err => ( - + .map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 7bb7dd6e9..ab812154d 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -46,8 +46,8 @@ const OrderPaymentVoidDialog: React.FC = ({ {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 831202d3e..c97b3a778 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -340,8 +340,8 @@ const OrderProductAddDialog: React.FC = props => { {errors.length > 0 && ( <> - {errors.map(err => ( - + {errors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index baaad1842..73a40ce01 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -120,8 +120,8 @@ const OrderShippingMethodEditDialog: React.FC 0 && ( <> - {nonFieldErrors.map(err => ( - + {nonFieldErrors.map((err, index) => ( + {getOrderErrorMessage(err, intl)} ))} diff --git a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx index 91c826af1..cd0c2061d 100644 --- a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx @@ -125,19 +125,21 @@ const PermissionGroupList: React.FC = props => { onClick={ permissionGroup ? onRowClick(permissionGroup.id) : undefined } - data-tc="id" - data-tc-id={maybe(() => permissionGroup.id)} + data-test="id" + data-test-id={maybe(() => permissionGroup.id)} > {permissionGroup ? ( - {permissionGroup.name} + {permissionGroup.name} ) : ( )} {permissionGroup ? ( - {permissionGroup.users.length} + + {permissionGroup.users.length} + ) : ( )} diff --git a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx index c44727b83..0487366bc 100644 --- a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx +++ b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx @@ -83,7 +83,7 @@ const ProductTypeAttributes: React.FC = props => { return ( = props => { } key={maybe(() => attribute.id)} index={attributeIndex || 0} - data-tc="id" - data-tc-id={maybe(() => attribute.id)} + data-test="id" + data-test-id={maybe(() => attribute.id)} > = props => { onChange={() => toggle(attribute.id)} /> - + {maybe(() => attribute.name) ? ( attribute.name ) : ( )} - + {maybe(() => attribute.slug) ? ( attribute.slug ) : ( diff --git a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx index 17023f45c..14eefbdad 100644 --- a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx @@ -142,8 +142,8 @@ const ProductTypeList: React.FC = props => { key={productType ? productType.id : "skeleton"} onClick={productType ? onRowClick(productType.id) : undefined} selected={isSelected} - data-tc="id" - data-tc-id={maybe(() => productType.id)} + data-test="id" + data-test-id={maybe(() => productType.id)} > = props => { {productType ? ( <> - {productType.name} + {productType.name} {maybe(() => productType.hasVariants) ? intl.formatMessage({ diff --git a/src/products/components/ProductAttributes/ProductAttributes.tsx b/src/products/components/ProductAttributes/ProductAttributes.tsx index 8a91181a0..c6018c2ef 100644 --- a/src/products/components/ProductAttributes/ProductAttributes.tsx +++ b/src/products/components/ProductAttributes/ProductAttributes.tsx @@ -157,7 +157,7 @@ const ProductAttributes: React.FC = ({ = ({
{attribute.label}
-
+
{attribute.data.inputType === AttributeInputTypeEnum.DROPDOWN ? ( = props => { disabled={loading} variant="text" color="primary" - data-tc="button-upload-image" + data-test="button-upload-image" > {intl.formatMessage(commonMessages.uploadImage)} diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index a3649c39a..db60cc5f0 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -332,8 +332,8 @@ export const ProductList: React.FC = props => { key={product ? product.id : "skeleton"} onClick={product && onRowClick(product.id)} className={classes.link} - data-tc="id" - data-tc-id={maybe(() => product.id)} + data-test="id" + data-test-id={maybe(() => product.id)} > = props => { product.thumbnail.url)} - data-tc="name" + data-test="name" > {product?.productType ? (
@@ -377,7 +377,7 @@ export const ProductList: React.FC = props => { > {product && product.productType ? ( product.productType.name @@ -392,8 +392,8 @@ export const ProductList: React.FC = props => { > product.isPublished)} + data-test="isPublished" + data-test-is-published={maybe(() => product.isPublished)} > {product && maybe(() => product.isPublished !== undefined) ? ( @@ -420,8 +420,8 @@ export const ProductList: React.FC = props => { diff --git a/src/products/components/ProductListPage/ProductListPage.tsx b/src/products/components/ProductListPage/ProductListPage.tsx index b762f388b..37a2fa8d9 100644 --- a/src/products/components/ProductListPage/ProductListPage.tsx +++ b/src/products/components/ProductListPage/ProductListPage.tsx @@ -138,7 +138,7 @@ export const ProductListPage: React.FC = props => { onClick={onAdd} color="primary" variant="contained" - data-tc="add-product" + data-test="add-product" > = props => { value={data.productType} onChange={onProductTypeChange} fetchChoices={fetchProductTypes} - data-tc="product-type" + data-test="product-type" {...fetchMoreProductTypes} /> ) : ( @@ -170,7 +170,7 @@ const ProductOrganization: React.FC = props => { value={data.category} onChange={onCategoryChange} fetchChoices={fetchCategories} - data-tc="category" + data-test="category" {...fetchMoreCategories} /> @@ -195,7 +195,7 @@ const ProductOrganization: React.FC = props => { } onChange={onCollectionChange} fetchChoices={fetchCollections} - data-tc="collections" + data-test="collections" {...fetchMoreCollections} /> diff --git a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx index 42d380748..02c561c82 100644 --- a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx +++ b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx @@ -115,7 +115,7 @@ const ProductVariantAttributes: React.FC = ({ value={getAttributeValue(attribute.id, attributes)} choices={getAttributeValueChoices(attribute.id, attributes)} allowCustomValues - data-tc="variant-attribute-input" + data-test="variant-attribute-input" /> )) )} diff --git a/src/products/components/ProductVariants/ProductVariants.tsx b/src/products/components/ProductVariants/ProductVariants.tsx index 2370235dd..97fe9748b 100644 --- a/src/products/components/ProductVariants/ProductVariants.tsx +++ b/src/products/components/ProductVariants/ProductVariants.tsx @@ -211,7 +211,7 @@ export const ProductVariants: React.FC = props => { onClick={onVariantAdd} variant="text" color="primary" - data-tc="button-add-variant" + data-test="button-add-variant" > = props => { onClick={onVariantsAdd} variant="text" color="primary" - data-tc="button-add-variants" + data-test="button-add-variants" > = props => { onChange={() => toggle(variant.id)} /> - + {variant ? variant.name || variant.sku : } - + {variant ? variant.sku : } - + {variant ? ( variant.price ? ( @@ -341,7 +341,7 @@ export const ProductVariants: React.FC = props => { {numAvailable === null ? ( diff --git a/src/services/components/ServiceList/ServiceList.tsx b/src/services/components/ServiceList/ServiceList.tsx index ce6d0ae37..ea0e01675 100644 --- a/src/services/components/ServiceList/ServiceList.tsx +++ b/src/services/components/ServiceList/ServiceList.tsx @@ -125,10 +125,10 @@ const ServiceList: React.FC = props => { onClick={service ? onRowClick(service.id) : undefined} > - + {maybe(() => service.name, )} - + {maybe(() => service.isActive ? (