This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -0,0 +1,47 @@
<?php
/**
* Customizer Builder
* Action Button Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Actionbutton_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'actionbutton';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<button class="sb-control-action-button sb-btn sbc-fb-fs sb-btn-grey">
<div v-if="control.buttonIcon" v-html="svgIcons[control.buttonIcon]"></div>
<span class="sb-small-p sb-bold sb-dark-text">{{control.label}}</span>
</button>
<?php
}
}

View File

@@ -0,0 +1,52 @@
<?php
/**
* Customizer Builder
* CheckBox Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Checkbox_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'checkbox';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-checkbox-ctn sbc-fb-fs" @click.prevent.default="(control.custom != undefined && control.custom == 'feedtype') ? changeCheckboxSectionValue('type', control.value, 'feedFlyPreview') : changeSwitcherSettingValue(control.id, control.options.enabled, control.options.disabled, control.ajaxAction != undefined ? control.ajaxAction : false)" :class="control.cssClass">
<div class="sb-control-checkbox" :data-active="(control.custom != undefined && control.custom == 'feedtype') ? <?php
echo $controlEditingTypeModel;
?>['type'].includes(control.value) : <?php
echo $controlEditingTypeModel;
?>[control.id] == control.options.enabled"></div>
<div class="sb-control-label">{{control.label}}</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Customizer Builder
* CheckBox List Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Checkboxlist_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'checkboxlist';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-checkbox-ctn sbc-fb-fs" v-for="option in control.options" @click.prevent.default="changeCheckboxListValue(control.id, option.value)">
<div class="sb-control-checkbox" :data-active="<?php
echo $controlEditingTypeModel;
?>[control.id].includes(option.value)"></div>
<div class="sb-control-label sb-small-p sb-dark-text" v-html="option.label"></div>
</div>
<?php
}
}

View File

@@ -0,0 +1,63 @@
<?php
/**
* Customizer Builder
* CheckBox Section Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Checkboxsection_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'checkboxsection';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*
* @return HTML
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-checkboxsection-header" v-if="control.header">
<div class="sb-control-checkboxsection-name">
<div v-html="svgIcons['preview']"></div>
<strong class="">{{genericText.name}}</strong>
</div>
<strong>{{genericText.edit}}</strong>
</div>
<div class="sb-control-checkbox-ctn sbc-fb-fs" @click.prevent.default="control.disabled ? null : control.section ? switchNestedSection(control.section.id, control.section) : null" :data-disabled="control.checkExtensionPopup != undefined ? false : control.disabled" :data-default-cursor="!control.section">
<div class="sb-control-checkbox-hover sb-tr-2"></div>
<div class="sb-control-checkbox" @click.stop.prevent.default="control.disabled ? activateAPIForm() : changeCheckboxSectionValue(control.id, control.value)" :data-active="checkboxSectionValueExists(control.id, control.value)"></div>
<div class="sbc-fb-fs" :data-active="checkboxSectionValueExists(control.id, control.value)">
<strong class="sb-control-label">
<span v-html="svgIcons[control.icon]" v-if="control.icon"></span>
{{control.label}}
</strong>
</div>
<svg v-if="control.section" class="sb-control-checkboxsection-btn" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg>
</div>
<?php
}
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* Customizer Builder
* Color Override Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Coloroverride_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'coloroverride';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs sb-control-coloroverride-ctn">
<div class="sb-control-coloroverride-content">
<div class="sb-control-coloroverride-txt" v-html="<?php
echo $controlEditingTypeModel;
?>[control.id]"></div>
<div class="sb-control-coloroverride-swatch" :style="'background:'+<?php
echo $controlEditingTypeModel;
?>[control.id]"></div>
</div>
<div class="sb-control-colorpicker-btn" @click.prevent.default="resetColorOverride(control.id)">{{genericText.reset}}</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* Customizer Builder
* Color Picker Field Control
*
* @since 4.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Colorpicker_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 4.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'colorpicker';
}
/**
* Output Control
*
*
* @since 4.0
* @access public
*
* @return HTML
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs sb-control-colorpicker-ctn" :data-picker-style="control.pickerType ? control.pickerType : 'default'" @click.stop="showColorPickerPospup(control.id)" v-on-clickaway="hideColorPickerPospup">
<!--<sbc-colorpicker :color="<?php
echo $controlEditingTypeModel;
?>[control.id]" v-on:change="changeSettingValue(control.id,...arguments)" :control-id="control.id"></sbc-colorpicker>-->
<input class="sb-control-input" placeholder="Select" type="text" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]">
<div class="sb-control-colorpicker-swatch" :style="'background:'+<?php
echo $controlEditingTypeModel;
?>[control.id]+';'"></div>
<div class="sb-control-colorpicker-popup" v-show="customizerScreens.activeColorPicker == control.id">
<sketch-picker
@input="updateColorValue(control.id)"
v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]"
:value="<?php
echo $controlEditingTypeModel;
?>[control.id]"
:preset-colors="['#fff','#000','#e92b2b','#ffc104','#31e92b','#2b4ee9','#a72be9','#e92b82']"
></sketch-picker>
<button class="sb-control-action-button sb-colorpicker-reset-btn sb-btn sbc-fb-fs sb-btn-grey" @click.prevent.default="resetColor(control.id)">
<div v-html="svgIcons['update']"></div>
<span>{{genericText.reset}}</span>
</button>
</div>
<div class="sb-control-colorpicker-btn" v-if="control.pickerType == 'reset'">{{genericText.reset}}</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,126 @@
<?php
/**
* Customizer Builder Control Base
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
abstract class SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return '';
}
/**
* Get control info.
*
* Getting the Control information []
*
* @since 6.0
* @access public
*
* @return array
*/
public function get_info()
{
return array('id' => '', 'type' => '', 'modelname' => '', 'layout' => 'full', 'reverse' => 'false', 'default' => '', 'seperator' => 'none', 'heading' => '', 'description' => '', 'tooltip' => '');
}
/**
* Control Output
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
}
/**
* Getting Editing Control Type
*
*
* @since 1.0.0
* @access public
*
* @return String
*/
public function get_control_edit_type($editingType)
{
switch ($editingType) {
case 'settings':
return 'customizerFeedData.settings';
break;
}
}
/**
* Get Control HTML.
*
*
* @since 6.0
* @access public
*
* @return HTML
*/
public function print_control_wrapper($editingType)
{
$control_type = $this->get_type();
$controlEditingTypeModel = $this->get_control_edit_type($editingType);
?>
<div class="sb-control-elem-ctn sbc-fb-fs" v-if="control.type == '<?php
echo $control_type;
?>'"
v-show="isControlShown(control)"
:class="control.class"
:data-child="control.child ? 'true' : false"
:data-separator="control.separator != undefined ? control.separator : 'none'"
:data-type="control.type" :data-layout="control.layout == undefined ? 'block' : 'half'"
:data-reverse="control.reverse != undefined ? 'true' : 'false'" :data-stacked="control.stacked ? 'true' : 'false'"
:data-heading="control.strongHeading != undefined && control.strongHeading != 'true' ? '' : 'strong'"
:data-disabled="control.disabledInput != undefined ? isControlShown(control) : false"
:data-switcher-top="control.switcherTop != undefined ? 'true' : false"
>
<div class="sb-control-elem-overlay"
v-show="shouldShowOverlay(control)"
@click.prevent.default="control.checkExtensionPopup != false && !checkExtensionActive(control.checkExtensionPopup) ? viewsActive.extensionsPopupElement = control.checkExtensionPopup : false"
:class="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? 'sb-cursor-pointer' : ''"
>
</div>
<div class="sb-control-elem-label" v-if="(control.heading == undefined && control.description == undefined) ? false : true && control.type != 'customview'" :class="control.class">
<div class="sb-control-elem-label-title sbc-fb-fs">
<div v-if="control.icon != undefined" class="sb-control-elem-icon" v-html="svgIcons[control.icon]"></div>
<div class="sb-control-elem-heading sb-small-p sb-dark-text" :data-underline="control.underline" :class="control.enableViewAction != undefined && control.enableViewAction != false ? 'sb-cursor-pointer' : ''" v-html="control.heading" @click.prevent.default="control.enableViewAction != undefined && control.enableViewAction != false ? switchNestedSection(control.enableViewAction, null ) : false"></div>
<div class="sb-control-elem-tltp" v-if="control.tooltip != undefined" @mouseover.prevent.default="toggleElementTooltip(control.tooltip, 'show', control.tooltipAlign ? control.tooltipAlign : 'center' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-elem-description" v-if="control.descriptionPosition != 'bottom'" v-html="control.description"></div>
</div>
<div class="sb-control-elem-output">
<?php
$this->get_control_output($controlEditingTypeModel);
?>
<div class="sb-control-elem-description" v-if="control.descriptionPosition != undefined && control.descriptionPosition == 'bottom'" v-html="control.description"></div>
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,199 @@
<?php
/**
* Customizer Builder
* Custom View
* This control will used for custom HTMlL controls like (source, feed type...)
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Customview_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'customview';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
$this->get_control_feedtype_output($controlEditingTypeModel);
$this->get_control_feedtemplate_output($controlEditingTypeModel);
}
/**
* Feed Templates Output Control
*
*
* @since 4.0
* @access public
*
* @return HTML
*/
public function get_control_feedtype_output($controlEditingTypeModel)
{
?>
<div :class="['sb-control-feedtype-ctn sb-control-feedtemplate-ctn', 'sbc-feedtemplate-' + customizerScreens.printedTemplate.type]" v-if="control.viewId == 'feedtype'">
<div class="sbc-feedtemplate-el" v-if="customizerFeedTypePrint()" @click.prevent.default="activateView('feedtypesPopup')">
<div class="sbc-feedtemplate-el-img sbc-fs" v-html="svgIcons[customizerScreens.printedTemplate.icon]"></div>
<div class="sbc-feedtemplate-el-info sbc-fs">
<strong class="sbc-fs" v-html="customizerScreens.printedTemplate.title"></strong>
</div>
</div>
<button class="sb-control-action-button sb-btn sbc-fs sb-btn-grey" @click.prevent.default="activateView('feedtypesPopup')">
<div v-html="svgIcons['edit']"></div>
<span>{{genericText.change}}</span>
</button>
</div>
<!-- For Channel feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'channel'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.channelOrUsername}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.channel">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedHandleFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<!-- For Playlist feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'playlist'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.playlistId}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.playlist">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<!-- For Favorites feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'favorites'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.channelOrUsername}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.favorites">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedHandleFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<!-- For Search feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'search'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.searchTerm}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.search">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<!-- For Livestream feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'live'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.channelOrUsername}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.live">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedHandleFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<!-- For Single Videos feed type -->
<div class="sbc-control-feedtype-source sbc-fs" v-if="control.viewId == 'feedtype' && customizerFeedData.settings.type == 'single'">
<div class="sbc-feedtype-label-wrap">
<strong>{{genericText.singleVideosId}}</strong>
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(tooltipContent[customizerFeedData.settings.type], 'show', 'left' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
</div>
</div>
<div class="sb-control-feedtype-source-input cff-fb-fs">
<input class="sb-control-input" type="text" v-model="customizerFeedData.settings.single">
<button class="sb-control-action-button sbc-btn sbc-btn-default" @click.prevent.default="customizerControlAjaxAction('feedFlyPreview')">
<span>{{genericText.update}}</span>
</button>
</div>
</div>
<?php
}
/**
* Feed Templates Output Control
*
*
* @since 4.0
* @access public
*
* @return HTML
*/
public function get_control_feedtemplate_output($controlEditingTypeModel)
{
?>
<div :class="['sb-control-feedtype-ctn sb-control-feedtemplate-ctn', 'sbc-feedtemplate-' + customizerScreens.printedTemplate.type]" v-if="control.viewId == 'feedtemplate'">
<div class="sbc-feedtemplate-el" v-if="customizerFeedTemplatePrint()" @click.prevent.default="activateView('feedtemplatesPopup')">
<div class="sbc-feedtemplate-el-img sbc-fs" v-html="svgIcons[customizerScreens.printedTemplate.icon]"></div>
<div class="sbc-feedtemplate-el-info sbc-fs">
<strong class="sbc-fs" v-html="customizerScreens.printedTemplate.title"></strong>
</div>
</div>
<button class="sb-control-action-button sb-btn sbc-fs sb-btn-grey" @click.prevent.default="activateView('feedtemplatesPopup')">
<div v-html="svgIcons['edit']"></div>
<span>{{genericText.change}}</span>
</button>
</div>
<!-- For Feed type -->
<div class="sbc-customview-alert sbc-fs" v-if="control.viewId == 'feedtemplate'">
<span>
<span v-html="svgIcons.info" class="sbc-alert-icon"></span>
<span v-html="genericText.feedTemplateAlert"></span>
</span>
</div>
<?php
}
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* Customizer Builder
* Date Picker Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Datepicker_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'datepicker';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs">
<input type="date" class="sb-control-input sbc-fb-fs" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" @change.prevent.default="changeSettingValue(control.id, false,false, control.ajaxAction ? control.ajaxAction : false)" :placeholder="control.placeholder ? control.placeholder : ''">
</div>
<?php
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Customizer Builder
* Heading Text Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Heading_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'heading';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
}
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* Customizer Builder
* Hidden Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Hidden_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'hidden';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs">
<input type="hidden" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]">
</div>
<?php
}
}

