From b776665e7c37f6bfd995de680d2d6b599ce96e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Thu, 11 Jul 2024 13:50:20 +0200 Subject: [PATCH 001/264] Release 3.20.0-a.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d57bc066f88..e5698463a44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "saleor-dashboard", - "version": "3.20.0-dev", + "version": "3.20.0-a.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "saleor-dashboard", - "version": "3.20.0-dev", + "version": "3.20.0-a.0", "license": "BSD-3-Clause", "dependencies": { "@apollo/client": "3.4.17", diff --git a/package.json b/package.json index 32e3bad863b..e9e6013d99e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "3.20.0-dev", + "version": "3.20.0-a.0", "main": "src/index.tsx", "repository": { "type": "git", From 4a97eaeeabcaf798758bd6bd7effc42b5745fce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Fri, 12 Jul 2024 09:29:54 +0200 Subject: [PATCH 002/264] Update schema --- introspection.json | 189 +++++++++++++++++++++++++++++++++++++++------ schema.graphql | 122 ++++++++++++++++++++++------- 2 files changed, 262 insertions(+), 49 deletions(-) diff --git a/introspection.json b/introspection.json index 98e13d0eb03..ff80ce855f0 100644 --- a/introspection.json +++ b/introspection.json @@ -13,7 +13,7 @@ { "kind": "OBJECT", "name": "AccountAddressCreate", - "description": "Create a new address for the customer. \n\nRequires one of the following permissions: AUTHENTICATED_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- ADDRESS_CREATED (async): An address was created.", + "description": "Create a new address for the customer.\n\nRequires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- ADDRESS_CREATED (async): An address was created.", "fields": [ { "name": "accountErrors", @@ -1307,6 +1307,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "LOGIN_ATTEMPT_DELAYED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MISSING_CHANNEL_SLUG", "description": null, @@ -1378,6 +1384,12 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "UNKNOWN_IP_ADDRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -1937,7 +1949,7 @@ { "kind": "OBJECT", "name": "AccountUpdate", - "description": "Updates the account of the logged-in user. \n\nRequires one of the following permissions: AUTHENTICATED_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.", + "description": "Updates the account of the logged-in user.\n\nRequires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.", "fields": [ { "name": "accountErrors", @@ -2865,6 +2877,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "skipValidation", + "description": "Determine if the address should be validated. By default, Saleor accepts only address inputs matching ruleset from [Google Address Data]{https://chromium-i18n.appspot.com/ssl-address), using [i18naddress](https://github.com/mirumee/google-i18n-address) library. Some mutations may require additional permissions to use the the field. More info about permissions can be found in relevant mutation.\n\nAdded in Saleor 3.19.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "streetAddress1", "description": "Address.", @@ -18364,7 +18388,7 @@ }, { "name": "totalPrice", - "description": "The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included.\n\nTriggers the following webhook events:\n- CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.", + "description": "The sum of the checkout line prices, with all the taxes,shipping costs, and discounts included.\n\nTriggers the following webhook events:\n- CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired.", "args": [], "type": { "kind": "NON_NULL", @@ -18940,7 +18964,7 @@ { "kind": "OBJECT", "name": "CheckoutCreate", - "description": "Create a new checkout.\n\nTriggers the following webhook events:\n- CHECKOUT_CREATED (async): A checkout was created.", + "description": "Create a new checkout.\n\n`skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.\n\nTriggers the following webhook events:\n- CHECKOUT_CREATED (async): A checkout was created.", "fields": [ { "name": "checkout", @@ -19309,7 +19333,7 @@ "inputFields": [ { "name": "billingAddress", - "description": "Billing address of the customer.", + "description": "Billing address of the customer. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.", "type": { "kind": "INPUT_OBJECT", "name": "AddressInput", @@ -19381,7 +19405,7 @@ }, { "name": "shippingAddress", - "description": "The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items.", + "description": "The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.", "type": { "kind": "INPUT_OBJECT", "name": "AddressInput", @@ -50767,8 +50791,20 @@ "fields": [ { "name": "accountAddressCreate", - "description": "Create a new address for the customer. \n\nRequires one of the following permissions: AUTHENTICATED_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- ADDRESS_CREATED (async): An address was created.", + "description": "Create a new address for the customer.\n\nRequires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- ADDRESS_CREATED (async): An address was created.", "args": [ + { + "name": "customerId", + "description": "ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission.\n\nAdded in Saleor 3.19.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "input", "description": "Fields required to create address.", @@ -51026,8 +51062,20 @@ }, { "name": "accountUpdate", - "description": "Updates the account of the logged-in user. \n\nRequires one of the following permissions: AUTHENTICATED_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.", + "description": "Updates the account of the logged-in user.\n\nRequires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.\n\nTriggers the following webhook events:\n- CUSTOMER_UPDATED (async): A customer account was updated.\n- CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated.", "args": [ + { + "name": "customerId", + "description": "ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission.\n\nAdded in Saleor 3.19.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "input", "description": "Fields required to update the account of the logged-in user.", @@ -53090,7 +53138,7 @@ }, { "name": "checkoutCreate", - "description": "Create a new checkout.\n\nTriggers the following webhook events:\n- CHECKOUT_CREATED (async): A checkout was created.", + "description": "Create a new checkout.\n\n`skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions.\n\nTriggers the following webhook events:\n- CHECKOUT_CREATED (async): A checkout was created.", "args": [ { "name": "input", @@ -73986,6 +74034,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isPriceOverridden", + "description": "Returns True, if the line unit price was overridden.\n\nAdded in Saleor 3.14.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "isShippingRequired", "description": "Whether the product variant requires shipping.", @@ -82228,6 +82288,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CHECKOUT_COMPLETION_IN_PROGRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "CHECKOUT_EMAIL_NOT_SET", "description": null, @@ -100652,11 +100718,15 @@ }, { "name": "type", - "description": "Defines the promotion type. Implicate the required promotion rules predicate type and whether the promotion rules will give the catalogue or order discount. \n\nThe default value is `Catalogue`.\n\nThis field will be required from Saleor 3.20.\n\nAdded in Saleor 3.19.", + "description": "Defines the promotion type. Implicate the required promotion rules predicate type and whether the promotion rules will give the catalogue or order discount. \n\nAdded in Saleor 3.19.", "type": { - "kind": "ENUM", - "name": "PromotionTypeEnum", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PromotionTypeEnum", + "ofType": null + } }, "defaultValue": null, "isDeprecated": false, @@ -105355,7 +105425,7 @@ }, { "name": "checkout", - "description": "Look up a checkout by id.\n\nRequires one of the following permissions to query checkouts that belong to other users: MANAGE_CHECKOUTS, IMPERSONATE_USER. ", + "description": "Look up a checkout by id.\n\nRequires one of the following permissions to query a checkout, if a checkout is in inactive channel: MANAGE_CHECKOUTS, IMPERSONATE_USER, HANDLE_PAYMENTS. ", "args": [ { "name": "id", @@ -105453,7 +105523,7 @@ }, { "name": "checkouts", - "description": "List of checkouts.\n\nRequires one of the following permissions: MANAGE_CHECKOUTS.", + "description": "List of checkouts.\n\nRequires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS.", "args": [ { "name": "after", @@ -105708,7 +105778,7 @@ }, { "name": "customers", - "description": "List of the shop's customers.\n\nRequires one of the following permissions: MANAGE_ORDERS, MANAGE_USERS.", + "description": "List of the shop's customers. This list includes all users who registered through the accountRegister mutation. Additionally, staff users who have placed an order using their account will also appear in this list.\n\nRequires one of the following permissions: MANAGE_ORDERS, MANAGE_USERS.", "args": [ { "name": "after", @@ -106694,7 +106764,7 @@ "args": [ { "name": "externalReference", - "description": "External ID of an order. \n\nAdded in Saleor 3.10.", + "description": "External ID of an order. \n\nAdded in Saleor 3.10..\n\nRequires one of the following permissions: MANAGE_ORDERS.", "type": { "kind": "SCALAR", "name": "String", @@ -108542,7 +108612,7 @@ "args": [ { "name": "id", - "description": "ID of an warehouse", + "description": "ID of a stock", "type": { "kind": "NON_NULL", "name": null, @@ -124222,7 +124292,7 @@ }, { "name": "shippingPrice", - "description": "The price of shipping method.", + "description": "The price of shipping method, includes shipping voucher discount if applied.", "args": [], "type": { "kind": "NON_NULL", @@ -124380,7 +124450,7 @@ }, { "name": "totalPrice", - "description": "Price of the order line.", + "description": "Price of the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount.", "args": [], "type": { "kind": "NON_NULL", @@ -124396,7 +124466,7 @@ }, { "name": "unitPrice", - "description": "Price of the single item in the order line.", + "description": "Price of the single item in the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount.", "args": [], "type": { "kind": "NON_NULL", @@ -126219,6 +126289,12 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "CHECKOUT_COMPLETION_IN_PROGRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GRAPHQL_ERROR", "description": null, @@ -127286,6 +127362,12 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "CHECKOUT_COMPLETION_IN_PROGRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GRAPHQL_ERROR", "description": null, @@ -135056,6 +135138,67 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "stocks", + "description": "Stocks that belong to this warehouse.\n\nAdded in Saleor 3.20.\n\nRequires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.", + "args": [ + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StockCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -136768,7 +136911,7 @@ }, { "name": "customHeaders", - "description": "Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only \"X-*\" and \"Authorization*\" keys are allowed.\n\nAdded in Saleor 3.12.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "description": "Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed.\n\nAdded in Saleor 3.12.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", "type": { "kind": "SCALAR", "name": "JSONString", @@ -140530,7 +140673,7 @@ }, { "name": "customHeaders", - "description": "Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only \"X-*\" and \"Authorization*\" keys are allowed.\n\nAdded in Saleor 3.12.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "description": "Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed.\n\nAdded in Saleor 3.12.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", "type": { "kind": "SCALAR", "name": "JSONString", diff --git a/schema.graphql b/schema.graphql index 1644d256c5f..15c8b2ec58d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -14,9 +14,9 @@ directive @webhookEventsInfo( ) on FIELD | FIELD_DEFINITION | INPUT_OBJECT | OBJECT """ -Create a new address for the customer. +Create a new address for the customer. -Requires one of the following permissions: AUTHENTICATED_USER. +Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER. Triggers the following webhook events: - CUSTOMER_UPDATED (async): A customer account was updated. @@ -326,6 +326,7 @@ enum AccountErrorCode { JWT_MISSING_TOKEN JWT_SIGNATURE_EXPIRED LEFT_NOT_MANAGEABLE_PERMISSION + LOGIN_ATTEMPT_DELAYED MISSING_CHANNEL_SLUG NOT_FOUND OUT_OF_SCOPE_GROUP @@ -338,6 +339,7 @@ enum AccountErrorCode { PASSWORD_TOO_SIMILAR REQUIRED UNIQUE + UNKNOWN_IP_ADDRESS } """Fields required to update the user.""" @@ -478,9 +480,9 @@ type AccountSetPasswordRequested implements Event { } """ -Updates the account of the logged-in user. +Updates the account of the logged-in user. -Requires one of the following permissions: AUTHENTICATED_USER. +Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER. Triggers the following webhook events: - CUSTOMER_UPDATED (async): A customer account was updated. @@ -700,6 +702,15 @@ input AddressInput { """Postal code.""" postalCode: String + """ + Determine if the address should be validated. By default, Saleor accepts only address inputs matching ruleset from [Google Address Data]{https://chromium-i18n.appspot.com/ssl-address), using [i18naddress](https://github.com/mirumee/google-i18n-address) library. Some mutations may require additional permissions to use the the field. More info about permissions can be found in relevant mutation. + + Added in Saleor 3.19. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + skipValidation: Boolean = false + """Address.""" streetAddress1: String @@ -4708,7 +4719,7 @@ type Checkout implements Node & ObjectWithMetadata { totalBalance: Money! """ - The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. + The sum of the checkout line prices, with all the taxes,shipping costs, and discounts included. Triggers the following webhook events: - CHECKOUT_CALCULATE_TAXES (sync): Optionally triggered when checkout prices are expired. @@ -4894,6 +4905,8 @@ type CheckoutCountableEdge { """ Create a new checkout. +`skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions. + Triggers the following webhook events: - CHECKOUT_CREATED (async): A checkout was created. """ @@ -4971,7 +4984,9 @@ enum CheckoutCreateFromOrderUnavailableVariantErrorCode { } input CheckoutCreateInput { - """Billing address of the customer.""" + """ + Billing address of the customer. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions. + """ billingAddress: AddressInput """Slug of a channel in which to create a checkout.""" @@ -4989,7 +5004,7 @@ input CheckoutCreateInput { lines: [CheckoutLineInput!]! """ - The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. + The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. `skipValidation` requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions. """ shippingAddress: AddressInput @@ -11773,15 +11788,22 @@ input MoveProductInput { type Mutation { """ - Create a new address for the customer. + Create a new address for the customer. - Requires one of the following permissions: AUTHENTICATED_USER. + Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER. Triggers the following webhook events: - CUSTOMER_UPDATED (async): A customer account was updated. - ADDRESS_CREATED (async): An address was created. """ accountAddressCreate( + """ + ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission. + + Added in Saleor 3.19. + """ + customerId: ID + """Fields required to create address.""" input: AddressInput! @@ -11882,15 +11904,22 @@ type Mutation { ): AccountSetDefaultAddress """ - Updates the account of the logged-in user. + Updates the account of the logged-in user. - Requires one of the following permissions: AUTHENTICATED_USER. + Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER. Triggers the following webhook events: - CUSTOMER_UPDATED (async): A customer account was updated. - CUSTOMER_METADATA_UPDATED (async): Optionally called when customer's metadata was updated. """ accountUpdate( + """ + ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission. + + Added in Saleor 3.19. + """ + customerId: ID + """Fields required to update the account of the logged-in user.""" input: AccountInput! ): AccountUpdate @@ -12673,6 +12702,8 @@ type Mutation { """ Create a new checkout. + `skipValidation` field requires HANDLE_CHECKOUTS and AUTHENTICATED_APP permissions. + Triggers the following webhook events: - CHECKOUT_CREATED (async): A checkout was created. """ @@ -18895,6 +18926,13 @@ type OrderLine implements Node & ObjectWithMetadata { """ isGift: Boolean + """ + Returns True, if the line unit price was overridden. + + Added in Saleor 3.14. + """ + isPriceOverridden: Boolean + """Whether the product variant requires shipping.""" isShippingRequired: Boolean! @@ -20903,6 +20941,7 @@ enum PaymentErrorCode { BALANCE_CHECK_ERROR BILLING_ADDRESS_NOT_SET CHANNEL_INACTIVE + CHECKOUT_COMPLETION_IN_PROGRESS CHECKOUT_EMAIL_NOT_SET GRAPHQL_ERROR INVALID @@ -25382,13 +25421,9 @@ input PromotionCreateInput { """ Defines the promotion type. Implicate the required promotion rules predicate type and whether the promotion rules will give the catalogue or order discount. - The default value is `Catalogue`. - - This field will be required from Saleor 3.20. - Added in Saleor 3.19. """ - type: PromotionTypeEnum + type: PromotionTypeEnum! } """ @@ -26784,7 +26819,7 @@ type Query { """ Look up a checkout by id. - Requires one of the following permissions to query checkouts that belong to other users: MANAGE_CHECKOUTS, IMPERSONATE_USER. + Requires one of the following permissions to query a checkout, if a checkout is in inactive channel: MANAGE_CHECKOUTS, IMPERSONATE_USER, HANDLE_PAYMENTS. """ checkout( """ @@ -26828,7 +26863,7 @@ type Query { """ List of checkouts. - Requires one of the following permissions: MANAGE_CHECKOUTS. + Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS. """ checkouts( """Return the elements in the list that come after the specified cursor.""" @@ -26919,7 +26954,7 @@ type Query { ): CollectionCountableConnection """ - List of the shop's customers. + List of the shop's customers. This list includes all users who registered through the accountRegister mutation. Additionally, staff users who have placed an order using their account will also appear in this list. Requires one of the following permissions: MANAGE_ORDERS, MANAGE_USERS. """ @@ -27263,7 +27298,9 @@ type Query { """ External ID of an order. - Added in Saleor 3.10. + Added in Saleor 3.10.. + + Requires one of the following permissions: MANAGE_ORDERS. """ externalReference: String @@ -27877,7 +27914,7 @@ type Query { Requires one of the following permissions: MANAGE_PRODUCTS. """ stock( - """ID of an warehouse""" + """ID of a stock""" id: ID! ): Stock @@ -31765,7 +31802,9 @@ type TaxableObject { """Determines if prices contain entered tax..""" pricesEnteredWithTax: Boolean! - """The price of shipping method.""" + """ + The price of shipping method, includes shipping voucher discount if applied. + """ shippingPrice: Money! """The source object related to this tax object.""" @@ -31797,10 +31836,14 @@ type TaxableObjectLine { """The source line related to this tax line.""" sourceLine: TaxSourceLine! - """Price of the order line.""" + """ + Price of the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount. + """ totalPrice: Money! - """Price of the single item in the order line.""" + """ + Price of the single item in the order line. The price includes catalogue promotions, specific product and applied once per order voucher discounts. The price does not include the entire order discount. + """ unitPrice: Money! """The variant name.""" @@ -32351,6 +32394,7 @@ type TransactionInitializeError { """An enumeration.""" enum TransactionInitializeErrorCode { + CHECKOUT_COMPLETION_IN_PROGRESS GRAPHQL_ERROR INVALID NOT_FOUND @@ -32651,6 +32695,7 @@ type TransactionProcessError { """An enumeration.""" enum TransactionProcessErrorCode { + CHECKOUT_COMPLETION_IN_PROGRESS GRAPHQL_ERROR INVALID MISSING_PAYMENT_APP @@ -34550,6 +34595,31 @@ type Warehouse implements Node & ObjectWithMetadata { """Warehouse slug.""" slug: String! + + """ + Stocks that belong to this warehouse. + + Added in Saleor 3.20. + + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. + """ + stocks( + """Return the elements in the list that come after the specified cursor.""" + after: String + + """Return the elements in the list that come before the specified cursor.""" + before: String + + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ + first: Int + + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ + last: Int + ): StockCountableConnection } """An enumeration.""" @@ -34918,7 +34988,7 @@ input WebhookCreateInput { asyncEvents: [WebhookEventTypeAsyncEnum!] """ - Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only "X-*" and "Authorization*" keys are allowed. + Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed. Added in Saleor 3.12. @@ -36529,7 +36599,7 @@ input WebhookUpdateInput { asyncEvents: [WebhookEventTypeAsyncEnum!] """ - Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only "X-*" and "Authorization*" keys are allowed. + Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only `X-*`, `Authorization*`, and `BrokerProperties` keys are allowed. Added in Saleor 3.12. From 91070c2279d4298b68c5027a126792bc5e1e58b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:51:15 +0200 Subject: [PATCH 003/264] Release 3.20 (#5039) Co-authored-by: github-actions[bot] --- .changeset/angry-jeans-battle.md | 5 - .changeset/angry-lemons-wave.md | 5 - .changeset/beige-ducks-matter.md | 5 - .changeset/beige-moose-greet.md | 5 - .changeset/big-beds-bathe.md | 5 - .changeset/bright-ants-obey.md | 5 - .changeset/bright-phones-agree.md | 5 - .changeset/bright-tips-hang.md | 5 - .changeset/brown-mayflies-check.md | 5 - .changeset/calm-mice-stare.md | 5 - .changeset/chatty-forks-vanish.md | 5 - .changeset/cold-grapes-compete.md | 5 - .changeset/cold-wasps-repeat.md | 5 - .changeset/cold-waves-joke.md | 5 - .changeset/cool-beers-rule.md | 5 - .changeset/cool-doors-drum.md | 5 - .changeset/cool-lizards-compete.md | 5 - .changeset/dirty-adults-rush.md | 5 - .changeset/dry-geckos-laugh.md | 5 - .changeset/dry-tigers-worry.md | 5 - .changeset/dull-jobs-sneeze.md | 5 - .changeset/early-vans-relate.md | 5 - .changeset/eight-pillows-fly.md | 5 - .changeset/eighty-insects-repeat.md | 5 - .changeset/eighty-years-exercise.md | 5 - .changeset/fair-brooms-drop.md | 5 - .changeset/famous-bikes-check.md | 5 - .changeset/famous-grapes-stare.md | 5 - .changeset/famous-pigs-camp.md | 5 - .changeset/few-crabs-guess.md | 5 - .changeset/few-pots-relate.md | 5 - .changeset/fifty-gifts-join.md | 5 - .changeset/fluffy-dryers-learn.md | 5 - .changeset/forty-lobsters-give.md | 5 - .changeset/four-humans-reply.md | 5 - .changeset/friendly-bats-wonder.md | 5 - .changeset/funny-moles-design.md | 5 - .changeset/gentle-mice-move.md | 5 - .changeset/giant-dancers-raise.md | 5 - .changeset/giant-students-pull.md | 5 - .changeset/gold-masks-explain.md | 5 - .changeset/good-crabs-repair.md | 5 - .changeset/great-bottles-retire.md | 5 - .changeset/green-starfishes-raise.md | 5 - .changeset/grumpy-laws-leave.md | 5 - .changeset/itchy-queens-sit.md | 6 - .changeset/khaki-shrimps-play.md | 5 - .changeset/kind-dolphins-dance.md | 5 - .changeset/lemon-bats-repeat.md | 5 - .changeset/little-seals-happen.md | 5 - .changeset/little-singers-brake.md | 5 - .changeset/long-countries-kneel.md | 5 - .changeset/long-keys-compare.md | 5 - .changeset/loud-rice-hug.md | 6 - .changeset/lovely-deers-cross.md | 5 - .changeset/lovely-hairs-smell.md | 5 - .changeset/lucky-cameras-taste.md | 5 - .changeset/many-deers-brush.md | 5 - .changeset/many-vans-itch.md | 5 - .changeset/many-years-care.md | 5 - .changeset/mean-lizards-explode.md | 5 - .changeset/mean-phones-hide.md | 5 - .changeset/metal-chicken-build.md | 5 - .changeset/metal-vans-begin.md | 5 - .changeset/nasty-chefs-applaud.md | 5 - .changeset/neat-shoes-approve.md | 5 - .changeset/nervous-ducks-fix.md | 5 - .changeset/nervous-toes-fail.md | 5 - .changeset/nervous-weeks-nail.md | 5 - .changeset/new-ants-shop.md | 5 - .changeset/nice-emus-grin.md | 5 - .changeset/nice-pets-hide.md | 5 - .changeset/old-pianos-hope.md | 5 - .changeset/old-planes-trade.md | 5 - .changeset/olive-files-perform.md | 5 - .changeset/olive-games-rush.md | 5 - .changeset/orange-bulldogs-smoke.md | 5 - .changeset/orange-buses-scream.md | 5 - .changeset/perfect-crews-speak.md | 5 - .changeset/perfect-ears-drive.md | 5 - .changeset/perfect-geckos-occur.md | 5 - .changeset/plenty-walls-prove.md | 5 - .changeset/pretty-pets-doubt.md | 5 - .changeset/purple-beans-deliver.md | 5 - .changeset/purple-dancers-confess.md | 5 - .changeset/rare-seas-pull.md | 5 - .changeset/real-brooms-attack.md | 5 - .changeset/red-guests-perform.md | 5 - .changeset/red-hornets-impress.md | 5 - .changeset/rich-apes-buy.md | 5 - .changeset/rotten-garlics-perform.md | 5 - .changeset/selfish-walls-sit.md | 5 - .changeset/serious-beans-try.md | 6 - .changeset/serious-books-wave.md | 5 - .changeset/serious-pandas-jam.md | 5 - .changeset/sharp-cobras-obey.md | 5 - .changeset/sharp-gorillas-cheat.md | 5 - .changeset/sharp-planets-jam.md | 5 - .changeset/sharp-tables-peel.md | 5 - .changeset/short-garlics-brush.md | 5 - .changeset/shy-dodos-exist.md | 5 - .changeset/shy-jars-flow.md | 5 - .changeset/shy-spoons-explain.md | 5 - .changeset/silver-donuts-crash.md | 5 - .changeset/six-hairs-cover.md | 5 - .changeset/sixty-colts-cough.md | 11 -- .changeset/sixty-kangaroos-cheer.md | 5 - .changeset/slow-lemons-care.md | 5 - .changeset/smooth-frogs-play.md | 5 - .changeset/sour-rings-occur.md | 5 - .changeset/spotty-spies-film.md | 5 - .changeset/stale-students-unite.md | 5 - .changeset/stale-tigers-brush.md | 5 - .changeset/strange-stingrays-shave.md | 5 - .changeset/stupid-seahorses-fix.md | 5 - .changeset/sweet-baboons-beg.md | 5 - .changeset/sweet-buttons-visit.md | 5 - .changeset/swift-pandas-guess.md | 5 - .changeset/tall-dodos-sit.md | 5 - .changeset/tame-foxes-breathe.md | 5 - .changeset/tame-jars-add.md | 5 - .changeset/tasty-meals-grin.md | 5 - .changeset/tasty-ties-listen.md | 5 - .changeset/ten-students-sneeze.md | 5 - .changeset/thick-moons-whisper.md | 5 - .changeset/thick-tools-flash.md | 5 - .changeset/thin-timers-grin.md | 5 - .changeset/tiny-hairs-wink.md | 5 - .changeset/tricky-radios-sin.md | 5 - .changeset/tricky-spies-study.md | 5 - .changeset/twelve-kids-pretend.md | 5 - .changeset/twenty-seals-yawn.md | 5 - .changeset/unable-to-build-docker-image .md | 5 - .changeset/warm-balloons-call.md | 5 - .changeset/warm-taxis-mate.md | 5 - .changeset/weak-steaks-dream.md | 5 - .changeset/wet-badgers-switch.md | 5 - .changeset/wicked-forks-agree.md | 5 - .changeset/wild-stingrays-walk.md | 5 - .changeset/wise-pants-repeat.md | 6 - .changeset/yellow-keys-admire.md | 5 - .changeset/young-fishes-applaud.md | 5 - CHANGELOG.md | 160 ++++++++++++++++++++ package.json | 2 +- 144 files changed, 161 insertions(+), 721 deletions(-) delete mode 100644 .changeset/angry-jeans-battle.md delete mode 100644 .changeset/angry-lemons-wave.md delete mode 100644 .changeset/beige-ducks-matter.md delete mode 100644 .changeset/beige-moose-greet.md delete mode 100644 .changeset/big-beds-bathe.md delete mode 100644 .changeset/bright-ants-obey.md delete mode 100644 .changeset/bright-phones-agree.md delete mode 100644 .changeset/bright-tips-hang.md delete mode 100644 .changeset/brown-mayflies-check.md delete mode 100644 .changeset/calm-mice-stare.md delete mode 100644 .changeset/chatty-forks-vanish.md delete mode 100644 .changeset/cold-grapes-compete.md delete mode 100644 .changeset/cold-wasps-repeat.md delete mode 100644 .changeset/cold-waves-joke.md delete mode 100644 .changeset/cool-beers-rule.md delete mode 100644 .changeset/cool-doors-drum.md delete mode 100644 .changeset/cool-lizards-compete.md delete mode 100644 .changeset/dirty-adults-rush.md delete mode 100644 .changeset/dry-geckos-laugh.md delete mode 100644 .changeset/dry-tigers-worry.md delete mode 100644 .changeset/dull-jobs-sneeze.md delete mode 100644 .changeset/early-vans-relate.md delete mode 100644 .changeset/eight-pillows-fly.md delete mode 100644 .changeset/eighty-insects-repeat.md delete mode 100644 .changeset/eighty-years-exercise.md delete mode 100644 .changeset/fair-brooms-drop.md delete mode 100644 .changeset/famous-bikes-check.md delete mode 100644 .changeset/famous-grapes-stare.md delete mode 100644 .changeset/famous-pigs-camp.md delete mode 100644 .changeset/few-crabs-guess.md delete mode 100644 .changeset/few-pots-relate.md delete mode 100644 .changeset/fifty-gifts-join.md delete mode 100644 .changeset/fluffy-dryers-learn.md delete mode 100644 .changeset/forty-lobsters-give.md delete mode 100644 .changeset/four-humans-reply.md delete mode 100644 .changeset/friendly-bats-wonder.md delete mode 100644 .changeset/funny-moles-design.md delete mode 100644 .changeset/gentle-mice-move.md delete mode 100644 .changeset/giant-dancers-raise.md delete mode 100644 .changeset/giant-students-pull.md delete mode 100644 .changeset/gold-masks-explain.md delete mode 100644 .changeset/good-crabs-repair.md delete mode 100644 .changeset/great-bottles-retire.md delete mode 100644 .changeset/green-starfishes-raise.md delete mode 100644 .changeset/grumpy-laws-leave.md delete mode 100644 .changeset/itchy-queens-sit.md delete mode 100644 .changeset/khaki-shrimps-play.md delete mode 100644 .changeset/kind-dolphins-dance.md delete mode 100644 .changeset/lemon-bats-repeat.md delete mode 100644 .changeset/little-seals-happen.md delete mode 100644 .changeset/little-singers-brake.md delete mode 100644 .changeset/long-countries-kneel.md delete mode 100644 .changeset/long-keys-compare.md delete mode 100644 .changeset/loud-rice-hug.md delete mode 100644 .changeset/lovely-deers-cross.md delete mode 100644 .changeset/lovely-hairs-smell.md delete mode 100644 .changeset/lucky-cameras-taste.md delete mode 100644 .changeset/many-deers-brush.md delete mode 100644 .changeset/many-vans-itch.md delete mode 100644 .changeset/many-years-care.md delete mode 100644 .changeset/mean-lizards-explode.md delete mode 100644 .changeset/mean-phones-hide.md delete mode 100644 .changeset/metal-chicken-build.md delete mode 100644 .changeset/metal-vans-begin.md delete mode 100644 .changeset/nasty-chefs-applaud.md delete mode 100644 .changeset/neat-shoes-approve.md delete mode 100644 .changeset/nervous-ducks-fix.md delete mode 100644 .changeset/nervous-toes-fail.md delete mode 100644 .changeset/nervous-weeks-nail.md delete mode 100644 .changeset/new-ants-shop.md delete mode 100644 .changeset/nice-emus-grin.md delete mode 100644 .changeset/nice-pets-hide.md delete mode 100644 .changeset/old-pianos-hope.md delete mode 100644 .changeset/old-planes-trade.md delete mode 100644 .changeset/olive-files-perform.md delete mode 100644 .changeset/olive-games-rush.md delete mode 100644 .changeset/orange-bulldogs-smoke.md delete mode 100644 .changeset/orange-buses-scream.md delete mode 100644 .changeset/perfect-crews-speak.md delete mode 100644 .changeset/perfect-ears-drive.md delete mode 100644 .changeset/perfect-geckos-occur.md delete mode 100644 .changeset/plenty-walls-prove.md delete mode 100644 .changeset/pretty-pets-doubt.md delete mode 100644 .changeset/purple-beans-deliver.md delete mode 100644 .changeset/purple-dancers-confess.md delete mode 100644 .changeset/rare-seas-pull.md delete mode 100644 .changeset/real-brooms-attack.md delete mode 100644 .changeset/red-guests-perform.md delete mode 100644 .changeset/red-hornets-impress.md delete mode 100644 .changeset/rich-apes-buy.md delete mode 100644 .changeset/rotten-garlics-perform.md delete mode 100644 .changeset/selfish-walls-sit.md delete mode 100644 .changeset/serious-beans-try.md delete mode 100644 .changeset/serious-books-wave.md delete mode 100644 .changeset/serious-pandas-jam.md delete mode 100644 .changeset/sharp-cobras-obey.md delete mode 100644 .changeset/sharp-gorillas-cheat.md delete mode 100644 .changeset/sharp-planets-jam.md delete mode 100644 .changeset/sharp-tables-peel.md delete mode 100644 .changeset/short-garlics-brush.md delete mode 100644 .changeset/shy-dodos-exist.md delete mode 100644 .changeset/shy-jars-flow.md delete mode 100644 .changeset/shy-spoons-explain.md delete mode 100644 .changeset/silver-donuts-crash.md delete mode 100644 .changeset/six-hairs-cover.md delete mode 100644 .changeset/sixty-colts-cough.md delete mode 100644 .changeset/sixty-kangaroos-cheer.md delete mode 100644 .changeset/slow-lemons-care.md delete mode 100644 .changeset/smooth-frogs-play.md delete mode 100644 .changeset/sour-rings-occur.md delete mode 100644 .changeset/spotty-spies-film.md delete mode 100644 .changeset/stale-students-unite.md delete mode 100644 .changeset/stale-tigers-brush.md delete mode 100644 .changeset/strange-stingrays-shave.md delete mode 100644 .changeset/stupid-seahorses-fix.md delete mode 100644 .changeset/sweet-baboons-beg.md delete mode 100644 .changeset/sweet-buttons-visit.md delete mode 100644 .changeset/swift-pandas-guess.md delete mode 100644 .changeset/tall-dodos-sit.md delete mode 100644 .changeset/tame-foxes-breathe.md delete mode 100644 .changeset/tame-jars-add.md delete mode 100644 .changeset/tasty-meals-grin.md delete mode 100644 .changeset/tasty-ties-listen.md delete mode 100644 .changeset/ten-students-sneeze.md delete mode 100644 .changeset/thick-moons-whisper.md delete mode 100644 .changeset/thick-tools-flash.md delete mode 100644 .changeset/thin-timers-grin.md delete mode 100644 .changeset/tiny-hairs-wink.md delete mode 100644 .changeset/tricky-radios-sin.md delete mode 100644 .changeset/tricky-spies-study.md delete mode 100644 .changeset/twelve-kids-pretend.md delete mode 100644 .changeset/twenty-seals-yawn.md delete mode 100644 .changeset/unable-to-build-docker-image .md delete mode 100644 .changeset/warm-balloons-call.md delete mode 100644 .changeset/warm-taxis-mate.md delete mode 100644 .changeset/weak-steaks-dream.md delete mode 100644 .changeset/wet-badgers-switch.md delete mode 100644 .changeset/wicked-forks-agree.md delete mode 100644 .changeset/wild-stingrays-walk.md delete mode 100644 .changeset/wise-pants-repeat.md delete mode 100644 .changeset/yellow-keys-admire.md delete mode 100644 .changeset/young-fishes-applaud.md diff --git a/.changeset/angry-jeans-battle.md b/.changeset/angry-jeans-battle.md deleted file mode 100644 index 438fbf6dfe9..00000000000 --- a/.changeset/angry-jeans-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -E2E Fixing flaky navigation tests diff --git a/.changeset/angry-lemons-wave.md b/.changeset/angry-lemons-wave.md deleted file mode 100644 index 063124e826d..00000000000 --- a/.changeset/angry-lemons-wave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding CodeInspector plugin diff --git a/.changeset/beige-ducks-matter.md b/.changeset/beige-ducks-matter.md deleted file mode 100644 index 628409d8377..00000000000 --- a/.changeset/beige-ducks-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now you can see columns and their ordering that you previously selected when swtich betetween listing pages. diff --git a/.changeset/beige-moose-greet.md b/.changeset/beige-moose-greet.md deleted file mode 100644 index 0c96fc86c31..00000000000 --- a/.changeset/beige-moose-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Product edition no longer change the others work when changing different fields simultaneously. This means UI sends only form fields that were changed. diff --git a/.changeset/big-beds-bathe.md b/.changeset/big-beds-bathe.md deleted file mode 100644 index 93157702d09..00000000000 --- a/.changeset/big-beds-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The legacy multiselect are not longer present within the codebase. this means you should use the ones from new macaw when developing the UI diff --git a/.changeset/bright-ants-obey.md b/.changeset/bright-ants-obey.md deleted file mode 100644 index 2a4bc75b2e5..00000000000 --- a/.changeset/bright-ants-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Login via API in order to setup playwright tests is working in serial mode diff --git a/.changeset/bright-phones-agree.md b/.changeset/bright-phones-agree.md deleted file mode 100644 index 3ac4b282dc5..00000000000 --- a/.changeset/bright-phones-agree.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Add tests for thirdparty apps diff --git a/.changeset/bright-tips-hang.md b/.changeset/bright-tips-hang.md deleted file mode 100644 index e108c53cc01..00000000000 --- a/.changeset/bright-tips-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Swap new refund with with old one when feature flag toggle diff --git a/.changeset/brown-mayflies-check.md b/.changeset/brown-mayflies-check.md deleted file mode 100644 index f22d8a52943..00000000000 --- a/.changeset/brown-mayflies-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -E2E tests for customer CRUD diff --git a/.changeset/calm-mice-stare.md b/.changeset/calm-mice-stare.md deleted file mode 100644 index 0dd0620c692..00000000000 --- a/.changeset/calm-mice-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Manual transaction modal has now improved design that matches other modals. diff --git a/.changeset/chatty-forks-vanish.md b/.changeset/chatty-forks-vanish.md deleted file mode 100644 index 085e28f5896..00000000000 --- a/.changeset/chatty-forks-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now see Marketplace app list on automation deployment. diff --git a/.changeset/cold-grapes-compete.md b/.changeset/cold-grapes-compete.md deleted file mode 100644 index b6306983ea7..00000000000 --- a/.changeset/cold-grapes-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding e2e tests for promotion CRUD diff --git a/.changeset/cold-wasps-repeat.md b/.changeset/cold-wasps-repeat.md deleted file mode 100644 index 0900a7c4473..00000000000 --- a/.changeset/cold-wasps-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now selected columns on the product list are being saved when browsing order details. diff --git a/.changeset/cold-waves-joke.md b/.changeset/cold-waves-joke.md deleted file mode 100644 index 1c0c84500de..00000000000 --- a/.changeset/cold-waves-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Migrate dashboard to new font tokens diff --git a/.changeset/cool-beers-rule.md b/.changeset/cool-beers-rule.md deleted file mode 100644 index 4fd1cb2e050..00000000000 --- a/.changeset/cool-beers-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fix flaky test - TC: SALEOR_3 Create basic product with variant diff --git a/.changeset/cool-doors-drum.md b/.changeset/cool-doors-drum.md deleted file mode 100644 index 53dd3178b9d..00000000000 --- a/.changeset/cool-doors-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now run e2e tests without flakiness diff --git a/.changeset/cool-lizards-compete.md b/.changeset/cool-lizards-compete.md deleted file mode 100644 index f5a15f09d72..00000000000 --- a/.changeset/cool-lizards-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Replace back icon with cloud one in sidebar return to cloud link, update copy to just Saleor Cloud diff --git a/.changeset/dirty-adults-rush.md b/.changeset/dirty-adults-rush.md deleted file mode 100644 index 0d31e5442d8..00000000000 --- a/.changeset/dirty-adults-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix building docker image after move service worker to assets dir diff --git a/.changeset/dry-geckos-laugh.md b/.changeset/dry-geckos-laugh.md deleted file mode 100644 index ed41cc18c11..00000000000 --- a/.changeset/dry-geckos-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now, the developer can access sidebar components on each page directly. diff --git a/.changeset/dry-tigers-worry.md b/.changeset/dry-tigers-worry.md deleted file mode 100644 index 0e744f169e9..00000000000 --- a/.changeset/dry-tigers-worry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Introduces new refund flow for orders that allow users to refund items base on transactions. Grant refund and send refund is a single flow. User first has to create draft refund and then can transfer funds in one flow. diff --git a/.changeset/dull-jobs-sneeze.md b/.changeset/dull-jobs-sneeze.md deleted file mode 100644 index 5932bd487c3..00000000000 --- a/.changeset/dull-jobs-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -The list of transactions is now placed under the new section called "Transactions" when you visit order details page \ No newline at end of file diff --git a/.changeset/early-vans-relate.md b/.changeset/early-vans-relate.md deleted file mode 100644 index c84b13edc81..00000000000 --- a/.changeset/early-vans-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now run e2e test for a manual refund type diff --git a/.changeset/eight-pillows-fly.md b/.changeset/eight-pillows-fly.md deleted file mode 100644 index 51cf228fbd7..00000000000 --- a/.changeset/eight-pillows-fly.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Order Refund views no longer display duplicated errors or no errors at all when submitting the form. diff --git a/.changeset/eighty-insects-repeat.md b/.changeset/eighty-insects-repeat.md deleted file mode 100644 index da8c4cc11b2..00000000000 --- a/.changeset/eighty-insects-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now run E2E Playwright tests for staff members CRUD diff --git a/.changeset/eighty-years-exercise.md b/.changeset/eighty-years-exercise.md deleted file mode 100644 index 67cc13811cb..00000000000 --- a/.changeset/eighty-years-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now browse listing pages without additional reloadings diff --git a/.changeset/fair-brooms-drop.md b/.changeset/fair-brooms-drop.md deleted file mode 100644 index 1688670bf94..00000000000 --- a/.changeset/fair-brooms-drop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -This change adds a reusable GridTable component for ephemeral data edition. diff --git a/.changeset/famous-bikes-check.md b/.changeset/famous-bikes-check.md deleted file mode 100644 index 7352cf794a8..00000000000 --- a/.changeset/famous-bikes-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can no longer see a duplicated cancel button when canceling the transaction. This means you now can go back to edition by using "back" button and "cancel" to continue your intention diff --git a/.changeset/famous-grapes-stare.md b/.changeset/famous-grapes-stare.md deleted file mode 100644 index 2b546a10ffb..00000000000 --- a/.changeset/famous-grapes-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Remove brackets next to each order status title due to cause confusing for the clients diff --git a/.changeset/famous-pigs-camp.md b/.changeset/famous-pigs-camp.md deleted file mode 100644 index 7e36970c5b0..00000000000 --- a/.changeset/famous-pigs-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fixes a bug where order and gift card details views show incorrect avatar in history component. Notes added by apps will now show app's name and avatar. All events will now use the same date format to improve consistency. diff --git a/.changeset/few-crabs-guess.md b/.changeset/few-crabs-guess.md deleted file mode 100644 index dbddd03b47c..00000000000 --- a/.changeset/few-crabs-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The selected value is no longer filtering the options when using any select list with autocomplete diff --git a/.changeset/few-pots-relate.md b/.changeset/few-pots-relate.md deleted file mode 100644 index 6296b27af66..00000000000 --- a/.changeset/few-pots-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix showing empty tooltip when no content by bumping macaw-ui to newest diff --git a/.changeset/fifty-gifts-join.md b/.changeset/fifty-gifts-join.md deleted file mode 100644 index fd4c1b3b25b..00000000000 --- a/.changeset/fifty-gifts-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding tests for promotion rules CRUD diff --git a/.changeset/fluffy-dryers-learn.md b/.changeset/fluffy-dryers-learn.md deleted file mode 100644 index 3266c7588e9..00000000000 --- a/.changeset/fluffy-dryers-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now create refund with lines even if all lines have been previously refunded. diff --git a/.changeset/forty-lobsters-give.md b/.changeset/forty-lobsters-give.md deleted file mode 100644 index 471a6739c64..00000000000 --- a/.changeset/forty-lobsters-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Dashboard will now allow to set publication date and availability date with time. This change also replaces deprecated date fileds with datetime fields. diff --git a/.changeset/four-humans-reply.md b/.changeset/four-humans-reply.md deleted file mode 100644 index ff579708d67..00000000000 --- a/.changeset/four-humans-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -The API_URI is no longer used across the codebase. API_URI stays in workflows for backward compatibility diff --git a/.changeset/friendly-bats-wonder.md b/.changeset/friendly-bats-wonder.md deleted file mode 100644 index 290ec7b400d..00000000000 --- a/.changeset/friendly-bats-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Always show charge and authorized amount in payment section of order details diff --git a/.changeset/funny-moles-design.md b/.changeset/funny-moles-design.md deleted file mode 100644 index d6e1860bee6..00000000000 --- a/.changeset/funny-moles-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Cypress tests are no longer possible to be executed \ No newline at end of file diff --git a/.changeset/gentle-mice-move.md b/.changeset/gentle-mice-move.md deleted file mode 100644 index 494af1fb81d..00000000000 --- a/.changeset/gentle-mice-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -This change disallows creating refund for orders created in transaction flow channels that have no transactions, as well as orders that have no refundable transactions diff --git a/.changeset/giant-dancers-raise.md b/.changeset/giant-dancers-raise.md deleted file mode 100644 index f875e76f5e4..00000000000 --- a/.changeset/giant-dancers-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Read-only metadata keys and values will now be displayed as regular inputs, making them easier to read and preventing them from looking disabled. diff --git a/.changeset/giant-students-pull.md b/.changeset/giant-students-pull.md deleted file mode 100644 index 532d01b1894..00000000000 --- a/.changeset/giant-students-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Allow to manually override number of shards to use during manual re-runs diff --git a/.changeset/gold-masks-explain.md b/.changeset/gold-masks-explain.md deleted file mode 100644 index 41aa95557a1..00000000000 --- a/.changeset/gold-masks-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Refund add dialog no longer allows proceeding to refund with lines view when all lines have been refunded and manual refund view when user doesn't have payment permissions. diff --git a/.changeset/good-crabs-repair.md b/.changeset/good-crabs-repair.md deleted file mode 100644 index cb1ea20b984..00000000000 --- a/.changeset/good-crabs-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now select created at column in product list diff --git a/.changeset/great-bottles-retire.md b/.changeset/great-bottles-retire.md deleted file mode 100644 index 8c4787b840b..00000000000 --- a/.changeset/great-bottles-retire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Refactoring playwright setup file and moving auth specs diff --git a/.changeset/green-starfishes-raise.md b/.changeset/green-starfishes-raise.md deleted file mode 100644 index 0b8a3806b92..00000000000 --- a/.changeset/green-starfishes-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Transaction titles in order details now include its ordinal number and creation date. This means that all titles now follow the same format. diff --git a/.changeset/grumpy-laws-leave.md b/.changeset/grumpy-laws-leave.md deleted file mode 100644 index d001c7e116f..00000000000 --- a/.changeset/grumpy-laws-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Modal for refund reason now has an improved copy diff --git a/.changeset/itchy-queens-sit.md b/.changeset/itchy-queens-sit.md deleted file mode 100644 index be18c7e3666..00000000000 --- a/.changeset/itchy-queens-sit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix showing empty price when value is zero -Improve showing discount type in order payment details diff --git a/.changeset/khaki-shrimps-play.md b/.changeset/khaki-shrimps-play.md deleted file mode 100644 index 599feaea49d..00000000000 --- a/.changeset/khaki-shrimps-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -App and User avatars in order details now all have the same color. diff --git a/.changeset/kind-dolphins-dance.md b/.changeset/kind-dolphins-dance.md deleted file mode 100644 index bc6dd750f37..00000000000 --- a/.changeset/kind-dolphins-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Grid peersistance implementation diff --git a/.changeset/lemon-bats-repeat.md b/.changeset/lemon-bats-repeat.md deleted file mode 100644 index 109b55eea0b..00000000000 --- a/.changeset/lemon-bats-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now open issue gift card modal without any flickering diff --git a/.changeset/little-seals-happen.md b/.changeset/little-seals-happen.md deleted file mode 100644 index ba4160996ea..00000000000 --- a/.changeset/little-seals-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding prettier for code formatting diff --git a/.changeset/little-singers-brake.md b/.changeset/little-singers-brake.md deleted file mode 100644 index 7bbf5ad411b..00000000000 --- a/.changeset/little-singers-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky tests - TC: SALEOR_32 and TC: SALEOR_33 diff --git a/.changeset/long-countries-kneel.md b/.changeset/long-countries-kneel.md deleted file mode 100644 index 5799179391d..00000000000 --- a/.changeset/long-countries-kneel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Refund with lines view no longer allows creating/editing a refund with amount exceeding charged amount for selected transaction diff --git a/.changeset/long-keys-compare.md b/.changeset/long-keys-compare.md deleted file mode 100644 index e368e85fae5..00000000000 --- a/.changeset/long-keys-compare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Changed trigger to workflow_dispatch and switched from issues to pr as a source of metrics diff --git a/.changeset/loud-rice-hug.md b/.changeset/loud-rice-hug.md deleted file mode 100644 index 20b85f37568..00000000000 --- a/.changeset/loud-rice-hug.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix product list crash when description contains empty object -Improve description by removing html tags and   diff --git a/.changeset/lovely-deers-cross.md b/.changeset/lovely-deers-cross.md deleted file mode 100644 index f1d7c1a2524..00000000000 --- a/.changeset/lovely-deers-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Manipulating timeouts of Playwright tests diff --git a/.changeset/lovely-hairs-smell.md b/.changeset/lovely-hairs-smell.md deleted file mode 100644 index fd636ebcb43..00000000000 --- a/.changeset/lovely-hairs-smell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The boolean attribute has been changed from a toggle to a select. This change helps visualize when the attribute has not been set. diff --git a/.changeset/lucky-cameras-taste.md b/.changeset/lucky-cameras-taste.md deleted file mode 100644 index 0a21be3f862..00000000000 --- a/.changeset/lucky-cameras-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now properly edit permission groups when you have full access diff --git a/.changeset/many-deers-brush.md b/.changeset/many-deers-brush.md deleted file mode 100644 index f8345824c52..00000000000 --- a/.changeset/many-deers-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Warning message on manual refund view is no longer unreadable on dark mode diff --git a/.changeset/many-vans-itch.md b/.changeset/many-vans-itch.md deleted file mode 100644 index 3565732a720..00000000000 --- a/.changeset/many-vans-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Implement refund add modal diff --git a/.changeset/many-years-care.md b/.changeset/many-years-care.md deleted file mode 100644 index 3f31c3187d9..00000000000 --- a/.changeset/many-years-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Refund table now displays user initials on the avatar and full name on hover instead of an email. diff --git a/.changeset/mean-lizards-explode.md b/.changeset/mean-lizards-explode.md deleted file mode 100644 index 4c61b256416..00000000000 --- a/.changeset/mean-lizards-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Product details view will not show product categories with its ancestors. It will make it easier to choose product's category. diff --git a/.changeset/mean-phones-hide.md b/.changeset/mean-phones-hide.md deleted file mode 100644 index a4c459b7e73..00000000000 --- a/.changeset/mean-phones-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Add clarity to order cancel dialog diff --git a/.changeset/metal-chicken-build.md b/.changeset/metal-chicken-build.md deleted file mode 100644 index aa194bdd026..00000000000 --- a/.changeset/metal-chicken-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding e2e tests for permission groups diff --git a/.changeset/metal-vans-begin.md b/.changeset/metal-vans-begin.md deleted file mode 100644 index 2a283fc4d4d..00000000000 --- a/.changeset/metal-vans-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky test - TC: SALEOR_106 Issue gift card with specific customer and expiry date diff --git a/.changeset/nasty-chefs-applaud.md b/.changeset/nasty-chefs-applaud.md deleted file mode 100644 index 273d92bd20e..00000000000 --- a/.changeset/nasty-chefs-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Add product analytics on cloud diff --git a/.changeset/neat-shoes-approve.md b/.changeset/neat-shoes-approve.md deleted file mode 100644 index 8ec5df3c948..00000000000 --- a/.changeset/neat-shoes-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Add playwright tests for edit and remove product types diff --git a/.changeset/nervous-ducks-fix.md b/.changeset/nervous-ducks-fix.md deleted file mode 100644 index d0dd8434419..00000000000 --- a/.changeset/nervous-ducks-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -History component's texts will now have unified colors diff --git a/.changeset/nervous-toes-fail.md b/.changeset/nervous-toes-fail.md deleted file mode 100644 index 1f0d3878f53..00000000000 --- a/.changeset/nervous-toes-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Rewritten tests for setting balance and exporting gift cards diff --git a/.changeset/nervous-weeks-nail.md b/.changeset/nervous-weeks-nail.md deleted file mode 100644 index 2c28738f0c9..00000000000 --- a/.changeset/nervous-weeks-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -E2E Test for adding promotion rules diff --git a/.changeset/new-ants-shop.md b/.changeset/new-ants-shop.md deleted file mode 100644 index dde52d97e65..00000000000 --- a/.changeset/new-ants-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Adding tests for readonly access to Apps diff --git a/.changeset/nice-emus-grin.md b/.changeset/nice-emus-grin.md deleted file mode 100644 index e328b8df0a9..00000000000 --- a/.changeset/nice-emus-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky e2e tests diff --git a/.changeset/nice-pets-hide.md b/.changeset/nice-pets-hide.md deleted file mode 100644 index 01c5adfd69b..00000000000 --- a/.changeset/nice-pets-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Introduce view for manual refund transaction diff --git a/.changeset/old-pianos-hope.md b/.changeset/old-pianos-hope.md deleted file mode 100644 index acf3d6fb235..00000000000 --- a/.changeset/old-pianos-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Flow settings in channel creation will now persist after channel is created diff --git a/.changeset/old-planes-trade.md b/.changeset/old-planes-trade.md deleted file mode 100644 index 2bba8cc3a98..00000000000 --- a/.changeset/old-planes-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -E2E Playwright tests: SALEOR_187, SALEOR_205, SALEOR_59, SALEOR_198, SALEOR_106 are no longer flaky diff --git a/.changeset/olive-files-perform.md b/.changeset/olive-files-perform.md deleted file mode 100644 index 565aa1a6613..00000000000 --- a/.changeset/olive-files-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixes incorrect button label for adding or editing refund reason diff --git a/.changeset/olive-games-rush.md b/.changeset/olive-games-rush.md deleted file mode 100644 index 4fb8d4eaff8..00000000000 --- a/.changeset/olive-games-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing assertions in flaky Playwright tests diff --git a/.changeset/orange-bulldogs-smoke.md b/.changeset/orange-bulldogs-smoke.md deleted file mode 100644 index f9adec2a867..00000000000 --- a/.changeset/orange-bulldogs-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding the new variant as a row is no longer possible from the product details. This means "add new variant" button now leads you to the variant creation page diff --git a/.changeset/orange-buses-scream.md b/.changeset/orange-buses-scream.md deleted file mode 100644 index 558b4be5666..00000000000 --- a/.changeset/orange-buses-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -For old verions tests with "old release" tag will be executing. Additionally adds more detailed title to results on slack and testmo" diff --git a/.changeset/perfect-crews-speak.md b/.changeset/perfect-crews-speak.md deleted file mode 100644 index df401ff5dad..00000000000 --- a/.changeset/perfect-crews-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Searching for countries and other items is now more efficient, making it easier to find what you need. Additionally, the Dashboard Navigator UI has been improved to match the rest of the application, providing a more consistent experience. diff --git a/.changeset/perfect-ears-drive.md b/.changeset/perfect-ears-drive.md deleted file mode 100644 index 8df81b25728..00000000000 --- a/.changeset/perfect-ears-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Previously we allowed user to select either flat rates or any tax app. To avoid problems if there are more tax apps installed this change adds ability to select tax app that will be used to calculated taxes per channel. User can also select tax app for country exception while configuring taxes. Related [RFC](https://github.com/saleor/saleor/issues/12942) diff --git a/.changeset/perfect-geckos-occur.md b/.changeset/perfect-geckos-occur.md deleted file mode 100644 index 91a6e7ae8e2..00000000000 --- a/.changeset/perfect-geckos-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Amount input in refund form no longer displays incorrectly formatted prices after recalculation diff --git a/.changeset/plenty-walls-prove.md b/.changeset/plenty-walls-prove.md deleted file mode 100644 index b41f0a76091..00000000000 --- a/.changeset/plenty-walls-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Transaction refund related views no longer display confusing descriptions. diff --git a/.changeset/pretty-pets-doubt.md b/.changeset/pretty-pets-doubt.md deleted file mode 100644 index 550249d590a..00000000000 --- a/.changeset/pretty-pets-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now toggle improved refund flow in features preview diff --git a/.changeset/purple-beans-deliver.md b/.changeset/purple-beans-deliver.md deleted file mode 100644 index 714602def1f..00000000000 --- a/.changeset/purple-beans-deliver.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Addedd support for the BrokerProperties webhook header diff --git a/.changeset/purple-dancers-confess.md b/.changeset/purple-dancers-confess.md deleted file mode 100644 index 258293191ab..00000000000 --- a/.changeset/purple-dancers-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Filters for orders now allow filtering by ID. This means its form handles one or multiple ID that you can attach by using comma, space, or enter for separation. diff --git a/.changeset/rare-seas-pull.md b/.changeset/rare-seas-pull.md deleted file mode 100644 index 0722bb3cddb..00000000000 --- a/.changeset/rare-seas-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Products in a list of products to be excluded from shipping will no longer be selectable if not available in chosen channels. diff --git a/.changeset/real-brooms-attack.md b/.changeset/real-brooms-attack.md deleted file mode 100644 index 40ed6714c16..00000000000 --- a/.changeset/real-brooms-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix showing promotion discount type in order summary diff --git a/.changeset/red-guests-perform.md b/.changeset/red-guests-perform.md deleted file mode 100644 index d27217a7e5a..00000000000 --- a/.changeset/red-guests-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Increase playwright maxFailures to 10 (how many allowed failures, if exceeding skip remaining tests) diff --git a/.changeset/red-hornets-impress.md b/.changeset/red-hornets-impress.md deleted file mode 100644 index ff72cd40f1a..00000000000 --- a/.changeset/red-hornets-impress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Manual refund form no longer allows values greater than charged amount for selected transaction and now allows positive values lower than 1 diff --git a/.changeset/rich-apes-buy.md b/.changeset/rich-apes-buy.md deleted file mode 100644 index 8316697c0fe..00000000000 --- a/.changeset/rich-apes-buy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing another batch of flaky E2E tests diff --git a/.changeset/rotten-garlics-perform.md b/.changeset/rotten-garlics-perform.md deleted file mode 100644 index 226a8c58d2e..00000000000 --- a/.changeset/rotten-garlics-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -QA Adding back tests-nightly workflow diff --git a/.changeset/selfish-walls-sit.md b/.changeset/selfish-walls-sit.md deleted file mode 100644 index fd29f6bf454..00000000000 --- a/.changeset/selfish-walls-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now open channel selection by clicking "Select channel" within any price cell on the product list. This means the dash "-" sign is no longer displayed there diff --git a/.changeset/serious-beans-try.md b/.changeset/serious-beans-try.md deleted file mode 100644 index fea128da3cf..00000000000 --- a/.changeset/serious-beans-try.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Introduce menu items with sortcuts for GraphQL playground and search actions in sidebar. -Move "Go to Saleor Cloud" button at bottom of sidebar diff --git a/.changeset/serious-books-wave.md b/.changeset/serious-books-wave.md deleted file mode 100644 index b9e86aff1f8..00000000000 --- a/.changeset/serious-books-wave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Changed e2e test case ids to remove duplicate case ids and fix inconsistencies between repo and Testmo. Thanks to this, our QA reports will be more accurate diff --git a/.changeset/serious-pandas-jam.md b/.changeset/serious-pandas-jam.md deleted file mode 100644 index c59afe5c7fe..00000000000 --- a/.changeset/serious-pandas-jam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Waits if editorjs is ready before it's destroyed. This change aims to lower number of alerts caused by editorjs diff --git a/.changeset/sharp-cobras-obey.md b/.changeset/sharp-cobras-obey.md deleted file mode 100644 index 249d1987188..00000000000 --- a/.changeset/sharp-cobras-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -add playwright test for translations diff --git a/.changeset/sharp-gorillas-cheat.md b/.changeset/sharp-gorillas-cheat.md deleted file mode 100644 index 1800ac73091..00000000000 --- a/.changeset/sharp-gorillas-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Set codeowners based on new GH groups diff --git a/.changeset/sharp-planets-jam.md b/.changeset/sharp-planets-jam.md deleted file mode 100644 index 796a4b16a78..00000000000 --- a/.changeset/sharp-planets-jam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fixes an issue that prevented users from pasting values smaller than 10 into datagrid cells diff --git a/.changeset/sharp-tables-peel.md b/.changeset/sharp-tables-peel.md deleted file mode 100644 index 0c25ccfb4be..00000000000 --- a/.changeset/sharp-tables-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Avatars in transaction events no longer show broken image instead of initials. diff --git a/.changeset/short-garlics-brush.md b/.changeset/short-garlics-brush.md deleted file mode 100644 index be1d8ebf6c8..00000000000 --- a/.changeset/short-garlics-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Add site settings e2e test diff --git a/.changeset/shy-dodos-exist.md b/.changeset/shy-dodos-exist.md deleted file mode 100644 index 3f9cd59ec13..00000000000 --- a/.changeset/shy-dodos-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fix duplicate validations on refund view diff --git a/.changeset/shy-jars-flow.md b/.changeset/shy-jars-flow.md deleted file mode 100644 index 290534e5a49..00000000000 --- a/.changeset/shy-jars-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Show all transaction in manual refund view, disabled those that are not refundable diff --git a/.changeset/shy-spoons-explain.md b/.changeset/shy-spoons-explain.md deleted file mode 100644 index a8bc9d7d9fb..00000000000 --- a/.changeset/shy-spoons-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Removing skips from e2e tests diff --git a/.changeset/silver-donuts-crash.md b/.changeset/silver-donuts-crash.md deleted file mode 100644 index abb0469637d..00000000000 --- a/.changeset/silver-donuts-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -This change replaces refund datagrid on order details view with GridTable for better clarity and UX. diff --git a/.changeset/six-hairs-cover.md b/.changeset/six-hairs-cover.md deleted file mode 100644 index c383ec686f2..00000000000 --- a/.changeset/six-hairs-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Now you can see the reason why shipping methods are incorrect when creating draft orders. This means creating new draft orders will pop up an error with the details of incorrect shipping. diff --git a/.changeset/sixty-colts-cough.md b/.changeset/sixty-colts-cough.md deleted file mode 100644 index 2307753da8f..00000000000 --- a/.changeset/sixty-colts-cough.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -# Optimizing playwright setup and playwright.config.ts files - --Adding a conditioning to auth.setup.ts file to use existing auth json file if it's applicable --Added some optimizations to playwright config file --Cleaned up gh action for playwright tests (removed Cypress references) --Updating gh workflow for PR automation with extra test sharding --General cleanup of redundant code diff --git a/.changeset/sixty-kangaroos-cheer.md b/.changeset/sixty-kangaroos-cheer.md deleted file mode 100644 index dcc83bdc3c1..00000000000 --- a/.changeset/sixty-kangaroos-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Implement refunds datagrid on order details diff --git a/.changeset/slow-lemons-care.md b/.changeset/slow-lemons-care.md deleted file mode 100644 index ca82915d695..00000000000 --- a/.changeset/slow-lemons-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The selected value is no longer filtering the options when using any select list in product variant table diff --git a/.changeset/smooth-frogs-play.md b/.changeset/smooth-frogs-play.md deleted file mode 100644 index 4e4252ea24f..00000000000 --- a/.changeset/smooth-frogs-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -This change replaces old service worker with a noop service worker. Saleor Dashboard will no longer actively use service worker for caching and registering fonts. diff --git a/.changeset/sour-rings-occur.md b/.changeset/sour-rings-occur.md deleted file mode 100644 index 867a4a0d09e..00000000000 --- a/.changeset/sour-rings-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Orders: In order list view you can now use new, easy to use and improved filters. diff --git a/.changeset/spotty-spies-film.md b/.changeset/spotty-spies-film.md deleted file mode 100644 index ea4fd1e51ff..00000000000 --- a/.changeset/spotty-spies-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Improve error color on datagrid diff --git a/.changeset/stale-students-unite.md b/.changeset/stale-students-unite.md deleted file mode 100644 index b0b43f09752..00000000000 --- a/.changeset/stale-students-unite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now run E2E tests for refunds diff --git a/.changeset/stale-tigers-brush.md b/.changeset/stale-tigers-brush.md deleted file mode 100644 index 375c99b6b5f..00000000000 --- a/.changeset/stale-tigers-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Vertical lines are no longer visible for read-only grid tables diff --git a/.changeset/strange-stingrays-shave.md b/.changeset/strange-stingrays-shave.md deleted file mode 100644 index 5b6a3532521..00000000000 --- a/.changeset/strange-stingrays-shave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The action buttons in the transaction section of the order view are now unified with the other buttons in that view. diff --git a/.changeset/stupid-seahorses-fix.md b/.changeset/stupid-seahorses-fix.md deleted file mode 100644 index 7b59493dbe3..00000000000 --- a/.changeset/stupid-seahorses-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -E2E fixing flaky gift cards tests diff --git a/.changeset/sweet-baboons-beg.md b/.changeset/sweet-baboons-beg.md deleted file mode 100644 index aec7ce2a9cb..00000000000 --- a/.changeset/sweet-baboons-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fixes an issue where product export threw an error due to invalid input data diff --git a/.changeset/sweet-buttons-visit.md b/.changeset/sweet-buttons-visit.md deleted file mode 100644 index 8fb1ca3b36a..00000000000 --- a/.changeset/sweet-buttons-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding e2e navigation tests diff --git a/.changeset/swift-pandas-guess.md b/.changeset/swift-pandas-guess.md deleted file mode 100644 index a80d7a5501b..00000000000 --- a/.changeset/swift-pandas-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Run tests from other repo diff --git a/.changeset/tall-dodos-sit.md b/.changeset/tall-dodos-sit.md deleted file mode 100644 index f18b24b4e0a..00000000000 --- a/.changeset/tall-dodos-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can now see pending manual refunds on order details view. diff --git a/.changeset/tame-foxes-breathe.md b/.changeset/tame-foxes-breathe.md deleted file mode 100644 index 5b48208c6c1..00000000000 --- a/.changeset/tame-foxes-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing still flaky test - TC: SALEOR_205 Bulk delete customers diff --git a/.changeset/tame-jars-add.md b/.changeset/tame-jars-add.md deleted file mode 100644 index 9c6f31f0527..00000000000 --- a/.changeset/tame-jars-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky test - TC: SALEOR_205 Bulk delete customers diff --git a/.changeset/tasty-meals-grin.md b/.changeset/tasty-meals-grin.md deleted file mode 100644 index 5c74b802eef..00000000000 --- a/.changeset/tasty-meals-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Show info and disable checkbox in AssignProductDialog when product does have channels overlap with selected channels diff --git a/.changeset/tasty-ties-listen.md b/.changeset/tasty-ties-listen.md deleted file mode 100644 index 358ab1fbf83..00000000000 --- a/.changeset/tasty-ties-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -This change replaces the datagrid on refund create & edit views with GridTable component diff --git a/.changeset/ten-students-sneeze.md b/.changeset/ten-students-sneeze.md deleted file mode 100644 index 5702f19b8e5..00000000000 --- a/.changeset/ten-students-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Introduce new icons for menu, remove not used icons diff --git a/.changeset/thick-moons-whisper.md b/.changeset/thick-moons-whisper.md deleted file mode 100644 index 12fda975b80..00000000000 --- a/.changeset/thick-moons-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now savebar is aligned with the rest of layout diff --git a/.changeset/thick-tools-flash.md b/.changeset/thick-tools-flash.md deleted file mode 100644 index c3489278504..00000000000 --- a/.changeset/thick-tools-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Adding e2e tests for attributes diff --git a/.changeset/thin-timers-grin.md b/.changeset/thin-timers-grin.md deleted file mode 100644 index e328b8df0a9..00000000000 --- a/.changeset/thin-timers-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky e2e tests diff --git a/.changeset/tiny-hairs-wink.md b/.changeset/tiny-hairs-wink.md deleted file mode 100644 index f1ac4a22099..00000000000 --- a/.changeset/tiny-hairs-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky test: TC: SALEOR_87 Edit voucher Usage Limits: used in total, per customer, staff only, code used once diff --git a/.changeset/tricky-radios-sin.md b/.changeset/tricky-radios-sin.md deleted file mode 100644 index 5052f524344..00000000000 --- a/.changeset/tricky-radios-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Open release PR after automation tests for core releases passes diff --git a/.changeset/tricky-spies-study.md b/.changeset/tricky-spies-study.md deleted file mode 100644 index bd7c9b0b088..00000000000 --- a/.changeset/tricky-spies-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixes button font weights diff --git a/.changeset/twelve-kids-pretend.md b/.changeset/twelve-kids-pretend.md deleted file mode 100644 index 01d51af899e..00000000000 --- a/.changeset/twelve-kids-pretend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Add playwright tests for page types diff --git a/.changeset/twenty-seals-yawn.md b/.changeset/twenty-seals-yawn.md deleted file mode 100644 index 79f247e7e2f..00000000000 --- a/.changeset/twenty-seals-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix release workflow diff --git a/.changeset/unable-to-build-docker-image .md b/.changeset/unable-to-build-docker-image .md deleted file mode 100644 index df7d5217458..00000000000 --- a/.changeset/unable-to-build-docker-image .md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Fix dockerfile build error caused by deleted file and bash script diff --git a/.changeset/warm-balloons-call.md b/.changeset/warm-balloons-call.md deleted file mode 100644 index 997a68464e1..00000000000 --- a/.changeset/warm-balloons-call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -New github action gathering repo metrics diff --git a/.changeset/warm-taxis-mate.md b/.changeset/warm-taxis-mate.md deleted file mode 100644 index b5fdf0c269a..00000000000 --- a/.changeset/warm-taxis-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Show all gift card used in order details diff --git a/.changeset/weak-steaks-dream.md b/.changeset/weak-steaks-dream.md deleted file mode 100644 index d18e45f4f46..00000000000 --- a/.changeset/weak-steaks-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now you can see the updated appearance of the bottom bar that holds save and back actions. This means functionality has not be changed diff --git a/.changeset/wet-badgers-switch.md b/.changeset/wet-badgers-switch.md deleted file mode 100644 index dbb363c0248..00000000000 --- a/.changeset/wet-badgers-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fixing flaky E2E test for gift cards diff --git a/.changeset/wicked-forks-agree.md b/.changeset/wicked-forks-agree.md deleted file mode 100644 index bb701eac04b..00000000000 --- a/.changeset/wicked-forks-agree.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Remove branch name warning from pre-push diff --git a/.changeset/wild-stingrays-walk.md b/.changeset/wild-stingrays-walk.md deleted file mode 100644 index 4b9179161fa..00000000000 --- a/.changeset/wild-stingrays-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Use dummy app in delete app test diff --git a/.changeset/wise-pants-repeat.md b/.changeset/wise-pants-repeat.md deleted file mode 100644 index 5a61e9a4e2a..00000000000 --- a/.changeset/wise-pants-repeat.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Fix typo in postTestsResults.js - diff --git a/.changeset/yellow-keys-admire.md b/.changeset/yellow-keys-admire.md deleted file mode 100644 index 9e84c301727..00000000000 --- a/.changeset/yellow-keys-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Show discount name for promotion discount type diff --git a/.changeset/young-fishes-applaud.md b/.changeset/young-fishes-applaud.md deleted file mode 100644 index 47375d4fafe..00000000000 --- a/.changeset/young-fishes-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Refund views have now more consistent UI diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f0d03..288ac70224c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,161 @@ # Changelog + +## 3.20.0 + +### Minor Changes + +- 618bb01aa: E2E Fixing flaky navigation tests +- f9d1b2b7c: Adding CodeInspector plugin +- 8943ae241: Now you can see columns and their ordering that you previously selected when swtich betetween listing pages. +- 563b86557: Add tests for thirdparty apps +- 1fc4c348d: Swap new refund with with old one when feature flag toggle +- cb5988f38: E2E tests for customer CRUD +- 8856e2f03: You can now see Marketplace app list on automation deployment. +- 1dcb956f4: Adding e2e tests for promotion CRUD +- bdfb5e8e3: Now selected columns on the product list are being saved when browsing order details. +- 12622c182: Migrate dashboard to new font tokens +- 6c5be6662: Fix flaky test - TC: SALEOR_3 Create basic product with variant +- 5c30c8d46: Replace back icon with cloud one in sidebar return to cloud link, update copy to just Saleor Cloud +- 2111f9305: Now, the developer can access sidebar components on each page directly. +- e08dd6420: Introduces new refund flow for orders that allow users to refund items base on transactions. Grant refund and send refund is a single flow. User first has to create draft refund and then can transfer funds in one flow. +- bed0fa3b5: The list of transactions is now placed under the new section called "Transactions" when you visit order details page +- 93f5dcebf: You can now run e2e test for a manual refund type +- f1e716e86: Order Refund views no longer display duplicated errors or no errors at all when submitting the form. +- c14402c4a: You can now run E2E Playwright tests for staff members CRUD +- 687b1346e: You can now browse listing pages without additional reloadings +- e02050a43: This change adds a reusable GridTable component for ephemeral data edition. +- a9745e492: Remove brackets next to each order status title due to cause confusing for the clients +- 66f565d24: Adding tests for promotion rules CRUD +- ca23d8547: You can now create refund with lines even if all lines have been previously refunded. +- f7bb80cbe: The API_URI is no longer used across the codebase. API_URI stays in workflows for backward compatibility +- 0589970ef: Always show charge and authorized amount in payment section of order details +- d9bc7544e: Cypress tests are no longer possible to be executed +- 9c5e78652: This change disallows creating refund for orders created in transaction flow channels that have no transactions, as well as orders that have no refundable transactions +- 92ed22708: Allow to manually override number of shards to use during manual re-runs +- 68eb5cd62: Refund add dialog no longer allows proceeding to refund with lines view when all lines have been refunded and manual refund view when user doesn't have payment permissions. +- 9b87e78d4: You can now select created at column in product list +- 202b18fb5: Refactoring playwright setup file and moving auth specs +- 1c01b463a: Modal for refund reason now has an improved copy +- 4c919c106: Grid peersistance implementation +- 172bbe089: Adding prettier for code formatting +- be40ffd78: Fixing flaky tests - TC: SALEOR_32 and TC: SALEOR_33 +- 4603cc532: Refund with lines view no longer allows creating/editing a refund with amount exceeding charged amount for selected transaction +- ceada3108: Changed trigger to workflow_dispatch and switched from issues to pr as a source of metrics +- d65766193: Warning message on manual refund view is no longer unreadable on dark mode +- b3a87cd5e: Implement refund add modal +- 1c8df0f59: Refund table now displays user initials on the avatar and full name on hover instead of an email. +- f25bf71fc: Adding e2e tests for permission groups +- 06678d0bd: Fixing flaky test - TC: SALEOR_106 Issue gift card with specific customer and expiry date +- e2e5c716c: Add playwright tests for edit and remove product types +- dbfe9b7f7: Rewritten tests for setting balance and exporting gift cards +- f84515021: E2E Test for adding promotion rules +- 08b55d409: Fixing flaky e2e tests +- d46265dfe: Introduce view for manual refund transaction +- b41583432: E2E Playwright tests: SALEOR_187, SALEOR_205, SALEOR_59, SALEOR_198, SALEOR_106 are no longer flaky +- 6597aaaef: Fixes incorrect button label for adding or editing refund reason +- ae560bf9d: Fixing assertions in flaky Playwright tests +- 1a3748728: Adding the new variant as a row is no longer possible from the product details. This means "add new variant" button now leads you to the variant creation page +- 04ca14958: For old verions tests with "old release" tag will be executing. Additionally adds more detailed title to results on slack and testmo" +- c0031af37: Amount input in refund form no longer displays incorrectly formatted prices after recalculation +- 1bfc3f5ab: Transaction refund related views no longer display confusing descriptions. +- c3ca12283: You can now toggle improved refund flow in features preview +- 3af5ac04c: Filters for orders now allow filtering by ID. This means its form handles one or multiple ID that you can attach by using comma, space, or enter for separation. +- ca83d3acb: Manual refund form no longer allows values greater than charged amount for selected transaction and now allows positive values lower than 1 +- 88138bef4: Fixing another batch of flaky E2E tests +- d6c03b077: QA Adding back tests-nightly workflow +- 2c84b7aee: You can now open channel selection by clicking "Select channel" within any price cell on the product list. This means the dash "-" sign is no longer displayed there +- 5faad9ee3: Introduce menu items with sortcuts for GraphQL playground and search actions in sidebar. + Move "Go to Saleor Cloud" button at bottom of sidebar +- bde2fe886: Changed e2e test case ids to remove duplicate case ids and fix inconsistencies between repo and Testmo. Thanks to this, our QA reports will be more accurate +- 31e4575df: add playwright test for translations +- d61fdb0b6: Add site settings e2e test +- 16b47e2bf: Fix duplicate validations on refund view +- 634265976: Show all transaction in manual refund view, disabled those that are not refundable +- a6ed4570f: Removing skips from e2e tests +- 2a091894f: This change replaces refund datagrid on order details view with GridTable for better clarity and UX. +- 024f2d012: # Optimizing playwright setup and playwright.config.ts files + + -Adding a conditioning to auth.setup.ts file to use existing auth json file if it's applicable + -Added some optimizations to playwright config file + -Cleaned up gh action for playwright tests (removed Cypress references) + -Updating gh workflow for PR automation with extra test sharding + -General cleanup of redundant code + +- 488c8e409: Implement refunds datagrid on order details +- fb4d33a5c: Orders: In order list view you can now use new, easy to use and improved filters. +- 855a97419: You can now run E2E tests for refunds +- f95fcc447: Vertical lines are no longer visible for read-only grid tables +- 151f42b3d: E2E fixing flaky gift cards tests +- 2b0f7602f: Adding e2e navigation tests +- 7a7f0e447: Run tests from other repo +- bb16de58e: You can now see pending manual refunds on order details view. +- 70b2c40d0: Fixing still flaky test - TC: SALEOR_205 Bulk delete customers +- 434b169ab: Fixing flaky test - TC: SALEOR_205 Bulk delete customers +- 6a2c4a0a4: This change replaces the datagrid on refund create & edit views with GridTable component +- b048a5090: Introduce new icons for menu, remove not used icons +- 005713e8e: Now savebar is aligned with the rest of layout +- a47581e31: Adding e2e tests for attributes +- 99a9c2837: Fixing flaky e2e tests +- dd8d60a4e: Fixing flaky test: TC: SALEOR_87 Edit voucher Usage Limits: used in total, per customer, staff only, code used once +- 12d7b9021: Open release PR after automation tests for core releases passes +- fd8368fd4: Fixes button font weights +- ec21ae379: Add playwright tests for page types +- 7d7fd4e12: New github action gathering repo metrics +- 18492763f: Now you can see the updated appearance of the bottom bar that holds save and back actions. This means functionality has not be changed +- c956f3543: Fixing flaky E2E test for gift cards +- 251e206f3: Remove branch name warning from pre-push +- 7077d6a55: Use dummy app in delete app test +- 99d1c6f83: Fix typo in postTestsResults.js +- b8bd24297: Refund views have now more consistent UI + +### Patch Changes + +- 7ff18ac1e: Product edition no longer change the others work when changing different fields simultaneously. This means UI sends only form fields that were changed. +- dfb19e5e2: The legacy multiselect are not longer present within the codebase. this means you should use the ones from new macaw when developing the UI +- 9d8a21f51: Login via API in order to setup playwright tests is working in serial mode +- f53973f2d: Manual transaction modal has now improved design that matches other modals. +- 345eeb041: You can now run e2e tests without flakiness +- f99fc51cd: Fix building docker image after move service worker to assets dir +- a9c750a01: You can no longer see a duplicated cancel button when canceling the transaction. This means you now can go back to edition by using "back" button and "cancel" to continue your intention +- 31a73ea21: Fixes a bug where order and gift card details views show incorrect avatar in history component. Notes added by apps will now show app's name and avatar. All events will now use the same date format to improve consistency. +- 2952fe571: The selected value is no longer filtering the options when using any select list with autocomplete +- a246798df: Fix showing empty tooltip when no content by bumping macaw-ui to newest +- 7f729f2d2: Dashboard will now allow to set publication date and availability date with time. This change also replaces deprecated date fileds with datetime fields. +- 97c0c844d: Read-only metadata keys and values will now be displayed as regular inputs, making them easier to read and preventing them from looking disabled. +- ea3c28809: Transaction titles in order details now include its ordinal number and creation date. This means that all titles now follow the same format. +- 9226dc965: Fix showing empty price when value is zero + Improve showing discount type in order payment details +- d0ef1f3d8: App and User avatars in order details now all have the same color. +- 1028d48d8: You can now open issue gift card modal without any flickering +- 4eaa036cc: Fix product list crash when description contains empty object + Improve description by removing html tags and   +- f6d44a902: Manipulating timeouts of Playwright tests +- ad3ad6d84: The boolean attribute has been changed from a toggle to a select. This change helps visualize when the attribute has not been set. +- 3231bb525: You can now properly edit permission groups when you have full access +- 528fef012: Product details view will not show product categories with its ancestors. It will make it easier to choose product's category. +- c10dd8a6a: Add clarity to order cancel dialog +- b475eb8b5: Add product analytics on cloud +- 0fb6777c4: History component's texts will now have unified colors +- 18cb0ec76: Adding tests for readonly access to Apps +- db8b2d9b9: Flow settings in channel creation will now persist after channel is created +- 56eb4d649: Searching for countries and other items is now more efficient, making it easier to find what you need. Additionally, the Dashboard Navigator UI has been improved to match the rest of the application, providing a more consistent experience. +- 232cd2a12: Previously we allowed user to select either flat rates or any tax app. To avoid problems if there are more tax apps installed this change adds ability to select tax app that will be used to calculated taxes per channel. User can also select tax app for country exception while configuring taxes. Related [RFC](https://github.com/saleor/saleor/issues/12942) +- e7e639b79: Addedd support for the BrokerProperties webhook header +- 9edf2eabc: Products in a list of products to be excluded from shipping will no longer be selectable if not available in chosen channels. +- e234ddc0f: Fix showing promotion discount type in order summary +- ddd28ecf1: Increase playwright maxFailures to 10 (how many allowed failures, if exceeding skip remaining tests) +- 290104119: Waits if editorjs is ready before it's destroyed. This change aims to lower number of alerts caused by editorjs +- c8f4b0ad3: Set codeowners based on new GH groups +- f82600a16: Fixes an issue that prevented users from pasting values smaller than 10 into datagrid cells +- d1430ea40: Avatars in transaction events no longer show broken image instead of initials. +- 4bd369b09: Now you can see the reason why shipping methods are incorrect when creating draft orders. This means creating new draft orders will pop up an error with the details of incorrect shipping. +- 217cb106d: The selected value is no longer filtering the options when using any select list in product variant table +- 69d2c6bec: This change replaces old service worker with a noop service worker. Saleor Dashboard will no longer actively use service worker for caching and registering fonts. +- 51a360f2a: Improve error color on datagrid +- dfedc1010: The action buttons in the transaction section of the order view are now unified with the other buttons in that view. +- dfe8e1d20: Fixes an issue where product export threw an error due to invalid input data +- 9edf2eabc: Show info and disable checkbox in AssignProductDialog when product does have channels overlap with selected channels +- 2830c9cfe: Fix release workflow +- 8e0e208fd9: Fix dockerfile build error caused by deleted file and bash script +- 80b8c785e: Show all gift card used in order details +- 756681f46: Show discount name for promotion discount type diff --git a/package.json b/package.json index e9e6013d99e..24f5eb2bdb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "3.20.0-a.0", + "version": "3.20.0", "main": "src/index.tsx", "repository": { "type": "git", From 81d909bd14dfb40dcdff64c631d633ed1efde574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Mon, 15 Jul 2024 12:18:58 +0200 Subject: [PATCH 004/264] Update dependency cruiser to support new macaw (#5045) * Update dependency cruiser to support macaw * Add changeset * Exclude new macaw --- .changeset/fair-boxes-wait.md | 5 +++++ .dependency-cruiser.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/fair-boxes-wait.md diff --git a/.changeset/fair-boxes-wait.md b/.changeset/fair-boxes-wait.md new file mode 100644 index 00000000000..7c97ae6b48d --- /dev/null +++ b/.changeset/fair-boxes-wait.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now see macaw ui migration progress diff --git a/.dependency-cruiser.js b/.dependency-cruiser.js index 602a99ac350..87735b767cf 100644 --- a/.dependency-cruiser.js +++ b/.dependency-cruiser.js @@ -7,7 +7,8 @@ module.exports = { comment: "Macaw UI migration", from: {}, to: { - path: "@saleor/macaw-ui/legacy", + path: "@saleor/macaw-ui", + pathNot: "@saleor/macaw-ui-next" }, }, { From d4e284996282f8a643f8383cb1c93e1e7d468c7c Mon Sep 17 00:00:00 2001 From: Renata Date: Fri, 12 Jul 2024 10:20:47 +0200 Subject: [PATCH 005/264] Update order with non-manual refunds in status other than Success (#5037) --- .changeset/hip-dryers-glow.md | 5 +++ playwright/data/e2eTestData.ts | 43 ++++++++++++------- playwright/pages/ordersPage.ts | 2 +- playwright/pages/refundPage.ts | 10 ++++- playwright/tests/orders.spec.ts | 28 +++++++++++- .../OrderDetailsRefundLine.tsx | 4 +- 6 files changed, 71 insertions(+), 21 deletions(-) create mode 100644 .changeset/hip-dryers-glow.md diff --git a/.changeset/hip-dryers-glow.md b/.changeset/hip-dryers-glow.md new file mode 100644 index 00000000000..86caf6ba4be --- /dev/null +++ b/.changeset/hip-dryers-glow.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": minor +--- + +You can run e2e for updating order with non-manual refunds in status draft/failure diff --git a/playwright/data/e2eTestData.ts b/playwright/data/e2eTestData.ts index fa564bfbb3e..b21b5f53124 100644 --- a/playwright/data/e2eTestData.ts +++ b/playwright/data/e2eTestData.ts @@ -432,21 +432,15 @@ export const ORDERS = { orderNotFulfilledToChangeShippingAddress: { id: "T3JkZXI6ZWFhZjA0MzgtNzkyYi00ZTdlLWIyODUtMTBkMjViMjM0MzRk", }, - fullyPaidOrdersWithSingleTransaction: { - first: { - id: "T3JkZXI6ZjZjZWUxMzItNDk2Zi00MWUyLWJkNTItYTk1MDM1YTVlZmVm", - lineItems: [ - { - name: "Bean Juice", - quantity: "1", - }, - { name: "Lake Tunes", quantity: "2" }, - ], - }, - second: { - id: "T3JkZXI6YzI4YjFmYmEtZWU1NS00YmU5LTg5MjktNTMyYzk5MDlkZGVk", - lineItems: ["Blue Hoodie 2", "Black Hoodie", "Mustard Hoodie", "White Hoodie"], - }, + fullyPaidOrderWithSingleTransaction: { + id: "T3JkZXI6ZjZjZWUxMzItNDk2Zi00MWUyLWJkNTItYTk1MDM1YTVlZmVm", + lineItems: [ + { + name: "Bean Juice", + quantity: "1", + }, + { name: "Lake Tunes", quantity: "2" }, + ], }, fullyPaidOrderWithSeveralTransactions: { id: "T3JkZXI6MTVhYTEwMzYtZWE3OS00MzJiLTliODctNDhlYTMwYmU1NmNl", @@ -456,6 +450,25 @@ export const ORDERS = { partiallyPaidOrder: { id: "T3JkZXI6NmVlMDMwMTctZTViOS00OGNmLWFkYTQtODg4YTQ5MDI3ZjNk", }, + orderWithRefundsInStatusOtherThanSuccess: { + id: "T3JkZXI6YzI4YjFmYmEtZWU1NS00YmU5LTg5MjktNTMyYzk5MDlkZGVk", + lineItems: [ + { name: "Blue Hoodie 2", quantity: "1" }, + { name: "Black Hoodie", quantity: "1" }, + { name: "Mustard Hoodie", quantity: "1" }, + { name: "White Hoodie", quantity: "1" }, + ], + refunds: [ + { + id: "T3JkZXJHcmFudGVkUmVmdW5kOjEw", + status: "FAILURE", + }, + { + id: "T3JkZXJHcmFudGVkUmVmdW5kOjg%3D", + status: "DRAFT", + }, + ], + }, orderWithRefunds: { id: "T3JkZXI6Y2YyY2EwNWYtZmQ3Yy00ODk5LThjZTktMzQ4NjYxYThjZDkx", refunds: [ diff --git a/playwright/pages/ordersPage.ts b/playwright/pages/ordersPage.ts index 8f9ec7a8d8e..fb551ccf15a 100644 --- a/playwright/pages/ordersPage.ts +++ b/playwright/pages/ordersPage.ts @@ -56,7 +56,7 @@ export class OrdersPage extends BasePage { readonly orderRefundModal = page.getByTestId("order-refund-dialog"), readonly orderRefundSection = page.getByTestId("order-refund-section"), readonly orderRefundList = page.getByTestId("refund-list"), - readonly editRefundButton = page.getByTestId("edit-refund-button"), + readonly editRefundButton = page.getByTestId("edit-refund-button").locator("button"), ) { super(page); this.markOrderAsPaidDialog = new MarkOrderAsPaidDialog(page); diff --git a/playwright/pages/refundPage.ts b/playwright/pages/refundPage.ts index 0184f0dd73f..61b357b623c 100644 --- a/playwright/pages/refundPage.ts +++ b/playwright/pages/refundPage.ts @@ -27,7 +27,7 @@ export class RefundPage extends OrdersPage { return await this.page.locator("table tr").filter({ hasText: productName }); } - async expectLineItemsRefundPageOpen(orderId: string) { + async expectAddLineItemsRefundPageOpen(orderId: string) { const orderLink = `${URL_LIST.orders}${orderId}/refund`; await expect(this.page).toHaveURL(orderLink); @@ -35,6 +35,14 @@ export class RefundPage extends OrdersPage { await expect(this.pageHeader).toContainText("Create refund with line items"); } + async expectEditLineItemsRefundPageOpen(orderId: string, refundId: string) { + const orderLink = `${URL_LIST.orders}${orderId}/refund/${refundId}`; + + await expect(this.page).toHaveURL(orderLink); + await this.waitForDOMToFullyLoad(); + await expect(this.pageHeader).toContainText("Create refund with line items"); + } + async expectManualRefundPageOpen(orderId: string) { const orderLink = `${URL_LIST.orders}${orderId}/manual-refund`; diff --git a/playwright/tests/orders.spec.ts b/playwright/tests/orders.spec.ts index 41bc014e760..a6d4cb4327c 100644 --- a/playwright/tests/orders.spec.ts +++ b/playwright/tests/orders.spec.ts @@ -257,13 +257,13 @@ test("TC: SALEOR_84 Create draft order @e2e @draft", async () => { }); test("TC: SALEOR_191 Refund products from the fully paid order @e2e @refunds", async () => { - const order = ORDERS.fullyPaidOrdersWithSingleTransaction.first; + const order = ORDERS.fullyPaidOrderWithSingleTransaction; await ordersPage.goToExistingOrderPage(order.id); await ordersPage.clickAddRefundButton(); await ordersPage.orderRefundDialog.pickLineItemsRefund(); await ordersPage.orderRefundModal.waitFor({ state: "hidden" }); - await refundPage.expectLineItemsRefundPageOpen(order.id); + await refundPage.expectAddLineItemsRefundPageOpen(order.id); await refundPage.pickAllProductQuantityToRefund(order.lineItems[0].name); const productRow = await refundPage.getProductRow(order.lineItems[0].name); @@ -311,3 +311,27 @@ test("TC: SALEOR_192 Should create a manual refund with a custom amount @e2e @re await ordersPage.orderRefundSection.waitFor({ state: "visible" }); await ordersPage.assertRefundOnList("Manual refund"); }); + +const orderRefunds = ORDERS.orderWithRefundsInStatusOtherThanSuccess.refunds; + +for (const refund of orderRefunds) { + test(`TC: SALEOR_193 Update order with non-manual refund in ${refund.status} status @e2e @refunds`, async () => { + await ordersPage.goToExistingOrderPage(ORDERS.orderWithRefundsInStatusOtherThanSuccess.id); + await ordersPage.orderRefundList.scrollIntoViewIfNeeded(); + + const orderRefundListRow = await ordersPage.orderRefundList.locator("tr"); + const pendingRefunds = await orderRefundListRow.filter({ hasText: "PENDING" }).all(); + + for (const pendingRefund of pendingRefunds) { + await expect(pendingRefund.locator(ordersPage.editRefundButton)).toBeDisabled(); + } + await ordersPage.clickEditRefundButton(refund.status); + await refundPage.expectEditLineItemsRefundPageOpen( + ORDERS.orderWithRefundsInStatusOtherThanSuccess.id, + refund.id, + ); + await refundPage.transferFunds(); + await refundPage.expectSuccessBanner(); + await expect(ordersPage.orderRefundList).not.toContainText(refund.status); + }); +} diff --git a/src/orders/components/OrderDetailsRefundTable/OrderDetailsRefundLine.tsx b/src/orders/components/OrderDetailsRefundTable/OrderDetailsRefundLine.tsx index 11ed287a69e..190d99e68d3 100644 --- a/src/orders/components/OrderDetailsRefundTable/OrderDetailsRefundLine.tsx +++ b/src/orders/components/OrderDetailsRefundTable/OrderDetailsRefundLine.tsx @@ -78,10 +78,10 @@ export const OrderDetailsRefundLine: React.FC = ({ - + {isEditable ? ( - + + + {name && ( + + + {name} + + ), + }} + /> + + )} + {version && {`v${version}`}} + {created && ( + + ({moment(created).format("YYYY-MM-DD")}) + + )} ); }; diff --git a/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx b/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx index 568286e5a0e..b185c9aa4fe 100644 --- a/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx +++ b/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; -import SingleSelectField, { Choice } from "@dashboard/components/SingleSelectField"; +import { Select } from "@dashboard/components/Select"; import { TaxConfigurationUpdateInput } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; import { LegacyFlowWarning } from "@dashboard/taxes/components"; import { Divider } from "@material-ui/core"; import { ListItem, ListItemCell } from "@saleor/macaw-ui"; -import { Box, Button, TrashBinIcon } from "@saleor/macaw-ui-next"; +import { Box, Button, Option, TrashBinIcon } from "@saleor/macaw-ui-next"; import React from "react"; import { useStyles } from "../styles"; @@ -17,7 +17,7 @@ interface TaxCountryExceptionListItemProps { onDelete: () => void; onChange: FormChange; divider: boolean; - strategyChoices: Choice[]; + strategyChoices: Option[]; strategyChoicesLoading: boolean; } @@ -46,8 +46,8 @@ export const TaxCountryExceptionListItem: React.FC - = ({ )} - { const { data, loading } = useTaxStrategyChoicesQuery(); + const navigate = useNavigator(); + const navigateToAppScreen = (id: string) => { + navigate(AppUrls.resolveAppDetailsUrl(id)); + }; + const taxAppsChoices = data?.shop.availableTaxApps.map(app => ({ value: app.identifier, @@ -23,14 +31,35 @@ export const useTaxStrategyChoices = () => { created={app.created} version={app.version} id={app.id} - identifier={app.identifier} logoUrl={app.brand?.logo?.default} /> ), + endAdornment: ( + + ), })) ?? []; return { - taxStrategyChoices: [...taxAppsChoices, flatTaxRateChoice, legacyPluginTaxChoice], + taxStrategyChoices: [ + ...taxAppsChoices, + flatTaxRateChoice, + legacyPluginTaxChoice, + ] as unknown as Option[], loading, }; }; From 12588365801885dc69c059193cee84a0f0e3155b Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Tue, 16 Jul 2024 12:24:38 +0200 Subject: [PATCH 007/264] Validate price and name in product variant forms (#5020) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Send only changed data * Add tests * improve product variant validation * changesets * fix type * fix test * intl * fix e2e * add test * cr fixes --------- Co-authored-by: andrzejewsky Co-authored-by: Paweł Chyła --- .changeset/few-brooms-give.md | 5 ++ locale/defaultMessages.json | 3 + playwright/pages/productPage.ts | 2 +- .../ProductVariantCreatePage.tsx | 2 +- .../ProductVariantCreatePage/form.tsx | 10 +-- .../ProductVariantName/ProductVariantName.tsx | 7 +- .../ProductVariantPage/ProductVariantPage.tsx | 3 +- .../components/ProductVariantPage/form.tsx | 21 ++---- .../ProductVariantPrice.tsx | 32 +++++--- src/products/utils/validation.test.ts | 61 ++++++++++++++- src/products/utils/validation.ts | 75 ++++++++++++++++--- .../views/ProductVariant/ProductVariant.tsx | 1 + 12 files changed, 174 insertions(+), 48 deletions(-) create mode 100644 .changeset/few-brooms-give.md diff --git a/.changeset/few-brooms-give.md b/.changeset/few-brooms-give.md new file mode 100644 index 00000000000..cb0a2d562a1 --- /dev/null +++ b/.changeset/few-brooms-give.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Product variant forms now show missing price and name errors when these fields are empty. diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 43551927f33..ba157fc85e7 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1577,6 +1577,9 @@ "8oIbMI": { "string": "Reached limit for this plan" }, + "8pVWve": { + "string": "This field cannot be blank" + }, "8qL/tV": { "context": "CannotDefineChannelsAvailabilityCard subtitle", "string": "You will be able to define availability of product after creating variants." diff --git a/playwright/pages/productPage.ts b/playwright/pages/productPage.ts index c3e01470e59..d6edb00482f 100644 --- a/playwright/pages/productPage.ts +++ b/playwright/pages/productPage.ts @@ -72,7 +72,7 @@ export class ProductPage extends BasePage { readonly ratingInput = page.locator("[name='rating']"), readonly warehouseOption = page.locator("[role='menuitem']"), readonly costPriceInput = page.locator("[name*='costPrice']"), - readonly sellingPriceInput = page.locator("[name*='channel-price']"), + readonly sellingPriceInput = page.locator("[name*='channelListing-price']"), readonly firstRowDataGrid = page.locator("[data-testid='glide-cell-1-0']"), readonly searchInput = page.getByTestId("search-input"), readonly emptyDataGridListView = page.getByTestId("empty-data-grid-text"), diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index a93cf013788..bd010800f5e 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -274,7 +274,7 @@ const ProductVariantCreatePage: React.FC = ({ ...channel.data, ...channel.value, }))} - errors={[]} + errors={errors} loading={!product} onChange={handlers.changeChannels} /> diff --git a/src/products/components/ProductVariantCreatePage/form.tsx b/src/products/components/ProductVariantCreatePage/form.tsx index c1997734c7d..bb15133a75a 100644 --- a/src/products/components/ProductVariantCreatePage/form.tsx +++ b/src/products/components/ProductVariantCreatePage/form.tsx @@ -49,7 +49,7 @@ import { createPreorderEndDateChangeHandler, getChannelsInput, } from "@dashboard/products/utils/handlers"; -import { validateVariantData } from "@dashboard/products/utils/validation"; +import { validateProductVariant } from "@dashboard/products/utils/validation"; import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@dashboard/types"; import useMetadataChangeTrigger from "@dashboard/utils/metadata/useMetadataChangeTrigger"; import { useMultipleRichText } from "@dashboard/utils/richText/useMultipleRichText"; @@ -263,12 +263,12 @@ function useProductVariantCreateForm( ), }); const handleSubmit = async (data: ProductVariantCreateData) => { - const errors = validateVariantData(data); + const validationProductErrors = validateProductVariant(data, intl); - setValidationErrors(errors); + setValidationErrors(validationProductErrors); - if (errors.length) { - return errors; + if (validationProductErrors.length > 0) { + return validationProductErrors; } return onSubmit(data); diff --git a/src/products/components/ProductVariantName/ProductVariantName.tsx b/src/products/components/ProductVariantName/ProductVariantName.tsx index ca13bbc63ee..94a7b6dbc7f 100644 --- a/src/products/components/ProductVariantName/ProductVariantName.tsx +++ b/src/products/components/ProductVariantName/ProductVariantName.tsx @@ -21,7 +21,8 @@ const ProductVariantName: React.FC = ({ errors, }) => { const intl = useIntl(); - const formErrors = getFormErrors(["name"], errors); + + const formErrors = getFormErrors(["variantName"], errors); return ( @@ -38,9 +39,9 @@ const ProductVariantName: React.FC = ({ value={value} label={intl.formatMessage(commonMessages.name)} onChange={onChange} - error={!!formErrors.name} + error={!!formErrors.variantName} disabled={disabled} - helperText={getProductErrorMessage(formErrors.name, intl)} + helperText={getProductErrorMessage(formErrors.variantName, intl)} data-test-id="variant-name-input" /> diff --git a/src/products/components/ProductVariantPage/ProductVariantPage.tsx b/src/products/components/ProductVariantPage/ProductVariantPage.tsx index 2e294971204..4738b835f2a 100644 --- a/src/products/components/ProductVariantPage/ProductVariantPage.tsx +++ b/src/products/components/ProductVariantPage/ProductVariantPage.tsx @@ -231,6 +231,7 @@ const ProductVariantPage: React.FC = ({ ); const media = getSelectedMedia(productMedia, data.media); const errors = [...apiErrors, ...validationErrors]; + const priceVariantErrors = [...channelErrors, ...validationErrors]; return ( <> @@ -318,7 +319,7 @@ const ProductVariantPage: React.FC = ({ ...channel.data, ...channel.value, }))} - errors={channelErrors} + errors={priceVariantErrors} loading={loading} onChange={handlers.changeChannels} /> diff --git a/src/products/components/ProductVariantPage/form.tsx b/src/products/components/ProductVariantPage/form.tsx index bc6a2bc1950..943e3056cdd 100644 --- a/src/products/components/ProductVariantPage/form.tsx +++ b/src/products/components/ProductVariantPage/form.tsx @@ -51,11 +51,7 @@ import { createPreorderEndDateChangeHandler, getChannelsInput, } from "@dashboard/products/utils/handlers"; -import { - validateCostPrice, - validatePrice, - validateVariantData, -} from "@dashboard/products/utils/validation"; +import { validateProductVariant } from "@dashboard/products/utils/validation"; import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@dashboard/types"; import { arrayDiff } from "@dashboard/utils/arrays"; import { mapMetadataItemToInput } from "@dashboard/utils/maps"; @@ -327,12 +323,7 @@ function useProductVariantUpdateForm( channelListings: channels.data, stocks: stocks.data, }; - const disabled = - channels?.data.some( - channelData => - validatePrice(channelData.value.price) || validateCostPrice(channelData.value.costPrice), - ) || - (data.isPreorder && data.hasPreorderEndDate && !!form.errors.preorderEndDateTime); + const disabled = data.isPreorder && data.hasPreorderEndDate && !!form.errors.preorderEndDateTime; const getSubmitData = async (): Promise => ({ ...formData, ...getMetadata(formData, isMetadataModified, isPrivateMetadataModified), @@ -347,12 +338,12 @@ function useProductVariantUpdateForm( updateStocks, }); const handleSubmit = async (data: ProductVariantUpdateSubmitData) => { - const validationErrors = validateVariantData(data); + const validationProductErrors = validateProductVariant(data, intl); - setValidationErrors(validationErrors); + setValidationErrors(validationProductErrors); - if (validationErrors.length) { - return validationErrors; + if (validationProductErrors.length > 0) { + return validationProductErrors; } const apiErrors = await onSubmit(data); diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index 4d940823f99..ccc03ae538a 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -29,6 +29,8 @@ interface ProductVariantPriceProps { const numberOfColumns = 2; +const COMMON_CELL_STYLES = { verticalAlign: "baseline" }; + export const ProductVariantPrice: React.FC = props => { const { disabled = false, @@ -39,8 +41,11 @@ export const ProductVariantPrice: React.FC = props => disabledMessage, } = props; const intl = useIntl(); - const channelErrors = errors.filter(e => "channels" in e) as ProductChannelListingErrorFragment[]; - const apiErrors = getFormChannelErrors(["price", "costPrice"], channelErrors); + + const channelApiErrors = errors.filter( + e => "channels" in e, + ) as ProductChannelListingErrorFragment[]; + const apiErrors = getFormChannelErrors(["price", "costPrice"], channelApiErrors); if (disabled || !productVariantChannelListings.length) { return ( @@ -113,24 +118,32 @@ export const ProductVariantPrice: React.FC = props => {renderCollection( productVariantChannelListings, (listing, index) => { - const fieldName = `${listing.id}-channel-price`; + const fieldName = `${listing.id}-channelListing-price`; const formErrors = getFormErrors([fieldName], errors); - const priceError = + + const priceApiError = getFormChannelError(apiErrors.price, listing.id) || formErrors[fieldName]; const costPriceError = getFormChannelError(apiErrors.costPrice, listing.id); return ( - + {listing?.name || } - + {listing ? ( = props => } disabled={loading} required - hint={priceError && getProductErrorMessage(priceError, intl)} /> ) : ( )} - + {listing ? ( ({ + useIntl: jest.fn(() => ({ + formatMessage: jest.fn(x => x.defaultMessage), + })), + defineMessages: jest.fn(x => x), +})); describe("validateProductCreateData", () => { it("returns errors when there is no productType or name", () => { @@ -47,14 +60,14 @@ describe("validateProductCreateData", () => { __typename: "ProductError", attributes: [], code: "REQUIRED", - field: "chann-1-channel-price", + field: "chann-1-channelListing-price", message: null, }, { __typename: "ProductError", attributes: [], code: "REQUIRED", - field: "chann-2-channel-price", + field: "chann-2-channelListing-price", message: null, }, ]); @@ -77,4 +90,46 @@ describe("validateProductCreateData", () => { // Assert expect(errors).toEqual([]); }); + + it("returns 'required' errors on product variant form if price is not provided", () => { + const intl = useIntl(); + + // Arrange + const data = { + channelListings: [ + { + id: "channel1", + value: { + price: "", + }, + }, + { + id: "channel2", + value: { + price: null, + }, + }, + ], + variantName: "variant name", + } as unknown as ProductVariantType; + + // Act + const variantErrors = validateProductVariant(data, intl); + + // Assert + expect(variantErrors[0]).toEqual({ + __typename: "ProductError", + attributes: [], + code: "REQUIRED", + field: "channel1-channelListing-price", + message: "This field cannot be blank", + }); + expect(variantErrors[1]).toEqual({ + __typename: "ProductError", + attributes: [], + code: "REQUIRED", + field: "channel2-channelListing-price", + message: "This field cannot be blank", + }); + }); }); diff --git a/src/products/utils/validation.ts b/src/products/utils/validation.ts index 59df517832b..cf80949d19d 100644 --- a/src/products/utils/validation.ts +++ b/src/products/utils/validation.ts @@ -1,4 +1,6 @@ import { ProductErrorCode, ProductErrorWithAttributesFragment } from "@dashboard/graphql"; +import { IntlShape } from "react-intl"; +import { z } from "zod"; import { ProductCreateData } from "../components/ProductCreatePage"; import { ProductVariantCreateData } from "../components/ProductVariantCreatePage/form"; @@ -8,11 +10,15 @@ export const validatePrice = (price: string) => price === "" || parseInt(price, export const validateCostPrice = (price: string) => price !== "" && parseInt(price, 10) < 0; -const createEmptyRequiredError = (field: string): ProductErrorWithAttributesFragment => ({ +const toChannelPriceField = (id: string) => `${id}-channelListing-price`; +const createRequiredError = ( + field: string, + message: string | null = null, +): ProductErrorWithAttributesFragment => ({ __typename: "ProductError", code: ProductErrorCode.REQUIRED, field, - message: null, + message, attributes: [], }); @@ -20,11 +26,11 @@ export const validateProductCreateData = (data: ProductCreateData) => { let errors: ProductErrorWithAttributesFragment[] = []; if (!data.productType) { - errors = [...errors, createEmptyRequiredError("productType")]; + errors = [...errors, createRequiredError("productType")]; } if (!data.name) { - errors = [...errors, createEmptyRequiredError("name")]; + errors = [...errors, createRequiredError("name")]; } const { productType, channelListings } = data; @@ -32,7 +38,7 @@ export const validateProductCreateData = (data: ProductCreateData) => { if (!productType.hasVariants && channelListings) { const emptyPrices = data.channelListings .filter(channel => channel.price?.length === 0) - .map(({ id }) => createEmptyRequiredError(`${id}-channel-price`)); + .map(({ id }) => createRequiredError(toChannelPriceField(id))); errors = [...errors, ...emptyPrices]; } @@ -40,7 +46,58 @@ export const validateProductCreateData = (data: ProductCreateData) => { return errors; }; -export const validateVariantData = ( - data: ProductVariantCreateData | ProductVariantUpdateSubmitData, -): ProductErrorWithAttributesFragment[] => - !data.variantName ? [createEmptyRequiredError("variantName")] : []; +const channelListingValueSchema = z.object({ + price: z.number().or(z.string().min(1)), +}); + +const channelListingSchema = z + .object({ + channelListings: z.array( + z.object({ + value: channelListingValueSchema, + }), + ), + variantName: z.string().min(1), + }) + .partial(); + +export type ProductVariantType = ProductVariantCreateData | ProductVariantUpdateSubmitData; + +const handleValidationError = ( + error: z.ZodIssue, + data: ProductVariantType, + defaultMessage: string, +) => { + const defaultError = createRequiredError(error.path.join("-"), defaultMessage); + + switch (error.code) { + case "too_small": + case "invalid_union": + case "invalid_type": + if (error.path.includes("price") && error.path.includes("channelListings")) { + // Due to the way the form was written + // The path is in format "channelListing => {index} => price" + const index = error.path[1] as number; + const listing = data.channelListings[index]; + + return createRequiredError(toChannelPriceField(listing.id), defaultMessage); + } + + return defaultError; + default: + return defaultError; + } +}; + +export const validateProductVariant = (data: ProductVariantType, intl: IntlShape) => { + const result = channelListingSchema.safeParse(data); + + const defaultMessage = intl.formatMessage({ + defaultMessage: "This field cannot be blank", + id: "8pVWve", + }); + + return result.success === true + ? [] + : result.error.issues.map(error => handleValidationError(error, data, defaultMessage)); +}; diff --git a/src/products/views/ProductVariant/ProductVariant.tsx b/src/products/views/ProductVariant/ProductVariant.tsx index 08ff7b90a7b..841207ac1ed 100644 --- a/src/products/views/ProductVariant/ProductVariant.tsx +++ b/src/products/views/ProductVariant/ProductVariant.tsx @@ -120,6 +120,7 @@ export const ProductVariant: React.FC = ({ variantId, produc }); const [deleteAttributeValue, deleteAttributeValueOpts] = useAttributeValueDeleteMutation({}); const { handleSubmitChannels, updateChannelsOpts } = useSubmitChannels(); + const variant = data?.productVariant; const channels = createVariantChannels(variant); From 55e72b855b092756f40f933b7c0697f777496afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Tue, 16 Jul 2024 13:45:19 +0200 Subject: [PATCH 008/264] Fix typo in edit refund with line items (#5047) * Fix typo * Add changeset --- .changeset/fluffy-emus-build.md | 5 +++++ locale/defaultMessages.json | 8 ++++---- .../components/OrderTransactionRefundPage/messages.ts | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/fluffy-emus-build.md diff --git a/.changeset/fluffy-emus-build.md b/.changeset/fluffy-emus-build.md new file mode 100644 index 00000000000..e635a4ac7a1 --- /dev/null +++ b/.changeset/fluffy-emus-build.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Edit refund view no longer display title with typo when edit refund with line items diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index ba157fc85e7..fa3f482b007 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1161,6 +1161,10 @@ "5Vwnu+": { "string": "You have reached your SKU limit, you will be no longer able to add SKUs to your store. If you would like to up your limit, contact your administration staff about raising your limits." }, + "5W3qxG": { + "context": "edit refund title", + "string": "Edit refund with line items" + }, "5XG1CO": { "context": "acre-ft unit", "string": "acre-ft" @@ -6725,10 +6729,6 @@ "context": "gift card history message", "string": "Gift card was deactivated by {deactivatedBy}" }, - "gF6ueC": { - "context": "edit refund title", - "string": "Edit refund wiht line items" - }, "gKdGxP": { "context": "error message", "string": "Only pre-authorized payments can be captured" diff --git a/src/orders/components/OrderTransactionRefundPage/messages.ts b/src/orders/components/OrderTransactionRefundPage/messages.ts index e71bc4b2c2e..4d5a7fc3cfa 100644 --- a/src/orders/components/OrderTransactionRefundPage/messages.ts +++ b/src/orders/components/OrderTransactionRefundPage/messages.ts @@ -2,8 +2,8 @@ import { defineMessages } from "react-intl"; export const orderTransactionRefundMessages = defineMessages({ editRefundTitle: { - defaultMessage: "Edit refund wiht line items", - id: "gF6ueC", + defaultMessage: "Edit refund with line items", + id: "5W3qxG", description: "edit refund title", }, createRefundTitle: { From bd1a9f3c2b51ffb765cf7b9b4f376e56140d6da6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:07:23 +0200 Subject: [PATCH 009/264] Release 3.20 (#5049) Co-authored-by: github-actions[bot] --- .changeset/fair-boxes-wait.md | 5 ----- .changeset/few-brooms-give.md | 5 ----- .changeset/fluffy-emus-build.md | 5 ----- .changeset/happy-moles-enjoy.md | 5 ----- .changeset/hip-dryers-glow.md | 5 ----- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- 7 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 .changeset/fair-boxes-wait.md delete mode 100644 .changeset/few-brooms-give.md delete mode 100644 .changeset/fluffy-emus-build.md delete mode 100644 .changeset/happy-moles-enjoy.md delete mode 100644 .changeset/hip-dryers-glow.md diff --git a/.changeset/fair-boxes-wait.md b/.changeset/fair-boxes-wait.md deleted file mode 100644 index 7c97ae6b48d..00000000000 --- a/.changeset/fair-boxes-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now see macaw ui migration progress diff --git a/.changeset/few-brooms-give.md b/.changeset/few-brooms-give.md deleted file mode 100644 index cb0a2d562a1..00000000000 --- a/.changeset/few-brooms-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Product variant forms now show missing price and name errors when these fields are empty. diff --git a/.changeset/fluffy-emus-build.md b/.changeset/fluffy-emus-build.md deleted file mode 100644 index e635a4ac7a1..00000000000 --- a/.changeset/fluffy-emus-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Edit refund view no longer display title with typo when edit refund with line items diff --git a/.changeset/happy-moles-enjoy.md b/.changeset/happy-moles-enjoy.md deleted file mode 100644 index 648d210d4cf..00000000000 --- a/.changeset/happy-moles-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The legacy selects are no longer present within the codebase, this means you should use the ones from new macaw when developing the UI \ No newline at end of file diff --git a/.changeset/hip-dryers-glow.md b/.changeset/hip-dryers-glow.md deleted file mode 100644 index 86caf6ba4be..00000000000 --- a/.changeset/hip-dryers-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -You can run e2e for updating order with non-manual refunds in status draft/failure diff --git a/CHANGELOG.md b/CHANGELOG.md index 288ac70224c..ee7c383c3fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 3.21.0 + +### Minor Changes + +- d4e284996: You can run e2e for updating order with non-manual refunds in status draft/failure + +### Patch Changes + +- 81d909bd1: You can now see macaw ui migration progress +- 125883658: Product variant forms now show missing price and name errors when these fields are empty. +- 55e72b855: Edit refund view no longer display title with typo when edit refund with line items +- 27a47265a: The legacy selects are no longer present within the codebase, this means you should use the ones from new macaw when developing the UI + ## 3.20.0 ### Minor Changes diff --git a/package.json b/package.json index 8d8c36e61ef..affc2020901 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "3.20.0", + "version": "3.21.0", "main": "src/index.tsx", "repository": { "type": "git", From 5fae7839606b5c2998f92a212e2993d8b5f3e9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Tue, 16 Jul 2024 16:32:28 +0200 Subject: [PATCH 010/264] Fix prepare release 3.20 (#5050) --- CHANGELOG.md | 7 ++----- package.json | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee7c383c3fa..6f9dfb20a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,6 @@ # Changelog -## 3.21.0 - -### Minor Changes - -- d4e284996: You can run e2e for updating order with non-manual refunds in status draft/failure +## 3.20.1 ### Patch Changes @@ -12,6 +8,7 @@ - 125883658: Product variant forms now show missing price and name errors when these fields are empty. - 55e72b855: Edit refund view no longer display title with typo when edit refund with line items - 27a47265a: The legacy selects are no longer present within the codebase, this means you should use the ones from new macaw when developing the UI +- d4e284996: You can run e2e for updating order with non-manual refunds in status draft/failure ## 3.20.0 diff --git a/package.json b/package.json index affc2020901..253dfbacafd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "3.21.0", + "version": "3.20.1", "main": "src/index.tsx", "repository": { "type": "git", From 088842b70c74a64ac40a83142b8a2b590e3dfaff Mon Sep 17 00:00:00 2001 From: Renata Date: Wed, 17 Jul 2024 11:39:51 +0200 Subject: [PATCH 011/264] [E2E] [TEST] Inline discount is applied in a draft order (#5046) * adding changeset * In line discount is applied in draft order --- .changeset/slimy-eggs-heal.md | 5 +++ playwright/data/e2eTestData.ts | 19 +++++++++ playwright/pages/basePage.ts | 1 + playwright/pages/dialogs/addProductsDialog.ts | 4 +- playwright/pages/draftOrdersPage.ts | 1 + playwright/pages/ordersPage.ts | 11 +++++ playwright/tests/orders.spec.ts | 40 +++++++++++++++++++ src/components/Money/Money.tsx | 2 +- .../OrderDraftDetailsSummary.tsx | 2 +- 9 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 .changeset/slimy-eggs-heal.md diff --git a/.changeset/slimy-eggs-heal.md b/.changeset/slimy-eggs-heal.md new file mode 100644 index 00000000000..fc6dfdb15b8 --- /dev/null +++ b/.changeset/slimy-eggs-heal.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can run E2E tests for inline discounts in draft orders diff --git a/playwright/data/e2eTestData.ts b/playwright/data/e2eTestData.ts index ed2451ccd82..f100c0f88e1 100644 --- a/playwright/data/e2eTestData.ts +++ b/playwright/data/e2eTestData.ts @@ -404,12 +404,31 @@ export const PRODUCTS = { "a product to be deleted via bulk 3/3", ], }, + productWithDiscountChannelPLN: { + id: "UHJvZHVjdDo3NzA=", + name: "e2e-do-not-touch", + rewardPercentageDiscountValue: 40, + variant: { + id: "UHJvZHVjdFZhcmlhbnQ6MTIzOQ==", + sku: "TEST-123", + undiscountedPrice: 100, + discountedPrice: 60, + }, + }, }; export const ORDERS = { draftOrdersToBeDeleted: { ids: ["#3266", "#3265"], }, + draftOrderChannelPLN: { + id: "T3JkZXI6Zjg0NTk3N2EtM2Y3Yy00NDY3LWI3N2MtZDY0ZjhhMDU2MmQy", + productInBasket: { + name: "Black Hoodie", + price: 20, + variantId: "UHJvZHVjdFZhcmlhbnQ6Mjk3", + }, + }, ordersWithinTransactionFlow: { markAsPaidOrder: { orderId: "T3JkZXI6MDE4ZWM0NGUtNTgwMC00NGM0LTliMzAtZDE3YTIxYjljOTgz", diff --git a/playwright/pages/basePage.ts b/playwright/pages/basePage.ts index dd012e59a07..3a4fb5b1b7b 100644 --- a/playwright/pages/basePage.ts +++ b/playwright/pages/basePage.ts @@ -323,6 +323,7 @@ export class BasePage { state: "hidden", timeout: 30000, }); + await this.waitForDOMToFullyLoad(); } async waitForCanvasContainsText(text: string) { diff --git a/playwright/pages/dialogs/addProductsDialog.ts b/playwright/pages/dialogs/addProductsDialog.ts index 40c07766d20..8f9cb8ea933 100644 --- a/playwright/pages/dialogs/addProductsDialog.ts +++ b/playwright/pages/dialogs/addProductsDialog.ts @@ -18,6 +18,7 @@ export class AddProductsDialog extends BasePage { async clickConfirmButton() { await this.confirmButton.click(); + await this.waitForDOMToFullyLoad(); } async clickBackButton() { @@ -26,12 +27,13 @@ export class AddProductsDialog extends BasePage { async searchForProductInDialog(productName: string) { await this.searchInput.fill(productName); + await this.waitForDOMToFullyLoad(); } async selectVariantBySKU(sku: string) { const variant = this.variantRow.filter({ hasText: `SKU ${sku}` }); await variant.waitFor({ state: "visible" }); - await variant.getByRole("checkbox").click(); + await variant.getByRole("checkbox").first().click(); } } diff --git a/playwright/pages/draftOrdersPage.ts b/playwright/pages/draftOrdersPage.ts index d86d9cfddb5..39ac3bac584 100644 --- a/playwright/pages/draftOrdersPage.ts +++ b/playwright/pages/draftOrdersPage.ts @@ -30,6 +30,7 @@ export class DraftOrdersPage extends BasePage { readonly addProducts = page.getByTestId("add-products-button"), readonly finalizeButton = page.getByTestId("button-bar-confirm"), readonly addShippingCarrierLink = page.getByTestId("add-shipping-carrier"), + readonly basketProductList = page.getByTestId("list"), ) { super(page); this.page = page; diff --git a/playwright/pages/ordersPage.ts b/playwright/pages/ordersPage.ts index fb551ccf15a..9258f84cc65 100644 --- a/playwright/pages/ordersPage.ts +++ b/playwright/pages/ordersPage.ts @@ -11,6 +11,7 @@ import { ShippingAddressDialog } from "@pages/dialogs/shippingMethodDialog"; import { Page } from "@playwright/test"; import { OrderRefundDialog } from "./dialogs/orderRefundDialog"; +import { DraftOrdersPage } from "./draftOrdersPage"; export class OrdersPage extends BasePage { orderCreateDialog: OrderCreateDialog; @@ -56,7 +57,11 @@ export class OrdersPage extends BasePage { readonly orderRefundModal = page.getByTestId("order-refund-dialog"), readonly orderRefundSection = page.getByTestId("order-refund-section"), readonly orderRefundList = page.getByTestId("refund-list"), + readonly orderSummary = page.getByTestId("order-summary"), readonly editRefundButton = page.getByTestId("edit-refund-button").locator("button"), + readonly totalPrice = page + .getByTestId("order-total-price") + .locator(page.getByTestId("money-value")), ) { super(page); this.markOrderAsPaidDialog = new MarkOrderAsPaidDialog(page); @@ -75,6 +80,11 @@ export class OrdersPage extends BasePage { await this.createOrderButton.click(); } + async goToDraftOrdersListView() { + await this.page.goto(URL_LIST.draftOrders); + await this.waitForGrid(); + } + async clickAddTrackingButton() { await this.addTrackingButton.click(); } @@ -114,6 +124,7 @@ export class OrdersPage extends BasePage { await console.log("Navigating to order details view: " + orderLink); await this.page.goto(orderLink); await this.waitForDOMToFullyLoad(); + await this.waitForGrid(); } async clickAddRefundButton() { diff --git a/playwright/tests/orders.spec.ts b/playwright/tests/orders.spec.ts index a6d4cb4327c..6478df38cdf 100644 --- a/playwright/tests/orders.spec.ts +++ b/playwright/tests/orders.spec.ts @@ -335,3 +335,43 @@ for (const refund of orderRefunds) { await expect(ordersPage.orderRefundList).not.toContainText(refund.status); }); } +test(`TC: SALEOR_215 Inline discount is applied in a draft order @draft @discounts @e2e`, async page => { + test.slow(); + + const discountedProduct = PRODUCTS.productWithDiscountChannelPLN; + const productAlreadyInBasket = ORDERS.draftOrderChannelPLN.productInBasket; + + await ordersPage.goToExistingOrderPage(ORDERS.draftOrderChannelPLN.id); + await draftOrdersPage.basketProductList.waitFor({ state: "visible" }); + + const initialTotal = await ordersPage.orderSummary.locator(ordersPage.totalPrice).innerText(); + + expect(initialTotal).toContain(productAlreadyInBasket.price.toString()); + await draftOrdersPage.clickAddProductsButton(); + await draftOrdersPage.addProductsDialog.searchForProductInDialog(discountedProduct.name); + await draftOrdersPage.addProductsDialog.selectVariantBySKU(discountedProduct.variant.sku); + await draftOrdersPage.addProductsDialog.clickConfirmButton(); + await draftOrdersPage.expectElementIsHidden(draftOrdersPage.dialog); + await draftOrdersPage.expectElementIsHidden(draftOrdersPage.successBanner); + + const calculatedDiscountForAddedProduct = + (await discountedProduct.variant.undiscountedPrice) - + (discountedProduct.variant.undiscountedPrice * + discountedProduct.rewardPercentageDiscountValue) / + 100; + + expect(discountedProduct.variant.discountedPrice).toEqual(calculatedDiscountForAddedProduct); + + const undiscountedTotal = + productAlreadyInBasket.price + discountedProduct.variant.undiscountedPrice; + + await ordersPage.totalPrice.waitFor({ state: "visible" }); + + const finalTotal = await ordersPage.orderSummary.locator(ordersPage.totalPrice).innerText(); + + expect(finalTotal.slice(3)).not.toContain(undiscountedTotal.toString()); + + const discountedTotal = productAlreadyInBasket.price + discountedProduct.variant.discountedPrice; + + expect(finalTotal.slice(3)).toContain(discountedTotal.toString()); +}); diff --git a/src/components/Money/Money.tsx b/src/components/Money/Money.tsx index 62fcf6f3130..e27fd9ea5c1 100644 --- a/src/components/Money/Money.tsx +++ b/src/components/Money/Money.tsx @@ -32,7 +32,7 @@ export const Money: React.FC = props => { } return ( - + {money.currency} {formatMoneyAmount(money, locale)} diff --git a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx index b630a93b186..ca1071a8be1 100644 --- a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx +++ b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx @@ -150,7 +150,7 @@ const OrderDraftDetailsSummary: React.FC = props }; return ( - +
@@ -137,7 +139,7 @@ const DiscountCategories: React.FC = props => { )} - + ); }; diff --git a/src/discounts/components/DiscountCollections/DiscountCollections.tsx b/src/discounts/components/DiscountCollections/DiscountCollections.tsx index 7e75d194bb4..b4365cd2446 100644 --- a/src/discounts/components/DiscountCollections/DiscountCollections.tsx +++ b/src/discounts/components/DiscountCollections/DiscountCollections.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import { collectionUrl } from "@dashboard/collections/urls"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -11,7 +11,7 @@ import { TablePaginationWithContext } from "@dashboard/components/TablePaginatio import TableRowLink from "@dashboard/components/TableRowLink"; import { SaleDetailsFragment, VoucherDetailsFragment } from "@dashboard/graphql"; import { mapEdgesToItems } from "@dashboard/utils/maps"; -import { Card, TableBody, TableCell, TableFooter } from "@material-ui/core"; +import { TableBody, TableCell, TableFooter } from "@material-ui/core"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -44,15 +44,17 @@ const DiscountCollections: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage(messages.discountCollectionsHeader)} + + - } - /> + + @@ -137,7 +139,7 @@ const DiscountCollections: React.FC = props => { )} - + ); }; diff --git a/src/discounts/components/DiscountDates/DiscountDates.tsx b/src/discounts/components/DiscountDates/DiscountDates.tsx index 49c81dd1bcf..4e6ef49df12 100644 --- a/src/discounts/components/DiscountDates/DiscountDates.tsx +++ b/src/discounts/components/DiscountDates/DiscountDates.tsx @@ -37,13 +37,15 @@ const DiscountDates = ({ return ( - - - + + + + + diff --git a/src/discounts/components/DiscountDescription/DiscountDescription.tsx b/src/discounts/components/DiscountDescription/DiscountDescription.tsx index 9da5c2a7292..bdf90dadccd 100644 --- a/src/discounts/components/DiscountDescription/DiscountDescription.tsx +++ b/src/discounts/components/DiscountDescription/DiscountDescription.tsx @@ -23,9 +23,11 @@ export const DiscountDescription = ({ return ( - - - + + + + + {isReadyForMount ? ( - - - + + + + + - - + + + {intl.formatMessage(messages.usageLimitsTitle)} + + - - + + ); }; diff --git a/src/discounts/components/VoucherListPage/VoucherListPage.tsx b/src/discounts/components/VoucherListPage/VoucherListPage.tsx index 75623927f4f..1b52a94cce1 100644 --- a/src/discounts/components/VoucherListPage/VoucherListPage.tsx +++ b/src/discounts/components/VoucherListPage/VoucherListPage.tsx @@ -2,6 +2,7 @@ import { ListFilters } from "@dashboard/components/AppLayout/ListFilters"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { BulkDeleteButton } from "@dashboard/components/BulkDeleteButton"; +import { DashboardCard } from "@dashboard/components/Card"; import { getByName } from "@dashboard/components/Filter/utils"; import { FilterPresetsSelect } from "@dashboard/components/FilterPresetsSelect"; import { ListPageLayout } from "@dashboard/components/Layouts"; @@ -15,7 +16,6 @@ import { PageListProps, SortPage, } from "@dashboard/types"; -import { Card } from "@material-ui/core"; import { Box, Button, ChevronRightIcon } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -100,7 +100,7 @@ const VoucherListPage: React.FC = ({ - + currencySymbol={currencySymbol} initialSearch={initialSearch} @@ -123,7 +123,7 @@ const VoucherListPage: React.FC = ({ /> - + ); }; diff --git a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx index be7b0b47286..6e2f0d799b8 100644 --- a/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx +++ b/src/discounts/components/VoucherRequirements/VoucherRequirements.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { FormSpacer } from "@dashboard/components/FormSpacer"; import PriceField from "@dashboard/components/PriceField"; import RadioGroupField from "@dashboard/components/RadioGroupField"; @@ -13,7 +13,7 @@ import { DiscountErrorFragment } from "@dashboard/graphql"; import { renderCollection } from "@dashboard/misc"; import { getFormErrors } from "@dashboard/utils/errors"; import getDiscountErrorMessage from "@dashboard/utils/errors/discounts"; -import { Card, CardContent, TableBody, TableCell, TextField, Typography } from "@material-ui/core"; +import { TableBody, TableCell, TextField, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -69,15 +69,17 @@ const VoucherRequirements = ({ ]; return ( - - - + + + + {intl.formatMessage({ + id: "yhv3HX", + defaultMessage: "Minimum Requirements", + description: "voucher requirements, header", + })} + + + ) : null} - - + + ); }; diff --git a/src/discounts/components/VoucherSummary/VoucherSummary.tsx b/src/discounts/components/VoucherSummary/VoucherSummary.tsx index bba4a6294c7..5dbde983ae0 100644 --- a/src/discounts/components/VoucherSummary/VoucherSummary.tsx +++ b/src/discounts/components/VoucherSummary/VoucherSummary.tsx @@ -1,5 +1,5 @@ +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import Date from "@dashboard/components/Date"; import FormSpacer from "@dashboard/components/FormSpacer"; import Hr from "@dashboard/components/Hr"; @@ -9,7 +9,7 @@ import Skeleton from "@dashboard/components/Skeleton"; import { DiscountValueTypeEnum, VoucherDetailsFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { ChannelProps } from "@dashboard/types"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -28,9 +28,11 @@ const VoucherSummary: React.FC = ({ selectedChannelId, vouc ); return ( - - - + + + {intl.formatMessage(commonMessages.summary)} + + @@ -118,8 +120,8 @@ const VoucherSummary: React.FC = ({ selectedChannelId, vouc {voucher?.used ?? } - - + + ); }; diff --git a/src/discounts/components/VoucherTypes/VoucherTypes.tsx b/src/discounts/components/VoucherTypes/VoucherTypes.tsx index 74afdd33d4f..42a721afa36 100644 --- a/src/discounts/components/VoucherTypes/VoucherTypes.tsx +++ b/src/discounts/components/VoucherTypes/VoucherTypes.tsx @@ -1,11 +1,11 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Grid from "@dashboard/components/Grid"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import { DiscountTypeEnum } from "@dashboard/discounts/types"; import { DiscountErrorFragment } from "@dashboard/graphql"; import { getFormErrors } from "@dashboard/utils/errors"; import getDiscountErrorMessage from "@dashboard/utils/errors/discounts"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -49,15 +49,17 @@ const VoucherTypes = ({ data, disabled, errors, onChange }: VoucherTypesProps) = ]; return ( - - - + + + + {intl.formatMessage({ + id: "6cq+c+", + defaultMessage: "Discount Type", + description: "header", + })} + + + - - + + ); }; diff --git a/src/discounts/components/VoucherValue/VoucherValue.tsx b/src/discounts/components/VoucherValue/VoucherValue.tsx index 38190cc3c78..1097d4ede19 100644 --- a/src/discounts/components/VoucherValue/VoucherValue.tsx +++ b/src/discounts/components/VoucherValue/VoucherValue.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import { FormSpacer } from "@dashboard/components/FormSpacer"; import RadioGroupField from "@dashboard/components/RadioGroupField"; @@ -13,7 +13,7 @@ import { DiscountErrorFragment } from "@dashboard/graphql"; import { renderCollection } from "@dashboard/misc"; import { getFormErrors } from "@dashboard/utils/errors"; import getDiscountErrorMessage from "@dashboard/utils/errors/discounts"; -import { Card, CardContent, TableBody, TableCell, Typography } from "@material-ui/core"; +import { TableBody, TableCell, Typography } from "@material-ui/core"; import { Input, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -49,15 +49,17 @@ const VoucherValue: React.FC = props => { })); return ( - - - + + + + {intl.formatMessage({ + id: "/oaqFS", + defaultMessage: "Value", + description: "section header", + })} + + +
@@ -178,8 +180,8 @@ const VoucherValue: React.FC = props => { onChange={onChange} disabled={disabled} /> - - + + ); }; diff --git a/src/giftCards/GiftCardSettings/GiftCardExpirySettingsCard/GiftCardExpirySettingsCard.tsx b/src/giftCards/GiftCardSettings/GiftCardExpirySettingsCard/GiftCardExpirySettingsCard.tsx index eca9a4e53bd..b44e90f90af 100644 --- a/src/giftCards/GiftCardSettings/GiftCardExpirySettingsCard/GiftCardExpirySettingsCard.tsx +++ b/src/giftCards/GiftCardSettings/GiftCardExpirySettingsCard/GiftCardExpirySettingsCard.tsx @@ -1,9 +1,9 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import GiftCardSettingsExpirySelect, { GiftCardSettingsExpirySelectProps, } from "@dashboard/giftCards/components/GiftCardSettingsExpirySelect"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -36,12 +36,13 @@ const GiftCardExpirySettingsCard: React.FC = ({ const classes = useStyles({}); return ( - - - + + + + {intl.formatMessage(messages.expiryDateTitle)} + + + = ({ disabled={disabled} errors={errors} /> - - + + ); }; diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdateDetailsCard/GiftCardUpdateDetailsCard.tsx b/src/giftCards/GiftCardUpdate/GiftCardUpdateDetailsCard/GiftCardUpdateDetailsCard.tsx index 5f60508d024..996bb63d26d 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdateDetailsCard/GiftCardUpdateDetailsCard.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdateDetailsCard/GiftCardUpdateDetailsCard.tsx @@ -1,11 +1,11 @@ import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import Skeleton from "@dashboard/components/Skeleton"; import VerticalSpacer from "@dashboard/components/VerticalSpacer"; import GiftCardTagInput from "@dashboard/giftCards/components/GiftCardTagInput"; import GiftCardUpdateExpirySelect from "@dashboard/giftCards/GiftCardUpdate/GiftCardUpdateExpirySelect"; -import { Card, CardContent, Divider, Typography } from "@material-ui/core"; +import { Divider, Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -26,19 +26,18 @@ const GiftCardUpdateDetailsCard: React.FC = () => { } = useGiftCardUpdateForm(); return ( - - + + {intl.formatMessage(messages.title)} + + {!loading && !giftCard?.isExpired && ( - ) - } - /> - + )} + + + {loading ? ( ) : ( @@ -61,8 +60,8 @@ const GiftCardUpdateDetailsCard: React.FC = () => { )} - - + + ); }; diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCard.tsx b/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCard.tsx index f7b8feb18b6..c132ecd7454 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCard.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCard.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Skeleton from "@dashboard/components/Skeleton"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -13,10 +13,14 @@ const GiftCardUpdateInfoCard: React.FC = () => { const { loading } = useGiftCardDetails(); return ( - - - {loading ? : } - + + + {intl.formatMessage(messages.title)} + + + {loading ? : } + + ); }; diff --git a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx index 5629d404137..44140b0fbbb 100644 --- a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx +++ b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx @@ -1,11 +1,10 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import CollectionWithDividers from "@dashboard/components/CollectionWithDividers"; import Link from "@dashboard/components/Link"; import { DashboardModal } from "@dashboard/components/Modal"; import PreviewPill from "@dashboard/components/PreviewPill"; -import Skeleton from "@dashboard/components/Skeleton"; import VerticalSpacer from "@dashboard/components/VerticalSpacer"; import { useCustomerDetails } from "@dashboard/customers/hooks/useCustomerDetails"; import GiftCardCreateDialogContent from "@dashboard/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent"; @@ -14,7 +13,7 @@ import { giftCardListUrl } from "@dashboard/giftCards/urls"; import { useCustomerGiftCardListQuery } from "@dashboard/graphql"; import { getFullName } from "@dashboard/misc"; import { mapEdgesToItems } from "@dashboard/utils/maps"; -import { Card, CardActions } from "@material-ui/core"; +import { Skeleton, sprinkles } from "@saleor/macaw-ui-next"; import * as React from "react"; import { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -22,7 +21,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import CustomerGiftCardsCardListItem from "./CustomerGiftCardsCardListItem"; import { giftCardCustomerCardMessages as messages } from "./messages"; import { CUSTOMER_GIFT_CARD_LIST_QUERY } from "./queries"; -import { useCardActionsStyles } from "./styles"; const CustomerGiftCardsCard: React.FC = () => { const intl = useIntl(); @@ -45,10 +43,6 @@ const CustomerGiftCardsCard: React.FC = () => { const giftCards = mapEdgesToItems(data?.giftCards); - const classes = useCardActionsStyles({ - buttonPosition: giftCards?.length > 0 ? "right" : "left", - }); - const viewAllGiftCardsUrl = giftCardListUrl({ usedBy: [id], }); @@ -59,27 +53,28 @@ const CustomerGiftCardsCard: React.FC = () => { return ( <> - - + + + + + + <> {!!giftCards?.length && ( )} - + - } - > - - - + + + {!loading && giftCards ? ( { withOuterDividers /> ) : ( - + )} - + - - + + ({ - cardActions: { - padding: `${theme.spacing(2)} ${theme.spacing(3)}`, - flexDirection: ({ buttonPosition }: CustomerGiftCardsCardActionsProps) => - buttonPosition === "left" ? "row" : "row-reverse", - }, - previewPill: { - marginLeft: theme.spacing(1), - }, - }), - { name: "CustomerGiftCardsCard" }, -); - export const useListWrapperStyles = makeStyles( theme => ({ listingWrapper: { diff --git a/src/home/components/HomeActivityCard/HomeActivityCard.tsx b/src/home/components/HomeActivityCard/HomeActivityCard.tsx index ac9fc315286..942c0e354a2 100644 --- a/src/home/components/HomeActivityCard/HomeActivityCard.tsx +++ b/src/home/components/HomeActivityCard/HomeActivityCard.tsx @@ -25,7 +25,9 @@ export const HomeActivityCard = ({ activities, testId }: HomeActivityCardProps) if (activities.hasError) { return ( - {title} + + {title} + @@ -38,7 +40,9 @@ export const HomeActivityCard = ({ activities, testId }: HomeActivityCardProps) if (activities.loading) { return ( - {title} + + {title} + @@ -52,7 +56,9 @@ export const HomeActivityCard = ({ activities, testId }: HomeActivityCardProps) return ( - {title} + + {title} + {renderCollection( diff --git a/src/navigation/components/MenuItems/MenuItems.tsx b/src/navigation/components/MenuItems/MenuItems.tsx index a9a9f98cea5..a6b0980f0af 100644 --- a/src/navigation/components/MenuItems/MenuItems.tsx +++ b/src/navigation/components/MenuItems/MenuItems.tsx @@ -29,18 +29,20 @@ const MenuItems: React.FC = props => { return ( - - - {intl.formatMessage({ - id: "dEUZg2", - defaultMessage: "Menu Items", - description: "header", - })} - - - + + + + {intl.formatMessage({ + id: "dEUZg2", + defaultMessage: "Menu Items", + description: "header", + })} + + + + {items === undefined ? ( diff --git a/src/navigation/components/MenuList/MenuList.tsx b/src/navigation/components/MenuList/MenuList.tsx index 769cad60daf..24956a847d5 100644 --- a/src/navigation/components/MenuList/MenuList.tsx +++ b/src/navigation/components/MenuList/MenuList.tsx @@ -1,4 +1,5 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import IconButtonTableCell from "@dashboard/components/IconButtonTableCell"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; @@ -13,7 +14,7 @@ import { maybe, renderCollection } from "@dashboard/misc"; import { MenuListUrlSortField, menuUrl } from "@dashboard/navigation/urls"; import { ListActions, ListProps, SortPage } from "@dashboard/types"; import { getArrowDirection } from "@dashboard/utils/sort"; -import { Card, TableBody, TableCell, TableFooter } from "@material-ui/core"; +import { TableBody, TableCell, TableFooter } from "@material-ui/core"; import { DeleteIcon, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -65,7 +66,7 @@ const MenuList: React.FC = props => { const classes = useStyles(props); return ( - + = props => { )} - + ); }; diff --git a/src/navigation/components/MenuProperties/MenuProperties.tsx b/src/navigation/components/MenuProperties/MenuProperties.tsx index 5cd97a0135f..4d847d139dd 100644 --- a/src/navigation/components/MenuProperties/MenuProperties.tsx +++ b/src/navigation/components/MenuProperties/MenuProperties.tsx @@ -1,9 +1,9 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { MenuErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getMenuErrorMessage from "@dashboard/utils/errors/menu"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -21,9 +21,13 @@ const MenuProperties: React.FC = ({ data, disabled, errors, const formErrors = getFormErrors(["name"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = ({ data, disabled, errors, value={data.name} onChange={onChange} /> - - + + ); }; diff --git a/src/orders/components/OrderChannelSectionCard/OrderChannelSectionCard.tsx b/src/orders/components/OrderChannelSectionCard/OrderChannelSectionCard.tsx index 70b69c61baa..9c12b8da74a 100644 --- a/src/orders/components/OrderChannelSectionCard/OrderChannelSectionCard.tsx +++ b/src/orders/components/OrderChannelSectionCard/OrderChannelSectionCard.tsx @@ -1,9 +1,9 @@ import { channelUrl } from "@dashboard/channels/urls"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Link from "@dashboard/components/Link"; import Skeleton from "@dashboard/components/Skeleton"; import { ChannelFragment } from "@dashboard/graphql"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -15,15 +15,17 @@ export const OrderChannelSectionCard: React.FC = ( const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "aY0HAT", + defaultMessage: "Sales channel", + description: "section header", + })} + + + {!channel ? ( ) : ( @@ -33,8 +35,8 @@ export const OrderChannelSectionCard: React.FC = ( )} - - + + ); }; OrderChannelSectionCard.displayName = "OrderChannelSectionCard"; diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index 22ecf2b5244..a5bd3596c49 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import AddressFormatter from "@dashboard/components/AddressFormatter"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Combobox } from "@dashboard/components/Combobox"; import ExternalLink from "@dashboard/components/ExternalLink"; import Form from "@dashboard/components/Form"; @@ -22,7 +22,7 @@ import { buttonMessages } from "@dashboard/intl"; import { ff_orderListUrl, orderListUrl } from "@dashboard/orders/urls"; import { FetchMoreProps, RelayToFlat } from "@dashboard/types"; import createSingleAutocompleteSelectHandler from "@dashboard/utils/handlers/singleAutocompleteSelectChangeHandler"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -88,15 +88,17 @@ const OrderCustomer: React.FC = props => { const { enabled: orderFiltersEnabled } = useFlag("order_filters"); return ( - - + + + {intl.formatMessage({ + id: "Y7M1YQ", + defaultMessage: "Customer", + description: "section header", + })} + + + {!!canEditCustomer && ( - ) - } - /> - + )} + + {" "} + {user === undefined ? ( ) : isInEditMode && canEditCustomer ? ( @@ -215,11 +217,11 @@ const OrderCustomer: React.FC = props => {
*/} )} -
+ {!!user && ( <>
- +
= props => { {maybe(() => order.userEmail)} )} - + )}
- +
@@ -291,9 +293,9 @@ const OrderCustomer: React.FC = props => { )} )} - +
- +
@@ -337,8 +339,8 @@ const OrderCustomer: React.FC = props => { )} )} - - + + ); }; diff --git a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx index f6bfb7d34e1..7cbbfb91b7d 100644 --- a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx +++ b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Skeleton from "@dashboard/components/Skeleton"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -12,15 +12,17 @@ export const OrderCustomerNote: React.FC = ({ note }) => const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "puALFo", + defaultMessage: "Notes", + description: "notes about customer, header", + })} + + + {note === undefined ? ( ) : note === "" ? ( @@ -30,8 +32,8 @@ export const OrderCustomerNote: React.FC = ({ note }) => ) : ( {note} )} - - + + ); }; export default OrderCustomerNote; diff --git a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx index a6312c16f1a..7a2fad5c69e 100644 --- a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx +++ b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx @@ -1,3 +1,4 @@ +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { DashboardModal } from "@dashboard/components/Modal"; @@ -7,7 +8,7 @@ import { DiscountValueTypeEnum, MoneyFragment } from "@dashboard/graphql"; import { useUpdateEffect } from "@dashboard/hooks/useUpdateEffect"; import { buttonMessages } from "@dashboard/intl"; import { toFixed } from "@dashboard/utils/toFixed"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React, { ChangeEvent, useEffect, useRef, useState } from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -243,9 +244,9 @@ const OrderDiscountCommonModal: React.FC = ({ const isSubmitDisabled = !getParsedDiscountValue() || !!valueErrorMsg || isAmountTooLarge(); return ( - + - + = ({ {intl.formatMessage(buttonMessages.confirm)} - - + + ); }; diff --git a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx index 2e09b7559c2..cd1ff395a53 100644 --- a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx +++ b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ChannelUsabilityDataQuery, OrderDetailsFragment, @@ -11,7 +11,7 @@ import { OrderDiscountContext, OrderDiscountContextConsumerProps, } from "@dashboard/products/components/OrderDiscountProviders/OrderDiscountProvider"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -47,22 +47,23 @@ const OrderDraftDetails: React.FC = ({ const areProductsInChannel = !!channelUsabilityData?.products.totalCount; return ( - - + + + {intl.formatMessage({ + id: "18wvf7", + defaultMessage: "Order Details", + description: "section header", + })} + + + {isChannelActive && areProductsInChannel && ( - ) - } - /> + )} + + = ({ onShowMetadata={onShowMetadata} /> {maybe(() => order.lines.length) !== 0 && ( - + {(orderDiscountProps: OrderDiscountContextConsumerProps) => ( = ({ /> )} - + )} - + ); }; diff --git a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx index d43a1083d7b..535fca25951 100644 --- a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx +++ b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx @@ -1,11 +1,11 @@ // @ts-strict-ignore import { ListFilters } from "@dashboard/components/AppLayout/ListFilters"; import { BulkDeleteButton } from "@dashboard/components/BulkDeleteButton"; +import { DashboardCard } from "@dashboard/components/Card"; import { OrderDraftListQuery, RefreshLimitsQuery } from "@dashboard/graphql"; import { OrderDraftListUrlSortField } from "@dashboard/orders/urls"; import { FilterPagePropsWithPresets, PageListProps, RelayToFlat, SortPage } from "@dashboard/types"; import { isLimitReached } from "@dashboard/utils/limits"; -import { Card } from "@material-ui/core"; import { Box } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { useIntl } from "react-intl"; @@ -75,7 +75,7 @@ const OrderDraftListPage: React.FC = ({ {limitsReached && } - + = ({ hasRowHover={!isFilterPresetOpen} {...listProps} /> - + ); }; diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx index 23ddb581aca..55a08fc8de0 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import Form from "@dashboard/components/Form"; @@ -35,7 +35,7 @@ import { getToFulfillOrderLines, OrderFulfillLineFormData, } from "@dashboard/orders/utils/data"; -import { Card, CardContent, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import { Box, Tooltip } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import React from "react"; @@ -182,8 +182,12 @@ const OrderFulfillPage: React.FC = props => { > {({ change, data, submit }) => ( <> - - + + + + {intl.formatMessage(messages.itemsReadyToShip)} + + {order ? ( @@ -227,26 +231,30 @@ const OrderFulfillPage: React.FC = props => { ) : ( - + - + )} - + {shopSettings?.fulfillmentAutoApprove && ( - - - + + + + {intl.formatMessage(messages.shipmentInformation)} + + + - - + + )} diff --git a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx index 7da681f3dfd..670cf7f931e 100644 --- a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx @@ -1,9 +1,9 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import { FulfillmentStatus, OrderDetailsFragment } from "@dashboard/graphql"; import TrashIcon from "@dashboard/icons/Trash"; import { orderHasTransactions } from "@dashboard/orders/types"; import { mergeRepeatedOrderLines } from "@dashboard/orders/utils/data"; -import { CardContent } from "@material-ui/core"; import { IconButton } from "@saleor/macaw-ui"; import { Box, Divider } from "@saleor/macaw-ui-next"; import React from "react"; @@ -90,10 +90,10 @@ const OrderFulfilledProductsCard: React.FC = pr } /> - + - + {props.children} diff --git a/src/orders/components/OrderFulfillmentSettings/OrderFulfillmentSettings.tsx b/src/orders/components/OrderFulfillmentSettings/OrderFulfillmentSettings.tsx index 8a0e3b17060..270d09d1325 100644 --- a/src/orders/components/OrderFulfillmentSettings/OrderFulfillmentSettings.tsx +++ b/src/orders/components/OrderFulfillmentSettings/OrderFulfillmentSettings.tsx @@ -1,7 +1,7 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import FormSpacer from "@dashboard/components/FormSpacer"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -22,15 +22,17 @@ const OrderFulfillmentSettings: React.FC = ({ const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "G3ay2p", + defaultMessage: "Fulfillment settings", + description: "section header", + })} + + + = ({ disabled={disabled} data-test-id="fulfillment-allow-unpaid-checkbox" /> - - + + ); }; diff --git a/src/orders/components/OrderGrantedRefunds/OrderGrantedRefunds.tsx b/src/orders/components/OrderGrantedRefunds/OrderGrantedRefunds.tsx index f1ae0dc49ba..59947ec1b77 100644 --- a/src/orders/components/OrderGrantedRefunds/OrderGrantedRefunds.tsx +++ b/src/orders/components/OrderGrantedRefunds/OrderGrantedRefunds.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import EventTime from "@dashboard/components/EventTime"; import Money, { formatMoney } from "@dashboard/components/Money"; import OverflowTooltip from "@dashboard/components/OverflowTooltip"; @@ -11,7 +11,7 @@ import useLocale from "@dashboard/hooks/useLocale"; import { buttonMessages } from "@dashboard/intl"; import { getUserInitials, renderCollection } from "@dashboard/misc"; import { orderGrantRefundEditUrl } from "@dashboard/orders/urls"; -import { Card, TableCell, TableRow } from "@material-ui/core"; +import { TableCell, TableRow } from "@material-ui/core"; import { Avatar } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -35,10 +35,9 @@ const OrderGrantedRefunds: React.FC = ({ order }) => { const unsettled = order.totalRemainingGrant; return ( - - + +
@@ -54,8 +53,8 @@ const OrderGrantedRefunds: React.FC = ({ order }) => { )}
- } - > + + {renderCollection(order?.grantedRefunds, grantedRefund => ( @@ -87,7 +86,7 @@ const OrderGrantedRefunds: React.FC = ({ order }) => { ))} - + ); }; diff --git a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx index 7d1608bf963..e1901953369 100644 --- a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx +++ b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx @@ -1,13 +1,13 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Date from "@dashboard/components/Date"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; import TableRowLink from "@dashboard/components/TableRowLink"; import { InvoiceFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; -import { Card, CardContent, TableBody, TableCell, Typography } from "@material-ui/core"; +import { TableBody, TableCell, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { sprinkles } from "@saleor/macaw-ui-next"; import React from "react"; @@ -54,15 +54,17 @@ const OrderInvoiceList: React.FC = props => { const generatedInvoices = invoices?.filter(invoice => invoice.status === "SUCCESS"); return ( - - + + + {intl.formatMessage({ + id: "Gzg8hy", + defaultMessage: "Invoices", + description: "section header", + })} + + + {onInvoiceGenerate && ( - ) - } - /> - + )} + + + {!generatedInvoices ? ( ) : !generatedInvoices?.length ? ( @@ -119,8 +121,8 @@ const OrderInvoiceList: React.FC = props => { )} -
- + + ); }; diff --git a/src/orders/components/OrderListPage/OrderListPage.tsx b/src/orders/components/OrderListPage/OrderListPage.tsx index b6105707cc2..6d175222078 100644 --- a/src/orders/components/OrderListPage/OrderListPage.tsx +++ b/src/orders/components/OrderListPage/OrderListPage.tsx @@ -9,6 +9,7 @@ import { LimitsInfo } from "@dashboard/components/AppLayout/LimitsInfo"; import { ListFilters } from "@dashboard/components/AppLayout/ListFilters"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { ButtonWithDropdown } from "@dashboard/components/ButtonWithDropdown"; +import { DashboardCard } from "@dashboard/components/Card"; import { useConditionalFilterContext } from "@dashboard/components/ConditionalFilter"; import { useDevModeContext } from "@dashboard/components/DevModePanel/hooks"; import { FilterPresetsSelect } from "@dashboard/components/FilterPresetsSelect"; @@ -21,7 +22,6 @@ import { OrderListUrlQueryParams, OrderListUrlSortField, orderUrl } from "@dashb import { getFilterVariables } from "@dashboard/orders/views/OrderList/filters"; import { FilterPageProps, PageListProps, RelayToFlat, SortPage } from "@dashboard/types"; import { hasLimits, isLimitReached } from "@dashboard/utils/limits"; -import { Card } from "@material-ui/core"; import { Box, Button, ChevronRightIcon, Tooltip } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -206,7 +206,7 @@ const OrderListPage: React.FC = ({ {limitsReached && } - + = ({ filtersEnabled={!!newOrdersFiltersEnabled} /> - + ); }; diff --git a/src/orders/components/OrderManualTransactionRefundPage/OrderManualTransactionRefundPage.tsx b/src/orders/components/OrderManualTransactionRefundPage/OrderManualTransactionRefundPage.tsx index 8fc92f2e7a6..12ce64454f6 100644 --- a/src/orders/components/OrderManualTransactionRefundPage/OrderManualTransactionRefundPage.tsx +++ b/src/orders/components/OrderManualTransactionRefundPage/OrderManualTransactionRefundPage.tsx @@ -55,9 +55,11 @@ export const OrderManualTransactionRefundPage = ({ - - - + + + + + = props => { }; return ( - - + + + {!order?.paymentStatus ? ( ) : (
@@ -110,10 +109,10 @@ const OrderPayment: React.FC = props => {
)}
- ) - } - /> - + )} + + +
{order?.discounts?.map(discount => (
@@ -183,9 +182,9 @@ const OrderPayment: React.FC = props => {
-
+ - +
{!!usedGiftCardAmount && usedGiftcards && (
@@ -240,8 +239,8 @@ const OrderPayment: React.FC = props => {
-
-
+ + ); }; diff --git a/src/orders/components/OrderPaymentSummaryCard/OrderPaymentSummaryCard.tsx b/src/orders/components/OrderPaymentSummaryCard/OrderPaymentSummaryCard.tsx index 2627af2fede..dae49b279bd 100644 --- a/src/orders/components/OrderPaymentSummaryCard/OrderPaymentSummaryCard.tsx +++ b/src/orders/components/OrderPaymentSummaryCard/OrderPaymentSummaryCard.tsx @@ -1,13 +1,13 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Pill } from "@dashboard/components/Pill"; import Skeleton from "@dashboard/components/Skeleton"; import { useFlag } from "@dashboard/featureFlags"; import { OrderAction, OrderDetailsFragment } from "@dashboard/graphql"; import { transformPaymentStatus } from "@dashboard/misc"; import { orderGrantRefundUrl, orderSendRefundUrl } from "@dashboard/orders/urls"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { Divider } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -44,22 +44,33 @@ const OrderPaymentSummaryCard: React.FC = ({ order, onMarkA if (!order) { return ( - - } - toolbar={} - > - + + + + + + + + + + - - + + ); } return ( - - + + + + + + + + + = ({ order, onMarkA className={classes.paymentStatus} data-test-id="payment-status" /> - } - title={} - subtitle={} - /> + + {showHasNoPayment ? ( - + @@ -85,15 +94,18 @@ const OrderPaymentSummaryCard: React.FC = ({ order, onMarkA )} - + ) : ( )} {canAnyRefund && !enabled && ( <> - + + + +
{canGrantRefund && ( )}
- } - title={} - >
- + + + - + )} -
+ ); }; diff --git a/src/orders/components/OrderPaymentSummaryCard/components/PaymentsSummary/PaymentsSummary.tsx b/src/orders/components/OrderPaymentSummaryCard/components/PaymentsSummary/PaymentsSummary.tsx index 56f52ad8d2e..ac659130105 100644 --- a/src/orders/components/OrderPaymentSummaryCard/components/PaymentsSummary/PaymentsSummary.tsx +++ b/src/orders/components/OrderPaymentSummaryCard/components/PaymentsSummary/PaymentsSummary.tsx @@ -1,5 +1,5 @@ +import { DashboardCard } from "@dashboard/components/Card"; import { OrderDetailsFragment } from "@dashboard/graphql"; -import { CardContent } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -18,7 +18,7 @@ export const PaymentsSummary: React.FC = ({ order }) => { const shouldDisplay = getShouldDisplayAmounts(order); return ( - + } @@ -59,6 +59,6 @@ export const PaymentsSummary: React.FC = ({ order }) => { /> )} - + ); }; diff --git a/src/orders/components/OrderRefund/OrderRefund.tsx b/src/orders/components/OrderRefund/OrderRefund.tsx index 5b064b2041e..b98db63367e 100644 --- a/src/orders/components/OrderRefund/OrderRefund.tsx +++ b/src/orders/components/OrderRefund/OrderRefund.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import RadioGroupField from "@dashboard/components/RadioGroupField"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -38,15 +38,17 @@ const OrderRefund: React.FC = props => { const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "bqAJCT", + defaultMessage: "Refund Order", + description: "section header", + })} + + + = props => { onChange={onChange} variant="inline" /> - - + + ); }; diff --git a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx index d6a90e888eb..91a790c0d37 100644 --- a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx +++ b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Money from "@dashboard/components/Money"; import Skeleton from "@dashboard/components/Skeleton"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; @@ -8,16 +8,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { OrderRefundDataQuery } from "@dashboard/graphql"; import { FormsetChange } from "@dashboard/hooks/useFormset"; import { renderCollection } from "@dashboard/misc"; -import { - Card, - CardContent, - Table, - TableBody, - TableCell, - TableHead, - TextField, - Typography, -} from "@material-ui/core"; +import { Table, TableBody, TableCell, TableHead, TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -90,9 +81,9 @@ const OrderRefundFulfilledProducts: React.FC const intl = useIntl(); return ( - - + + <> {getTitle(fulfillment.status, intl)} {fulfillment && ( @@ -101,9 +92,9 @@ const OrderRefundFulfilledProducts: React.FC )} - } - /> - + + + - +
From 6f45d443506a9e6defbeabaf2858c54495bdfc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Wed, 17 Jul 2024 16:47:36 +0200 Subject: [PATCH 012/264] Migrate ActionDialog, migrate some Dialog to DashboardModal (#5044) * Replace AppDialog * Replace AppDeleteDialog * Migrate dialogs part 1 * Migrate OrderChangeWarehouseDialog and StaffAddMemberDialog * Migrate ActionDialog * Improve imports * ActionDialog size * Small improvments * Migrate ChannelPickerDialog autocomplete * Fix pw selector * Add chaneset * Fix staff member submit * Fix channel delete dialog * update changeset * Update font in ActionDialog * CR fixes --- .changeset/fair-masks-dance.md | 7 + .../pages/dialogs/draftOrderCreateDialog.ts | 2 +- playwright/pages/dialogs/orderCreateDialog.ts | 2 +- .../AppActivateDialog/AppActivateDialog.tsx | 4 +- .../AppDeactivateDialog.tsx | 6 +- .../AppDeleteDialog/AppDeleteDialog.tsx | 6 +- src/apps/components/AppDialog/AppDialog.tsx | 43 ++-- src/apps/components/AppDialog/styles.ts | 19 -- .../AppInProgressDeleteDialog.tsx | 4 +- .../AttributeBulkDeleteDialog.tsx | 23 +- .../AttributeDeleteDialog.tsx | 21 +- .../AttributeValueDeleteDialog.tsx | 43 ++-- src/categories/views/CategoryDetails.tsx | 72 ++++--- .../views/CategoryList/CategoryList.tsx | 36 ++-- .../ChannelDeleteDialog.tsx | 6 +- .../ChannelPickerDialog.tsx | 33 +-- src/collections/views/CollectionDetails.tsx | 45 ++-- .../views/CollectionList/CollectionList.tsx | 19 +- src/components/ActionDialog/ActionDialog.tsx | 65 ++++-- src/components/ActionDialog/DialogButtons.tsx | 65 ------ .../ActionDialog/NewActionDialog.tsx | 53 ----- src/components/ActionDialog/index.ts | 1 - src/components/ActionDialog/types.ts | 2 +- .../AttributeUnassignDialog.tsx | 17 +- .../BulkAttributeUnassignDialog.tsx | 19 +- .../DeleteFilterTabDialog.tsx | 17 +- src/components/Modal/index.ts | 1 + .../TokenDeleteDialog/TokenDeleteDialog.tsx | 19 +- .../WebhookDeleteDialog.tsx | 35 ++-- src/customers/views/CustomerAddresses.tsx | 6 +- src/customers/views/CustomerDetails.tsx | 19 +- .../views/CustomerList/CustomerList.tsx | 19 +- .../views/SaleDetails/SaleDetails.tsx | 79 +++---- src/discounts/views/SaleList/SaleList.tsx | 21 +- .../views/VoucherDetails/VoucherDetails.tsx | 79 ++++--- .../views/VoucherList/VoucherList.tsx | 21 +- .../GiftCardResendCodeDialog.tsx | 13 +- .../GiftCardUpdateBalanceDialog.tsx | 2 +- .../GiftCardDeleteDialogContent.tsx | 14 +- src/navigation/views/MenuDetails/index.tsx | 17 +- src/navigation/views/MenuList/MenuList.tsx | 39 ++-- .../OrderBulkCancelDialog.tsx | 19 +- .../OrderChangeWarehouseDialog.tsx | 198 +++++++++--------- .../OrderChangeWarehouseDialog/styles.ts | 4 - .../OrderDiscountCommonModal.tsx | 46 ++-- .../OrderDraftCancelDialog.tsx | 23 +- .../OrderFulfillStockExceededDialog.tsx | 2 +- .../OrderMarkAsPaidDialog.tsx | 56 ++--- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 90 ++++---- .../OrderPaymentVoidDialog.tsx | 45 ++-- .../views/OrderDraftList/OrderDraftList.tsx | 21 +- .../PageTypeBulkDeleteDialog.tsx | 45 ++-- src/pages/views/PageDetails.tsx | 19 +- src/pages/views/PageList/PageList.tsx | 21 +- .../MembersErrorDialog/MembersErrorDialog.tsx | 13 +- .../PermissionGroupDeleteDialog.tsx | 7 +- .../UnassignMembersDialog.tsx | 23 +- src/plugins/views/PluginsDetails.tsx | 11 +- .../ProductTypePickerDialog.tsx | 6 +- .../ProductVariantEndPreorderDialog.tsx | 9 +- src/products/views/ProductImage.tsx | 11 +- .../views/ProductList/ProductList.tsx | 21 +- .../views/ProductUpdate/ProductUpdate.tsx | 11 +- .../DeleteShippingRateDialog.tsx | 19 +- .../UnassignDialog/UnassignDialog.tsx | 21 +- .../views/ShippingZoneDetails/index.tsx | 51 ++--- .../StaffAddMemberDialog.tsx | 108 ++++------ .../StaffPasswordResetDialog.tsx | 114 +++++----- src/staff/views/StaffDetails.tsx | 33 ++- .../TaxCountryDialog/TaxCountryDialog.tsx | 71 +++---- .../components/TaxCountryDialog/styles.ts | 11 - .../WarehouseDeleteDialog.tsx | 19 +- 72 files changed, 942 insertions(+), 1220 deletions(-) create mode 100644 .changeset/fair-masks-dance.md delete mode 100644 src/apps/components/AppDialog/styles.ts delete mode 100644 src/components/ActionDialog/DialogButtons.tsx diff --git a/.changeset/fair-masks-dance.md b/.changeset/fair-masks-dance.md new file mode 100644 index 00000000000..e1a5ef79978 --- /dev/null +++ b/.changeset/fair-masks-dance.md @@ -0,0 +1,7 @@ +--- +"saleor-dashboard": patch +--- + +Drop legacy Dialog and replace it with new macaw Dialog component in action dialogs, +order change warehouse dialog, order payment dialog, add staff member dialog, +staff user password restart dialog, tax select country dialog. diff --git a/playwright/pages/dialogs/draftOrderCreateDialog.ts b/playwright/pages/dialogs/draftOrderCreateDialog.ts index bb7ddb17d7d..c685f41bdd0 100644 --- a/playwright/pages/dialogs/draftOrderCreateDialog.ts +++ b/playwright/pages/dialogs/draftOrderCreateDialog.ts @@ -7,7 +7,7 @@ export class DraftOrderCreateDialog { page: Page, readonly channelNameInput = page.getByTestId("channel-autocomplete"), readonly confirmButton = page.getByTestId("submit"), - readonly channelOption = page.locator("[data-test-id*='select-field-option']"), + readonly channelOption = page.getByTestId("select-option"), ) { this.page = page; } diff --git a/playwright/pages/dialogs/orderCreateDialog.ts b/playwright/pages/dialogs/orderCreateDialog.ts index 6591136a7d8..fb10c11d392 100644 --- a/playwright/pages/dialogs/orderCreateDialog.ts +++ b/playwright/pages/dialogs/orderCreateDialog.ts @@ -7,7 +7,7 @@ export class OrderCreateDialog { page: Page, readonly channelNameInput = page.getByTestId("channel-autocomplete"), readonly confirmButton = page.getByTestId("submit"), - readonly channelOption = page.locator("[data-test-id*='select-field-option']"), + readonly channelOption = page.getByTestId("select-option"), ) { this.page = page; } diff --git a/src/apps/components/AppActivateDialog/AppActivateDialog.tsx b/src/apps/components/AppActivateDialog/AppActivateDialog.tsx index 9b85e7c51dc..b4e4e1d3f8e 100644 --- a/src/apps/components/AppActivateDialog/AppActivateDialog.tsx +++ b/src/apps/components/AppActivateDialog/AppActivateDialog.tsx @@ -2,7 +2,7 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { buttonMessages } from "@dashboard/intl"; import { getStringOrPlaceholder } from "@dashboard/misc"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; import { useIntl } from "react-intl"; @@ -45,7 +45,7 @@ const AppActivateDialog: React.FC = ({ title={intl.formatMessage(msgs.activateAppTitle)} variant="default" > - {getMainText()} + {getMainText()} ); }; diff --git a/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx b/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx index 169ed127ff9..9f2341ed1d4 100644 --- a/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx +++ b/src/apps/components/AppDeactivateDialog/AppDeactivateDialog.tsx @@ -2,7 +2,7 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { buttonMessages } from "@dashboard/intl"; import { getStringOrPlaceholder } from "@dashboard/misc"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -47,7 +47,7 @@ const AppDeactivateDialog: React.FC = ({ title={intl.formatMessage(msgs.deactivateAppTitle)} variant="delete" > - + {getMainText()} {thirdParty && ( <> @@ -55,7 +55,7 @@ const AppDeactivateDialog: React.FC = ({ )} - + ); }; diff --git a/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx b/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx index 822f1a46cf9..fa636c19aea 100644 --- a/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx +++ b/src/apps/components/AppDeleteDialog/AppDeleteDialog.tsx @@ -1,7 +1,6 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { getStringOrPlaceholder } from "@dashboard/misc"; -import { DialogContentText } from "@material-ui/core"; import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -56,8 +55,9 @@ const AppDeleteDialog: React.FC = ({ onConfirm={onConfirm} title={intl.formatMessage(msgs.deleteAppTitle)} variant="delete" + size="lg" > - + = ({ {intl.formatMessage(msgs.deleteAppWarning)} {getMainText()} - + ); }; diff --git a/src/apps/components/AppDialog/AppDialog.tsx b/src/apps/components/AppDialog/AppDialog.tsx index d2cddc4a733..ea19264d536 100644 --- a/src/apps/components/AppDialog/AppDialog.tsx +++ b/src/apps/components/AppDialog/AppDialog.tsx @@ -1,35 +1,26 @@ -import { - Dialog, - DialogContent, - DialogProps, - DialogTitle, - IconButton, - Typography, -} from "@material-ui/core"; -import CloseIcon from "@material-ui/icons/Close"; +import { DashboardModal } from "@dashboard/components/Modal"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; -import { useStyles } from "./styles"; - -interface AppDialogProps extends DialogProps { +interface AppDialogProps { + title?: string; onClose: () => void; + open: boolean; } -export const AppDialog: React.FC = ({ children, ...props }) => { - const classes = useStyles(); - +export const AppDialog: React.FC = ({ children, title, onClose, ...props }) => { return ( - - - - {props.title} - - - - - - {children} - + + + + {title} + + + + {children} + + + ); }; diff --git a/src/apps/components/AppDialog/styles.ts b/src/apps/components/AppDialog/styles.ts deleted file mode 100644 index 2066b06c90e..00000000000 --- a/src/apps/components/AppDialog/styles.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { makeStyles } from "@saleor/macaw-ui"; - -export const useStyles = makeStyles( - () => ({ - header: { - display: "flex", - justifyContent: "space-between", - alignItems: "center", - }, - content: { - margin: 0, - padding: 0, - overflow: "hidden", - width: 600, - height: 600, - }, - }), - { name: "AppDialog" }, -); diff --git a/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx b/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx index a672eb49240..c453708fbe2 100644 --- a/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx +++ b/src/apps/components/AppInProgressDeleteDialog/AppInProgressDeleteDialog.tsx @@ -1,7 +1,7 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { getStringOrPlaceholder } from "@dashboard/misc"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; import { useIntl } from "react-intl"; @@ -43,7 +43,7 @@ const AppInProgressDeleteDialog = ({ title={intl.formatMessage(msgs.header)} variant="delete" > - {getMainText()} + {getMainText()} ); }; diff --git a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx index 1d81dc1c3e5..fcf7079ae45 100644 --- a/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx +++ b/src/attributes/components/AttributeBulkDeleteDialog/AttributeBulkDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -35,18 +34,16 @@ const AttributeBulkDeleteDialog: React.FC = ({ variant="delete" data-test-id="attribute-bulk-delete-dialog" > - - {quantity}, - }} - /> - + {quantity}, + }} + /> ); }; diff --git a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx index f56ac580fdb..9a6fa7792fc 100644 --- a/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx +++ b/src/attributes/components/AttributeDeleteDialog/AttributeDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,17 +33,15 @@ const AttributeDeleteDialog: React.FC = ({ description: "dialog title", })} > - - {name}, - }} - /> - + {name}, + }} + /> ); }; diff --git a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx index e7eb28c3784..249b787e0fe 100644 --- a/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx +++ b/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -38,28 +37,26 @@ const AttributeValueDeleteDialog: React.FC = ({ description: "dialog title", })} > - - {useName ? ( - - ) : ( - - )} - + {useName ? ( + + ) : ( + + )} ); }; diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index 21956251b85..55caae1c5c2 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -28,7 +28,7 @@ import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHa import createMetadataUpdateHandler from "@dashboard/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { getParsedDataForJsonStringField } from "@dashboard/utils/richText/misc"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import isEqual from "lodash/isEqual"; import React, { useCallback, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -305,21 +305,23 @@ export const CategoryDetails: React.FC = ({ id, params }) })} variant="delete" > - - {data?.category?.name || "..."}, - }} - /> - - - - + + + {data?.category?.name || "..."}, + }} + /> + + + + + = ({ id, params }) })} variant="delete" > - - selectedCategoryRowIds.length), - displayQuantity: {maybe(() => selectedCategoryRowIds.length)}, - }} - /> - - - - + + + selectedCategoryRowIds.length), + displayQuantity: {maybe(() => selectedCategoryRowIds.length)}, + }} + /> + + + + + = ({ id, params }) })} variant="delete" > - + = ({ id, params }) displayQuantity: {maybe(() => selectedProductRowIds.length)}, }} /> - + ); diff --git a/src/categories/views/CategoryList/CategoryList.tsx b/src/categories/views/CategoryList/CategoryList.tsx index 068bb129397..91134717fb1 100644 --- a/src/categories/views/CategoryList/CategoryList.tsx +++ b/src/categories/views/CategoryList/CategoryList.tsx @@ -20,7 +20,7 @@ import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHa import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import isEqual from "lodash/isEqual"; import React, { useCallback } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -188,22 +188,24 @@ export const CategoryList: React.FC = ({ params }) => { })} variant="delete" > - - {params?.ids?.length}, - }} - /> - - - - + + + {params?.ids?.length}, + }} + /> + + + + + = ({ const canBeDeleted = hasChannels || !hasOrders; return ( - = ({ {intl.formatMessage(messages.deletingAllProductData)} )} - + ); }; diff --git a/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx b/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx index 26636458d22..309099b2d60 100644 --- a/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx +++ b/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx @@ -1,11 +1,10 @@ import ActionDialog from "@dashboard/components/ActionDialog"; +import { Combobox } from "@dashboard/components/Combobox"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { Choice } from "@dashboard/components/SingleSelectField"; import useChoiceSearch from "@dashboard/hooks/useChoiceSearch"; import useModalDialogOpen from "@dashboard/hooks/useModalDialogOpen"; import useStateFromProps from "@dashboard/hooks/useStateFromProps"; -import { MenuItem } from "@material-ui/core"; -import { Autocomplete } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -49,28 +48,18 @@ const ChannelPickerDialog: React.FC = ({ onConfirm={() => onConfirm(choice)} title={intl.formatMessage(messages.selectChannel)} > - res.value === choice)?.label ?? choice, + }} onChange={e => setChoice(e.target.value)} - onInputChange={search} - > - {({ getItemProps, highlightedIndex }) => - result.map((choice, choiceIndex) => ( - - {choice.label} - - )) - } - + /> ); }; diff --git a/src/collections/views/CollectionDetails.tsx b/src/collections/views/CollectionDetails.tsx index 03cabe967e3..574020a5f79 100644 --- a/src/collections/views/CollectionDetails.tsx +++ b/src/collections/views/CollectionDetails.tsx @@ -35,7 +35,6 @@ import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHa import createMetadataUpdateHandler from "@dashboard/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { getParsedDataForJsonStringField } from "@dashboard/utils/richText/misc"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -364,15 +363,13 @@ export const CollectionDetails: React.FC = ({ id, params })} variant="delete" > - - {maybe(() => data.collection.name, "...")}, - }} - /> - + {maybe(() => data.collection.name, "...")}, + }} + /> = ({ id, params description: "dialog title", })} > - - params.ids.length), - displayQuantity: {maybe(() => params.ids.length)}, - }} - /> - + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)}, + }} + /> = ({ id, params })} variant="delete" > - - - + ); diff --git a/src/collections/views/CollectionList/CollectionList.tsx b/src/collections/views/CollectionList/CollectionList.tsx index d6b611f5e30..8298131cf9a 100644 --- a/src/collections/views/CollectionList/CollectionList.tsx +++ b/src/collections/views/CollectionList/CollectionList.tsx @@ -22,7 +22,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback, useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -208,16 +207,14 @@ export const CollectionList: React.FC = ({ params }) => { description: "dialog title", })} > - - selectedRowIds.length), - displayQuantity: {maybe(() => selectedRowIds.length)}, - }} - /> - + selectedRowIds.length), + displayQuantity: {maybe(() => selectedRowIds.length)}, + }} + /> any; + size?: ActionDialogSize; } -const ActionDialog: React.FC = props => { - const { children, open, title, onClose, variant, maxWidth, ...rest } = props; +const ACTION_DIALOG_SIZE: Record = { + sm: DASHBOARD_MODAL_WIDTH_SMALL, + lg: DASHBOARD_MODAL_WIDTH, +}; + +const ActionDialog = ({ + children, + open, + title, + onClose, + variant, + confirmButtonState, + backButtonText, + disabled, + onConfirm, + confirmButtonLabel, + size = "sm", +}: ActionDialogProps) => { + const intl = useIntl(); return ( - - {title} - {children} - - + + + {title} + {children} + + {backButtonText} + {variant !== "info" && ( + + {confirmButtonLabel || + (variant === "delete" + ? intl.formatMessage(buttonMessages.delete) + : intl.formatMessage(buttonMessages.confirm))} + + )} + + + ); }; -ActionDialog.defaultProps = { - maxWidth: "xs", -}; ActionDialog.displayName = "ActionDialog"; export default ActionDialog; diff --git a/src/components/ActionDialog/DialogButtons.tsx b/src/components/ActionDialog/DialogButtons.tsx deleted file mode 100644 index b06fc40341a..00000000000 --- a/src/components/ActionDialog/DialogButtons.tsx +++ /dev/null @@ -1,65 +0,0 @@ -// @ts-strict-ignore -import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { buttonMessages } from "@dashboard/intl"; -import { DialogActions } from "@material-ui/core"; -import React from "react"; -import { useIntl } from "react-intl"; - -import BackButton from "../BackButton"; -import { ConfirmButton } from "../ConfirmButton/ConfirmButton"; -import { ActionDialogVariant } from "./types"; - -interface DialogButtonsProps { - onClose: () => void; - confirmButtonLabel?: string; - confirmButtonState?: ConfirmButtonTransitionState; - disabled?: boolean; - variant?: ActionDialogVariant; - children?: React.ReactNode; - showBackButton?: boolean; - backButtonText?: string; - onConfirm: () => any; -} - -const DialogButtons: React.FC = props => { - const { - confirmButtonLabel, - confirmButtonState, - disabled, - variant, - onConfirm, - onClose, - children, - showBackButton = true, - backButtonText, - } = props; - const intl = useIntl(); - - return ( - - {children} - {showBackButton && {backButtonText}} - {variant !== "info" && ( - - {confirmButtonLabel || - (variant === "delete" - ? intl.formatMessage(buttonMessages.delete) - : intl.formatMessage(buttonMessages.confirm))} - - )} - - ); -}; - -DialogButtons.defaultProps = { - confirmButtonState: "default", - variant: "default", -}; - -export default DialogButtons; diff --git a/src/components/ActionDialog/NewActionDialog.tsx b/src/components/ActionDialog/NewActionDialog.tsx index 90ce6475e99..e69de29bb2d 100644 --- a/src/components/ActionDialog/NewActionDialog.tsx +++ b/src/components/ActionDialog/NewActionDialog.tsx @@ -1,53 +0,0 @@ -import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogProps } from "@dashboard/types"; -import React from "react"; - -import BackButton from "../BackButton"; -import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "../Modal"; -import { ActionDialogVariant, Size } from "./types"; - -export interface NewActionDialogProps extends DialogProps { - children?: React.ReactNode; - confirmButtonLabel?: string; - confirmButtonState: ConfirmButtonTransitionState; - disabled?: boolean; - maxWidth?: Size | false; - title: string; - variant?: ActionDialogVariant; - backButtonText?: string; - onConfirm: () => any; -} - -// TODO: migrate all old components to new dialog MERX-649 -const NewActionDialog: React.FC = props => { - const { children, open, title, onClose, variant, maxWidth, ...rest } = props; - - return ( - - - {title} - - {children} - - - {rest?.backButtonText} - - {rest?.confirmButtonLabel} - - - - - ); -}; - -NewActionDialog.defaultProps = { - maxWidth: "xs", -}; -NewActionDialog.displayName = "ActionDialog"; -export default NewActionDialog; diff --git a/src/components/ActionDialog/index.ts b/src/components/ActionDialog/index.ts index b98866d7be2..1b7746fa07b 100644 --- a/src/components/ActionDialog/index.ts +++ b/src/components/ActionDialog/index.ts @@ -1,3 +1,2 @@ export { default } from "./ActionDialog"; export * from "./ActionDialog"; -export * from "./NewActionDialog"; diff --git a/src/components/ActionDialog/types.ts b/src/components/ActionDialog/types.ts index ad9440fb5a1..bbe2c281200 100644 --- a/src/components/ActionDialog/types.ts +++ b/src/components/ActionDialog/types.ts @@ -1,3 +1,3 @@ export type ActionDialogVariant = "default" | "delete" | "info"; -export type Size = "xs" | "sm" | "md" | "lg" | "xl"; +export type ActionDialogSize = "sm" | "lg"; diff --git a/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx b/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx index 8a5b552a9e7..1c58edb78af 100644 --- a/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx +++ b/src/components/AttributeUnassignDialog/AttributeUnassignDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -36,15 +35,13 @@ const AttributeUnassignDialog: React.FC = ({ title={title} confirmButtonLabel={intl.formatMessage(messages.confirmBtn)} > - - {attributeName}, - itemTypeName: {itemTypeName}, - }} - /> - + {attributeName}, + itemTypeName: {itemTypeName}, + }} + /> ); }; diff --git a/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx b/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx index e1656e56747..e472d9cae05 100644 --- a/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx +++ b/src/components/BulkAttributeUnassignDialog/BulkAttributeUnassignDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -36,16 +35,14 @@ const BulkAttributeUnassignDialog: React.FC = title={title} confirmButtonLabel={intl.formatMessage(messages.confirmBtn)} > - - {attributeQuantity}, - counter: attributeQuantity, - itemTypeName: {itemTypeName}, - }} - /> - + {attributeQuantity}, + counter: attributeQuantity, + itemTypeName: {itemTypeName}, + }} + /> ); }; diff --git a/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx b/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx index f36792823de..d7a24b5c0a1 100644 --- a/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx +++ b/src/components/DeleteFilterTabDialog/DeleteFilterTabDialog.tsx @@ -1,6 +1,5 @@ import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { buttonMessages } from "@dashboard/intl"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -37,15 +36,13 @@ const DeleteFilterTabDialog: React.FC = ({ })} variant="delete" > - - {tabName}, - }} - /> - + {tabName}, + }} + /> ); }; diff --git a/src/components/Modal/index.ts b/src/components/Modal/index.ts index 5f03e1dcfaf..eabccc6a813 100644 --- a/src/components/Modal/index.ts +++ b/src/components/Modal/index.ts @@ -5,6 +5,7 @@ import { Root } from "./Root"; import { Title } from "./Title"; export const DASHBOARD_MODAL_WIDTH = 600; +export const DASHBOARD_MODAL_WIDTH_SMALL = 444; export const DashboardModal = Object.assign(Root, { Title, diff --git a/src/custom-apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx b/src/custom-apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx index 65b0097b752..419ea8e4e57 100644 --- a/src/custom-apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx +++ b/src/custom-apps/components/TokenDeleteDialog/TokenDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,16 +33,14 @@ const TokenDeleteDialog: React.FC = ({ description: "dialog title", })} > - - {name}, - }} - /> - + {name}, + }} + /> ); }; diff --git a/src/custom-apps/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx b/src/custom-apps/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx index 15ce91a44f2..97c849f7057 100644 --- a/src/custom-apps/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx +++ b/src/custom-apps/components/WebhookDeleteDialog/WebhookDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,24 +33,22 @@ const WebhookDeleteDialog: React.FC = ({ })} variant="delete" > - - {!name ? ( - - ) : ( - {name}, - }} - /> - )} - + {!name ? ( + + ) : ( + {name}, + }} + /> + )} ); }; diff --git a/src/customers/views/CustomerAddresses.tsx b/src/customers/views/CustomerAddresses.tsx index 6a0e1aa91b7..b2b83fdb182 100644 --- a/src/customers/views/CustomerAddresses.tsx +++ b/src/customers/views/CustomerAddresses.tsx @@ -13,7 +13,7 @@ import useNotifier from "@dashboard/hooks/useNotifier"; import useShop from "@dashboard/hooks/useShop"; import { commonMessages } from "@dashboard/intl"; import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHandlers"; -import { DialogContentText } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -169,12 +169,12 @@ const CustomerAddresses: React.FC = ({ id, params }) => }) } > - + - + ); diff --git a/src/customers/views/CustomerDetails.tsx b/src/customers/views/CustomerDetails.tsx index 95019a932d9..c2cf4cfe53a 100644 --- a/src/customers/views/CustomerDetails.tsx +++ b/src/customers/views/CustomerDetails.tsx @@ -13,7 +13,6 @@ import useNotifier from "@dashboard/hooks/useNotifier"; import { commonMessages } from "@dashboard/intl"; import { extractMutationErrors, getStringOrPlaceholder } from "@dashboard/misc"; import createMetadataUpdateHandler from "@dashboard/utils/handlers/metadataUpdateHandler"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -132,16 +131,14 @@ const CustomerDetailsViewInner: React.FC = ({ id, para variant="delete" open={params.action === "remove"} > - - {getStringOrPlaceholder(user?.email)}, - }} - /> - + {getStringOrPlaceholder(user?.email)}, + }} + /> ); diff --git a/src/customers/views/CustomerList/CustomerList.tsx b/src/customers/views/CustomerList/CustomerList.tsx index 07de69c99e8..5d757e75fc1 100644 --- a/src/customers/views/CustomerList/CustomerList.tsx +++ b/src/customers/views/CustomerList/CustomerList.tsx @@ -20,7 +20,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -175,16 +174,14 @@ export const CustomerList: React.FC = ({ params }) => { description: "dialog header", })} > - - {selectedRowIds?.length}, - }} - /> - + {selectedRowIds?.length}, + }} + /> = ({ id, params }) => { confirmButtonLabel={intl.formatMessage(messages.saleDetailsUnassignCategory)} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => { confirmButtonLabel={intl.formatMessage(messages.saleDetailsUnassignCollection)} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => { confirmButtonLabel={intl.formatMessage(messages.saleDetailsUnassignProduct)} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => { confirmButtonLabel={intl.formatMessage(messages.saleDetailsUnassignVariant)} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => { }) } > - - {maybe(() => data.sale.name, "...")}, - }} - /> - + {maybe(() => data.sale.name, "...")}, + }} + /> ); diff --git a/src/discounts/views/SaleList/SaleList.tsx b/src/discounts/views/SaleList/SaleList.tsx index b9c0ada65f3..142290accab 100644 --- a/src/discounts/views/SaleList/SaleList.tsx +++ b/src/discounts/views/SaleList/SaleList.tsx @@ -21,7 +21,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback, useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -197,17 +196,15 @@ export const SaleList: React.FC = ({ params }) => { })} variant="delete" > - - {selectedRowIds.length}, - }} - /> - + {selectedRowIds.length}, + }} + /> = ({ id, params }) => })} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => })} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => })} > {canOpenBulkActionDialog && ( - - {params.ids.length}, - }} - /> - + {params.ids.length}, + }} + /> )} = ({ id, params }) => }) } > - - {maybe(() => data.voucher.name, "...")}, - }} - /> - + {maybe(() => data.voucher.name, "...")}, + }} + /> ); diff --git a/src/discounts/views/VoucherList/VoucherList.tsx b/src/discounts/views/VoucherList/VoucherList.tsx index bb62a7b17a5..e86957f6bde 100644 --- a/src/discounts/views/VoucherList/VoucherList.tsx +++ b/src/discounts/views/VoucherList/VoucherList.tsx @@ -22,7 +22,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback, useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -198,17 +197,15 @@ export const VoucherList: React.FC = ({ params }) => { })} variant="delete" > - - {selectedRowIds.length}, - }} - /> - + {selectedRowIds.length}, + }} + /> = ({ open, onClose }) => { useEffect(reset, [consentSelected]); return ( - = ({ open, onClose }) => { title={intl.formatMessage(messages.title)} confirmButtonState={status} disabled={loading} + size="lg" > {loadingChannels ? (
) : ( - <> + {intl.formatMessage(messages.description)} = ({ open, onClose }) => { className={classes.inputContainer} label={intl.formatMessage(messages.emailInputPlaceholder)} /> - + )} -
+ ); }; diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx b/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx index f3861419059..f744aef79fb 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx @@ -78,7 +78,6 @@ const GiftCardUpdateBalanceDialog: React.FC = ({ open, onClose }) = return ( = ({ open, onClose }) = title={intl.formatMessage(messages.title)} confirmButtonState={status} disabled={loading} + size="lg" > {intl.formatMessage(messages.subtitle)} diff --git a/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx b/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx index 1fec0aa32d9..c75a0fd7816 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx @@ -4,7 +4,7 @@ import { GiftCardsListConsumerProps } from "@dashboard/giftCards/GiftCardsList/p import { ExtendedGiftCard } from "@dashboard/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/types"; import { GiftCardDataFragment } from "@dashboard/graphql"; import { getById } from "@dashboard/misc"; -import { CircularProgress, DialogContentText, Typography } from "@material-ui/core"; +import { CircularProgress, Typography } from "@material-ui/core"; import React, { useEffect, useState } from "react"; import { useIntl } from "react-intl"; @@ -92,13 +92,11 @@ function GiftCardDeleteDialogContent ) : ( - - - {intl.formatMessage(messages.defaultDescription, { - selectedItemsCount, - })} - - + + {intl.formatMessage(messages.defaultDescription, { + selectedItemsCount, + })} + )} ); diff --git a/src/navigation/views/MenuDetails/index.tsx b/src/navigation/views/MenuDetails/index.tsx index 639ce5f1baa..630561bef83 100644 --- a/src/navigation/views/MenuDetails/index.tsx +++ b/src/navigation/views/MenuDetails/index.tsx @@ -14,7 +14,6 @@ import useCategorySearch from "@dashboard/searches/useCategorySearch"; import useCollectionSearch from "@dashboard/searches/useCollectionSearch"; import usePageSearch from "@dashboard/searches/usePageSearch"; import { mapEdgesToItems } from "@dashboard/utils/maps"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -206,15 +205,13 @@ const MenuDetails: React.FC = ({ id, params }) => { description: "dialog header", })} > - - {maybe(() => data.menu.name, "...")}, - }} - /> - + {maybe(() => data.menu.name, "...")}, + }} + /> = ({ params }) => { description: "dialog header", })} > - - - + params.ids.length > 0)} @@ -212,16 +209,14 @@ const MenuList: React.FC = ({ params }) => { description: "dialog header", })} > - - params.ids.length.toString(), "..."), - displayQuantity: {maybe(() => params.ids.length.toString(), "...")}, - }} - /> - + params.ids.length.toString(), "..."), + displayQuantity: {maybe(() => params.ids.length.toString(), "...")}, + }} + /> ); diff --git a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx index 37deb6e0e1d..04f90fb89de 100644 --- a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx +++ b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,16 +33,14 @@ const OrderBulkCancelDialog: React.FC = ({ onClose={onClose} onConfirm={onConfirm} > - - {numberOfOrders}, - }} - /> - + {numberOfOrders}, + }} + /> ); }; diff --git a/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx b/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx index ccc64378944..c4536c94ab0 100644 --- a/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx +++ b/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx @@ -1,5 +1,6 @@ // @ts-strict-ignore import Debounce from "@dashboard/components/Debounce"; +import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; import Skeleton from "@dashboard/components/Skeleton"; import TableRowLink from "@dashboard/components/TableRowLink"; import { OrderFulfillLineFragment, WarehouseFragment } from "@dashboard/graphql"; @@ -9,9 +10,6 @@ import { getLineAvailableQuantityInWarehouse } from "@dashboard/orders/utils/dat import useWarehouseSearch from "@dashboard/searches/useWarehouseSearch"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { - Dialog, - DialogActions, - DialogContent, FormControlLabel, InputAdornment, Radio, @@ -22,14 +20,12 @@ import { } from "@material-ui/core"; import { Button, - DialogHeader, DialogTable, isScrolledToBottom, - isScrolledToTop, - ScrollShadow, SearchIcon, useElementScroll, } from "@saleor/macaw-ui"; +import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -54,7 +50,6 @@ export const OrderChangeWarehouseDialog: React.FC(""); const [selectedWarehouseId, setSelectedWarehouseId] = React.useState(null); @@ -94,101 +89,106 @@ export const OrderChangeWarehouseDialog: React.FC - - - - + + + + + + + - - - - {debounceSearchChange => { - const handleSearchChange = (event: React.ChangeEvent) => { - const value = event.target.value; + + + + - setQuery(value); - debounceSearchChange(value); - }; + + {debounceSearchChange => { + const handleSearchChange = (event: React.ChangeEvent) => { + const value = event.target.value; - return ( - - - - ), - }} - inputProps={{ className: classes.searchInput }} - /> - ); - }} - + setQuery(value); + debounceSearchChange(value); + }; - - - - - + return ( + + + + ), + }} + inputProps={{ className: classes.searchInput }} + /> + ); + }} + - - {filteredWarehouses ? ( - - {filteredWarehouses.map(warehouse => { - const lineQuantityInWarehouse = getLineAvailableQuantityInWarehouse(line, warehouse); + + + + + + {filteredWarehouses ? ( + + {filteredWarehouses.map(warehouse => { + const lineQuantityInWarehouse = getLineAvailableQuantityInWarehouse( + line, + warehouse, + ); + + return ( + + + } + label={ +
+ {warehouse.name} + + + +
+ } + /> + {currentWarehouseId === warehouse?.id && ( + + + + )} +
+
+ ); + })} +
+ ) : ( + + )} +
- return ( - - - } - label={ -
- {warehouse.name} - - - -
- } - /> - {currentWarehouseId === warehouse?.id && ( - - - - )} -
-
- ); - })} -
- ) : ( - - )} -
- - + - - - + + + ); }; OrderChangeWarehouseDialog.displayName = "OrderChangeWarehouseDialog"; diff --git a/src/orders/components/OrderChangeWarehouseDialog/styles.ts b/src/orders/components/OrderChangeWarehouseDialog/styles.ts index 51a3dbc98be..2cce6f9deff 100644 --- a/src/orders/components/OrderChangeWarehouseDialog/styles.ts +++ b/src/orders/components/OrderChangeWarehouseDialog/styles.ts @@ -5,10 +5,6 @@ export const useStyles = makeStyles( container: { paddingTop: 0, }, - searchBox: { - marginTop: theme.spacing(2), - marginBottom: theme.spacing(2), - }, searchInput: { paddingTop: theme.spacing(2), paddingBottom: theme.spacing(2), diff --git a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx index f038ad31f6d..a6312c16f1a 100644 --- a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx +++ b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx @@ -1,6 +1,6 @@ -import DialogButtons from "@dashboard/components/ActionDialog/DialogButtons"; import CardSpacer from "@dashboard/components/CardSpacer"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; +import { DashboardModal } from "@dashboard/components/Modal"; import PriceField from "@dashboard/components/PriceField"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import { DiscountValueTypeEnum, MoneyFragment } from "@dashboard/graphql"; @@ -272,27 +272,31 @@ const OrderDiscountCommonModal: React.FC = ({ data-test-id="discount-reason" onChange={(event: ChangeEvent) => setReason(event.target.value)} /> + + + {existingDiscount && ( +
+ + {intl.formatMessage(buttonMessages.remove)} + +
+ )} + + {intl.formatMessage(buttonMessages.confirm)} + +
- - {existingDiscount && ( -
- - {intl.formatMessage(buttonMessages.remove)} - -
- )} -
); }; diff --git a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx index 6a64084292f..3257ff7c9b5 100644 --- a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx +++ b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx @@ -4,7 +4,7 @@ import FormSpacer from "@dashboard/components/FormSpacer"; import { OrderErrorFragment } from "@dashboard/graphql"; import useModalDialogErrors from "@dashboard/hooks/useModalDialogErrors"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; -import { DialogContentText } from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -41,22 +41,21 @@ const OrderDraftCancelDialog: React.FC = ({ })} variant="delete" > - - {orderNumber}, - }} - /> - + {orderNumber}, + }} + /> + {errors.length > 0 && ( <> {errors.map((err, index) => ( - + {getOrderErrorMessage(err, intl)} - + ))} )} diff --git a/src/orders/components/OrderFulfillStockExceededDialog/OrderFulfillStockExceededDialog.tsx b/src/orders/components/OrderFulfillStockExceededDialog/OrderFulfillStockExceededDialog.tsx index c9f33a94831..3d21825f5a5 100644 --- a/src/orders/components/OrderFulfillStockExceededDialog/OrderFulfillStockExceededDialog.tsx +++ b/src/orders/components/OrderFulfillStockExceededDialog/OrderFulfillStockExceededDialog.tsx @@ -50,8 +50,8 @@ const OrderFulfillStockExceededDialog: React.FC {intl.formatMessage(messages.infoLabel)} diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index ebd051ab653..fa5fb7a4f1e 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -1,10 +1,10 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import FormSpacer from "@dashboard/components/FormSpacer"; import { OrderErrorFragment } from "@dashboard/graphql"; import useModalDialogErrors from "@dashboard/hooks/useModalDialogErrors"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; -import { DialogContentText, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; +import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -41,37 +41,39 @@ const OrderMarkAsPaidDialog: React.FC = ({ })} onClose={onClose} onConfirm={onConfirm} + size="lg" > - + -
+ -
- - {errors.length > 0 && ( - <> - - {errors.map((err, index) => ( - - {getOrderErrorMessage(err, intl)} - - ))} - - )} + + + + {errors.length > 0 && ( + + {errors.map((err, index) => ( + + {getOrderErrorMessage(err, intl)} + + ))} + + )} + ); }; diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 8bc284b0ba8..1c20db12570 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -3,18 +3,13 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; import FormSpacer from "@dashboard/components/FormSpacer"; +import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; import { OrderErrorFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; -import { - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, - TextField, -} from "@material-ui/core"; +import { TextField } from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -44,7 +39,7 @@ const OrderPaymentDialog: React.FC = ({ const formErrors = getFormErrors(formFields, errors); return ( - +
= ({ onSubmit={onSubmit} > {({ data, change, submit }) => ( - <> - + + {intl.formatMessage({ id: "+PbHKD", defaultMessage: "Capture Payment", description: "dialog header", })} - - - - {errors.length > 0 && ( - <> - - {errors - .filter(err => !formFields.includes(err.field)) - .map((err, index) => ( - - {getOrderErrorMessage(err, intl)} - - ))} - - )} - - + + + + + {errors.length > 0 && ( + <> + + {errors + .filter(err => !formFields.includes(err.field)) + .map((err, index) => ( + + {getOrderErrorMessage(err, intl)} + + ))} + + )} + + - - + + )}
-
+ ); }; diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 03413c92427..7472c16def7 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -2,16 +2,11 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import FormSpacer from "@dashboard/components/FormSpacer"; +import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; import { OrderErrorFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; -import { - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -33,35 +28,37 @@ const OrderPaymentVoidDialog: React.FC = ({ const intl = useIntl(); return ( - - - - - - + + + + + + + - + {errors.length > 0 && ( <> {errors.map((err, index) => ( - + {getOrderErrorMessage(err, intl)} - + ))} )} - - - - - - - - + + + + + + + + + ); }; diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index 35641e48641..a5df5590dcd 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -24,7 +24,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -199,17 +198,15 @@ export const OrderDraftList: React.FC = ({ params }) => { })} variant="delete" > - - selectedRowIds.length), - displayQuantity: {maybe(() => selectedRowIds.length)}, - }} - /> - + selectedRowIds.length), + displayQuantity: {maybe(() => selectedRowIds.length)}, + }} + /> = ({ })} variant="delete" > - - {hasPages ? ( - {quantity}, - }} - /> - ) : ( - {quantity}, - }} - /> - )} - + {hasPages ? ( + {quantity}, + }} + /> + ) : ( + {quantity}, + }} + /> + )} ); }; diff --git a/src/pages/views/PageDetails.tsx b/src/pages/views/PageDetails.tsx index 80715070dc1..6420db36a56 100644 --- a/src/pages/views/PageDetails.tsx +++ b/src/pages/views/PageDetails.tsx @@ -37,7 +37,6 @@ import useAttributeValueSearchHandler from "@dashboard/utils/handlers/attributeV import createMetadataUpdateHandler from "@dashboard/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@dashboard/utils/maps"; import { getParsedDataForJsonStringField } from "@dashboard/utils/richText/misc"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -230,16 +229,14 @@ export const PageDetails: React.FC = ({ id, params }) => { onConfirm={() => pageRemove({ variables: { id } })} variant="delete" > - - {getStringOrPlaceholder(pageDetails.data?.page?.title)}, - }} - /> - + {getStringOrPlaceholder(pageDetails.data?.page?.title)}, + }} + /> ); diff --git a/src/pages/views/PageList/PageList.tsx b/src/pages/views/PageList/PageList.tsx index 928d9506d61..27a0c074960 100644 --- a/src/pages/views/PageList/PageList.tsx +++ b/src/pages/views/PageList/PageList.tsx @@ -27,7 +27,6 @@ import createFilterHandlers from "@dashboard/utils/handlers/filterHandlers"; import createSortHandler from "@dashboard/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortParams } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -225,17 +224,15 @@ export const PageList: React.FC = ({ params }) => { description: "dialog header", })} > - - {selectedRowIds.length}, - }} - /> - + {selectedRowIds.length}, + }} + /> = ({ })} variant="info" > - - - + ); }; diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx index 55471986f01..ae93533897d 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx @@ -2,7 +2,8 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { PermissionGroupErrorCode, PermissionGroupErrorFragment } from "@dashboard/graphql"; import getPermissionGroupErrorMessage from "@dashboard/utils/errors/permissionGroups"; -import { DialogContentText, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; +import { Box } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -50,7 +51,7 @@ const PermissionGroupDeleteDialog: React.FC = ({ })} variant="delete" > - + = ({ name: {name}, }} /> - + {!!errorMessage && {errorMessage}} ); diff --git a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx index 0a2d17a86ff..6471214da98 100644 --- a/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx +++ b/src/permissionGroups/components/UnassignMembersDialog/UnassignMembersDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,18 +33,16 @@ const UnassignMembersDialog: React.FC = ({ })} variant="delete" > - - {quantity}, - }} - /> - + {quantity}, + }} + /> ); }; diff --git a/src/plugins/views/PluginsDetails.tsx b/src/plugins/views/PluginsDetails.tsx index c2928449e9e..90f11149657 100644 --- a/src/plugins/views/PluginsDetails.tsx +++ b/src/plugins/views/PluginsDetails.tsx @@ -13,7 +13,6 @@ import useStateFromProps from "@dashboard/hooks/useStateFromProps"; import { commonMessages } from "@dashboard/intl"; import { extractMutationErrors } from "@dashboard/misc"; import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHandlers"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -145,12 +144,10 @@ export const PluginsDetails: React.FC = ({ id, params }) => })} onConfirm={() => handleFieldUpdate(null)} > - - - + = ({ }); return ( - = ({ }} onChange={e => setChoice(e.target.value)} /> - + ); }; diff --git a/src/products/components/ProductVariantEndPreorderDialog/ProductVariantEndPreorderDialog.tsx b/src/products/components/ProductVariantEndPreorderDialog/ProductVariantEndPreorderDialog.tsx index ad279333666..4bc5bdbaaf2 100644 --- a/src/products/components/ProductVariantEndPreorderDialog/ProductVariantEndPreorderDialog.tsx +++ b/src/products/components/ProductVariantEndPreorderDialog/ProductVariantEndPreorderDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -35,11 +34,9 @@ const ProductVariantEndPreorderDialog: React.FC - - {intl.formatMessage(productVariantEndPreorderDialogMessages.dialogMessage, { - variantGlobalSoldUnits, - })} - + {intl.formatMessage(productVariantEndPreorderDialogMessages.dialogMessage, { + variantGlobalSoldUnits, + })} ); }; diff --git a/src/products/views/ProductImage.tsx b/src/products/views/ProductImage.tsx index a72aa606da5..03160d3400f 100644 --- a/src/products/views/ProductImage.tsx +++ b/src/products/views/ProductImage.tsx @@ -9,7 +9,6 @@ import { import useNavigator from "@dashboard/hooks/useNavigator"; import useNotifier from "@dashboard/hooks/useNotifier"; import { commonMessages } from "@dashboard/intl"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -96,12 +95,10 @@ export const ProductImage: React.FC = ({ mediaId, productId, variant="delete" confirmButtonState={deleteResult.status} > - - - + ); diff --git a/src/products/views/ProductList/ProductList.tsx b/src/products/views/ProductList/ProductList.tsx index 9f14f558a5a..7a3f9b61b22 100644 --- a/src/products/views/ProductList/ProductList.tsx +++ b/src/products/views/ProductList/ProductList.tsx @@ -63,7 +63,6 @@ import { ListViews } from "@dashboard/types"; import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHandlers"; import { mapEdgesToItems, mapNodeToChoice } from "@dashboard/utils/maps"; import { getSortUrlVariables } from "@dashboard/utils/sort"; -import { DialogContentText } from "@material-ui/core"; import isEqual from "lodash/isEqual"; import React, { useCallback, useEffect, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -422,17 +421,15 @@ export const ProductList: React.FC = ({ params }) => { })} variant="delete" > - - {selectedRowIds.length}, - }} - /> - + {selectedRowIds.length}, + }} + /> = ({ id, params }) => { variant="delete" title={intl.formatMessage(messages.deleteProductDialogTitle)} > - - - + ); diff --git a/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx b/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx index d395703b31e..a54a7b5cc73 100644 --- a/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx +++ b/src/shipping/components/DeleteShippingRateDialog/DeleteShippingRateDialog.tsx @@ -1,7 +1,6 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { getStringOrPlaceholder } from "@dashboard/misc"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -35,16 +34,14 @@ export const DeleteShippingRateDialog: React.FC = })} variant="delete" > - - - + ); }; diff --git a/src/shipping/components/UnassignDialog/UnassignDialog.tsx b/src/shipping/components/UnassignDialog/UnassignDialog.tsx index 3894f9d466d..0bf737cce2e 100644 --- a/src/shipping/components/UnassignDialog/UnassignDialog.tsx +++ b/src/shipping/components/UnassignDialog/UnassignDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -38,17 +37,15 @@ export const UnassignDialog: React.FC = ({ description: "unassign products from shipping rate and save, button", })} > - - {idsLength}, - }} - /> - + {idsLength}, + }} + /> ); }; diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index d359c283213..f98f0fb239d 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -35,7 +35,6 @@ import { arrayDiff } from "@dashboard/utils/arrays"; import createDialogActionHandlers from "@dashboard/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@dashboard/utils/handlers/metadataUpdateHandler"; import { mapCountriesToCountriesCodes, mapEdgesToItems } from "@dashboard/utils/maps"; -import { DialogContentText } from "@material-ui/core"; import { diff } from "fast-array-diff"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -242,16 +241,14 @@ const ShippingZoneDetails: React.FC = ({ id, params }) })} variant="delete" > - - {getStringOrPlaceholder(data?.shippingZone.name)}, - }} - /> - + {getStringOrPlaceholder(data?.shippingZone.name)}, + }} + /> = ({ id, params }) description: "remove country from shipping zone and save, button", })} > - - - {getStringOrPlaceholder( - data?.shippingZone?.countries.find(country => country.code === params.id) - ?.country, - )} - - ), - }} - /> - + + {getStringOrPlaceholder( + data?.shippingZone?.countries.find(country => country.code === params.id) + ?.country, + )} + + ), + }} + /> ({ - hr: { - backgroundColor: vars.colors.border.default1, - border: "none", - height: 1, - marginBottom: 0, - }, - sectionTitle: { - fontWeight: 600 as const, - marginBottom: theme.spacing(), - marginTop: theme.spacing(2), - }, - textFieldGrid: { - display: "grid", - gridColumnGap: theme.spacing(2), - gridTemplateColumns: "1fr 1fr", - }, - }), - { name: "StaffAddMemberDialog" }, -); interface StaffAddMemberDialogProps extends SearchPageProps { availablePermissionGroups: RelayToFlat; @@ -65,7 +43,6 @@ interface StaffAddMemberDialogProps extends SearchPageProps { const StaffAddMemberDialog: React.FC = props => { const { confirmButtonState, errors, onClose, onConfirm, open } = props; - const classes = useStyles(props); const dialogErrors = useModalDialogErrors(errors, open); const intl = useIntl(); const formErrors = getFormErrors(["firstName", "lastName", "email"], dialogErrors); @@ -78,68 +55,67 @@ const StaffAddMemberDialog: React.FC = props => { }); return ( - +
- {({ change, data: formData }) => ( - <> - + {({ change, data: formData, submit }) => ( + + - - -
- - -
- + + + + -
-
- + + + + + - - + + )}
-
+ ); }; diff --git a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx index 938aa06faa6..8faec70f099 100644 --- a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx +++ b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx @@ -2,7 +2,7 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; -import FormSpacer from "@dashboard/components/FormSpacer"; +import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; import { AccountErrorFragment } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import useModalDialogErrors from "@dashboard/hooks/useModalDialogErrors"; @@ -10,7 +10,7 @@ import { buttonMessages } from "@dashboard/intl"; import { DialogProps } from "@dashboard/types"; import { getFormErrors } from "@dashboard/utils/errors"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { Dialog, DialogActions, DialogContent, DialogTitle, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -40,61 +40,61 @@ const StaffPasswordResetDialog: React.FC = ({ const formErrors = getFormErrors(["oldPassword", "newPassword"], dialogErrors); return ( - - - - +
{({ change, data }) => ( - <> - - + + - - - - + + + + + + + = ({ > - - + + )}
-
+ ); }; diff --git a/src/staff/views/StaffDetails.tsx b/src/staff/views/StaffDetails.tsx index aa5d1c2ef90..a131f28d8d5 100644 --- a/src/staff/views/StaffDetails.tsx +++ b/src/staff/views/StaffDetails.tsx @@ -10,7 +10,6 @@ import useNavigator from "@dashboard/hooks/useNavigator"; import { extractMutationErrors, getStringOrPlaceholder } from "@dashboard/misc"; import usePermissionGroupSearch from "@dashboard/searches/usePermissionGroupSearch"; import { mapEdgesToItems } from "@dashboard/utils/maps"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -167,15 +166,13 @@ export const StaffDetails: React.FC = ({ id, params }) => { }) } > - - - + = ({ id, params }) => { onClose={closeModal} onConfirm={deleteUserAvatar} > - - {getStringOrPlaceholder(data?.user?.email)}, - }} - /> - + {getStringOrPlaceholder(data?.user?.email)}, + }} + /> = ({ } = useLocalSearch(countries, country => country.country); return ( - - - - - + + + + + + + = ({ }} inputProps={{ className: classes.inputPadding }} /> - -
+ + {filteredCountries.map(country => ( = ({ ))} -
-
- - - -
+ + + + + + + ); }; diff --git a/src/taxes/components/TaxCountryDialog/styles.ts b/src/taxes/components/TaxCountryDialog/styles.ts index 5209e509c66..d1a9840e74e 100644 --- a/src/taxes/components/TaxCountryDialog/styles.ts +++ b/src/taxes/components/TaxCountryDialog/styles.ts @@ -9,17 +9,6 @@ export const useStyles = makeStyles( overflowX: "visible", padding: 0, }, - scrollable: { - display: "flex", - flexDirection: "column", - overflowY: "scroll", - maxHeight: "60vh", - marginLeft: -15, - paddingLeft: 15, - }, - dialog: { - maxHeight: "unset", - }, }), { name: "TaxCountryDialog" }, ); diff --git a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx index 5f0ab1bc51e..1d2251d1ebb 100644 --- a/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx +++ b/src/warehouses/components/WarehouseDeleteDialog/WarehouseDeleteDialog.tsx @@ -1,6 +1,5 @@ import ActionDialog from "@dashboard/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { DialogContentText } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,16 +33,14 @@ const WarehouseDeleteDialog: React.FC = ({ description: "dialog title", })} > - - {name}, - }} - /> - + {name}, + }} + /> ); }; From 15d5b874757420c0ce8a17df6a071b84ded476d8 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Thu, 18 Jul 2024 20:40:46 +0200 Subject: [PATCH 013/264] Migrate MUI `Card` to `DashboardCard` (#5041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * app install page * attribute details * attributes * attributes * categories * the rest * changeset * fix SALEOR_206 * cr fixes * small fixes * remove `lastChild` attr * fix padding * fix passed value * refactor * refactor * fix types * fix datagrid * cr fixes * improve toolbar styles * final fixes * remove unused prop * optimize code --------- Co-authored-by: Paweł Chyła --- .changeset/strong-kings-watch.md | 5 ++ .../AppInstallPage/AppInstallPage.tsx | 52 +++++++----- .../AppListRow/ErrorInstallAction.tsx | 19 +++-- src/apps/components/AppListRow/styles.ts | 27 ------ .../AttributeDetails/AttributeDetails.tsx | 19 +++-- .../AttributeListPage/AttributeListPage.tsx | 6 +- .../AttributeOrganization.tsx | 34 ++++---- .../AttributeProperties.tsx | 22 +++-- .../AttributeValues/AttributeValues.tsx | 34 ++++---- .../CategoryBackground/CategoryBackground.tsx | 41 ++++----- .../CategoryDetailsForm.tsx | 19 +++-- .../CategoryListPage/CategoryListPage.tsx | 6 +- .../CategoryProducts/CategoryProducts.tsx | 41 +++++---- .../CategorySubcategories.tsx | 10 ++- .../CannotDefineChannelsAvailabilityCard.tsx | 8 +- .../ChannelAllocationStrategy.tsx | 31 +++---- .../components/ChannelForm/ChannelForm.tsx | 8 +- .../ChannelStatus/ChannelStatus.tsx | 29 ++++--- .../ShippingZones/ShippingZones.tsx | 16 ++-- .../components/Warehouses/Warehouses.tsx | 16 ++-- .../ChannelsListPage/ChannelsListPage.tsx | 7 +- .../CollectionDetails/CollectionDetails.tsx | 18 ++-- .../CollectionImage/CollectionImage.tsx | 41 ++++----- .../CollectionListPage/CollectionListPage.tsx | 6 +- .../CollectionProducts/CollectionProducts.tsx | 24 +++--- src/components/Alert/InlineAlert.tsx | 22 ++--- src/components/Card/Actions.tsx | 24 ++++++ src/components/Card/Content.tsx | 7 +- src/components/Card/Header.tsx | 21 +++++ src/components/Card/Root.tsx | 16 +++- src/components/Card/Subtitle.tsx | 13 +++ src/components/Card/Title.tsx | 18 ++-- src/components/Card/Toolbar.tsx | 11 +++ src/components/Card/index.ts | 13 ++- .../ChannelsAvailabilityCardWrapper.tsx | 27 +++--- .../ChannelsAvailabilityDropdown.tsx | 7 +- .../CompanyAddressInput.tsx | 4 +- src/components/CountryList/CountryList.tsx | 18 ++-- src/components/Datagrid/Datagrid.tsx | 17 ++-- src/components/Datagrid/styles.ts | 11 --- .../EditableTableCell/EditableTableCell.tsx | 15 ++-- .../ErrorMessageCard/ErrorMessageCard.tsx | 12 +-- src/components/FilterCard/FilterCard.tsx | 10 ++- .../LanguageSwitch/LanguageSwitch.tsx | 10 ++- src/components/Timeline/Timeline.tsx | 24 +++--- src/components/Timeline/TimelineNote.tsx | 38 ++++----- .../TypeDeleteWarningDialog.tsx | 11 +-- .../TypeDeleteWarningDialogContent.tsx | 6 +- src/components/UserAvatar/UserAvatar.tsx | 1 + .../VisibilityCard/VisibilityCard.tsx | 18 ++-- .../CustomAppDefaultToken.tsx | 11 +-- .../CustomAppInformation.tsx | 29 +++---- .../CustomAppTokens/CustomAppTokens.tsx | 34 ++++---- .../WebhookEvents/WebhookEvents.tsx | 16 ++-- .../WebhookHeaders/WebhookHeaders.tsx | 83 +++++++++---------- .../components/WebhookHeaders/styles.ts | 24 ------ .../components/WebhookInfo/WebhookInfo.tsx | 24 +++--- .../components/WebhookInfo/styles.ts | 3 - .../WebhookSubscriptionQuery.tsx | 24 +++--- .../WebhookSubscriptionQuery/styles.ts | 7 -- .../components/WebhooksList/WebhooksList.tsx | 29 +++---- .../CustomerAddress/CustomerAddress.tsx | 28 +++---- .../CustomerAddressChoiceCard.tsx | 11 +-- .../CustomerAddresses/CustomerAddresses.tsx | 44 +++++----- .../CustomerCreateAddress.tsx | 28 ++++--- .../CustomerCreateDetails.tsx | 28 ++++--- .../CustomerCreateNote/CustomerCreateNote.tsx | 28 ++++--- .../CustomerDetails/CustomerDetails.tsx | 57 ++++++------- .../components/CustomerInfo/CustomerInfo.tsx | 20 ++--- .../CustomerOrders/CustomerOrders.tsx | 28 ++++--- .../CustomerStats/CustomerStats.tsx | 16 ++-- .../DiscountCategories/DiscountCategories.tsx | 20 +++-- .../DiscountCollections.tsx | 20 +++-- .../DiscountDates/DiscountDates.tsx | 16 ++-- .../DiscountDescription.tsx | 8 +- .../DiscountGeneralInfo.tsx | 8 +- .../DiscountProducts/DiscountProducts.tsx | 21 +++-- .../DiscountRules/DiscountRules.tsx | 14 ++-- .../DiscountVariants/DiscountVariants.tsx | 20 +++-- .../components/SaleInfo/SaleInfo.tsx | 18 ++-- .../components/SaleListPage/SaleListPage.tsx | 6 +- .../components/SaleSummary/SaleSummary.tsx | 16 ++-- .../components/SaleType/SaleType.tsx | 28 ++++--- .../components/SaleValue/SaleValue.tsx | 24 +++--- .../components/VoucherDates/VoucherDates.tsx | 28 ++++--- .../components/VoucherInfo/VoucherInfo.tsx | 8 +- .../VoucherLimits/VoucherLimits.tsx | 16 ++-- .../VoucherListPage/VoucherListPage.tsx | 6 +- .../VoucherRequirements.tsx | 28 ++++--- .../VoucherSummary/VoucherSummary.tsx | 16 ++-- .../components/VoucherTypes/VoucherTypes.tsx | 28 ++++--- .../components/VoucherValue/VoucherValue.tsx | 28 ++++--- .../GiftCardExpirySettingsCard.tsx | 21 ++--- .../GiftCardUpdateDetailsCard.tsx | 27 +++--- .../GiftCardUpdateInfoCard.tsx | 16 ++-- .../CustomerGiftCardsCard.tsx | 47 +++++------ .../components/GiftCardCustomerCard/styles.ts | 18 ---- .../HomeActivityCard/HomeActivityCard.tsx | 12 ++- .../components/MenuItems/MenuItems.tsx | 26 +++--- .../components/MenuList/MenuList.tsx | 7 +- .../MenuProperties/MenuProperties.tsx | 18 ++-- .../OrderChannelSectionCard.tsx | 28 ++++--- .../OrderCustomer/OrderCustomer.tsx | 48 ++++++----- .../OrderCustomerNote/OrderCustomerNote.tsx | 28 ++++--- .../OrderDiscountCommonModal.tsx | 11 +-- .../OrderDraftDetails/OrderDraftDetails.tsx | 37 +++++---- .../OrderDraftListPage/OrderDraftListPage.tsx | 6 +- .../OrderFulfillPage/OrderFulfillPage.tsx | 32 ++++--- .../OrderFulfilledProductsCard.tsx | 6 +- .../OrderFulfillmentSettings.tsx | 28 ++++--- .../OrderGrantedRefunds.tsx | 17 ++-- .../OrderInvoiceList/OrderInvoiceList.tsx | 36 ++++---- .../OrderListPage/OrderListPage.tsx | 6 +- .../OrderManualTransactionRefundPage.tsx | 8 +- .../components/OrderPayment/OrderPayment.tsx | 29 ++++--- .../OrderPaymentSummaryCard.tsx | 65 +++++++++------ .../PaymentsSummary/PaymentsSummary.tsx | 6 +- .../components/OrderRefund/OrderRefund.tsx | 28 ++++--- .../OrderRefundFulfilledProducts.tsx | 29 +++---- .../OrderRefundUnfulfilledProducts.tsx | 37 ++++----- .../ReturnItemsCard.tsx | 19 ++--- .../components/ItemsCard/ItemsCard.tsx | 19 ++--- .../PaymentSubmitCard/PaymentSubmitCard.tsx | 35 ++++---- .../TransactionSubmitCard.tsx | 8 +- .../OrderSendRefundPage/OrderSendRefund.tsx | 34 +++++--- .../components/ManualRefundCard.tsx | 18 ++-- .../OrderSettings/OrderSettings.tsx | 28 ++++--- .../OrderSummaryCard/OrderSummaryCard.tsx | 18 ++-- .../OrderTransaction/OrderTransaction.tsx | 25 +++--- .../OrderTransactionSummary.tsx | 8 +- .../OrderUnfulfilledProductsCard.tsx | 15 ++-- .../OrderUnfulfilledProductsCard/styles.ts | 6 -- .../PageTypeAttributes/PageTypeAttributes.tsx | 32 +++---- .../PageTypeDetails/PageTypeDetails.tsx | 18 ++-- .../PageTypeListPage/PageTypeListPage.tsx | 6 +- src/pages/components/PageInfo/PageInfo.tsx | 18 ++-- .../components/PageListPage/PageListPage.tsx | 6 +- .../PageOrganizeContent.tsx | 28 ++++--- .../PermissionGroupInfo.tsx | 18 ++-- .../PermissionGroupListPage.tsx | 6 +- .../PermissionGroupMemberList.tsx | 33 ++++---- .../PluginAuthorization.tsx | 28 ++++--- .../PluginDetailsChannelsCard.tsx | 11 +-- .../PluginDetailsChannelsCardContent.tsx | 15 ++-- .../components/PluginInfo/PluginInfo.tsx | 28 ++++--- .../PluginSettings/PluginSettings.tsx | 28 ++++--- .../GlobalConfigPluginPopupBody.tsx | 7 +- .../PluginAvailabilityStatusPopup.tsx | 7 +- .../PluginsListPage/PluginsListPage.tsx | 6 +- .../ProductTypeAttributes.tsx | 32 +++---- .../ProductTypeDetails/ProductTypeDetails.tsx | 22 +++-- .../ProductTypeListPage.tsx | 6 +- .../ProductTypeShipping.tsx | 28 ++++--- .../ProductTypeTaxes/ProductTypeTaxes.tsx | 15 ++-- .../ProductTypeVariantAttributes.tsx | 32 +++---- .../ProductCategoryAndCollectionsForm.tsx | 10 +-- .../ProductDetailsForm/ProductDetailsForm.tsx | 8 +- .../ProductListPage/ProductListPage.tsx | 6 +- .../components/ProductMedia/ProductMedia.tsx | 10 ++- .../ProductMediaNavigation.tsx | 16 ++-- .../ProductMediaPage/ProductMediaPage.tsx | 32 ++++--- .../ProductOrganization.tsx | 16 ++-- .../ProductShipping/ProductShipping.tsx | 16 ++-- .../ProductStocks/ProductStocks.tsx | 4 +- .../components/ProductTaxes/ProductTaxes.tsx | 4 +- .../ProductVariantAttributes.tsx | 18 ++-- .../CreateVariantTitle.tsx | 46 +++++----- ...tailsChannelsAvailabilityCardContainer.tsx | 8 +- .../ProductVariantCheckoutSettings.tsx | 10 ++- .../ProductVariantMedia.tsx | 28 ++++--- .../ProductVariantName/ProductVariantName.tsx | 14 ++-- .../ProductVariantNavigation.tsx | 4 +- .../ProductVariantPrice.tsx | 32 +++---- .../components/OrderValue/OrderValue.tsx | 24 +++--- .../components/OrderWeight/OrderWeight.tsx | 28 ++++--- .../components/PricingCard/PricingCard.tsx | 28 ++++--- .../ShippingMethodProducts.tsx | 28 ++++--- .../ShippingMethodTaxes.tsx | 15 ++-- .../ShippingRateInfo/ShippingRateInfo.tsx | 18 ++-- .../ShippingZoneInfo/ShippingZoneInfo.tsx | 18 ++-- .../ShippingZonePostalCodes.tsx | 32 +++---- .../ShippingZoneRates/ShippingZoneRates.tsx | 24 +++--- .../ShippingZoneSettingsCard.tsx | 20 +++-- .../SiteCheckoutSettingsCard.tsx | 24 +++--- .../SiteSettingsPage/SiteSettingsPage.tsx | 8 +- .../StaffDetailsPage/StaffDetailsPage.tsx | 28 ++++--- .../StaffListPage/StaffListPage.tsx | 6 +- .../StaffPassword/StaffPassword.tsx | 32 +++---- .../StaffPreferences/StaffPreferences.tsx | 28 ++++--- .../StaffProperties/StaffProperties.tsx | 32 +++---- .../components/UserStatus/UserStatus.tsx | 16 ++-- .../ProductContextSwitcher.tsx | 9 +- .../TranslationFields/TranslationFields.tsx | 26 +++--- .../TranslationsEntitiesListPage.tsx | 6 +- .../TranslationsLanguageList.tsx | 11 +-- .../WarehouseInfo/WarehouseInfo.tsx | 8 +- .../WarehouseListPage/WarehouseListPage.tsx | 6 +- .../WarehouseSettings/WarehouseSettings.tsx | 46 +++++----- 198 files changed, 2144 insertions(+), 1861 deletions(-) create mode 100644 .changeset/strong-kings-watch.md create mode 100644 src/components/Card/Actions.tsx create mode 100644 src/components/Card/Header.tsx create mode 100644 src/components/Card/Subtitle.tsx create mode 100644 src/components/Card/Toolbar.tsx diff --git a/.changeset/strong-kings-watch.md b/.changeset/strong-kings-watch.md new file mode 100644 index 00000000000..a6b8bcba5a3 --- /dev/null +++ b/.changeset/strong-kings-watch.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Saleor Dashboard no longer uses MUI Card component, it uses DashboardCard instead. diff --git a/src/apps/components/AppInstallPage/AppInstallPage.tsx b/src/apps/components/AppInstallPage/AppInstallPage.tsx index b05f9e47db1..cede21e322d 100644 --- a/src/apps/components/AppInstallPage/AppInstallPage.tsx +++ b/src/apps/components/AppInstallPage/AppInstallPage.tsx @@ -2,8 +2,8 @@ import plusIcon from "@assets/images/plus-icon.svg"; import saleorLogoDarkMode from "@assets/images/sidebar-deafult-logo-darkMode.png"; import saleorLogoLightMode from "@assets/images/sidebar-default-logo.png"; import { AppAvatar } from "@dashboard/apps/components/AppAvatar/AppAvatar"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import Hr from "@dashboard/components/Hr"; import { DetailPageLayout } from "@dashboard/components/Layouts"; import Skeleton from "@dashboard/components/Skeleton"; @@ -11,8 +11,7 @@ import { AppFetchMutation, AppInstallMutation } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import { buttonMessages } from "@dashboard/intl"; import { useTheme } from "@dashboard/theme"; -import { Card, CardContent, CircularProgress, Typography } from "@material-ui/core"; -import { Box, Button } from "@saleor/macaw-ui-next"; +import { Box, Button, Spinner, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -51,15 +50,15 @@ export const AppInstallPage: React.FC = ({ - - - : intl.formatMessage(messages.title, { name })} - data-test-id="app-installation-page-header" - /> - + + + + {loading ? : intl.formatMessage(messages.title, { name })} + + + {loading ? ( - + ) : (
= ({ />
)} -
-
+ + + - - {!loading && } - + + + + + {loading ? : intl.formatMessage(messages.permissionsTitle)} + + + {loading ? ( ) : ( <> - + - + + {!!data?.permissions?.length && (
    {data?.permissions?.map(perm =>
  • {perm.name}
  • )} @@ -105,7 +111,7 @@ export const AppInstallPage: React.FC = ({ )}
    - + = ({ )} - + )} - - + + + + - } - /> + + + @@ -188,7 +192,7 @@ const AttributeValues: React.FC = ({ disabled={disabled} onClick={stopPropagation(() => onValueDelete(value?.id ?? ""))} > - + @@ -207,7 +211,7 @@ const AttributeValues: React.FC = ({ )} - + ); }; diff --git a/src/categories/components/CategoryBackground/CategoryBackground.tsx b/src/categories/components/CategoryBackground/CategoryBackground.tsx index daa0857aa47..ad4241c494e 100644 --- a/src/categories/components/CategoryBackground/CategoryBackground.tsx +++ b/src/categories/components/CategoryBackground/CategoryBackground.tsx @@ -1,12 +1,12 @@ import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Hr from "@dashboard/components/Hr"; import ImageUpload from "@dashboard/components/ImageUpload"; import MediaTile from "@dashboard/components/MediaTile"; import Skeleton from "@dashboard/components/Skeleton"; import { CategoryDetailsFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { vars } from "@saleor/macaw-ui-next"; import React from "react"; @@ -56,14 +56,16 @@ const CategoryBackground: React.FC = props => { const handleImageUploadButtonClick = () => anchor.current?.click(); return ( - - + + + {intl.formatMessage({ + id: "DP6b8U", + defaultMessage: "Background Image (optional)", + description: "section header", + })} + + <> - + = ({ hasRowHover={!isFilterPresetOpen} {...listProps} /> - + ); }; diff --git a/src/categories/components/CategoryProducts/CategoryProducts.tsx b/src/categories/components/CategoryProducts/CategoryProducts.tsx index a608a9d653b..2188ec56afc 100644 --- a/src/categories/components/CategoryProducts/CategoryProducts.tsx +++ b/src/categories/components/CategoryProducts/CategoryProducts.tsx @@ -28,34 +28,33 @@ export const CategoryProducts = ({ onSelectProductsIds, }: CategoryProductsProps) => ( - - + + + + + + + - - - - - - - - - - - + + + + + { return ( - - + + + + - - + + ( - - - + + + + + diff --git a/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx b/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx index 50a2609e1cc..e5d368155d1 100644 --- a/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx +++ b/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx @@ -1,10 +1,10 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import PreviewPill from "@dashboard/components/PreviewPill"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import { AllocationStrategyEnum, StockSettingsInput } from "@dashboard/graphql"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import HelpOutline from "@material-ui/icons/HelpOutline"; -import { Tooltip } from "@saleor/macaw-ui-next"; +import { Text, Tooltip } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -38,16 +38,17 @@ const ChannelAllocationStrategy: React.FC = ({ const classes = useStyles(); return ( - - + +
    - } - /> - +
    +
    + + @@ -77,13 +78,13 @@ const ChannelAllocationStrategy: React.FC = ({ className={classes.option} data-test-id={`channel-allocation-strategy-option-${option.type}`} > - + - +
    {option.subtitle && ( - + - + )} ), @@ -94,8 +95,8 @@ const ChannelAllocationStrategy: React.FC = ({ value={data?.allocationStrategy!} onChange={onChange} /> - - +
    +
    ); }; diff --git a/src/channels/components/ChannelForm/ChannelForm.tsx b/src/channels/components/ChannelForm/ChannelForm.tsx index 8e5cc8ecb56..41a7b4ab135 100644 --- a/src/channels/components/ChannelForm/ChannelForm.tsx +++ b/src/channels/components/ChannelForm/ChannelForm.tsx @@ -83,9 +83,11 @@ export const ChannelForm: React.FC = ({ return ( <> - - {intl.formatMessage(commonMessages.generalInformations)} - + + + {intl.formatMessage(commonMessages.generalInformations)} + + = ({ const classes = useStyles({}); return ( - - - + + + + {intl.formatMessage({ + id: "TSJRiZ", + defaultMessage: "Channel Status", + description: "channel status title", + })} + + + + @@ -52,8 +55,8 @@ export const ChannelStatus: React.FC = ({ )} - - + + ); }; diff --git a/src/channels/components/ShippingZones/ShippingZones.tsx b/src/channels/components/ShippingZones/ShippingZones.tsx index 6bc6fb2e3ba..dc8ea4bc1bd 100644 --- a/src/channels/components/ShippingZones/ShippingZones.tsx +++ b/src/channels/components/ShippingZones/ShippingZones.tsx @@ -1,9 +1,9 @@ import { ChannelShippingZones } from "@dashboard/channels/pages/ChannelDetailsPage/types"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { SearchShippingZonesQuery } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; import { FetchMoreProps, RelayToFlat } from "@dashboard/types"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -35,11 +35,13 @@ const ShippingZones: React.FC = props => { const intl = useIntl(); return ( - - - + + + {intl.formatMessage(sectionNames.shippingZones)} + + {intl.formatMessage(messages.subtitle)} - + = props => { inputName="shippingZone" itemsName={intl.formatMessage(sectionNames.shippingZones)} /> - +
    ); }; diff --git a/src/channels/components/Warehouses/Warehouses.tsx b/src/channels/components/Warehouses/Warehouses.tsx index b7b4493eaf0..3b71f89d35b 100644 --- a/src/channels/components/Warehouses/Warehouses.tsx +++ b/src/channels/components/Warehouses/Warehouses.tsx @@ -1,9 +1,9 @@ import { ChannelWarehouses } from "@dashboard/channels/pages/ChannelDetailsPage/types"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { SearchWarehousesQuery } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; import { FetchMoreProps, RelayToFlat, ReorderAction } from "@dashboard/types"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -37,11 +37,13 @@ const Warehouses: React.FC = props => { const intl = useIntl(); return ( - - - + + + {intl.formatMessage(sectionNames.warehouses)} + + {intl.formatMessage(messages.subtitle)} - + = props => { inputName="warehouse" itemsName={intl.formatMessage(sectionNames.warehouses)} /> - +
    ); }; diff --git a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx index 371bb5f6f65..03eac71b966 100644 --- a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx +++ b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx @@ -3,6 +3,7 @@ import { channelAddUrl, channelUrl } from "@dashboard/channels/urls"; import { LimitsInfo } from "@dashboard/components/AppLayout/LimitsInfo"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import { ListPageLayout } from "@dashboard/components/Layouts"; import LimitReachedAlert from "@dashboard/components/LimitReachedAlert"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; @@ -15,7 +16,7 @@ import { ChannelDetailsFragment, RefreshLimitsQuery } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; import { renderCollection, stopPropagation } from "@dashboard/misc"; import { hasLimits, isLimitReached } from "@dashboard/utils/limits"; -import { Card, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -80,7 +81,7 @@ export const ChannelsListPage: React.FC = ({ /> )} - + @@ -142,7 +143,7 @@ export const ChannelsListPage: React.FC = ({ )} - + ); }; diff --git a/src/collections/components/CollectionDetails/CollectionDetails.tsx b/src/collections/components/CollectionDetails/CollectionDetails.tsx index 2377950ca3a..560eaee03e3 100644 --- a/src/collections/components/CollectionDetails/CollectionDetails.tsx +++ b/src/collections/components/CollectionDetails/CollectionDetails.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import FormSpacer from "@dashboard/components/FormSpacer"; import RichTextEditor from "@dashboard/components/RichTextEditor"; import { RichTextEditorLoading } from "@dashboard/components/RichTextEditor/RichTextEditorLoading"; @@ -8,7 +8,7 @@ import { commonMessages } from "@dashboard/intl"; import { getFormErrors, getProductErrorMessage } from "@dashboard/utils/errors"; import { useRichTextContext } from "@dashboard/utils/richText/context"; import { OutputData } from "@editorjs/editorjs"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -33,9 +33,13 @@ const CollectionDetails: React.FC = ({ const formErrors = getFormErrors(["name", "description"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = ({ name="description" /> )} - - + + ); }; diff --git a/src/collections/components/CollectionImage/CollectionImage.tsx b/src/collections/components/CollectionImage/CollectionImage.tsx index f6695d3a1f3..70be3eb3f3f 100644 --- a/src/collections/components/CollectionImage/CollectionImage.tsx +++ b/src/collections/components/CollectionImage/CollectionImage.tsx @@ -1,13 +1,13 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Hr from "@dashboard/components/Hr"; import ImageUpload from "@dashboard/components/ImageUpload"; import MediaTile from "@dashboard/components/MediaTile"; import Skeleton from "@dashboard/components/Skeleton"; import { CollectionDetailsFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { vars } from "@saleor/macaw-ui-next"; import React from "react"; @@ -68,14 +68,16 @@ export const CollectionImage: React.FC = props => { const handleImageUploadButtonClick = () => anchor.current.click(); return ( - - + + + {intl.formatMessage({ + id: "DP6b8U", + defaultMessage: "Background Image (optional)", + description: "section header", + })} + + <> - } - /> + + = props => { )} - + ); }; diff --git a/src/components/Alert/InlineAlert.tsx b/src/components/Alert/InlineAlert.tsx index d23c15a186e..cf1ec3e7bc2 100644 --- a/src/components/Alert/InlineAlert.tsx +++ b/src/components/Alert/InlineAlert.tsx @@ -1,25 +1,15 @@ -import { Card } from "@material-ui/core"; -import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; -const useStyles = makeStyles( - theme => ({ - container: { - backgroundColor: theme.palette.error.main, - padding: theme.spacing(1.5, 2), - }, - }), - { name: "InlineAlert" }, -); +import { DashboardCard } from "../Card"; interface AlertCardProps { children?: React.ReactNode | React.ReactNode[]; } -const AlertCard: React.FC = ({ children }) => { - const classes = useStyles({}); - - return {children}; -}; +const AlertCard: React.FC = ({ children }) => ( + + {children} + +); export default AlertCard; diff --git a/src/components/Card/Actions.tsx b/src/components/Card/Actions.tsx new file mode 100644 index 00000000000..849f3735e2b --- /dev/null +++ b/src/components/Card/Actions.tsx @@ -0,0 +1,24 @@ +import { Box, PropsWithBox } from "@saleor/macaw-ui-next"; +import React from "react"; + +export const Actions: React.FC> = ({ + children, + className, + style, + ...rest +}) => ( + + {children} + +); diff --git a/src/components/Card/Content.tsx b/src/components/Card/Content.tsx index 570b373103e..7b173143841 100644 --- a/src/components/Card/Content.tsx +++ b/src/components/Card/Content.tsx @@ -1,7 +1,10 @@ -import { Box, Sprinkles } from "@saleor/macaw-ui-next"; +import { Box, PropsWithBox } from "@saleor/macaw-ui-next"; import React from "react"; -export const Content: React.FC = ({ children, ...rest }) => ( +export const Content: React.FC> = ({ + children, + ...rest +}) => ( {children} diff --git a/src/components/Card/Header.tsx b/src/components/Card/Header.tsx new file mode 100644 index 00000000000..991734ad845 --- /dev/null +++ b/src/components/Card/Header.tsx @@ -0,0 +1,21 @@ +import { Box, PropsWithBox } from "@saleor/macaw-ui-next"; +import React from "react"; + +export const Header: React.FC> = ({ + children, + className, + ...rest +}) => ( + + {children} + +); diff --git a/src/components/Card/Root.tsx b/src/components/Card/Root.tsx index 6b06fb44315..05fcaa579ed 100644 --- a/src/components/Card/Root.tsx +++ b/src/components/Card/Root.tsx @@ -1,8 +1,18 @@ -import { Box, Sprinkles } from "@saleor/macaw-ui-next"; +import { Box, PropsWithBox } from "@saleor/macaw-ui-next"; import React from "react"; -export const Root: React.FC = ({ children, ...rest }) => ( - +export const Root: React.FC> = ({ + children, + ...rest +}) => ( + {children} ); diff --git a/src/components/Card/Subtitle.tsx b/src/components/Card/Subtitle.tsx new file mode 100644 index 00000000000..29bee2cb42c --- /dev/null +++ b/src/components/Card/Subtitle.tsx @@ -0,0 +1,13 @@ +import { Sprinkles, Text } from "@saleor/macaw-ui-next"; +import React, { PropsWithChildren } from "react"; + +type CardSubtitleProps = Sprinkles; + +export const CardSubtitle: React.FC> = ({ + children, + ...rest +}) => ( + + {children} + +); diff --git a/src/components/Card/Title.tsx b/src/components/Card/Title.tsx index ea441b111d6..8430cf342b9 100644 --- a/src/components/Card/Title.tsx +++ b/src/components/Card/Title.tsx @@ -1,14 +1,10 @@ -import { Box, Sprinkles, Text } from "@saleor/macaw-ui-next"; -import React from "react"; +import { Text, TextProps } from "@saleor/macaw-ui-next"; +import React, { PropsWithChildren } from "react"; -interface TitleProps { - paddingX?: Sprinkles["paddingX"]; -} +type TitleProps = TextProps; -export const Title: React.FC = ({ children, paddingX }) => ( - - - {children} - - +export const Title: React.FC> = ({ children, ...rest }) => ( + + {children} + ); diff --git a/src/components/Card/Toolbar.tsx b/src/components/Card/Toolbar.tsx new file mode 100644 index 00000000000..50e06b669d6 --- /dev/null +++ b/src/components/Card/Toolbar.tsx @@ -0,0 +1,11 @@ +import { Box, PropsWithBox } from "@saleor/macaw-ui-next"; +import React from "react"; + +export const Toolbar: React.FC> = ({ + children, + ...rest +}) => ( + + {children} + +); diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts index bf4f342a9f8..76824fd7b6b 100644 --- a/src/components/Card/index.ts +++ b/src/components/Card/index.ts @@ -1,5 +1,16 @@ +import { Actions as BottomActions } from "./Actions"; import { Content } from "./Content"; +import { Header } from "./Header"; import { Root } from "./Root"; +import { CardSubtitle as Subtitle } from "./Subtitle"; import { Title } from "./Title"; +import { Toolbar } from "./Toolbar"; -export const DashboardCard = Object.assign(Root, { Title, Content }); +export const DashboardCard = Object.assign(Root, { + Title, + Content, + BottomActions, + Subtitle, + Header, + Toolbar, +}); diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx index baa16ea3fbd..c00703c8544 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx @@ -34,22 +34,23 @@ export const ChannelsAvailabilityCardWrapper: React.FC< return ( - - - -
    - {intl.formatMessage({ - id: "5A6/2C", - defaultMessage: "Availability", - description: "section header", - })} -
    + + + {intl.formatMessage({ + id: "5A6/2C", + defaultMessage: "Availability", + description: "section header", + })} + + {!!channelsAvailabilityText && ( {channelsAvailabilityText} )} -
    + +
    + - } - /> + + @@ -157,7 +157,7 @@ const CountryList: React.FC = props => { )} - +
    ); }; diff --git a/src/components/Datagrid/Datagrid.tsx b/src/components/Datagrid/Datagrid.tsx index 04291b6999b..8a530a27d35 100644 --- a/src/components/Datagrid/Datagrid.tsx +++ b/src/components/Datagrid/Datagrid.tsx @@ -16,7 +16,7 @@ import DataEditor, { Theme, } from "@glideapps/glide-data-grid"; import { GetRowThemeCallback } from "@glideapps/glide-data-grid/dist/ts/data-grid/data-grid-render"; -import { Card, CardContent, CircularProgress } from "@material-ui/core"; +import { CircularProgress } from "@material-ui/core"; import { Box, Text, useTheme } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import range from "lodash/range"; @@ -31,6 +31,7 @@ import React, { useState, } from "react"; +import { DashboardCard } from "../Card"; import { CardMenuItem } from "../CardMenu"; import { FullScreenContainer } from "./components/FullScreenContainer"; import { RowActions } from "./components/RowActions"; @@ -401,14 +402,20 @@ export const Datagrid: React.FC = ({ return ( - + {renderHeader?.({ toggleFullscreen: toggle, addRowOnDatagrid: onRowAdded, isFullscreenOpen: isOpen, isAnimationOpenFinished, })} - + {rowsTotal > 0 || showEmptyDatagrid ? ( <> {selection?.rows && selection?.rows.length > 0 && selectionActionsComponent && ( @@ -506,8 +513,8 @@ export const Datagrid: React.FC = ({
    )} - - + + ( width: "100%", paddingBottom: "1px", }, - root: { - position: "relative", - }, rowActionBar: { height: "100%", width: 36, @@ -159,14 +156,6 @@ const useStyles = makeStyles<{ actionButtonPosition?: "left" | "right" }>( boxShadow: "-1px 0px 12px rgba(0, 0, 0, 0.80)", }, rowActionSelected, - cardContentRoot: { - padding: "0", - flex: 1, - - "&:last-child": { - padding: "0", - }, - }, }; }, { name: "Datagrid" }, diff --git a/src/components/EditableTableCell/EditableTableCell.tsx b/src/components/EditableTableCell/EditableTableCell.tsx index be9f4690c84..f79d356d782 100644 --- a/src/components/EditableTableCell/EditableTableCell.tsx +++ b/src/components/EditableTableCell/EditableTableCell.tsx @@ -1,15 +1,14 @@ import useForm from "@dashboard/hooks/useForm"; -import { Card, CardContent, TableCell, TextField, Typography } from "@material-ui/core"; +import { TableCell, TextField, Typography } from "@material-ui/core"; import { TextFieldProps } from "@material-ui/core/TextField"; import { makeStyles } from "@saleor/macaw-ui"; import clsx from "clsx"; import React from "react"; +import { DashboardCard } from "../Card"; + const useStyles = makeStyles( theme => ({ - card: { - border: `1px solid ${theme.palette.divider}`, - }, container: { position: "relative", }, @@ -76,8 +75,8 @@ export const EditableTableCell: React.FC = props => { {opened && (
    - - + + = props => { variant="standard" {...InputProps} /> - - + +
    )} diff --git a/src/components/ErrorMessageCard/ErrorMessageCard.tsx b/src/components/ErrorMessageCard/ErrorMessageCard.tsx index b709bd935e3..166f371c948 100644 --- a/src/components/ErrorMessageCard/ErrorMessageCard.tsx +++ b/src/components/ErrorMessageCard/ErrorMessageCard.tsx @@ -1,20 +1,22 @@ -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; +import { DashboardCard } from "../Card"; + interface ErrorMessageCardProps { message: string; } const ErrorMessageCard: React.FC = ({ message }) => ( - - + + {message} - - + + ); ErrorMessageCard.displayName = "ErrorMessageCard"; diff --git a/src/components/FilterCard/FilterCard.tsx b/src/components/FilterCard/FilterCard.tsx index 86bf4289b0a..e57a80fe176 100644 --- a/src/components/FilterCard/FilterCard.tsx +++ b/src/components/FilterCard/FilterCard.tsx @@ -1,10 +1,12 @@ // @ts-strict-ignore -import { Card, CardContent, CardHeader } from "@material-ui/core"; +import { CardHeader } from "@material-ui/core"; import RefreshIcon from "@material-ui/icons/Refresh"; import { IconButton } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; +import { DashboardCard } from "../Card"; + export interface FilterCardProps { handleClear: () => any; } @@ -13,7 +15,7 @@ const FilterCard: React.FC = ({ children, handleClear }) => { const intl = useIntl(); return ( - +
    = ({ children, handleClear }) => { defaultMessage: "Filters", })} /> - {children} + {children} -
    + ); }; diff --git a/src/components/LanguageSwitch/LanguageSwitch.tsx b/src/components/LanguageSwitch/LanguageSwitch.tsx index 5d4707a356c..31feba2dbe9 100644 --- a/src/components/LanguageSwitch/LanguageSwitch.tsx +++ b/src/components/LanguageSwitch/LanguageSwitch.tsx @@ -1,7 +1,6 @@ // @ts-strict-ignore import { LanguageCodeEnum, LanguageFragment } from "@dashboard/graphql"; import { - Card, ClickAwayListener, Grow, MenuItem, @@ -17,6 +16,8 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import { Link } from "react-router-dom"; +import { DashboardCard } from "../Card"; + export interface LanguageSwitchProps { currentLanguage: LanguageCodeEnum; languages: LanguageFragment[]; @@ -64,14 +65,17 @@ const LanguageSwitch: React.FC = props => { return (
    - setExpandedState(!isExpanded)}> + setExpandedState(!isExpanded)} + > {currentLanguage} - + ({ - avatar: { - left: -19, - position: "absolute", - top: 20, - }, button: { padding: `7px`, borderTopLeftRadius: 0, borderBottomLeftRadius: 0, }, - cardActionsExpanded: { - maxHeight: theme.spacing(6), - }, input: { "& > div": { padding: "0 0 0 14px", @@ -38,7 +31,6 @@ const useStyles = makeStyles( }, noteRoot: { marginBottom: theme.spacing(3), - // position: "absolute", top: 0, left: -19, right: 0, @@ -90,11 +82,15 @@ export const TimelineAddNote: React.FC = props => { return (
    - + = props => { }} variant="outlined" /> - +
    ); }; diff --git a/src/components/Timeline/TimelineNote.tsx b/src/components/Timeline/TimelineNote.tsx index 41f3d968ae6..87ac4a9b304 100644 --- a/src/components/Timeline/TimelineNote.tsx +++ b/src/components/Timeline/TimelineNote.tsx @@ -1,10 +1,10 @@ import { GiftCardEventFragment, OrderEventFragment } from "@dashboard/graphql"; import { getUserInitials, getUserName } from "@dashboard/misc"; -import { Card, CardContent } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; -import { Text, vars } from "@saleor/macaw-ui-next"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; +import { DashboardCard } from "../Card"; import { DateTime } from "../Date"; import { UserAvatar } from "../UserAvatar"; @@ -15,20 +15,6 @@ const useStyles = makeStyles( position: "absolute", top: 0, }, - card: { - marginBottom: theme.spacing(3), - position: "relative", - boxShadow: "none", - background: vars.colors.background.default1, - }, - cardContent: { - wordBreak: "break-all", - borderRadius: "4px", - border: `1px solid ${vars.colors.border.default1}`, - "&:last-child": { - padding: 16, - }, - }, root: { position: "relative", }, @@ -117,11 +103,23 @@ export const TimelineNote: React.FC = ({
    - - + + - - + + ); }; diff --git a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx index 48e17fdc622..e5cc5542bfb 100644 --- a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx +++ b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialog.tsx @@ -2,10 +2,11 @@ import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import { getById } from "@dashboard/misc"; import ModalTitle from "@dashboard/orders/components/OrderDiscountCommonModal/ModalTitle"; -import { Card, CardContent, CircularProgress, Modal } from "@material-ui/core"; +import { CircularProgress, Modal } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; +import { DashboardCard } from "../Card"; import { useTypeDeleteWarningDialogStyles as useStyles } from "./styles"; import ProductTypeDeleteWarningDialogContent from "./TypeDeleteWarningDialogContent"; import { CommonTypeDeleteWarningMessages, TypeDeleteWarningMessages } from "./types"; @@ -81,7 +82,7 @@ function TypeDeleteWarningDialog({ return (
    - + ({ onClose={onClose} /> {isLoading ? ( - + - + ) : ( ({ viewAssignedItemsButtonLabel={baseMessages.viewAssignedItemsButtonLabel} /> )} - +
    ); diff --git a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx index 208536ccaf7..5692504b7f3 100644 --- a/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx +++ b/src/components/TypeDeleteWarningDialog/TypeDeleteWarningDialogContent.tsx @@ -2,10 +2,10 @@ import CardSpacer from "@dashboard/components/CardSpacer"; import { ConfirmButton } from "@dashboard/components/ConfirmButton"; import HorizontalSpacer from "@dashboard/components/HorizontalSpacer"; import useNavigator from "@dashboard/hooks/useNavigator"; -import { CardContent } from "@material-ui/core"; import React, { useState } from "react"; import { MessageDescriptor, useIntl } from "react-intl"; +import { DashboardCard } from "../Card"; import DeleteButton from "../DeleteButton"; import DeleteWarningDialogConsentContent from "./DeleteWarningDialogConsentContent"; import { useTypeDeleteWarningDialogStyles as useStyles } from "./styles"; @@ -43,7 +43,7 @@ const TypeDeleteWarningDialogContent: React.FC + - + ); }; diff --git a/src/components/UserAvatar/UserAvatar.tsx b/src/components/UserAvatar/UserAvatar.tsx index 39b78eed1e9..3796c7ec977 100644 --- a/src/components/UserAvatar/UserAvatar.tsx +++ b/src/components/UserAvatar/UserAvatar.tsx @@ -5,6 +5,7 @@ interface UserAvatarProps { url?: string; initials?: string; className?: string; + style?: React.CSSProperties; } export const UserAvatar: React.FC = ({ url, initials, ...rest }) => diff --git a/src/components/VisibilityCard/VisibilityCard.tsx b/src/components/VisibilityCard/VisibilityCard.tsx index 8181e71f6ce..38ca5791a94 100644 --- a/src/components/VisibilityCard/VisibilityCard.tsx +++ b/src/components/VisibilityCard/VisibilityCard.tsx @@ -1,5 +1,4 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import Hr from "@dashboard/components/Hr"; import RadioSwitchField from "@dashboard/components/RadioSwitchField"; @@ -8,13 +7,14 @@ import useDateLocalize from "@dashboard/hooks/useDateLocalize"; import { ChangeEvent } from "@dashboard/hooks/useForm"; import { UserError } from "@dashboard/types"; import { getFieldError } from "@dashboard/utils/errors"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { Box, Checkbox, RadioGroup, Text } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import React, { useState } from "react"; import { useIntl } from "react-intl"; +import { DashboardCard } from "../Card"; import { DateTimeTimezoneField } from "../DateTimeTimezoneField"; import FormSpacer from "../FormSpacer"; import DateVisibilitySelector from "./DateVisibilitySelector"; @@ -135,9 +135,13 @@ export const VisibilityCard: React.FC = props => { }; return ( - - - + + + + {intl.formatMessage(visibilityCardMessages.title)} + + + = props => { )}
    {children}
    -
    -
    + + ); }; VisibilityCard.displayName = "VisibilityCard"; diff --git a/src/custom-apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx b/src/custom-apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx index 2f8951e9b75..8d14f13d616 100644 --- a/src/custom-apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx +++ b/src/custom-apps/components/CustomAppDefaultToken/CustomAppDefaultToken.tsx @@ -1,7 +1,8 @@ import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import Link from "@dashboard/components/Link"; import useClipboard from "@dashboard/hooks/useClipboard"; -import { Card, CardContent, Paper, Typography } from "@material-ui/core"; +import { Paper, Typography } from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import { IconButton } from "@saleor/macaw-ui"; import React from "react"; @@ -22,8 +23,8 @@ const CustomAppDefaultToken: React.FC = props => { const [copied, copy] = useClipboard(); return ( - - + +
    @@ -65,8 +66,8 @@ const CustomAppDefaultToken: React.FC = props => { )} - - + + ); }; diff --git a/src/custom-apps/components/CustomAppInformation/CustomAppInformation.tsx b/src/custom-apps/components/CustomAppInformation/CustomAppInformation.tsx index 54a8e8145c8..89d453b55c3 100644 --- a/src/custom-apps/components/CustomAppInformation/CustomAppInformation.tsx +++ b/src/custom-apps/components/CustomAppInformation/CustomAppInformation.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { AppErrorFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; import { getFormErrors } from "@dashboard/utils/errors"; import getAppErrorMessage from "@dashboard/utils/errors/app"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -38,16 +38,17 @@ const CustomAppInformation: React.FC = ({ const formErrors = getFormErrors(["name"], errors); return ( - - - + + + + {intl.formatMessage({ + id: "imYxM9", + defaultMessage: "App Information", + description: "header", + })} + + + = ({ value={data.name} onChange={onChange} /> - - + + ); }; diff --git a/src/custom-apps/components/CustomAppTokens/CustomAppTokens.tsx b/src/custom-apps/components/CustomAppTokens/CustomAppTokens.tsx index b8550d56fdb..d43a2e60dcd 100644 --- a/src/custom-apps/components/CustomAppTokens/CustomAppTokens.tsx +++ b/src/custom-apps/components/CustomAppTokens/CustomAppTokens.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; import TableRowLink from "@dashboard/components/TableRowLink"; import { AppUpdateMutation } from "@dashboard/graphql"; import { renderCollection } from "@dashboard/misc"; -import { Card, CardContent, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -26,21 +26,23 @@ const CustomAppTokens: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage({ + id: "0Mg8o5", + defaultMessage: "Tokens", + description: "header", + })} + + - } - /> - + + + + @@ -93,8 +95,8 @@ const CustomAppTokens: React.FC = props => { )} - - + + ); }; diff --git a/src/custom-apps/components/WebhookEvents/WebhookEvents.tsx b/src/custom-apps/components/WebhookEvents/WebhookEvents.tsx index bf29577158e..b4aa00f6a6d 100644 --- a/src/custom-apps/components/WebhookEvents/WebhookEvents.tsx +++ b/src/custom-apps/components/WebhookEvents/WebhookEvents.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Grid from "@dashboard/components/Grid"; import Hr from "@dashboard/components/Hr"; import { Pill } from "@dashboard/components/Pill"; import { WebhookEventTypeAsyncEnum, WebhookEventTypeSyncEnum } from "@dashboard/graphql"; import { ChangeEvent } from "@dashboard/hooks/useForm"; import { capitalize } from "@dashboard/misc"; -import { Card, CardContent, Checkbox, Typography } from "@material-ui/core"; +import { Checkbox, Typography } from "@material-ui/core"; import { List, ListBody, @@ -73,9 +73,11 @@ const WebhookEvents: React.FC = ({ return ( <> - - - + + + {intl.formatMessage(messages.webhookEvents)} + + @@ -89,7 +91,7 @@ const WebhookEvents: React.FC = ({ - +
    @@ -160,7 +162,7 @@ const WebhookEvents: React.FC = ({

    - + ); }; diff --git a/src/custom-apps/components/WebhookHeaders/WebhookHeaders.tsx b/src/custom-apps/components/WebhookHeaders/WebhookHeaders.tsx index 27a4909bb04..ce6d41fc15e 100644 --- a/src/custom-apps/components/WebhookHeaders/WebhookHeaders.tsx +++ b/src/custom-apps/components/WebhookHeaders/WebhookHeaders.tsx @@ -1,18 +1,9 @@ -import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Skeleton from "@dashboard/components/Skeleton"; import TableRowLink from "@dashboard/components/TableRowLink"; import { FormChange } from "@dashboard/hooks/useForm"; -import { - Card, - CardActions, - CardContent, - Table, - TableCell, - TableHead, - Typography, -} from "@material-ui/core"; -import { ExpandIcon, IconButton } from "@saleor/macaw-ui"; +import { Table, TableCell, TableHead, Typography } from "@material-ui/core"; +import { Button, ChervonDownIcon } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import React, { useEffect, useMemo, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -53,34 +44,36 @@ const WebhookHeaders: React.FC = ({ data: { customHeaders } }; return ( - - - {intl.formatMessage(messages.header)} - setExpanded(!expanded)} - > - - - - } - /> + + + + {intl.formatMessage(messages.header)} + + + + {headers === undefined ? ( - + - + ) : ( <> - - {headers.length > 0 && ( + {headers.length > 0 && ( + = ({ data: { customHeaders } }} /> - )} - + + )} {expanded && ( <> {headers.length === 0 ? ( - + - + ) : ( <> - + = ({ data: { customHeaders } }} /> - + @@ -130,7 +123,7 @@ const WebhookHeaders: React.FC = ({ data: { customHeaders }
    )} - + - + )} )} -
    + ); }; diff --git a/src/custom-apps/components/WebhookHeaders/styles.ts b/src/custom-apps/components/WebhookHeaders/styles.ts index f9e24e89fde..cbde74d13a1 100644 --- a/src/custom-apps/components/WebhookHeaders/styles.ts +++ b/src/custom-apps/components/WebhookHeaders/styles.ts @@ -42,13 +42,6 @@ const useStyles = makeStyles( ...colName, }, colValue: {}, - actions: { - "&&": { - paddingBottom: theme.spacing(2), - paddingTop: theme.spacing(2), - paddingLeft: theme.spacing(4), - }, - }, content: { paddingBottom: 0, paddingTop: theme.spacing(), @@ -57,20 +50,6 @@ const useStyles = makeStyles( paddingBottom: 0, paddingTop: 0, }, - expandBtn: { - position: "relative", - left: theme.spacing(1), - top: -2, - transition: theme.transitions.create("transform", { - duration: theme.transitions.duration.shorter, - }), - border: 0, - }, - header: { - "&&": { - paddingBottom: theme.spacing(1), - }, - }, input: { padding: theme.spacing(1.5, 2), }, @@ -82,9 +61,6 @@ const useStyles = makeStyles( padding: 0, }, }, - rotate: { - transform: "rotate(-180deg)", - }, }; }, { diff --git a/src/custom-apps/components/WebhookInfo/WebhookInfo.tsx b/src/custom-apps/components/WebhookInfo/WebhookInfo.tsx index 7c68ba2b069..fa82c0f7502 100644 --- a/src/custom-apps/components/WebhookInfo/WebhookInfo.tsx +++ b/src/custom-apps/components/WebhookInfo/WebhookInfo.tsx @@ -1,4 +1,4 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import FormSpacer from "@dashboard/components/FormSpacer"; import Hr from "@dashboard/components/Hr"; import Link from "@dashboard/components/Link"; @@ -7,7 +7,7 @@ import { WebhookErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getWebhookErrorMessage from "@dashboard/utils/errors/webhooks"; -import { Card, CardContent, Popper, TextField, Typography } from "@material-ui/core"; +import { Popper, TextField, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -30,12 +30,12 @@ const WebhookInfo: React.FC = ({ data, disabled, errors, onCha const anchor = React.useRef(null); return ( - - - + + + {intl.formatMessage(messages.webhookInformation)} + + + {intl.formatMessage(commonMessages.generalInformations)} @@ -93,7 +93,7 @@ const WebhookInfo: React.FC = ({ data, disabled, errors, onCha size="small" /> - + @@ -104,14 +104,14 @@ const WebhookInfo: React.FC = ({ data, disabled, errors, onCha > - +
    ), }} /> - - + + ); }; diff --git a/src/custom-apps/components/WebhookInfo/styles.ts b/src/custom-apps/components/WebhookInfo/styles.ts index ac56d28b8b3..7b32fa0748c 100644 --- a/src/custom-apps/components/WebhookInfo/styles.ts +++ b/src/custom-apps/components/WebhookInfo/styles.ts @@ -8,9 +8,6 @@ export const useStyles = makeStyles( color: theme.palette.common.black, marginBottom: theme.spacing(2), }, - cardTitle: { - paddingLeft: 0, - }, card: { paddingLeft: 0, }, diff --git a/src/custom-apps/components/WebhookSubscriptionQuery/WebhookSubscriptionQuery.tsx b/src/custom-apps/components/WebhookSubscriptionQuery/WebhookSubscriptionQuery.tsx index 99779cd6720..d89957e7a4d 100644 --- a/src/custom-apps/components/WebhookSubscriptionQuery/WebhookSubscriptionQuery.tsx +++ b/src/custom-apps/components/WebhookSubscriptionQuery/WebhookSubscriptionQuery.tsx @@ -1,13 +1,11 @@ // @ts-strict-ignore import "graphiql/graphiql.min.css"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { WebhookErrorFragment } from "@dashboard/graphql"; import { getFormErrors } from "@dashboard/utils/errors"; import { useExplorerPlugin } from "@graphiql/plugin-explorer"; import { createGraphiQLFetcher } from "@graphiql/toolkit"; -import { Card, CardContent } from "@material-ui/core"; -import clsx from "clsx"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -49,13 +47,15 @@ const WebhookSubscriptionQuery: React.FC = ({ const formErrors = getFormErrors(["subscriptionQuery"], errors); return ( - - - + + + + {intl.formatMessage(messages.title)} + + {formErrors.subscriptionQuery?.message} + + + = ({ isHeadersEditorEnabled={false} data={data} /> - - + + ); }; diff --git a/src/custom-apps/components/WebhookSubscriptionQuery/styles.ts b/src/custom-apps/components/WebhookSubscriptionQuery/styles.ts index 58fb2872467..a6e3fe1e244 100644 --- a/src/custom-apps/components/WebhookSubscriptionQuery/styles.ts +++ b/src/custom-apps/components/WebhookSubscriptionQuery/styles.ts @@ -1,5 +1,4 @@ import { makeStyles } from "@saleor/macaw-ui"; -import { vars } from "@saleor/macaw-ui-next"; export const useStyles = makeStyles( theme => ({ @@ -17,12 +16,6 @@ export const useStyles = makeStyles( cardTitle: { paddingLeft: 0, }, - error: { - color: vars.colors.text.critical1, - "& .MuiTypography-colorTextSecondary": { - color: vars.colors.text.critical1, - }, - }, }), { name: "WebhookSubscriptionQuery" }, ); diff --git a/src/custom-apps/components/WebhooksList/WebhooksList.tsx b/src/custom-apps/components/WebhooksList/WebhooksList.tsx index ccf03f62d76..b778c321523 100644 --- a/src/custom-apps/components/WebhooksList/WebhooksList.tsx +++ b/src/custom-apps/components/WebhooksList/WebhooksList.tsx @@ -1,5 +1,5 @@ import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Pill } from "@dashboard/components/Pill"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -11,7 +11,7 @@ import { isUnnamed } from "@dashboard/custom-apps/utils"; import { WebhookFragment } from "@dashboard/graphql"; import { commonMessages, commonStatusMessages, sectionNames } from "@dashboard/intl"; import { renderCollection, stopPropagation } from "@dashboard/misc"; -import { Card, CardContent, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import clsx from "clsx"; import React from "react"; @@ -32,19 +32,20 @@ const WebhooksList: React.FC = ({ webhooks, createHref, onRem const numberOfColumns = webhooks?.length === 0 ? 2 : 3; return ( - - + + + {intl.formatMessage(sectionNames.webhooksAndEvents)} + + + {!!createHref && ( - ) - } - /> - + )} + + + @@ -113,8 +114,8 @@ const WebhooksList: React.FC = ({ webhooks, createHref, onRem )} - - + + ); }; diff --git a/src/customers/components/CustomerAddress/CustomerAddress.tsx b/src/customers/components/CustomerAddress/CustomerAddress.tsx index 0cc8cc82807..6bea7b605c2 100644 --- a/src/customers/components/CustomerAddress/CustomerAddress.tsx +++ b/src/customers/components/CustomerAddress/CustomerAddress.tsx @@ -1,10 +1,9 @@ // @ts-strict-ignore import AddressFormatter from "@dashboard/components/AddressFormatter"; +import { DashboardCard } from "@dashboard/components/Card"; import CardMenu from "@dashboard/components/CardMenu"; -import CardTitle from "@dashboard/components/CardTitle"; import Skeleton from "@dashboard/components/Skeleton"; import { AddressFragment, AddressTypeEnum } from "@dashboard/graphql"; -import { Card, CardContent } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -88,11 +87,10 @@ const CustomerAddress: React.FC = props => { const intl = useIntl(); return ( - - + + + {address ? ( <> {isDefaultBillingAddress && isDefaultShippingAddress ? intl.formatMessage(messages.defaultAddress) @@ -104,9 +102,9 @@ const CustomerAddress: React.FC = props => { ) : ( - ) - } - toolbar={ + )} + + = props => { }, ]} /> - } - /> - + + + - - + + ); }; diff --git a/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx b/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx index 5efd4fef59c..fa955be6ea2 100644 --- a/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx +++ b/src/customers/components/CustomerAddressChoiceCard/CustomerAddressChoiceCard.tsx @@ -1,8 +1,9 @@ // @ts-strict-ignore import AddressFormatter from "@dashboard/components/AddressFormatter"; +import { DashboardCard } from "@dashboard/components/Card"; import { AddressFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { EditIcon } from "@saleor/macaw-ui"; import clsx from "clsx"; import React from "react"; @@ -24,14 +25,14 @@ const CustomerAddressChoiceCard: React.FC = prop const intl = useIntl(); return ( - - + {editable && (
    @@ -43,8 +44,8 @@ const CustomerAddressChoiceCard: React.FC = prop {intl.formatMessage(commonMessages.selected)} )} - - + + ); }; diff --git a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx index 3e6dda27c80..0422d5ff1a1 100644 --- a/src/customers/components/CustomerAddresses/CustomerAddresses.tsx +++ b/src/customers/components/CustomerAddresses/CustomerAddresses.tsx @@ -1,11 +1,11 @@ // @ts-strict-ignore import AddressFormatter from "@dashboard/components/AddressFormatter"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Hr } from "@dashboard/components/Hr"; import { CustomerDetailsFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -34,14 +34,16 @@ const CustomerAddresses: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage({ + id: "BfJGij", + defaultMessage: "Address Information", + description: "header", + })} + + - } - /> + + {maybe(() => customer.defaultBillingAddress.id) !== maybe(() => customer.defaultShippingAddress.id) ? ( <> {maybe(() => customer.defaultBillingAddress) !== null && ( - + = props => { /> customer.defaultBillingAddress)} /> - + )} {maybe(() => customer.defaultBillingAddress && customer.defaultShippingAddress) &&
    } {maybe(() => customer.defaultShippingAddress) && ( - + = props => { /> customer.defaultShippingAddress)} /> - + )} ) : maybe(() => customer.defaultBillingAddress) === null && maybe(() => customer.defaultShippingAddress) === null ? ( - + - + ) : ( - + = props => { /> customer.defaultBillingAddress)} /> - + )} -
    + ); }; diff --git a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx index 1435b019043..894f93e9073 100644 --- a/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx +++ b/src/customers/components/CustomerCreateAddress/CustomerCreateAddress.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore import AddressEdit from "@dashboard/components/AddressEdit"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { FormSpacer } from "@dashboard/components/FormSpacer"; import { SingleAutocompleteChoiceType } from "@dashboard/components/SingleAutocompleteSelectField"; import { AccountErrorFragment } from "@dashboard/graphql"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { Box } from "@saleor/macaw-ui-next"; import React from "react"; @@ -38,15 +38,17 @@ const CustomerCreateAddress: React.FC = props => { const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "jGGnSZ", + defaultMessage: "Primary Address", + description: "page header", + })} + + + @@ -62,8 +64,8 @@ const CustomerCreateAddress: React.FC = props => { onCountryChange={onCountryChange} /> - - + + ); }; diff --git a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx index 913654c20c1..01f8a53fe80 100644 --- a/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx +++ b/src/customers/components/CustomerCreateDetails/CustomerCreateDetails.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { AccountErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -39,15 +39,17 @@ const CustomerCreateDetails: React.FC = props => { const formErrors = getFormErrors(["customerFirstName", "customerLastName", "email"], errors); return ( - - - + + + + {intl.formatMessage({ + id: "fjPWOA", + defaultMessage: "Customer Overview", + description: "header", + })} + + +
    = props => { }} />
    -
    -
    + + ); }; diff --git a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx index d98c853fbad..fa40bb48ce9 100644 --- a/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx +++ b/src/customers/components/CustomerCreateNote/CustomerCreateNote.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { FormSpacer } from "@dashboard/components/FormSpacer"; import { AccountErrorFragment } from "@dashboard/graphql"; import { getFormErrors } from "@dashboard/utils/errors"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -28,15 +28,17 @@ const CustomerCreateNote: React.FC = ({ const formErrors = getFormErrors(["note"], errors); return ( - - - + + + + {intl.formatMessage({ + id: "qNcoRY", + defaultMessage: "Notes", + description: "notes about customer header", + })} + + + = ({ value={data.note} onChange={onChange} /> - - + + ); }; diff --git a/src/customers/components/CustomerDetails/CustomerDetails.tsx b/src/customers/components/CustomerDetails/CustomerDetails.tsx index 26366dcc958..f77880d17f7 100644 --- a/src/customers/components/CustomerDetails/CustomerDetails.tsx +++ b/src/customers/components/CustomerDetails/CustomerDetails.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ControlledCheckbox } from "@dashboard/components/ControlledCheckbox"; import Skeleton from "@dashboard/components/Skeleton"; import { AccountErrorFragment, CustomerDetailsQuery } from "@dashboard/graphql"; import { maybe } from "@dashboard/misc"; import { getFormErrors } from "@dashboard/utils/errors"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import moment from "moment-timezone"; import React from "react"; @@ -50,30 +50,31 @@ const CustomerDetails: React.FC = props => { const formErrors = getFormErrors(["note"], errors); return ( - - - {maybe(() => customer.email, )} - {customer && customer.dateJoined ? ( - - - - ) : ( - - )} - - } - /> - + + + + { + <> + {maybe(() => customer.email, )} + {customer && customer.dateJoined ? ( + + + + ) : ( + + )} + + } + + + = props => { value={data.note} onChange={onChange} /> - - + + ); }; diff --git a/src/customers/components/CustomerInfo/CustomerInfo.tsx b/src/customers/components/CustomerInfo/CustomerInfo.tsx index de907195685..083ab01f954 100644 --- a/src/customers/components/CustomerInfo/CustomerInfo.tsx +++ b/src/customers/components/CustomerInfo/CustomerInfo.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Grid from "@dashboard/components/Grid"; import Hr from "@dashboard/components/Hr"; import { AccountErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -46,17 +46,17 @@ const CustomerInfo: React.FC = props => { const formErrors = getFormErrors(["firstName", "lastName", "email"], errors); return ( - - + + - } - /> - + + + @@ -115,8 +115,8 @@ const CustomerInfo: React.FC = props => { spellCheck: false, }} /> - - + + ); }; diff --git a/src/customers/components/CustomerOrders/CustomerOrders.tsx b/src/customers/components/CustomerOrders/CustomerOrders.tsx index 912966b1fa1..26b9afa0c53 100644 --- a/src/customers/components/CustomerOrders/CustomerOrders.tsx +++ b/src/customers/components/CustomerOrders/CustomerOrders.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { DateTime } from "@dashboard/components/Date"; import Money from "@dashboard/components/Money"; import { Pill } from "@dashboard/components/Pill"; @@ -10,7 +10,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { CustomerDetailsQuery } from "@dashboard/graphql"; import { orderUrl } from "@dashboard/orders/urls"; import { RelayToFlat } from "@dashboard/types"; -import { Card, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -46,19 +46,21 @@ const CustomerOrders: React.FC = props => { : undefined; return ( - - + + + {intl.formatMessage({ + id: "1LiVhv", + defaultMessage: "Recent Orders", + description: "section header", + })} + + - } - /> + + @@ -139,7 +141,7 @@ const CustomerOrders: React.FC = props => { )} - + ); }; diff --git a/src/customers/components/CustomerStats/CustomerStats.tsx b/src/customers/components/CustomerStats/CustomerStats.tsx index 1e740587b41..19d6ed5f78b 100644 --- a/src/customers/components/CustomerStats/CustomerStats.tsx +++ b/src/customers/components/CustomerStats/CustomerStats.tsx @@ -17,13 +17,15 @@ const CustomerStats: React.FC = props => { return ( - - {intl.formatMessage({ - id: "e7Nyu7", - defaultMessage: "Customer History", - description: "section header", - })} - + + + {intl.formatMessage({ + id: "e7Nyu7", + defaultMessage: "Customer History", + description: "section header", + })} + + diff --git a/src/discounts/components/DiscountCategories/DiscountCategories.tsx b/src/discounts/components/DiscountCategories/DiscountCategories.tsx index fa99f001c85..e1576fe0f82 100644 --- a/src/discounts/components/DiscountCategories/DiscountCategories.tsx +++ b/src/discounts/components/DiscountCategories/DiscountCategories.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import { categoryUrl } from "@dashboard/categories/urls"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -11,7 +11,7 @@ import { TablePaginationWithContext } from "@dashboard/components/TablePaginatio import TableRowLink from "@dashboard/components/TableRowLink"; import { SaleDetailsFragment, VoucherDetailsFragment } from "@dashboard/graphql"; import { mapEdgesToItems } from "@dashboard/utils/maps"; -import { Card, TableBody, TableCell, TableFooter } from "@material-ui/core"; +import { TableBody, TableCell, TableFooter } from "@material-ui/core"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -44,15 +44,17 @@ const DiscountCategories: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage(messages.discountCategoriesHeader)} + + - } - /> + +
@@ -233,7 +224,7 @@ const OrderRefundFulfilledProducts: React.FC )}
- +
); }; diff --git a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx index 2a3eb372edd..fc4ee260da3 100644 --- a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx +++ b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Money from "@dashboard/components/Money"; import Skeleton from "@dashboard/components/Skeleton"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; @@ -8,16 +8,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { OrderRefundDataQuery } from "@dashboard/graphql"; import { FormsetChange } from "@dashboard/hooks/useFormset"; import { renderCollection } from "@dashboard/misc"; -import { - Card, - CardContent, - Table, - TableBody, - TableCell, - TableHead, - TextField, - Typography, -} from "@material-ui/core"; +import { Table, TableBody, TableCell, TableHead, TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -83,15 +74,17 @@ const OrderRefundUnfulfilledProducts: React.FC - - + + + + {intl.formatMessage({ + id: "B/y6LC", + defaultMessage: "Unfulfilled Products", + description: "section header", + })} + + + - + @@ -225,7 +218,7 @@ const OrderRefundUnfulfilledProducts: React.FC
- + ); }; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx index 4d7690c2c6b..3d4f7e5de60 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx @@ -1,4 +1,5 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import Money from "@dashboard/components/Money"; import Skeleton from "@dashboard/components/Skeleton"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; @@ -6,15 +7,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { OrderDetailsFragment, OrderErrorFragment, OrderLineFragment } from "@dashboard/graphql"; import { FormsetChange } from "@dashboard/hooks/useFormset"; import { getById, renderCollection } from "@dashboard/misc"; -import { - Card, - CardContent, - Checkbox, - TableBody, - TableCell, - TableHead, - TextField, -} from "@material-ui/core"; +import { Checkbox, TableBody, TableCell, TableHead, TextField } from "@material-ui/core"; import { makeStyles, ResponsiveTable } from "@saleor/macaw-ui"; import React, { CSSProperties } from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -115,15 +108,15 @@ const ItemsCard: React.FC = ({ const fulfillment = order?.fulfillments.find(getById(fulfilmentId)); return ( - + - + - + @@ -245,7 +238,7 @@ const ItemsCard: React.FC = ({ )} - + ); }; diff --git a/src/orders/components/OrderReturnPage/components/ItemsCard/ItemsCard.tsx b/src/orders/components/OrderReturnPage/components/ItemsCard/ItemsCard.tsx index 67c23b71a7f..030e2b43b3b 100644 --- a/src/orders/components/OrderReturnPage/components/ItemsCard/ItemsCard.tsx +++ b/src/orders/components/OrderReturnPage/components/ItemsCard/ItemsCard.tsx @@ -1,4 +1,5 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import Money from "@dashboard/components/Money"; import Skeleton from "@dashboard/components/Skeleton"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; @@ -7,15 +8,7 @@ import { OrderDetailsFragment, OrderErrorFragment, OrderLineFragment } from "@da import { FormsetChange } from "@dashboard/hooks/useFormset"; import { getById, renderCollection } from "@dashboard/misc"; import OrderCardTitle from "@dashboard/orders/components/OrderCardTitle"; -import { - Card, - CardContent, - Checkbox, - TableBody, - TableCell, - TableHead, - TextField, -} from "@material-ui/core"; +import { Checkbox, TableBody, TableCell, TableHead, TextField } from "@material-ui/core"; import { ResponsiveTable } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -57,15 +50,15 @@ export const ItemsCard: React.FC = ({ const fulfillment = order?.fulfillments.find(getById(fulfilmentId)); return ( - + - + - + @@ -189,6 +182,6 @@ export const ItemsCard: React.FC = ({ )} - + ); }; diff --git a/src/orders/components/OrderReturnPage/components/PaymentSubmitCard/PaymentSubmitCard.tsx b/src/orders/components/OrderReturnPage/components/PaymentSubmitCard/PaymentSubmitCard.tsx index 78091845c49..906b38f0abc 100644 --- a/src/orders/components/OrderReturnPage/components/PaymentSubmitCard/PaymentSubmitCard.tsx +++ b/src/orders/components/OrderReturnPage/components/PaymentSubmitCard/PaymentSubmitCard.tsx @@ -1,18 +1,11 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import Hr from "@dashboard/components/Hr"; import { OrderDetailsFragment, OrderErrorFragment, OrderRefundDataQuery } from "@dashboard/graphql"; -import { - Card, - CardContent, - FormControlLabel, - Radio, - RadioGroup, - Typography, -} from "@material-ui/core"; +import { FormControlLabel, Radio, RadioGroup, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -150,15 +143,17 @@ export const PaymentSubmitCard: React.FC = props => { const disableRefundButton = shouldRefundButtonBeDisabled(); return ( - - - + + + + {intl.formatMessage({ + id: "0oo+BT", + defaultMessage: "Refunded Amount", + description: "section header", + })} + + + {type === OrderRefundType.PRODUCTS && ( = props => { isReturn ? messages.returnCannotBeFulfilled : messages.refundCannotBeFulfilled, )} - - + + ); }; PaymentSubmitCard.displayName = "PaymentSubmitCard"; diff --git a/src/orders/components/OrderReturnPage/components/TransactionSubmitCard/TransactionSubmitCard.tsx b/src/orders/components/OrderReturnPage/components/TransactionSubmitCard/TransactionSubmitCard.tsx index 4f3223f1aa8..13cdf3f65aa 100644 --- a/src/orders/components/OrderReturnPage/components/TransactionSubmitCard/TransactionSubmitCard.tsx +++ b/src/orders/components/OrderReturnPage/components/TransactionSubmitCard/TransactionSubmitCard.tsx @@ -64,9 +64,11 @@ export const TransactionSubmitCard = ({ return (
- - {intl.formatMessage(submitCardMessages.cardTitle)} - + + + {intl.formatMessage(submitCardMessages.cardTitle)} + + diff --git a/src/orders/components/OrderSendRefundPage/OrderSendRefund.tsx b/src/orders/components/OrderSendRefundPage/OrderSendRefund.tsx index 9426b66a974..5981e36661d 100644 --- a/src/orders/components/OrderSendRefundPage/OrderSendRefund.tsx +++ b/src/orders/components/OrderSendRefundPage/OrderSendRefund.tsx @@ -1,6 +1,6 @@ import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Hr from "@dashboard/components/Hr"; import { DetailPageLayout } from "@dashboard/components/Layouts"; @@ -10,7 +10,7 @@ import { OrderDetailsFragment, } from "@dashboard/graphql"; import { orderUrl } from "@dashboard/orders/urls"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -50,9 +50,9 @@ const OrderSendRefundPage: React.FC = ({ {loading && transactions.length === 0 && ( <> - - - + + + )} @@ -80,9 +80,13 @@ const OrderSendRefundPage: React.FC = ({ /> - - } /> - + + + + + + +
    }> @@ -94,10 +98,14 @@ const OrderSendRefundPage: React.FC = ({
-
+

- } /> - + + + + + + {loading && }
    {order?.transactions.map(transaction => ( @@ -109,8 +117,8 @@ const OrderSendRefundPage: React.FC = ({
-
- + +
); diff --git a/src/orders/components/OrderSendRefundPage/components/ManualRefundCard.tsx b/src/orders/components/OrderSendRefundPage/components/ManualRefundCard.tsx index c8ec98fc659..f78092b8958 100644 --- a/src/orders/components/OrderSendRefundPage/components/ManualRefundCard.tsx +++ b/src/orders/components/OrderSendRefundPage/components/ManualRefundCard.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { commonMessages } from "@dashboard/intl"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -16,13 +16,17 @@ export const ManualRefundCard: React.FC = props const intl = useIntl(); return ( - - }> - + + + + + + + - +
@@ -45,6 +49,6 @@ export const ManualRefundCard: React.FC = props
-
+ ); }; diff --git a/src/orders/components/OrderSettings/OrderSettings.tsx b/src/orders/components/OrderSettings/OrderSettings.tsx index 4c7e3f020fe..d78986365be 100644 --- a/src/orders/components/OrderSettings/OrderSettings.tsx +++ b/src/orders/components/OrderSettings/OrderSettings.tsx @@ -1,7 +1,7 @@ +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -18,15 +18,17 @@ const OrderSettings: React.FC = ({ data, disabled, onChange const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "kn7jjd", + defaultMessage: "General settings", + description: "section header", + })} + + + = ({ data, disabled, onChange disabled={disabled} data-test-id="automatically-fulfill-non-shippable-gift-cards-checkbox" /> - - + + ); }; diff --git a/src/orders/components/OrderSummaryCard/OrderSummaryCard.tsx b/src/orders/components/OrderSummaryCard/OrderSummaryCard.tsx index e1c360a401d..7954d18c43a 100644 --- a/src/orders/components/OrderSummaryCard/OrderSummaryCard.tsx +++ b/src/orders/components/OrderSummaryCard/OrderSummaryCard.tsx @@ -1,8 +1,8 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { OrderDetailsFragment } from "@dashboard/graphql"; import { getDiscountTypeLabel } from "@dashboard/orders/utils/data"; -import { Card, CardContent } from "@material-ui/core"; +import {} from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -40,9 +40,13 @@ const OrderSummaryCard: React.FC = ({ order }) => { const usedGiftcards = obtainUsedGifrcards(order); return ( - - } /> - + + + + + + + } @@ -83,8 +87,8 @@ const OrderSummaryCard: React.FC = ({ order }) => { money={order?.total?.gross} /> - - + + ); }; diff --git a/src/orders/components/OrderTransaction/OrderTransaction.tsx b/src/orders/components/OrderTransaction/OrderTransaction.tsx index 1e5a29c5b0e..c49fa9d7413 100644 --- a/src/orders/components/OrderTransaction/OrderTransaction.tsx +++ b/src/orders/components/OrderTransaction/OrderTransaction.tsx @@ -29,19 +29,18 @@ const OrderTransaction: React.FC = ({ const events = getTransactionEvents(transaction, fakeEvents); return ( - - - - + + + + { + + } + + diff --git a/src/orders/components/OrderTransactionRefundPage/components/OrderTransactionRefundSummary/OrderTransactionSummary.tsx b/src/orders/components/OrderTransactionRefundPage/components/OrderTransactionRefundSummary/OrderTransactionSummary.tsx index 8bc22f6cb88..bcb23b161ea 100644 --- a/src/orders/components/OrderTransactionRefundPage/components/OrderTransactionRefundSummary/OrderTransactionSummary.tsx +++ b/src/orders/components/OrderTransactionRefundPage/components/OrderTransactionRefundSummary/OrderTransactionSummary.tsx @@ -41,9 +41,11 @@ export const OrderTransactionSummary: React.FC = ( return ( - - - + + + + + diff --git a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx index 944d60b9935..55e0f9663ba 100644 --- a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx +++ b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx @@ -1,8 +1,9 @@ import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; import { OrderLineFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; -import { Card, CardActions, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -35,12 +36,12 @@ const OrderUnfulfilledProductsCard: React.FC return ( <> - + - + {showFulfillmentAction && ( - + - } - /> - + + + @@ -172,8 +174,8 @@ const PageTypeAttributes: React.FC = props => { )} - - + + ); }; diff --git a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx index bbbdb0499f5..b28b6465fc0 100644 --- a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx +++ b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { PageErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getPageErrorMessage from "@dashboard/utils/errors/page"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -23,9 +23,13 @@ const PageTypeDetails: React.FC = props => { const formErrors = getFormErrors(["name"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = props => { onChange={onChange} value={data.name} /> - - + + ); }; diff --git a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx index 50cc3bcea33..283b44aec0c 100644 --- a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx +++ b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx @@ -1,12 +1,12 @@ import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import { ListPageLayout } from "@dashboard/components/Layouts"; import SearchBar from "@dashboard/components/SearchBar"; import { configurationMenuUrl } from "@dashboard/configuration"; import { PageTypeFragment } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; import { pageTypeAddUrl, PageTypeListUrlSortField } from "@dashboard/pageTypes/urls"; -import { Card } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -48,7 +48,7 @@ const PageTypeListPage: React.FC = ({ - + = ({ onTabSave={onTabSave} /> - + ); }; diff --git a/src/pages/components/PageInfo/PageInfo.tsx b/src/pages/components/PageInfo/PageInfo.tsx index 8e98a953560..869f490e91a 100644 --- a/src/pages/components/PageInfo/PageInfo.tsx +++ b/src/pages/components/PageInfo/PageInfo.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import FormSpacer from "@dashboard/components/FormSpacer"; import RichTextEditor from "@dashboard/components/RichTextEditor"; import { RichTextEditorLoading } from "@dashboard/components/RichTextEditor/RichTextEditorLoading"; @@ -8,7 +8,7 @@ import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getPageErrorMessage from "@dashboard/utils/errors/page"; import { useRichTextContext } from "@dashboard/utils/richText/context"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -38,9 +38,13 @@ const PageInfo: React.FC = props => { const formErrors = getFormErrors(["title", "content"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = props => { name={"content" as keyof PageData} /> )} - - + + ); }; diff --git a/src/pages/components/PageListPage/PageListPage.tsx b/src/pages/components/PageListPage/PageListPage.tsx index 0477dcfde7b..35c2e509df8 100644 --- a/src/pages/components/PageListPage/PageListPage.tsx +++ b/src/pages/components/PageListPage/PageListPage.tsx @@ -1,6 +1,7 @@ import { ListFilters } from "@dashboard/components/AppLayout/ListFilters"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { BulkDeleteButton } from "@dashboard/components/BulkDeleteButton"; +import { DashboardCard } from "@dashboard/components/Card"; import { FilterPresetsSelect } from "@dashboard/components/FilterPresetsSelect"; import { ListPageLayout } from "@dashboard/components/Layouts"; import useNavigator from "@dashboard/hooks/useNavigator"; @@ -13,7 +14,6 @@ import { pageUrl, } from "@dashboard/pages/urls"; import { FilterPagePropsWithPresets, PageListProps, SortPage } from "@dashboard/types"; -import { Card } from "@material-ui/core"; import { Box, Button, ChevronRightIcon } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -102,7 +102,7 @@ const PageListPage: React.FC = ({ - + = ({ rowAnchor={pageUrl} onRowClick={id => navigate(pageUrl(id))} /> - + ); }; diff --git a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx index 2229b4402fa..5433c377d0b 100644 --- a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx +++ b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Combobox } from "@dashboard/components/Combobox"; import { PageDetailsFragment, PageErrorFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; import { FetchMoreProps } from "@dashboard/types"; import { getFormErrors } from "@dashboard/utils/errors"; import getPageErrorMessage from "@dashboard/utils/errors/page"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { Option } from "@saleor/macaw-ui-next"; import React from "react"; @@ -53,15 +53,17 @@ const PageOrganizeContent: React.FC = props => { const formErrors = getFormErrors(["pageType"], errors); return ( - - - + + + + {intl.formatMessage({ + id: "jU9GPX", + defaultMessage: "Organize Content", + description: "section header", + })} + + + {canChangeType ? ( = props => { {pageType?.name} )} - - + + ); }; diff --git a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx index 5104f76ee69..ed46e1ae8c4 100644 --- a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx +++ b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx @@ -1,11 +1,11 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { PermissionGroupErrorFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; import { commonMessages } from "@dashboard/intl"; import { getFieldError, getFormErrors } from "@dashboard/utils/errors"; import getPermissionGroupErrorMessage from "@dashboard/utils/errors/permissionGroups"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -28,9 +28,13 @@ const PermissionGroupInfo: React.FC = ({ const formErrors = getFormErrors(["name"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = ({ helperText={getPermissionGroupErrorMessage(formErrors.name, intl)} fullWidth /> - - + + ); }; diff --git a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx index cd0312a4c39..a93823dd2d7 100644 --- a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx +++ b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx @@ -1,10 +1,10 @@ import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import { ListPageLayout } from "@dashboard/components/Layouts"; import { configurationMenuUrl } from "@dashboard/configuration"; import { PermissionGroupFragment } from "@dashboard/graphql"; import useNavigator from "@dashboard/hooks/useNavigator"; import { sectionNames } from "@dashboard/intl"; -import { Card } from "@material-ui/core"; import { Button } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -42,9 +42,9 @@ const PermissionGroupListPage: React.FC = listProp /> - + - + ); }; diff --git a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx index b874e947638..abd4e83f321 100644 --- a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx +++ b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -15,7 +15,7 @@ import { sortMembers } from "@dashboard/permissionGroups/sort"; import { MembersListUrlSortField } from "@dashboard/permissionGroups/urls"; import { ListActions, SortPage } from "@dashboard/types"; import { getArrowDirection } from "@dashboard/utils/sort"; -import { Card, CardContent, TableBody, TableCell, Typography } from "@material-ui/core"; +import { TableBody, TableCell, Typography } from "@material-ui/core"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { Box, Text, vars } from "@saleor/macaw-ui-next"; import clsx from "clsx"; @@ -89,14 +89,17 @@ const PermissionGroupMemberList: React.FC = props => { const members = [...users].sort(sortMembers(sort?.sort, sort?.asc)); return ( - - + + + {intl.formatMessage({ + id: "lGlDEH", + defaultMessage: "Group members", + description: "header", + })} + + + - } - /> + + {members?.length === 0 ? ( - + = props => { description="empty list message" /> - + ) : ( = props => { )} - + ); }; diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index 90371a79ee7..ba42c600fd8 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -1,10 +1,10 @@ import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Hr from "@dashboard/components/Hr"; import { ConfigurationItemFragment, ConfigurationTypeFieldEnum } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { isSecretField } from "@dashboard/plugins/utils"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -40,15 +40,17 @@ const PluginAuthorization: React.FC = props => { const secretFields = fields.filter(field => isSecretField(fields, field.name)); return ( - - - + + + + {intl.formatMessage({ + id: "6aBkJm", + defaultMessage: "Authorization", + description: "section header", + })} + + + {secretFields.map((field, fieldIndex) => (
@@ -80,8 +82,8 @@ const PluginAuthorization: React.FC = props => { {fieldIndex !== secretFields.length - 1 &&
} ))} - - + + ); }; diff --git a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCard.tsx b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCard.tsx index 03feeebaef3..b6f3534c0d7 100644 --- a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCard.tsx +++ b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCard.tsx @@ -1,6 +1,5 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { sectionNames } from "@dashboard/intl"; -import { Card } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -12,10 +11,12 @@ const PluginDetailsChannelsCard: React.FC = prop const intl = useIntl(); return ( - - + + + {intl.formatMessage(sectionNames.channels)} + - + ); }; diff --git a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx index 68a175e5f63..b88c1a52799 100644 --- a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx +++ b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx @@ -1,9 +1,10 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import CollectionWithDividers from "@dashboard/components/CollectionWithDividers"; import Skeleton from "@dashboard/components/Skeleton"; import { PluginsDetailsFragment } from "@dashboard/graphql"; import { isPluginGlobal } from "@dashboard/plugins/views/utils"; -import { CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -42,17 +43,17 @@ const PluginDetailsChannelsCardContent: React.FC if (!plugin) { return ( - + - + ); } if (isPluginGlobal(plugin.globalConfiguration)) { return ( - + - + ); } @@ -70,9 +71,9 @@ const PluginDetailsChannelsCardContent: React.FC onClick={() => setSelectedChannelId(channel.id)} > {isChannelSelected(channel.id) &&
} - + {channel.name} - +
)} /> diff --git a/src/plugins/components/PluginInfo/PluginInfo.tsx b/src/plugins/components/PluginInfo/PluginInfo.tsx index a8a29ffc1d9..de2466f6c11 100644 --- a/src/plugins/components/PluginInfo/PluginInfo.tsx +++ b/src/plugins/components/PluginInfo/PluginInfo.tsx @@ -1,11 +1,11 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import FormSpacer from "@dashboard/components/FormSpacer"; import Hr from "@dashboard/components/Hr"; import { PluginErrorCode, PluginErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import getPluginErrorMessage from "@dashboard/utils/errors/plugins"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -38,15 +38,17 @@ const PluginInfo: React.FC = ({ data, description, errors, name const misconfiguredError = errors.find(err => err.code === PluginErrorCode.PLUGIN_MISCONFIGURED); return ( - - - + + + + {intl.formatMessage({ + id: "w424P4", + defaultMessage: "Plugin Information and Status", + description: "section header", + })} + + + {intl.formatMessage({ id: "IUeGzv", @@ -84,8 +86,8 @@ const PluginInfo: React.FC = ({ data, description, errors, name {misconfiguredError && ( {getPluginErrorMessage(misconfiguredError, intl)} )} - - +
+
); }; diff --git a/src/plugins/components/PluginSettings/PluginSettings.tsx b/src/plugins/components/PluginSettings/PluginSettings.tsx index b04a3ec10b0..41bec36bd6f 100644 --- a/src/plugins/components/PluginSettings/PluginSettings.tsx +++ b/src/plugins/components/PluginSettings/PluginSettings.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledSwitch from "@dashboard/components/ControlledSwitch"; import { ConfigurationItemFragment, ConfigurationTypeFieldEnum } from "@dashboard/graphql"; import { UserError } from "@dashboard/types"; import { getFieldError } from "@dashboard/utils/errors"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import InfoIcon from "@material-ui/icons/Info"; import { Box, Tooltip } from "@saleor/macaw-ui-next"; import React from "react"; @@ -32,15 +32,17 @@ const PluginSettings: React.FC = ({ const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "Egyh2T", + defaultMessage: "Plugin Settings", + description: "section header", + })} + + + {data.configuration.map(field => { const fieldData = fields.find(configField => configField.name === field.name); @@ -94,8 +96,8 @@ const PluginSettings: React.FC = ({
); })} - - + + ); }; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx index 506ff0461e1..cb528804aa0 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx @@ -1,8 +1,9 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; import { Pill } from "@dashboard/components/Pill"; import { PluginBaseFragment } from "@dashboard/graphql"; -import { CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -18,7 +19,7 @@ const GlobalConfigPluginPopupBody: React.FC = return ( <> - + {intl.formatMessage(messages.title)} {intl.formatMessage(messages.description)} @@ -29,7 +30,7 @@ const GlobalConfigPluginPopupBody: React.FC = active ? pluginStatusMessages.active : pluginStatusMessages.deactivated, )} /> - + ); }; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx index 0e68ad5c8cd..4f654aee0e7 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx @@ -1,8 +1,9 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import ChannelsAvailabilityMenuContent from "@dashboard/components/ChannelsAvailabilityMenuContent"; import { PluginBaseFragment } from "@dashboard/graphql"; import { isPluginGlobal } from "@dashboard/plugins/views/utils"; -import { Card, Popper } from "@material-ui/core"; +import { Popper } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; @@ -35,7 +36,7 @@ const PluginAvailabilityStatusPopup: React.FC - + {isGlobalPlugin ? ( ) : ( @@ -43,7 +44,7 @@ const PluginAvailabilityStatusPopup: React.FC )} - + ); }; diff --git a/src/plugins/components/PluginsListPage/PluginsListPage.tsx b/src/plugins/components/PluginsListPage/PluginsListPage.tsx index 14e88d5a2f7..cdd08d69f7b 100644 --- a/src/plugins/components/PluginsListPage/PluginsListPage.tsx +++ b/src/plugins/components/PluginsListPage/PluginsListPage.tsx @@ -1,5 +1,6 @@ // @ts-strict-ignore import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import { ExternalLinkNext } from "@dashboard/components/ExternalLink"; import FilterBar from "@dashboard/components/FilterBar"; import { ListPageLayout } from "@dashboard/components/Layouts"; @@ -9,7 +10,6 @@ import { sectionNames } from "@dashboard/intl"; import { getStatusColor } from "@dashboard/misc"; import { PluginListUrlSortField } from "@dashboard/plugins/urls"; import { FilterPageProps, PageListProps, SortPage, TabPageProps } from "@dashboard/types"; -import { Card } from "@material-ui/core"; import { Box, Text, useTheme } from "@saleor/macaw-ui-next"; import React from "react"; import { useIntl } from "react-intl"; @@ -46,7 +46,7 @@ const PluginsListPage: React.FC = ({ return ( - +
= ({ })} /> - + ); }; diff --git a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx index 982ac1f227a..4fee2d3b7d1 100644 --- a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx +++ b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import { attributeUrl } from "@dashboard/attributes/urls"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -12,7 +12,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { AttributeFragment, ProductAttributeType } from "@dashboard/graphql"; import { maybe, renderCollection } from "@dashboard/misc"; import { ListActions, ReorderAction } from "@dashboard/types"; -import { Card, CardContent, TableCell } from "@material-ui/core"; +import { TableCell } from "@material-ui/core"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -73,14 +73,16 @@ const ProductTypeAttributes: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage({ + id: "9scTQ0", + defaultMessage: "Product Attributes", + description: "section header", + })} + + - } - /> - + + + @@ -178,8 +180,8 @@ const ProductTypeAttributes: React.FC = props => { )} - - + + ); }; diff --git a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx index b3cd7776fb1..482c65bb58c 100644 --- a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx +++ b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import PreviewPill from "@dashboard/components/PreviewPill"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import { ProductTypeKindEnum } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { UserError } from "@dashboard/types"; import { getFieldError } from "@dashboard/utils/errors"; -import { Card, CardContent, Divider, TextField, Typography } from "@material-ui/core"; +import { Divider, TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -57,9 +57,13 @@ const ProductTypeDetails: React.FC = props => { const intl = useIntl(); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = props => { onChange={onChange} value={data.name} /> - + - + ({ @@ -100,8 +104,8 @@ const ProductTypeDetails: React.FC = props => { onChange={onKindChange} value={data.kind} /> - - + + ); }; diff --git a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx index ef6c09439f7..30327eb944b 100644 --- a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx +++ b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx @@ -1,13 +1,13 @@ // @ts-strict-ignore import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { Button } from "@dashboard/components/Button"; +import { DashboardCard } from "@dashboard/components/Card"; import FilterBar from "@dashboard/components/FilterBar"; import { configurationMenuUrl } from "@dashboard/configuration"; import { ProductTypeFragment } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; import ProductTypeList from "@dashboard/productTypes/components/ProductTypeList/ProductTypeList"; import { productTypeAddUrl, ProductTypeListUrlSortField } from "@dashboard/productTypes/urls"; -import { Card } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -52,7 +52,7 @@ const ProductTypeListPage: React.FC = ({ - + = ({ onTabSave={onTabSave} /> - + ); }; diff --git a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx index 49e15b92350..69fb0513fe0 100644 --- a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx +++ b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ControlledCheckbox } from "@dashboard/components/ControlledCheckbox"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -23,15 +23,17 @@ const ProductTypeShipping: React.FC = ({ const intl = useIntl(); return ( - - - + + + + {intl.formatMessage({ + id: "/2OOMe", + defaultMessage: "Shipping", + description: "product type shipping settings, section header", + })} + + + = ({ onChange={onChange} /> )} - - + + ); }; diff --git a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx index 7a3eb4459b8..5047792e262 100644 --- a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx +++ b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx @@ -1,11 +1,10 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Combobox } from "@dashboard/components/Combobox"; import { TaxClassBaseFragment } from "@dashboard/graphql"; import { ChangeEvent } from "@dashboard/hooks/useForm"; import { sectionNames } from "@dashboard/intl"; import { taxesMessages } from "@dashboard/taxes/messages"; import { FetchMoreProps } from "@dashboard/types"; -import { Card, CardContent } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -35,9 +34,11 @@ const ProductTypeTaxes: React.FC = props => { const intl = useIntl(); return ( - - - + + + {intl.formatMessage(sectionNames.taxes)} + + = props => { }} onChange={onChange} /> - - + + ); }; diff --git a/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx b/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx index 6fe2ce882b6..9bc55207887 100644 --- a/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx +++ b/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import { attributeUrl } from "@dashboard/attributes/urls"; import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -12,7 +12,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { ProductAttributeType, ProductTypeDetailsQuery } from "@dashboard/graphql"; import { maybe, renderCollection } from "@dashboard/misc"; import { ListActions, ReorderAction } from "@dashboard/types"; -import { Card, CardContent, TableCell } from "@material-ui/core"; +import { TableCell } from "@material-ui/core"; import HelpOutline from "@material-ui/icons/HelpOutline"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { Tooltip } from "@saleor/macaw-ui-next"; @@ -119,14 +119,16 @@ const ProductTypeVariantAttributes: React.FC }, []); return ( - - + + + {intl.formatMessage({ + id: "skEK/i", + defaultMessage: "Variant Attributes", + description: "section header", + })} + + - } - /> - + + + @@ -282,8 +284,8 @@ const ProductTypeVariantAttributes: React.FC )} - - + + ); }; diff --git a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx index 53df521f23c..b266f3a7452 100644 --- a/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx +++ b/src/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx @@ -1,10 +1,10 @@ // @ts-strict-ignore import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import { Multiselect } from "@dashboard/components/Combobox"; import FormSpacer from "@dashboard/components/FormSpacer"; import { Select } from "@dashboard/components/Select"; import { ChangeEvent } from "@dashboard/hooks/useForm"; -import { Card, CardContent } from "@material-ui/core"; import { Option } from "@saleor/macaw-ui-next"; import React from "react"; import { useIntl } from "react-intl"; @@ -32,7 +32,7 @@ const ProductCategoryAndCollectionsForm = ({ return ( <> - + - + = props => { /> )} - + = props => { }} /> )} - + ); }; diff --git a/src/products/components/ProductMedia/ProductMedia.tsx b/src/products/components/ProductMedia/ProductMedia.tsx index 9fe3812cf90..349fbb2b700 100644 --- a/src/products/components/ProductMedia/ProductMedia.tsx +++ b/src/products/components/ProductMedia/ProductMedia.tsx @@ -106,9 +106,11 @@ const ProductMedia: React.FC = props => { return ( - - + + + +
)} - -
+ + ); }; diff --git a/src/products/components/ProductMediaPage/ProductMediaPage.tsx b/src/products/components/ProductMediaPage/ProductMediaPage.tsx index 118dc1d95a1..19d8eaba8a4 100644 --- a/src/products/components/ProductMediaPage/ProductMediaPage.tsx +++ b/src/products/components/ProductMediaPage/ProductMediaPage.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { TopNav } from "@dashboard/components/AppLayout/TopNav"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; import Grid from "@dashboard/components/Grid"; @@ -10,7 +10,7 @@ import { ProductMediaType } from "@dashboard/graphql"; import useNavigator from "@dashboard/hooks/useNavigator"; import { commonMessages } from "@dashboard/intl"; import { productUrl } from "@dashboard/products/urls"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { vars } from "@saleor/macaw-ui-next"; import React from "react"; @@ -111,9 +111,13 @@ const ProductMediaPage: React.FC = props => { highlighted={media ? mediaObj.id : undefined} onRowClick={onRowClick} /> - - - + + + + {intl.formatMessage(messages.mediaInformation)} + + + = props => { multiline fullWidth /> - - + +
- - - + + + + {intl.formatMessage(messages.mediaView)} + + + {mediaObj ? ( mediaObj?.type === ProductMediaType.IMAGE ? (
@@ -147,8 +155,8 @@ const ProductMediaPage: React.FC = props => { ) : ( )} - - + +
diff --git a/src/products/components/ProductOrganization/ProductOrganization.tsx b/src/products/components/ProductOrganization/ProductOrganization.tsx index 2f7dc517421..ed7b6c79c04 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.tsx @@ -86,13 +86,15 @@ export const ProductOrganization: React.FC = props => return ( - - {intl.formatMessage({ - id: "JjeZEG", - defaultMessage: "Organize Product", - description: "section header", - })} - + + + {intl.formatMessage({ + id: "JjeZEG", + defaultMessage: "Organize Product", + description: "section header", + })} + + {canChangeType ? ( = props => { return ( - - {intl.formatMessage({ - id: "3rIMq/", - defaultMessage: "Shipping", - description: "product shipping", - })} - + + + {intl.formatMessage({ + id: "3rIMq/", + defaultMessage: "Shipping", + description: "product shipping", + })} + + = ({ return ( - {intl.formatMessage(messages.title)} + + {intl.formatMessage(messages.title)} + = props => { return ( - {intl.formatMessage(sectionNames.taxes)} + + {intl.formatMessage(sectionNames.taxes)} + = ({ const intl = useIntl(); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + {attributes === undefined ? ( @@ -111,8 +115,8 @@ const ProductVariantAttributes: React.FC = ({ ))} )} - - + + ); }; diff --git a/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/CreateVariantTitle.tsx b/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/CreateVariantTitle.tsx index fb81c24f13e..791794f957e 100644 --- a/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/CreateVariantTitle.tsx +++ b/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/CreateVariantTitle.tsx @@ -28,30 +28,32 @@ export const CreateVariantTitle: React.FC = ({ }; return ( - - - - - {intl.formatMessage(messages.title)} - - {getCaptionText()} - - - - - + + + - + + {intl.formatMessage(messages.title)} + + {getCaptionText()} + + + + + + + + - - + + ); }; diff --git a/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/VariantDetailsChannelsAvailabilityCardContainer.tsx b/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/VariantDetailsChannelsAvailabilityCardContainer.tsx index bfec998f17a..87a515315a7 100644 --- a/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/VariantDetailsChannelsAvailabilityCardContainer.tsx +++ b/src/products/components/ProductVariantChannels/ChannelsAvailabilityCard/VariantDetailsChannelsAvailabilityCardContainer.tsx @@ -18,9 +18,11 @@ const VariantDetailsChannelsAvailabilityCardContainer: React.FC< {cardTitle || ( - - - + + + + + )} {children} diff --git a/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx b/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx index da4ede48c46..ec03cccdaf7 100644 --- a/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx +++ b/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx @@ -27,10 +27,12 @@ const ProductVariantCheckoutSettings: React.FC - - {intl.formatMessage(messages.checkoutLimits)} - - + + + {intl.formatMessage(messages.checkoutLimits)} + + + = props => return ( - - - {intl.formatMessage(messages.media)} - - - + + + + {intl.formatMessage(messages.media)} + + + + {media === undefined || media === null ? ( diff --git a/src/products/components/ProductVariantName/ProductVariantName.tsx b/src/products/components/ProductVariantName/ProductVariantName.tsx index 94a7b6dbc7f..4727e61816a 100644 --- a/src/products/components/ProductVariantName/ProductVariantName.tsx +++ b/src/products/components/ProductVariantName/ProductVariantName.tsx @@ -26,12 +26,14 @@ const ProductVariantName: React.FC = ({ return ( - - {intl.formatMessage({ - id: "T1f2Yl", - defaultMessage: "Variant Name", - })} - + + + {intl.formatMessage({ + id: "T1f2Yl", + defaultMessage: "Variant Name", + })} + + = props return ( - {intl.formatMessage(sectionNames.variants)} + + {intl.formatMessage(sectionNames.variants)} + {variants?.length > 0 && } {renderCollection(variants, (variant, variantIndex) => { diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index ccc03ae538a..fe47acdaf14 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -50,13 +50,15 @@ export const ProductVariantPrice: React.FC = props => if (disabled || !productVariantChannelListings.length) { return ( - - {intl.formatMessage({ - id: "Xm9qOu", - defaultMessage: "Pricing", - description: "product pricing, section header", - })} - + + + {intl.formatMessage({ + id: "Xm9qOu", + defaultMessage: "Pricing", + description: "product pricing, section header", + })} + + {intl.formatMessage( @@ -75,13 +77,15 @@ export const ProductVariantPrice: React.FC = props => return ( - - {intl.formatMessage({ - id: "Xm9qOu", - defaultMessage: "Pricing", - description: "product pricing, section header", - })} - + + + {intl.formatMessage({ + id: "Xm9qOu", + defaultMessage: "Pricing", + description: "product pricing, section header", + })} + + diff --git a/src/shipping/components/OrderValue/OrderValue.tsx b/src/shipping/components/OrderValue/OrderValue.tsx index fd3821da76d..696ff57adaf 100644 --- a/src/shipping/components/OrderValue/OrderValue.tsx +++ b/src/shipping/components/OrderValue/OrderValue.tsx @@ -1,5 +1,5 @@ import { ChannelShippingData } from "@dashboard/channels/utils"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import PriceField from "@dashboard/components/PriceField"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; @@ -9,7 +9,7 @@ import { ShippingChannelsErrorFragment } from "@dashboard/graphql"; import { ChangeEvent } from "@dashboard/hooks/useForm"; import { ChannelError, getFormChannelError, getFormChannelErrors } from "@dashboard/utils/errors"; import getShippingErrorMessage from "@dashboard/utils/errors/shipping"; -import { Card, TableBody, TableCell, Typography } from "@material-ui/core"; +import { TableBody, TableCell, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -47,14 +47,16 @@ export const OrderValue: React.FC = ({ ); return ( - - + + + + {intl.formatMessage({ + id: "yatGsm", + defaultMessage: "Order Value", + description: "card title", + })} + +
= ({ )}
- + ); }; diff --git a/src/shipping/components/OrderWeight/OrderWeight.tsx b/src/shipping/components/OrderWeight/OrderWeight.tsx index 7e5488d27ec..b60e5051cd2 100644 --- a/src/shipping/components/OrderWeight/OrderWeight.tsx +++ b/src/shipping/components/OrderWeight/OrderWeight.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import ControlledCheckbox from "@dashboard/components/ControlledCheckbox"; import VerticalSpacer from "@dashboard/components/VerticalSpacer"; import { ShippingErrorFragment } from "@dashboard/graphql"; @@ -7,7 +7,7 @@ import { ChangeEvent } from "@dashboard/hooks/useForm"; import useShop from "@dashboard/hooks/useShop"; import { getShippingWeightRateErrorMessage } from "@dashboard/shipping/errors"; import { getFormErrors } from "@dashboard/utils/errors"; -import { Card, CardContent, InputAdornment, TextField, Typography } from "@material-ui/core"; +import { InputAdornment, TextField, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -37,15 +37,17 @@ export const OrderWeight: React.FC = ({ const formErrors = getFormErrors(formFields, errors); return ( - - - + + + + {intl.formatMessage({ + id: "vWapBZ", + defaultMessage: "Order Weight", + description: "card title", + })} + + + = ({
)} -
-
+ + ); }; diff --git a/src/shipping/components/PricingCard/PricingCard.tsx b/src/shipping/components/PricingCard/PricingCard.tsx index e13e5c6435b..99a336eb26c 100644 --- a/src/shipping/components/PricingCard/PricingCard.tsx +++ b/src/shipping/components/PricingCard/PricingCard.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { ChannelShippingData } from "@dashboard/channels/utils"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import PriceField from "@dashboard/components/PriceField"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import TableHead from "@dashboard/components/TableHead"; @@ -8,7 +8,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { ShippingChannelsErrorFragment } from "@dashboard/graphql"; import { getFormChannelError, getFormChannelErrors } from "@dashboard/utils/errors"; import getShippingErrorMessage from "@dashboard/utils/errors/shipping"; -import { Card, CardContent, TableBody, TableCell, Typography } from "@material-ui/core"; +import { TableBody, TableCell, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -40,15 +40,17 @@ export const PricingCard: React.FC = ({ const formErrors = getFormChannelErrors(["price"], errors); return ( - - - + + + + {intl.formatMessage({ + id: "TnTi/a", + defaultMessage: "Pricing", + description: "pricing card title", + })} + + + @@ -103,8 +105,8 @@ export const PricingCard: React.FC = ({ })} - - + + ); }; diff --git a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx index cfa1b8492a1..6cd6b586c9c 100644 --- a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx +++ b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import Checkbox from "@dashboard/components/Checkbox"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -11,7 +11,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { ShippingZoneQuery } from "@dashboard/graphql"; import { renderCollection } from "@dashboard/misc"; import { ListActions, ListProps, RelayToFlat } from "@dashboard/types"; -import { Card, TableBody, TableCell, TableFooter, Typography } from "@material-ui/core"; +import { TableBody, TableCell, TableFooter, Typography } from "@material-ui/core"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -65,19 +65,21 @@ const ShippingMethodProducts: React.FC = props => { const intl = useIntl(); return ( - - + + + {intl.formatMessage({ + id: "t3aiWF", + defaultMessage: "Excluded Products", + description: "section header", + })} + + - } - /> + + {!!products?.length && ( <> @@ -145,7 +147,7 @@ const ShippingMethodProducts: React.FC = props => { )} - + ); }; diff --git a/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx b/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx index 3175f893ea6..1433eb4a231 100644 --- a/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx +++ b/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx @@ -1,11 +1,10 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Combobox } from "@dashboard/components/Combobox"; import { TaxClassBaseFragment } from "@dashboard/graphql"; import { ChangeEvent } from "@dashboard/hooks/useForm"; import { sectionNames } from "@dashboard/intl"; import { taxesMessages } from "@dashboard/taxes/messages"; import { FetchMoreProps } from "@dashboard/types"; -import { Card, CardContent } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -33,9 +32,11 @@ const ShippingMethodTaxes: React.FC = props => { const intl = useIntl(); return ( - - - + + + {intl.formatMessage(sectionNames.taxes)} + + = props => { }} onChange={onChange} /> - - + + ); }; diff --git a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx index a70d5a29192..014092dbb84 100644 --- a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx +++ b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import RichTextEditor from "@dashboard/components/RichTextEditor"; import { RichTextEditorLoading } from "@dashboard/components/RichTextEditor/RichTextEditorLoading"; import { ShippingErrorFragment } from "@dashboard/graphql"; @@ -9,7 +9,7 @@ import { getFormErrors } from "@dashboard/utils/errors"; import getShippingErrorMessage from "@dashboard/utils/errors/shipping"; import { useRichTextContext } from "@dashboard/utils/richText/context"; import { OutputData } from "@editorjs/editorjs"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -74,9 +74,13 @@ const ShippingRateInfo: React.FC = props => { const formErrors = getFormErrors(["name", "description", "minDays", "maxDays"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = props => { onChange={onChange} />
- - + + ); }; diff --git a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx index a66240858a0..67182c21620 100644 --- a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx +++ b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx @@ -1,10 +1,10 @@ +import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; -import CardTitle from "@dashboard/components/CardTitle"; import { ShippingErrorFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getShippingErrorMessage from "@dashboard/utils/errors/shipping"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -60,9 +60,13 @@ const ShippingZoneInfo: React.FC = ({ const formErrors = getFormErrors(["name"], errors); return ( - - - + + + + {intl.formatMessage(commonMessages.generalInformations)} + + + = ({ placeholder={intl.formatMessage(messages.descriptionPlaceholder)} rows={10} /> - - + + ); }; diff --git a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx index cf826144f1e..997e86100e1 100644 --- a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx +++ b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; @@ -8,7 +8,7 @@ import TableRowLink from "@dashboard/components/TableRowLink"; import { PostalCodeRuleInclusionTypeEnum, ShippingMethodTypeFragment } from "@dashboard/graphql"; import ArrowDropdown from "@dashboard/icons/ArrowDropdown"; import { renderCollection } from "@dashboard/misc"; -import { Card, CardContent, TableBody, TableCell, TableHead, Typography } from "@material-ui/core"; +import { TableBody, TableCell, TableHead, Typography } from "@material-ui/core"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import clsx from "clsx"; import React from "react"; @@ -94,14 +94,16 @@ const ShippingZonePostalCodes: React.FC = ({ }; return ( - - + + + {intl.formatMessage({ + id: "FcTTvh", + defaultMessage: "Postal codes", + description: "postal codes, header", + })} + + - } - /> - + + + = ({ value={getInclusionType()} onChange={onInclusionRadioChange} /> - + @@ -231,7 +233,7 @@ const ShippingZonePostalCodes: React.FC = ({ )} - + ); }; diff --git a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx index a763014fe15..e4b1b1bb7f1 100644 --- a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx +++ b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx @@ -1,5 +1,5 @@ // @ts-strict-ignore -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import IconButtonTableCell from "@dashboard/components/IconButtonTableCell"; import Money from "@dashboard/components/Money"; import MoneyRange from "@dashboard/components/MoneyRange"; @@ -11,7 +11,7 @@ import WeightRange from "@dashboard/components/WeightRange"; import { ShippingZoneDetailsFragment } from "@dashboard/graphql"; import useNavigator from "@dashboard/hooks/useNavigator"; import { ChannelProps } from "@dashboard/types"; -import { Card, TableBody, TableCell, TableHead } from "@material-ui/core"; +import { TableBody, TableCell, TableHead } from "@material-ui/core"; import EditIcon from "@material-ui/icons/Edit"; import { Button, DeleteIcon, ICONBUTTON_SIZE, makeStyles } from "@saleor/macaw-ui"; import React from "react"; @@ -64,10 +64,10 @@ const ShippingZoneRates: React.FC = props => { const intl = useIntl(); return ( - - + + + {variant === "price" ? intl.formatMessage({ id: "FjrExY", defaultMessage: "Price Based Rates", @@ -77,14 +77,14 @@ const ShippingZoneRates: React.FC = props => { id: "foB6wx", defaultMessage: "Weight Based Rates", description: "weight based shipping methods, section header", - }) - } - toolbar={ + })} + + - } - /> + + @@ -193,7 +193,7 @@ const ShippingZoneRates: React.FC = props => { )} - + ); }; diff --git a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx index 622ccd0955d..3ac5409ab96 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx @@ -1,7 +1,7 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ChannelFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; -import { Card, CardContent, Divider } from "@material-ui/core"; +import { Divider } from "@material-ui/core"; import { Option } from "@saleor/macaw-ui-next"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -46,17 +46,19 @@ export const ShippingZoneSettingsCard: React.FC = const intl = useIntl(); return ( - - - + + + {intl.formatMessage(messages.title)} + + - + - + = hasMore={hasMoreWarehouses} loading={loading} /> - - + + ); }; diff --git a/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx b/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx index bc6e3c61f7e..986b34e16fb 100644 --- a/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx +++ b/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx @@ -1,8 +1,8 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import FormSpacer from "@dashboard/components/FormSpacer"; import { ShopErrorFragment } from "@dashboard/graphql"; import { getFormErrors } from "@dashboard/utils/errors"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -33,9 +33,11 @@ const SiteCheckoutSettingsCard: React.FC = ({ ); return ( - - - + + + {intl.formatMessage(messages.reservedStock)} + + @@ -83,9 +85,11 @@ const SiteCheckoutSettingsCard: React.FC = ({ }, }} /> - - - + + + {intl.formatMessage(messages.checkoutLimits)} + + = ({ }, }} /> - - + + ); }; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 96471daebf1..d323d3ae1ca 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -180,9 +180,11 @@ const SiteSettingsPage: React.FC = props => { description={intl.formatMessage(messages.sectionEmailConfirmationDescription)} /> - - {intl.formatMessage(messages.sectionEmailConfirmationHeader)} - + + + {intl.formatMessage(messages.sectionEmailConfirmationHeader)} + + = ({ onChange={change} /> - - - + + + + {intl.formatMessage({ + id: "Fbr4Vp", + defaultMessage: "Permissions", + description: "dialog header", + })} + + + {intl.formatMessage({ id: "P+kVxW", @@ -155,8 +157,8 @@ const StaffDetailsPage: React.FC = ({ onSearchChange={onSearchChange} {...fetchMorePermissionGroups} /> - - + + )} diff --git a/src/staff/components/StaffListPage/StaffListPage.tsx b/src/staff/components/StaffListPage/StaffListPage.tsx index 94a53ff5d09..6dc9613daa9 100644 --- a/src/staff/components/StaffListPage/StaffListPage.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.tsx @@ -1,5 +1,6 @@ import { ListFilters } from "@dashboard/components/AppLayout/ListFilters"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import { FilterPresetsSelect } from "@dashboard/components/FilterPresetsSelect"; import { ListPageLayout } from "@dashboard/components/Layouts"; import LimitReachedAlert from "@dashboard/components/LimitReachedAlert"; @@ -10,7 +11,6 @@ import { StaffMembers } from "@dashboard/staff/types"; import { StaffListUrlSortField } from "@dashboard/staff/urls"; import { FilterPagePropsWithPresets, ListProps, SortPage } from "@dashboard/types"; import { hasLimits, isLimitReached } from "@dashboard/utils/limits"; -import { Card } from "@material-ui/core"; import { Box, Button, ChevronRightIcon } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -127,7 +127,7 @@ const StaffListPage: React.FC = ({ /> )} - + currencySymbol={currencySymbol} initialSearch={initialSearch} @@ -141,7 +141,7 @@ const StaffListPage: React.FC = ({ /> - +
); }; diff --git a/src/staff/components/StaffPassword/StaffPassword.tsx b/src/staff/components/StaffPassword/StaffPassword.tsx index c258472ce62..b46b80a26bd 100644 --- a/src/staff/components/StaffPassword/StaffPassword.tsx +++ b/src/staff/components/StaffPassword/StaffPassword.tsx @@ -1,6 +1,6 @@ import { Button } from "@dashboard/components/Button"; -import CardTitle from "@dashboard/components/CardTitle"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { DashboardCard } from "@dashboard/components/Card"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -12,14 +12,16 @@ const StaffPassword: React.FC = ({ onChangePassword }) => { const intl = useIntl(); return ( - - + + + {intl.formatMessage({ + id: "ZhDQel", + defaultMessage: "Password", + description: "header", + })} + + - } - /> - + + + - - + + ); }; diff --git a/src/staff/components/StaffPreferences/StaffPreferences.tsx b/src/staff/components/StaffPreferences/StaffPreferences.tsx index 811c4ae4374..bf3be1a5e02 100644 --- a/src/staff/components/StaffPreferences/StaffPreferences.tsx +++ b/src/staff/components/StaffPreferences/StaffPreferences.tsx @@ -1,9 +1,9 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { Combobox } from "@dashboard/components/Combobox"; import FormSpacer from "@dashboard/components/FormSpacer"; import { Locale, localeNames } from "@dashboard/components/Locale"; import { capitalize } from "@dashboard/misc"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -30,15 +30,17 @@ const StaffPreferences: React.FC = ({ locale, onLocaleCha }; return ( - - - + + + + {intl.formatMessage({ + id: "CLeDae", + defaultMessage: "Preferences", + description: "section header", + })} + + + = ({ locale, onLocaleCha defaultMessage="Please note, while all currency and date adjustments are complete, language translations are at varying degrees of completion." /> - - + + ); }; diff --git a/src/staff/components/StaffProperties/StaffProperties.tsx b/src/staff/components/StaffProperties/StaffProperties.tsx index 97f8a38c8bc..91729ea9fb6 100644 --- a/src/staff/components/StaffProperties/StaffProperties.tsx +++ b/src/staff/components/StaffProperties/StaffProperties.tsx @@ -1,12 +1,12 @@ // @ts-strict-ignore import photoIcon from "@assets/images/photo-icon.svg"; -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { StaffErrorFragment, StaffMemberDetailsFragment, UserFragment } from "@dashboard/graphql"; import { commonMessages } from "@dashboard/intl"; import { getUserInitials } from "@dashboard/misc"; import { getFormErrors } from "@dashboard/utils/errors"; import getStaffErrorMessage from "@dashboard/utils/errors/staff"; -import { Card, CardContent, TextField, Typography } from "@material-ui/core"; +import { TextField, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { vars } from "@saleor/macaw-ui-next"; import React from "react"; @@ -136,15 +136,17 @@ const StaffProperties: React.FC = props => { }); return ( - - - + + + + {intl.formatMessage({ + id: "VTITVe", + defaultMessage: "Staff Member Information", + description: "section header", + })} + + +
@@ -225,13 +227,13 @@ const StaffProperties: React.FC = props => {
-
+ {!!formErrors.id && ( - + {getStaffErrorMessage(formErrors.id, intl)} - + )} -
+ ); }; diff --git a/src/staff/components/UserStatus/UserStatus.tsx b/src/staff/components/UserStatus/UserStatus.tsx index 92e04312283..0b3dc302556 100644 --- a/src/staff/components/UserStatus/UserStatus.tsx +++ b/src/staff/components/UserStatus/UserStatus.tsx @@ -1,6 +1,6 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { ControlledCheckbox } from "@dashboard/components/ControlledCheckbox"; -import { Card, CardContent, Typography } from "@material-ui/core"; +import { Typography } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -19,9 +19,11 @@ const AppStatus: React.FC = ({ data, disabled, label, onChange } const intl = useIntl(); return ( - - - + + + {intl.formatMessage(messages.userStatus)} + + {intl.formatMessage(messages.userDisableInstruction)} @@ -33,8 +35,8 @@ const AppStatus: React.FC = ({ data, disabled, label, onChange } name="isActive" onChange={onChange} /> - - + + ); }; diff --git a/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx b/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx index 4d0c332012e..61ee6af6b62 100644 --- a/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx +++ b/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx @@ -1,4 +1,5 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import { useProductVariantListQuery } from "@dashboard/graphql"; import useNavigator from "@dashboard/hooks/useNavigator"; import { @@ -7,7 +8,6 @@ import { TranslatableEntities, } from "@dashboard/translations/urls"; import { - Card, ClickAwayListener, Grow, MenuItem, @@ -103,14 +103,17 @@ const ProductContextSwitcher: React.FC = ({ :
- setExpandedState(!isExpanded)}> + setExpandedState(!isExpanded)} + > {items.find(({ value }) => value === selectedId)?.label || "-"} - + = props => { const [expanded, setExpandedState] = React.useState(initialState); return ( - - + + {title} + setExpandedState(!expanded)}> = props => { })} /> - } - /> + + {expanded ? ( - + @@ -238,9 +238,9 @@ const TranslationFields: React.FC = props => { component="div" /> )} - + ) : ( - + = props => { }} /> - + )} - + ); }; diff --git a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx index e29b3ab31d7..c82c47c41b1 100644 --- a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx +++ b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx @@ -1,8 +1,8 @@ import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import FilterTabs, { FilterTab } from "@dashboard/components/TableFilter"; import { LanguageFragment } from "@dashboard/graphql"; import { maybe } from "@dashboard/misc"; -import { Card } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -61,7 +61,7 @@ const TranslationsEntitiesListPage: React.FC }, )} /> - + /> {children} - + ); }; diff --git a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx index 1f8c1f4de51..4bcd54e014c 100644 --- a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx +++ b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx @@ -1,10 +1,11 @@ // @ts-strict-ignore +import { DashboardCard } from "@dashboard/components/Card"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import Skeleton from "@dashboard/components/Skeleton"; import TableRowLink from "@dashboard/components/TableRowLink"; import { LanguageFragment } from "@dashboard/graphql"; import { languageEntitiesUrl } from "@dashboard/translations/urls"; -import { Card, CardContent, TableBody, TableCell } from "@material-ui/core"; +import { TableBody, TableCell } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { vars } from "@saleor/macaw-ui-next"; import { clsx } from "clsx"; @@ -41,8 +42,8 @@ const TranslationsLanguageList: React.FC = props const classes = useStyles(props); return ( - - + + {renderCollection( @@ -76,8 +77,8 @@ const TranslationsLanguageList: React.FC = props )} - - + + ); }; diff --git a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx index a6d773ffe0d..0f551f0937c 100644 --- a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx +++ b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx @@ -21,9 +21,11 @@ const WarehouseInfo: React.FC = ({ data, disabled, errors, o return ( - - {intl.formatMessage(commonMessages.generalInformations)} - + + + {intl.formatMessage(commonMessages.generalInformations)} + + = ({ /> )} - + = ({ onUpdateListSettings={onUpdateListSettings} {...listProps} /> - + ); }; diff --git a/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx b/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx index ceb0158627a..ae40d099f3d 100644 --- a/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx +++ b/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx @@ -1,4 +1,4 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { FormSpacer } from "@dashboard/components/FormSpacer"; import Link from "@dashboard/components/Link"; import PreviewPill from "@dashboard/components/PreviewPill"; @@ -12,7 +12,7 @@ import { sectionNames } from "@dashboard/intl"; import { renderCollection } from "@dashboard/misc"; import { shippingZoneUrl } from "@dashboard/shipping/urls"; import { RelayToFlat } from "@dashboard/types"; -import { Card, CardContent, Divider, Typography } from "@material-ui/core"; +import { Divider, Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -131,9 +131,13 @@ const WarehouseSettings: React.FC = ({ ); return ( - - } /> - + + + + + + + {renderCollection( zones, zone => @@ -152,10 +156,14 @@ const WarehouseSettings: React.FC = ({ ), )} - + - } /> - + + + + + + = ({ name="isPrivate" alignTop={true} /> - + - - - - - } - /> - + + + + + + + = ({ name="clickAndCollectOption" alignTop={true} /> - - + + ); }; From fd36e8e0870c071f83549a89b9d0bb9b32c69718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20Szcz=C4=99ch?= <30683248+szczecha@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:08:08 +0200 Subject: [PATCH 014/264] Add load test services to deploy dev workflow (#5053) --- .changeset/big-squids-tie.md | 5 +++++ .github/workflows/deploy-dev.yaml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/big-squids-tie.md diff --git a/.changeset/big-squids-tie.md b/.changeset/big-squids-tie.md new file mode 100644 index 00000000000..0e51e000f76 --- /dev/null +++ b/.changeset/big-squids-tie.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +From now dashboard will be deployed to load test services in dev cloud diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index d6e6f70b06b..ba2815d5ec4 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -61,6 +61,12 @@ jobs: aws s3 sync build/dashboard "s3://${DEPLOYMENT_BUCKET}/saleor-dev2/static/" aws s3 cp build/dashboard/index.html "s3://${DEPLOYMENT_BUCKET}/saleor-dev2/" + + aws s3 sync build/dashboard "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test/static/" + aws s3 cp build/dashboard/index.html "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test/" + + aws s3 sync build/dashboard "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test2/static/" + aws s3 cp build/dashboard/index.html "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test2/" env: DEPLOYMENT_BUCKET: ${{ secrets.AWS_CLOUD_DEV_DEPLOYMENT_BUCKET }} From 5a10255706331fb401c68c666d4059a72dccfed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Mi=C4=85cz?= Date: Fri, 19 Jul 2024 10:40:02 +0200 Subject: [PATCH 015/264] Add saleor-dev-data-test service to dev deployment workflow (#5054) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add saleor-dev-data-test service to dev deployment workflow * Fix changeset --------- Co-authored-by: Paweł Chyła --- .changeset/wise-ads-mix.md | 5 +++++ .github/workflows/deploy-dev.yaml | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/wise-ads-mix.md diff --git a/.changeset/wise-ads-mix.md b/.changeset/wise-ads-mix.md new file mode 100644 index 00000000000..a82b907a2e5 --- /dev/null +++ b/.changeset/wise-ads-mix.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Add new service to dev deployment CI workflow diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index ba2815d5ec4..6d3af0b630f 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -67,6 +67,9 @@ jobs: aws s3 sync build/dashboard "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test2/static/" aws s3 cp build/dashboard/index.html "s3://${DEPLOYMENT_BUCKET}/saleor-dev-load-test2/" + + aws s3 sync build/dashboard "s3://${DEPLOYMENT_BUCKET}/saleor-dev-data-test/static/" + aws s3 cp build/dashboard/index.html "s3://${DEPLOYMENT_BUCKET}/saleor-dev-data-test/" env: DEPLOYMENT_BUCKET: ${{ secrets.AWS_CLOUD_DEV_DEPLOYMENT_BUCKET }} From a565113e696924865be52a984924ca8bb5945aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Mi=C4=85cz?= Date: Fri, 19 Jul 2024 12:37:56 +0200 Subject: [PATCH 016/264] Fix custom ref checkout in dev deployment CI workflow (#5056) --- .changeset/nice-bears-shake.md | 5 +++++ .github/workflows/deploy-dev.yaml | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/nice-bears-shake.md diff --git a/.changeset/nice-bears-shake.md b/.changeset/nice-bears-shake.md new file mode 100644 index 00000000000..5b33714841f --- /dev/null +++ b/.changeset/nice-bears-shake.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Fix custom ref checkout in dev deployment CI workflow diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index 6d3af0b630f..3ce1e101d9b 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -4,7 +4,9 @@ on: inputs: git_ref: description: Git ref (tag, branch or commit hash) to deploy + type: string required: true + default: main jobs: build: @@ -27,6 +29,9 @@ jobs: IS_CLOUD_INSTANCE: true steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.git_ref }} + - name: Set custom version run: | HASH=$(git rev-parse --short HEAD) From a77ff9f9ef43e892f77529256148784ae99ec905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Mon, 22 Jul 2024 09:35:53 +0200 Subject: [PATCH 017/264] Fix taxes dropdown 100% width (#5057) * Make select 100% * Add changeset --- .changeset/slimy-rocks-explode.md | 5 +++++ .../TaxCountryExceptionListItem.tsx | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .changeset/slimy-rocks-explode.md diff --git a/.changeset/slimy-rocks-explode.md b/.changeset/slimy-rocks-explode.md new file mode 100644 index 00000000000..01ccc274159 --- /dev/null +++ b/.changeset/slimy-rocks-explode.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now see tax dropdown taking full width diff --git a/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx b/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx index b185c9aa4fe..a6e81905e18 100644 --- a/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx +++ b/src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx @@ -39,20 +39,22 @@ export const TaxCountryExceptionListItem: React.FC )} - + - + From 9f10e1bdb1f80660aa7f74fbd24f44f34a6d8b29 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Mon, 22 Jul 2024 11:19:17 +0200 Subject: [PATCH 018/264] Migrate to `Text`, `Skeleton`; fix text in titles and labels (#5042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * app install page * attribute details * attributes * attributes * categories * the rest * changeset * migrate to Text component * Migrate `Skeleton` * changesets * small fixes * cleanup --------- Co-authored-by: Paweł Chyła --- .changeset/real-icons-share.md | 5 ++ package-lock.json | 6 +- src/apps/components/AllAppList/AllAppList.tsx | 3 +- .../components/AppDetailsPage/AboutCard.tsx | 3 +- .../AppDetailsPage/DataPrivacyCard.tsx | 3 +- .../AppDetailsPage/PermissionsCard.tsx | 3 +- src/apps/components/AppDialog/AppDialog.tsx | 7 ++- .../AppInstallErrorPage.tsx | 11 ++-- .../AppInstallPage/AppInstallPage.tsx | 3 +- .../AppListRow/ErrorInstallAction.tsx | 7 +-- .../AppManifestTableDisplay.tsx | 7 +-- .../AppPermissionsDialog.tsx | 3 +- .../DeactivatedText/DeactivatedText.tsx | 6 +- .../InstalledAppList/InstalledAppList.tsx | 3 +- .../MarketplaceAlert/MarketplaceAlert.tsx | 6 +- .../SectionHeader/SectionHeader.tsx | 6 +- .../AttributeOrganization.tsx | 11 ++-- .../AttributeProperties.tsx | 2 +- .../AttributeValues/AttributeValues.tsx | 3 +- src/auth/components/LoginPage/LoginPage.tsx | 24 ++++---- .../NewPasswordPage/NewPasswordPage.tsx | 11 ++-- .../ResetPasswordPage/ResetPasswordPage.tsx | 15 ++--- .../ResetPasswordSuccessPage.tsx | 10 ++-- src/auth/components/styles.ts | 2 + .../CategoryBackground/CategoryBackground.tsx | 27 ++++----- .../AssignmentList/AssignmentList.tsx | 16 ++---- .../ChannelAllocationStrategy.tsx | 5 +- .../ChannelDeleteDialog.tsx | 15 +++-- .../ChannelStatus/ChannelStatus.tsx | 14 ++--- .../ShippingZones/ShippingZones.tsx | 4 +- .../components/Warehouses/Warehouses.tsx | 4 +- .../ChannelsListPage/ChannelsListPage.tsx | 2 +- .../CollectionImage/CollectionImage.tsx | 3 +- .../CollectionProducts/CollectionProducts.tsx | 2 +- .../AccountPermissionGroups.tsx | 7 +-- .../PermissionList/PermissionList.tsx | 3 +- .../AddressFormatter/AddressFormatter.tsx | 27 +++++---- .../AssignAttributeDialog.tsx | 6 +- .../AssignVariantDialog.tsx | 6 +- src/components/Card/Title.tsx | 4 +- src/components/CardMenu/CardMenu.tsx | 10 ++-- .../ChannelsAvailabilityContent.tsx | 17 +++--- .../ChannelsAvailabilityDialog/NoChannels.tsx | 6 +- ...ChannelsAvailabilityDialogChannelsList.tsx | 4 +- .../ChannelsAvailabilityDialogWrapper.tsx | 11 ++-- .../ChannelsAvailabilityMenuContent.tsx | 12 ++-- src/components/Chip/Chip.tsx | 6 +- src/components/CountryList/CountryList.tsx | 2 +- src/components/CreatorSteps/CreatorSteps.tsx | 6 +- .../DiscountedPrice/DiscountedPrice.tsx | 6 +- src/components/DryRun/DryRun.tsx | 14 ++--- .../DryRunItemsList/DryRunItemsList.tsx | 3 +- .../EditableTableCell/EditableTableCell.tsx | 7 ++- .../ErrorMessageCard/ErrorMessageCard.tsx | 10 ++-- src/components/ErrorPage/ErrorPage.tsx | 18 +++--- src/components/ExternalLink/ExternalLink.tsx | 9 +-- .../FileUploadField/FileUploadField.tsx | 4 +- src/components/Filter/Filter.tsx | 8 +-- .../Filter/FilterAutocompleteField.tsx | 9 +-- .../Filter/FilterContent/FilterContent.tsx | 5 +- .../FilterContent/FilterContentBody.tsx | 2 +- .../FilterContent/FilterContentHeader.tsx | 7 +-- .../Filter/FilterContent/FilterErrorsList.tsx | 4 +- src/components/ImageUpload/ImageUpload.tsx | 13 +---- .../LanguageSwitch/LanguageSwitch.tsx | 4 +- src/components/Link.tsx | 6 +- .../MultiAutocompleteSelectField.tsx | 5 +- .../MultiAutocompleteSelectFieldContent.tsx | 5 +- src/components/NotFoundPage/NotFoundPage.tsx | 14 ++--- src/components/PageHeader/PageHeader.tsx | 11 ++-- .../PageSectionHeader/PageSectionHeader.tsx | 15 +++-- src/components/PreviewPill/PreviewPill.tsx | 7 +-- src/components/RadioGroupField/styles.ts | 2 + .../SingleAutocompleteSelectFieldContent.tsx | 9 +-- src/components/Skeleton.tsx | 56 ------------------ src/components/SortableChip/SortableChip.tsx | 4 +- src/components/Tab/Tab.tsx | 8 +-- .../TableCellAvatar/AvatarImage.tsx | 7 ++- src/components/TableHead/TableHead.tsx | 7 ++- .../TextFieldWithChoice.tsx | 6 +- .../DeleteWarningDialogConsentContent.tsx | 6 +- src/components/VersionInfo/VersionInfo.tsx | 6 +- .../VisibilityCard/DateVisibilitySelector.tsx | 6 +- .../VisibilityCard/VisibilityCard.tsx | 7 +-- src/configuration/ConfigurationPage.tsx | 5 +- .../CustomAppDefaultToken.tsx | 17 +++--- .../CustomAppListPage/CustomAppListPage.tsx | 6 +- .../CustomAppTokens/CustomAppTokens.tsx | 2 +- .../CustomAppsSkeleton/CustomAppsSkeleton.tsx | 2 +- .../TokenCreateDialog/TokenCreateDialog.tsx | 26 ++++----- .../WebhookEvents/WebhookEvents.tsx | 7 ++- .../WebhookHeaders/WebhookHeaders.tsx | 27 +++++---- .../components/WebhookInfo/WebhookInfo.tsx | 11 ++-- .../components/WebhooksList/WebhooksList.tsx | 2 +- .../CustomerAddress/CustomerAddress.tsx | 2 +- .../CustomerAddressChoiceCard.tsx | 6 +- .../CustomerAddressListPage.tsx | 11 ++-- .../CustomerAddresses/CustomerAddresses.tsx | 18 +++--- .../CustomerCreateAddress.tsx | 7 +-- .../CustomerCreateNote/CustomerCreateNote.tsx | 7 ++- .../CustomerDetails/CustomerDetails.tsx | 47 ++++++++------- .../components/CustomerInfo/CustomerInfo.tsx | 14 ++--- .../CustomerOrders/CustomerOrders.tsx | 2 +- .../CustomerStats/CustomerStats.tsx | 3 +- .../DiscountCategories/DiscountCategories.tsx | 2 +- .../DiscountCollections.tsx | 2 +- .../DiscountCountrySelectDialog.tsx | 10 ++-- .../DiscountProducts/DiscountProducts.tsx | 2 +- .../DiscountVariants/DiscountVariants.tsx | 2 +- .../components/SaleSummary/SaleSummary.tsx | 35 ++++++------ .../components/SaleType/SaleType.tsx | 1 - .../components/SaleValue/SaleValue.tsx | 6 +- .../VoucherDetailsPage/VoucherDetailsPage.tsx | 6 +- .../VoucherLimits/VoucherLimits.tsx | 9 +-- .../VoucherRequirements.tsx | 6 +- .../VoucherSummary/VoucherSummary.tsx | 57 ++++++++++--------- .../components/VoucherTypes/VoucherTypes.tsx | 1 - .../components/VoucherValue/VoucherValue.tsx | 9 ++- .../GiftCardBulkCreateDialogForm.tsx | 5 +- .../GiftCardBulkCreateSuccessDialog.tsx | 5 +- .../GiftCardCreateDialogCodeContent.tsx | 8 +-- .../GiftCardCreateExpirySelect.tsx | 11 ++-- ...iftCardCreateRequiresActivationSection.tsx | 6 +- .../GiftCardExportDialogContent.tsx | 7 ++- .../GiftCardExpirySettingsCard.tsx | 1 - .../GiftCardSettings/GiftCardSettingsPage.tsx | 7 +-- .../GiftCardHistory/GiftCardHistory.tsx | 7 +-- .../GiftCardResendCodeDialog.tsx | 6 +- .../GiftCardUpdateBalanceDialog.tsx | 9 ++- .../GiftCardUpdateDetailsBalanceSection.tsx | 12 ++-- .../GiftCardUpdateDetailsCard.tsx | 8 +-- .../GiftCardUpdateExpirySelect.tsx | 5 +- .../GiftCardUpdateInfoCard.tsx | 3 +- .../GiftCardUpdateInfoCardContent.tsx | 16 ++---- .../GiftCardDeleteDialogContent.tsx | 15 +++-- .../GiftCardSettingsExpirySelect.tsx | 6 +- .../HomeActivityCard/HomeActivityCard.tsx | 6 +- src/home/components/HomeHeader/HomeHeader.tsx | 3 +- src/home/components/HomePage/HomePage.tsx | 4 +- .../HomeProductList/HomeProductList.tsx | 2 +- .../MenuDetailsPage/MenuDetailsPage.tsx | 11 ++-- .../MenuItemDialog/MenuItemDialog.tsx | 14 ++--- .../components/MenuItems/MenuItems.tsx | 3 +- .../components/MenuList/MenuList.tsx | 2 +- .../OrderAddTransaction.tsx | 3 +- .../OrderCardTitle/OrderCardTitle.tsx | 10 ++-- .../OrderChangeWarehouseDialog.tsx | 16 +++--- .../OrderChangeWarehouseDialog/styles.ts | 19 ------- .../OrderChannelSectionCard.tsx | 7 +-- .../OrderCustomer/AddrssTextError.tsx | 6 +- .../OrderCustomer/OrderCustomer.tsx | 48 +++++++--------- .../OrderCustomer/PickupAnnotation.tsx | 6 +- .../OrderCustomerAddressEdit.tsx | 3 +- .../OrderCustomerAddressesEditDialog.tsx | 11 ++-- .../OrderCustomerChangeDialog.tsx | 6 +- .../OrderCustomerNote/OrderCustomerNote.tsx | 9 ++- .../components/OrderDetailsPage/Title.tsx | 8 +-- .../components/OrderDetailsPage/styles.ts | 6 -- .../OrderDiscountCommonModal/ModalTitle.tsx | 7 ++- .../OrderDiscountCommonModal.tsx | 5 +- .../OrderDraftDetails/OrderDraftDetails.tsx | 1 - .../OrderDraftDetailsProducts.tsx | 2 +- .../OrderDraftDetailsSummary.tsx | 11 ++-- .../OrderDraftPage/OrderDraftPage.tsx | 8 +-- .../OrderFulfillLine/OrderFulfillLine.tsx | 14 ++--- .../OrderFulfillPage/OrderFulfillPage.tsx | 3 +- .../OrderFulfillStockExceededDialog.tsx | 7 ++- .../OrderFulfillStockExceededDialogLine.tsx | 7 ++- .../ActionButtons.tsx | 7 ++- .../ExtraInfoLines.tsx | 27 +++++---- .../OrderFulfillmentSettings.tsx | 1 - .../ExtendedDiscountTimelineEvent.tsx | 4 +- .../MoneySection.tsx | 4 +- .../OrderHistory/ExtendedTimelineEvent.tsx | 8 +-- src/orders/components/OrderHistory/Label.tsx | 6 +- .../components/OrderHistory/OrderHistory.tsx | 7 +-- .../OrderInvoiceList/OrderInvoiceList.tsx | 13 ++--- src/orders/components/OrderList/OrderList.tsx | 2 +- .../OrderManualTransactionDialog.tsx | 1 - .../components/ErrorText.tsx | 8 +-- .../components/OrderPayment/OrderPayment.tsx | 29 +++++----- .../OrderTransactionsWrapper.tsx | 6 +- .../OrderPaymentSummaryCard.tsx | 8 +-- .../components/RefundsSummary.tsx | 6 +- .../OrderPriceLabel/OrderPriceLabel.tsx | 6 +- .../OrderProductAddDialog.tsx | 5 +- .../OrderProductsTableRow.tsx | 2 +- .../components/OrderRefund/OrderRefund.tsx | 1 - .../OrderRefundFulfilledProducts.tsx | 8 +-- .../OrderRefundUnfulfilledProducts.tsx | 8 +-- .../ProductErrorCell.tsx | 11 ++-- .../ReturnItemsCard.tsx | 2 +- .../components/ItemsCard/ItemsCard.tsx | 2 +- .../PaymentSubmitCard/PaymentSubmitCard.tsx | 7 ++- .../PaymentSubmitCardValues.tsx | 2 +- .../ProductErrorCell/ProductErrorCell.tsx | 11 ++-- .../OrderSendRefundPage/OrderSendRefund.tsx | 3 +- .../components/ManualRefundCard.tsx | 7 +-- .../components/TransactionCard.tsx | 6 +- .../OrderSettings/OrderSettings.tsx | 1 - .../OrderShippingMethodEditDialog.tsx | 2 +- .../OrderSummaryCard/OrderSummaryCard.tsx | 1 - .../OrderSummaryCard/SummaryLine.tsx | 2 +- .../OrderTransaction/OrderTransaction.tsx | 14 ++--- .../OrderTransactionGiftCard.tsx | 3 +- .../OrderUnfulfilledProductsCard.tsx | 6 +- .../PageTypeAttributes/PageTypeAttributes.tsx | 2 +- .../PageTypeCreatePage/PageTypeCreatePage.tsx | 13 ++--- .../PageTypeDetailsPage.tsx | 21 ++++--- .../components/PageTypeList/PageTypeList.tsx | 2 +- .../PageOrganizeContent.tsx | 19 ++----- .../AssignMembersDialog.tsx | 3 +- .../PermissionGroupDeleteDialog.tsx | 5 +- .../PermissionGroupMemberList.tsx | 13 ++--- .../PluginAuthorization.tsx | 12 ++-- .../PluginDetailsChannelsCardContent.tsx | 5 +- .../components/PluginInfo/PluginInfo.tsx | 20 +++---- .../PluginSecretFieldDialog.tsx | 2 +- .../GlobalConfigPluginPopupBody.tsx | 8 ++- .../PluginChannelAvailabilityCell.tsx | 2 +- .../components/PluginsList/PluginsList.tsx | 10 ++-- .../ProductTypeAttributes.tsx | 2 +- .../ProductTypeDetails/ProductTypeDetails.tsx | 11 ++-- .../ProductTypeList/ProductTypeList.tsx | 2 +- .../ProductTypeVariantAttributes.tsx | 3 +- .../ProductExportDialog.tsx | 7 ++- .../ProductExportDialogInfo.tsx | 37 ++++++------ .../components/ProductMedia/ProductMedia.tsx | 3 +- .../ProductMediaNavigation.tsx | 4 +- .../ProductMediaPage/ProductMediaPage.tsx | 3 +- .../ProductVariantAttributes.tsx | 8 +-- .../ChannelsAvailabilityCard/CardSkeleton.tsx | 2 +- .../ChannelsListItem.tsx | 1 + .../CreateVariantTitle.tsx | 40 ++++++------- .../ProductVariantMedia.tsx | 27 ++++----- .../ProductVariantNavigation.tsx | 3 +- .../ProductVariantPrice.tsx | 3 +- .../components/OrderValue/OrderValue.tsx | 9 +-- .../components/OrderWeight/OrderWeight.tsx | 11 ++-- .../components/PricingCard/PricingCard.tsx | 5 +- .../ShippingMethodProducts.tsx | 8 ++- .../ShippingMethodProductsAddDialog.tsx | 3 +- .../ShippingZoneCountriesAssignDialog.tsx | 18 +++--- .../ShippingZonePostalCodeRangeDialog.tsx | 14 ++--- .../ShippingZonePostalCodes.tsx | 28 ++++----- .../ShippingZoneRates/ShippingZoneRates.tsx | 2 +- .../SiteCheckoutSettingsCard.tsx | 7 ++- .../StaffDetailsPage/StaffDetailsPage.tsx | 7 +-- .../StaffPassword/StaffPassword.tsx | 6 +- .../StaffPreferences/StaffPreferences.tsx | 6 +- .../StaffProperties/StaffProperties.tsx | 16 +++--- .../components/UserStatus/UserStatus.tsx | 6 +- .../TaxChannelsMenu/TaxChannelsMenu.tsx | 2 +- .../pages/TaxChannelsPage/TaxChannelsPage.tsx | 3 +- .../TaxClassesMenu/TaxClassesMenu.tsx | 3 +- .../pages/TaxClassesPage/TaxClassesPage.tsx | 3 +- .../TaxCountriesMenu/TaxCountriesMenu.tsx | 3 +- .../TaxCountriesPage/TaxCountriesPage.tsx | 3 +- .../ProductContextSwitcher.tsx | 8 +-- .../TranslationFields/TranslationFields.tsx | 23 ++++---- .../TranslationFieldsLong.tsx | 9 +-- .../TranslationFieldsRich.tsx | 10 ++-- .../TranslationFieldsShort.tsx | 9 +-- .../TranslationsEntitiesList.tsx | 2 +- .../TranslationsLanguageList.tsx | 3 +- .../WarehouseList/WarehouseList.tsx | 2 +- .../WarehouseSettings/WarehouseSettings.tsx | 28 ++++----- 267 files changed, 1052 insertions(+), 1209 deletions(-) create mode 100644 .changeset/real-icons-share.md delete mode 100644 src/components/Skeleton.tsx diff --git a/.changeset/real-icons-share.md b/.changeset/real-icons-share.md new file mode 100644 index 00000000000..5374e8494b7 --- /dev/null +++ b/.changeset/real-icons-share.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Dashboard no longer uses Typography and Skeleton from Material. These components were replaced with MacawUI ones diff --git a/package-lock.json b/package-lock.json index 3edc7d612f4..f327543a0ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5241,7 +5241,9 @@ }, "node_modules/@material-ui/lab": { "version": "4.0.0-alpha.61", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.61.tgz", + "integrity": "sha512-rSzm+XKiNUjKegj8bzt5+pygZeckNLOr+IjykH8sYdVk7dE9y2ZuUSofiMV2bJk3qU+JHwexmw+q0RyNZB9ugg==", + "deprecated": "Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.", "dependencies": { "@babel/runtime": "^7.4.4", "@material-ui/utils": "^4.11.3", @@ -29082,6 +29084,8 @@ }, "@material-ui/lab": { "version": "4.0.0-alpha.61", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.61.tgz", + "integrity": "sha512-rSzm+XKiNUjKegj8bzt5+pygZeckNLOr+IjykH8sYdVk7dE9y2ZuUSofiMV2bJk3qU+JHwexmw+q0RyNZB9ugg==", "requires": { "@babel/runtime": "^7.4.4", "@material-ui/utils": "^4.11.3", diff --git a/src/apps/components/AllAppList/AllAppList.tsx b/src/apps/components/AllAppList/AllAppList.tsx index c79a2ed7439..d3444c11bb9 100644 --- a/src/apps/components/AllAppList/AllAppList.tsx +++ b/src/apps/components/AllAppList/AllAppList.tsx @@ -1,7 +1,6 @@ import { AppstoreApi } from "@dashboard/apps/appstore.types"; import { AppInstallationFragment } from "@dashboard/graphql"; -import { Skeleton } from "@material-ui/lab"; -import { Box, useTheme } from "@saleor/macaw-ui-next"; +import { Box, Skeleton, useTheme } from "@saleor/macaw-ui-next"; import React from "react"; import AppListRow from "../AppListRow"; diff --git a/src/apps/components/AppDetailsPage/AboutCard.tsx b/src/apps/components/AppDetailsPage/AboutCard.tsx index 2c6a515ef73..703ff233cc8 100644 --- a/src/apps/components/AppDetailsPage/AboutCard.tsx +++ b/src/apps/components/AppDetailsPage/AboutCard.tsx @@ -1,5 +1,4 @@ -import Skeleton from "@dashboard/components/Skeleton"; -import { Box, BoxProps, Text } from "@saleor/macaw-ui-next"; +import { Box, BoxProps, Skeleton, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/apps/components/AppDetailsPage/DataPrivacyCard.tsx b/src/apps/components/AppDetailsPage/DataPrivacyCard.tsx index 4aec25f2639..bfc6505e3d5 100644 --- a/src/apps/components/AppDetailsPage/DataPrivacyCard.tsx +++ b/src/apps/components/AppDetailsPage/DataPrivacyCard.tsx @@ -1,6 +1,5 @@ import { ExternalLinkNext } from "@dashboard/components/ExternalLink"; -import Skeleton from "@dashboard/components/Skeleton"; -import { Box, BoxProps, Text } from "@saleor/macaw-ui-next"; +import { Box, BoxProps, Skeleton, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/apps/components/AppDetailsPage/PermissionsCard.tsx b/src/apps/components/AppDetailsPage/PermissionsCard.tsx index 3e879ea96cf..b2428f5d260 100644 --- a/src/apps/components/AppDetailsPage/PermissionsCard.tsx +++ b/src/apps/components/AppDetailsPage/PermissionsCard.tsx @@ -1,10 +1,9 @@ import { AppPermissionsDialog } from "@dashboard/apps/components/AppPermissionsDialog"; import { ButtonWithTooltip } from "@dashboard/components/ButtonWithTooltip"; -import Skeleton from "@dashboard/components/Skeleton"; import { PermissionEnum } from "@dashboard/graphql"; import { useHasManagedAppsPermission } from "@dashboard/hooks/useHasManagedAppsPermission"; import { buttonMessages } from "@dashboard/intl"; -import { Box, BoxProps, Text } from "@saleor/macaw-ui-next"; +import { Box, BoxProps, Skeleton, Text } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/apps/components/AppDialog/AppDialog.tsx b/src/apps/components/AppDialog/AppDialog.tsx index ea19264d536..c2c2862ebdf 100644 --- a/src/apps/components/AppDialog/AppDialog.tsx +++ b/src/apps/components/AppDialog/AppDialog.tsx @@ -12,7 +12,12 @@ export const AppDialog: React.FC = ({ children, title, onClose, return ( - + {title} diff --git a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx index 6a6942fa399..b63f9a69a39 100644 --- a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx +++ b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx @@ -1,7 +1,8 @@ import errorImg from "@assets/images/app-install-error.svg"; import { Button } from "@dashboard/components/Button"; import Container from "@dashboard/components/Container"; -import { Grid, Typography } from "@material-ui/core"; +import { Grid } from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -22,12 +23,12 @@ export const AppInstallErrorPage: React.FC = ({ onBack - + - - + + - + diff --git a/src/apps/components/AppInstallPage/AppInstallPage.tsx b/src/apps/components/AppInstallPage/AppInstallPage.tsx index cede21e322d..f3729508c5d 100644 --- a/src/apps/components/AppInstallPage/AppInstallPage.tsx +++ b/src/apps/components/AppInstallPage/AppInstallPage.tsx @@ -6,12 +6,11 @@ import { DashboardCard } from "@dashboard/components/Card"; import CardSpacer from "@dashboard/components/CardSpacer"; import Hr from "@dashboard/components/Hr"; import { DetailPageLayout } from "@dashboard/components/Layouts"; -import Skeleton from "@dashboard/components/Skeleton"; import { AppFetchMutation, AppInstallMutation } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import { buttonMessages } from "@dashboard/intl"; import { useTheme } from "@dashboard/theme"; -import { Box, Button, Spinner, Text } from "@saleor/macaw-ui-next"; +import { Box, Button, Skeleton, Spinner, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/apps/components/AppListRow/ErrorInstallAction.tsx b/src/apps/components/AppListRow/ErrorInstallAction.tsx index 19f3799c1e2..02e95f8c10c 100644 --- a/src/apps/components/AppListRow/ErrorInstallAction.tsx +++ b/src/apps/components/AppListRow/ErrorInstallAction.tsx @@ -1,9 +1,8 @@ import { appInstallationStatusMessages } from "@dashboard/apps/messages"; import { AppInstallationFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; -import { Typography } from "@material-ui/core"; import { Button, Indicator, TooltipMountWrapper } from "@saleor/macaw-ui"; -import { sprinkles, Tooltip } from "@saleor/macaw-ui-next"; +import { sprinkles, Text, Tooltip } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -24,7 +23,7 @@ const InstallErrorAction = ({ return ( <> - - + {retryInstall && ( ))} - + )} ); diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx index 179b8aea922..338a8db9f3e 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.tsx @@ -4,7 +4,8 @@ import FormSpacer from "@dashboard/components/FormSpacer"; import { AccountErrorFragment } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import getAccountErrorMessage from "@dashboard/utils/errors/account"; -import { TextField, Typography } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -36,24 +37,24 @@ const NewPasswordPage: React.FC = props => { return ( <> - + - + {errors.map(error => (
{getAccountErrorMessage(error, intl)}
))} - + - + = props => { return (
{({ change: handleChange, data, submit: handleSubmit }) => ( - <> + - + - + {!!error &&
{error}
} - + - + = props => { description="password reset, button" /> - +
)}
); diff --git a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx index 8ea9ab58b2f..87c565d9d7b 100644 --- a/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx +++ b/src/auth/components/ResetPasswordSuccessPage/ResetPasswordSuccessPage.tsx @@ -1,6 +1,6 @@ import { Button } from "@dashboard/components/Button"; import FormSpacer from "@dashboard/components/FormSpacer"; -import { Typography } from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -19,15 +19,15 @@ const ResetPasswordSuccessPage: React.FC = props return ( <> - + - - + + - + - onImageUpload(files && files[0])} - type="file" - ref={anchor} - accept="image/*" - /> - + + onImageUpload(files && files[0])} + type="file" + ref={anchor} + accept="image/*" + /> diff --git a/src/channels/components/AssignmentList/AssignmentList.tsx b/src/channels/components/AssignmentList/AssignmentList.tsx index 42b3827fcb2..53dfa172c9a 100644 --- a/src/channels/components/AssignmentList/AssignmentList.tsx +++ b/src/channels/components/AssignmentList/AssignmentList.tsx @@ -1,7 +1,5 @@ -import Skeleton from "@dashboard/components/Skeleton"; import { ReorderEvent } from "@dashboard/types"; -import { Typography } from "@material-ui/core"; -import { Accordion, Divider } from "@saleor/macaw-ui-next"; +import { Accordion, Divider, Skeleton, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -41,9 +39,9 @@ const AssignmentList: React.FC = props => { {loading ? ( ) : ( - + {`${items.length} ${itemsName.toLowerCase()}`} - + )} @@ -76,15 +74,11 @@ const AssignmentList: React.FC = props => { {hasMoreItemsToBeSelected ? ( ) : ( - + {intl.formatMessage(messages.allSelectedMessage, { itemsName: itemsName.toLowerCase(), })} - + )} )} diff --git a/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx b/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx index e5d368155d1..f442f0293df 100644 --- a/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx +++ b/src/channels/components/ChannelAllocationStrategy/ChannelAllocationStrategy.tsx @@ -2,7 +2,6 @@ import { DashboardCard } from "@dashboard/components/Card"; import PreviewPill from "@dashboard/components/PreviewPill"; import RadioGroupField from "@dashboard/components/RadioGroupField"; import { AllocationStrategyEnum, StockSettingsInput } from "@dashboard/graphql"; -import { Typography } from "@material-ui/core"; import HelpOutline from "@material-ui/icons/HelpOutline"; import { Text, Tooltip } from "@saleor/macaw-ui-next"; import React from "react"; @@ -51,7 +50,7 @@ const ChannelAllocationStrategy: React.FC = ({ + @@ -70,7 +69,7 @@ const ChannelAllocationStrategy: React.FC = ({ - + } choices={strategyOptions.map(option => ({ label: ( diff --git a/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx b/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx index 5d248c1fd0d..c7b50d6eef1 100644 --- a/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx +++ b/src/channels/components/ChannelDeleteDialog/ChannelDeleteDialog.tsx @@ -3,8 +3,7 @@ import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButto import { Select } from "@dashboard/components/Select"; import useStateFromProps from "@dashboard/hooks/useStateFromProps"; import { buttonMessages } from "@dashboard/intl"; -import { Typography } from "@material-ui/core"; -import { Option } from "@saleor/macaw-ui-next"; +import { Option, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -95,13 +94,13 @@ const ChannelDeleteDialog: React.FC = ({ {hasOrders ? ( hasChannels ? ( <> - {intl.formatMessage(messages.deletingAllProductData)} + {intl.formatMessage(messages.deletingAllProductData)}
- + {intl.formatMessage(messages.needToBeMoved)}
{intl.formatMessage(messages.note)} -
+
- + - +
)}
diff --git a/src/components/LanguageSwitch/LanguageSwitch.tsx b/src/components/LanguageSwitch/LanguageSwitch.tsx index 31feba2dbe9..1ec0045eab2 100644 --- a/src/components/LanguageSwitch/LanguageSwitch.tsx +++ b/src/components/LanguageSwitch/LanguageSwitch.tsx @@ -7,10 +7,10 @@ import { MenuList as Menu, Paper, Popper, - Typography, } from "@material-ui/core"; import ArrowDropDown from "@material-ui/icons/ArrowDropDown"; import { makeStyles } from "@saleor/macaw-ui"; +import { Text } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -69,7 +69,7 @@ const LanguageSwitch: React.FC = props => { className={classes.menuContainer} onClick={() => setExpandedState(!isExpanded)} > - {currentLanguage} + {currentLanguage} = props => { {children} ) : ( - + {children} - + )} ); diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx index fb10736f409..f1e7c08f427 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx @@ -2,9 +2,10 @@ import Debounce, { DebounceProps } from "@dashboard/components/Debounce"; import { fuzzySearch } from "@dashboard/misc"; import { FetchMoreProps } from "@dashboard/types"; -import { Popper, PopperPlacementType, TextField, Typography } from "@material-ui/core"; +import { Popper, PopperPlacementType, TextField } from "@material-ui/core"; import CloseIcon from "@material-ui/icons/Close"; import { ChevronIcon, IconButton } from "@saleor/macaw-ui"; +import { Text } from "@saleor/macaw-ui-next"; import clsx from "clsx"; import Downshift, { ControllerStateAndHelpers } from "downshift"; import React from "react"; @@ -223,7 +224,7 @@ const MultiAutocompleteSelectFieldComponent: React.FC< id={`selected-option-${value.label}`} >
- {value.label} + {value.label} - {add.label} + {add.label} )} {displayCustomValue && ( diff --git a/src/components/NotFoundPage/NotFoundPage.tsx b/src/components/NotFoundPage/NotFoundPage.tsx index bb77aac2967..3afa58aa0ed 100644 --- a/src/components/NotFoundPage/NotFoundPage.tsx +++ b/src/components/NotFoundPage/NotFoundPage.tsx @@ -1,7 +1,7 @@ import notFoundImage from "@assets/images/not-found-404.svg"; import { Button } from "@dashboard/components/Button"; -import { Typography } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; @@ -68,15 +68,15 @@ const NotFoundPage: React.FC = props => {
- + - - + + - - + + - +
- - - - - - )} - - + + + + + + {errors.length > 0 && ( + <> + + {errors.map((err, index) => ( + + {getOrderErrorMessage(err, intl)} + + ))} + + )} + + + + + + + + + + )} + + + ); }; -OrderFulfillmentAcceptDialog.displayName = "OrderFulfillmentAcceptDialog"; -export default OrderFulfillmentAcceptDialog; +OrderFulfillmentApproveDialog.displayName = "OrderFulfillmentApproveDialog"; +export default OrderFulfillmentApproveDialog; diff --git a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx index 7599f36789a..03639f2777f 100644 --- a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx +++ b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx @@ -3,7 +3,7 @@ import BackButton from "@dashboard/components/BackButton"; import { Combobox } from "@dashboard/components/Combobox"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; -import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; +import { DashboardModal } from "@dashboard/components/Modal"; import { OrderErrorFragment, WarehouseFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; @@ -62,7 +62,7 @@ const OrderFulfillmentCancelDialog: React.FC ); return ( - + -
- {({ change, data, submit }) => ( - <> - - - - + + + + {({ change, data, submit }) => ( + + + + + + {errors.length > 0 && ( <> {errors - .filter(err => !formFields.includes(err.field)) + .filter(err => err.field && !formFields.includes(err.field)) .map((err, index) => ( - + {getOrderErrorMessage(err, intl)} - + ))} )} - - - - - - - - - )} -
- + + + + + + + + + )} + +
+ ); }; diff --git a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx index 1d5addf6122..85a7d380e20 100644 --- a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx +++ b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx @@ -1,17 +1,12 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import FormSpacer from "@dashboard/components/FormSpacer"; +import { DashboardModal } from "@dashboard/components/Modal"; import { InvoiceErrorFragment, InvoiceFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { DialogProps } from "@dashboard/types"; import getInvoiceErrorMessage from "@dashboard/utils/errors/invoice"; -import { - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from "@material-ui/core"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -33,16 +28,17 @@ const OrderInvoiceEmailSendDialog: React.FC = const intl = useIntl(); return ( - - - {intl.formatMessage({ - id: "5JT4v2", - defaultMessage: "Send Invoice", - description: "dialog header", - })} - - - + + + + {intl.formatMessage({ + id: "5JT4v2", + defaultMessage: "Send Invoice", + description: "dialog header", + })} + + + = invoiceNumber: {invoice?.number}, }} /> - + + {errors.length > 0 && ( <> {errors.map((err, idx) => ( - + {getInvoiceErrorMessage(err, intl)} - + ))} )} - - - - - - - - + + + + + + + +
+ ); }; diff --git a/src/orders/components/OrderManualTransactionDialog/OrderManualTransactionDialog.tsx b/src/orders/components/OrderManualTransactionDialog/OrderManualTransactionDialog.tsx index 856073dd5a6..cc135991c2f 100644 --- a/src/orders/components/OrderManualTransactionDialog/OrderManualTransactionDialog.tsx +++ b/src/orders/components/OrderManualTransactionDialog/OrderManualTransactionDialog.tsx @@ -26,7 +26,7 @@ export const OrderManualTransactionDialog: React.FC - + diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index fa5fb7a4f1e..0ae144e8a67 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -41,7 +41,6 @@ const OrderMarkAsPaidDialog: React.FC = ({ })} onClose={onClose} onConfirm={onConfirm} - size="lg" > diff --git a/src/orders/components/OrderMetadataDialog/OrderMetadataDialog.tsx b/src/orders/components/OrderMetadataDialog/OrderMetadataDialog.tsx index 11dd0143a2e..03d5ef4b251 100644 --- a/src/orders/components/OrderMetadataDialog/OrderMetadataDialog.tsx +++ b/src/orders/components/OrderMetadataDialog/OrderMetadataDialog.tsx @@ -15,13 +15,7 @@ interface OrderMetadataDialogProps { export const OrderMetadataDialog = ({ onClose, open, data }: OrderMetadataDialogProps) => { return ( - + : {data?.productName ?? ""} diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 1c20db12570..5f4ca645f56 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -3,7 +3,7 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; import FormSpacer from "@dashboard/components/FormSpacer"; -import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; +import { DashboardModal } from "@dashboard/components/Modal"; import { OrderErrorFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; @@ -47,7 +47,7 @@ const OrderPaymentDialog: React.FC = ({ onSubmit={onSubmit} > {({ data, change, submit }) => ( - + {intl.formatMessage({ id: "+PbHKD", diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 7472c16def7..6ef0214df8e 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -2,7 +2,7 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import FormSpacer from "@dashboard/components/FormSpacer"; -import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; +import { DashboardModal } from "@dashboard/components/Modal"; import { OrderErrorFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; @@ -29,7 +29,7 @@ const OrderPaymentVoidDialog: React.FC = ({ return ( - + diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 2fdb97f5a57..63e5649d6b7 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -3,6 +3,7 @@ import BackButton from "@dashboard/components/BackButton"; import Checkbox from "@dashboard/components/Checkbox"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import FormSpacer from "@dashboard/components/FormSpacer"; +import { DashboardModal } from "@dashboard/components/Modal"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; import TableRowLink from "@dashboard/components/TableRowLink"; @@ -14,18 +15,8 @@ import { buttonMessages } from "@dashboard/intl"; import { maybe, renderCollection } from "@dashboard/misc"; import { FetchMoreProps, RelayToFlat } from "@dashboard/types"; import getOrderErrorMessage from "@dashboard/utils/errors/order"; -import { - CircularProgress, - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, - TableBody, - TableCell, - TextField, -} from "@material-ui/core"; -import { Text } from "@saleor/macaw-ui-next"; +import { CircularProgress, TableBody, TableCell, TextField } from "@material-ui/core"; +import { Box, Text } from "@saleor/macaw-ui-next"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; @@ -97,164 +88,168 @@ const OrderProductAddDialog: React.FC = props => { ); return ( - - - - - + + + + + + - - - , - }} - /> - - - - -
- } - scrollableTarget={scrollableTargetId} - > - - - {renderCollection( - productChoicesWithValidVariants, - (product, productIndex) => ( - - - - - onProductAdd( - product, - productIndex, - productsWithAllVariantsSelected, - variants, - setVariants, - ) - } + + + , + }} + /> + + + + + + + } + scrollableTarget={scrollableTargetId} + > + + + {renderCollection( + productChoicesWithValidVariants, + (product, productIndex) => ( + + + + + onProductAdd( + product, + productIndex, + productsWithAllVariantsSelected, + variants, + setVariants, + ) + } + /> + + product.thumbnail.url)} /> - - product.thumbnail.url)} - /> - - {maybe(() => product.name)} - - - {maybe(() => product.variants, []) - .filter(isValidVariant) - .map((variant, variantIndex) => ( - - - - - onVariantAdd( - variant, - variantIndex, - productIndex, - variants, - selectedVariantsToProductsMap, - setVariants, - ) - } - /> - - -
{variant.name}
- {variant.sku && ( -
- -
- )} -
- - - -
- ))} -
- ), - () => ( - - {query - ? intl.formatMessage(messages.noProductsInQuery) - : intl.formatMessage(messages.noProductsInChannel)} - - ), - )} -
-
- - {errors.length > 0 && ( - <> - - {errors.map((err, index) => ( - - {getOrderErrorMessage(err, intl)} - - ))} - - )} - - - - - - - - + + {maybe(() => product.name)} + + + {maybe(() => product.variants, []) + .filter(isValidVariant) + .map((variant, variantIndex) => ( + + + + + onVariantAdd( + variant, + variantIndex, + productIndex, + variants, + selectedVariantsToProductsMap, + setVariants, + ) + } + /> + + +
{variant.name}
+ {variant.sku && ( + + + + )} +
+ + + +
+ ))} + + ), + () => ( + + {query + ? intl.formatMessage(messages.noProductsInQuery) + : intl.formatMessage(messages.noProductsInChannel)} + + ), + )} + + + + {errors.length > 0 && ( + <> + + {errors.map((err, index) => ( + + {getOrderErrorMessage(err, intl)} + + ))} + + )} + + + + + + + + + + ); }; diff --git a/src/orders/components/OrderProductAddDialog/styles.ts b/src/orders/components/OrderProductAddDialog/styles.ts index f466f4b1b5c..97268258ce6 100644 --- a/src/orders/components/OrderProductAddDialog/styles.ts +++ b/src/orders/components/OrderProductAddDialog/styles.ts @@ -12,31 +12,6 @@ export const useStyles = makeStyles( colVariantCheckbox: { padding: 0, }, - noContentText: { - marginBottom: theme.spacing(3), - }, - content: { - overflowY: "auto", - paddingTop: 0, - maxHeight: "75vh", - marginBottom: theme.spacing(3), - }, - subtitle: { - padding: 0, - }, - grayText: { - color: theme.palette.text.disabled, - }, - loadMoreLoaderContainer: { - alignItems: "center", - display: "flex", - height: theme.spacing(3), - justifyContent: "center", - marginTop: theme.spacing(3), - }, - overflow: { - overflowY: "hidden", - }, productCheckboxCell: { "&:first-child": { paddingLeft: 0, @@ -50,9 +25,6 @@ export const useStyles = makeStyles( left: theme.spacing(), position: "relative", }, - wideCell: { - width: "100%", - }, }), { name: "OrderProductAddDialog" }, ); diff --git a/src/orders/components/OrderRefundDialog/OrderRefundDialog.tsx b/src/orders/components/OrderRefundDialog/OrderRefundDialog.tsx index c58681dca07..a9834fe48bd 100644 --- a/src/orders/components/OrderRefundDialog/OrderRefundDialog.tsx +++ b/src/orders/components/OrderRefundDialog/OrderRefundDialog.tsx @@ -27,7 +27,7 @@ export const OrderRefundDialog = ({ return ( - + {intl.formatMessage(orderRefundDialogMesages.title)} diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index a5aec122912..b80f1eac399 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -78,7 +78,7 @@ const OrderShippingMethodEditDialog: React.FC {({ change, data, submit }) => ( <> - + - + - + = ({ const errors = orderUpdate.opts.data?.orderUpdate.errors || []; + const hasOrderFulfillmentsFulfilled = order?.fulfillments.some( + fulfillment => fulfillment.status === FulfillmentStatus.FULFILLED, + ); + return ( <> = ({ /> fulfillment.status === FulfillmentStatus.FULFILLED, - ) - } + open={params.action === "cancel" && hasOrderFulfillmentsFulfilled} /> orderCancel.mutate({ diff --git a/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx b/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx index 17b3c4d8192..0a2eac80465 100644 --- a/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx +++ b/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx @@ -156,6 +156,10 @@ export const OrderUnconfirmedDetails: React.FC = ( const [transactionReference, setTransactionReference] = React.useState(""); const errors = orderUpdate.opts.data?.orderUpdate.errors || []; + const hasOrderFulfillmentsFulFilled = order?.fulfillments.some( + fulfillment => fulfillment.status === FulfillmentStatus.FULFILLED, + ); + return ( <> = ( fulfillment.status === FulfillmentStatus.FULFILLED, - ) - } + open={params.action === "cancel" && hasOrderFulfillmentsFulFilled} /> orderCancel.mutate({ diff --git a/src/pages/components/PageTypePickerDialog/PageTypePickerDialog.tsx b/src/pages/components/PageTypePickerDialog/PageTypePickerDialog.tsx index 651e068ebe1..63c2d95e565 100644 --- a/src/pages/components/PageTypePickerDialog/PageTypePickerDialog.tsx +++ b/src/pages/components/PageTypePickerDialog/PageTypePickerDialog.tsx @@ -42,7 +42,7 @@ const PageTypePickerDialog: React.FC = ({ return ( - + diff --git a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx index 051f47cc2aa..80c84f39046 100644 --- a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx +++ b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx @@ -2,29 +2,18 @@ import BackButton from "@dashboard/components/BackButton"; import CardSpacer from "@dashboard/components/CardSpacer"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; +import { DashboardModal } from "@dashboard/components/Modal"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import TableRowLink from "@dashboard/components/TableRowLink"; import { UserAvatar } from "@dashboard/components/UserAvatar"; import { SearchStaffMembersQuery } from "@dashboard/graphql"; -import useElementScroll, { isScrolledToBottom } from "@dashboard/hooks/useElementScroll"; import useSearchQuery from "@dashboard/hooks/useSearchQuery"; import { buttonMessages } from "@dashboard/intl"; import { getUserInitials, getUserName, renderCollection } from "@dashboard/misc"; import { DialogProps, FetchMoreProps, RelayToFlat, SearchPageProps } from "@dashboard/types"; -import { - Checkbox, - CircularProgress, - Dialog, - DialogActions, - DialogContent, - DialogTitle, - TableBody, - TableCell, - TextField, -} from "@material-ui/core"; +import { Checkbox, CircularProgress, TableBody, TableCell, TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import { Box, Skeleton, Text } from "@saleor/macaw-ui-next"; -import clsx from "clsx"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; @@ -116,6 +105,8 @@ function handleStaffMemberAssign( } } +const scrollableTargetId = "assignMemberScrollableDialog"; + const AssignMembersDialog: React.FC = ({ confirmButtonState, disabled, @@ -134,24 +125,14 @@ const AssignMembersDialog: React.FC = ({ const [selectedMembers, setSelectedMembers] = React.useState< RelayToFlat >([]); - const anchor = React.useRef(); - const scrollPosition = useElementScroll(anchor); - const dropShadow = !isScrolledToBottom(anchor, scrollPosition); return ( - - - - - + + + + + + = ({ }} disabled={disabled} /> - - - - {staffMembers?.length > 0 && } -
- -
- - } - height={400} - > - - - {renderCollection( - staffMembers, - member => { - if (!member) { - return null; - } - const isSelected = selectedMembers.some( - selectedMember => selectedMember.id === member.id, - ); + + + {staffMembers?.length > 0 && } +
+ +
+ + } + > + + + {renderCollection( + staffMembers, + member => { + if (!member) { + return null; + } - return ( - - - - handleStaffMemberAssign( - member, - isSelected, - selectedMembers, - setSelectedMembers, - ) - } - /> - - - - - - - {getUserName(member) || } - - {member ? ( - member.isActive ? ( - intl.formatMessage(messages.staffActive) - ) : ( - intl.formatMessage(messages.staffInactive) + const isSelected = selectedMembers.some( + selectedMember => selectedMember.id === member.id, + ); + + return ( + + + + handleStaffMemberAssign( + member, + isSelected, + selectedMembers, + setSelectedMembers, ) - ) : ( - - )} - - - - - ); - }, - () => - !loading && ( - - - - - - ), - )} - - -
-
- - - { - onSubmit(selectedMembers); - }} - > - - - -
+ } + /> + + + + + + + {getUserName(member) || } + + {member ? ( + member.isActive ? ( + intl.formatMessage(messages.staffActive) + ) : ( + intl.formatMessage(messages.staffInactive) + ) + ) : ( + + )} + + + + + ); + }, + () => + !loading && ( + + + + + + ), + )} + + + + + + + + { + onSubmit(selectedMembers); + }} + > + + + +
+
); }; diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx index 62ae2067ba7..285f75222bf 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx @@ -1,12 +1,12 @@ -// @ts-strict-ignore import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; +import { DashboardModal } from "@dashboard/components/Modal"; import { ConfigurationItemFragment, ConfigurationTypeFieldEnum } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { maybe } from "@dashboard/misc"; import { DialogProps } from "@dashboard/types"; -import { Dialog, DialogActions, DialogContent, DialogTitle, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import { Skeleton } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -33,51 +33,57 @@ const PluginSecretFieldDialog: React.FC = ({ }; return ( - - - {field ? ( - field.value === null ? ( - intl.formatMessage({ - id: "qCH2eZ", - defaultMessage: "Add Value to Authorization Field", - description: "header", - }) - ) : ( - intl.formatMessage({ - id: "Xy2T+y", - defaultMessage: "Edit Authorization Field", - description: "header", - }) - ) - ) : ( - - )} - -
- {({ change, data, submit }) => ( - <> - + + + + {({ change, data, submit }) => ( + + + {field ? ( + field.value === null ? ( + intl.formatMessage({ + id: "qCH2eZ", + defaultMessage: "Add Value to Authorization Field", + description: "header", + }) + ) : ( + intl.formatMessage({ + id: "Xy2T+y", + defaultMessage: "Edit Authorization Field", + description: "header", + }) + ) + ) : ( + + )} + + field.type) === ConfigurationTypeFieldEnum.PASSWORD && "password"} + type={ + maybe(() => field.type) === ConfigurationTypeFieldEnum.PASSWORD + ? "password" + : "text" + } value={data.value || ""} onChange={change} /> - - - - - - - - - )} -
-
+ + + + + + + + + )} + +
+
); }; diff --git a/src/products/components/ProductExportDialog/ExportDialogSettings.tsx b/src/products/components/ProductExportDialog/ExportDialogSettings.tsx index f6d5d2a34bc..672dcedd685 100644 --- a/src/products/components/ProductExportDialog/ExportDialogSettings.tsx +++ b/src/products/components/ProductExportDialog/ExportDialogSettings.tsx @@ -9,24 +9,11 @@ import { import { ChangeEvent } from "@dashboard/hooks/useForm"; import { getFormErrors } from "@dashboard/utils/errors"; import getExportErrorMessage from "@dashboard/utils/errors/export"; -import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; import { ExportSettingsInput } from "./types"; -const useStyles = makeStyles( - theme => ({ - hr: { - marginBottom: theme.spacing(3), - marginTop: theme.spacing(3), - }, - }), - { - name: "ExportDialogSettings", - }, -); - export type ExportItemsQuantity = Record<"all" | "filter", number>; export interface ExportScopeLabels { @@ -54,7 +41,6 @@ const ExportDialogSettings: React.FC = ({ exportScopeLabels, allowScopeSelection = true, }) => { - const classes = useStyles({}); const intl = useIntl(); const formErrors = getFormErrors(formFields, errors); const productExportTypeChoices: Array> = [ @@ -117,7 +103,7 @@ const ExportDialogSettings: React.FC = ({ onChange={onChange} value={data.scope} /> -
+
)} = ({ }; return ( - - <> - + + + - - - - {step === ProductExportStep.INFO && ( - - )} - {step === ProductExportStep.SETTINGS && ( - - )} - + + + + {step === ProductExportStep.INFO && ( + + )} + {step === ProductExportStep.SETTINGS && ( + + )} {notFormErrors.length > 0 && ( - + {notFormErrors.map(err => ( - + {getExportErrorMessage(err, intl)} ))} - + )} - + {step === ProductExportStep.INFO && ( + + + ); }; diff --git a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx index 64fe4d0eddc..b6dd2cebfee 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx @@ -89,7 +89,7 @@ const useStyles = makeStyles( marginBottom: theme.spacing(2), }, scrollArea: { - maxHeight: "calc(100vh - 350px)", + maxHeight: "calc(100vh - 390px)", minHeight: "auto", "@media (min-height: 800px)": { minHeight: 440, diff --git a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx index 7d335459033..e241b920609 100644 --- a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx +++ b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx @@ -1,9 +1,8 @@ import Form from "@dashboard/components/Form"; -import FormSpacer from "@dashboard/components/FormSpacer"; +import { DashboardModal } from "@dashboard/components/Modal"; import { ProductFragment } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import { buttonMessages } from "@dashboard/intl"; -import { Dialog, DialogActions, DialogContent, DialogTitle } from "@material-ui/core"; import { Button, Input, Text } from "@saleor/macaw-ui-next"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -41,16 +40,17 @@ const ProductExternalMediaDialog: React.FC = ({ }; return ( - - - - {intl.formatMessage(messages.buttonMessage)} - - -
- {({ change, data, submit }) => ( - <> - + + + + {({ change, data, submit }) => ( + + + + {intl.formatMessage(messages.buttonMessage)} + + + = ({ description="modal header" /> - + = ({ autoFocus size="medium" /> - - - - - - - )} -
-
+ + + + + + )} + + + ); }; diff --git a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx index a9367700087..f606c2f4884 100644 --- a/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx +++ b/src/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx @@ -1,30 +1,10 @@ -// @ts-strict-ignore import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; -import { - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from "@material-ui/core"; -import { makeStyles } from "@saleor/macaw-ui"; +import { DashboardModal } from "@dashboard/components/Modal"; +import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage } from "react-intl"; -const useStyles = makeStyles( - theme => ({ - deleteButton: { - "&:hover": { - backgroundColor: theme.palette.error.main, - }, - backgroundColor: theme.palette.error.main, - color: theme.palette.error.contrastText, - }, - }), - { name: "ProductVariantDeleteDialog" }, -); - export interface ProductVariantDeleteDialogProps { confirmButtonState: ConfirmButtonTransitionState; open: boolean; @@ -35,15 +15,19 @@ export interface ProductVariantDeleteDialogProps { const ProductVariantDeleteDialog: React.FC = props => { const { confirmButtonState, name, open, onConfirm, onClose } = props; - const classes = useStyles(props); return ( - - - - - - + + + + + + + = pr name, }} /> - - - - - - - - - + + + + + + + + + + ); }; diff --git a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx index 6a6ec0c978b..751fa2fdc77 100644 --- a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx +++ b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx @@ -1,16 +1,13 @@ -// @ts-strict-ignore import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton } from "@dashboard/components/ConfirmButton"; +import { DashboardModal } from "@dashboard/components/Modal"; import { ProductMediaFragment } from "@dashboard/graphql"; import useModalDialogOpen from "@dashboard/hooks/useModalDialogOpen"; import { buttonMessages } from "@dashboard/intl"; -import { Dialog, DialogActions, DialogContent, DialogTitle } from "@material-ui/core"; -import clsx from "clsx"; +import { Box } from "@saleor/macaw-ui-next"; import React, { useState } from "react"; import { FormattedMessage } from "react-intl"; -import { useStyles } from "./styles"; - interface ProductVariantImageSelectDialogProps { media?: ProductMediaFragment[]; selectedMedia?: string[]; @@ -21,7 +18,6 @@ interface ProductVariantImageSelectDialogProps { const ProductVariantMediaSelectDialog: React.FC = props => { const { media, open, selectedMedia: initialMedia, onClose, onConfirm } = props; - const classes = useStyles(props); const [selectedMedia, setSelectedMedia] = useState(initialMedia); useModalDialogOpen(open, { @@ -30,60 +26,87 @@ const ProductVariantMediaSelectDialog: React.FC { - const isMediaAssigned = selectedMedia.includes(id); + const isMediaAssigned = selectedMedia?.includes(id); if (isMediaAssigned) { - setSelectedMedia(selectedMedia => selectedMedia.filter(mediaId => mediaId !== id)); + setSelectedMedia(selectedMedia => selectedMedia?.filter(mediaId => mediaId !== id)); } else { - setSelectedMedia(selectedMedia => [...selectedMedia, id]); + setSelectedMedia(selectedMedia => [...(selectedMedia ?? []), id]); } }; const handleConfirm = () => { - onConfirm(selectedMedia); + onConfirm(selectedMedia ?? []); onClose(); }; return ( - - - - - -
+ + + + + + + {media - .sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1)) + ?.sort((prev, next) => (prev.sortOrder! > next.sortOrder! ? 1 : -1)) .map(mediaObj => { const parsedMediaOembedData = JSON.parse(mediaObj?.oembedData); const mediaUrl = parsedMediaOembedData?.thumbnail_url || mediaObj.url; + const isSelected = selectedMedia?.includes(mediaObj.id); return ( -
handleMediaSelect(mediaObj.id)} key={mediaObj.id} > - {mediaObj.alt} -
+ + ); })} -
-
- - - - - - -
+ + + + + + + + + + ); }; diff --git a/src/products/components/ProductVariantImageSelectDialog/styles.ts b/src/products/components/ProductVariantImageSelectDialog/styles.ts deleted file mode 100644 index f057cfb730f..00000000000 --- a/src/products/components/ProductVariantImageSelectDialog/styles.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { makeStyles } from "@saleor/macaw-ui"; -import { vars } from "@saleor/macaw-ui-next"; - -export const useStyles = makeStyles( - theme => ({ - image: { - height: "100%", - objectFit: "contain", - userSelect: "none", - width: "100%", - }, - imageContainer: { - background: "transparent", - border: `1px solid ${vars.colors.border.default1}`, - borderRadius: theme.spacing(), - cursor: "pointer", - height: theme.spacing(21.5), - overflow: "hidden", - padding: theme.spacing(2), - position: "relative", - transitionDuration: theme.transitions.duration.standard + "ms", - }, - content: { - overflowY: "scroll", - }, - root: { - display: "grid", - gridColumnGap: theme.spacing(2), - gridRowGap: theme.spacing(2), - gridTemplateColumns: "repeat(3, 1fr)", - maxWidth: "100%", - width: theme.breakpoints.values.lg, - [theme.breakpoints.down("sm")]: { - gridTemplateColumns: "repeat(2, 1fr)", - }, - }, - selectedImageContainer: { - borderColor: theme.palette.primary.main, - borderWidth: "2px", - }, - }), - { name: "ProductVariantImageSelectDialog" }, -); diff --git a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx index 5edeb8a18dc..a097ed9a636 100644 --- a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx +++ b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx @@ -4,6 +4,7 @@ import { Channel, isAvailableInChannel } from "@dashboard/channels/utils"; import BackButton from "@dashboard/components/BackButton"; import Checkbox from "@dashboard/components/Checkbox"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; +import { DashboardModal } from "@dashboard/components/Modal"; import ResponsiveTable from "@dashboard/components/ResponsiveTable"; import TableCellAvatar from "@dashboard/components/TableCellAvatar"; import TableRowLink from "@dashboard/components/TableRowLink"; @@ -11,24 +12,15 @@ import { SearchProductsQuery, ShippingPriceExcludeProductMutation } from "@dashb import useSearchQuery from "@dashboard/hooks/useSearchQuery"; import { renderCollection } from "@dashboard/misc"; import { FetchMoreProps, RelayToFlat } from "@dashboard/types"; -import { - CircularProgress, - Dialog, - DialogActions, - DialogContent, - DialogTitle, - TableBody, - TableCell, - TextField, -} from "@material-ui/core"; +import { CircularProgress, TableBody, TableCell, TextField } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; -import { Skeleton, Text } from "@saleor/macaw-ui-next"; +import { Box, Skeleton, Text } from "@saleor/macaw-ui-next"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( - theme => ({ + () => ({ avatar: { paddingLeft: 0, width: 64, @@ -36,19 +28,6 @@ const useStyles = makeStyles( colName: { paddingLeft: 0, }, - searchBar: { - marginBottom: theme.spacing(3), - }, - loadMoreLoaderContainer: { - alignItems: "center", - display: "flex", - height: theme.spacing(3), - justifyContent: "center", - marginTop: theme.spacing(3), - }, - overflow: { - overflowY: "visible", - }, productCheckboxCell: { "&:first-child": { paddingLeft: 0, @@ -83,6 +62,9 @@ const handleProductAssign = ( setSelectedProducts([...selectedProducts, product]); } }; + +const scrollableTargetId = "shippingMethodProductsAddScrollableDialog"; + const ShippingMethodProductsAddDialog: React.FC = ({ confirmButtonState, open, @@ -114,16 +96,17 @@ const ShippingMethodProductsAddDialog: React.FC - - - - -
+ + + + + + + , }} /> -
-
+ + + + -
+ } - height={450} > @@ -228,25 +219,26 @@ const ShippingMethodProductsAddDialog: React.FC -
- - - - - - - - + + + + + + + + + + ); }; diff --git a/src/shipping/components/ShippingWeightUnitDialog/ShippingWeightUnitDialog.tsx b/src/shipping/components/ShippingWeightUnitDialog/ShippingWeightUnitDialog.tsx index d05980a8a4f..c26021889f8 100644 --- a/src/shipping/components/ShippingWeightUnitDialog/ShippingWeightUnitDialog.tsx +++ b/src/shipping/components/ShippingWeightUnitDialog/ShippingWeightUnitDialog.tsx @@ -24,7 +24,7 @@ export const ShippingWeightUnitDialog: React.FC = }) => { return ( - + + -
- {({ data, change }) => { - const countrySelectionMap = getCountrySelectionMap(countries, data.countries); - const isRestOfTheWorldSelected = isRestWorldCountriesSelected( - restWorldCountries, - countrySelectionMap, - ); - const handleCountryChange = createCountryChangeHandler(data.countries, change); - const handleRestOfTheWorldChange = createRestOfTheWorldChangeHandler( - countrySelectionMap, - data.countries, - restWorldCountries, - change, - ); - const displayCountries = fuzzySearch(countries, data.query, ["country"]); - - return ( - <> - - - - + + + + {({ data, change }) => { + const countrySelectionMap = getCountrySelectionMap(countries, data.countries); + const isRestOfTheWorldSelected = isRestWorldCountriesSelected( + restWorldCountries, + countrySelectionMap, + ); + const handleCountryChange = createCountryChangeHandler(data.countries, change); + const handleRestOfTheWorldChange = createRestOfTheWorldChangeHandler( + countrySelectionMap, + data.countries, + restWorldCountries, + change, + ); + const displayCountries = fuzzySearch(countries, data.query, ["country"]); + + return ( + + + + + - + - +
- + {restWorldCountries.length > 0 && ( <> - + - )} + -
- - - - {displayCountries.map(country => { - const isChecked = countrySelectionMap[country.code]; - - return ( - handleCountryChange(country.code, !isChecked)} - key={country.code} - > - {country.country} - - - - - ); - })} - - - - - - - - - - - ); - }} -
- + + + + + {displayCountries.map(country => { + const isChecked = countrySelectionMap[country.code]; + + return ( + handleCountryChange(country.code, !isChecked)} + key={country.code} + > + {country.country} + + + + + ); + })} + + + + + + + + + + + + ); + }} + +
+
); }; diff --git a/src/shipping/components/ShippingZoneCountriesAssignDialog/handlers.ts b/src/shipping/components/ShippingZoneCountriesAssignDialog/handlers.ts index 3fd1a4cc646..e8dee90ad14 100644 --- a/src/shipping/components/ShippingZoneCountriesAssignDialog/handlers.ts +++ b/src/shipping/components/ShippingZoneCountriesAssignDialog/handlers.ts @@ -17,7 +17,7 @@ export function createCountryChangeHandler(selectedCountries: string[], change: } export function createRestOfTheWorldChangeHandler( - countrySelectionMap: Map, + countrySelectionMap: Record, selectedCountries: string[], restWorldCountries: string[], change: FormChange, diff --git a/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx b/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx index 9d5330d786e..d7809373dee 100644 --- a/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx +++ b/src/shipping/components/ShippingZonePostalCodeRangeDialog/ShippingZonePostalCodeRangeDialog.tsx @@ -2,10 +2,10 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; import Grid from "@dashboard/components/Grid"; +import { DashboardModal } from "@dashboard/components/Modal"; import { commonMessages } from "@dashboard/intl"; import { DialogProps, MinMax } from "@dashboard/types"; -import { Dialog, DialogActions, DialogContent, DialogTitle, TextField } from "@material-ui/core"; -import { makeStyles } from "@saleor/macaw-ui"; +import { TextField } from "@material-ui/core"; import { Text } from "@saleor/macaw-ui-next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -15,23 +15,12 @@ export interface ShippingZonePostalCodeRangeDialogProps extends DialogProps { onSubmit: (range: MinMax) => void; } -const useStyles = makeStyles( - theme => ({ - info: { - marginBottom: theme.spacing(2), - }, - }), - { - name: "ShippingZonePostalCodeRangeDialog", - }, -); const ShippingZonePostalCodeRangeDialog: React.FC = ({ confirmButtonState, open, onClose, onSubmit, }) => { - const classes = useStyles({}); const intl = useIntl(); const initial: MinMax = { max: "", @@ -39,24 +28,26 @@ const ShippingZonePostalCodeRangeDialog: React.FC - - - -
- {({ change, data }) => ( - <> - - + + + + {({ change, data }) => ( + + + + + + + - - - - - - - - - )} -
- + + + + + + + + + )} + + + ); }; diff --git a/src/shipping/handlers.ts b/src/shipping/handlers.ts index acf5e43c4fd..ef593cba9d8 100644 --- a/src/shipping/handlers.ts +++ b/src/shipping/handlers.ts @@ -279,24 +279,25 @@ export function getCountrySelectionMap( countries?: CountryFragment[], countriesSelected?: string[], ) { - return ( - countriesSelected && - countries?.reduce( - (acc, country) => { - acc[country.code] = !!countriesSelected.find( - selectedCountries => selectedCountries === country.code, - ); + if (!countriesSelected || !countries) { + return {} as Record; + } - return acc; - }, - {} as Map, - ) + return countries.reduce( + (acc, country) => { + acc[country.code] = !!countriesSelected.find( + selectedCountries => selectedCountries === country.code, + ); + + return acc; + }, + {} as Record, ); } export function isRestWorldCountriesSelected( restWorldCountries?: string[], - countrySelectionMap?: Map, + countrySelectionMap?: Record, ) { return ( countrySelectionMap && diff --git a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx index 7acf925fe20..cae269e0ad3 100644 --- a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx +++ b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx @@ -62,7 +62,7 @@ const StaffAddMemberDialog: React.FC = props => { onSubmit={onConfirm} > {({ change, data: formData, submit }) => ( - + = props => { type="text" value={formData.firstName} onChange={change} + fullWidth /> = props => { type="text" value={formData.lastName} onChange={change} + fullWidth /> diff --git a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx index 8faec70f099..e5e802a8696 100644 --- a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx +++ b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx @@ -2,7 +2,7 @@ import BackButton from "@dashboard/components/BackButton"; import { ConfirmButton, ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; -import { DASHBOARD_MODAL_WIDTH, DashboardModal } from "@dashboard/components/Modal"; +import { DashboardModal } from "@dashboard/components/Modal"; import { AccountErrorFragment } from "@dashboard/graphql"; import { SubmitPromise } from "@dashboard/hooks/useForm"; import useModalDialogErrors from "@dashboard/hooks/useModalDialogErrors"; @@ -43,7 +43,7 @@ const StaffPasswordResetDialog: React.FC = ({
{({ change, data }) => ( - + = ({ return ( - + diff --git a/src/utils/errors/order.ts b/src/utils/errors/order.ts index 9be0853e59b..a43df24fbfe 100644 --- a/src/utils/errors/order.ts +++ b/src/utils/errors/order.ts @@ -75,7 +75,10 @@ const messages = defineMessages({ }, }); -function getOrderErrorMessage(err: OrderErrorFragment, intl: IntlShape): string | undefined { +function getOrderErrorMessage( + err: OrderErrorFragment | undefined, + intl: IntlShape, +): string | undefined { if (err) { switch (err.code) { case OrderErrorCode.BILLING_ADDRESS_NOT_SET: From ce05ffba2619fa31f34741a1f6751fd5fa0bbaa8 Mon Sep 17 00:00:00 2001 From: Adrian Pilarczyk Date: Wed, 21 Aug 2024 10:59:01 +0200 Subject: [PATCH 059/264] Add name of applied voucher to order details (#5113) * fix: remove space from .env.template * feat: update discount type labels * changeset --------- Co-authored-by: Patryk Andrzejewski --- .changeset/chatty-years-nail.md | 5 +++++ .env.template | 2 +- src/orders/messages.ts | 9 +++++++-- src/orders/utils/data.test.ts | 29 ++++++++++++++++++++++++++--- src/orders/utils/data.ts | 12 ++++++++++-- 5 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 .changeset/chatty-years-nail.md diff --git a/.changeset/chatty-years-nail.md b/.changeset/chatty-years-nail.md new file mode 100644 index 00000000000..0db18957be8 --- /dev/null +++ b/.changeset/chatty-years-nail.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Order details page now displays the name of the applied voucher. diff --git a/.env.template b/.env.template index c8cbab7d31f..ca903286a99 100644 --- a/.env.template +++ b/.env.template @@ -1,7 +1,7 @@ API_URL=https://demo.saleor.io/graphql/ APP_MOUNT_URI=/ APPS_MARKETPLACE_API_URL=https://apps.saleor.io/api/v2/saleor-apps -LOCALE_CODE="EN" +LOCALE_CODE="EN" DEMO_MODE=false MAILPITURL=xxxx #For playwright diff --git a/src/orders/messages.ts b/src/orders/messages.ts index a0e939e2757..a79d7d766ff 100644 --- a/src/orders/messages.ts +++ b/src/orders/messages.ts @@ -26,8 +26,8 @@ export const orderDiscountTypeLabelMessages = defineMessages({ description: "staff added type order discount", }, voucher: { - id: "sEjRyz", - defaultMessage: "Voucher", + id: "l4o0ar", + defaultMessage: "Voucher: {voucherName}", description: "voucher type order discount", }, promotion: { @@ -35,6 +35,11 @@ export const orderDiscountTypeLabelMessages = defineMessages({ defaultMessage: "Promotion", description: "promotion type order discount", }, + sale: { + id: "a/JR9Y", + defaultMessage: "Sale", + description: "sale type order discount", + }, }); export const transactionEventTypeMap = defineMessages>({ diff --git a/src/orders/utils/data.test.ts b/src/orders/utils/data.test.ts index 84a60d76292..dc0d91186e6 100644 --- a/src/orders/utils/data.test.ts +++ b/src/orders/utils/data.test.ts @@ -2754,7 +2754,7 @@ describe("Merge repeated order lines of fulfillment lines", () => { ).toBe(2); }); }); -describe("Get discount type lable", () => { +describe("Get discount type label", () => { it("should return Staff added for manual discount", () => { // Arrange const discount = { @@ -2790,15 +2790,38 @@ describe("Get discount type lable", () => { // Assert expect(result).toBe("-"); }); - it("should return voucher when voucher discount type", () => { + it("should return voucher name formatting when voucher discount type", () => { // Arrange const discount = { type: OrderDiscountType.VOUCHER, + name: "Big sale", } as OrderDiscountFragment; // Act const result = getDiscountTypeLabel(discount, intlMock); // Assert - expect(result).toBe("Voucher"); + expect(result).toContain("Voucher:"); + }); + it("should return Sale discount for sale discount type", () => { + // Arrange + const discount = { + type: OrderDiscountType.SALE, + } as OrderDiscountFragment; + // Act + const result = getDiscountTypeLabel(discount, intlMock); + + // Assert + expect(result).toBe("Sale"); + }); + it("should return Promotion when promotion discount type", () => { + // Arrange + const discount = { + type: OrderDiscountType.PROMOTION, + } as OrderDiscountFragment; + // Act + const result = getDiscountTypeLabel(discount, intlMock); + + // Assert + expect(result).toBe("Promotion"); }); }); diff --git a/src/orders/utils/data.ts b/src/orders/utils/data.ts index ece07f2c19f..49a60686d07 100644 --- a/src/orders/utils/data.ts +++ b/src/orders/utils/data.ts @@ -468,7 +468,15 @@ export const getDiscountTypeLabel = (discount: OrderDiscountFragment, intl: Intl return intl.formatMessage(orderDiscountTypeLabelMessages.staffAdded); case OrderDiscountType.ORDER_PROMOTION: return getDiscountNameLabel(discount.name); - default: - return intl.formatMessage(orderDiscountTypeLabelMessages.voucher); + case OrderDiscountType.VOUCHER: + return intl.formatMessage(orderDiscountTypeLabelMessages.voucher, { + voucherName: discount.name, + }); + + case OrderDiscountType.PROMOTION: + return intl.formatMessage(orderDiscountTypeLabelMessages.promotion); + + case OrderDiscountType.SALE: + return intl.formatMessage(orderDiscountTypeLabelMessages.sale); } }; From efbca2b00c708ed4f7513e92244e8328e08b80f2 Mon Sep 17 00:00:00 2001 From: Patryk Andrzejewski Date: Wed, 21 Aug 2024 12:01:35 +0200 Subject: [PATCH 060/264] Fix translations for order details page (#5122) * Fix translations * Fix translations --- .changeset/rude-baboons-give.md | 5 +++++ locale/defaultMessages.json | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .changeset/rude-baboons-give.md diff --git a/.changeset/rude-baboons-give.md b/.changeset/rude-baboons-give.md new file mode 100644 index 00000000000..9f58e7fcaf1 --- /dev/null +++ b/.changeset/rude-baboons-give.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Now, missing translations are properly added to the order details. diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 3eacd3a21e5..1297c5e88c4 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -5831,6 +5831,10 @@ "context": "select option, button", "string": "Select" }, + "a/JR9Y": { + "context": "sale type order discount", + "string": "Sale" + }, "a/QJBx": { "context": "user action bar", "string": "Action" @@ -7463,6 +7467,10 @@ "context": "transaction event type, transaction was refunded to client", "string": "Refund" }, + "l4o0ar": { + "context": "voucher type order discount", + "string": "Voucher: {voucherName}" + }, "l5V0QT": { "context": "boolean attribute type", "string": "Boolean" @@ -8458,10 +8466,6 @@ "context": "button", "string": "OK" }, - "sEjRyz": { - "context": "voucher type order discount", - "string": "Voucher" - }, "sFynTT": { "context": "grant refund, refund card title", "string": "Refund" From 642e9f7cb593a8c8c7a1198be2bbaf7be34f6fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Wed, 21 Aug 2024 12:19:38 +0200 Subject: [PATCH 061/264] Unify money formatting (#5112) * Show negative discount * Add changeset --- .changeset/purple-lemons-smash.md | 5 ++ .../components/OrderPayment/OrderPayment.tsx | 3 +- .../components/OrderPayment/utils.test.ts | 47 +++++++++++++++++++ src/orders/components/OrderPayment/utils.ts | 13 +++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .changeset/purple-lemons-smash.md create mode 100644 src/orders/components/OrderPayment/utils.test.ts diff --git a/.changeset/purple-lemons-smash.md b/.changeset/purple-lemons-smash.md new file mode 100644 index 00000000000..2b2bac51010 --- /dev/null +++ b/.changeset/purple-lemons-smash.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Showing negative amount in order details has been aligned diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index eb9f9eafd51..679698781b6 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -17,6 +17,7 @@ import { useStyles } from "./styles"; import { extractOrderGiftCardUsedAmount, extractRefundedAmount, + getDiscountAmount, obtainUsedGifrcards, } from "./utils"; @@ -133,7 +134,7 @@ const OrderPayment: React.FC = props => {
- - +
))} diff --git a/src/orders/components/OrderPayment/utils.test.ts b/src/orders/components/OrderPayment/utils.test.ts new file mode 100644 index 00000000000..d728db9fa31 --- /dev/null +++ b/src/orders/components/OrderPayment/utils.test.ts @@ -0,0 +1,47 @@ +import { IMoney } from "@dashboard/utils/intl"; + +import { getDiscountAmount } from "./utils"; + +describe("getDiscountAmount", () => { + it("should return negative amount when amount greater than 0", () => { + // Arrange + const amount: IMoney = { + amount: 5, + currency: "USD", + }; + + // Act + const result = getDiscountAmount(amount); + + // Assert + expect(result).toEqual({ currency: "USD", amount: -5 }); + }); + + it("should return 0 when amount equal 0", () => { + // Arrange + const amount: IMoney = { + amount: 0, + currency: "USD", + }; + + // Act + const result = getDiscountAmount(amount); + + // Assert + expect(result).toEqual({ currency: "USD", amount: 0 }); + }); + + it("should return same amount when amount is negative", () => { + // Arrange + const amount: IMoney = { + amount: -4, + currency: "USD", + }; + + // Act + const result = getDiscountAmount(amount); + + // Assert + expect(result).toEqual({ currency: "USD", amount: -4 }); + }); +}); diff --git a/src/orders/components/OrderPayment/utils.ts b/src/orders/components/OrderPayment/utils.ts index fbb566d4ecf..e74bcc06d4b 100644 --- a/src/orders/components/OrderPayment/utils.ts +++ b/src/orders/components/OrderPayment/utils.ts @@ -69,3 +69,16 @@ export const extractRefundedAmount = (order: OrderDetailsFragment): IMoney => { } ); }; + +// Discount should be shown as negative number to give user +// clear information that this amount will be subtracted from total amount +export const getDiscountAmount = (amount: IMoney) => { + if (amount.amount <= 0) { + return amount; + } + + return { + ...amount, + amount: amount.amount * -1, + }; +}; From bbba0d2dc34c106cf377965ba8c4edc8106d35fb Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Wed, 21 Aug 2024 13:20:38 +0200 Subject: [PATCH 062/264] Fix visual issue in app permission edit list (#5115) --- .changeset/old-numbers-beam.md | 5 +++++ .../AppPermissionsDialogPermissionPicker.tsx | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .changeset/old-numbers-beam.md diff --git a/.changeset/old-numbers-beam.md b/.changeset/old-numbers-beam.md new file mode 100644 index 00000000000..fc12f16ed93 --- /dev/null +++ b/.changeset/old-numbers-beam.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now see permission edit list use default list color instead of accent blue color. diff --git a/src/apps/components/AppPermissionsDialog/AppPermissionsDialogPermissionPicker.tsx b/src/apps/components/AppPermissionsDialog/AppPermissionsDialogPermissionPicker.tsx index a717cdd422b..a71daca1631 100644 --- a/src/apps/components/AppPermissionsDialog/AppPermissionsDialogPermissionPicker.tsx +++ b/src/apps/components/AppPermissionsDialog/AppPermissionsDialogPermissionPicker.tsx @@ -55,12 +55,11 @@ export const AppPermissionsDialogPermissionPicker = ({ return ( {perm.name} From e5bfa12185d5572ce1b47a392c1d238153612cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chy=C5=82a?= Date: Thu, 22 Aug 2024 15:05:48 +0200 Subject: [PATCH 063/264] Dropdowns stays closed on focus (#5117) * Align dropdowns * Bump dev macaw * Change size and remove disableAutoFocus * Fix tests * Add changesets * Fix e2e tests * Fix e2e tests v2 * Bump macaw --- .changeset/odd-pumpkins-own.md | 5 + package-lock.json | 1393 ++++++++--------- package.json | 2 +- .../pages/dialogs/promotionRuleDialog.ts | 1 - playwright/pages/giftCardsPage.ts | 9 +- playwright/pages/variantsPage.ts | 1 - playwright/tests/discounts.spec.ts | 1 + playwright/tests/giftCards.spec.ts | 6 +- .../ChannelPickerDialog.tsx | 8 +- .../PageTypePickerDialog.tsx | 2 +- .../ProductOrganization.test.tsx | 4 +- .../ProductTypePickerDialog.tsx | 1 + 12 files changed, 682 insertions(+), 751 deletions(-) create mode 100644 .changeset/odd-pumpkins-own.md diff --git a/.changeset/odd-pumpkins-own.md b/.changeset/odd-pumpkins-own.md new file mode 100644 index 00000000000..7cc11f16c65 --- /dev/null +++ b/.changeset/odd-pumpkins-own.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now navigate on dropdown list. Dropdown stays close on focus. diff --git a/package-lock.json b/package-lock.json index a8b251acc29..6dafee8e0a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.7", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.8", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", @@ -1181,20 +1181,20 @@ } }, "node_modules/@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/runtime/node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/@babel/template": { "version": "7.24.0", @@ -2110,11 +2110,11 @@ } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", + "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", "dependencies": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -5525,34 +5525,30 @@ } }, "node_modules/@radix-ui/primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", - "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" }, "node_modules/@radix-ui/react-accordion": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.2.tgz", - "integrity": "sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.0.tgz", + "integrity": "sha512-HJOzSX8dQqtsp/3jVxCU3CXEONF7/2jlGAB28oX8TTw1Dz8JYbEI1UcL8355PuLBE41/IRRMvCw7VkiK/jcUOQ==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collapsible": "1.0.3", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collapsible": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5564,18 +5560,17 @@ } }, "node_modules/@radix-ui/react-arrow": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz", - "integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", + "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5587,25 +5582,24 @@ } }, "node_modules/@radix-ui/react-checkbox": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.0.4.tgz", - "integrity": "sha512-CBuGQa52aAYnADZVt/KBQzXrwx6TqnlwtcIPGtVt5JkkzQwMOLJjPukimhfKEr4GQNd43C+djUh5Ikopj8pSLg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.1.1.tgz", + "integrity": "sha512-0i/EKJ222Afa1FE0C6pNJxDq1itzcl3HChE9DwskA4th4KRse8ojx8a1nVcOjwJdbpDLcz7uol77yYnQNMHdKw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-previous": "1.0.1", - "@radix-ui/react-use-size": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5617,25 +5611,24 @@ } }, "node_modules/@radix-ui/react-collapsible": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.3.tgz", - "integrity": "sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.0.tgz", + "integrity": "sha512-zQY7Epa8sTL0mq4ajSJpjgn2YmCgyrG7RsQgLp3C0LQVkG7+Tf6Pv1CeNWZLyqMjhdPkBa5Lx7wYBeSu7uCSTA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5647,21 +5640,20 @@ } }, "node_modules/@radix-ui/react-collection": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", - "integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", + "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5673,15 +5665,12 @@ } }, "node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", - "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5690,15 +5679,12 @@ } }, "node_modules/@radix-ui/react-context": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz", - "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5707,31 +5693,30 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz", - "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5743,15 +5728,12 @@ } }, "node_modules/@radix-ui/react-direction": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", - "integrity": "sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5760,22 +5742,21 @@ } }, "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz", - "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-escape-keydown": "1.0.3" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5787,24 +5768,23 @@ } }, "node_modules/@radix-ui/react-dropdown-menu": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz", - "integrity": "sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.1.tgz", + "integrity": "sha512-y8E+x9fBq9qvteD2Zwa4397pUVhYsh9iq44b5RD5qu1GMJWBCBuVg1hMyItbc6+zH00TxGRqd9Iot4wzf3OoBQ==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-menu": "2.0.6", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-menu": "2.1.1", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5816,15 +5796,12 @@ } }, "node_modules/@radix-ui/react-focus-guards": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz", - "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5833,20 +5810,19 @@ } }, "node_modules/@radix-ui/react-focus-scope": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz", - "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5858,16 +5834,15 @@ } }, "node_modules/@radix-ui/react-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz", - "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5876,35 +5851,34 @@ } }, "node_modules/@radix-ui/react-menu": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.6.tgz", - "integrity": "sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-roving-focus": "1.0.4", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-callback-ref": "1.0.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.1.tgz", + "integrity": "sha512-oa3mXRRVjHi6DZu/ghuzdylyjaMXLymx83irM7hTxutQbD+7IhPKdMdRHD26Rm+kHRrWcrUkkRPv5pd47a2xFQ==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-callback-ref": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5916,32 +5890,31 @@ } }, "node_modules/@radix-ui/react-popover": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.7.tgz", - "integrity": "sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.1.tgz", + "integrity": "sha512-3y1A3isulwnWhvTTwmIreiB8CF4L+qRjZnK1wYLO7pplddzXKby/GnZ2M7OZY3qgnl6p9AodUIHRYGXNah8Y7g==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5953,27 +5926,26 @@ } }, "node_modules/@radix-ui/react-popper": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz", - "integrity": "sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", + "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==", "dependencies": { - "@babel/runtime": "^7.13.10", "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1", - "@radix-ui/react-use-rect": "1.0.1", - "@radix-ui/react-use-size": "1.0.1", - "@radix-ui/rect": "1.0.1" + "@radix-ui/react-arrow": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-rect": "1.1.0", + "@radix-ui/react-use-size": "1.1.0", + "@radix-ui/rect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -5985,18 +5957,18 @@ } }, "node_modules/@radix-ui/react-portal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz", - "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6008,19 +5980,18 @@ } }, "node_modules/@radix-ui/react-presence": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", - "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6032,18 +6003,17 @@ } }, "node_modules/@radix-ui/react-primitive": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", - "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-slot": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6055,27 +6025,26 @@ } }, "node_modules/@radix-ui/react-radio-group": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.1.3.tgz", - "integrity": "sha512-x+yELayyefNeKeTx4fjK6j99Fs6c4qKm3aY38G3swQVTN6xMpsrbigC0uHs2L//g8q4qR7qOcww8430jJmi2ag==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-roving-focus": "1.0.4", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-previous": "1.0.1", - "@radix-ui/react-use-size": "1.0.1" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.2.0.tgz", + "integrity": "sha512-yv+oiLaicYMBpqgfpSPw6q+RyXlLdIpQWDHZbUKURxe+nEh53hFXPPlfhfQQtYkS5MMK/5IWIa76SksleQZSzw==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6087,26 +6056,25 @@ } }, "node_modules/@radix-ui/react-roving-focus": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz", - "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz", + "integrity": "sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6118,16 +6086,15 @@ } }, "node_modules/@radix-ui/react-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", - "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6136,20 +6103,19 @@ } }, "node_modules/@radix-ui/react-toggle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.0.3.tgz", - "integrity": "sha512-Pkqg3+Bc98ftZGsl60CLANXQBBQ4W3mTFS9EJvNxKMZ7magklKV69/id1mlAlOFDDfHvlCms0fx8fA4CMKDJHg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.0.tgz", + "integrity": "sha512-gwoxaKZ0oJ4vIgzsfESBuSgJNdc0rv12VhHgcqN0TEJmmZixXG/2XpsLK8kzNWYcnaoRIEEQc0bEi3dIvdUpjw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6161,29 +6127,28 @@ } }, "node_modules/@radix-ui/react-tooltip": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz", - "integrity": "sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-visually-hidden": "1.0.3" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.1.2.tgz", + "integrity": "sha512-9XRsLwe6Yb9B/tlnYCPVUd/TFS4J7HuOZW345DCeC6vKIxQGMZdx21RK4VoZauPD5frgkXTYVS5y90L+3YBn4w==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-visually-hidden": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6195,15 +6160,12 @@ } }, "node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz", - "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6212,16 +6174,15 @@ } }, "node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz", - "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6230,16 +6191,15 @@ } }, "node_modules/@radix-ui/react-use-escape-keydown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz", - "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6248,15 +6208,12 @@ } }, "node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz", - "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6265,15 +6222,12 @@ } }, "node_modules/@radix-ui/react-use-previous": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.0.1.tgz", - "integrity": "sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", + "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6282,16 +6236,15 @@ } }, "node_modules/@radix-ui/react-use-rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz", - "integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", + "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/rect": "1.0.1" + "@radix-ui/rect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6300,16 +6253,15 @@ } }, "node_modules/@radix-ui/react-use-size": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz", - "integrity": "sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6318,18 +6270,17 @@ } }, "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz", - "integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz", + "integrity": "sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -6341,12 +6292,9 @@ } }, "node_modules/@radix-ui/rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz", - "integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", + "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==" }, "node_modules/@reach/auto-id": { "version": "0.16.0", @@ -6912,9 +6860,9 @@ }, "node_modules/@saleor/macaw-ui-next": { "name": "@saleor/macaw-ui", - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.7.tgz", - "integrity": "sha512-8C5rlFA7yQAhXqgcGfMk+Gd20/KZtGHY+UC7la0g0mqV6OYq5QmxyZEuLXFDZjPJ2yqMeKzXsI9ii72slo+hLw==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.8.tgz", + "integrity": "sha512-NFIIoBfHPmeiMg3gw8CPk8xf6zuBCx3Ww+jSMEuuBtMLQ2U01KLO9FmpfjiyZfWP/+Cz0papEgh/ecTEbJk6ZA==", "dependencies": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom": "^2.0.2", @@ -6929,11 +6877,11 @@ "@radix-ui/react-tooltip": "^1.0.6", "@vanilla-extract/css-utils": "^0.1.3", "@vanilla-extract/recipes": "^0.5.0", - "downshift": "^7.6.0" + "downshift": "^9.0.8" }, "engines": { - "node": "18 || 20", - "pnpm": ">=8" + "node": ">=20", + "pnpm": ">=9" }, "peerDependencies": { "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", @@ -6943,25 +6891,35 @@ } }, "node_modules/@saleor/macaw-ui-next/node_modules/compute-scroll-into-view": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-2.0.4.tgz", - "integrity": "sha512-y/ZA3BGnxoM/QHHQ2Uy49CLtnWPbt4tTPpEEZiEmmiWBFKjej7nEyH8Ryz54jH0MLXflUYA3Er2zUxPSJu5R+g==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==" }, "node_modules/@saleor/macaw-ui-next/node_modules/downshift": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/downshift/-/downshift-7.6.2.tgz", - "integrity": "sha512-iOv+E1Hyt3JDdL9yYcOgW7nZ7GQ2Uz6YbggwXvKUSleetYhU2nXD482Rz6CzvM4lvI1At34BYruKAL4swRGxaA==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/downshift/-/downshift-9.0.8.tgz", + "integrity": "sha512-59BWD7+hSUQIM1DeNPLirNNnZIO9qMdIK5GQ/Uo8q34gT4B78RBlb9dhzgnh0HfQTJj4T/JKYD8KoLAlMWnTsA==", "dependencies": { - "@babel/runtime": "^7.14.8", - "compute-scroll-into-view": "^2.0.4", - "prop-types": "^15.7.2", - "react-is": "^17.0.2", - "tslib": "^2.3.0" + "@babel/runtime": "^7.24.5", + "compute-scroll-into-view": "^3.1.0", + "prop-types": "^15.8.1", + "react-is": "18.2.0", + "tslib": "^2.6.2" }, "peerDependencies": { "react": ">=16.12.0" } }, + "node_modules/@saleor/macaw-ui-next/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/@saleor/macaw-ui-next/node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, "node_modules/@saleor/sdk": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.6.0.tgz", @@ -8828,9 +8786,9 @@ "integrity": "sha512-PZAcHROlgtCUGI2y0JntdNwvPwCNyeVnkQu6KTYKdmxBbK3w72XJUmLFYapfaFfgami4I9CTLnrJTPdtmS3gpw==" }, "node_modules/@vanilla-extract/recipes": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@vanilla-extract/recipes/-/recipes-0.5.0.tgz", - "integrity": "sha512-NfdZ8XyqCDG2RsO3FmYPALDMKg5045dRD97NbBb0Fog3LMDVXZxYgDOct5FAWob8U6W4GbhVpRZt1X9hNnH6fA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@vanilla-extract/recipes/-/recipes-0.5.5.tgz", + "integrity": "sha512-VadU7+IFUwLNLMgks29AHav/K5h7DOEfTU91RItn5vwdPfzduodNg317YbgWCcpm7FSXkuR3B3X8ZOi95UOozA==", "peerDependencies": { "@vanilla-extract/css": "^1.0.0" } @@ -9259,9 +9217,9 @@ } }, "node_modules/aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", "dependencies": { "tslib": "^2.0.0" }, @@ -21153,10 +21111,11 @@ } }, "node_modules/react-remove-scroll": { - "version": "2.5.5", - "license": "MIT", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", "dependencies": { - "react-remove-scroll-bar": "^2.3.3", + "react-remove-scroll-bar": "^2.3.4", "react-style-singleton": "^2.2.1", "tslib": "^2.1.0", "use-callback-ref": "^1.3.0", @@ -25614,17 +25573,17 @@ } }, "@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "dependencies": { "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" } } }, @@ -26417,11 +26376,11 @@ } }, "@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", + "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", "requires": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.0.0" } }, "@floating-ui/react-dom-interactions": { @@ -28957,431 +28916,379 @@ } }, "@radix-ui/primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", - "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" }, "@radix-ui/react-accordion": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.2.tgz", - "integrity": "sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.0.tgz", + "integrity": "sha512-HJOzSX8dQqtsp/3jVxCU3CXEONF7/2jlGAB28oX8TTw1Dz8JYbEI1UcL8355PuLBE41/IRRMvCw7VkiK/jcUOQ==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collapsible": "1.0.3", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collapsible": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" } }, "@radix-ui/react-arrow": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz", - "integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", + "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0" } }, "@radix-ui/react-checkbox": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.0.4.tgz", - "integrity": "sha512-CBuGQa52aAYnADZVt/KBQzXrwx6TqnlwtcIPGtVt5JkkzQwMOLJjPukimhfKEr4GQNd43C+djUh5Ikopj8pSLg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.1.1.tgz", + "integrity": "sha512-0i/EKJ222Afa1FE0C6pNJxDq1itzcl3HChE9DwskA4th4KRse8ojx8a1nVcOjwJdbpDLcz7uol77yYnQNMHdKw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-previous": "1.0.1", - "@radix-ui/react-use-size": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" } }, "@radix-ui/react-collapsible": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.3.tgz", - "integrity": "sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.0.tgz", + "integrity": "sha512-zQY7Epa8sTL0mq4ajSJpjgn2YmCgyrG7RsQgLp3C0LQVkG7+Tf6Pv1CeNWZLyqMjhdPkBa5Lx7wYBeSu7uCSTA==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-collection": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", - "integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", + "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0" } }, "@radix-ui/react-compose-refs": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", - "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==" }, "@radix-ui/react-context": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz", - "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==" }, "@radix-ui/react-dialog": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz", - "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==", - "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", + "requires": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" } }, "@radix-ui/react-direction": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", - "integrity": "sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==" }, "@radix-ui/react-dismissable-layer": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz", - "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-escape-keydown": "1.0.3" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" } }, "@radix-ui/react-dropdown-menu": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz", - "integrity": "sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.1.tgz", + "integrity": "sha512-y8E+x9fBq9qvteD2Zwa4397pUVhYsh9iq44b5RD5qu1GMJWBCBuVg1hMyItbc6+zH00TxGRqd9Iot4wzf3OoBQ==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-menu": "2.0.6", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-menu": "2.1.1", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" } }, "@radix-ui/react-focus-guards": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz", - "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==" }, "@radix-ui/react-focus-scope": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz", - "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" } }, "@radix-ui/react-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz", - "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-menu": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.6.tgz", - "integrity": "sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==", - "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-roving-focus": "1.0.4", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-callback-ref": "1.0.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.1.tgz", + "integrity": "sha512-oa3mXRRVjHi6DZu/ghuzdylyjaMXLymx83irM7hTxutQbD+7IhPKdMdRHD26Rm+kHRrWcrUkkRPv5pd47a2xFQ==", + "requires": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-callback-ref": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" } }, "@radix-ui/react-popover": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.7.tgz", - "integrity": "sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==", - "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.1.tgz", + "integrity": "sha512-3y1A3isulwnWhvTTwmIreiB8CF4L+qRjZnK1wYLO7pplddzXKby/GnZ2M7OZY3qgnl6p9AodUIHRYGXNah8Y7g==", + "requires": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" } }, "@radix-ui/react-popper": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz", - "integrity": "sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", + "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==", "requires": { - "@babel/runtime": "^7.13.10", "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1", - "@radix-ui/react-use-rect": "1.0.1", - "@radix-ui/react-use-size": "1.0.1", - "@radix-ui/rect": "1.0.1" + "@radix-ui/react-arrow": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-rect": "1.1.0", + "@radix-ui/react-use-size": "1.1.0", + "@radix-ui/rect": "1.1.0" } }, "@radix-ui/react-portal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz", - "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-presence": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", - "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-primitive": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", - "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.2" + "@radix-ui/react-slot": "1.1.0" } }, "@radix-ui/react-radio-group": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.1.3.tgz", - "integrity": "sha512-x+yELayyefNeKeTx4fjK6j99Fs6c4qKm3aY38G3swQVTN6xMpsrbigC0uHs2L//g8q4qR7qOcww8430jJmi2ag==", - "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-roving-focus": "1.0.4", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-use-previous": "1.0.1", - "@radix-ui/react-use-size": "1.0.1" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.2.0.tgz", + "integrity": "sha512-yv+oiLaicYMBpqgfpSPw6q+RyXlLdIpQWDHZbUKURxe+nEh53hFXPPlfhfQQtYkS5MMK/5IWIa76SksleQZSzw==", + "requires": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" } }, "@radix-ui/react-roving-focus": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz", - "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz", + "integrity": "sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-collection": "1.0.3", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-direction": "1.0.1", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" } }, "@radix-ui/react-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", - "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0" } }, "@radix-ui/react-toggle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.0.3.tgz", - "integrity": "sha512-Pkqg3+Bc98ftZGsl60CLANXQBBQ4W3mTFS9EJvNxKMZ7magklKV69/id1mlAlOFDDfHvlCms0fx8fA4CMKDJHg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.0.tgz", + "integrity": "sha512-gwoxaKZ0oJ4vIgzsfESBuSgJNdc0rv12VhHgcqN0TEJmmZixXG/2XpsLK8kzNWYcnaoRIEEQc0bEi3dIvdUpjw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-controllable-state": "1.0.1" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" } }, "@radix-ui/react-tooltip": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz", - "integrity": "sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw==", - "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", - "@radix-ui/react-visually-hidden": "1.0.3" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.1.2.tgz", + "integrity": "sha512-9XRsLwe6Yb9B/tlnYCPVUd/TFS4J7HuOZW345DCeC6vKIxQGMZdx21RK4VoZauPD5frgkXTYVS5y90L+3YBn4w==", + "requires": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-visually-hidden": "1.1.0" } }, "@radix-ui/react-use-callback-ref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz", - "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==" }, "@radix-ui/react-use-controllable-state": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz", - "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" } }, "@radix-ui/react-use-escape-keydown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz", - "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-use-callback-ref": "1.1.0" } }, "@radix-ui/react-use-layout-effect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz", - "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==" }, "@radix-ui/react-use-previous": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.0.1.tgz", - "integrity": "sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", + "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==" }, "@radix-ui/react-use-rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz", - "integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", + "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/rect": "1.0.1" + "@radix-ui/rect": "1.1.0" } }, "@radix-ui/react-use-size": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz", - "integrity": "sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.1" + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-visually-hidden": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz", - "integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz", + "integrity": "sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0" } }, "@radix-ui/rect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz", - "integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==", - "requires": { - "@babel/runtime": "^7.13.10" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", + "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==" }, "@reach/auto-id": { "version": "0.16.0", @@ -29751,9 +29658,9 @@ } }, "@saleor/macaw-ui-next": { - "version": "npm:@saleor/macaw-ui@1.1.7", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.7.tgz", - "integrity": "sha512-8C5rlFA7yQAhXqgcGfMk+Gd20/KZtGHY+UC7la0g0mqV6OYq5QmxyZEuLXFDZjPJ2yqMeKzXsI9ii72slo+hLw==", + "version": "npm:@saleor/macaw-ui@1.1.8", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.8.tgz", + "integrity": "sha512-NFIIoBfHPmeiMg3gw8CPk8xf6zuBCx3Ww+jSMEuuBtMLQ2U01KLO9FmpfjiyZfWP/+Cz0papEgh/ecTEbJk6ZA==", "requires": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom": "^2.0.2", @@ -29768,25 +29675,35 @@ "@radix-ui/react-tooltip": "^1.0.6", "@vanilla-extract/css-utils": "^0.1.3", "@vanilla-extract/recipes": "^0.5.0", - "downshift": "^7.6.0" + "downshift": "^9.0.8" }, "dependencies": { "compute-scroll-into-view": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-2.0.4.tgz", - "integrity": "sha512-y/ZA3BGnxoM/QHHQ2Uy49CLtnWPbt4tTPpEEZiEmmiWBFKjej7nEyH8Ryz54jH0MLXflUYA3Er2zUxPSJu5R+g==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==" }, "downshift": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/downshift/-/downshift-7.6.2.tgz", - "integrity": "sha512-iOv+E1Hyt3JDdL9yYcOgW7nZ7GQ2Uz6YbggwXvKUSleetYhU2nXD482Rz6CzvM4lvI1At34BYruKAL4swRGxaA==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/downshift/-/downshift-9.0.8.tgz", + "integrity": "sha512-59BWD7+hSUQIM1DeNPLirNNnZIO9qMdIK5GQ/Uo8q34gT4B78RBlb9dhzgnh0HfQTJj4T/JKYD8KoLAlMWnTsA==", "requires": { - "@babel/runtime": "^7.14.8", - "compute-scroll-into-view": "^2.0.4", - "prop-types": "^15.7.2", - "react-is": "^17.0.2", - "tslib": "^2.3.0" + "@babel/runtime": "^7.24.5", + "compute-scroll-into-view": "^3.1.0", + "prop-types": "^15.8.1", + "react-is": "18.2.0", + "tslib": "^2.6.2" } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" } } }, @@ -31073,9 +30990,9 @@ "integrity": "sha512-PZAcHROlgtCUGI2y0JntdNwvPwCNyeVnkQu6KTYKdmxBbK3w72XJUmLFYapfaFfgami4I9CTLnrJTPdtmS3gpw==" }, "@vanilla-extract/recipes": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@vanilla-extract/recipes/-/recipes-0.5.0.tgz", - "integrity": "sha512-NfdZ8XyqCDG2RsO3FmYPALDMKg5045dRD97NbBb0Fog3LMDVXZxYgDOct5FAWob8U6W4GbhVpRZt1X9hNnH6fA==" + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@vanilla-extract/recipes/-/recipes-0.5.5.tgz", + "integrity": "sha512-VadU7+IFUwLNLMgks29AHav/K5h7DOEfTU91RItn5vwdPfzduodNg317YbgWCcpm7FSXkuR3B3X8ZOi95UOozA==" }, "@vitejs/plugin-react-swc": { "version": "3.2.0", @@ -31387,9 +31304,9 @@ "dev": true }, "aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", "requires": { "tslib": "^2.0.0" } @@ -39387,9 +39304,11 @@ } }, "react-remove-scroll": { - "version": "2.5.5", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", "requires": { - "react-remove-scroll-bar": "^2.3.3", + "react-remove-scroll-bar": "^2.3.4", "react-style-singleton": "^2.2.1", "tslib": "^2.1.0", "use-callback-ref": "^1.3.0", diff --git a/package.json b/package.json index 093bec37dee..cb917ac2cbf 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.7", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.8", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", diff --git a/playwright/pages/dialogs/promotionRuleDialog.ts b/playwright/pages/dialogs/promotionRuleDialog.ts index eadb674d89b..05b36a99247 100644 --- a/playwright/pages/dialogs/promotionRuleDialog.ts +++ b/playwright/pages/dialogs/promotionRuleDialog.ts @@ -86,7 +86,6 @@ export class PromotionRuleDialog { } async selectPredicate(predicate: string, index = 0) { - await this.page.getByTestId(`condition-name-${index}`).click(); await this.page.getByRole("option", { name: predicate, exact: true }).click(); } diff --git a/playwright/pages/giftCardsPage.ts b/playwright/pages/giftCardsPage.ts index ffc403a2515..604e6a4ad19 100644 --- a/playwright/pages/giftCardsPage.ts +++ b/playwright/pages/giftCardsPage.ts @@ -97,8 +97,15 @@ export class GiftCardsPage extends BasePage { await this.showMoreMenuButton.click(); } - async addTag() { + async openTagInput() { await this.tagsInput.click(); + } + + async closeTagInput() { + await this.tagsInput.blur(); + } + + async selectFirstTag() { await this.tagsInputOptions.first().click(); } diff --git a/playwright/pages/variantsPage.ts b/playwright/pages/variantsPage.ts index 566a3b05dc7..77ae72d2fd9 100644 --- a/playwright/pages/variantsPage.ts +++ b/playwright/pages/variantsPage.ts @@ -122,7 +122,6 @@ export class VariantsPage { async selectLastAttributeValue() { await this.attributeSelector.locator("input").clear(); - await this.attributeSelector.click(); await this.attributeOption.last().click(); } diff --git a/playwright/tests/discounts.spec.ts b/playwright/tests/discounts.spec.ts index 252bedd9c9a..c731a626bb1 100644 --- a/playwright/tests/discounts.spec.ts +++ b/playwright/tests/discounts.spec.ts @@ -264,6 +264,7 @@ for (const rule of orderRules) { if (await discounts.promotionRuleDialog.ruleConditionRow.isVisible()) { await discounts.promotionRuleDialog.clickAddRuleConditionButton(); + await discounts.promotionRuleDialog.clickRuleConditionPredicateDropdown(); await discounts.promotionRuleDialog.selectPredicate("Total price", 1); await discounts.promotionRuleDialog.typeRuleConditionValue("13.33", 1); await discounts.promotionRuleDialog.typeRewardValue("1.00"); diff --git a/playwright/tests/giftCards.spec.ts b/playwright/tests/giftCards.spec.ts index 5bed73065ed..5e6c4e81495 100644 --- a/playwright/tests/giftCards.spec.ts +++ b/playwright/tests/giftCards.spec.ts @@ -85,8 +85,10 @@ test("TC: SALEOR_109 Activate gift card @e2e @gift", async () => { }); test("TC: SALEOR_110 Edit gift card @e2e @gift", async () => { await giftCardsPage.gotoExistingGiftCardView(GIFT_CARDS.giftCardToBeEdited.id); - await giftCardsPage.addTag(); - await giftCardsPage.addTag(); + await giftCardsPage.openTagInput(); + await giftCardsPage.selectFirstTag(); + await giftCardsPage.selectFirstTag(); + await giftCardsPage.closeTagInput(); await giftCardsPage.clickCardExpiresCheckbox(); await giftCardsPage.metadataSeoPage.expandAndAddAllMetadata(); await giftCardsPage.clickSaveButton(); diff --git a/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx b/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx index 671dfc0bb36..aea5f792a91 100644 --- a/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx +++ b/src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx @@ -3,9 +3,8 @@ import { Combobox } from "@dashboard/components/Combobox"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import useChoiceSearch from "@dashboard/hooks/useChoiceSearch"; import useModalDialogOpen from "@dashboard/hooks/useModalDialogOpen"; -import useStateFromProps from "@dashboard/hooks/useStateFromProps"; import { Option } from "@saleor/macaw-ui-next"; -import React from "react"; +import React, { useState } from "react"; import { useIntl } from "react-intl"; import { messages } from "./messages"; @@ -28,9 +27,7 @@ const ChannelPickerDialog: React.FC = ({ onConfirm, }) => { const intl = useIntl(); - const [choice, setChoice] = useStateFromProps( - defaultChoice || (channelsChoices.length ? channelsChoices[0].value : ""), - ); + const [choice, setChoice] = useState(""); const { result, search } = useChoiceSearch(channelsChoices); useModalDialogOpen(open, { @@ -47,6 +44,7 @@ const ChannelPickerDialog: React.FC = ({ onClose={onClose} onConfirm={() => onConfirm(choice)} title={intl.formatMessage(messages.selectChannel)} + size="xs" > = ({ return ( - + diff --git a/src/products/components/ProductOrganization/ProductOrganization.test.tsx b/src/products/components/ProductOrganization/ProductOrganization.test.tsx index 96204b30b0c..f52546cbc74 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.test.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.test.tsx @@ -138,7 +138,7 @@ describe("Products ProductOrganization", () => { expanded: false, })[0]; // get the first combobox - categories - fireEvent.focus(labelElement!); + fireEvent.click(labelElement!); // Assert expect(labelElement).toBeInTheDocument(); @@ -182,7 +182,7 @@ describe("Products ProductOrganization", () => { expanded: false, })[0]; // get the first combobox - categories - fireEvent.focus(labelElement!); + fireEvent.click(labelElement!); // Assert expect(labelElement).toBeInTheDocument(); diff --git a/src/products/components/ProductTypePickerDialog/ProductTypePickerDialog.tsx b/src/products/components/ProductTypePickerDialog/ProductTypePickerDialog.tsx index e483980d65f..08817cbe6a3 100644 --- a/src/products/components/ProductTypePickerDialog/ProductTypePickerDialog.tsx +++ b/src/products/components/ProductTypePickerDialog/ProductTypePickerDialog.tsx @@ -51,6 +51,7 @@ const ProductTypePickerDialog: React.FC = ({ onConfirm={() => onConfirm(choice)} title={intl.formatMessage(messages.selectProductType)} disabled={!choice} + size="xs" > Date: Mon, 26 Aug 2024 14:21:57 +0200 Subject: [PATCH 064/264] Migrate App install error page to new Macaw (#5130) --- .changeset/tiny-starfishes-count.md | 5 ++ .../AppInstallErrorPage.tsx | 76 +++++++++++++------ .../components/AppInstallErrorPage/styles.ts | 26 ------- 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 .changeset/tiny-starfishes-count.md delete mode 100644 src/apps/components/AppInstallErrorPage/styles.ts diff --git a/.changeset/tiny-starfishes-count.md b/.changeset/tiny-starfishes-count.md new file mode 100644 index 00000000000..68789d565ac --- /dev/null +++ b/.changeset/tiny-starfishes-count.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +App install error page now uses macaw-ui-next styles meaning that MaterialUI is no longer used in this view. diff --git a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx index b63f9a69a39..8b055ca3550 100644 --- a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx +++ b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx @@ -1,39 +1,65 @@ import errorImg from "@assets/images/app-install-error.svg"; -import { Button } from "@dashboard/components/Button"; -import Container from "@dashboard/components/Container"; -import { Grid } from "@material-ui/core"; -import { Text } from "@saleor/macaw-ui-next"; +import { Box, Button, sprinkles, Text } from "@saleor/macaw-ui-next"; import React from "react"; +import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; import messages from "./messages"; -import { useStyles } from "./styles"; interface AppInstallErrorPageProps { onBack: () => void; } export const AppInstallErrorPage: React.FC = ({ onBack }) => { - const classes = useStyles(); - return ( - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + ); }; diff --git a/src/apps/components/AppInstallErrorPage/styles.ts b/src/apps/components/AppInstallErrorPage/styles.ts deleted file mode 100644 index 270150971a3..00000000000 --- a/src/apps/components/AppInstallErrorPage/styles.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { makeStyles } from "@saleor/macaw-ui"; - -export const useStyles = makeStyles( - theme => ({ - button: { - marginTop: theme.spacing(2), - padding: theme.spacing(1.5, 2), - }, - root: { - "& > div": { - minHeight: "80vh", - }, - "& h3": { - fontWeight: 600, - marginBottom: theme.spacing(3), - maxWidth: theme.spacing(60), - }, - "& img": { - maxWidth: "100%", - }, - }, - }), - { - name: "AppInstallErrorPage", - }, -); From 037c67cb2a81a223830686d44ac9701c008ca111 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Mon, 26 Aug 2024 15:11:17 +0200 Subject: [PATCH 065/264] Fix stock warehouse message in product and variant forms (#5126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix stock warehouse message in product and variant forms * extract json messages * extract component and add tests * small refactor * small fix --------- Co-authored-by: Paweł Chyła --- .changeset/rude-impalas-live.md | 5 ++ locale/defaultMessages.json | 8 +++ .../ProductCreatePage/ProductCreatePage.tsx | 1 + .../ProductStocks/ProductStocks.test.tsx | 41 ++++++++++++++ .../ProductStocks/ProductStocks.tsx | 29 +++------- .../WarehouseInformationMessage.tsx | 56 +++++++++++++++++++ .../components/ProductStocks/messages.ts | 10 ++++ .../ProductVariantCreatePage.tsx | 1 + .../ProductVariantPage/ProductVariantPage.tsx | 1 + 9 files changed, 132 insertions(+), 20 deletions(-) create mode 100644 .changeset/rude-impalas-live.md create mode 100644 src/products/components/ProductStocks/ProductStocks.test.tsx create mode 100644 src/products/components/ProductStocks/WarehouseInformationMessage.tsx diff --git a/.changeset/rude-impalas-live.md b/.changeset/rude-impalas-live.md new file mode 100644 index 00000000000..6b9c087986a --- /dev/null +++ b/.changeset/rude-impalas-live.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +The stock settings no longer show a message that you need to create a warehouse when warehouses are already configured. diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 1297c5e88c4..463e5bf3cef 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -2016,6 +2016,10 @@ "context": "sale status", "string": "Scheduled" }, + "BaxGjT": { + "context": "variant stocks section subtitle", + "string": "Assigning the stocks will be possible after the variant is saved." + }, "BbP+k3": { "context": "variant availability in channel", "string": "Available" @@ -7577,6 +7581,10 @@ "lfXze9": { "string": "Delete vouchers" }, + "lhfPkc": { + "context": "variant stocks section subtitle", + "string": "Assigning the stocks will be possible after the product is saved." + }, "li1BBk": { "context": "export items as csv file", "string": "Plain CSV file" diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 79f135d340f..b14955daac2 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -277,6 +277,7 @@ export const ProductCreatePage: React.FC = ({ onWarehouseStockAdd={handlers.addStock} onWarehouseStockDelete={handlers.deleteStock} onWarehouseConfigure={onWarehouseConfigure} + isCreate={true} /> )} diff --git a/src/products/components/ProductStocks/ProductStocks.test.tsx b/src/products/components/ProductStocks/ProductStocks.test.tsx new file mode 100644 index 00000000000..a17a9699b94 --- /dev/null +++ b/src/products/components/ProductStocks/ProductStocks.test.tsx @@ -0,0 +1,41 @@ +import { render } from "@testing-library/react"; +import React from "react"; + +import { messages } from "./messages"; +import { WarehouseInformationMessage } from "./WarehouseInformationMessage"; + +jest.mock("react-intl", () => ({ + defineMessages: jest.fn(x => x), + FormattedMessage: ({ defaultMessage }: { defaultMessage: string }) => <>{defaultMessage}, +})); + +describe("WarehouseInformationMessage", () => { + const defaultProps = { + hasVariants: false, + hasWarehouses: false, + onWarehouseConfigure: jest.fn(), + }; + + it("should render message for creating product", () => { + const { getByText } = render(); + + expect(getByText(messages.warehouseMessageProductOnCreate.defaultMessage)).toBeInTheDocument(); + }); + + it("should render message for creating variant", () => { + const { getByText } = render( + , + ); + + expect(getByText(messages.warehouseMessageVariantOnCreate.defaultMessage)).toBeInTheDocument(); + }); + + it("should not render message if warehouses exist", () => { + const { queryByText } = render( + , + ); + + expect(queryByText(messages.configureWarehouseForProduct.defaultMessage)).toBeNull(); + expect(queryByText(messages.configureWarehouseForVariant.defaultMessage)).toBeNull(); + }); +}); diff --git a/src/products/components/ProductStocks/ProductStocks.tsx b/src/products/components/ProductStocks/ProductStocks.tsx index 57d2e9ce72f..36ccd8107ea 100644 --- a/src/products/components/ProductStocks/ProductStocks.tsx +++ b/src/products/components/ProductStocks/ProductStocks.tsx @@ -1,7 +1,6 @@ // @ts-strict-ignore import { ChannelData } from "@dashboard/channels/utils"; import { DashboardCard } from "@dashboard/components/Card"; -import Link from "@dashboard/components/Link"; import TableRowLink from "@dashboard/components/TableRowLink"; import { ProductErrorFragment, WarehouseFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; @@ -16,6 +15,7 @@ import { FormattedMessage, useIntl } from "react-intl"; import { ProductStocksAssignWarehouses } from "./components/ProductStocksAssignWarehouses"; import { messages } from "./messages"; +import { WarehouseInformationMessage } from "./WarehouseInformationMessage"; export interface ProductStockFormsetData { quantityAllocated: number; @@ -45,6 +45,7 @@ export interface ProductStocksProps { onWarehouseConfigure: () => void; fetchMoreWarehouses: () => void; hasMoreWarehouses: boolean; + isCreate: boolean; } export const ProductStocks: React.FC = ({ @@ -62,6 +63,7 @@ export const ProductStocks: React.FC = ({ onWarehouseStockDelete, onWarehouseConfigure, fetchMoreWarehouses, + isCreate, }) => { const intl = useIntl(); const [lastStockRowFocus, setLastStockRowFocus] = React.useState(false); @@ -138,25 +140,12 @@ export const ProductStocks: React.FC = ({ )} - {!warehouses?.length && ( - - {hasVariants ? ( - {chunks}, - }} - /> - ) : ( - {chunks}, - }} - /> - )} - - )} + 0} + onWarehouseConfigure={onWarehouseConfigure} + /> {productVariantChannelListings?.length > 0 && diff --git a/src/products/components/ProductStocks/WarehouseInformationMessage.tsx b/src/products/components/ProductStocks/WarehouseInformationMessage.tsx new file mode 100644 index 00000000000..28d2d74ae25 --- /dev/null +++ b/src/products/components/ProductStocks/WarehouseInformationMessage.tsx @@ -0,0 +1,56 @@ +import Link from "@dashboard/components/Link"; +import { Text } from "@saleor/macaw-ui-next"; +import React from "react"; +import { FormattedMessage } from "react-intl"; + +import { messages } from "./messages"; + +interface WarehouseInformationMessageProps { + isCreate: boolean; + hasVariants: boolean; + hasWarehouses: boolean; + onWarehouseConfigure: () => void; +} + +export const WarehouseInformationMessage: React.FC = ({ + isCreate, + hasVariants, + hasWarehouses, + onWarehouseConfigure, +}) => { + if (isCreate) { + const message = hasVariants + ? messages.warehouseMessageVariantOnCreate + : messages.warehouseMessageProductOnCreate; + + return ( + + + + ); + } + + if (hasWarehouses) { + return null; + } + + return ( + + {hasVariants ? ( + {chunks}, + }} + /> + ) : ( + {chunks}, + }} + /> + )} + + ); +}; diff --git a/src/products/components/ProductStocks/messages.ts b/src/products/components/ProductStocks/messages.ts index 1024e1a8f3b..b0e00b225ee 100644 --- a/src/products/components/ProductStocks/messages.ts +++ b/src/products/components/ProductStocks/messages.ts @@ -121,4 +121,14 @@ export const messages = defineMessages({ defaultMessage: "Channel threshold", description: "table column header", }, + warehouseMessageVariantOnCreate: { + id: "BaxGjT", + defaultMessage: "Assigning the stocks will be possible after the variant is saved.", + description: "variant stocks section subtitle", + }, + warehouseMessageProductOnCreate: { + id: "lhfPkc", + defaultMessage: "Assigning the stocks will be possible after the product is saved.", + description: "variant stocks section subtitle", + }, }); diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index bd010800f5e..823a3a73193 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -293,6 +293,7 @@ const ProductVariantCreatePage: React.FC = ({ onWarehouseStockAdd={handlers.addStock} onWarehouseStockDelete={handlers.deleteStock} onWarehouseConfigure={onWarehouseConfigure} + isCreate={true} /> diff --git a/src/products/components/ProductVariantPage/ProductVariantPage.tsx b/src/products/components/ProductVariantPage/ProductVariantPage.tsx index 4738b835f2a..150257bee18 100644 --- a/src/products/components/ProductVariantPage/ProductVariantPage.tsx +++ b/src/products/components/ProductVariantPage/ProductVariantPage.tsx @@ -360,6 +360,7 @@ const ProductVariantPage: React.FC = ({ onWarehouseStockAdd={handlers.addStock} onWarehouseStockDelete={handlers.deleteStock} onWarehouseConfigure={onWarehouseConfigure} + isCreate={false} /> From 850997c4645efb74e63530efe527cd1c45ceb62a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:34:15 +0200 Subject: [PATCH 066/264] Release 3.20 (#5118) Co-authored-by: github-actions[bot] --- .changeset/chatty-years-nail.md | 5 ----- .changeset/fast-trees-complain.md | 5 ----- .changeset/forty-bananas-burn.md | 5 ----- .changeset/odd-pumpkins-own.md | 5 ----- .changeset/old-numbers-beam.md | 5 ----- .changeset/purple-lemons-smash.md | 5 ----- .changeset/rude-baboons-give.md | 5 ----- .changeset/rude-impalas-live.md | 5 ----- .changeset/tiny-starfishes-count.md | 5 ----- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 11 files changed, 15 insertions(+), 46 deletions(-) delete mode 100644 .changeset/chatty-years-nail.md delete mode 100644 .changeset/fast-trees-complain.md delete mode 100644 .changeset/forty-bananas-burn.md delete mode 100644 .changeset/odd-pumpkins-own.md delete mode 100644 .changeset/old-numbers-beam.md delete mode 100644 .changeset/purple-lemons-smash.md delete mode 100644 .changeset/rude-baboons-give.md delete mode 100644 .changeset/rude-impalas-live.md delete mode 100644 .changeset/tiny-starfishes-count.md diff --git a/.changeset/chatty-years-nail.md b/.changeset/chatty-years-nail.md deleted file mode 100644 index 0db18957be8..00000000000 --- a/.changeset/chatty-years-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Order details page now displays the name of the applied voucher. diff --git a/.changeset/fast-trees-complain.md b/.changeset/fast-trees-complain.md deleted file mode 100644 index d4cd95cc68c..00000000000 --- a/.changeset/fast-trees-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Now staging environments have changed domain, that means "staging-cloud.saleor.io" is no longer referenced in our pipelines diff --git a/.changeset/forty-bananas-burn.md b/.changeset/forty-bananas-burn.md deleted file mode 100644 index 250162ef96e..00000000000 --- a/.changeset/forty-bananas-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Legacy Dialog component is no longer used diff --git a/.changeset/odd-pumpkins-own.md b/.changeset/odd-pumpkins-own.md deleted file mode 100644 index 7cc11f16c65..00000000000 --- a/.changeset/odd-pumpkins-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now navigate on dropdown list. Dropdown stays close on focus. diff --git a/.changeset/old-numbers-beam.md b/.changeset/old-numbers-beam.md deleted file mode 100644 index fc12f16ed93..00000000000 --- a/.changeset/old-numbers-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -You can now see permission edit list use default list color instead of accent blue color. diff --git a/.changeset/purple-lemons-smash.md b/.changeset/purple-lemons-smash.md deleted file mode 100644 index 2b2bac51010..00000000000 --- a/.changeset/purple-lemons-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Showing negative amount in order details has been aligned diff --git a/.changeset/rude-baboons-give.md b/.changeset/rude-baboons-give.md deleted file mode 100644 index 9f58e7fcaf1..00000000000 --- a/.changeset/rude-baboons-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Now, missing translations are properly added to the order details. diff --git a/.changeset/rude-impalas-live.md b/.changeset/rude-impalas-live.md deleted file mode 100644 index 6b9c087986a..00000000000 --- a/.changeset/rude-impalas-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -The stock settings no longer show a message that you need to create a warehouse when warehouses are already configured. diff --git a/.changeset/tiny-starfishes-count.md b/.changeset/tiny-starfishes-count.md deleted file mode 100644 index 68789d565ac..00000000000 --- a/.changeset/tiny-starfishes-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -App install error page now uses macaw-ui-next styles meaning that MaterialUI is no longer used in this view. diff --git a/CHANGELOG.md b/CHANGELOG.md index 05024133e6d..5b5809080ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 3.20.7 + +### Patch Changes + +- ce05ffba2: Order details page now displays the name of the applied voucher. +- f8e6049fe: Now staging environments have changed domain, that means "staging-cloud.saleor.io" is no longer referenced in our pipelines +- b428bcd9f: Legacy Dialog component is no longer used +- e5bfa1218: You can now navigate on dropdown list. Dropdown stays close on focus. +- bbba0d2dc: You can now see permission edit list use default list color instead of accent blue color. +- 642e9f7cb: Showing negative amount in order details has been aligned +- efbca2b00: Now, missing translations are properly added to the order details. +- 037c67cb2: The stock settings no longer show a message that you need to create a warehouse when warehouses are already configured. +- f879d525a: App install error page now uses macaw-ui-next styles meaning that MaterialUI is no longer used in this view. + ## 3.20.6 ### Patch Changes diff --git a/package.json b/package.json index cb917ac2cbf..37f9ceeda76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saleor-dashboard", - "version": "3.20.6", + "version": "3.20.7", "main": "src/index.tsx", "repository": { "type": "git", From bef2cbde28bf19ce0c556403707dff15d1dd9ba2 Mon Sep 17 00:00:00 2001 From: Patryk Zawadzki <81205+patrys@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:12:34 +0200 Subject: [PATCH 067/264] Bring Docker image publishing in line with Saleor Core (#5101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bring Docker image publishing in line with Saleor Core This will automatically tag images with with both the full version and just the minor (e.g., "3.20"). It may change the reported version strings for untagged releases so please review if the behavior of `PROJECT_VERSION` is acceptable. * Create giant-colts-pump.md --------- Co-authored-by: Patryk Andrzejewski Co-authored-by: Paweł Chyła --- .changeset/giant-colts-pump.md | 5 ++ .github/workflows/publish-containers.yml | 62 +++++++++++------------- 2 files changed, 32 insertions(+), 35 deletions(-) create mode 100644 .changeset/giant-colts-pump.md diff --git a/.changeset/giant-colts-pump.md b/.changeset/giant-colts-pump.md new file mode 100644 index 00000000000..5a9c5483699 --- /dev/null +++ b/.changeset/giant-colts-pump.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Docker images will be automatically tag with with both the full version and just the minor diff --git a/.github/workflows/publish-containers.yml b/.github/workflows/publish-containers.yml index dc91aaba13a..d7ecb44e4cb 100644 --- a/.github/workflows/publish-containers.yml +++ b/.github/workflows/publish-containers.yml @@ -7,53 +7,44 @@ on: jobs: docker: runs-on: ubuntu-20.04 + permissions: contents: read packages: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Outputs the name of the repository (owner/repo) - - name: Get image name + - name: Build Image Name id: image run: | IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') - echo "image_name=ghcr.io/${IMAGE_NAME}" >> $GITHUB_OUTPUT - - # Tags stable versions as :latest - # Pre-releases, alphas, etc. as :snapshot - - name: Output image tags from git tag events - if: ${{ startsWith(github.ref, 'refs/tags/') }} - env: - GH_TOKEN: ${{ github.token }} - run: | - LATEST_VERSION=$(gh api repos/saleor/saleor-dashboard/releases/latest | jq -r .tag_name) - CURRENT_TAG=${GITHUB_REF#refs/tags/} + echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT - if [ "$LATEST_VERSION" = "$CURRENT_TAG" ]; then - TAGS=${{ steps.image.outputs.image_name }}:${CURRENT_TAG},${{ steps.image.outputs.image_name }}:latest - else - TAGS=${{ steps.image.outputs.image_name }}:${CURRENT_TAG} - fi - - echo " - DASHBOARD_VERSION=${CURRENT_TAG} - CONTAINER_TAGS=${TAGS} - " >> "${GITHUB_ENV}" + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/${{ steps.image.outputs.image_name }} + tags: | + type=ref,event=branch + type=pep440,pattern={{version}} + type=pep440,pattern={{major}}.{{minor}} - - name: Set up Docker QEMU - uses: docker/setup-qemu-action@v1 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 with: platforms: arm64 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -61,21 +52,22 @@ jobs: - name: Build and Push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} - context: ./ + cache-from: type=gha + cache-to: type=gha,mode=max + context: . + labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 push: true - tags: ${{ env.CONTAINER_TAGS }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + tags: ${{ steps.meta.outputs.tags }} build-args: | COMMIT_ID=${{ github.sha }} - PROJECT_VERSION=$DASHBOARD_VERSION + PROJECT_VERSION=${{ steps.meta.outputs.version }} - - name: Output image digest + - name: Image digest run: | echo $"\ Digest: ${{ steps.docker_build.outputs.digest }} - Tags: ${{ env.CONTAINER_TAGS }}" + Tags: ${{ steps.meta.outputs.tags }}" From 330012e11ed3fdc873b068e375c2eac967917c13 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Wed, 28 Aug 2024 16:17:10 +0200 Subject: [PATCH 068/264] Update MacawUI (#5132) * bump macaw * changeset --- .changeset/real-pets-think.md | 5 +++++ package-lock.json | 16 ++++++++-------- package.json | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/real-pets-think.md diff --git a/.changeset/real-pets-think.md b/.changeset/real-pets-think.md new file mode 100644 index 00000000000..e24434aed87 --- /dev/null +++ b/.changeset/real-pets-think.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +MacawUI in Dashboard is now the newest available version. Dashboard no longer shows an error while installing packages. Price in shipping method select component now aligns to the right. diff --git a/package-lock.json b/package-lock.json index 6dafee8e0a1..fbe33a45fa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.8", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.10", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", @@ -6860,9 +6860,9 @@ }, "node_modules/@saleor/macaw-ui-next": { "name": "@saleor/macaw-ui", - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.8.tgz", - "integrity": "sha512-NFIIoBfHPmeiMg3gw8CPk8xf6zuBCx3Ww+jSMEuuBtMLQ2U01KLO9FmpfjiyZfWP/+Cz0papEgh/ecTEbJk6ZA==", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.10.tgz", + "integrity": "sha512-lDxfD3p1lZChtYSN6FsV9NucBHmYcOvynlKqPsniuFJyvC1KShpRLP5CSM8qldYovHQHwaxESBSn9TH3PtVKQg==", "dependencies": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom": "^2.0.2", @@ -6880,7 +6880,7 @@ "downshift": "^9.0.8" }, "engines": { - "node": ">=20", + "node": "18 || 20", "pnpm": ">=9" }, "peerDependencies": { @@ -29658,9 +29658,9 @@ } }, "@saleor/macaw-ui-next": { - "version": "npm:@saleor/macaw-ui@1.1.8", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.8.tgz", - "integrity": "sha512-NFIIoBfHPmeiMg3gw8CPk8xf6zuBCx3Ww+jSMEuuBtMLQ2U01KLO9FmpfjiyZfWP/+Cz0papEgh/ecTEbJk6ZA==", + "version": "npm:@saleor/macaw-ui@1.1.10", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.10.tgz", + "integrity": "sha512-lDxfD3p1lZChtYSN6FsV9NucBHmYcOvynlKqPsniuFJyvC1KShpRLP5CSM8qldYovHQHwaxESBSn9TH3PtVKQg==", "requires": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom": "^2.0.2", diff --git a/package.json b/package.json index 37f9ceeda76..c401106c2d2 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.8", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.10", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", From 331af3943757b27cf74e6638e0ec96c357f99756 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Thu, 29 Aug 2024 12:31:59 +0200 Subject: [PATCH 069/264] Fix alert issue in order creation (#5136) * fix alert type issue * improve alert text * changesets --- .changeset/gold-spies-hug.md | 5 +++++ src/orders/components/OrderAlerts/OrderAlerts.tsx | 8 ++++++-- src/orders/components/OrderDraftPage/OrderDraftAlert.tsx | 5 ++--- src/orders/components/OrderDraftPage/OrderDraftPage.tsx | 5 +---- 4 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/gold-spies-hug.md diff --git a/.changeset/gold-spies-hug.md b/.changeset/gold-spies-hug.md new file mode 100644 index 00000000000..28680549bc5 --- /dev/null +++ b/.changeset/gold-spies-hug.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now see draft order alert messages when channel is inactive or has no products diff --git a/src/orders/components/OrderAlerts/OrderAlerts.tsx b/src/orders/components/OrderAlerts/OrderAlerts.tsx index aaa66c74f64..e1ec146b0f0 100644 --- a/src/orders/components/OrderAlerts/OrderAlerts.tsx +++ b/src/orders/components/OrderAlerts/OrderAlerts.tsx @@ -27,7 +27,7 @@ export const OrderAlerts: React.FC = ({ alertsHeader, alerts, if (formattedAlerts.length === 1) { return ( - + {formattedAlerts[0].text} ); @@ -35,7 +35,11 @@ export const OrderAlerts: React.FC = ({ alertsHeader, alerts, return ( <> - {!!alertsHeader && alertsHeader} + {!!alertsHeader && ( + + {alertsHeader} + + )}