* Add isCompact prop to components using SearchListControl
* Update @woocommerce/components to 6.1.2
* Remove legacy CSS code
* Add some CSS rules to override conflicting editor styles
* Replace showCount prop with has-count class name
* Create ExpandableSearchListItem component
* Refactor ProductControl so it uses ExpandableSearchListItem
* Update @woocommerce/components to 6.2.0
* Fix @woocommerce/components builds breaking
* Fix a11y of expandable item list children
* Set categories to an empty array by default
* Render compact control in Attribute filter sidebar
* Add countLabel to ProductAttributeTermControl
* Fix ProductTagControl selected items
* Use sentence case for countLabel
* Fix wrong margins in block editor
* Fix checkbox alignment
* Update package-lock.json
* Fix withCategories test
* Fix JS error in Filter Products by Attribute block
* Make input ids unique
* git move to ts files
* Type the checkout state provider
* Restore for loop for error handling
* Types not needed
* Consolodate response handling
* Unused import
* Fix defaults for onCheckoutAfterProcessingWithSuccess etc
* Type useEmitResponse and remove isObject checks
* useEmitResponse as const
* Check that redirectUrl is string
* Define actions as const
* data.redirectUrl should be truthy
* Add redirectURL todo item as followup
* remove null fallback
* Convert Button to TypeScript
* Add alias of @types/wordpress__components
* Make ButtonProps extend the wp/components button's base props
* Update package-lock.json
* Extend Button.ButtonProps instead of only BaseProps
* Add return type to Button component
* Convert CartLineItemsTitle to TypeScript
* Add type guards
* Change CartLineItemRow extension to .tsx
* Remove parseInt from price precision
This is because the API sends it as a number, so it will never be a string, so no need to parse it.
* Add dinero.js types
* Type QuantitySelector and add types for @wordpress/keycodes
* Make __experimentalApplyCheckoutFilter use generic types
* Add catalog_visibility type & change types of CartItem
* Add isNumber and isString to type guards
* Type ProductLowStockBadge
* Ensure type returned by a filter function is the same it received
* Include type guards and hooks in tsconfig
* Add more type safety to useStoreCartItemQuantity
* Make className optional on QuantitySelector
* Type CartLineItemRow
* Type CartLineItemsTable
* Type Cart
* Add extra keys to CartResponseItem
* Clean aria-hidden logic
* Export type-guards from module
* Use aliases to import types in CartLineItemRow
* Remove unused prop types and specify return type of function
* Specify return type of component
* Use JSX.Element instead of ReactNode
* Remove unused variables & set return type of components
* Remove PropTypes
* Add batch route
* Register batch route
* Allow batching on writable endpoints
* Batch in client
* Batch non-GET requests
* Batching support with typescript defs
* Remove unused hook
* Prevent multiple fragment updates
* Only use batch route if detected
* Correct var name
* Move nonce check to validate_callback so it runs before requests are completed
* remove unused imports
* updateCartFragments function as const
* Add phpunit tests for batching functionality
* Reduce batch delay
* increase timeout
* Update isCartUpdatePostRequest for batch support
* Update Endpoint used in test
* Move nonce check back inline - custom headers are not returned otherwise
* Fix error handling
* Back to 30s
* Update assets/js/middleware/cart-update.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* whitespace
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* update @wordpress/env to 4.0.2
* switch `core` to null for the default wp-env config
* remove DT types for @wordpress/api-fetch and install actual api-fetch package as a dev dependency.
The actual package now has types which are more up to date so it’s better to use it for the types than what’s in Definitely Typed.
This reverts commit 5b65a02297.
This commit broke cart updates for the cart block (surfaced with changing quantity)
There were also legit e2e test fails for the cart-update middleware behaviour that weren’t addressed.
* Add batch route
* Register batch route
* Allow batching on writable endpoints
* Batch in client
* Batch non-GET requests
* Batching support with typescript defs
* Remove unused hook
* Prevent multiple fragment updates
* Only use batch route if detected
* Correct var name
* Move nonce check to validate_callback so it runs before requests are completed
* remove unused imports
* updateCartFragments function as const
* Add phpunit tests for batching functionality
* Reduce batch delay
* increase timeout
* Remove unused fixtures
* Update package-lock.json
* Update product-search fixture and snapshot
* Ensure the product is selected before continuing with the test.
This clicks the test at least once, or at most thrice to ensure it is checked before trying to evaluate the rest of the test.
* Revert "Remove unused fixtures"
This reverts commit e4a4e11b72c6723341d60391bd9cb9cc4197efaf.
* Look for button with aria-label: 'Toggle block inserter'
* Revert "Look for button with aria-label: 'Toggle block inserter'"
This reverts commit a25ea8d9abafead372ef24b2feb92ff58bd95cea.
* Update @wordpress/e2e-test-utils to 5.1.2
* Check for existence of add block button
* Fix circular dependencies in Icons package
* CircularDependencyPlugin
* Fix deriveSelectedShippingRates CD
* Move useStoreNotices to context/hooks
* Move useStoreCart to base/context/hooks
* Move useStoreEvents to base/context/hooks
* Move collection/product hooks
* Move useStoreAddToCart
* Move useCustomerData
* move shipping hooks
* Move checkout and payment hooks
* Context should import hooks with relative paths
* Prevent circular dependency in store notices container components
* Move address fields to settings so they are shared
* Import PaymentMethod components direct
* relative import
* Fix select CD
* Move ValidationInputError
* Move components consumed by context
* Fix up internal imports in context
* fix CD in checkout package
* Separate providers
* Fixing context exports
* Fix base context hook import
* fix mocks
* Pass hooks to Slot Fills as Fill Props to avoid imports from base-context
* Export components, not hooks
* Pass props to ExperimentalOrderMeta
* Run CD plugin when using `npm start` only
* Rename CIRCULAR_DEPS to CHECK_CIRCULAR_DEPS
* Remove duplicate key from rebase
* Move packages component back to main file
* Remove dashicon module replacement
* Restore SVG import from package not external
* Move core locale handling to avoid impact settings package size
* Remove deleted file from rebase