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

47 lines
2.2 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 CHECKOUT_ACTIONS from './checkout-actions-block/block.json';
import CHECKOUT_BILLING_ADDRESS from './checkout-billing-address-block/block.json';
import CHECKOUT_CONTACT_INFORMATION from './checkout-contact-information-block/block.json';
import CHECKOUT_EXPRESS_PAYMENT from './checkout-express-payment-block/block.json';
import CHECKOUT_FIELDS from './checkout-fields-block/block.json';
import CHECKOUT_ORDER_NOTE from './checkout-order-note-block/block.json';
import CHECKOUT_PAYMENT from './checkout-payment-block/block.json';
import CHECKOUT_SHIPPING_ADDRESS from './checkout-shipping-address-block/block.json';
import CHECKOUT_SHIPPING_METHODS from './checkout-shipping-methods-block/block.json';
2022-10-04 12:02:28 +00:00
import CHECKOUT_COLLECTION_METHOD from './checkout-collection-method/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 CHECKOUT_TERMS from './checkout-terms-block/block.json';
import CHECKOUT_TOTALS from './checkout-totals-block/block.json';
import CHECKOUT_ORDER_SUMMARY from './checkout-order-summary-block/block.json';
import CHECKOUT_ORDER_SUMMARY_SUBTOTAL from './checkout-order-summary-subtotal/block.json';
import CHECKOUT_ORDER_SUMMARY_FEE from './checkout-order-summary-fee/block.json';
import CHECKOUT_ORDER_SUMMARY_DISCOUNT from './checkout-order-summary-discount/block.json';
import CHECKOUT_ORDER_SUMMARY_SHIPPING from './checkout-order-summary-shipping/block.json';
import CHECKOUT_ORDER_SUMMARY_COUPON_FORM from './checkout-order-summary-coupon-form/block.json';
import CHECKOUT_ORDER_SUMMARY_TAXES from './checkout-order-summary-taxes/block.json';
import CHECKOUT_ORDER_SUMMARY_CART_ITEMS from './checkout-order-summary-cart-items/block.json';
export default {
CHECKOUT_ACTIONS,
CHECKOUT_BILLING_ADDRESS,
CHECKOUT_CONTACT_INFORMATION,
CHECKOUT_EXPRESS_PAYMENT,
CHECKOUT_FIELDS,
CHECKOUT_ORDER_NOTE,
CHECKOUT_PAYMENT,
CHECKOUT_SHIPPING_ADDRESS,
CHECKOUT_SHIPPING_METHODS,
CHECKOUT_TERMS,
CHECKOUT_TOTALS,
CHECKOUT_ORDER_SUMMARY,
CHECKOUT_ORDER_SUMMARY_SUBTOTAL,
CHECKOUT_ORDER_SUMMARY_FEE,
CHECKOUT_ORDER_SUMMARY_DISCOUNT,
CHECKOUT_ORDER_SUMMARY_SHIPPING,
CHECKOUT_ORDER_SUMMARY_COUPON_FORM,
CHECKOUT_ORDER_SUMMARY_TAXES,
CHECKOUT_ORDER_SUMMARY_CART_ITEMS,
2022-10-04 12:02:28 +00:00
CHECKOUT_COLLECTION_METHOD,
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
};