* Rename checkout classes from 'wc-blocks-checkout' to 'wc-block-checkout'
* Rename form components classes from 'wc-blocks-checkout' to 'wc-block-checkout'
* Rename 'wc-components' class names to 'wc-block'
* Add schema/GET endpoint
* Customer data updates + create tests
* Update docs
* Unused method
* Use ID from the customer object, rather than checking logged in user
* PHP 5.6 incompatibility
* Correct docblock
* Implement coupons endpoint with add/delete/get functionality
* Add totals
* Use money formatting
* Added tests for new endpoints
* Add coupons to main cart endpoint and update docs to match
* Fix indenting in readme
* is_a to instanceof
* Update coupon_exists logic
* Documentation/tidy class
* Update currency responses for coupon totals w/ tests
* Consistent currency data and formatting for product prices
* Consistent get_store_currency_properties usage
* Update tests with schema changes
* min_price and max_price to subunit format
* Product query of min and max prices using subunit
* Cart item totals
* Collection data schema object and currency data inclusion
* Handle subunits and new API in product prices
* Update price slider to format numbers using library and new API responses for subunits
* Product query of min and max prices using subunit
* Fix indents in readme
* Add todo for currency formatting
* Handle step for subunits, fixes min/max constraints
* Handle subunit conversion on display, using consistent currency object and wrapped NumberFormat component.
* Prettier ran
* Update usePriceConstraints tests so rounding doesn't make all values be 0
* Rename to minorUnitValue
* Move currencyToNumberFormat to index file
* siteCurrencySettings to constant rather than function
* remove cents term
* cents->minor unit
* typo in todo note
* Switch to FormattedMonetaryAmount
* Formatting
* wrong case
* initial commit at fields
* add radio control
* change input to be uncotrolled
* tweak styles
* populate block with boilerplate
* update aria in radio
* remove comment
* fix typo
* add missing colors
* put reminder to put Disabled back
* wrap text in i18n __
* reorder styles
* rename wc-components to wc-blocks
* use value instead of index for keys
* add no shipping placeholder
* change isEditor default to false
* fix problem with responsive
* Typo
* Save previous constraint while loading
* Add tests for formatPrice
* Small code refactor
* Refactor usePriceConstraints to DRY and add tests
* Add base-hooks to jest config
* Add Feedback Prompt in Cart & Checkout blocks sidebar
* Add border
* Move getInspectorControls out of the component function
* Move feedback prompt to a HOC
* Add @todo comment to feedback link
* Use filter for withFeedbackPrompt
* Export withFeedbackPrompt from hocs index.js
* Typo
* Try moving the feedback texts to context
* Revert "Try moving the feedback texts to context"
This reverts commit 21f889b021ceea6fef722efab9663799829bc769.
* Revert "Use filter for withFeedbackPrompt"
This reverts commit 96bba029d61a383eafa2c0a1c08f7988e319b50d.
* Set feedback text in the HOC function
* Use arrow-function to simplify code
* Refactor
* Implement basic version of MoneyValue with decimal conversion
* Implement MoneyValue in cart classes
* Add minor unit to schema
* Update tests
* Add tests
* Tweak minor unit description
* Replace pow
* Dump rounding mode and use constant values
* Only return strings
* prepare_money_response method
* Update types back to string
* Remove unnecessary parentheses
* Feedback; force integer rounding mode to prevent notices
* 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