Enqueue Scritps in the Editor page

I am displaying some custom elements using wp shortcodes. Everything works fine, however, it does not display in the editor.

The element is populated with JS, so my guess is I need to call the JS file in the editor.

So, how to enqueue the js file in the editor page?

In Elementor, I can call this hook:

add_action('elementor/preview/enqueue_scripts', 'function_name');

Is there something similar for Bricks?