* add more pricing detail to cart line items api:
- total line price, before any coupon/discount
- saving, aka discount amount (if any)
- boolean if saving > 0
* add new cart price info properties to schema
* tidy field naming – line subtotal=pre discounts, line total=discounted
* remove saving / discount fields from API – could be calculated on client
* return numbers (not string) for price fields
* rename API field "price" to product price for clarity
* fix schema type for total fields (now float)
* Total descriptions in schema
* Format all costs as strings to follow core rest api
* Add totals to cart schema
* Update tests
* tax_lines
* import svg directly to avoid pulling all dependencies
* revert unnecessary change with sideEffects figured out.
* add sideEffects to package json.
This results in a ~60% reduction in bundle sizes!
* Update NPM packages
* Switch JSON dependencies to new PHP files
* include->require
* include->require
* Remove from package and run audit fix
* Update wp-prettier
* Use version from asset file
* Fix eslint issues and test failures
* Update OriginalComponent docblocks
* Props are objects, not arrays
* Array to Object
* fix tests throwing unhandled rejection errors in node.
These tests were all testing Promise.rejects but then not properly catching the reject in the assertions.
* exclude rule for no short array syntax allowed
This is a WordPress core standard that we choose to ignore because it’s silly in our context to follow that rule (and we’re being consistent with WooCommerce Admin).
* Add Empty Cart View with inner blocks
* Add logic so empty cart is always saved and only displayed when cart is empty
* Make cart hidden until the correct display is loaded
* Add missing propTypes
* Remove is-loading class
* Import InnerBlocks from @wordpress/block-editor
* Add explanation for always rendering EmptyCart in the editor
* Update Domain/Package so plugin file is not required, only a path.
* remove WC_BLOCKS_PLUGIN_FILE constant and add more inline docs
* Update tests
* Remove WC_BLOCKS_PLUGIN_FILE constant
* introduce form steps
* add last step
* add prop types
* fix css color variable naming
* add label for a11y
* use :last-child
* white space
* use direct args in classnames
* typo
* rename ids for steps
* fix line height to match title
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* heading-content
* rename css var
* move vars to file
* move components within file
* move imports
* rename prop name to kebabCase
* update prop name
* make components responsive with storefront
* fix some compatiblity problems with 2020
* battle in the CSS ground
* move import to correct place
* turn stepHeadingContent to render prop
* styling
* allow merchant to toggle cart empty/full modes in block editor
* use text `Button` for empty/full toolbar buttons
* fix highlighting of current cart state (empty/full) in editor:
- use new custom TextToolbarButton for empty/full mode buttons
* use color variables from css/abstracts/_colors
* Update assets/js/components/text-toolbar-button/index.js
Co-Authored-By: Seghir Nadir <nadir.seghir@gmail.com>
* fix className now props is separated out
* Add 'AND' display format to Attribute filter dropdown
* Add translators comments
* Remove 'assertive' from speak calls
* Wrap some functions in useCallback
* Only filter available filters if style=list and query=and
* Show placeholder in AND query type
* Add default cursor to list-item elements
* Fix issues with 20xx themes
* Fix issues with 20xx themes (II)
* basic empty cart block
* use a real placeholder for placeholder editor content
* remove unnecessary Fragment
* updates to config and frontend script
* enqueue frontend script
* add example config to block registration
* change name typo
* Add dropdown display style to Attribute Filter block
* Unify filter blocks margin
* Show attribute label inside dropdown input
* Minor CSS reorganization
* Refactor code to smaller files
* Preserve input values on blur
* Only save data-display-style if it's different than 'list'
* Remove inputRef prop in DropdownSelectorInputWrapper
* Accessibility: fix missing label
* Prevent input field being unselected when removing an item with the backspace
* Remove isLoading styles and don't set isDisabled when it's not actually disabled
* Accessibility: increase color contrast
* Add package-lock.json
* Prevent input field being unfocused when removing an item with its chip card
* Don't show menu when input is unfocused
* restore back-compat switch
* update woocommerce/components dependency to latest version
* fix bug in AssetDataRegistry and add tests to guard against regressions