diff --git a/Block/View/Element/Widget.php b/Block/View/Element/Widget.php index 37a9feb9..3806c414 100644 --- a/Block/View/Element/Widget.php +++ b/Block/View/Element/Widget.php @@ -8,10 +8,27 @@ namespace Goomento\PageBuilder\Block\View\Element; +use Goomento\PageBuilder\Helper\EncryptorHelper; use Goomento\PageBuilder\Traits\TraitWidgetBlock; use Magento\Framework\View\Element\Template; class Widget extends Template { use TraitWidgetBlock; + + /** + * @inheritDoc + */ + public function getCacheKeyInfo() + { + $keys = parent::getCacheKeyInfo(); + if ($this->getWidget()) { + $settings = $this->getWidget()->getSettings(); + // Reference the key via widget settings + $keys['builder_cache_key'] = EncryptorHelper::uniqueContextId($settings); + $keys['builder_widget_id'] = $this->getWidget()->getId(); + } + + return $keys; + } } diff --git a/Block/Widgets/Navigation.php b/Block/Widgets/Navigation.php new file mode 100644 index 00000000..02af71c4 --- /dev/null +++ b/Block/Widgets/Navigation.php @@ -0,0 +1,500 @@ +moduleEnabled = true; + $this->menuRepository = $objectManager->get('Snowdog\Menu\Api\MenuRepositoryInterface'); + $this->nodeRepository = $objectManager->get('Snowdog\Menu\Api\NodeRepositoryInterface'); + $this->nodeTypeProvider = $objectManager->get('Snowdog\Menu\Model\NodeTypeProvider'); + $this->imageFile = $objectManager->get('Snowdog\Menu\Model\Menu\Node\Image\File'); + $this->templateResolver = $objectManager->get('Snowdog\Menu\Model\TemplateResolver'); + } + + $this->searchCriteriaFactory = $searchCriteriaFactory; + $this->filterGroupBuilder = $filterGroupBuilder; + parent::__construct($context, $data); + } + + /** + * @inheritDoc + */ + protected function _construct() + { + if (!$this->moduleEnabled) { + $this->setTemplate(''); + $this->menu = false; + } else { + if (!$this->hasData('menu')) { + $settings = $this->getSettingsForDisplay(); + $this->setData('menu', $settings['navigation_menu_id'] ?? ''); + $this->setData('menu_type', $settings['navigation_menu_type'] ?? ''); + } + $this->setTemplate($this->getMenuTemplate($this->_template)); + $this->submenuTemplate = $this->getSubmenuTemplate(); + } + } + + /** + * @inheritDoc + */ + public function getIdentities() + { + $keys = [ + 'gmt_navigation_id_' . $this->getData('menu'), + 'gmt_navigation_type_' . $this->getData('menu_type'), + Block::CACHE_TAG + ]; + + if ($this->getWidget()) { + $keys['builder_widget'] = $this->getWidget()->getId(); + } + + return $keys; + } + + /** + * @return mixed + * @throws NoSuchEntityException + */ + private function loadMenu() + { + if ($this->moduleEnabled && $this->menu === null) { + $identifier = $this->getData('menu'); + $storeId = $this->_storeManager->getStore()->getId(); + $this->menu = $this->menuRepository->get($identifier, $storeId); + + if (empty($this->menu->getData())) { + $this->menu = $this->menuRepository->get($identifier, Store::DEFAULT_STORE_ID); + } + } + + return $this->menu; + } + + /** + * @return mixed|null + * @throws NoSuchEntityException + */ + public function getMenu() + { + $menu = $this->loadMenu(); + if (!$menu || !$menu->getMenuId()) { + return null; + } + + return $menu; + } + + /** + * @inheritDoc + */ + public function getCacheKeyInfo() + { + $info = [ + 'gmt_navigation', + 'gmt_navigation_id_' . $this->getData('menu'), + 'gmt_navigation_type_' . $this->getData('menu_type'), + ]; + + if ($this->getWidget()) { + $info['builder_widget'] = $this->getWidget()->getId(); + } + + if ($this->moduleEnabled) { + $nodeCacheKeyInfo = $this->getNodeCacheKeyInfo(); + if ($nodeCacheKeyInfo) { + $info = array_merge($info, $nodeCacheKeyInfo); + } + } + + return $info; + } + + /** + * @return array + */ + private function getNodeCacheKeyInfo() + { + $info = []; + $nodeType = ''; + $request = $this->getRequest(); + + switch ($request->getRouteName()) { + case 'cms': + $nodeType = 'cms_page'; + break; + case 'catalog': + $nodeType = 'category'; + break; + } + + $transport = [ + 'node_type' => $nodeType, + 'request' => $request + ]; + + $transport = new DataObject($transport); + $this->_eventManager->dispatch( + 'snowdog_menu_cache_node_type', + ['transport' => $transport] + ); + + if ($transport->getNodeType()) { + $nodeType = $transport->getNodeType(); + } + + if ($nodeType) { + $info = $this->getNodeTypeProvider($nodeType)->getNodeCacheKeyInfo(); + } + + if ($this->getParentNode()) { + $info[] = 'parent_node_' . $this->getParentNode()->getNodeId(); + } + + return $info; + } + + /** + * @param string $nodeType + * @return bool + */ + public function isViewAllLinkAllowed($nodeType) + { + return $this->getNodeTypeProvider($nodeType)->isViewAllLinkAllowed(); + } + + /** + * @param mixed $node + * @return string + * @throws NoSuchEntityException + */ + public function renderViewAllLink($node) + { + return $this->getMenuNodeBlock($node) + ->setIsViewAllLink(true) + ->toHtml(); + } + + /** + * @param mixed $node + * @return string + * @throws NoSuchEntityException + */ + public function renderMenuNode($node) + { + return $this->getMenuNodeBlock($node)->toHtml(); + } + + /** + * @param array $nodes + * @param mixed $parentNode + * @param int $level + * @return string + * @throws NoSuchEntityException + */ + public function renderSubmenu($nodes, $parentNode, $level = 0) + { + return $nodes + ? $this->getSubmenuBlock($nodes, $parentNode, $level)->toHtml() + : ''; + } + + /** + * @param int $level + * @param mixed|null $parent + * @return array + */ + public function getNodesTree($level = 0, $parent = null) + { + $nodesTree = []; + $nodes = $this->getNodes($level, $parent); + + foreach ($nodes as $node) { + $nodesTree[] = [ + 'node' => $node, + 'children' => $this->getNodesTree($level + 1, $node) + ]; + } + + return $nodesTree; + } + + /** + * @param string $nodeType + * @return mixed + */ + public function getNodeTypeProvider($nodeType) + { + return $this->nodeTypeProvider->getProvider($nodeType); + } + + public function getNodes($level = 0, $parent = null) + { + if (empty($this->nodes)) { + $this->fetchData(); + } + if (!isset($this->nodes[$level])) { + return []; + } + $parentId = $parent !== null ? $parent['node_id'] : 0; + if (!isset($this->nodes[$level][$parentId])) { + return []; + } + return $this->nodes[$level][$parentId]; + } + + /** + * Builds HTML tag attributes from an array of attributes data + * + * @param array $array + * @return string + */ + public function buildAttrFromArray(array $array) + { + $attributes = []; + + foreach ($array as $attribute => $data) { + if (is_array($data)) { + $data = implode(' ', $data); + } + + $attributes[] = $attribute . '="' . $this->getEscaper()->escapeHtml($data) . '"'; + } + + return $attributes ? ' ' . implode(' ', $attributes) : ''; + } + + /** + * @param string $defaultClass + * @return string + * @throws NoSuchEntityException + */ + public function getMenuCssClass($defaultClass = '') + { + $menu = $this->getMenu(); + + if ($menu === null) { + return $defaultClass; + } + + return $menu->getCssClass(); + } + + /** + * @param mixed $node + * @return Template + * @throws NoSuchEntityException + */ + private function getMenuNodeBlock($node) + { + $nodeBlock = $this->getNodeTypeProvider($node->getType()); + + $level = $node->getLevel(); + $isRoot = 0 == $level; + $nodeBlock->setId($node->getNodeId()) + ->setTitle($node->getTitle()) + ->setLevel($level) + ->setIsRoot($isRoot) + ->setIsParent((bool) $node->getIsParent()) + ->setIsViewAllLink(false) + ->setContent($node->getContent()) + ->setNodeClasses($node->getClasses()) + ->setMenuClass($this->getMenu()->getCssClass()) + ->setMenuCode($this->getData('menu')) + ->setTarget($node->getTarget()) + ->setImage($node->getImage()) + ->setImageUrl($node->getImage() ? $this->imageFile->getUrl($node->getImage()) : null) + ->setImageAltText($node->getImageAltText()) + ->setCustomTemplate($node->getNodeTemplate()) + ->setAdditionalData($node->getAdditionalData()) + ->setSelectedItemId($node->getSelectedItemId()); + + return $nodeBlock; + } + + /** + * @param array $nodes + * @param mixed $parentNode + * @param int $level + * @return mixed + * @throws NoSuchEntityException + */ + private function getSubmenuBlock($nodes, $parentNode, $level = 0) + { + $block = clone $this; + $submenuTemplate = $parentNode->getSubmenuTemplate(); + $submenuTemplate = $submenuTemplate + ? 'Snowdog_Menu::' . $this->getMenu()->getIdentifier() . "/menu/custom/sub_menu/{$submenuTemplate}.phtml" + : $this->submenuTemplate; + + $block->setSubmenuNodes($nodes) + ->setParentNode($parentNode) + ->setLevel($level); + + $block->setTemplateContext($block); + $block->setTemplate($submenuTemplate); + + return $block; + } + + /** + * @return void + * @throws NoSuchEntityException + */ + private function fetchData() + { + $nodes = $this->nodeRepository->getByMenu($this->loadMenu()->getId()); + $result = []; + $types = []; + foreach ($nodes as $node) { + if (!$node->getIsActive()) { + continue; + } + + $level = $node->getLevel(); + $parent = $node->getParentId() ?: 0; + if (!isset($result[$level])) { + $result[$level] = []; + } + if (!isset($result[$level][$parent])) { + $result[$level][$parent] = []; + } + $result[$level][$parent][] = $node; + $type = $node->getType(); + if (!isset($types[$type])) { + $types[$type] = []; + } + $types[$type][] = $node; + } + $this->nodes = $result; + + foreach ($types as $type => $nodes) { + $this->nodeTypeProvider->prepareData($type, $nodes); + } + } + + private function renderNode($node, $level) + { + $type = $node->getType(); + return $this->nodeTypeProvider->render($type, $node->getId(), $level); + } + + /** + * @param string $template + * @return string + */ + private function getMenuTemplate($template) + { + return $this->templateResolver->getMenuTemplate( + $this, + $this->getData('menu'), + $template + ); + } + + /** + * @return string + */ + private function getSubmenuTemplate() + { + $baseSubmenuTemplate = $this->baseSubmenuTemplate; + if ($this->getData('subMenuTemplate')) { + $baseSubmenuTemplate = $this->getData('subMenuTemplate'); + } + + return $this->getMenuTemplate($baseSubmenuTemplate); + } +} \ No newline at end of file diff --git a/Block/Widgets/Product/ProductList.php b/Block/Widgets/Product/ProductList.php index 416693fb..241de972 100644 --- a/Block/Widgets/Product/ProductList.php +++ b/Block/Widgets/Product/ProductList.php @@ -8,6 +8,7 @@ namespace Goomento\PageBuilder\Block\Widgets\Product; +use Goomento\PageBuilder\Helper\EncryptorHelper; use Goomento\PageBuilder\Traits\TraitWidgetBlock; use Magento\Catalog\Model\Product\Attribute\Source\Status; use Magento\Catalog\Model\ResourceModel\Product\Collection; @@ -145,8 +146,10 @@ public function getCacheKeyInfo() { $keys = parent::getCacheKeyInfo(); if ($this->getWidget()) { - // Reference the key via widget Id - $keys['builder_widget'] = $this->getWidget()->getId(); + $settings = $this->getWidget()->getSettings(); + // Reference the key via widget settings + $keys['builder_cache_key'] = EncryptorHelper::uniqueId($settings); + $keys['builder_widget_id'] = $this->getWidget()->getId(); } return $keys; diff --git a/Builder/Base/AbstractDocumentType.php b/Builder/Base/AbstractDocumentType.php index f8540d17..f101b655 100644 --- a/Builder/Base/AbstractDocumentType.php +++ b/Builder/Base/AbstractDocumentType.php @@ -10,7 +10,9 @@ use Exception; use Goomento\PageBuilder\Builder\Controls\Groups\BackgroundGroup; +use Goomento\PageBuilder\Builder\Controls\Groups\TypographyGroup; use Goomento\PageBuilder\Builder\Managers\Controls; +use Goomento\PageBuilder\Builder\Schemes\Typography; use Goomento\PageBuilder\Helper\DataHelper; abstract class AbstractDocumentType extends AbstractDocument @@ -64,14 +66,7 @@ public static function registerStyleControls($document) $document->addGroupControl( BackgroundGroup::NAME, [ - 'name' => 'background', - 'fields_options' => [ - 'image' => [ - 'dynamic' => [ - 'active' => false, - ], - ], - ], + 'name' => 'background' ] ); diff --git a/Builder/Base/AbstractElement.php b/Builder/Base/AbstractElement.php index a6507bd6..6d6ec0bf 100644 --- a/Builder/Base/AbstractElement.php +++ b/Builder/Base/AbstractElement.php @@ -939,7 +939,7 @@ public function getParent() : ?AbstractElement */ public function getCacheKey() : string { - $settings = $this->getSettingsForDisplay(); + $settings = $this->getSettings(); $key = $settings['_cache_key'] ?? null; if (null === $key) { $key = EncryptorHelper::uniqueContextId($settings, 12); diff --git a/Builder/Base/AbstractWidget.php b/Builder/Base/AbstractWidget.php index 399f6c3b..cdfad56b 100644 --- a/Builder/Base/AbstractWidget.php +++ b/Builder/Base/AbstractWidget.php @@ -141,7 +141,7 @@ public function getRenderer() */ protected function render() { - if ($this->getTemplate()) { + if ($this->getTemplate() || $this->getRenderer()) { return TemplateHelper::getWidgetHtml($this); } } diff --git a/Builder/DynamicTags/PageBuilderContents.php b/Builder/DynamicTags/PageBuilderContents.php index 59f42641..02bfd21d 100644 --- a/Builder/DynamicTags/PageBuilderContents.php +++ b/Builder/DynamicTags/PageBuilderContents.php @@ -11,7 +11,7 @@ use Goomento\PageBuilder\Block\Content; use Goomento\PageBuilder\Builder\Base\AbstractTag; use Goomento\PageBuilder\Builder\Managers\Tags; -use Goomento\PageBuilder\Builder\Widgets\PageBuilderContent; +use Goomento\PageBuilder\Builder\Widgets\PageBuilder; use Goomento\PageBuilder\Helper\ObjectManagerHelper; class PageBuilderContents extends AbstractTag @@ -55,7 +55,7 @@ public function getTitle() */ protected function registerControls() { - PageBuilderContent::registerPageBuilderContentInterface($this, static::NAME . '_'); + PageBuilder::registerPageBuilderContentInterface($this, static::NAME . '_'); } /** diff --git a/Builder/Elements/Section.php b/Builder/Elements/Section.php index 9e5bc814..29fde224 100644 --- a/Builder/Elements/Section.php +++ b/Builder/Elements/Section.php @@ -458,169 +458,6 @@ protected function registerControls() $this->endControlsSection(); - $this->startControlsSection( - 'section_type_section', - [ - 'label' => __('Section Type'), - 'tab' => Controls::TAB_LAYOUT, - ] - ); - - $this->addControl( - 'section_type', - [ - 'label' => __('Type'), - 'type' => Controls::SELECT, - 'prefix_class' => 'gmt-section-type-', - 'default' => '', - 'options' => [ - '' => __('Default'), - 'popup' => __('Popup'), - ], - ] - ); - - $this->endControlsSection(); - - // Popup Section - $this->startControlsSection( - 'section_popup_section', - [ - 'label' => __('Popup'), - 'tab' => Controls::TAB_LAYOUT, - 'condition' => [ - 'section_type' => 'popup' - ] - ] - ); - - $this->addControl( - 'popup_note', - [ - 'type' => Controls::RAW_HTML, - 'raw' => __('Note: CSS ID must be placed in tab Advanced > Identify > CSS ID. .'), - 'content_classes' => 'gmt-panel-alert gmt-panel-alert-warning', - ] - ); - - $this->addControl( - 'popup_title', - [ - 'label' => __('Title'), - 'type' => Controls::TEXT, - 'frontend_available' => true, - 'placeholder' => __('Popup Title'), - ] - ); - - $this->addControl( - 'popup_buttons', - [ - 'label' => __('Buttons'), - 'type' => Controls::SELECT, - 'default' => 'close', - 'options' => [ - 'none' => __('None'), - 'close' => __('Close Button'), - 'confirm' => __('Confirm Button'), - 'both' => __('Both'), - ] - ] - ); - - $this->addControl( - 'popup_close_button', - [ - 'separator' => 'before', - 'label' => __('Close Button'), - 'type' => Controls::HEADING, - 'condition' => [ - 'popup_buttons' => ['close', 'both'] - ] - ] - ); - - $this->addControl( - 'popup_close_button_text', - [ - 'label' => __('Label'), - 'type' => Controls::TEXT, - 'frontend_available' => true, - 'condition' => [ - 'popup_buttons' => ['close', 'both'] - ] - ] - ); - - $this->addControl( - 'popup_close_button_css_classes', - [ - 'label' => __('CSS Classes'), - 'type' => Controls::TEXT, - 'default' => '', - 'prefix_class' => '', - 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class'), - 'frontend_available' => true, - 'condition' => [ - 'popup_buttons' => ['close', 'both'] - ] - ] - ); - - $this->addControl( - 'section_popup_confirm_button', - [ - 'separator' => 'before', - 'label' => __('Confirm Button'), - 'type' => Controls::HEADING, - 'condition' => [ - 'popup_buttons' => ['confirm', 'both'] - ] - ] - ); - - $this->addControl( - 'popup_confirm_button_text', - [ - 'label' => __('Text'), - 'type' => Controls::TEXT, - 'frontend_available' => true, - 'condition' => [ - 'popup_buttons' => ['confirm', 'both'] - ] - ] - ); - - $this->addControl( - 'popup_confirm_button_link', - [ - 'label' => __('Link'), - 'type' => Controls::URL, - 'frontend_available' => true, - 'placeholder' => __('https://your-link.com'), - 'condition' => [ - 'popup_buttons' => ['confirm', 'both'] - ] - ] - ); - - $this->addControl( - 'popup_confirm_button_css_classes', - [ - 'label' => __('CSS Classes'), - 'type' => Controls::TEXT, - 'default' => '', - 'frontend_available' => true, - 'prefix_class' => '', - 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class'), - 'condition' => [ - 'popup_buttons' => ['confirm', 'both'] - ] - ] - ); - - $this->endControlsSection(); - // Section Structure $this->startControlsSection( 'section_structure', diff --git a/Builder/Sources/Local.php b/Builder/Sources/Local.php index 343316b5..78447195 100644 --- a/Builder/Sources/Local.php +++ b/Builder/Sources/Local.php @@ -529,7 +529,7 @@ private function getJsonName($exportData) { $title = $exportData['title']; $time = date('\[Y-m-d_h.iA\]'); - return sprintf('Goomento-Pagebuilder_%s_%s.json', EscaperHelper::slugify($title, '-'), $time); + return sprintf('pagebuilder_%s_%s.json', EscaperHelper::slugify($title, '-'), $time); } /** diff --git a/Builder/Widgets/Banner.php b/Builder/Widgets/Banner.php index b8b270a0..e74206c8 100644 --- a/Builder/Widgets/Banner.php +++ b/Builder/Widgets/Banner.php @@ -8,7 +8,6 @@ namespace Goomento\PageBuilder\Builder\Widgets; -use Goomento\PageBuilder\Builder\Base\AbstractElement; use Goomento\PageBuilder\Builder\Base\AbstractWidget; use Goomento\PageBuilder\Builder\Base\ControlsStack; use Goomento\PageBuilder\Builder\Controls\Groups\CssFilterGroup; @@ -95,8 +94,8 @@ public static function registerBannerInterface( $prefix . 'caption', [ 'label' => __('Caption'), - 'type' => Controls::TEXTAREA, - 'default' => __('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.'), + 'type' => Controls::WYSIWYG, + 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'placeholder' => __('Enter your caption'), ] ); @@ -110,6 +109,19 @@ public static function registerBannerInterface( 'separator' => 'before', ] ); + + $widget->addControl( + $prefix . 'button_show', + [ + 'label' => __('Show Button'), + 'type' => Controls::SWITCHER, + 'separator' => 'before', + ] + ); + + $prefixKey = self::buildPrefixKey(Button::NAME); + + Button::registerButtonInterface($widget, $prefixKey); } /** @@ -256,37 +268,221 @@ public static function registerCaptionStyle( ) { Text::registerTextStyle($widget, $prefix, $cssTarget); - $widget->addResponsiveControl( + $widget->addControl( $prefix . 'position', [ - 'label' => __('Position'), - 'type' => Controls::SELECT, - 'default' => 'bottom-right', + 'label' => __('Custom Position'), + 'type' => Controls::SWITCHER, + 'separator' => 'before', + 'default' => '', + ] + ); + + $start = DataHelper::isRtl() ? __('Right') : __('Left'); + $end = !DataHelper::isRtl() ? __('Right') : __('Left'); + + $widget->addControl( + $prefix . 'offset_orientation_h', + [ + 'label' => __('Horizontal Orientation'), + 'type' => Controls::CHOOSE, + 'label_block' => false, + 'toggle' => false, + 'default' => 'start', 'options' => [ - 'top-left' => __('Top Left'), - 'top-center' => __('Top Center'), - 'top-right' => __('Top Right'), - 'middle-left' => __('Middle Left'), - 'middle-center' => __('Middle Center'), - 'middle-right' => __('Middle Right'), - 'bottom-left' => __('Bottom Left'), - 'bottom-center' => __('Bottom Center'), - 'bottom-right' => __('Bottom Right') + 'start' => [ + 'title' => $start, + 'icon' => 'fas fa-chevron-left', + ], + 'end' => [ + 'title' => $end, + 'icon' => 'fas fa-chevron-right', + ], + ], + 'classes' => 'gmt-control-start-end', + 'render_type' => 'ui', + 'condition' => [ + $prefix . 'position' => 'yes', ], ] ); $widget->addResponsiveControl( - $prefix . 'padding', + $prefix . 'offset_x', [ - 'label' => __('Padding'), + 'label' => __('Offset'), 'type' => Controls::SLIDER, + 'range' => [ + 'px' => [ + 'min' => -1000, + 'max' => 1000, + 'step' => 1, + ], + '%' => [ + 'min' => -200, + 'max' => 200, + ], + 'vw' => [ + 'min' => -200, + 'max' => 200, + ], + 'vh' => [ + 'min' => -200, + 'max' => 200, + ], + ], 'default' => [ - 'size' => 10, - 'unit' => 'px', + 'size' => '0', ], + 'size_units' => [ 'px', '%', 'vw', 'vh' ], 'selectors' => [ - '{{WRAPPER}} ' . $cssTarget => 'padding: {{SIZE}}{{UNIT}};', + 'body:not(.rtl) {{WRAPPER}} ' . $cssTarget => 'left: {{SIZE}}{{UNIT}}', + 'body.rtl {{WRAPPER}} ' . $cssTarget => 'right: {{SIZE}}{{UNIT}}', + ], + 'condition' => [ + $prefix . 'offset_orientation_h!' => 'end', + $prefix . 'position' => 'yes', + ], + ] + ); + + $widget->addResponsiveControl( + $prefix . 'offset_x_end', + [ + 'label' => __('Offset'), + 'type' => Controls::SLIDER, + 'separator' => 'before', + 'range' => [ + 'px' => [ + 'min' => -1000, + 'max' => 1000, + 'step' => 0.1, + ], + '%' => [ + 'min' => -200, + 'max' => 200, + ], + 'vw' => [ + 'min' => -200, + 'max' => 200, + ], + 'vh' => [ + 'min' => -200, + 'max' => 200, + ], + ], + 'default' => [ + 'size' => '0', + ], + 'size_units' => [ 'px', '%', 'vw', 'vh' ], + 'selectors' => [ + 'body:not(.rtl) {{WRAPPER}} ' . $cssTarget => 'right: {{SIZE}}{{UNIT}}', + 'body.rtl {{WRAPPER}} ' . $cssTarget => 'left: {{SIZE}}{{UNIT}}', + ], + 'condition' => [ + $prefix . 'offset_orientation_h' => 'end', + $prefix . 'position' => 'yes', + ], + ] + ); + + $widget->addControl( + $prefix . 'offset_orientation_v', + [ + 'label' => __('Vertical Orientation'), + 'type' => Controls::CHOOSE, + 'label_block' => false, + 'toggle' => false, + 'default' => 'start', + 'options' => [ + 'start' => [ + 'title' => __('Top'), + 'icon' => 'fas fa-chevron-up', + ], + 'end' => [ + 'title' => __('Bottom'), + 'icon' => 'fas fa-chevron-down', + ], + ], + 'render_type' => 'ui', + 'condition' => [ + $prefix . 'position' => 'yes', + ], + ] + ); + + $widget->addResponsiveControl( + $prefix . 'offset_y', + [ + 'label' => __('Offset'), + 'type' => Controls::SLIDER, + 'range' => [ + 'px' => [ + 'min' => -1000, + 'max' => 1000, + 'step' => 1, + ], + '%' => [ + 'min' => -200, + 'max' => 200, + ], + 'vh' => [ + 'min' => -200, + 'max' => 200, + ], + 'vw' => [ + 'min' => -200, + 'max' => 200, + ], + ], + 'size_units' => [ 'px', '%', 'vh', 'vw' ], + 'default' => [ + 'size' => '0', + ], + 'selectors' => [ + '{{WRAPPER}} ' . $cssTarget => 'top: {{SIZE}}{{UNIT}}', + ], + 'condition' => [ + $prefix . 'offset_orientation_v!' => 'end', + $prefix . 'position' => 'yes', + ], + ] + ); + + $widget->addResponsiveControl( + $prefix . 'offset_y_end', + [ + 'label' => __('Offset'), + 'type' => Controls::SLIDER, + 'range' => [ + 'px' => [ + 'min' => -1000, + 'max' => 1000, + 'step' => 1, + ], + '%' => [ + 'min' => -200, + 'max' => 200, + ], + 'vh' => [ + 'min' => -200, + 'max' => 200, + ], + 'vw' => [ + 'min' => -200, + 'max' => 200, + ], + ], + 'size_units' => [ 'px', '%', 'vh', 'vw' ], + 'default' => [ + 'size' => '0', + ], + 'selectors' => [ + '{{WRAPPER}} ' . $cssTarget => 'bottom: {{SIZE}}{{UNIT}}', + ], + 'condition' => [ + $prefix . 'offset_orientation_v' => 'end', + $prefix . 'position' => 'yes', ], ] ); @@ -295,6 +491,7 @@ public static function registerCaptionStyle( $prefix . 'margin', [ 'label' => __('Margin'), + 'separator' => 'before', 'type' => Controls::DIMENSIONS, 'size_units' => [ 'px', '%', 'rem' ], 'selectors' => [ @@ -303,11 +500,28 @@ public static function registerCaptionStyle( ] ); + $widget->addResponsiveControl( + $prefix . 'padding', + [ + 'label' => __('Padding'), + 'type' => Controls::SLIDER, + 'size_units' => [ '%', 'px'], + 'default' => [ + 'size' => 10, + 'unit' => 'px', + ], + 'selectors' => [ + '{{WRAPPER}} ' . $cssTarget => 'padding: {{SIZE}}{{UNIT}};', + ], + ] + ); + $widget->addResponsiveControl( $prefix . 'width', [ 'label' => __('Width'), 'type' => Controls::SLIDER, + 'separator' => 'before', 'default' => [ 'size' => 50, 'unit' => '%', @@ -316,7 +530,11 @@ public static function registerCaptionStyle( 'unit' => '%', 'size' => 80, ], - 'size_units' => [ '%' ], + 'mobile_default' => [ + 'unit' => '%', + 'size' => 100, + ], + 'size_units' => [ '%'], 'range' => [ '%' => [ 'min' => 5, @@ -342,6 +560,85 @@ public static function registerCaptionStyle( ); } + /** + * @param ControlsStack $widget + * @param string $prefix + * @param string|array $cssTargets + * @param string $cssFitTarget + * @return void + * @throws BuilderException + */ + public static function registerScreenFitStyle( + ControlsStack $widget, + string $prefix = self::NAME . '_', + $cssTargets = '.gmt-banner-wrapper', + $cssFitTarget = 'img' + ) + { + $cssTargets = (array) $cssTargets; + $selectors = []; + foreach ($cssTargets as $cssTarget) { + $selectors['{{WRAPPER}} ' . $cssTarget] = 'height: {{SIZE}}{{UNIT}};'; + } + + $selectors['{{WRAPPER}} ' . $cssFitTarget] = 'height: 100%;object-fit: cover;display: block;width: auto;max-height: 100%;'; + + $widget->addResponsiveControl( + $prefix . 'image_height', + [ + 'label' => __('Fit Height'), + 'type' => Controls::SLIDER, + 'selectors' => $selectors, + 'size_units' => [ 'vh', 'px'], + 'default' => [ + 'unit' => 'vh', + ], + 'tablet_default' => [ + 'unit' => 'vh', + ], + 'mobile_default' => [ + 'unit' => 'vh', + ], + 'range' => [ + 'vh' => [ + 'min' => 0, + 'max' => 100, + ], + 'px' => [ + 'min' => 10, + 'max' => 1200, + ], + ], + ] + ); + + $widget->addResponsiveControl( + $prefix . 'fit_object_position', + [ + 'label' => __('Fit position'), + 'type' => Controls::SELECT, + 'default' => 'center center', + 'options' => [ + 'top left' => __('Top Left'), + 'top center' => __('Top Center'), + 'top right' => __('Top Right'), + 'center left' => __('Center Left'), + 'center center' => __('Center Center'), + 'center right' => __('Center Right'), + 'bottom left' => __('Bottom Left'), + 'bottom center' => __('Bottom Center'), + 'bottom right' => __('Bottom Right') + ], + 'selectors' => [ + '{{WRAPPER}} ' . $cssFitTarget => 'object-position: {{VALUE}};' + ], + 'condition' => [ + $prefix . 'image_height!' => '' + ] + ] + ); + } + /** * @inheritDoc */ @@ -366,6 +663,11 @@ public function registerControls() ] ); + self::registerScreenFitStyle($this, self::buildPrefixKey('screen_fit'), [ + '.gmt-banner-wrapper', + '.gmt-banner-img' + ]); + self::registerImageStyle($this, self::buildPrefixKey('image')); $this->endControlsSection(); @@ -382,6 +684,18 @@ public function registerControls() $this->endControlsSection(); + $this->startControlsSection( + 'section_button_style', + [ + 'label' => __('Button'), + 'tab' => Controls::TAB_STYLE, + ] + ); + + Button::registerButtonStyle($this, self::buildPrefixKey()); + + $this->endControlsSection(); + $this->startControlsSection( 'section_style_content', [ diff --git a/Builder/Widgets/BannerSlider.php b/Builder/Widgets/BannerSlider.php index fa4fce13..b348aa81 100644 --- a/Builder/Widgets/BannerSlider.php +++ b/Builder/Widgets/BannerSlider.php @@ -83,13 +83,13 @@ public function registerControls() 'default' => [ [ $prefixKey . 'image' => DataHelper::getPlaceholderImageSrc(), - $prefixKey . 'title' => __('Lorem ipsum dolor sit amet.'), - $prefixKey . 'caption' => '', + $prefixKey . 'title' => 'Lorem ipsum dolor sit amet.', + $prefixKey . 'caption' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', ], [ $prefixKey . 'image' => DataHelper::getPlaceholderImageSrc(), - $prefixKey . 'title' => __('Lorem ipsum dolor sit amet.'), - $prefixKey . 'caption' => '', + $prefixKey . 'title' => 'Lorem ipsum dolor sit amet.', + $prefixKey . 'caption' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', ] ], 'title_field' => '{{{ obj["' . $prefixKey . 'title"] }}}', @@ -146,6 +146,11 @@ public function registerControls() ] ); + Banner::registerScreenFitStyle($this, self::buildPrefixKey('screen_fit'), [ + '.gmt-banner-wrapper', + '.gmt-banner-img' + ]); + ImageCarousel::registerImageStyle($this, '', '.gmt-banner-carousel'); $this->endControlsSection(); @@ -162,6 +167,18 @@ public function registerControls() $this->endControlsSection(); + $this->startControlsSection( + 'section_button_style', + [ + 'label' => __('Button'), + 'tab' => Controls::TAB_STYLE, + ] + ); + + Button::registerButtonStyle($this, self::buildPrefixKey()); + + $this->endControlsSection(); + $this->startControlsSection( 'section_style_content', [ diff --git a/Builder/Widgets/CallToAction.php b/Builder/Widgets/CallToAction.php deleted file mode 100644 index c352f928..00000000 --- a/Builder/Widgets/CallToAction.php +++ /dev/null @@ -1,190 +0,0 @@ -addControl( - $prefix . 'trigger', - [ - 'label' => __('Trigger when'), - 'type' => Controls::SELECT, - 'default' => 'load', - 'options' => [ - 'load' => __('Page loaded'), - 'timeout' => __('After timeout'), - 'click' => __('Click on element'), - ], - ] - ); - - $widget->addControl( - $prefix . 'trigger_id', - [ - 'label' => __('Trigger CSS ID'), - 'description' => __('CSS ID of the Element, which might be found under Advanced > Identify > CSS ID.'), - 'type' => Controls::TEXT, - 'condition' => [ - $prefix . 'trigger' => 'click' - ] - ] - ); - - $widget->addControl( - $prefix . 'action', - [ - 'label' => __('Action'), - 'description' => __('Active this section when matching the trigger.'), - 'type' => Controls::SELECT, - 'default' => 'show_popup', - 'options' => [ - 'code' => __('Insert HTML/JS/CSS'), - 'show_popup' => __('Open Popup'), - 'hide_popup' => __('Close Popup'), - 'show_element' => __('Show Element'), - 'hide_element' => __('Hide Element'), - ], - ] - ); - - $widget->addControl( - $prefix . 'code', - [ - 'label' => __('Code'), - 'description' => __('JS/CSS must be wrapped into `script` or `style` tag.'), - 'type' => Controls::CODE, - 'language' => 'html', - 'condition' => [ - $prefix . 'action' => 'code' - ] - ] - ); - - $widget->addControl( - $prefix . 'timout', - [ - 'label' => __('Second(s)'), - 'description' => __('Trigger after amount of seconds.'), - 'type' => Controls::NUMBER, - 'default' => 10, // 10 seconds - 'condition' => [ - $prefix . 'trigger' => 'timeout' - ] - ] - ); - - $widget->addControl( - $prefix . 'target_id', - [ - 'label' => __('Target CSS ID'), - 'description' => __('CSS ID of the Element, which might be found under Advanced > Identify > CSS ID.'), - 'type' => Controls::TEXT, - 'condition' => [ - $prefix . 'action!' => 'code' - ] - ] - ); - - $widget->addControl( - $prefix . 'remember_in_seconds', - [ - 'label' => __('Remember trigger in (seconds)'), - 'description' => __('Remember this trigger, then ignore it in amount of seconds. For example: can use for displaying popup once per year to customer.'), - 'type' => Controls::NUMBER, - 'default' => '0', - 'condition' => [ - $prefix . 'trigger!' => 'click' - ] - ] - ); - } - - /** - * @inheritDoc - */ - protected function registerControls() - { - $this->startControlsSection( - 'calltoaction_action_section', - [ - 'label' => __('Define Action'), - ] - ); - - self::registerAction($this); - - $this->endControlsSection(); - } - - /** - * @return bool - */ - protected function renderPreview(): bool - { - return false; - } -} diff --git a/Builder/Widgets/Common.php b/Builder/Widgets/Common.php index 5c3f811c..4ce23025 100644 --- a/Builder/Widgets/Common.php +++ b/Builder/Widgets/Common.php @@ -485,11 +485,11 @@ protected function registerControls() 'options' => [ 'start' => [ 'title' => $start, - 'icon' => 'fas fa-align-left', + 'icon' => 'fas fa-chevron-left', ], 'end' => [ 'title' => $end, - 'icon' => 'fas fa-align-right', + 'icon' => 'fas fa-chevron-right', ], ], 'classes' => 'gmt-control-start-end', diff --git a/Builder/Widgets/Navigation.php b/Builder/Widgets/Navigation.php index 96aa4205..22d12493 100644 --- a/Builder/Widgets/Navigation.php +++ b/Builder/Widgets/Navigation.php @@ -10,6 +10,7 @@ use Goomento\PageBuilder\Builder\Base\AbstractWidget; use Goomento\PageBuilder\Builder\Managers\Controls; +use Goomento\PageBuilder\Helper\DataHelper; use Goomento\PageBuilder\Helper\ObjectManagerHelper; // phpcs:disable Magento2.PHP.LiteralNamespaces.LiteralClassUsage @@ -28,7 +29,7 @@ class Navigation extends AbstractWidget /** * @inheirtDoc */ - protected $template = 'Goomento_PageBuilder::widgets/navigation.phtml'; + protected $renderer = \Goomento\PageBuilder\Block\Widgets\Navigation::class; /** * @inheritDoc @@ -187,7 +188,7 @@ protected function registerControls() */ private function getSnowDogMenuList() : array { - if (class_exists('\Snowdog\Menu\Model\MenuRepository') && empty($this->menuOptions)) { + if (DataHelper::isModuleOutputEnabled('Snowdog_Menu') && empty($this->menuOptions)) { /** @var \Snowdog\Menu\Model\MenuRepository $menuRepo */ $menuRepo = ObjectManagerHelper::get('Snowdog\Menu\Model\MenuRepository'); /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */ diff --git a/Builder/Widgets/PageBuilderContent.php b/Builder/Widgets/PageBuilder.php similarity index 94% rename from Builder/Widgets/PageBuilderContent.php rename to Builder/Widgets/PageBuilder.php index d580d61e..588c70f8 100644 --- a/Builder/Widgets/PageBuilderContent.php +++ b/Builder/Widgets/PageBuilder.php @@ -17,19 +17,19 @@ use Goomento\PageBuilder\Helper\StateHelper; use Goomento\PageBuilder\Model\Config\Source\PageList; -class PageBuilderContent extends AbstractWidget +class PageBuilder extends AbstractWidget { /** * @inheritDoc */ - const NAME = 'pagebuilder_content'; + const NAME = 'gmt_content'; /** * @inheritDoc */ public function getTitle() { - return __('Page Builder Content'); + return __('Page Builder'); } /** @@ -45,7 +45,7 @@ public function getKeywords() */ public function getCategories() { - return ['']; + return ['general']; } /** diff --git a/CHANGELOG.md b/CHANGELOG.md index 65c9ddc7..545ca188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Magento 2 Goomento Page Builder +## 0.5.1 Fixed bugs +- Fixed bug with preview +- Upgraded fontawesome to 5.15.4 +- Updated `Banner`, `Banner Slider`, `Navaigation` widgets +- Removed `Calltoaction` widget +- Removed In-section popup + ## 0.5.0 Added Dark mode - Seperated Editor JS libs with Magento - Updated color picker panel diff --git a/Controller/Adminhtml/Content/Importer.php b/Controller/Adminhtml/Content/Importer.php index aeba22fc..ab1f7665 100644 --- a/Controller/Adminhtml/Content/Importer.php +++ b/Controller/Adminhtml/Content/Importer.php @@ -116,11 +116,6 @@ protected function executePost() */ protected function executeGet() { - $this->messageManager->addNotice(sprintf( - 'For import Sample templates click %shere%s.', - '', - '' - )); return $this->renderPage(); } diff --git a/Controller/Adminhtml/Content/SampleImporter.php b/Controller/Adminhtml/Content/SampleImporter.php index 47cd9b24..23430d15 100644 --- a/Controller/Adminhtml/Content/SampleImporter.php +++ b/Controller/Adminhtml/Content/SampleImporter.php @@ -12,6 +12,7 @@ use Goomento\PageBuilder\Controller\Adminhtml\AbstractAction; use Goomento\PageBuilder\Helper\RegistryHelper; use Goomento\PageBuilder\Logger\Logger; +use Goomento\PageBuilder\PageBuilder; use Goomento\PageBuilder\Traits\TraitHttpPage; use Goomento\PageBuilder\Model\LocalSampleCollection; use Magento\Backend\App\Action\Context; @@ -60,6 +61,7 @@ public function __construct( public function execute() { try { + PageBuilder::initialize(); $allSamples = $this->localSampleCollection->getAllSamples(); RegistryHelper::register('all_import_samples', $allSamples); $isImport = (bool) $this->getRequest()->getParam('import'); diff --git a/Controller/Content/Canvas.php b/Controller/Content/Canvas.php index 4984a355..047b1442 100644 --- a/Controller/Content/Canvas.php +++ b/Controller/Content/Canvas.php @@ -50,13 +50,14 @@ public function execute() */ protected function getPageConfig() { - $layout = $this->getRequest()->getParam('layout', 'pagebuilder_content_1column'); + $layout = $this->getRequest()->getParam('layout'); + if (!$layout) { + $layout = $this->getContentLayout() ?: 'pagebuilder_content_1column'; + } return [ 'editable_title' => 'Preview: %1', - 'handler' => $layout ?: ( - $this->getContentLayout() ?: 'pagebuilder_content_1column' - ), + 'handler' =>$layout ]; } } diff --git a/EntryPoint.php b/EntryPoint.php index b3c50551..4673912c 100644 --- a/EntryPoint.php +++ b/EntryPoint.php @@ -56,8 +56,6 @@ public function init(array $buildSubject = []) return DataHelper::addResourceGlobally() || ThemeHelper::hasContentOnPage(); }); - HooksHelper::addAction('pagebuilder/register_scripts', [$this, 'beforeRegisterScripts'], 9); - // Register the widget to be used HooksHelper::addAction('pagebuilder/widgets/widgets_registered', [$this, 'registerWidgets']); @@ -66,15 +64,6 @@ public function init(array $buildSubject = []) HooksHelper::addAction('pagebuilder/register_scripts', [$this, 'registerScripts'], 8); } - /** - * Pre-define core script and library for use - * - * @return void - */ - public function beforeRegisterScripts() - { - } - /** * @inheritDoc */ @@ -118,6 +107,12 @@ public function registerScripts() ['jquery'] ); + ThemeHelper::registerScript( + 'mmenu', + 'Goomento_PageBuilder/js/view/mmenu-wrapper', + ['jquery'] + ); + ThemeHelper::registerScript( 'jquery-tipsy', 'Goomento_PageBuilder/js/view/tipsy-wrapper', @@ -134,11 +129,6 @@ public function registerScripts() 'Goomento_PageBuilder/js/widgets/banner-slider' ); - ThemeHelper::registerScript( - 'call-to-action', - 'Goomento_PageBuilder/js/widgets/call-to-action' - ); - ThemeHelper::registerScript( 'goomento-facebook-sdk', 'Goomento_PageBuilder/js/widgets/facebook-sdk' @@ -205,6 +195,11 @@ public function registerStyles() 'Goomento_PageBuilder/lib/font-awesome/css/all.min.css' ); + ThemeHelper::registerScript( + 'mmenu', + 'Goomento_PageBuilder/lib/mmenu/mmenu.min.css' + ); + ThemeHelper::registerStyle( 'hover-animation', 'Goomento_PageBuilder/lib/hover/hover.min.css' @@ -278,7 +273,6 @@ public function registerWidgets(Widgets $widgetsManager) Builder\Widgets\Testimonial::class, Builder\Widgets\Toggle::class, Builder\Widgets\AddToCartButton::class, - Builder\Widgets\CallToAction::class, Builder\Widgets\FacebookLike::class, Builder\Widgets\FacebookContent::class, Builder\Widgets\Magento\RecentlyViewedProducts::class, @@ -289,7 +283,7 @@ public function registerWidgets(Widgets $widgetsManager) Builder\Widgets\Magento\OrdersAndReturns::class, Builder\Widgets\PricingTable::class, Builder\Widgets\Navigation::class, - Builder\Widgets\PageBuilderContent::class, + Builder\Widgets\PageBuilder::class, ]; if (!DataHelper::isModuleOutputEnabled('Goomento_PageBuilderForm')) { diff --git a/Helper/TemplateHelper.php b/Helper/TemplateHelper.php index 512c905f..c389004e 100644 --- a/Helper/TemplateHelper.php +++ b/Helper/TemplateHelper.php @@ -52,11 +52,13 @@ public static function getHtml($template, array $params = []): string public static function getWidgetHtml(WidgetBase $widget, array $params = []): string { $params = array_merge($params, [ - 'template' => $widget->getTemplate(), 'builder_widget' => $widget, 'content' => $widget->getBuildableContent(), ]); - $renderer = $widget->getRenderer(); - return self::getHtml(!empty($renderer) ? $renderer : Widget::class, $params); + if ($widget->getTemplate()) { + $params['template'] = $widget->getTemplate(); + } + $renderer = $widget->getRenderer() && class_exists($widget->getRenderer()) ? $widget->getRenderer() : Widget::class; + return self::getHtml($renderer, $params); } } diff --git a/Model/LocalSampleCollection.php b/Model/LocalSampleCollection.php index 075174b2..fbe92fdf 100644 --- a/Model/LocalSampleCollection.php +++ b/Model/LocalSampleCollection.php @@ -9,6 +9,7 @@ namespace Goomento\PageBuilder\Model; use Goomento\PageBuilder\Api\Data\SampleImportInterface; +use Goomento\PageBuilder\Helper\HooksHelper; use Goomento\PageBuilder\Traits\TraitComponentsLoader; class LocalSampleCollection @@ -29,6 +30,9 @@ public function __construct( */ public function getAllSamples() { + if (!HooksHelper::didAction('pagebuilder/samples/sample_registered')) { + HooksHelper::doAction('pagebuilder/samples/sample_registered', $this); + } return $this->getComponents(); } @@ -40,4 +44,14 @@ public function getSample(string $name) { return $this->getComponent($name); } + + /** + * @param string $name + * @param mixed $model + * @return LocalSampleCollection + */ + public function setSample(string $name, $model) + { + return $this->setComponent($name, $model); + } } diff --git a/PageBuilder.php b/PageBuilder.php index fe780095..6d85bd64 100644 --- a/PageBuilder.php +++ b/PageBuilder.php @@ -150,7 +150,7 @@ public function getAreaScopes() $scopes = [ 'pagebuilder_content_editor', 'pagebuilder_ajax_json', - 'pagebuilder_content_preview', + 'pagebuilder_content_canvas', 'pagebuilder_content_view', ]; diff --git a/README.md b/README.md index ef50f4f1..46975208 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ You can build and customize every part of the Magento website visually at the builder editor by adding text, images, videos, animations, CSS and more, all with just a few clicks without writing a single line of code. Magento store owners can view changes in Magento with 100% accuracy, drag and drop to configure, share content between websites and redesign with new creativity + ### Table of contents [Installation](#install-goomento) @@ -13,15 +14,17 @@ Magento store owners can view changes in Magento with 100% accuracy, drag and dr [Version Compatible](#version-compatible) +[Themes Compatible](#themes-compatible) + [Demo](https://goomento.com/goomento-the-free-magento-page-builder-extension) [Setup](#setup) -[Custom Templates](#custom-templates) +[Custom Templates - Frontend Tasks](https://github.com/Goomento/PageBuilder/wiki/Custom-Theme-Frontend-Tasks) [Change Log](https://github.com/Goomento/PageBuilder/blob/master/CHANGELOG.md) -[List Of Widgets](#list-of-widgets) +[List Of Widgets](https://github.com/Goomento/PageBuilder/wiki/Magento-Page-Builder-Widgets) [User Guide & DevDoc](https://github.com/Goomento/PageBuilder/wiki/) @@ -78,93 +81,24 @@ or template `.phtml` file Editor: [https://goomento.com](https://goomento.com/goomento-the-free-magento-page-builder-extension) -## Custom Templates - -Goomento also allows to make a taylor styling of widget, hence will be a good fit to your theme, -to do that, create directories inside your theme files that will contain the custom resources with the following structure. - -``` -app/design/frontend// -├── / -│ ├── Goomento_PageBuilder/ -│ │ ├── templates -│ │ │ ├── widgets -│ │ │ │ ├── -│ │ │── web -│ │ │ ├── css -│ │ │ │ ├── widgets -│ │ │ │ │ ├── -│ │ │ ├── js -│ │ │ │ ├── widgets -│ │ │ │ │ ├── -``` - -- `` is `.phtml` file - which copied from [templates directory](https://github.com/Goomento/PageBuilder/tree/master/view/frontend/templates/widgets). - -- `` is `.less` file - which copied from [css directory](https://github.com/Goomento/PageBuilder/tree/master/view/frontend/web/css/widgets). - -- `` is `.js` file - which copied from [js directory](https://github.com/Goomento/PageBuilder/tree/master/view/frontend/web/js/widgets). - -- For configurable of widget, check out this [widget directory](https://github.com/Goomento/PageBuilder/tree/master/Builder/Widgets) - ## Version Compatible -Magento Community Edition (CE): 2.3.x, 2.4.0 - 2.4.5*, 2.4.6 - -Magento Enterprise Edition (EE): 2.3.x, 2.4.0 - 2.4.5*, 2.4.6 - -## List Of Widgets - -### Basic pack: -- Text -- HTML -- Magento Block -- Section/ Column -- Image -- Icon -- Banner -- Spacer -- Video -- Text Editor -- Google Maps - -### General pack: - -- Accordion -- Tabs -- Toggles -- Alert -- Audio -- Countdown -- Divider -- Icon Box -- Icon List -- Image Box -- Progress Bar -- Social Icons -- Star Rating -- Banner Slider (Carousel) -- Image Slider (Carousel) -- Testimonial -- Call To Action (CTA) -- Popup (Set section as a popup/modal) -- Facebook Like + Comment -- Facebook Pages + Post + Video -- Navigation (Menu) - -### Product pack: - -- Add To Cart Button -- Product List -- Product Slider (Carousel) -- Pricing Table - -### Magento pack: -- Recently Viewed Products -- Recently Compared Products -- New Products -- Orders And Returns - -### Form builder pack: -- [Form Builder](https://goomento.com/magento-form-builder) -- [Multistep Form Builder](https://goomento.com/magento-form-builder) +| Magento Version | 2.3.x | 2.4.0 - 2.4.5-p3 | 2.4.6, 2.4.6-p1 | +|:------------------------|:------|:-----------------|:----------------| +| Community Edition (CE) | ✅ | ✅ | ✅ | +| Enterprise Edition (EE) | ✅ | ✅ | ✅ | + +## Themes Compatible + +> Currently, Goomento doesn't fully cooperate with headless/ PWA solutions such as Venia and Hyvä. +Other themes such as Luma, Porto, Fastest ... are the best fit. We will soon adapt to all kind of themes. + +| Theme Name | Compatible | +|:-------------|:-----------| +| Blank + Luma | ✅ | +| Hyvä | ❌ | +| PWA Themes | ❌ | +| Porto | ✅ | +| Fastest | ✅ | +| Market | ✅ | +| Other Themes | ☑️ | \ No newline at end of file diff --git a/composer.json b/composer.json index d1516de7..abab0f1e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "goomento/module-page-builder", "description": "Goomento - The Free Magento Page Builder Extension, allows you to create unique Magento websites, landing pages using advanced animations, custom CSS, responsive designs, and more, without a line of code.", "type": "magento2-module", - "version": "0.5.0", + "version": "0.5.1", "license": [ "OSL-3.0" ], @@ -50,7 +50,7 @@ "goomento/module-core": ">=1.0.12", "goomento/module-page-builder-api": ">=1.0.0", "goomento/module-page-builder-sample-data": ">=1.0.0", - "snowdog/module-menu": ">=2.8.0" + "snowdog/module-menu": "^2.20" }, "minimum-stability": "dev" } diff --git a/view/adminhtml/templates/content/import_template.phtml b/view/adminhtml/templates/content/import_template.phtml index ece72ba7..28c512a5 100644 --- a/view/adminhtml/templates/content/import_template.phtml +++ b/view/adminhtml/templates/content/import_template.phtml @@ -12,6 +12,13 @@ declare(strict_types=1); use Magento\Backend\Block\Template; ?> +
- + + +
diff --git a/view/base/web/build/common-modules.min.js b/view/base/web/build/common-modules.min.js index 200e84af..bf724191 100644 --- a/view/base/web/build/common-modules.min.js +++ b/view/base/web/build/common-modules.min.js @@ -1 +1 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n,r=e();for(n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,function(){return n=[function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},function(t,e,n){t.exports=n(125)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var o=n(2);function r(t,e){for(var n=0;ndocument.F=Object<\/script>"),t.close(),c=t.F;e--;)delete c.prototype[u[e]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),i=n(16),u=n(52),a=n(11),c=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=i(t),e=u(e,!0),c)try{return s(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(39).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(23)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0>>0,f=new RegExp(t.source,a+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>c&&(u.push(n.slice(c,r.index)),1>>0;if(0==a)return[];if(0===r.length)return null===_(u,r)?[r]:[];for(var c=0,s=0,f=[];so;)!u(r,n=e[o++])||~c(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var m=n(36),x=n(7),b=n(74),_=n(19),w=n(43),S=n(152),O=n(49),M=n(61),k=n(15)("iterator"),j=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,i,u){S(n,e,r);function a(t){if(!j&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var c,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],h=d||a(o),v=o?f?a("entries"):h:void 0,y="Array"==e&&p.entries||d;if(y&&(y=M(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),m||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,h=function(){return d.call(this)}),m&&!u||!j&&!l&&p[k]||_(p,k,h),w[e]=h,w[r]=g,o)if(c={values:f?h:a("values"),keys:i?h:a("keys"),entries:v},u)for(s in c)s in p||b(p,s,c[s]);else x(x.P+x.F*(j||l),e,c);return c}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},,,,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,c=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),h=p("species"),v=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var i,r,o=p(n),u=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=u?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[h]=function(){return e}),e[o](""),!t}):void 0;u&&a&&("replace"!==n||v)&&("split"!==n||y)||(i=/./[o],e=(a=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?u&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=a[1],c(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(26),o=n(105),c=n(27),s=n(106),f=n(34),l=[].slice;r(r.P+r.F*n(21)(function(){o&&l.call(o)}),"Array",{slice:function(t,e){var n=f(this.length),r=c(this);if(e=void 0===e?n:e,"Array"==r)return l.call(this,t,e);for(var o=s(t,n),t=s(e,n),i=f(t-o),u=new Array(i),a=0;ao;)s(T,e=n[o++])||e==j||e==D||r.push(e);return r}function a(t){for(var e,n=t===C,r=Y(n?P:m(t)),o=[],i=0;r.length>i;)!s(T,e=r[i++])||n&&!s(C,e)||o.push(T[e]);return o}var c=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),h=t(55),v=t(49),$=t(37),y=t(15),V=t(57),H=t(58),B=t(146),G=t(102),g=t(13),Q=t(9),W=t(29),m=t(16),x=t(52),b=t(31),_=t(35),z=t(147),K=t(40),w=t(69),U=t(14),J=t(32),X=K.f,S=U.f,Y=z.f,O=c.Symbol,M=c.JSON,k=M&&M.stringify,j=y("_hidden"),q=y("toPrimitive"),Z={}.propertyIsEnumerable,E=h("symbol-registry"),T=h("symbols"),P=h("op-symbols"),C=Object.prototype,h="function"==typeof O&&!!w.f,R=c.QObject,L=!R||!R.prototype||!R.prototype.findChild,A=f&&d(function(){return 7!=_(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=X(C,e);r&&delete C[e],S(t,e,n),r&&t!==C&&S(C,e,r)}:S,I=h&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};h||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=$(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)H(nt[rt++]);l(l.S+l.F*!h,"Symbol",{for:function(t){return s(E,t+="")?E[t]:E[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in E)if(E[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!h,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:i,getOwnPropertySymbols:a});R=d(function(){w.f(1)});l(l.S+l.F*R,"Object",{getOwnPropertySymbols:function(t){return w.f(W(t))}}),M&&l(l.S+l.F*(!h||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;ou;)i.call(t,r=o[u++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return u.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var i=n(53),u=n(42);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},,,function(t,e,n){var r=n(24),o=n(27),i=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){t.exports=n(184)},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},,function(t,e,n){var i=n(46),u=n(38);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319>>0||(i.test(t)?16:10))}:r},function(t,e,n){function r(t,e,n){var r={},o=u(function(){return!!a[t]()||"​…"!="​…"[t]()}),e=r[t]=o?e(f):a[t];n&&(r[n]=e),i(i.P+i.F*o,"String",r)}var i=n(7),o=n(42),u=n(18),a=n(161),n="["+a+"]",c=RegExp("^"+n+n+"*"),s=RegExp(n+n+"*$"),f=r.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),t=2&e?t.replace(s,""):t};t.exports=r},,,,,,,,function(t,e,n){"use strict";function r(){var o,i=jQuery,t=arguments,u=this,r={};this.getItems=function(t,e){var n;return e?(n=(e=e.split(".")).splice(0,1),e.length?t[n]?this.getItems(t[n],e.join(".")):void 0:t[n]):t},this.getSettings=function(t){return this.getItems(o,t)},this.setSettings=function(t,e,n){var r;return n=n||o,"object"===(0,a.default)(t)?(i.extend(n,t),u):(r=(t=t.split(".")).splice(0,1),t.length?(n[r]||(n[r]={}),u.setSettings(t.join("."),e,n[r])):(n[r]=e,u))},this.getErrorMessage=function(t,e){t="forceMethodImplementation"===t?"The method '".concat(e,"' must to be implemented in the inheritor child."):"An error occurs";return t},this.forceMethodImplementation=function(t){throw new Error(this.getErrorMessage("forceMethodImplementation",t))},this.on=function(t,e){return"object"===(0,a.default)(t)?i.each(t,function(t){u.on(t,this)}):t.split(" ").forEach(function(t){r[t]||(r[t]=[]),r[t].push(e)}),u},this.off=function(t,e){return r[t]&&(e?-1!==(e=r[t].indexOf(e))&&delete r[t][e]:delete r[t]),u},this.trigger=function(t){var e="on"+t[0].toUpperCase()+t.slice(1),n=Array.prototype.slice.call(arguments,1),e=(u[e]&&u[e].apply(u,n),r[t]);return e&&i.each(e,function(t,e){e.apply(u,n)}),u},u.__construct.apply(u,t),i.each(u,function(t){var e=u[t];"function"==typeof e&&(u[t]=function(){return e.apply(u,arguments)})}),o=u.getDefaultSettings(),(t=t[0])&&i.extend(!0,o,t),u.trigger("init")}var o=n(0),i=o(n(107)),a=o(n(65));n(76),n(113),n(41);r.prototype.__construct=function(){},r.prototype.getDefaultSettings=function(){return{}},r.prototype.getConstructorID=function(){return this.constructor.name},r.extend=function(t){function e(){return r.apply(this,arguments)}var n=jQuery,r=this;return n.extend(e,r),((e.prototype=(0,i.default)(n.extend({},r.prototype,t))).constructor=e).__super__=r.prototype,e},t.exports=r},function(t,e,n){"use strict";n=n(0)(n(195));t.exports=n.default.extend({elements:null,getDefaultElements:function(){return{}},bindEvents:function(){},onInit:function(){this.initElements(),this.bindEvents()},initElements:function(){this.elements=this.getDefaultElements()}})},,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),c=i(n(6)),s=i(n(218)),f=i(n(219)),l=i(n(220)),n=(i=Marionette.LayoutView,(0,a.default)(p,i),r=(0,c.default)(p),(0,o.default)(p,[{key:"el",value:function(){return this.getModal().getElements("widget")}},{key:"regions",value:function(){return{modalHeader:".dialog-header",modalContent:".dialog-lightbox-content",modalLoading:".dialog-lightbox-loading"}}},{key:"initialize",value:function(){this.modalHeader.show(new s.default(this.getHeaderOptions()))}},{key:"getModal",value:function(){return this.modal||this.initModal(),this.modal}},{key:"initModal",value:function(){var t={className:"gmt-templates-modal",closeButton:!1,draggable:!1,hide:{onOutsideClick:!1,onEscKeyPress:!1}};jQuery.extend(!0,t,this.getModalOptions()),this.modal=goomentoCommon.dialogsManager.createWidget("lightbox",t),this.modal.getElements("message").append(this.modal.addElement("content"),this.modal.addElement("loading")),t.draggable&&this.draggableModal()}},{key:"showModal",value:function(){this.getModal().show()}},{key:"hideModal",value:function(){this.getModal().hide()}},{key:"draggableModal",value:function(){var t=this.getModal().getElements("widgetContent");t.draggable({containment:"parent",stop:function(){t.height("")}}),t.css("position","absolute")}},{key:"getModalOptions",value:function(){return{}}},{key:"getLogoOptions",value:function(){return{}}},{key:"getHeaderOptions",value:function(){return{closeType:"normal"}}},{key:"getHeaderView",value:function(){return this.modalHeader.currentView}},{key:"showLoadingView",value:function(){this.modalLoading.show(new l.default),this.modalLoading.$el.show(),this.modalContent.$el.hide()}},{key:"hideLoadingView",value:function(){this.modalContent.$el.show(),this.modalLoading.$el.hide()}},{key:"showLogo",value:function(){this.getHeaderView().logoArea.show(new f.default(this.getLogoOptions()))}}]),p);function p(){return(0,u.default)(this,p),r.apply(this,arguments)}e.default=n},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.LayoutView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"className",value:function(){return"gmt-templates-modal__header"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header"}},{key:"regions",value:function(){return{logoArea:".gmt-templates-modal__header__logo-area",tools:"#gmt-template-library-header-tools",menuArea:".gmt-templates-modal__header__menu-area"}}},{key:"ui",value:function(){return{closeModal:".gmt-templates-modal__header__close"}}},{key:"events",value:function(){return{"click @ui.closeModal":"onCloseModalClick"}}},{key:"templateHelpers",value:function(){return{closeType:this.getOption("closeType")}}},{key:"onCloseModalClick",value:function(){this._parent._parent._parent.hideModal()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header__logo"}},{key:"className",value:function(){return"gmt-templates-modal__header__logo"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"templateHelpers",value:function(){return{title:this.getOption("title")}}},{key:"onClick",value:function(){var t=this.getOption("click");t&&t()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"id",value:function(){return"gmt-template-library-loading"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-template-library-loading"}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(2),o=n(0),r=(r(e,"__esModule",{value:!0}),e.default=void 0,o(n(195))),i=o(n(196)),o=o(n(236)),n=window.goomentoModules={Module:r.default,ViewModule:i.default,utils:{Masonry:o.default}};e.default=n},function(t,e,n){"use strict";var r=n(0),c=r(n(160)),r=r(n(196));t.exports=r.default.extend({getDefaultSettings:function(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements:function(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run:function(){var o=[],i=this.elements.$container.position().top,u=this.getSettings(),a=u.columnsCount;i+=(0,c.default)(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(t){var e=Math.floor(t/a),n=jQuery(this),r=n[0].getBoundingClientRect().height+u.verticalSpaceBetween;e?(t=n.position().top-i-o[e=t%a],t-=(0,c.default)(n.css("margin-top"),10),n.css("margin-top",(t*=-1)+"px"),o[e]+=r):o.push(r)})}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(44))),a=(n(76),n(33),i(n(3))),o=i(n(4)),c=i(n(5)),i=i(n(6)),c=(n=goomentoModules.Module,(0,c.default)(s,n),r=(0,i.default)(s),(0,o.default)(s,[{key:"__construct",value:function(){var t=0document.F=Object<\/script>"),t.close(),c=t.F;e--;)delete c.prototype[u[e]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),i=n(16),u=n(52),a=n(11),c=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=i(t),e=u(e,!0),c)try{return s(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(39).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(23)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0>>0,f=new RegExp(t.source,a+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>c&&(u.push(n.slice(c,r.index)),1>>0;if(0==a)return[];if(0===r.length)return null===_(u,r)?[r]:[];for(var c=0,s=0,f=[];so;)!u(r,n=e[o++])||~c(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(134)},function(t,e,n){t.exports=n(137)},function(t,e,n){"use strict";function g(){return this}var m=n(36),x=n(7),b=n(74),_=n(19),w=n(43),S=n(153),O=n(49),M=n(61),k=n(15)("iterator"),j=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,i,u){S(n,e,r);function a(t){if(!j&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var c,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],h=d||a(o),v=o?f?a("entries"):h:void 0,y="Array"==e&&p.entries||d;if(y&&(y=M(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),m||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,h=function(){return d.call(this)}),m&&!u||!j&&!l&&p[k]||_(p,k,h),w[e]=h,w[r]=g,o)if(c={values:f?h:a("values"),keys:i?h:a("keys"),entries:v},u)for(s in c)s in p||b(p,s,c[s]);else x(x.P+x.F*(j||l),e,c);return c}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},,,,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,c=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),h=p("species"),v=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var i,r,o=p(n),u=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=u?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[h]=function(){return e}),e[o](""),!t}):void 0;u&&a&&("replace"!==n||v)&&("split"!==n||y)||(i=/./[o],e=(a=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?u&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=a[1],c(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(26),o=n(105),c=n(27),s=n(106),f=n(34),l=[].slice;r(r.P+r.F*n(21)(function(){o&&l.call(o)}),"Array",{slice:function(t,e){var n=f(this.length),r=c(this);if(e=void 0===e?n:e,"Array"==r)return l.call(this,t,e);for(var o=s(t,n),t=s(e,n),i=f(t-o),u=new Array(i),a=0;ao;)s(T,e=n[o++])||e==j||e==D||r.push(e);return r}function a(t){for(var e,n=t===C,r=Y(n?P:m(t)),o=[],i=0;r.length>i;)!s(T,e=r[i++])||n&&!s(C,e)||o.push(T[e]);return o}var c=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),h=t(55),v=t(49),$=t(37),y=t(15),V=t(57),H=t(58),B=t(147),G=t(102),g=t(13),Q=t(9),W=t(29),m=t(16),x=t(52),b=t(31),_=t(35),z=t(148),K=t(40),w=t(69),U=t(14),J=t(32),X=K.f,S=U.f,Y=z.f,O=c.Symbol,M=c.JSON,k=M&&M.stringify,j=y("_hidden"),q=y("toPrimitive"),Z={}.propertyIsEnumerable,E=h("symbol-registry"),T=h("symbols"),P=h("op-symbols"),C=Object.prototype,h="function"==typeof O&&!!w.f,R=c.QObject,L=!R||!R.prototype||!R.prototype.findChild,A=f&&d(function(){return 7!=_(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=X(C,e);r&&delete C[e],S(t,e,n),r&&t!==C&&S(C,e,r)}:S,I=h&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};h||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=$(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)H(nt[rt++]);l(l.S+l.F*!h,"Symbol",{for:function(t){return s(E,t+="")?E[t]:E[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in E)if(E[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!h,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:i,getOwnPropertySymbols:a});R=d(function(){w.f(1)});l(l.S+l.F*R,"Object",{getOwnPropertySymbols:function(t){return w.f(W(t))}}),M&&l(l.S+l.F*(!h||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;ou;)i.call(t,r=o[u++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return u.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var i=n(53),u=n(42);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},,,function(t,e,n){t.exports=n(184)},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},,function(t,e,n){var i=n(46),u=n(38);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319>>0||(i.test(t)?16:10))}:r},function(t,e,n){function r(t,e,n){var r={},o=u(function(){return!!a[t]()||"​…"!="​…"[t]()}),e=r[t]=o?e(f):a[t];n&&(r[n]=e),i(i.P+i.F*o,"String",r)}var i=n(7),o=n(42),u=n(18),a=n(161),n="["+a+"]",c=RegExp("^"+n+n+"*"),s=RegExp(n+n+"*$"),f=r.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),t=2&e?t.replace(s,""):t};t.exports=r},,,,,,,,function(t,e,n){"use strict";function r(){var o,i=jQuery,t=arguments,u=this,r={};this.getItems=function(t,e){var n;return e?(n=(e=e.split(".")).splice(0,1),e.length?t[n]?this.getItems(t[n],e.join(".")):void 0:t[n]):t},this.getSettings=function(t){return this.getItems(o,t)},this.setSettings=function(t,e,n){var r;return n=n||o,"object"===(0,a.default)(t)?(i.extend(n,t),u):(r=(t=t.split(".")).splice(0,1),t.length?(n[r]||(n[r]={}),u.setSettings(t.join("."),e,n[r])):(n[r]=e,u))},this.getErrorMessage=function(t,e){t="forceMethodImplementation"===t?"The method '".concat(e,"' must to be implemented in the inheritor child."):"An error occurs";return t},this.forceMethodImplementation=function(t){throw new Error(this.getErrorMessage("forceMethodImplementation",t))},this.on=function(t,e){return"object"===(0,a.default)(t)?i.each(t,function(t){u.on(t,this)}):t.split(" ").forEach(function(t){r[t]||(r[t]=[]),r[t].push(e)}),u},this.off=function(t,e){return r[t]&&(e?-1!==(e=r[t].indexOf(e))&&delete r[t][e]:delete r[t]),u},this.trigger=function(t){var e="on"+t[0].toUpperCase()+t.slice(1),n=Array.prototype.slice.call(arguments,1),e=(u[e]&&u[e].apply(u,n),r[t]);return e&&i.each(e,function(t,e){e.apply(u,n)}),u},u.__construct.apply(u,t),i.each(u,function(t){var e=u[t];"function"==typeof e&&(u[t]=function(){return e.apply(u,arguments)})}),o=u.getDefaultSettings(),(t=t[0])&&i.extend(!0,o,t),u.trigger("init")}var o=n(0),i=o(n(107)),a=o(n(66));n(76),n(113),n(41);r.prototype.__construct=function(){},r.prototype.getDefaultSettings=function(){return{}},r.prototype.getConstructorID=function(){return this.constructor.name},r.extend=function(t){function e(){return r.apply(this,arguments)}var n=jQuery,r=this;return n.extend(e,r),((e.prototype=(0,i.default)(n.extend({},r.prototype,t))).constructor=e).__super__=r.prototype,e},t.exports=r},function(t,e,n){"use strict";n=n(0)(n(195));t.exports=n.default.extend({elements:null,getDefaultElements:function(){return{}},bindEvents:function(){},onInit:function(){this.initElements(),this.bindEvents()},initElements:function(){this.elements=this.getDefaultElements()}})},,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),c=i(n(6)),s=i(n(220)),f=i(n(221)),l=i(n(222)),n=(i=Marionette.LayoutView,(0,a.default)(p,i),r=(0,c.default)(p),(0,o.default)(p,[{key:"el",value:function(){return this.getModal().getElements("widget")}},{key:"regions",value:function(){return{modalHeader:".dialog-header",modalContent:".dialog-lightbox-content",modalLoading:".dialog-lightbox-loading"}}},{key:"initialize",value:function(){this.modalHeader.show(new s.default(this.getHeaderOptions()))}},{key:"getModal",value:function(){return this.modal||this.initModal(),this.modal}},{key:"initModal",value:function(){var t={className:"gmt-templates-modal",closeButton:!1,draggable:!1,hide:{onOutsideClick:!1,onEscKeyPress:!1}};jQuery.extend(!0,t,this.getModalOptions()),this.modal=goomentoCommon.dialogsManager.createWidget("lightbox",t),this.modal.getElements("message").append(this.modal.addElement("content"),this.modal.addElement("loading")),t.draggable&&this.draggableModal()}},{key:"showModal",value:function(){this.getModal().show()}},{key:"hideModal",value:function(){this.getModal().hide()}},{key:"draggableModal",value:function(){var t=this.getModal().getElements("widgetContent");t.draggable({containment:"parent",stop:function(){t.height("")}}),t.css("position","absolute")}},{key:"getModalOptions",value:function(){return{}}},{key:"getLogoOptions",value:function(){return{}}},{key:"getHeaderOptions",value:function(){return{closeType:"normal"}}},{key:"getHeaderView",value:function(){return this.modalHeader.currentView}},{key:"showLoadingView",value:function(){this.modalLoading.show(new l.default),this.modalLoading.$el.show(),this.modalContent.$el.hide()}},{key:"hideLoadingView",value:function(){this.modalContent.$el.show(),this.modalLoading.$el.hide()}},{key:"showLogo",value:function(){this.getHeaderView().logoArea.show(new f.default(this.getLogoOptions()))}}]),p);function p(){return(0,u.default)(this,p),r.apply(this,arguments)}e.default=n},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.LayoutView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"className",value:function(){return"gmt-templates-modal__header"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header"}},{key:"regions",value:function(){return{logoArea:".gmt-templates-modal__header__logo-area",tools:"#gmt-template-library-header-tools",menuArea:".gmt-templates-modal__header__menu-area"}}},{key:"ui",value:function(){return{closeModal:".gmt-templates-modal__header__close"}}},{key:"events",value:function(){return{"click @ui.closeModal":"onCloseModalClick"}}},{key:"templateHelpers",value:function(){return{closeType:this.getOption("closeType")}}},{key:"onCloseModalClick",value:function(){this._parent._parent._parent.hideModal()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header__logo"}},{key:"className",value:function(){return"gmt-templates-modal__header__logo"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"templateHelpers",value:function(){return{title:this.getOption("title")}}},{key:"onClick",value:function(){var t=this.getOption("click");t&&t()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"id",value:function(){return"gmt-template-library-loading"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-template-library-loading"}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(2),o=n(0),r=(r(e,"__esModule",{value:!0}),e.default=void 0,o(n(195))),i=o(n(196)),o=o(n(238)),n=window.goomentoModules={Module:r.default,ViewModule:i.default,utils:{Masonry:o.default}};e.default=n},function(t,e,n){"use strict";var r=n(0),c=r(n(160)),r=r(n(196));t.exports=r.default.extend({getDefaultSettings:function(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements:function(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run:function(){var o=[],i=this.elements.$container.position().top,u=this.getSettings(),a=u.columnsCount;i+=(0,c.default)(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(t){var e=Math.floor(t/a),n=jQuery(this),r=n[0].getBoundingClientRect().height+u.verticalSpaceBetween;e?(t=n.position().top-i-o[e=t%a],t-=(0,c.default)(n.css("margin-top"),10),n.css("margin-top",(t*=-1)+"px"),o[e]+=r):o.push(r)})}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(44))),a=(n(76),n(33),i(n(3))),o=i(n(4)),c=i(n(5)),i=i(n(6)),c=(n=goomentoModules.Module,(0,c.default)(s,n),r=(0,i.default)(s),(0,o.default)(s,[{key:"__construct",value:function(){var t=0document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),u=n(104),i=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),u=n(16),i=n(52),c=n(11),a=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=u(t),e=i(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},,function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0]*>)/g,T=/\$([$&`']|\d\d?)/g;n(90)("replace",2,function(o,u,b,_){return[function(t,e){var n=o(this),r=null==t?void 0:t[u];return void 0!==r?r.call(t,n,e):b.call(String(n),t,e)},function(t,e){var n=_(b,t,this,e);if(n.done)return n.value;var r,o=S(t),u=String(this),i="function"==typeof e,c=(i||(e=String(e)),o.global);c&&(r=o.unicode,o.lastIndex=0);for(var a=[];;){var s=M(o,u);if(null===s)break;if(a.push(s),!c)break;""===String(s[0])&&(o.lastIndex=k(u,O(o.lastIndex),r))}for(var f,l="",p=0,d=0;d>>0,f=new RegExp(t.source,c+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>a&&(i.push(n.slice(a,r.index)),1>>0;if(0==c)return[];if(0===r.length)return null===_(i,r)?[r]:[];for(var a=0,s=0,f=[];so;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var x=n(36),m=n(7),b=n(74),_=n(19),S=n(43),w=n(152),O=n(49),j=n(61),k=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,u,i){w(n,e,r);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var a,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],v=d||c(o),h=o?f?c("entries"):v:void 0,y="Array"==e&&p.entries||d;if(y&&(y=j(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),x||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),x&&!i||!M&&!l&&p[k]||_(p,k,v),S[e]=v,S[r]=g,o)if(a={values:f?v:c("values"),keys:u?v:c("keys"),entries:h},i)for(s in a)s in p||b(p,s,a[s]);else m(m.P+m.F*(M||l),e,a);return a}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(99),o=n(178),u=n(94),i=n(86);t.exports=n(179)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(92),o=n(38);t.exports=function(t){return r(o(t))}},,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,a=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),v=p("species"),h=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var u,r,o=p(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),c=i?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[v]=function(){return e}),e[o](""),!t}):void 0;i&&c&&("replace"!==n||h)&&("split"!==n||y)||(u=/./[o],e=(c=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=c[1],a(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var i=n(14),c=n(13),a=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,r=a(e),o=r.length,u=0;uo;)s(A,e=n[o++])||e==M||e==D||r.push(e);return r}function c(t){for(var e,n=t===E,r=Y(n?P:x(t)),o=[],u=0;r.length>u;)!s(A,e=r[u++])||n&&!s(E,e)||o.push(A[e]);return o}var a=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),v=t(55),h=t(49),q=t(37),y=t(15),$=t(57),Q=t(58),B=t(146),G=t(102),g=t(13),V=t(9),K=t(29),x=t(16),m=t(52),b=t(31),_=t(35),H=t(147),W=t(40),S=t(69),z=t(14),J=t(32),U=W.f,w=z.f,Y=H.f,O=a.Symbol,j=a.JSON,k=j&&j.stringify,M=y("_hidden"),X=y("toPrimitive"),Z={}.propertyIsEnumerable,C=v("symbol-registry"),A=v("symbols"),P=v("op-symbols"),E=Object.prototype,v="function"==typeof O&&!!S.f,T=a.QObject,L=!T||!T.prototype||!T.prototype.findChild,R=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=U(E,e);r&&delete E[e],w(t,e,n),r&&t!==E&&w(E,e,r)}:w,I=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=q(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)Q(nt[rt++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return s(C,t+="")?C[t]:C[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:i,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:u,getOwnPropertySymbols:c});T=d(function(){S.f(1)});l(l.S+l.F*T,"Object",{getOwnPropertySymbols:function(t){return S.f(K(t))}}),j&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;oi;)u.call(t,r=o[i++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,u={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!i||"[object Window]"!=u.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return i.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var u=n(53),i=n(42);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},function(t,e,n){var r=n(175),o=n(118);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(39).f,o=n(47),u=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,u)&&r(t,u,{configurable:!0,value:e})}},function(t,e,n){var r=n(24),o=n(27),u=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[u])?!!e:"RegExp"==o(t))}},,,function(t,e,n){t.exports=n(191)},function(t,e,n){var u=n(46),i=n(38);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e,n){var i=n(47),c=n(86),a=n(176)(!1),s=n(95)("IE_PROTO");t.exports=function(t,e){var n,r=c(t),o=0,u=[];for(n in r)n!=s&&i(r,n)&&u.push(n);for(;e.length>o;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){var a=n(86),s=n(34),f=n(106);t.exports=function(c){return function(t,e,n){var r,o=a(t),u=s(o.length),i=f(n,u);if(c&&e!=e){for(;it.length)&&(e=t.length);for(var n=0,r=new Array(e);n/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g})}}},{key:"getDefaultElements",value:function(){return{$window:jQuery(window),$document:jQuery(document),$body:jQuery(document.body)}}},{key:"initComponents",value:function(){this.helpers=new l.default,this.storage=new p.default,window.$e={components:new h.default,commands:new y.default,routes:new g.default,shortcuts:new x.default(jQuery(window)),bc:new m.default,run:function(){for(var t=arguments.length,e=new Array(t),n=0;ndocument.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),u=n(104),i=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),u=n(16),i=n(52),c=n(11),a=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=u(t),e=i(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},,function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0]*>)/g,T=/\$([$&`']|\d\d?)/g;n(90)("replace",2,function(o,u,b,_){return[function(t,e){var n=o(this),r=null==t?void 0:t[u];return void 0!==r?r.call(t,n,e):b.call(String(n),t,e)},function(t,e){var n=_(b,t,this,e);if(n.done)return n.value;var r,o=S(t),u=String(this),i="function"==typeof e,c=(i||(e=String(e)),o.global);c&&(r=o.unicode,o.lastIndex=0);for(var a=[];;){var s=M(o,u);if(null===s)break;if(a.push(s),!c)break;""===String(s[0])&&(o.lastIndex=k(u,O(o.lastIndex),r))}for(var f,l="",p=0,d=0;d>>0,f=new RegExp(t.source,c+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>a&&(i.push(n.slice(a,r.index)),1>>0;if(0==c)return[];if(0===r.length)return null===_(i,r)?[r]:[];for(var a=0,s=0,f=[];so;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){t.exports=n(134)},function(t,e,n){t.exports=n(137)},function(t,e,n){"use strict";function g(){return this}var x=n(36),m=n(7),b=n(74),_=n(19),S=n(43),w=n(153),O=n(49),j=n(61),k=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,u,i){w(n,e,r);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var a,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],v=d||c(o),h=o?f?c("entries"):v:void 0,y="Array"==e&&p.entries||d;if(y&&(y=j(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),x||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),x&&!i||!M&&!l&&p[k]||_(p,k,v),S[e]=v,S[r]=g,o)if(a={values:f?v:c("values"),keys:u?v:c("keys"),entries:h},i)for(s in a)s in p||b(p,s,a[s]);else m(m.P+m.F*(M||l),e,a);return a}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(92),o=n(38);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";var r=n(99),o=n(178),u=n(94),i=n(85);t.exports=n(179)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,a=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),v=p("species"),h=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var u,r,o=p(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),c=i?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[v]=function(){return e}),e[o](""),!t}):void 0;i&&c&&("replace"!==n||h)&&("split"!==n||y)||(u=/./[o],e=(c=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=c[1],a(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var i=n(14),c=n(13),a=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,r=a(e),o=r.length,u=0;uo;)s(A,e=n[o++])||e==M||e==D||r.push(e);return r}function c(t){for(var e,n=t===E,r=Y(n?P:x(t)),o=[],u=0;r.length>u;)!s(A,e=r[u++])||n&&!s(E,e)||o.push(A[e]);return o}var a=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),v=t(55),h=t(49),q=t(37),y=t(15),$=t(57),Q=t(58),B=t(147),G=t(102),g=t(13),V=t(9),K=t(29),x=t(16),m=t(52),b=t(31),_=t(35),H=t(148),W=t(40),S=t(69),z=t(14),J=t(32),U=W.f,w=z.f,Y=H.f,O=a.Symbol,j=a.JSON,k=j&&j.stringify,M=y("_hidden"),X=y("toPrimitive"),Z={}.propertyIsEnumerable,C=v("symbol-registry"),A=v("symbols"),P=v("op-symbols"),E=Object.prototype,v="function"==typeof O&&!!S.f,T=a.QObject,L=!T||!T.prototype||!T.prototype.findChild,R=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=U(E,e);r&&delete E[e],w(t,e,n),r&&t!==E&&w(E,e,r)}:w,I=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=q(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)Q(nt[rt++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return s(C,t+="")?C[t]:C[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:i,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:u,getOwnPropertySymbols:c});T=d(function(){S.f(1)});l(l.S+l.F*T,"Object",{getOwnPropertySymbols:function(t){return S.f(K(t))}}),j&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;oi;)u.call(t,r=o[i++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,u={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!i||"[object Window]"!=u.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return i.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var u=n(53),i=n(42);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},function(t,e,n){var r=n(176),o=n(118);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(39).f,o=n(47),u=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,u)&&r(t,u,{configurable:!0,value:e})}},,,function(t,e,n){t.exports=n(191)},function(t,e,n){var u=n(46),i=n(38);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e,n){var i=n(47),c=n(85),a=n(174)(!1),s=n(95)("IE_PROTO");t.exports=function(t,e){var n,r=c(t),o=0,u=[];for(n in r)n!=s&&i(r,n)&&u.push(n);for(;e.length>o;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},,function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";function g(){return this}var x=n(89),m=n(26),b=n(30),_=n(22),S=n(94),w=n(180),O=n(159),j=n(182),k=n(10)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,u,i){w(n,e,r);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var a,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],v=d||c(o),h=o?f?c("entries"):v:void 0,y="Array"==e&&p.entries||d;if(y&&(y=j(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),x||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),x&&!i||!M&&!l&&p[k]||_(p,k,v),S[e]=v,S[r]=g,o)if(a={values:f?v:c("values"),keys:u?v:c("keys"),entries:h},i)for(s in a)s in p||b(p,s,a[s]);else m(m.P+m.F*(M||l),e,a);return a}},function(t,e,n){"use strict";var r=n(175),o=n(83),u=n(159),i={};n(22)(i,n(10)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(i,{next:o(1,n)}),u(t,e+" Iterator")}},function(t,e,n){var i=n(39),c=n(20),a=n(158);t.exports=n(23)?Object.defineProperties:function(t,e){c(t);for(var n,r=a(e),o=r.length,u=0;ut.length)&&(e=t.length);for(var n=0,r=new Array(e);n/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g})}}},{key:"getDefaultElements",value:function(){return{$window:jQuery(window),$document:jQuery(document),$body:jQuery(document.body)}}},{key:"initComponents",value:function(){this.helpers=new l.default,this.storage=new p.default,window.$e={components:new h.default,commands:new y.default,routes:new g.default,shortcuts:new x.default(jQuery(window)),bc:new m.default,run:function(){for(var t=arguments.length,e=new Array(t),n=0;ndocument.F=Object<\/script>"),t.close(),s=t.F;e--;)delete s.prototype[u[e]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(o.prototype=r(t),n=new o,o.prototype=null,n[c]=t):n=s(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var o=n(20),r=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(45),r=n(31),i=n(16),u=n(52),c=n(11),s=n(77),a=Object.getOwnPropertyDescriptor;e.f=n(12)?a:function(t,e){if(t=i(t),e=u(e,!0),s)try{return a(t,e)}catch(t){}if(c(t,e))return r(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(39).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(23)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},,function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0r;)!u(o,n=e[r++])||~s(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var m=n(36),b=n(7),x=n(74),_=n(19),S=n(43),w=n(152),O=n(49),C=n(61),j=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,o,r,i,u){w(n,e,o);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var s,a,o=e+" Iterator",f="values"==r,l=!1,p=t.prototype,d=p[j]||p["@@iterator"]||r&&p[r],v=d||c(r),y=r?f?c("entries"):v:void 0,h="Array"==e&&p.entries||d;if(h&&(h=C(h.call(new t)))!==Object.prototype&&h.next&&(O(h,o,!0),m||"function"==typeof h[j]||_(h,j,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),m&&!u||!M&&!l&&p[j]||_(p,j,v),S[e]=v,S[o]=g,r)if(s={values:f?v:c("values"),keys:i?v:c("keys"),entries:y},u)for(a in s)a in p||x(p,a,s[a]);else b(b.P+b.F*(M||l),e,s);return s}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var o=n(99),r=n(178),i=n(94),u=n(86);t.exports=n(179)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var o=n(92),r=n(38);t.exports=function(t){return o(r(t))}},,,function(t,e){t.exports=!1},,function(t,e,n){var o=n(24),r=n(17).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,n){var o=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n){var o=n(53),r=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=o(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var o=n(21);t.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}},,function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var u=n(14),c=n(13),s=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,o=s(e),r=o.length,i=0;ir;)a(T,e=n[r++])||e==M||e==N||o.push(e);return o}function c(t){for(var e,n=t===k,o=Y(n?E:m(t)),r=[],i=0;o.length>i;)!a(T,e=o[i++])||n&&!a(k,e)||r.push(T[e]);return r}var s=t(8),a=t(11),f=t(12),l=t(7),p=t(74),N=t(101).KEY,d=t(18),v=t(55),y=t(49),V=t(37),h=t(15),B=t(57),G=t(58),$=t(146),H=t(102),g=t(13),W=t(9),q=t(29),m=t(16),b=t(52),x=t(31),_=t(35),z=t(147),Q=t(40),S=t(69),J=t(14),U=t(32),K=Q.f,w=J.f,Y=z.f,O=s.Symbol,C=s.JSON,j=C&&C.stringify,M=h("_hidden"),X=h("toPrimitive"),Z={}.propertyIsEnumerable,P=v("symbol-registry"),T=v("symbols"),E=v("op-symbols"),k=Object.prototype,v="function"==typeof O&&!!S.f,L=s.QObject,A=!L||!L.prototype||!L.prototype.findChild,F=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var o=K(k,e);o&&delete k[e],w(t,e,n),o&&t!==k&&w(k,e,o)}:w,R=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=V(0et;)h(tt[et++]);for(var nt=U(h.store),ot=0;nt.length>ot;)G(nt[ot++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return a(P,t+="")?P[t]:P[t]=O(t)},keyFor:function(t){if(!R(t))throw TypeError(t+" is not a symbol!");for(var e in P)if(P[e]===t)return e},useSetter:function(){A=!0},useSimple:function(){A=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:i,getOwnPropertySymbols:c});L=d(function(){S.f(1)});l(l.S+l.F*L,"Object",{getOwnPropertySymbols:function(t){return S.f(q(t))}}),C&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){for(var e,n,o=[t],r=1;ru;)i.call(t,o=r[u++])&&e.push(o);return e}},function(t,e,n){var o=n(16),r=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return r(o(t));var e=t;try{return r(e)}catch(e){return u.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var i=n(53),u=n(42);t.exports=function(r){return function(t,e){var n,t=String(u(t)),e=i(e),o=t.length;return e<0||o<=e?r?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},,function(t,e,n){var o=n(175),r=n(118);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e,n){var o=n(39).f,r=n(47),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},,,,,,,,,,,,,,,,function(t,e,n){function o(){}var r=n(20),i=n(181),u=n(118),c=n(95)("IE_PROTO"),s=function(){var t=n(91)("iframe"),e=u.length;for(t.style.display="none",n(105).appendChild(t),t.src="javascript:",(t=t.contentWindow.document).open(),t.write(" diff --git a/view/frontend/templates/widgets/navigation.phtml b/view/frontend/templates/widgets/navigation.phtml index 1b9f56a7..4eaf6abe 100644 --- a/view/frontend/templates/widgets/navigation.phtml +++ b/view/frontend/templates/widgets/navigation.phtml @@ -2,35 +2,57 @@ /** * @package Goomento_PageBuilder * @link https://github.com/Goomento/PageBuilder + * @see Snowdog_Menu::menu.phtml + * This file is copied from Snowdog_Menu::menu.phtml to add custom code */ -declare(strict_types=1); +use Goomento\PageBuilder\Helper\DataHelper; +use Goomento\PageBuilder\Block\Widgets\Navigation; -use Goomento\PageBuilder\Block\View\Element\Widget; -use Goomento\PageBuilder\Builder\Widgets\Navigation; -use Goomento\PageBuilder\Helper\LayoutHelper; - -/** - * @var Widget $block - * @var Navigation $widget - */ -$widget = $block->getWidget(); -$settings = $block->getSettingsForDisplay(); -$menuId = (string) $settings['navigation_menu_id']; -if (class_exists('Snowdog\Menu\Block\Menu') && $menuId) { - $type = (string) $settings['navigation_menu_type']; - $menuHtml = LayoutHelper::createBlock('Snowdog\Menu\Block\Menu', '', [ - 'data' => [ - 'menu' => $menuId, - 'menu_type' => $type, - ] - ]) - ->setTemplate('Goomento_PageBuilder::extensions/snowdog_menu/menu.phtml') - ->toHtml(); - if (!empty($menuHtml)): ?> -
- -
- + +getMenuType(); +$menuJsWidget = [ + 'menu' => [ + 'responsive' => true, + 'expanded' => true, + 'mediaBreakpoint' => '(max-width: 1024px)', // response replied on tablet + 'position' => [ + 'my' => 'left+10 top-2', + 'at' => 'left bottom', + ], + ] +] ; +if ($type === 'vertical') { + $menuJsWidget['menu']['position'] = [ + 'my' => 'left top', + 'at' => 'right-5 top', + ]; } +if ($block->getMenu()): ?> +
+ getMenu()->getCssClass() ?> + +
+ diff --git a/view/frontend/web/css/widgets/_all.less b/view/frontend/web/css/widgets/_all.less index a48984b5..08530478 100644 --- a/view/frontend/web/css/widgets/_all.less +++ b/view/frontend/web/css/widgets/_all.less @@ -14,7 +14,6 @@ @import "_banner"; @import "_banner-slider"; @import "_button"; -@import "_calltoaction"; @import "_counter"; @import "_divider"; @import "_google-maps"; diff --git a/view/frontend/web/css/widgets/_banner.less b/view/frontend/web/css/widgets/_banner.less index b4cce72b..f3a07b24 100644 --- a/view/frontend/web/css/widgets/_banner.less +++ b/view/frontend/web/css/widgets/_banner.less @@ -6,49 +6,8 @@ position: absolute; vertical-align: middle; padding: 1rem; - &-position { - &-top-left { - top: 0; - left: 0; - } - &-top-center { - top: 0; - .start(50%); - transform: translateX(-50%); - } - &-top-right { - top: 0; - right: 0; - } - &-middle-left { - left: 0; - transform: translateY(-50%); - top: 50%; - } - &-middle-center { - .start(50%); - transform: translateY(-50%) translateX(-50%); - top: 50%; - } - &-middle-right { - right: 0; - transform: translateY(-50%); - top: 50%; - } - &-bottom-left { - bottom: 0; - left: 0; - } - &-bottom-center { - .start(50%); - bottom: 0; - transform: translateX(-50%); - } - &-bottom-right { - right: 0; - bottom: 0; - } - } + .start(10%); + bottom: 10%; } .gmt-widget-banner { diff --git a/view/frontend/web/css/widgets/_calltoaction.less b/view/frontend/web/css/widgets/_calltoaction.less deleted file mode 100644 index 4b3323c6..00000000 --- a/view/frontend/web/css/widgets/_calltoaction.less +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @package Goomento_PageBuilder - * @link https://github.com/Goomento/PageBuilder - */ - -.gmt-section-type-popup { - display: none; -} - -// in Modal -.modal-content { - .gmt-section-type-popup { - margin-left: -@space-md; - margin-right: -@space-md; - } -} diff --git a/view/frontend/web/js/widgets/call-to-action.js b/view/frontend/web/js/widgets/call-to-action.js deleted file mode 100644 index f6f39271..00000000 --- a/view/frontend/web/js/widgets/call-to-action.js +++ /dev/null @@ -1,262 +0,0 @@ -/** - * @package Goomento_PageBuilder - * @link https://github.com/Goomento/PageBuilder - */ -define([ - 'jquery', - 'mage/translate', - 'goomento-widget-base', - 'jquery/jquery.cookie', - 'Magento_Ui/js/modal/modal', -], function ($) { - 'use strict'; - - /** - * Call to action widget - */ - $.widget('goomento.callToAction', $.goomento.base, { - options: { - code: "", - trigger: "", - action: "", - target_element_id: "", - element_id: "", - trigger_element_id: "", - timout: 0, - remember_in_seconds: 0, - element_data_id: '', - }, - /** - * Init - * @private - */ - _initWidget: function () { - if (!this._validateInSeconds()) { - return; - } - switch (this.options.trigger) { - case "load": - this.onPageLoad(); - break; - case "timeout": - this.onTimeout(); - break; - case "click": - this.onClick(); - break; - default: - } - }, - /** - * Validate remember in seconds - * @return {boolean} - * @private - */ - _validateInSeconds: function() { - let rememberInSeconds = parseInt(this.options.remember_in_seconds), - cookieName = `pagebuilder_ris_${this.options.element_id}`, - cookieValue = rememberInSeconds ? $.cookie(cookieName) : null; - - if (rememberInSeconds) { - if (cookieValue) { - return false; - } else { - let date = new Date(); - date.setTime(date.getTime() + (rememberInSeconds * 1000)); - $.cookie(cookieName, '1', {path: '/', expires: date }); - } - } - return true; - }, - /** - * Do action - * @return {(function())|*} - * @private - */ - doAction: function () { - this.onStartDoingAction(); - - switch (this.options.action) { - case "code": - this.insertCode(); - break; - case "show_popup": - this.showPopup(); - break; - case "hide_popup": - this.hidePopup(); - break; - case "show_element": - this.showElement(); - break; - case "hide_element": - this.hideElement(); - break; - default: - break; - } - - this.onStoppingDoingAction(); - }, - /** - * Start doing action - * @return {callToAction} - */ - onStartDoingAction: function () { - return this; - }, - /** - * On stop doing action - * @return {callToAction} - */ - onStoppingDoingAction: function () { - return this; - }, - /** - * - * @returns {jQuery|HTMLElement|*} - * @private - */ - _getTarget: function () { - if (typeof this.options.$target === "undefined") { - this.options.$target = $(this.options.target_element_id); - } - - return this.options.$target; - }, - /** - * Get options of popup - * @return {{}} - * @private - */ - _getPopupOptions: function () { - let $target = this._getTarget(), - settings = $target.data('settings') || {}, - options = {}, - buttons = []; - - settings = Object.assign({ - popup_title: $.mage.__('Popup Title'), - popup_close_button_text: '', - popup_close_button_css_classes: '', - popup_confirm_button_text: '', - popup_confirm_button_css_classes: '', - popup_confirm_button_link: { - url: '', - is_external: false, - }, - }, settings); - - options.responsive = true; - options.type = 'popup'; - if (settings.popup_title) { - options.title = settings.popup_title; - } - - if (settings.popup_close_button_text) { - buttons.push({ - text: settings.popup_close_button_text, - class: settings.popup_close_button_css_classes, - click: function () { - this.closeModal(); - } - }); - } - - if (settings.popup_confirm_button_text) { - buttons.push({ - text: settings.popup_confirm_button_text, - class: settings.popup_confirm_button_css_classes, - click: function () { - let link = settings.popup_confirm_button_link || {}; - if (link && link.url) { - if (link.is_external) { - window.open(link.url,'_blank'); - } else { - window.location.href = link.url; - } - } else { - this.closeModal(); - } - } - }); - } - options.buttons = buttons; - - return options; - }, - /** - * Get popup in cached - * @return {jQuery|HTMLElement|*} - * @private - */ - _getPopup: function () { - if (typeof this.options.$popup === "undefined") { - let $target = this._getTarget(), - settings = $target.data('settings') || {}; - if (!$target.length || !settings || !$target.hasClass('gmt-section-type-popup')) { - this.options.$popup = $(); - } else { - this.options.$popup = $target.modal(this._getPopupOptions()); - } - } - return this.options.$popup; - }, - /** - * Show popup - */ - showPopup: function () { - this._getPopup().modal('openModal'); - }, - /** - * Hide popup - */ - hidePopup: function () { - this._getPopup().modal('closeModal'); - }, - /** - * Show element - */ - showElement: function () { - this._getTarget().show(); - }, - /** - * Hide element - */ - hideElement: function () { - this._getTarget().hide(); - }, - /** - * Insert HTML within document - */ - insertCode: function () { - let $element = $(this.options.element_data_id); - if ($element.length && this.options.code) { - let textArea = document.createElement('textarea'); - textArea.innerHTML = this.options.code; - $element.html(textArea.value); - } - }, - /** - * On page load - */ - onPageLoad: function () { - $(document).ready(this.doAction.bind(this)); - }, - /** - * On Timeout - */ - onTimeout: function () { - let timeout = parseInt(this.options.timout); - setTimeout(this.doAction.bind(this), timeout*1000); - }, - /** - * On Click action - */ - onClick: function () { - $(document).on('click', this.options.trigger_element_id, this.doAction.bind(this)); - } - }); - - return $.goomento.callToAction; -})