docs/modules/nested-elements/index.md
trueComponent - nested-elements.Component - nested-elements/nested-repeater.Control - To enable customization.Base hook - For all widgets that support nested elements.Data Hook - Adjust Container Titles.Data Hook - For each repeater item create the corresponding container child.Data Hook - For each repeater item remove the corresponding container child.UI Hook - Add option to reach the current edited tab via navigator.Base model for nested repeater - Enable to set children elements, create the default children elements.Base view for the nested repeater - Change the default placeholder of the children elements.Base class for nested elements - Enable to change the default behavior of the nested elements.Nested repeater control, for management of nested repeater, to able run $e.run( 'document/repeater/select ) - for each selected tab in panelNestedTabs documentation is explaining about how to use NestedElements.
Nested Elements is a base module for all nested elements, it includes the infrastructure for creating nested elements.
Simple explanation about the files and their purpose:
assets/js/editor/component.js.nested-elements component.nested-elements/nested-repeater component.isWidgetSupportNesting that returns true if the widget supports nesting.assets/js/editor/index.jseditor.js) module.elementor.modules.nestedElements).assets/js/editor/module.jsnested-elements component.assets/js/nested-repeater/component.jsnested-elements/nested-repeater - Component that includes all the functionality that crossing nested repeater logic.NestedModelBase and NestedViewBase classes.nested-elements-repeater for handling the tab selection via dedicated command. (document/repeater/select).getChildrenTitle() that returns the default title for the nested repeater.assets/js/nested-repeater/controls/repeater.jstab_title).document/repeater/select).assets/js/nested-repeater/hooks/base.js getContainerType() {
return 'widget';
}
getConditions( args ) {
return $e.components.get( 'nested-elements' ).isWidgetSupportNesting( args.container.model.get( 'widgetType' ) );
}
widgetThe next files will be about the data hooks they will use this base.js.
nested-repeater-adjust-container-titles.jsTab #1, Tab #2 and so on instead of Container._title is used by the navigator.nested-repeater-create-container.jsnested-repeater-remove-container.jsLink to the actual file - nested-repeater-remove-container.js
Description - The hook called when the repeater item is removed, will delete child container from widget for the corresponding item.
The 2 Hooks above exist to enable control over child container creation and deletion, using the next UI.
nested-repeater-focus-current-edited-container.jsassets/js/editor/nested-repeater/models/nested-model-base.jswidget-nested-base.php).isValidChild method to allow nested elements to be created inside the widget.assets/js/editor/nested-repeater/views/nested-view-base.jscontainer.widget-nested-base.php) defaults.base/widget-nested-base.phpprint_children( index ) method to print the children elements.controls/control-nested-repeater.php- module.phpcontainer module.