View File

@@ -0,0 +1,66 @@
<?php
/**
* Customizer Builder
* Image Chooser Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Imagechooser_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'imagechooser';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-imagechooser-ctn sbc-fb-fs">
<div class="sbc-fb-fs">
<input type="text" class="sb-control-imagechooser-input sbc-fb-fs" :class="checkNotEmpty(<?php
echo $controlEditingTypeModel;
?>[control.id]) ? 'sb-control-imagechooser-padding' : ''" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" :placeholder="control.placeholder ? control.placeholder : <?php
echo $controlEditingTypeModel;
?>[control.id]" disabled>
<div class="sb-control-imagechooser-clear sbc-fb-tltp-parent" v-if="checkNotEmpty(<?php
echo $controlEditingTypeModel;
?>[control.id])">
<div class="sb-control-imagechooser-clear-icon" @click.prevent.default="changeSettingValue(control.id, '')"></div>
<div class="sbc-fb-tltp-elem"><span>{{genericText.clear.replace(/ /g,"&nbsp;")}}</span></div>
</div>
</div>
<div class="sb-control-imagechooser-btn" @click.prevent.default="imageChooser( control.id )">
<div v-html="svgIcons['imageChooser']"></div>
<span v-html="checkNotEmpty(<?php
echo $controlEditingTypeModel;
?>[control.id]) ? genericText.change : genericText.addImage.replace(/ /g,'&nbsp;')"></span>
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* Customizer Builder
* Number Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Number_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'number';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs" :data-contains-suffix="control.fieldSuffix !== undefined ? 'true' : 'false'">
<div class="sb-control-input-info" :class="control.fieldPrefixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldPrefix" @click.prevent.default="control.fieldPrefixAction != undefined ? fieldCustomClickAction(control.fieldPrefixAction) : false">{{control.fieldPrefix.replace(/ /g,"&nbsp;")}}</div>
<input type="number" class="sb-control-input sbc-fb-fs" :placeholder="control.placeholder ? control.placeholder : ''" :step="control.step ? control.step : 1" :max="control.max ? control.max : 1000" :min="control.min ? control.min : 0" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" @change.prevent.default="changeSettingValue(control.id,false,false, control.ajaxAction ? control.ajaxAction : false)">
<div class="sb-control-input-info" :class="control.fieldSuffixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldSuffix" @click.prevent.default="control.fieldSuffixAction != undefined ? fieldCustomClickAction(control.fieldSuffixAction) : false">
<div class="sb-control-btn-icon" v-if="control.buttonIcon" v-html="svgIcons[control.buttonIcon]"></div>
{{control.fieldSuffix.replace(/ /g,"&nbsp;")}}
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customizer Builder
* Select Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Select_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'select';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs">
<select class="sb-control-input sbc-fb-fs" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" @change.prevent.default="changeSettingValue(control.id,false,false, control.ajaxAction ? control.ajaxAction : false)">
<option v-for="(opName, opValue) in control.options" :value="opValue">{{opName}}</option>
</select>
</div>
<?php
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* Customizer Builder
* Separator Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Separator_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'separator';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-elem-separator sbc-fb-fs" :style="'margin-top:'+ (control.top ? control.top : 0) +'px;margin-bottom:'+ (control.bottom ? control.bottom : 0) +'px;'"></div>
<?php
}
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Customizer Builder
* Switcher Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Switcher_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'switcher';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-switcher-ctn" :data-active="<?php
echo $controlEditingTypeModel;
?>[control.id] == control.options.enabled" @click.prevent.default="changeSwitcherSettingValue(control.id, control.options.enabled, control.options.disabled, control.ajaxAction ? control.ajaxAction : false)">
<div class="sb-control-switcher sb-tr-2"></div>
<div class="sb-control-label" v-if="control.label" :data-title="control.labelStrong ? 'true' : false">{{control.label}}</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customizer Builder
* Text Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Text_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'text';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-input-ctn sbc-fb-fs">
<div class="sb-control-input-info" v-if="control.fieldPrefix">{{control.fieldPrefix.replace(/ /g,"&nbsp;")}}</div>
<input type="text" class="sb-control-input sbc-fb-fs" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" @change.prevent.default="changeSettingValue(control.id, false,false, control.ajaxAction ? control.ajaxAction : false)" :placeholder="control.placeholder ? control.placeholder : ''">
<div class="sb-control-input-info" v-if="control.fieldSuffix">{{control.fieldSuffix.replace(/ /g,"&nbsp;")}}</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* Customizer Builder
* TextArea Field Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Textarea_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'textarea';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-textarea-ctn sbc-fb-fs">
<textarea class="sb-control-input-textrea sbc-fb-fs" v-model="<?php
echo $controlEditingTypeModel;
?>[control.id]" :placeholder="control.placeholder ? control.placeholder : ''" @focusout.prevent.default="changeSettingValue(false,false,false, control.ajaxAction ? control.ajaxAction : false)"></textarea>
</div>
<?php
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customizer Builder
* Toggle Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Toggle_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'toggle';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-toggle-ctn sbc-fb-fs">
<div class="sb-control-toggle-elm sbc-fb-fs sb-tr-2" data-active="true">
<div class="sb-control-toggle-deco sb-tr-1"></div>
<div class="sb-control-toggle-icon" v-if="control.toggle.icon" v-html="svgIcons[control.toggle.icon]"></div>
<div class="sb-control-label">{{control.toggle.label}}</div>
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Customizer Builder
* Toggle Buttons
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Togglebutton_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'togglebutton';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-togglebutton-ctn sbc-fb-fs">
<div class="sb-control-togglebutton-elm sbc-fb-fs sb-tr-1" v-for="toggle in control.options" :data-active="<?php
echo $controlEditingTypeModel;
?>[control.id] == toggle.value" v-show="toggle.condition != undefined ? checkControlCondition(toggle.condition) : true" @click.prevent.default="changeSettingValue(control.id,toggle.value, true)" >
{{toggle.label}}
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* Customizer Builder
* Toggle Set Control
*
* @since 6.0
*/
namespace Smashballoon\Customizer\Controls;
if (!\defined('ABSPATH')) {
exit;
}
/** @internal */
class SB_Toggleset_Control extends \Smashballoon\Customizer\Controls\SB_Controls_Base
{
/**
* Get control type.
*
* Getting the Control Type
*
* @since 6.0
* @access public
*
* @return string
*/
public function get_type()
{
return 'toggleset';
}
/**
* Output Control
*
*
* @since 6.0
* @access public
*/
public function get_control_output($controlEditingTypeModel)
{
?>
<div class="sb-control-toggle-set-ctn sbc-fb-fs">
<div
class="sb-control-toggle-elm sbc-fb-fs sb-tr-2"
v-for="toggle in control.options"
:data-active="<?php
echo $controlEditingTypeModel;
?>[control.id] == toggle.value"
@click.prevent.default="changeSettingValue(control.id,toggle.value, toggle.checkExtension != undefined ? checkExtensionActive(toggle.checkExtension) : true, control.ajaxAction != undefined ? control.ajaxAction : false)"
v-show="toggle.condition != undefined ? checkControlCondition(toggle.condition) : true"
:data-disabled="toggle.checkExtension != undefined && (sbyIsPro && sbyLicenseNoticeActive || !sbyIsPro) ? !checkExtensionActive(toggle.checkExtension) : false"
>
<div
class="sb-control-toggle-extension-cover"
v-show="shouldShowTogglesetCover(toggle)"
@click.prevent.default="togglesetExtPopup(toggle)"
></div>
<div class="sb-control-toggle-deco sb-tr-1"></div>
<div class="sb-control-toggle-icon" v-if="toggle.icon" v-html="svgIcons[toggle.icon]"></div>
<div class="sb-control-label">{{toggle.label}}</div>
</div>
</div>
<?php
}
}