| 1 |
/** |
| 2 |
* Gutenberg Blocks |
| 3 |
* |
| 4 |
* All blocks related JavaScript files should be imported here. |
| 5 |
* You can create a new block folder in this dir and include code |
| 6 |
* for that block here as well. |
| 7 |
* |
| 8 |
* All blocks should be included here since this is the file that |
| 9 |
* Webpack is compiling as the input file. |
| 10 |
*/ |
| 11 |
|
| 12 |
import './editor.scss'; |
| 13 |
|
| 14 |
import './blocks/order-detail-form/block.js'; |
| 15 |
import './blocks/next-step-button/block.js'; |
| 16 |
import './blocks/checkout-form/block.js'; |
| 17 |
import './blocks/optin-form/block.js'; |
| 18 |
|
| 19 |
import CF_Block_Icons from './block-icons'; |
| 20 |
|
| 21 |
const { updateCategory } = wp.blocks; |
| 22 |
|
| 23 |
// wp.WCFSvgIcons = Object.keys( cf_blocks_info.wcf_svg_icons ); |
| 24 |
wp.UAGBSvgIcons = Object.keys( uagb_blocks_info.uagb_svg_icons ); |
| 25 |
|
| 26 |
updateCategory( 'cartflows', { |
| 27 |
icon: CF_Block_Icons.logo, |
| 28 |
} ); |
| 29 |
|
| 30 |
const addCfResponsiveCondtionBlocks = function ( blocks ) { |
| 31 |
blocks.push( 'wcfb/' ); |
| 32 |
return blocks; |
| 33 |
}; |
| 34 |
|
| 35 |
wp.hooks.addFilter( |
| 36 |
'uag_reponsive_conditions_compatible_blocks', |
| 37 |
'enable_reponsive_condition_for_cf_blocks', |
| 38 |
addCfResponsiveCondtionBlocks |
| 39 |
); |
| 40 |
|