woocommerce/plugins/woocommerce-blocks/assets/js/blocks/cart/inner-blocks/component-metadata.ts

43 lines
1.8 KiB
TypeScript
Raw Normal View History

WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) * Sub/Total/Fee inner blocks * Row blocks within the inner block * Update icons * Resolve stying issues * Remove old block * Pin totals row * Locking logic update * Heading inner block * Refactor where inner blocks are defined * Add todos * Todo for Consider deprecating OrderMetaSlotFill and DiscountSlotFill in favour of inner block areas. * Improve frontend registration of components using new entrypoint * Experiment- external block context * Revert "Experiment- external block context" This reverts commit 4b75668ec7eb62f065c6a488cd942a666e26204f. * Duplicate inner blocks to avoid conflicts with context * Remove todo * Rename block dir * Some test fixes * Fix import * fix import * linting * Remove unused attributes * Optional classname * fix coupons import * fix shipping mocks * Styling * Fix selectors in e2e tests * Add back the wc-block-components-totals-wrapper class that was used for each segment in the totals Order summary Because, removing them was: - a breaking change for the old structure - was making it harder to target the inner blocks. Before the class was used to target each segment - it was making the wc-block-components-totals-item behave as a child or parent depending on the inner block, inconsitency * Reuse the TotalsWrapper component for C& C blocks inner blocks This component was removed in this PR, but we wrap components in the Cart and Checkout sidebar in a TotalsWrapper. This will ensure consistent spacing and borders are applied to items in the sidebar. Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-01 13:45:18 +00:00
/**
* Internal dependencies
*/
import FILLED_CART from './filled-cart-block/block.json';
import EMPTY_CART from './empty-cart-block/block.json';
import CART_ITEMS from './cart-items-block/block.json';
import CART_EXPRESS_PAYMENT from './cart-express-payment-block/block.json';
import CART_LINE_ITEMS from './cart-line-items-block/block.json';
import CART_CROSS_SELLS from './cart-cross-sells-block/block.json';
import CART_CROSS_SELLS_PRODUCTS from './cart-cross-sells-products/block.json';
WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) * Sub/Total/Fee inner blocks * Row blocks within the inner block * Update icons * Resolve stying issues * Remove old block * Pin totals row * Locking logic update * Heading inner block * Refactor where inner blocks are defined * Add todos * Todo for Consider deprecating OrderMetaSlotFill and DiscountSlotFill in favour of inner block areas. * Improve frontend registration of components using new entrypoint * Experiment- external block context * Revert "Experiment- external block context" This reverts commit 4b75668ec7eb62f065c6a488cd942a666e26204f. * Duplicate inner blocks to avoid conflicts with context * Remove todo * Rename block dir * Some test fixes * Fix import * fix import * linting * Remove unused attributes * Optional classname * fix coupons import * fix shipping mocks * Styling * Fix selectors in e2e tests * Add back the wc-block-components-totals-wrapper class that was used for each segment in the totals Order summary Because, removing them was: - a breaking change for the old structure - was making it harder to target the inner blocks. Before the class was used to target each segment - it was making the wc-block-components-totals-item behave as a child or parent depending on the inner block, inconsitency * Reuse the TotalsWrapper component for C& C blocks inner blocks This component was removed in this PR, but we wrap components in the Cart and Checkout sidebar in a TotalsWrapper. This will ensure consistent spacing and borders are applied to items in the sidebar. Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-01 13:45:18 +00:00
import CART_TOTALS from './cart-totals-block/block.json';
import PROCEED_TO_CHECKOUT from './proceed-to-checkout-block/block.json';
import CART_ACCEPTED_PAYMENT_METHODS from './cart-accepted-payment-methods-block/block.json';
import CART_ORDER_SUMMARY from './cart-order-summary-block/block.json';
import CART_ORDER_SUMMARY_SUBTOTAL from './cart-order-summary-subtotal/block.json';
import CART_ORDER_SUMMARY_FEE from './cart-order-summary-fee/block.json';
import CART_ORDER_SUMMARY_DISCOUNT from './cart-order-summary-discount/block.json';
import CART_ORDER_SUMMARY_SHIPPING from './cart-order-summary-shipping/block.json';
import CART_ORDER_SUMMARY_COUPON_FORM from './cart-order-summary-coupon-form/block.json';
import CART_ORDER_SUMMARY_TAXES from './cart-order-summary-taxes/block.json';
import CART_ORDER_SUMMARY_HEADING from './cart-order-summary-heading/block.json';
export default {
FILLED_CART,
EMPTY_CART,
CART_ITEMS,
CART_EXPRESS_PAYMENT,
CART_LINE_ITEMS,
CART_CROSS_SELLS,
CART_CROSS_SELLS_PRODUCTS,
WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) * Sub/Total/Fee inner blocks * Row blocks within the inner block * Update icons * Resolve stying issues * Remove old block * Pin totals row * Locking logic update * Heading inner block * Refactor where inner blocks are defined * Add todos * Todo for Consider deprecating OrderMetaSlotFill and DiscountSlotFill in favour of inner block areas. * Improve frontend registration of components using new entrypoint * Experiment- external block context * Revert "Experiment- external block context" This reverts commit 4b75668ec7eb62f065c6a488cd942a666e26204f. * Duplicate inner blocks to avoid conflicts with context * Remove todo * Rename block dir * Some test fixes * Fix import * fix import * linting * Remove unused attributes * Optional classname * fix coupons import * fix shipping mocks * Styling * Fix selectors in e2e tests * Add back the wc-block-components-totals-wrapper class that was used for each segment in the totals Order summary Because, removing them was: - a breaking change for the old structure - was making it harder to target the inner blocks. Before the class was used to target each segment - it was making the wc-block-components-totals-item behave as a child or parent depending on the inner block, inconsitency * Reuse the TotalsWrapper component for C& C blocks inner blocks This component was removed in this PR, but we wrap components in the Cart and Checkout sidebar in a TotalsWrapper. This will ensure consistent spacing and borders are applied to items in the sidebar. Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-01 13:45:18 +00:00
CART_TOTALS,
PROCEED_TO_CHECKOUT,
CART_ACCEPTED_PAYMENT_METHODS,
CART_ORDER_SUMMARY,
CART_ORDER_SUMMARY_SUBTOTAL,
CART_ORDER_SUMMARY_FEE,
CART_ORDER_SUMMARY_DISCOUNT,
CART_ORDER_SUMMARY_SHIPPING,
CART_ORDER_SUMMARY_COUPON_FORM,
CART_ORDER_SUMMARY_TAXES,
CART_ORDER_SUMMARY_HEADING,
};