From 0512af0f33083f17bf0944e89e69c495741493e8 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 2 Sep 2022 07:51:08 +0200 Subject: [PATCH 01/75] Adds the customcode extractor class --- README.md | 8 +- admin/README.txt | 8 +- admin/helpers/compiler/a_Get.php | 1228 +++-------------- admin/helpers/componentbuilder.php | 52 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 + componentbuilder.xml | 2 +- .../Compiler/Customcode/Dispenser.php | 14 +- .../Compiler/Customcode/Extractor.php | 927 +++++++++++++ .../Compiler/Customcode/Extractor/Paths.php | 429 ++++++ .../Compiler/Customcode/Extractor/index.html | 1 + .../Compiler/Placeholder/Reverse.php | 16 +- .../Compiler/Service/Customcode.php | 46 + .../Compiler/Utilities/Path.php | 61 + site/helpers/componentbuilder.php | 52 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 + 15 files changed, 1725 insertions(+), 1123 deletions(-) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/Paths.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php diff --git a/README.md b/README.md index 6f5a0b002..c881984d4 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 31st August, 2022 ++ *Last Build*: 2nd September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **319873** ++ *Line count*: **321348** + *Field count*: **2002** -+ *File count*: **2090** -+ *Folder count*: **359** ++ *File count*: **2094** ++ *Folder count*: **360** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 6f5a0b002..c881984d4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 31st August, 2022 ++ *Last Build*: 2nd September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **319873** ++ *Line count*: **321348** + *Field count*: **2002** -+ *File count*: **2090** -+ *Folder count*: **359** ++ *File count*: **2094** ++ *Folder count*: **360** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index bafeb57cf..037d28d42 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -277,6 +277,8 @@ class Get * ////////23 is the ID of the code in the system don't change it!!!!!!!!!!!!!!!!!!!!!!!!!! * * @var array + * + * @deprecated 3.3 */ protected $customCodePlaceholders = array( @@ -322,6 +324,7 @@ class Get * The custom code in local files that already exist in system * * @var array + * @deprecated 3.3 */ protected $existingCustomCode = array(); @@ -329,6 +332,7 @@ class Get * The custom code in local files this are new * * @var array + * @deprecated 3.3 */ protected $newCustomCode = array(); @@ -336,6 +340,7 @@ class Get * The index of code already loaded * * @var array + * @deprecated 3.3 */ protected $codeAreadyDone = array(); @@ -972,7 +977,6 @@ class Get */ public function __construct() { - echo '
';
 		// we do not yet have this set as an option
 		$config['remove_line_breaks']
 			= 2; // 2 is global (use the components value)
@@ -1042,14 +1046,10 @@ public function __construct()
 		$this->db = JFactory::getDbo();
 		// get global placeholders @deprecated
 		$this->globalPlaceholders = CFactory::_('Component.Placeholder')->get();
-		// check if this component is installed on the current website
-		if ($paths = $this->getLocalInstallPaths())
-		{
-			// start Automatic import of custom code
-			$today = JFactory::getDate()->toSql();
-			// get the custom code from installed files
-			$this->customCodeFactory($paths, $today);
-		}
+
+		// get the custom code from installed files
+		CFactory::_('Customcode.Extractor')->run();
+
 		// Trigger Event: jcb_ce_onBeforeGetComponentData
 		CFactory::_J('Event')->trigger(
 			'jcb_ce_onBeforeGetComponentData',
@@ -6907,11 +6907,11 @@ protected function getExternalCodeString($target, &$bucket)
 	{
 		// set notice that we could not get a valid string from the target
 		$this->app->enqueueMessage(
-			JText::_('

External Code Warning

'), 'Error' + JText::sprintf('

%s Warning

', __CLASS__), 'Error' ); $this->app->enqueueMessage( - JText::_( - 'Use of a deprecated method (getExternalCodeString)!' + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ ), 'Error' ); } @@ -6930,11 +6930,11 @@ protected function cutExternalCodeString($string, $sequence, $key) { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - JText::_('

External Code Warning

'), 'Error' + JText::sprintf('

%s Warning

', __CLASS__), 'Error' ); $this->app->enqueueMessage( - JText::_( - 'Use of a deprecated method (cutExternalCodeString)!' + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ ), 'Error' ); @@ -6968,11 +6968,11 @@ protected function insertCustomCode($ids, $string, $debug = 0) { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - JText::_('

External Code Warning

'), 'Error' + JText::sprintf('

%s Warning

', __CLASS__), 'Error' ); $this->app->enqueueMessage( - JText::_( - 'Use of a deprecated method (insertCustomCode)!' + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ ), 'Error' ); @@ -6992,11 +6992,11 @@ protected function buildCustomCodePlaceholders($item, &$code, $debug = 0) { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - JText::_('

External Code Warning

'), 'Error' + JText::sprintf('

%s Warning

', __CLASS__), 'Error' ); $this->app->enqueueMessage( - JText::_( - 'Use of a deprecated method (buildCustomCodePlaceholders)!' + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ ), 'Error' ); @@ -7579,23 +7579,15 @@ public function getCustomCode(?array $ids = null, bool $setLang = true, int $deb */ protected function checkCustomCodeMemory($ids) { - // reset custom code - CFactory::_('Customcode')->active = array(); - foreach ($ids as $pointer => $id) - { - if (isset(CFactory::_('Customcode')->memory[$id])) - { - CFactory::_('Customcode')->active[] = CFactory::_('Customcode')->memory[$id]; - unset($ids[$pointer]); - } - } - // check if any ids left to fetch - if (ArrayHelper::check($ids)) - { - return $ids; - } - - return false; + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -7630,127 +7622,57 @@ protected function setPower($guid) { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - JText::_('

Power building error

'), 'Error' + JText::sprintf('

%s Warning

', __CLASS__), 'Error' ); $this->app->enqueueMessage( - JText::_( - 'Use of a deprecated method (setPower)!' + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ ), 'Error' ); - return ''; + return false; } /** * get the Joomla module path * - * @return array of module path and target site area on success - * + * @return string of module path and target site area on success + * @deprecated 3.3 */ protected function getModulePath($id) { - if (is_numeric($id) && $id > 0) - { - // Create a new query object. - $query = $this->db->getQuery(true); - - $query->select('a.*'); - $query->select( - $this->db->quoteName( - array( - 'a.name', - 'a.target' - ), array( - 'name', - 'target' - ) - ) - ); - // from these tables - $query->from('#__componentbuilder_joomla_module AS a'); - $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); - $this->db->setQuery($query); - $this->db->execute(); - if ($this->db->getNumRows()) - { - // get the module data - $module = $this->db->loadObject(); - // update the name if it has dynamic values - $module->name = CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->add($module->name), - $this->globalPlaceholders - ); - // set safe class function name - $module->code_name - = ClassfunctionHelper::safe( - $module->name - ); - // set module folder name - $module->folder_name = 'mod_' . strtolower($module->code_name); - // set the lang key - CFactory::_('Language.Extractor')->langKeys[strtoupper($module->folder_name)] = $module->id - . '_M0dU|3'; - // return the path - if ($module->target == 2) - { - // administrator client area - return JPATH_ADMINISTRATOR . '/modules/' - . $module->folder_name; - } - else - { - // default is the site client area - return JPATH_ROOT . '/modules/' . $module->folder_name; - } - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return false; + return ''; } /** * get the Joomla Modules IDs * * @return array of IDs on success - * + * @deprecated 3.3 */ protected function getModuleIDs() { - if (($addjoomla_modules = GetHelper::var( - 'component_modules', CFactory::_('Config')->component_id, 'joomla_component', - 'addjoomla_modules' - )) !== false) - { - $addjoomla_modules = (JsonHelper::check( - $addjoomla_modules - )) ? json_decode($addjoomla_modules, true) : null; - if (ArrayHelper::check($addjoomla_modules)) - { - $joomla_modules = array_filter( - array_values($addjoomla_modules), - function ($array) { - // only load the modules whose target association call for it - if (!isset($array['target']) || $array['target'] != 2) - { - return true; - } - - return false; - } - ); - // if we have values we return IDs - if (ArrayHelper::check($joomla_modules)) - { - return array_map( - function ($array) { - return (int) $array['module']; - }, $joomla_modules - ); - } - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return false; + return []; } /** @@ -8620,113 +8542,42 @@ public function getModAdminVvvvvvvdm($fieldScriptBucket) * get the Joomla plugins IDs * * @return array of IDs on success - * + * @deprecated 3.3 */ protected function getPluginIDs() { - if (($addjoomla_plugins = GetHelper::var( - 'component_plugins', CFactory::_('Config')->component_id, 'joomla_component', - 'addjoomla_plugins' - )) !== false) - { - $addjoomla_plugins = (JsonHelper::check( - $addjoomla_plugins - )) ? json_decode($addjoomla_plugins, true) : null; - if (ArrayHelper::check($addjoomla_plugins)) - { - $joomla_plugins = array_filter( - array_values($addjoomla_plugins), - function ($array) { - // only load the plugins whose target association call for it - if (!isset($array['target']) || $array['target'] != 2) - { - return true; - } - - return false; - } - ); - // if we have values we return IDs - if (ArrayHelper::check($joomla_plugins)) - { - return array_map( - function ($array) { - return (int) $array['plugin']; - }, $joomla_plugins - ); - } - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return false; + return []; } /** * get the Joomla plugin path * * @return string of plugin path on success - * + * @deprecated 3.3 */ protected function getPluginPath($id) { - if (is_numeric($id) && $id > 0) - { - // Create a new query object. - $query = $this->db->getQuery(true); - - $query->select('a.*'); - $query->select( - $this->db->quoteName( - array( - 'a.name', - 'g.name' - ), array( - 'name', - 'group' - ) - ) - ); - // from these tables - $query->from('#__componentbuilder_joomla_plugin AS a'); - $query->join( - 'LEFT', $this->db->quoteName( - '#__componentbuilder_joomla_plugin_group', 'g' - ) . ' ON (' . $this->db->quoteName('a.joomla_plugin_group') - . ' = ' . $this->db->quoteName('g.id') . ')' - ); - $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); - $this->db->setQuery($query); - $this->db->execute(); - if ($this->db->getNumRows()) - { - // get the plugin data - $plugin = $this->db->loadObject(); - // update the name if it has dynamic values - $plugin->name = CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->add($plugin->name), - $this->globalPlaceholders - ); - // update the name if it has dynamic values - $plugin->code_name - = ClassfunctionHelper::safe( - $plugin->name - ); - // set plugin folder name - $plugin->group = strtolower($plugin->group); - // set plugin file name - $plugin->file_name = strtolower($plugin->code_name); - // set the lang key - CFactory::_('Language.Extractor')->langKeys['PLG_' . strtoupper( - $plugin->group . '_' . $plugin->file_name - )] - = $plugin->id . '_P|uG!n'; - - // return the path - return $plugin->group . '/' . $plugin->file_name; - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return false; + return ''; } /** @@ -9496,46 +9347,19 @@ public function getPluginXMLTemplate(&$plugin) * * @return void * + * @deprecated 3.3 */ protected function setNewCustomCode($when = 1) { - if (count((array) $this->newCustomCode) >= $when) - { - // Create a new query object. - $query = $this->db->getQuery(true); - $continue = false; - // Insert columns. - $columns = array('path', 'type', 'target', 'comment_type', - 'component', 'published', 'created', 'created_by', - 'version', 'access', 'hashtarget', 'from_line', - 'to_line', 'code', 'hashendtarget'); - // Prepare the insert query. - $query->insert( - $this->db->quoteName('#__componentbuilder_custom_code') - ); - $query->columns($this->db->quoteName($columns)); - foreach ($this->newCustomCode as $values) - { - if (count((array) $values) == 15) - { - $query->values(implode(',', $values)); - $continue = true; - } - else - { - // TODO line mismatch... should not happen - } - } - // clear the values array - $this->newCustomCode = array(); - if (!$continue) - { - return false; // insure we dont continue if no values were loaded - } - // Set the query using our newly populated query object and execute it. - $this->db->setQuery($query); - $this->db->execute(); - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -9545,26 +9369,19 @@ protected function setNewCustomCode($when = 1) * * @return void * + * @deprecated 3.3 */ protected function setExistingCustomCode($when = 1) { - if (count((array) $this->existingCustomCode) >= $when) - { - foreach ($this->existingCustomCode as $code) - { - // Create a new query object. - $query = $this->db->getQuery(true); - // Prepare the update query. - $query->update( - $this->db->quoteName('#__componentbuilder_custom_code') - )->set($code['fields'])->where($code['conditions']); - // Set the query using our newly populated query object and execute it. - $this->db->setQuery($query); - $this->db->execute(); - } - // clear the values array - $this->existingCustomCode = array(); - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -9574,79 +9391,11 @@ protected function setExistingCustomCode($when = 1) * @param string $today The date for today * * @return void - * + * @deprecated 3.3 Use CFactory::_('Customcode.Extractor')->run(); */ protected function customCodeFactory(&$paths, &$today) { - // we must first store the current working directory - $joomla = getcwd(); - $counter = array(1 => 0, 2 => 0); - // file types to get - $fileTypes = array('\.php', '\.js', '\.xml'); - - // set some local placeholders - $placeholders = array_flip( - $this->globalPlaceholders - ); - $placeholders[StringHelper::safe( - CFactory::_('Config')->component_code_name, 'F' - ) . 'Helper::'] - = Placefix::_('Component') . 'Helper::'; - $placeholders['COM_' . StringHelper::safe( - CFactory::_('Config')->component_code_name, 'U' - )] - = 'COM_' . Placefix::_('COMPONENT'); - $placeholders['com_' . CFactory::_('Config')->component_code_name] = 'com_' . Placefix::_('component'); - // putt the last first - $placeholders = array_reverse($placeholders, true); - - foreach ($paths as $target => $path) - { - // we are changing the working directory to the component path - chdir($path); - foreach ($fileTypes as $type) - { - // get a list of files in the current directory tree (only PHP, JS and XML for now) - $files = Folder::files('.', $type, true, true); - // check if files found - if (ArrayHelper::check($files)) - { - foreach ($files as $file) - { - $this->searchFileContent( - $counter, $file, $target, - $this->customCodePlaceholders, $placeholders, $today - ); - // insert new code - if (ArrayHelper::check( - $this->newCustomCode - )) - { - $this->setNewCustomCode(100); - } - // update existing custom code - if (ArrayHelper::check( - $this->existingCustomCode - )) - { - $this->setExistingCustomCode(30); - } - } - } - } - } - // change back to Joomla working directory - chdir($joomla); - // make sure all code is stored - if (ArrayHelper::check($this->newCustomCode)) - { - $this->setNewCustomCode(); - } - // update existing custom code - if (ArrayHelper::check($this->existingCustomCode)) - { - $this->setExistingCustomCode(); - } + CFactory::_('Customcode.Extractor')->run(); } /** @@ -9660,406 +9409,23 @@ protected function customCodeFactory(&$paths, &$today) * * @return array on success * + * @deprecated 3.3 */ protected function searchFileContent(&$counter, &$file, &$target, &$searchArray, &$placeholders, &$today ) { - // we add a new search for the GUI CODE Blocks - CFactory::_('Customcode.Gui')->search($file, $placeholders, $today, $target); - // reset each time per file - $loadEndFingerPrint = false; - $endFingerPrint = array(); - $fingerPrint = array(); - $codeBucket = array(); - $pointer = array(); - $reading = array(); - $reader = 0; - // reset found Start type - $commentType = 0; - // make sure we have the path correct (the script file is not in admin path for example) - // there may be more... will nead to keep our eye on this... since files could be moved during install - $file = str_replace('./', '', $file); # TODO (windows path issues) - if ($file !== 'script.php') - { - $path = $target . '/' . $file; - } - else - { - $path = $file; - } - // now we go line by line - foreach (new SplFileObject($file) as $lineNumber => $lineContent) - { - // we musk keep last few lines to dynamic find target entry later - $fingerPrint[$lineNumber] = trim($lineContent); - // load the end fingerprint - if ($loadEndFingerPrint) - { - $endFingerPrint[$lineNumber] = trim($lineContent); - } - foreach ($searchArray as $type => $search) - { - $i = (int) ($type == 3 || $type == 4) ? 2 : 1; - $_type = (int) ($type == 1 || $type == 3) ? 1 : 2; - if ($reader === 0 || $reader === $i) - { - $targetKey = $type; - $start = '/***[' . $search . '***/'; - $end = '/***[/' . $search . '***/'; - $startHTML = ''; - $endHTML = ''; - // check if the ending place holder was found - if (isset($reading[$targetKey]) && $reading[$targetKey] - && ((trim($lineContent) === $end - || strpos( - $lineContent, $end - ) !== false) - || (trim($lineContent) === $endHTML - || strpos( - $lineContent, $endHTML - ) !== false))) - { - // trim the placeholder and if there is still data then load it - if (isset($endReplace) - && ($_line - = $this->addLineChecker( - $endReplace, 2, $lineContent - )) !== false) - { - $codeBucket[$pointer[$targetKey]][] = $_line; - } - // deactivate the reader - $reading[$targetKey] = false; - if ($_type == 2) - { - // deactivate search - $reader = 0; - } - else - { - // activate fingerPrint for replacement end target - $loadEndFingerPrint = true; - $backupTargetKey = $targetKey; - $backupI = $i; - } - // all new records we can do a bulk insert - if ($i === 1) - { - // end the bucket info for this code block - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - (int) $lineNumber - ); // 'toline' - // first reverse engineer this code block - $c0de = CFactory::_('Placeholder.Reverse')->engine( - implode('', $codeBucket[$pointer[$targetKey]]), - $placeholders, $target - ); - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - base64_encode($c0de) - ); // 'code' - if ($_type == 2) - { - // load the last value - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote(0); // 'hashendtarget' - } - } - // the record already exist so we must update instead - elseif ($i === 2) - { - // end the bucket info for this code block - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('to_line') . ' = ' - . $this->db->quote($lineNumber); - // first reverse engineer this code block - $c0de = CFactory::_('Placeholder.Reverse')->engine( - implode('', $codeBucket[$pointer[$targetKey]]), - $placeholders, $target, - $this->existingCustomCode[$pointer[$targetKey]]['id'] - ); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('code') . ' = ' - . $this->db->quote(base64_encode($c0de)); - if ($_type == 2) - { - // load the last value - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('hashendtarget') - . ' = ' . $this->db->quote(0); - } - } - } - // check if the endfingerprint is ready to save - if (count((array) $endFingerPrint) === 3) - { - $hashendtarget = '3__' . md5( - implode('', $endFingerPrint) - ); - // all new records we can do a bulk insert - if ($i === 1) - { - // load the last value - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - $hashendtarget - ); // 'hashendtarget' - } - // the record already exist so we must use module to update - elseif ($i === 2) - { - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('hashendtarget') . ' = ' - . $this->db->quote($hashendtarget); - } - // reset the needed values - $endFingerPrint = array(); - $loadEndFingerPrint = false; - // deactivate reader (to allow other search) - $reader = 0; - } - // then read in the code - if (isset($reading[$targetKey]) && $reading[$targetKey]) - { - $codeBucket[$pointer[$targetKey]][] = $lineContent; - } - // see if the custom code line starts now with PHP/JS comment type - if ((!isset($reading[$targetKey]) || !$reading[$targetKey]) - && (($i === 1 && trim($lineContent) === $start) - || strpos($lineContent, $start) !== false)) - { - $commentType = 1; // PHP/JS type - $startReplace = $start; - $endReplace = $end; - } - // see if the custom code line starts now with HTML comment type - elseif ((!isset($reading[$targetKey]) - || !$reading[$targetKey]) - && (($i === 1 && trim($lineContent) === $startHTML) - || strpos($lineContent, $startHTML) !== false)) - { - $commentType = 2; // HTML type - $startReplace = $startHTML; - $endReplace = $endHTML; - } - // check if the starting place holder was found - if ($commentType > 0) - { - // if we have all on one line we have a problem (don't load it TODO) - if (strpos($lineContent, $endReplace) !== false) - { - // reset found comment type - $commentType = 0; - $this->app->enqueueMessage( - JText::_('

Custom Codes Warning

'), - 'Warning' - ); - $this->app->enqueueMessage( - JText::sprintf( - 'We found dynamic code all in one line, and ignored it! Please review (%s) for more details!', - $path - ), 'Warning' - ); - continue; - } - // do a quick check to insure we have an id - $id = false; - if ($i === 2) - { - $id = $this->getSystemID( - $lineContent, - array(1 => $start, 2 => $startHTML), - $commentType - ); - } - if ($i === 2 && $id > 0) - { - // make sure we update it only once even if found again. - if (isset($this->codeAreadyDone[$id])) - { - // reset found comment type - $commentType = 0; - continue; - } - // store the id to avoid duplication - $this->codeAreadyDone[$id] = (int) $id; - } - // start replace - $startReplace = $this->setStartReplace( - $id, $commentType, $startReplace - ); - // set active reader (to lock out other search) - $reader = $i; - // set pointer - $pointer[$targetKey] = $counter[$i]; - // activate the reader - $reading[$targetKey] = true; - // start code bucket - $codeBucket[$pointer[$targetKey]] = array(); - // trim the placeholder and if there is still data then load it - if ($_line = $this->addLineChecker( - $startReplace, 1, $lineContent - )) - { - $codeBucket[$pointer[$targetKey]][] = $_line; - } - // get the finger print around the custom code - $inFinger = count($fingerPrint); - $getFinger = $inFinger - 1; - $hasharray = array_slice( - $fingerPrint, -$inFinger, $getFinger, true - ); - $hasleng = count($hasharray); - $hashtarget = $hasleng . '__' . md5( - implode('', $hasharray) - ); - // for good practice - ComponentbuilderHelper::fixPath($path); - // all new records we can do a bulk insert - if ($i === 1 || !$id) - { - // start the bucket for this code - $this->newCustomCode[$pointer[$targetKey]] - = array(); - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - $path - ); // 'path' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - (int) $_type - ); // 'type' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - 1 - ); // 'target' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - $commentType - ); // 'comment_type' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - (int) CFactory::_('Config')->component_id - ); // 'component' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - 1 - ); // 'published' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - $today - ); // 'created' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - (int) $this->user->id - ); // 'created_by' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - 1 - ); // 'version' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - 1 - ); // 'access' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - $hashtarget - ); // 'hashtarget' - $this->newCustomCode[$pointer[$targetKey]][] - = $this->db->quote( - (int) $lineNumber - ); // 'fromline' - } - // the record already exist so we must update instead - elseif ($i === 2 && $id > 0) - { - // start the bucket for this code - $this->existingCustomCode[$pointer[$targetKey]] - = array(); - $this->existingCustomCode[$pointer[$targetKey]]['id'] - = (int) $id; - $this->existingCustomCode[$pointer[$targetKey]]['conditions'] - = array(); - $this->existingCustomCode[$pointer[$targetKey]]['conditions'][] - = $this->db->quoteName('id') . ' = ' - . $this->db->quote($id); - $this->existingCustomCode[$pointer[$targetKey]]['fields'] - = array(); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('path') . ' = ' - . $this->db->quote($path); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('type') . ' = ' - . $this->db->quote($_type); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('comment_type') . ' = ' - . $this->db->quote($commentType); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('component') . ' = ' - . $this->db->quote(CFactory::_('Config')->component_id); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('from_line') . ' = ' - . $this->db->quote($lineNumber); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('modified') . ' = ' - . $this->db->quote($today); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('modified_by') . ' = ' - . $this->db->quote($this->user->id); - $this->existingCustomCode[$pointer[$targetKey]]['fields'][] - = $this->db->quoteName('hashtarget') . ' = ' - . $this->db->quote($hashtarget); - } - else // this should actualy never happen - { - // de activate the reader - $reading[$targetKey] = false; - $reader = 0; - } - // reset found comment type - $commentType = 0; - // update the counter - $counter[$i]++; - } - } - } - // make sure only a few lines is kept at a time - if (count((array) $fingerPrint) > 10) - { - $fingerPrint = array_slice($fingerPrint, -6, 6, true); - } - } - // if the code is at the end of the page and there were not three more lines - if (count((array) $endFingerPrint) > 0 || $loadEndFingerPrint) - { - if (count((array) $endFingerPrint) > 0) - { - $leng = count($endFingerPrint); - $hashendtarget = $leng . '__' . md5( - implode('', $endFingerPrint) - ); - } - else - { - $hashendtarget = 0; - } - // all new records we can do a buldk insert - if ($backupI === 1) - { - // load the last value - $this->newCustomCode[$pointer[$backupTargetKey]][] - = $this->db->quote($hashendtarget); // 'hashendtarget' - } - // the record already exist so we must use module to update - elseif ($backupI === 2) - { - $this->existingCustomCode[$pointer[$backupTargetKey]]['fields'][] - = $this->db->quoteName('hashendtarget') . ' = ' - . $this->db->quote($hashendtarget); - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); + + return []; } /** @@ -10072,55 +9438,7 @@ protected function searchFileContent(&$counter, &$file, &$target, */ protected function setDynamicHASHING($script) { - // check if we should hash a string - if (strpos($script, 'HASHSTRING((((') !== false) - { - // get the strings - $values = GetHelper::allBetween( - $script, 'HASHSTRING((((', '))))' - ); - $locker = array(); - // convert them - foreach ($values as $value) - { - $locker['HASHSTRING((((' . $value . '))))'] - = md5($value); - } - - // update the script - return CFactory::_('Placeholder')->update($script, $locker); - } - // check if we should hash a file - if (strpos($script, 'HASHFILE((((') !== false) - { - // get the strings - $values = GetHelper::allBetween( - $script, 'HASHFILE((((', '))))' - ); - $locker = array(); - // convert them - foreach ($values as $path) - { - // we first get the file if it exist - if ($value = FileHelper::getContent($path)) - { - // now we hash the file content - $locker['HASHFILE((((' . $path . '))))'] - = md5($value); - } - else - { - // could not retrieve the file so we show error - $locker['HASHFILE((((' . $path . '))))'] - = 'ERROR'; - } - } - - // update the script - return CFactory::_('Placeholder')->update($script, $locker); - } - - return $script; + return CFactory::_('Customcode.Hash')->set($script); } /** @@ -10133,30 +9451,7 @@ protected function setDynamicHASHING($script) */ protected function setBase64LOCK($script) { - if (strpos($script, 'LOCKBASE64((((') !== false) - { - // get the strings - $values = GetHelper::allBetween( - $script, 'LOCKBASE64((((', '))))' - ); - $locker = array(); - // convert them - foreach ($values as $value) - { - $locker['LOCKBASE64((((' . $value . '))))'] - = "base64_decode( preg_replace('/\s+/', ''," . - PHP_EOL . Indent::_(2) . "'" . - wordwrap( - base64_encode($value), 64, PHP_EOL . Indent::_(2), true - ) . - "'))"; - } - - // update the script - return CFactory::_('Placeholder')->update($script, $locker); - } - - return $script; + return CFactory::_('Customcode.LockBase')->set($script); } /** @@ -10184,15 +9479,17 @@ public function setGuiCodePlaceholder($string, $config) */ protected function canAddGuiCodePlaceholder(&$code) { - // check for customcode placeholders - if (strpos($code, '$$$$') !== false) - { - // we do not add GUI wrapper placeholder to code - // that already has any customcode placeholders - return false; - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return true; + return false; } /** @@ -10220,29 +9517,19 @@ protected function guiCodeSearch(&$file, &$placeholders, &$today, &$target) * * @return bool true on success * + * @deprecated 3.3 */ protected function addLineChecker($replaceKey, $type, $lineContent) { - $check = explode($replaceKey, $lineContent); - switch ($type) - { - case 1: - // beginning of code - $i = trim($check[1]); - if (StringHelper::check($i)) - { - return $check[1]; - } - break; - case 2: - // end of code - $i = trim($check[0]); - if (StringHelper::check($i)) - { - return $check[0]; - } - break; - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); return false; } @@ -10256,23 +9543,21 @@ protected function addLineChecker($replaceKey, $type, $lineContent) * * @return array on success * + * @deprecated 3.3 */ protected function setStartReplace($id, $commentType, $startReplace) { - if ($id > 0) - { - switch ($commentType) - { - case 1: // the PHP & JS type - $startReplace .= '/*' . $id . '*/'; - break; - case 2: // the HTML type - $startReplace .= ''; - break; - } - } + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); - return $startReplace; + return []; } /** @@ -10282,33 +9567,23 @@ protected function setStartReplace($id, $commentType, $startReplace) * @param string $placeholders The values to search for * @param int $commentType The comment type * - * @return array on success + * @return int on success * + * @deprecated 3.3 */ protected function getSystemID(&$lineContent, $placeholders, $commentType) { - $trim = '/'; - if ($commentType == 2) - { - $trim = ' PHP/JS ---#################################### + * + * New Insert Code = /xxx[INSERT>$$$$]xxx/ /xxx[/INSERT>$$$$]xxx/ + * New Replace Code = /xxx[REPLACE>$$$$]xxx/ /xxx[/REPLACE>$$$$]xxx/ + * + * //////////////////////////////// when JCB adds it back ////////////////////////////////// + * JCB Add Inserted Code = /xxx[INSERTED$$$$]xxx//xx23xx/ /xxx[/INSERTED$$$$]xxx/ + * JCB Add Replaced Code = /xxx[REPLACED$$$$]xxx//xx25xx/ /xxx[/REPLACED$$$$]xxx/ + * + * /////////////////////////////// changeing existing custom code ///////////////////////// + * Update Inserted Code = /xxx[INSERTED>$$$$]xxx//xx23xx/ /xxx[/INSERTED>$$$$]xxx/ + * Update Replaced Code = /xxx[REPLACED>$$$$]xxx//xx25xx/ /xxx[/REPLACED>$$$$]xxx/ + * + * The custom script placeholders - we use the (==) to avoid detection it should be (--) + * ###################################---> HTML ---##################################### + * + * New Insert Code = !==[INSERT>$$$$]==> !==[/INSERT>$$$$]==> + * New Replace Code = !==[REPLACE>$$$$]==> !==[/REPLACE>$$$$]==> + * + * ///////////////////////////////// when JCB adds it back /////////////////////////////// + * JCB Add Inserted Code = + * JCB Add Replaced Code = + * + * //////////////////////////// changeing existing custom code /////////////////////////// + * Update Inserted Code = !==[INSERTED>$$$$]==> !==[/INSERTED>$$$$]==> + * Update Replaced Code = !==[REPLACED>$$$$]==> !==[/REPLACED>$$$$]==> + * + * ////////23 is the ID of the code in the system don't change it!!!!!!!!!!!!!!!!!!!!!!!!!! + * + * More info read: https://git.vdm.dev/joomla/Component-Builder/wiki/TIPS:-Custom-Code + * + * @since 3.2.0 + */ +class Extractor +{ + /** + * The placeholder keys + * + * @var array + * @since 3.2.0 + */ + protected array $PKeys + = [ + 1 => 'REPLACE<>$$$$]', + 2 => 'INSERT<>$$$$]', + 3 => 'REPLACED<>$$$$]', + 4 => 'INSERTED<>$$$$]' + ]; + + /** + * The custom code in local files that already exist in system + * + * @var array + * @since 3.2.0 + */ + protected array $existing = []; + + /** + * The custom code in local files that are new + * + * @var array + * @since 3.2.0 + */ + protected array $new = []; + + /** + * The index of code already loaded + * + * @var array + * @since 3.2.0 + */ + protected array $done = []; + + /** + * The search counter + * + * @var array + * @since 3.2.0 + */ + protected array $counter = [1 => 0, 2 => 0]; + + /** + * The file types to search + * + * @var array + * @since 3.2.0 + */ + protected array $fileTypes = ['\.php', '\.js', '\.xml']; + + /** + * The local placeholders + * + * @var array + * @since 3.2.0 + */ + protected array $placeholders; + + /** + * Today's date in SQL format + * + * @var string + * @since 3.2.0 + */ + protected string $today; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + **/ + protected Config $config; + + /** + * Compiler Customcode Gui + * + * @var Gui + * @since 3.2.0 + **/ + protected Gui $gui; + + /** + * Compiler Customcode Extractor Paths + * + * @var Paths + * @since 3.2.0 + **/ + protected Paths $paths; + + /** + * Compiler Placeholder Reverse + * + * @var Reverse + * @since 3.2.0 + **/ + protected Reverse $reverse; + + /** + * Compiler Component Placeholder + * + * @var Placeholder + * @since 3.2.0 + **/ + protected Placeholder $componentPlaceholder; + + /** + * Current User Object + * + * @var User + * @since 3.2.0 + **/ + protected User $user; + + /** + * Database object to query local DB + * + * @var \JDatabaseDriver + * @since 3.2.0 + **/ + protected \JDatabaseDriver $db; + + /** + * Database object to query local DB + * + * @var CMSApplication + * @since 3.2.0 + **/ + protected CMSApplication $app; + + /** + * Constructor. + * + * @param Config|null $config The compiler config object. + * @param Gui|null $gui The compiler customcode gui object. + * @param Paths|null $paths The compiler customcode extractor paths object. + * @param Reverse|null $reverse The compiler placeholder reverse object. + * @param Placeholder|null $placeholder The compiler component placeholder object. + * @param User|null $user The current User object. + * @param \JDatabaseDriver|null $db The Database Driver object. + * @param CMSApplication|null $app The CMS Application object. + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Gui $gui = null, ?Paths $paths = null, + ?Reverse $reverse = null, ?Placeholder $placeholder = null, + ?User $user = null, ?\JDatabaseDriver $db = null, ?CMSApplication $app = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->gui = $gui ?: Compiler::_('Customcode.Gui'); + $this->paths = $paths ?: Compiler::_('Customcode.Extractor.Paths'); + $this->reverse = $reverse ?: Compiler::_('Placeholder.Reverse'); + $this->componentPlaceholder = $placeholder ?: Compiler::_('Component.Placeholder'); + $this->user = $user ?: Factory::getUser(); + $this->db = $db ?: Factory::getDbo(); + $this->app = $app ?: Factory::getApplication(); + + // set today's date + $this->today = Factory::getDate()->toSql(); + + // set some local placeholders + $placeholders = array_flip( + $this->componentPlaceholder->get() + ); + + $placeholders[StringHelper::safe( + $this->config->component_code_name, 'F' + ) . 'Helper::'] = Placefix::_('Component') . 'Helper::'; + + $placeholders['COM_' . StringHelper::safe( + $this->config->component_code_name, 'U' + )] = 'COM_' . Placefix::_('COMPONENT'); + + $placeholders['com_' . $this->config->component_code_name] = 'com_' . Placefix::_('component'); + + // set the local placeholders + $this->placeholders = array_reverse($placeholders, true); + } + + /** + * get the custom code from the local files + * + * @return void + * @since 3.2.0 + */ + public function run() + { + // we must first store the current working directory + $joomla = getcwd(); + + foreach ($this->paths->active as $target => $path) + { + // we are changing the working directory to the component path + chdir($path); + foreach ($this->fileTypes as $type) + { + // get a list of files in the current directory tree (only PHP, JS and XML for now) + $files = Folder::files('.', $type, true, true); + + // check if files found + if (ArrayHelper::check($files)) + { + foreach ($files as $file) + { + // search the file + $this->searchFileContent($file, $target); + + // insert new code + $this->insert(100); + + // update existing custom code + $this->update(30); + } + } + } + } + + // change back to Joomla working directory + chdir($joomla); + + // make sure all code is stored + $this->insert(); + // update existing custom code + $this->update(); + } + + /** + * search a file for placeholders and store result + * + * @param string $file The file path to search + * + * @return array on success + * @since 3.2.0 + */ + protected function searchFileContent(&$file, &$target) + { + // we add a new search for the GUI CODE Blocks + $this->gui->search($file, $this->placeholders, $this->today, $target); + + // reset each time per file + $loadEndFingerPrint = false; + $endFingerPrint = []; + $fingerPrint = []; + $codeBucket = []; + $pointer = []; + $reading = []; + $reader = 0; + + // reset found Start type + $commentType = 0; + + // make sure we have the path correct (the script file is not in admin path for example) + // there may be more... will nead to keep our eye on this... since files could be moved during install + $file = str_replace('./', '', $file); # TODO (windows path issues) + + if ($file !== 'script.php') + { + $path = $target . '/' . $file; + } + else + { + $path = $file; + } + + // now we go line by line + foreach (new \SplFileObject($file) as $lineNumber => $lineContent) + { + // we must keep last few lines to dynamic find target entry later + $fingerPrint[$lineNumber] = trim($lineContent); + + // load the end fingerprint + if ($loadEndFingerPrint) + { + $endFingerPrint[$lineNumber] = trim($lineContent); + } + + foreach ($this->PKeys as $type => $search) + { + $i = (int) ($type == 3 || $type == 4) ? 2 : 1; + $_type = (int) ($type == 1 || $type == 3) ? 1 : 2; + + if ($reader === 0 || $reader === $i) + { + $targetKey = $type; + + $start = '/***[' . $search . '***/'; + $end = '/***[/' . $search . '***/'; + $startHTML = ''; + $endHTML = ''; + + // check if the ending placeholder was found + if (isset($reading[$targetKey]) && $reading[$targetKey] + && ((trim($lineContent) === $end + || strpos($lineContent, $end) !== false) + || (trim($lineContent) === $endHTML + || strpos($lineContent, $endHTML) !== false))) + { + // trim the placeholder and if there is still data then load it + if (isset($endReplace) + && ($_line = $this->addLineChecker($endReplace, 2, $lineContent)) !== false) + { + $codeBucket[$pointer[$targetKey]][] = $_line; + } + + // deactivate the reader + $reading[$targetKey] = false; + + if ($_type == 2) + { + // deactivate search + $reader = 0; + } + else + { + // activate fingerPrint for replacement end target + $loadEndFingerPrint = true; + $backupTargetKey = $targetKey; + $backupI = $i; + } + + // all new records we can do a bulk insert + if ($i === 1) + { + // end the bucket info for this code block + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + (int) $lineNumber + ); // 'toline' + + // first reverse engineer this code block + $c0de = $this->reverse->engine( + implode('', $codeBucket[$pointer[$targetKey]]), + $this->placeholders, $target + ); + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + base64_encode($c0de) + ); // 'code' + + if ($_type == 2) + { + // load the last value + $this->new[$pointer[$targetKey]][] + = $this->db->quote(0); // 'hashendtarget' + } + } + // the record already exist so we must update instead + elseif ($i === 2) + { + // end the bucket info for this code block + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('to_line') . ' = ' + . $this->db->quote($lineNumber); + + // first reverse engineer this code block + $c0de = $this->reverse->engine( + implode('', $codeBucket[$pointer[$targetKey]]), + $this->placeholders, $target, + $this->existing[$pointer[$targetKey]]['id'] + ); + + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('code') . ' = ' + . $this->db->quote(base64_encode($c0de)); + + if ($_type == 2) + { + // load the last value + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('hashendtarget') + . ' = ' . $this->db->quote(0); + } + } + } + + // check if the endfingerprint is ready to save + if (count((array) $endFingerPrint) === 3) + { + $hashendtarget = '3__' . md5( + implode('', $endFingerPrint) + ); + + // all new records we can do a bulk insert + if ($i === 1) + { + // load the last value + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + $hashendtarget + ); // 'hashendtarget' + } + // the record already exist so we must update + elseif ($i === 2) + { + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('hashendtarget') . ' = ' + . $this->db->quote($hashendtarget); + } + + // reset the needed values + $endFingerPrint = []; + $loadEndFingerPrint = false; + + // deactivate reader (to allow other search) + $reader = 0; + } + + // then read in the code + if (isset($reading[$targetKey]) && $reading[$targetKey]) + { + $codeBucket[$pointer[$targetKey]][] = $lineContent; + } + + // see if the custom code line starts now with PHP/JS comment type + if ((!isset($reading[$targetKey]) || !$reading[$targetKey]) + && (($i === 1 && trim($lineContent) === $start) + || strpos($lineContent, $start) !== false)) + { + $commentType = 1; // PHP/JS type + $startReplace = $start; + $endReplace = $end; + } + // see if the custom code line starts now with HTML comment type + elseif ((!isset($reading[$targetKey]) + || !$reading[$targetKey]) + && (($i === 1 && trim($lineContent) === $startHTML) + || strpos($lineContent, $startHTML) !== false)) + { + $commentType = 2; // HTML type + $startReplace = $startHTML; + $endReplace = $endHTML; + } + + // check if the starting place holder was found + if ($commentType > 0) + { + // if we have all on one line we have a problem (don't load it TODO) + if (strpos($lineContent, $endReplace) !== false) + { + // reset found comment type + $commentType = 0; + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE'), + 'Warning' + ); + $this->app->enqueueMessage( + Text::sprintf('COM_COMPONENTBUILDER_WE_FOUND_DYNAMIC_CODE_BALL_IN_ONE_LINEB_AND_IGNORED_IT_PLEASE_REVIEW_S_FOR_MORE_DETAILS', + $path + ), 'Warning' + ); + continue; + } + + // do a quick check to insure we have an id + $id = false; + if ($i === 2) + { + $id = $this->getSystemID( + $lineContent, + array(1 => $start, 2 => $startHTML), + $commentType + ); + } + + if ($i === 2 && $id > 0) + { + // make sure we update it only once even if found again. + if (isset($this->done[$id])) + { + // reset found comment type + $commentType = 0; + continue; + } + // store the id to avoid duplication + $this->done[$id] = (int) $id; + } + + // start replace + $startReplace = $this->setStartReplace( + $id, $commentType, $startReplace + ); + + // set active reader (to lock out other search) + $reader = $i; + + // set pointer + $pointer[$targetKey] = $this->counter[$i]; + + // activate the reader + $reading[$targetKey] = true; + + // start code bucket + $codeBucket[$pointer[$targetKey]] = []; + + // trim the placeholder and if there is still data then load it + if ($_line = $this->addLineChecker( + $startReplace, 1, $lineContent + )) + { + $codeBucket[$pointer[$targetKey]][] = $_line; + } + + // get the finger print around the custom code + $inFinger = count($fingerPrint); + $getFinger = $inFinger - 1; + $hasharray = array_slice( + $fingerPrint, -$inFinger, $getFinger, true + ); + $hasleng = count($hasharray); + $hashtarget = $hasleng . '__' . md5( + implode('', $hasharray) + ); + + // for good practice + Path::fix($path); + + // all new records we can do a bulk insert + if ($i === 1 || !$id) + { + // start the bucket for this code + $this->new[$pointer[$targetKey]] = []; + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + $path + ); // 'path' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + (int) $_type + ); // 'type' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + 1 + ); // 'target' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + $commentType + ); // 'comment_type' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + (int) $this->config->component_id + ); // 'component' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + 1 + ); // 'published' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + $this->today + ); // 'created' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + (int) $this->user->id + ); // 'created_by' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + 1 + ); // 'version' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + 1 + ); // 'access' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + $hashtarget + ); // 'hashtarget' + + $this->new[$pointer[$targetKey]][] + = $this->db->quote( + (int) $lineNumber + ); // 'fromline' + + } + // the record already exist so we must update instead + elseif ($i === 2 && $id > 0) + { + // start the bucket for this code + $this->existing[$pointer[$targetKey]] = []; + $this->existing[$pointer[$targetKey]]['id'] + = (int) $id; + $this->existing[$pointer[$targetKey]]['conditions'] = []; + $this->existing[$pointer[$targetKey]]['conditions'][] + = $this->db->quoteName('id') . ' = ' + . $this->db->quote($id); + $this->existing[$pointer[$targetKey]]['fields'] = []; + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('path') . ' = ' + . $this->db->quote($path); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('type') . ' = ' + . $this->db->quote($_type); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('comment_type') . ' = ' + . $this->db->quote($commentType); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('component') . ' = ' + . $this->db->quote($this->config->component_id); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('from_line') . ' = ' + . $this->db->quote($lineNumber); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('modified') . ' = ' + . $this->db->quote($this->today); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('modified_by') . ' = ' + . $this->db->quote($this->user->id); + $this->existing[$pointer[$targetKey]]['fields'][] + = $this->db->quoteName('hashtarget') . ' = ' + . $this->db->quote($hashtarget); + } + else // this should actualy never happen + { + // de activate the reader + $reading[$targetKey] = false; + $reader = 0; + } + + // reset found comment type + $commentType = 0; + // update the counter + $this->counter[$i]++; + } + } + } + + // make sure only a few lines is kept at a time + if (count((array) $fingerPrint) > 10) + { + $fingerPrint = array_slice($fingerPrint, -6, 6, true); + } + } + + // if the code is at the end of the page and there were not three more lines + if (count((array) $endFingerPrint) > 0 || $loadEndFingerPrint) + { + if (count((array) $endFingerPrint) > 0) + { + $leng = count($endFingerPrint); + $hashendtarget = $leng . '__' . md5( + implode('', $endFingerPrint) + ); + } + else + { + $hashendtarget = 0; + } + + // all new records we can do a buldk insert + if ($backupI === 1) + { + // load the last value + $this->new[$pointer[$backupTargetKey]][] + = $this->db->quote($hashendtarget); // 'hashendtarget' + } + // the record already exist so we must use module to update + elseif ($backupI === 2) + { + $this->existing[$pointer[$backupTargetKey]]['fields'][] + = $this->db->quoteName('hashendtarget') . ' = ' + . $this->db->quote($hashendtarget); + } + } + } + + /** + * Insert the code + * + * @param int $when To set when to update + * + * @return void + * @since 3.2.0 + */ + protected function insert(int $when = 1) + { + if (ArrayHelper::check($this->new) >= $when) + { + // Create a new query object. + $query = $this->db->getQuery(true); + $continue = false; + // Insert columns. + $columns = array('path', 'type', 'target', 'comment_type', + 'component', 'published', 'created', 'created_by', + 'version', 'access', 'hashtarget', 'from_line', + 'to_line', 'code', 'hashendtarget'); + // Prepare the insert query. + $query->insert( + $this->db->quoteName('#__componentbuilder_custom_code') + ); + $query->columns($this->db->quoteName($columns)); + foreach ($this->new as $values) + { + if (count((array) $values) == 15) + { + $query->values(implode(',', $values)); + $continue = true; + } + else + { + // TODO line mismatch... should not happen + } + } + // clear the values array + $this->new = []; + if (!$continue) + { + return; // insure we don't continue if no values were loaded + } + // Set the query using our newly populated query object and execute it. + $this->db->setQuery($query); + $this->db->execute(); + } + } + + /** + * Update the code + * + * @param int $when To set when to update + * + * @return void + * @since 3.2.0 + */ + protected function update(int $when = 1) + { + if (ArrayHelper::check($this->existing) >= $when) + { + foreach ($this->existing as $code) + { + // Create a new query object. + $query = $this->db->getQuery(true); + // Prepare the update query. + $query->update( + $this->db->quoteName('#__componentbuilder_custom_code') + )->set($code['fields'])->where($code['conditions']); + // Set the query using our newly populated query object and execute it. + $this->db->setQuery($query); + $this->db->execute(); + } + // clear the values array + $this->existing = []; + } + } + + /** + * set the start replace placeholder + * + * @param int $id The comment id + * @param int $commentType The comment type + * @param string $startReplace The main replace string + * + * @return string on success + * @since 3.2.0 + */ + protected function setStartReplace(int $id, int $commentType, string $startReplace): string + { + if ($id > 0) + { + switch ($commentType) + { + case 1: // the PHP & JS type + $startReplace .= '/*' . $id . '*/'; + break; + case 2: // the HTML type + $startReplace .= ''; + break; + } + } + + return $startReplace; + } + + /** + * Check if this line should be added + * + * @param string $replaceKey The key to remove from line + * @param int $type The line type + * @param string $lineContent The line to check + * + * @return bool|int true on success + * @since 3.2.0 + */ + protected function addLineChecker(string $replaceKey, int $type, string $lineContent) + { + $check = explode($replaceKey, $lineContent); + switch ($type) + { + case 1: + // beginning of code + if (isset($check[1]) && StringHelper::check($check[1])) + { + return trim($check[1]); + } + break; + case 2: + // end of code + if (isset($check[0]) && StringHelper::check($check[0])) + { + return trim($check[0]); + } + break; + } + + return false; + } + + /** + * search for the system id in the line given + * + * @param string $lineContent The file path to search + * @param array $placeholders The values to search for + * @param int $commentType The comment type + * + * @return mixed on success + * @since 3.2.0 + */ + protected function getSystemID(string &$lineContent, array $placeholders, int $commentType) + { + $trim = '/'; + if ($commentType == 2) + { + $trim = ' @@ -228,10 +221,6 @@ public function keys(int $type, ?int $id = null) 'end' => '' ]; } - else - { - return [ 'start' => "", 'end' => ""]; - } break; case 22: // @@ -242,10 +231,6 @@ public function keys(int $type, ?int $id = null) 'end' => '' ]; } - else - { - return [ 'start' => "", 'end' => ""]; - } break; case 33: return ['start' => Placefix::h(), 'end' => Placefix::h()]; @@ -255,8 +240,9 @@ public function keys(int $type, ?int $id = null) break; } - return false; + return [ 'start' => "", 'end' => ""]; } + } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php index 3afc35771..852ec1f5c 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php @@ -26,6 +26,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Customcode; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PowerInterface; /** @@ -33,7 +34,7 @@ * * @since 3.2.0 */ -class Power +class Power implements PowerInterface { /** * All loaded powers @@ -207,7 +208,7 @@ protected function set(string $guid): bool $this->active[$guid]->key = $this->active[$guid]->id . '_' . $this->active[$guid]->target_type; // now set the name $this->active[$guid]->name = $this->placeholder->update( - $this->customcode->add($this->active[$guid]->name), + $this->customcode->update($this->active[$guid]->name), $this->placeholder->active ); // now set the code_name and class name @@ -382,7 +383,7 @@ protected function set(string $guid): bool && StringHelper::check($this->active[$guid]->implements_custom)) { $this->active[$guid]->implement_names[] = $this->placeholder->update( - $this->customcode->add($this->active[$guid]->implements_custom), + $this->customcode->update($this->active[$guid]->implements_custom), $this->placeholder->active ); // just add this once @@ -409,7 +410,7 @@ protected function set(string $guid): bool && StringHelper::check($this->active[$guid]->extends_custom)) { $this->active[$guid]->extends_name = $this->placeholder->update( - $this->customcode->add($this->active[$guid]->extends_custom), + $this->customcode->update($this->active[$guid]->extends_custom), $this->placeholder->active ); // just add once @@ -437,7 +438,7 @@ protected function set(string $guid): bool // base64 Decode code $this->active[$guid]->head = $this->gui->set( $this->placeholder->update( - $this->customcode->add( + $this->customcode->update( base64_decode( $this->active[$guid]->head ) @@ -472,7 +473,7 @@ protected function set(string $guid): bool } // now set the description $this->active[$guid]->description = (StringHelper::check($this->active[$guid]->description)) ? $this->placeholder->update( - $this->customcode->add($this->active[$guid]->description), + $this->customcode->update($this->active[$guid]->description), $this->placeholder->active ) : ''; // add the main code if set @@ -483,7 +484,7 @@ protected function set(string $guid): bool // base64 Decode code $this->active[$guid]->main_class_code = $this->gui->set( $this->placeholder->update( - $this->customcode->add( + $this->customcode->update( base64_decode( $this->active[$guid]->main_class_code ) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php index 9273ae05b..c9364af28 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php @@ -15,6 +15,7 @@ use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Customcode as CompilerCustomcode; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\CustomcodeInterface; use VDM\Joomla\Componentbuilder\Compiler\Customcode\External; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Hash; @@ -71,10 +72,10 @@ public function register(Container $container) * * @param Container $container The DI container. * - * @return CompilerCustomcode + * @return CustomcodeInterface * @since 3.2.0 */ - public function getCustomcode(Container $container): CompilerCustomcode + public function getCustomcode(Container $container): CustomcodeInterface { return new CompilerCustomcode( $container->get('Config'), From c5a85f167e3bc4e8fc1c2d6dc769cbe8770c9faa Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 10 Sep 2022 10:12:13 +0200 Subject: [PATCH 03/75] Moved many field related get methods to its own classes --- .../src/Componentbuilder/Compiler/Config.php | 33 ++ .../src/Componentbuilder/Compiler/Factory.php | 6 +- .../src/Componentbuilder/Compiler/Field.php | 142 ++++++++ .../Compiler/Field/Customcode.php | 232 ++++++++++++ .../Componentbuilder/Compiler/Field/Data.php | 329 ++++++++++++++++++ .../Compiler/Field/DatabaseName.php | 102 ++++++ .../Field/JoomlaThree/CoreValidation.php | 114 ++++++ .../Compiler/Field/JoomlaThree/index.html | 1 + .../Componentbuilder/Compiler/Field/Name.php | 234 +++++++++++++ .../Compiler/Field/TypeName.php | 127 +++++++ .../Compiler/Field/UniqueName.php | 112 ++++++ .../Compiler/Field/Validation.php | 168 +++++++++ .../Compiler/Field/index.html | 1 + .../Component/PlaceholderInterface.php | 4 +- .../Customcode/DispenserInterface.php | 4 +- .../Customcode/ExternalInterface.php | 4 +- .../Customcode/ExtractorInterface.php | 4 +- .../Interfaces/Customcode/GuiInterface.php | 4 +- .../Customcode/LockBaseInterface.php | 4 +- .../Compiler/Interfaces/EventInterface.php | 2 +- .../Interfaces/Extension/InstallInterface.php | 4 +- .../Field/CoreValidationInterface.php | 32 ++ .../Compiler/Interfaces/Field/index.html | 1 + .../Compiler/Interfaces/HistoryInterface.php | 34 ++ .../Compiler/JoomlaThree/Event.php | 6 +- .../Compiler/JoomlaThree/History.php | 232 ++++++++++++ .../Componentbuilder/Compiler/Placeholder.php | 5 +- .../Componentbuilder/Compiler/Registry.php | 48 +++ .../Service/{Config.php => Compiler.php} | 34 +- .../Compiler/Service/Event.php | 39 ++- .../Compiler/Service/Extension.php | 36 +- .../Compiler/Service/Field.php | 250 +++++++++++++ .../Compiler/Service/History.php | 88 +++++ .../Compiler/Utilities/Indent.php | 2 +- 34 files changed, 2406 insertions(+), 32 deletions(-) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Customcode.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Data.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/DatabaseName.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/CoreValidation.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Name.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/TypeName.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/UniqueName.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Validation.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/CoreValidationInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/HistoryInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php rename libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/{Config.php => Compiler.php} (57%) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index 933ff6bc4..c1c5a3f05 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -498,6 +498,39 @@ protected function getBuildtarget(): string // but this is a switch value and is changed many times return 'admin'; } + + /** + * get basic encryption switch + * + * @return bool Switch to control the encryption + * @since 3.2.0 + */ + protected function getBasicencryption(): bool + { + return false; + } + + /** + * get medium encryption switch + * + * @return bool Switch to control the encryption + * @since 3.2.0 + */ + protected function getMediumencryption(): bool + { + return false; + } + + /** + * get whmcs encryption switch + * + * @return bool Switch to control the encryption + * @since 3.2.0 + */ + protected function getWhmcsencryption(): bool + { + return false; + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php index 28da40a9e..5e48237dd 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php @@ -94,14 +94,16 @@ public static function getContainer(): Container protected static function createContainer(): Container { $container = (new Container()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Config()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Compiler()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Event()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\History()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Language()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Placeholder()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Customcode()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Power()) ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Component()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Extension()); + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Extension()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Field()); return $container; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field.php new file mode 100644 index 000000000..ef1e36683 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field.php @@ -0,0 +1,142 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Field\Data; +use VDM\Joomla\Componentbuilder\Compiler\Field\Name; +use VDM\Joomla\Componentbuilder\Compiler\Field\TypeName; +use VDM\Joomla\Componentbuilder\Compiler\Field\UniqueName; + + +/** + * Compiler Field + * + * @since 3.2.0 + */ +class Field +{ + /** + * Compiler Field Data + * + * @var Data + * @since 3.2.0 + **/ + protected Data $data; + + /** + * Compiler Field Name + * + * @var Name + * @since 3.2.0 + **/ + protected Name $name; + + /** + * Compiler Field Type Name + * + * @var TypeName + * @since 3.2.0 + **/ + protected TypeName $typeName; + + /** + * Compiler Field Unique Name + * + * @var UniqueName + * @since 3.2.0 + **/ + protected UniqueName $uniqueName; + + /** + * Constructor + * + * @param Data|null $data The compiler field data object. + * @param Name|null $name The compiler field name object. + * @param TypeName|null $typeName The compiler field type name object. + * @param UniqueName|null $uniqueName The compiler field unique name object. + * + * @since 3.2.0 + */ + public function __construct(?Data $data = null, ?Name $name = null, ?TypeName $typeName = null, ?UniqueName $uniqueName = null) + { + $this->data = $data ?: Compiler::_('Field.Data'); + $this->name = $name ?: Compiler::_('Field.Name'); + $this->typeName = $typeName ?: Compiler::_('Field.Type.Name'); + $this->uniqueName = $uniqueName ?: Compiler::_('Field.Unique.Name'); + } + + /** + * set Field details + * + * @param array $field The field array. + * @param string|null $singleViewName The single view name. + * @param string|null $listViewName The list view name. + * @param string $amicably The peaceful resolve. + * + * @return void + * @since 3.2.0 + */ + public function set(array &$field, ?string $singleViewName = null, ?string $listViewName = null, string $amicably = '') + { + // set hash + static $hash = 123467890; + + // load hash if not found + if (!isset($field['hash'])) + { + $field['hash'] = \md5($field['field'] . $hash); + // increment hash + $hash++; + } + + // set the settings + if (!isset($field['settings'])) + { + $field['settings'] = $this->data->get( + $field['field'], $singleViewName, $listViewName + ); + } + + // set real field name + if (!isset($field['base_name'])) + { + $field['base_name'] = $this->name->get($field); + } + + // set code name for field type + if (!isset($field['type_name'])) + { + $field['type_name'] = $this->typeName->get($field); + } + + // check if value is array + if (isset($field['permission']) + && !ArrayHelper::check($field['permission']) + && is_numeric($field['permission']) && $field['permission'] > 0) + { + $field['permission'] = array($field['permission']); + } + + // set unique name keeper + if ($listViewName) + { + $this->uniqueName->set( + $field['base_name'], $listViewName . $amicably + ); + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Customcode.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Customcode.php new file mode 100644 index 000000000..45961edb6 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Customcode.php @@ -0,0 +1,232 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; + + +/** + * Compiler Field Customcode + * + * @since 3.2.0 + */ +class Customcode +{ + /** + * Tracking the update of fields per/view + * + * @var array + * @since 3.2.0 + */ + protected array $views; + + /** + * Compiler Customcode Dispenser + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * Constructor + * + * @param Dispenser|null $dispenser The compiler customcode dispenser object. + * + * @since 3.2.0 + */ + public function __construct(?Dispenser $dispenser = null) + { + $this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); + } + + /** + * Update field customcode + * + * @param int $id The field id + * @param object $field The field object + * @param string|null $singleViewName The view edit or single name + * @param string|null $listViewName The view list name + * + * @return void + * @since 3.2.0 + */ + public function update(int $id, object &$field, $singleViewName = null, $listViewName = null) + { + // check if we should load scripts for single view + if ($singleViewName && StringHelper::check($singleViewName) + && !isset($this->views[$singleViewName][$id])) + { + // add_javascript_view_footer + if ($field->add_javascript_view_footer == 1 + && StringHelper::check( + $field->javascript_view_footer + )) + { + $convert__ = true; + if (isset($field->javascript_view_footer_decoded) + && $field->javascript_view_footer_decoded) + { + $convert__ = false; + } + $this->dispenser->set( + $field->javascript_view_footer, + 'view_footer', + $singleViewName, + null, + array( + 'table' => 'field', + 'id' => (int) $id, + 'field' => 'javascript_view_footer', + 'type' => 'js', + 'prefix' => PHP_EOL), + $convert__, + $convert__, + true + ); + if (!isset($field->javascript_view_footer_decoded)) + { + $field->javascript_view_footer_decoded + = true; + } + + if (strpos($field->javascript_view_footer, "token") !== false + || strpos($field->javascript_view_footer, "task=ajax") !== false) + { + if (!isset($this->dispenser->hub['token'])) + { + $this->dispenser->hub['token'] = []; + } + if (!isset($this->dispenser->hub['token'][$singleViewName]) + || !$this->dispenser->hub['token'][$singleViewName]) + { + $this->dispenser->hub['token'][$singleViewName] + = true; + } + } + } + + // add_css_view + if ($field->add_css_view == 1) + { + $convert__ = true; + if (isset($field->css_view_decoded) + && $field->css_view_decoded) + { + $convert__ = false; + } + $this->dispenser->set( + $field->css_view, + 'css_view', + $singleViewName, + null, + array('prefix' => PHP_EOL), + $convert__, + $convert__, + true + ); + if (!isset($field->css_view_decoded)) + { + $field->css_view_decoded = true; + } + } + + // add this only once to single view. + $this->views[$singleViewName][$id] = true; + } + + // check if we should load scripts for list views + if ($listViewName && StringHelper::check($listViewName) + && !isset($this->views[$listViewName][$id])) + { + // add_javascript_views_footer + if ($field->add_javascript_views_footer == 1 + && StringHelper::check( + $field->javascript_views_footer + )) + { + $convert__ = true; + if (isset($field->javascript_views_footer_decoded) + && $field->javascript_views_footer_decoded) + { + $convert__ = false; + } + $this->dispenser->set( + $field->javascript_views_footer, + 'views_footer', + $singleViewName, + null, + array( + 'table' => 'field', + 'id' => (int) $id, + 'field' => 'javascript_views_footer', + 'type' => 'js', + 'prefix' => PHP_EOL), + $convert__, + $convert__, + true + ); + if (!isset($field->javascript_views_footer_decoded)) + { + $field->javascript_views_footer_decoded = true; + } + if (strpos($field->javascript_views_footer, "token") !== false + || strpos($field->javascript_views_footer, "task=ajax") !== false) + { + if (!isset($this->dispenser->hub['token'])) + { + $this->dispenser->hub['token'] = []; + } + if (!isset($this->dispenser->hub['token'][$listViewName]) + || !$this->dispenser->hub['token'][$listViewName]) + { + $this->dispenser->hub['token'][$listViewName] + = true; + } + } + } + + // add_css_views + if ($field->add_css_views == 1) + { + $convert__ = true; + if (isset($field->css_views_decoded) + && $field->css_views_decoded) + { + $convert__ = false; + } + $this->dispenser->set( + $field->css_views, + 'css_views', + $singleViewName, + null, + array('prefix' => PHP_EOL), + $convert__, + $convert__, + true + ); + if (!isset($field->css_views_decoded)) + { + $field->css_views_decoded = true; + } + } + + // add this only once to list view. + $this->views[$listViewName][$id] = true; + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Data.php new file mode 100644 index 000000000..8b8230939 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Data.php @@ -0,0 +1,329 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use Joomla\CMS\Factory; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Field\Customcode as FieldCustomcode; +use VDM\Joomla\Componentbuilder\Compiler\Field\Validation; + + +/** + * Compiler Field Data + * + * @since 3.2.0 + */ +class Data +{ + /** + * Compiler Fields + * + * @var array + * @since 3.2.0 + */ + protected array $fields; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler History + * + * @var HistoryInterface + * @since 3.2.0 + */ + protected HistoryInterface $history; + + /** + * Compiler Placeholder + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * Compiler Customcode + * + * @var Customcode + * @since 3.2.0 + */ + protected Customcode $customcode; + + /** + * Compiler Field Customcode + * + * @var FieldCustomcode + * @since 3.2.0 + */ + protected FieldCustomcode $fieldCustomcode; + + /** + * Compiler Field Validation + * + * @var Validation + * @since 3.2.0 + */ + protected Validation $validation; + + /** + * Database object to query local DB + * + * @var \JDatabaseDriver + * @since 3.2.0 + **/ + protected \JDatabaseDriver $db; + + /** + * Constructor + * + * @param Config|null $config The compiler config object. + * @param EventInterface|null $event The compiler event api object. + * @param HistoryInterface|null $history The compiler history object. + * @param Placeholder|null $placeholder The compiler placeholder object. + * @param Customcode|null $customcode The compiler customcode object. + * @param FieldCustomcode|null $fieldCustomcode The field customcode object. + * @param Validation|null $validation The field validation rule object. + * @param \JDatabaseDriver|null $db The database object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?EventInterface $event = null, ?HistoryInterface $history = null, + ?Placeholder $placeholder = null, ?Customcode $customcode = null, ?FieldCustomcode $fieldCustomcode = null, + ?Validation $validation = null, ?\JDatabaseDriver $db = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->event = $event ?: Compiler::_('Event'); + $this->history = $history ?: Compiler::_('History'); + $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); + $this->customcode = $customcode ?: Compiler::_('Customcode'); + $this->fieldCustomcode = $fieldCustomcode ?: Compiler::_('Field.Customcode'); + $this->validation = $validation ?: Compiler::_('Field.Validation'); + $this->db = $db ?: Factory::getDbo(); + } + + /** + * Get all Field Data + * + * @param int $id The field ID + * @param string|null $singleViewName The view edit or single name + * @param string|null $listViewName The view list name + * + * @return object|null The field data + * @since 3.2.0 + */ + public function get(int $id, ?string $singleViewName = null, ?string $listViewName = null): ?object + { + if ($id > 0 && !isset($this->fields[$id])) + { + // Create a new query object. + $query = $this->db->getQuery(true); + + // Select all the values in the field + $query->select('a.*'); + $query->select( + $this->db->quoteName( + array('c.name', 'c.properties'), + array('type_name', 'properties') + ) + ); + $query->from('#__componentbuilder_field AS a'); + $query->join( + 'LEFT', + $this->db->quoteName('#__componentbuilder_fieldtype', 'c') + . ' ON (' . $this->db->quoteName('a.fieldtype') . ' = ' + . $this->db->quoteName('c.id') . ')' + ); + $query->where( + $this->db->quoteName('a.id') . ' = ' . $this->db->quote($id) + ); + + // TODO we need to update the event signatures + $context = $this->config->component_context; + + // Trigger Event: jcb_ce_onBeforeQueryFieldData + $this->event->trigger( + 'jcb_ce_onBeforeQueryFieldData', + array(&$context, &$id, &$query, &$this->db) + ); + + // Reset the query using our newly populated query object. + $this->db->setQuery($query); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // Load the results as a list of stdClass objects (see later for more options on retrieving data). + $field = $this->db->loadObject(); + + // Trigger Event: jcb_ce_onBeforeModelFieldData + $this->event->trigger( + 'jcb_ce_onBeforeModelFieldData', + array(&$context, &$field) + ); + + // adding a fix for the changed name of type to fieldtype + $field->type = $field->fieldtype; + + // load the values form params + $field->xml = $this->customcode->update(json_decode($field->xml)); + + // check if we have validate (validation rule and set it if found) + $this->validation->set($id, $field->xml); + + // load the type values form type params + $field->properties = (isset($field->properties) + && JsonHelper::check($field->properties)) + ? json_decode($field->properties, true) : null; + if (ArrayHelper::check($field->properties)) + { + $field->properties = array_values($field->properties); + } + + // check if we have WHMCS encryption + if (4 == $field->store + && !$this->config->whmcs_encryption) + { + $this->config->whmcs_encryption = true; + } + // check if we have basic encryption + elseif (3 == $field->store + && !$this->config->basic_encryption) + { + $this->config->basic_encryption = true; + } + // check if we have better encryption + elseif (5 == $field->store + && $this->config->medium_encryption) + { + $this->config->medium_encryption = true; + } + // check if we have better encryption + elseif (6 == $field->store + && StringHelper::check( + $field->on_get_model_field + ) + && StringHelper::check( + $field->on_save_model_field + )) + { + // add only if string lenght found + if (StringHelper::check( + $field->initiator_on_save_model + )) + { + $field->initiator_save_key = md5( + $field->initiator_on_save_model + ); + $field->initiator_save = explode( + PHP_EOL, $this->placeholder->update( + $this->customcode->update( + base64_decode( + $field->initiator_on_save_model + ) + ), $this->placeholder->active + ) + ); + } + if (StringHelper::check( + $field->initiator_on_save_model + )) + { + $field->initiator_get_key = md5( + $field->initiator_on_get_model + ); + $field->initiator_get = explode( + PHP_EOL, $this->placeholder->update( + $this->customcode->update( + base64_decode( + $field->initiator_on_get_model + ) + ), $this->placeholder->active + ) + ); + } + // set the field modeling + $field->model_field['save'] = explode( + PHP_EOL, $this->placeholder->update( + $this->customcode->update( + base64_decode($field->on_save_model_field) + ), $this->placeholder->active + ) + ); + $field->model_field['get'] = explode( + PHP_EOL, $this->placeholder->update( + $this->customcode->update( + base64_decode($field->on_get_model_field) + ), $this->placeholder->active + ) + ); + // remove the original values + unset( + $field->on_save_model_field, + $field->on_get_model_field, + $field->initiator_on_save_model, + $field->initiator_on_get_model + ); + } + + // get the last used version + $field->history = $this->history->get('field', $id); + + // Trigger Event: jcb_ce_onAfterModelFieldData + $this->event->trigger( + 'jcb_ce_onAfterModelFieldData', + array(&$context, &$field) + ); + + $this->fields[$id] = $field; + } + else + { + return null; + } + } + + if ($id > 0 && isset($this->fields[$id])) + { + // update the customcode of the field + $this->fieldCustomcode->update($id, $this->fields[$id], $singleViewName, $listViewName); + + // return the field + return $this->fields[$id]; + } + + return null; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/DatabaseName.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/DatabaseName.php new file mode 100644 index 000000000..045147446 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/DatabaseName.php @@ -0,0 +1,102 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Registry; + + +/** + * Compiler Field Database Name + * + * @since 3.2.0 + */ +class DatabaseName +{ + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Constructor + * + * @param Registry|null $config The compiler registry object. + * + * @since 3.2.0 + */ + public function __construct(?Registry $registry = null) + { + $this->registry = $registry ?: Compiler::_('Registry'); + } + + /** + * get the field database name and AS prefix + * + * @param string $nameListCode The list view name + * @param int $fieldId The field ID + * @param string $targetArea The area being targeted + * + * @return string|null + * @since 3.2.0 + */ + public function get(string $nameListCode, int $fieldId, string $targetArea = 'builder.list'): ?string + { + if (($fields = $this->registry->get("${targetArea}.${nameListCode}")) !== null) + { + if ($fieldId < 0) + { + switch ($fieldId) + { + case -1: + return 'a.id'; + case -2: + return 'a.ordering'; + case -3: + return 'a.published'; + } + } + foreach ($fields as $field) + { + if ($field['id'] == $fieldId) + { + // now check if this is a category + if ($field['type'] === 'category') + { + return 'c.title'; + } + // set the custom code + elseif (ArrayHelper::check( + $field['custom'] + )) + { + return $field['custom']['db'] . "." + . $field['custom']['text']; + } + else + { + return 'a.' . $field['code']; + } + } + } + } + + return null; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/CoreValidation.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/CoreValidation.php new file mode 100644 index 000000000..60a9658c0 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/CoreValidation.php @@ -0,0 +1,114 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree; + + +use Joomla\CMS\Filesystem\Folder; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreValidationInterface; + + +/** + * Core Joomla Field Validation Rules + * + * @since 3.2.0 + */ +class CoreValidation implements CoreValidationInterface +{ + /** + * Local Core Joomla Rules + * + * @var array|null + * @since 3.2.0 + **/ + protected ?array $rules = null; + + /** + * Local Core Joomla Rules Path + * + * @var string + * @since 3.2.0 + **/ + protected string $path; + + /** + * Constructor + * + * @since 3.2.0 + */ + public function __construct() + { + // set the path to the form validation rules + $this->path = JPATH_LIBRARIES . '/src/Form/Rule'; + } + + /** + * Get the Array of Existing Validation Rule Names + * + * @param bool $lowercase Switch to set rules lowercase + * + * @return array + * @since 3.2.0 + */ + public function get(bool $lowercase = false): array + { + if (!$this->rules) + { + // check if the path exist + if (!Folder::exists($this->path)) + { + return []; + } + + // we must first store the current working directory + $joomla = getcwd(); + + // go to that folder + chdir($this->path); + + // load all the files in this path + $rules = Folder::files('.', '\.php', true, true); + + // change back to Joomla working directory + chdir($joomla); + + // make sure we have an array + if (!ArrayHelper::check($rules)) + { + return false; + } + + // remove the Rule.php from the name + $this->rules = array_map( function ($name) { + return str_replace(array('./','Rule.php'), '', $name); + }, $rules); + } + + // return rules if found + if (is_array($this->rules)) + { + // check if the names should be all lowercase + if ($lowercase) + { + return array_map( function($item) { + return strtolower($item); + }, $this->rules); + } + return $this->rules; + } + + // return empty array + return []; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Name.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Name.php new file mode 100644 index 000000000..6eba81148 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Name.php @@ -0,0 +1,234 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\String\TypeHelper; +use VDM\Joomla\Utilities\String\FieldHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Field\UniqueName; +use VDM\Joomla\Componentbuilder\Compiler\Registry; + + +/** + * Compiler Field Name + * + * @since 3.2.0 + */ +class Name +{ + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Unique Field Names + * + * @var array + * @since 3.2.0 + */ + protected array $unique; + + /** + * Compiler Placeholder + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * Compiler Field Unique Name + * + * @var UniqueName + * @since 3.2.0 + */ + protected UniqueName $uniqueName; + + /** + * Constructor + * + * @param Placeholder|null $placeholder The compiler component placeholder object. + * @param UniqueName|null $uniqueName The compiler field unique name object. + * @param Registry|null $registry The compiler registry object. + * + * @since 3.2.0 + */ + public function __construct(?Placeholder $placeholder = null, ?UniqueName $uniqueName = null, ?Registry $registry = null) + { + $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); + $this->uniqueName = $uniqueName ?: Compiler::_('Field.Unique.Name'); + $this->registry = $registry ?: Compiler::_('Registry'); + } + + /** + * Get the field's actual name + * + * @param array $field The field array + * @param string|null $listViewName The list view name + * @param string $amicably The peaceful resolve (for fields in subforms in same view :) + * + * @return string Success returns field name + * @since 3.2.0 + */ + public function get(array &$field, ?string $listViewName = null, string $amicably = ''): string + { + // return the unique name if already set + if ($listViewName && StringHelper::check($listViewName) + && isset($field['hash']) + && isset( + $this->unique[$listViewName . $amicably . $field['hash']] + )) + { + return $this->unique[$listViewName . $amicably . $field['hash']]; + } + + // always make sure we have a field name and type + if (!isset($field['settings']) || !isset($field['settings']->type_name) + || !isset($field['settings']->name)) + { + return 'error'; + } + + // set the type name + $type_name = TypeHelper::safe( + $field['settings']->type_name + ); + + // set the name of the field + $name = FieldHelper::safe($field['settings']->name); + + // check that we have the properties + if (ArrayHelper::check($field['settings']->properties)) + { + foreach ($field['settings']->properties as $property) + { + if ($property['name'] === 'name') + { + // if category then name must be catid (only one per view) + if ($type_name === 'category') + { + // quick check if this is a category linked to view page + $requeSt_id = GetHelper::between( + $field['settings']->xml, 'name="', '"' + ); + if (strpos($requeSt_id, '_request_id') !== false + || strpos($requeSt_id, '_request_catid') !== false) + { + // keep it then, don't change + $name = $this->placeholder->update( + $requeSt_id, $this->placeholder->active + ); + } + else + { + $name = 'catid'; + } + + // if list view name is set + if (StringHelper::check($listViewName)) + { + // check if we should use another Text Name as this views name + $otherName = $this->placeholder->update( + GetHelper::between( + $field['settings']->xml, 'othername="', '"' + ), $this->placeholder->active + ); + $otherViews = $this->placeholder->update( + GetHelper::between( + $field['settings']->xml, 'views="', '"' + ), $this->placeholder->active + ); + $otherView = $this->placeholder->update( + GetHelper::between( + $field['settings']->xml, 'view="', '"' + ), $this->placeholder->active + ); + // This is to link other view category + if (StringHelper::check($otherName) + && StringHelper::check( + $otherViews + ) && StringHelper::check( + $otherView + )) + { + // set other category details + $this->registry->set("category.other.name.${listViewName}", [ + 'name' => FieldHelper::safe( + $otherName + ), + 'views' => StringHelper::safe( + $otherViews + ), + 'view' => StringHelper::safe( + $otherView + ) + ]); + } + } + } + // if tag is set then enable all tag options for this view (only one per view) + elseif ($type_name === 'tag') + { + $name = 'tags'; + } + // if the field is set as alias it must be called alias + elseif (isset($field['alias']) && $field['alias']) + { + $name = 'alias'; + } + else + { + // get value from xml + $xml = FieldHelper::safe( + $this->placeholder->update( + GetHelper::between( + $field['settings']->xml, 'name="', '"' + ), $this->placeholder->active + ) + ); + // check if a value was found + if (StringHelper::check($xml)) + { + $name = $xml; + } + } + // exit foreach loop + break; + } + } + } + + // return the value unique + if (StringHelper::check($listViewName) && isset($field['hash'])) + { + $this->unique[$listViewName . $amicably . $field['hash']] + = $this->uniqueName->get($name, $listViewName . $amicably); + + // now return the unique name + return $this->unique[$listViewName . $amicably . $field['hash']]; + } + + // fall back to global + return $name; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/TypeName.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/TypeName.php new file mode 100644 index 000000000..c8148acc9 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/TypeName.php @@ -0,0 +1,127 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\String\TypeHelper; + + +/** + * Compiler Field Type Name + * + * @since 3.2.0 + */ +class TypeName +{ + /** + * Get the field's actual type + * + * @param object $field The field object + * + * @return string Success returns field type + * @since 3.2.0 + */ + public function get(&$field) + { + // check if we have done this already + if (isset($field['type_name'])) + { + return $field['type_name']; + } + + // check that we have the properties + if (isset($field['settings']) + && ObjectHelper::check( + $field['settings'] + ) + && isset($field['settings']->properties) + && ArrayHelper::check( + $field['settings']->properties + )) + { + // search for own custom fields + if (strpos($field['settings']->type_name, '@') !== false) + { + // set own custom field + $field['settings']->own_custom = $field['settings']->type_name; + $field['settings']->type_name = 'Custom'; + } + + // set the type name + $type_name = TypeHelper::safe( + $field['settings']->type_name + ); + + // if custom (we must use the xml value) + if (strtolower($type_name) === 'custom' + || strtolower($type_name) === 'customuser') + { + $type = TypeHelper::safe( + GetHelper::between( + $field['settings']->xml, 'type="', '"' + ) + ); + } + else + { + // loop over properties looking for the type value + foreach ($field['settings']->properties as $property) + { + if ($property['name'] + === 'type') // type field is never adjustable (unless custom) + { + // force the default value + if (isset($property['example']) + && StringHelper::check( + $property['example'] + )) + { + $type = TypeHelper::safe( + $property['example'] + ); + } + // fall back on the xml settings (not ideal) + else + { + $type = TypeHelper::safe( + GetHelper::between( + $field['settings']->xml, 'type="', '"' + ) + ); + } + // exit foreach loop + break; + } + } + } + // check if the value is set + if (isset($type) && StringHelper::check($type)) + { + return $type; + } + // fallback on type name set in name field (not ideal) + else + { + return $type_name; + } + } + + // fall back to text + return 'text'; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/UniqueName.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/UniqueName.php new file mode 100644 index 000000000..62db3c49a --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/UniqueName.php @@ -0,0 +1,112 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\String\FieldHelper; +use VDM\Joomla\Componentbuilder\Compiler\Registry; + + +/** + * Compiler Field Unique Name + * + * @since 3.2.0 + */ +class UniqueName +{ + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Constructor + * + * @param Registry|null $registry The compiler registry object. + * + * @since 3.2.0 + */ + public function __construct(?Registry $registry = null) + { + $this->registry = $registry ?: Compiler::_('Registry'); + } + + /** + * Count how many times the same field is used per view + * + * @param string $name The name of the field + * @param string $view The name of the view + * + * @return void + * @since 3.2.0 + */ + public function set(string $name, string $view) + { + if (($number = $this->registry->get("unique.names.${view}.counter.${name}")) === null) + { + $this->registry->set("unique.names.${view}.counter.${name}", 1); + + return; + } + + // count how many times the field is used + $this->registry->set("unique.names.${view}.counter.${name}", ++$number); + + return; + } + + /** + * Naming each field with an unique name + * + * @param string $name The name of the field + * @param string $view The name of the view + * + * @return string the name + * @since 3.2.0 + */ + public function get(string $name, string $view): string + { + // only increment if the field name is used multiple times + if ($this->registry->get("unique.names.${view}.counter.${name}") > 1) + { + $counter = 1; + // set the unique name + $unique_name = FieldHelper::safe( + $name . '_' . $counter + ); + + while ($this->registry->get("unique.names.${view}.names.${unique_name}") !== null) + { + // increment the number + $counter++; + // try again + $unique_name = FieldHelper::safe( + $name . '_' . $counter + ); + } + + // set the new name number + $this->registry->set("unique.names.${view}.names.${unique_name}", $counter); + + // return the unique name + return $unique_name; + } + + return $name; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Validation.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Validation.php new file mode 100644 index 000000000..f22a3c838 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/Validation.php @@ -0,0 +1,168 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreValidationInterface; + + +/** + * Compiler Field Validation Rules + * + * @since 3.2.0 + */ +class Validation +{ + /** + * Compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Gui + * + * @var Gui + * @since 3.2.0 + */ + protected Gui $gui; + + /** + * Compiler Placeholder + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * Compiler Customcode + * + * @var Customcode + * @since 3.2.0 + */ + protected Customcode $customcode; + + /** + * Compiler Field Core Validation + * + * @var CoreValidationInterface + * @since 3.2.0 + */ + protected CoreValidationInterface $validation; + + /** + * Constructor + * + * @param Registry|null $registry The compiler registry object. + * @param Gui|null $gui The compiler customcode gui object. + * @param Placeholder|null $placeholder The compiler placeholder object. + * @param Customcode|null $customcode The compiler customcode object. + * @param CoreValidationInterface|null $validation The core validation rule object. + * + * @since 3.2.0 + */ + public function __construct(?Registry $registry = null, ?Gui $gui = null, ?Placeholder $placeholder = null, + ?Customcode $customcode = null, ?CoreValidationInterface $validation = null) + { + $this->registry = $registry ?: Compiler::_('Registry'); + $this->gui = $gui ?: Compiler::_('Customcode.Gui'); + $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); + $this->customcode = $customcode ?: Compiler::_('Customcode'); + $this->validation = $validation ?: Compiler::_('Field.Core.Validation'); + } + + /** + * Set the validation rule + * + * @param int $id The field id + * @param string $field The field string + * + * @return void + * @since 3.2.0 + */ + public function set(int $id, string $field) + { + // check if we have validate (validation rule set) + $validation_rule = GetHelper::between( + $field, 'validate="', '"' + ); + + if (StringHelper::check($validation_rule)) + { + // make sure it is lowercase + $validation_rule = StringHelper::safe( + $validation_rule + ); + + // link this field to this validation (don't move this down) + $this->registry->set("validation.linked.${id}", $validation_rule); + + // make sure it is not already set + if ($this->registry->get("validation.rules.${validation_rule}") === null) + { + // get joomla core validation names and make sure this rule is not a core validation rule + if (!in_array($validation_rule, (array) $this->validation->get(true))) + { + // get the class methods for this rule if it exists + if (($php_code = GetHelper::var( + 'validation_rule', $validation_rule, 'name', 'php' + )) !== false) + { + // open and set the validation rule + $this->registry->set("validation.rules.${validation_rule}", + $this->gui->set( + $this->placeholder->update( + $this->customcode->update( + base64_decode( + $php_code + ) + ), $this->placeholder->active + ), + array( + 'table' => 'validation_rule', + 'field' => 'php', + 'id' => GetHelper::var( + 'validation_rule', + $validation_rule, 'name', 'id' + ), + 'type' => 'php' + ) + ) + ); + } + else + { + // TODO set the notice that this validation rule is custom and was not found + $this->registry->remove("validation.linked.${id}"); + } + } + else + { + // remove link (we only want custom validations linked) + $this->registry->remove("validation.linked.${id}"); + } + } + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Field/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php index ccb1c3d8d..c90737faa 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php @@ -13,7 +13,9 @@ /** - * Component Placeholder Interface + * Component Placeholder Interface + * + * @since 3.2.0 */ interface PlaceholderInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php index 1b272ec19..38c3d2eea 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php @@ -13,7 +13,9 @@ /** - * Customcode Dispenser Interface + * Customcode Dispenser Interface + * + * @since 3.2.0 */ interface DispenserInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExternalInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExternalInterface.php index 8b2d0297f..d293921a2 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExternalInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExternalInterface.php @@ -13,7 +13,9 @@ /** - * Customcode External Interface + * Customcode External Interface + * + * @since 3.2.0 */ interface ExternalInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExtractorInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExtractorInterface.php index 4cfde81c0..f02f7ba8e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExtractorInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/ExtractorInterface.php @@ -13,7 +13,9 @@ /** - * Customcode Extractor Interface + * Customcode Extractor Interface + * + * @since 3.2.0 */ interface ExtractorInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/GuiInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/GuiInterface.php index 7b4760040..c06cd055d 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/GuiInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/GuiInterface.php @@ -13,7 +13,9 @@ /** - * Customcode Gui Interface + * Customcode Gui Interface + * + * @since 3.2.0 */ interface GuiInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/LockBaseInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/LockBaseInterface.php index fc5429d27..3a82e5565 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/LockBaseInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/LockBaseInterface.php @@ -13,7 +13,9 @@ /** - * Customcode LockBase Interface + * Customcode LockBase Interface + * + * @since 3.2.0 */ interface LockBaseInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php index e9e67c911..548734d54 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php @@ -23,7 +23,7 @@ interface EventInterface * Trigger an event * * @param string $event The event to trigger - * @param mix $data The values to pass to the event/plugin + * @param mixed $data The values to pass to the event/plugin * * @return void * @since 3.2.0 diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Extension/InstallInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Extension/InstallInterface.php index b19945f23..4f4e44fcb 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Extension/InstallInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Extension/InstallInterface.php @@ -13,7 +13,9 @@ /** - * The properties an extension should have to be passed to the InstallScript class + * The properties an extension should have to be passed to the InstallScript class + * + * @since 3.2.0 */ interface InstallInterface { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/CoreValidationInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/CoreValidationInterface.php new file mode 100644 index 000000000..1b520382a --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/CoreValidationInterface.php @@ -0,0 +1,32 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field; + + +/** + * Field Joomla Core Validation Interface + * + * @since 3.2.0 + */ +interface CoreValidationInterface +{ + /** + * Get the Array of Existing Validation Rule Names + * + * @param bool $lowercase Switch to set rules lowercase + * + * @return array + * @since 3.2.0 + */ + public function get(bool $lowercase = false): array; +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Field/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/HistoryInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/HistoryInterface.php new file mode 100644 index 000000000..870e217fb --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/HistoryInterface.php @@ -0,0 +1,34 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Interfaces; + + +/** + * Compiler History Interface + * + * @since 3.2.0 + */ +interface HistoryInterface +{ + /** + * Get Item History object + * + * @param string $type The type of item + * @param int $id The item ID + * + * @return ?object The history item object + * @since 3.2.0 + */ + public function get(string $type, int $id): ?object; + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php index 8e1264f8c..ed413656a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaThree; +use Joomla\Registry\Registry; use VDM\Joomla\Utilities\Component\Helper; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; @@ -64,12 +65,13 @@ public function __construct(?Registry $params = null) * Trigger and event * * @param string $event The event to trigger - * @param mix $data The values to pass to the event/plugin + * @param mixed $data The values to pass to the event/plugin * * @return void + * @throws \Exception * @since 3.2.0 */ - public function trigger($event, $data) + public function trigger(string $event, $data) { // only execute if plugins were loaded (active) if ($this->activePlugins) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php new file mode 100644 index 000000000..e600ff60b --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php @@ -0,0 +1,232 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaThree; + + +use Joomla\CMS\Factory; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; + + +/** + * Compiler History + * + * @since 3.2.0 + */ +class History implements HistoryInterface +{ + /** + * History Item Object + * + * @var object|null + * @since 3.2.0 + */ + protected ?object $tmp; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Database object to query local DB + * + * @var \JDatabaseDriver + * @since 3.2.0 + */ + protected \JDatabaseDriver $db; + + /** + * Constructor + * + * @param Config|null $config The compiler config object. + * @param \JDatabaseDriver|null $db The Database Driver object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?\JDatabaseDriver $db = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->db = $db ?: Factory::getDbo(); + } + + /** + * Get Item History object + * + * @param string $type The type of item + * @param int $id The item ID + * + * @return ?object The history + * @since 3.2.0 + */ + public function get(string $type, int $id): ?object + { + // quick class object to store old history object + $this->tmp = null; + // Create a new query object. + $query = $this->db->getQuery(true); + + $query->select('h.*'); + $query->from('#__ucm_history AS h'); + $query->where( + $this->db->quoteName('h.ucm_item_id') . ' = ' . (int) $id + ); + // Join over the content type for the type id + $query->join( + 'LEFT', '#__content_types AS ct ON ct.type_id = h.ucm_type_id' + ); + $query->where( + 'ct.type_alias = ' . $this->db->quote( + 'com_componentbuilder.' . $type + ) + ); + $query->order('h.save_date DESC'); + $this->db->setQuery($query, 0, 1); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // new version of this item found + // so we need to mark it as the last compiled version + $newActive = $this->db->loadObject(); + // set the new version watch + $this->set($newActive, 1); + } + // Get last compiled verion + $query = $this->db->getQuery(true); + + $query->select('h.*'); + $query->from('#__ucm_history AS h'); + $query->where( + $this->db->quoteName('h.ucm_item_id') . ' = ' . (int) $id + ); + $query->where('h.keep_forever = 1'); + $query->where('h.version_note LIKE ' . $this->db->quote('%component%')); + // make sure it does not return the active version + if (isset($newActive) && isset($newActive->version_id)) + { + $query->where('h.version_id != ' . (int) $newActive->version_id); + } + // Join over the content type for the type id + $query->join( + 'LEFT', '#__content_types AS ct ON ct.type_id = h.ucm_type_id' + ); + $query->where( + 'ct.type_alias = ' . $this->db->quote( + 'com_componentbuilder.' . $type + ) + ); + $query->order('h.save_date DESC'); + $this->db->setQuery($query); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // the old active version was found + // so we may need to do an SQL update + // and unmark the old compiled version + $oldActives = $this->db->loadObjectList(); + foreach ($oldActives as $oldActive) + { + // remove old version watch + $this->set($oldActive, 0); + } + } + + // return the last used history record or null. + return $this->tmp; + } + + /** + * Set Item History Watch + * + * @param Object $object The history object + * @param int $action The action to take + * 0 = remove watch + * 1 = add watch + * + * @return bool + * @since 3.2.0 + */ + protected function set(object $object, int $action): bool + { + // check the note + if (JsonHelper::check($object->version_note)) + { + $version_note = json_decode($object->version_note, true); + } + else + { + $version_note = array('component' => array()); + } + // set watch + switch ($action) + { + case 0: + // remove watch + if (isset($version_note['component']) + && ($key = array_search( + $this->config->component_id, $version_note['component'] + )) !== false) + { + // last version that was used to build/compile + $this->tmp = json_decode($object->version_data); + // remove it from this component + unset($version_note['component'][$key]); + } + else + { + // since it was not found, no need to update anything + return true; + } + break; + case 1: + // add watch + if (!in_array($this->config->component_id, $version_note['component'])) + { + $version_note['component'][] = $this->config->component_id; + } + else + { + // since it is there already, no need to update anything + return true; + } + break; + } + // check if we need to still keep this locked + if (isset($version_note['component']) + && ArrayHelper::check($version_note['component'])) + { + // insure component ids are only added once per item + $version_note['component'] = array_unique( + $version_note['component'] + ); + // we may change this, little risky (but since JCB does not have history notes it should be okay for now) + $object->version_note = json_encode($version_note); + $object->keep_forever = '1'; + } + else + { + $object->version_note = ''; + $object->keep_forever = '0'; + } + + // run the update + return $this->db->updateObject('#__ucm_history', $object, 'version_id'); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php index a99bef647..f7e54ca4d 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php @@ -124,7 +124,7 @@ public function update(string $data, array &$placeholder, int $action = 1): stri // make sure the placeholders is an array if (!ArrayHelper::check($placeholder)) { - // This is an error, (TODO) actualy we need to add a kind of log here to know that this happened + // This is an error, TODO actually we need to add a kind of log here to know that this happened return $data; } // continue with the work of replacement @@ -189,9 +189,6 @@ public function keys(int $type, ?int $id = null): array { switch ($type) { - case 3: - return [ 'start' => "", 'end' => ""]; - break; case 11: //***[REPLACED$$$$]***//**1**/ if ($this->config->get('add_placeholders', false) === true) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php new file mode 100644 index 000000000..5e188777d --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php @@ -0,0 +1,48 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler; + + +use Joomla\Registry\Registry as JoomlaRegistry; + + +/** + * Compiler Registry + * + * So we have full control over this class + * + * @since 3.2.0 + */ +class Registry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable +{ + /** + * Method to iterate over any part of the registry + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * + * @return \ArrayIterator This object represented as an ArrayIterator. + * + * @since 3.4.0 + */ + public function _($path) + { + $data = $this->extract($path); + + if ($data === null) + { + return null; + } + + return $data->getIterator(); + } +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php similarity index 57% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php index 08372e34a..1cd1da451 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php @@ -14,15 +14,16 @@ use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use VDM\Joomla\Componentbuilder\Compiler\Config as CompilerConfig; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; /** - * Compiler Config Service Provider + * Compiler Service Provider * * @since 3.2.0 */ -class Config implements ServiceProviderInterface +class Compiler implements ServiceProviderInterface { /** * Registers the service provider with a DI container. @@ -34,8 +35,11 @@ class Config implements ServiceProviderInterface */ public function register(Container $container) { - $container->alias(CompilerConfig::class, 'Config') + $container->alias(Config::class, 'Config') ->share('Config', [$this, 'getConfig'], true); + + $container->alias(Registry::class, 'Registry') + ->share('Registry', [$this, 'getRegistry'], true); } /** @@ -43,12 +47,26 @@ public function register(Container $container) * * @param Container $container The DI container. * - * @return CompilerConfig + * @return Config + * @since 3.2.0 + */ + public function getConfig(Container $container): Config + { + return new Config(); + } + + /** + * Get the Compiler Registry + * + * @param Container $container The DI container. + * + * @return Registry * @since 3.2.0 */ - public function getConfig(Container $container): CompilerConfig + public function getRegistry(Container $container): Registry { - return new CompilerConfig(); - } + return new Registry(); + } + } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php index 4f892f35d..71ceb4e51 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php @@ -13,7 +13,8 @@ use Joomla\DI\Container; -use Joomla\DI\ServiceProviderInterface; +use Joomla\DI\ServiceProviderInterface; +use Joomla\CMS\Version; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\Event as J3Event; @@ -25,6 +26,14 @@ */ class Event implements ServiceProviderInterface { + /** + * Current Joomla Version We are IN + * + * @var int + * @since 3.2.0 + **/ + protected $currentVersion; + /** * Registers the service provider with a DI container. * @@ -37,19 +46,41 @@ public function register(Container $container) { $container->alias(J3Event::class, 'J3.Event') ->share('J3.Event', [$this, 'getJ3Event'], true); + + $container->alias(EventInterface::class, 'Event') + ->share('Event', [$this, 'getEvent'], true); } /** - * Get the Joomla 3 Event + * Get the Event * * @param Container $container The DI container. * * @return EventInterface * @since 3.2.0 */ - public function getJ3Event(Container $container): EventInterface + public function getEvent(Container $container): EventInterface + { + if (empty($this->currentVersion)) + { + $this->currentVersion = Version::MAJOR_VERSION; + } + + return $container->get('J' . $this->currentVersion . '.Event'); + } + + /** + * Get the Joomla 3 Event + * + * @param Container $container The DI container. + * + * @return J3Event + * @since 3.2.0 + */ + public function getJ3Event(Container $container): J3Event { return new J3Event(); - } + } + } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php index 72b6c0445..79f4e7f8d 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php @@ -25,6 +25,14 @@ */ class Extension implements ServiceProviderInterface { + /** + * Current Joomla Version Being Build + * + * @var int + * @since 3.2.0 + **/ + protected $targetVersion; + /** * Registers the service provider with a DI container. * @@ -35,6 +43,9 @@ class Extension implements ServiceProviderInterface */ public function register(Container $container) { + $container->alias(GetScriptInterface::class, 'Extension.InstallScript') + ->share('Extension.InstallScript', [$this, 'getExtensionInstallScript'], true); + $container->alias(J3InstallScript::class, 'J3.Extension.InstallScript') ->share('J3.Extension.InstallScript', [$this, 'getJ3ExtensionInstallScript'], true); } @@ -44,12 +55,31 @@ public function register(Container $container) * * @param Container $container The DI container. * - * @return GetScriptInterface + * @return J3InstallScript * @since 3.2.0 */ - public function getJ3ExtensionInstallScript(Container $container): GetScriptInterface + public function getJ3ExtensionInstallScript(Container $container): J3InstallScript { return new J3InstallScript(); - } + } + + /** + * Get the Joomla Extension Install Script + * + * @param Container $container The DI container. + * + * @return GetScriptInterface + * @since 3.2.0 + */ + public function getExtensionInstallScript(Container $container): GetScriptInterface + { + if (empty($this->targetVersion)) + { + $this->targetVersion = $container->get('Config')->joomla_version; + } + + return $container->get('J' . $this->targetVersion . '.Extension.InstallScript'); + } + } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php new file mode 100644 index 000000000..0f225ad5d --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php @@ -0,0 +1,250 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Compiler\Field as CompilerField; +use VDM\Joomla\Componentbuilder\Compiler\Field\Data; +use VDM\Joomla\Componentbuilder\Compiler\Field\Name; +use VDM\Joomla\Componentbuilder\Compiler\Field\TypeName; +use VDM\Joomla\Componentbuilder\Compiler\Field\UniqueName; +use VDM\Joomla\Componentbuilder\Compiler\Field\Validation; +use VDM\Joomla\Componentbuilder\Compiler\Field\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Field\DatabaseName; +use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree\CoreValidation as J3CoreValidation; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreValidationInterface; + + +/** + * Compiler Field + * + * @since 3.2.0 + */ +class Field implements ServiceProviderInterface +{ + /** + * Current Joomla Version Being Build + * + * @var int + * @since 3.2.0 + **/ + protected $targetVersion; + + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(CompilerField::class, 'Field') + ->share('Field', [$this, 'getField'], true); + + $container->alias(Data::class, 'Field.Data') + ->share('Field.Data', [$this, 'getData'], true); + + $container->alias(Validation::class, 'Field.Validation') + ->share('Field.Validation', [$this, 'getValidation'], true); + + $container->alias(J3CoreValidation::class, 'J3.Field.Core.Validation') + ->share('J3.Field.Core.Validation', [$this, 'getJ3CoreValidation'], true); + + $container->alias(CoreValidationInterface::class, 'Field.Core.Validation') + ->share('Field.Core.Validation', [$this, 'getCoreValidation'], true); + + $container->alias(Customcode::class, 'Field.Customcode') + ->share('Field.Customcode', [$this, 'getCustomcode'], true); + + $container->alias(Name::class, 'Field.Name') + ->share('Field.Name', [$this, 'getFieldName'], true); + + $container->alias(TypeName::class, 'Field.Type.Name') + ->share('Field.Type.Name', [$this, 'getFieldTypeName'], true); + + $container->alias(UniqueName::class, 'Field.Unique.Name') + ->share('Field.Unique.Name', [$this, 'getFieldUniqueName'], true); + + $container->alias(DatabaseName::class, 'Field.Database.Name') + ->share('Field.Database.Name', [$this, 'getFieldDatabaseName'], true); + } + + /** + * Get the Compiler Field + * + * @param Container $container The DI container. + * + * @return CompilerField + * @since 3.2.0 + */ + public function getField(Container $container): CompilerField + { + return new CompilerField( + $container->get('Field.Data'), + $container->get('Field.Name'), + $container->get('Field.Type.Name'), + $container->get('Field.Unique.Name') + ); + } + + /** + * Get the Compiler Field Data + * + * @param Container $container The DI container. + * + * @return Data + * @since 3.2.0 + */ + public function getData(Container $container): Data + { + return new Data( + $container->get('Config'), + $container->get('Event'), + $container->get('History'), + $container->get('Placeholder'), + $container->get('Customcode'), + $container->get('Field.Customcode'), + $container->get('Field.Validation') + ); + } + + /** + * Get the Compiler Field Validation + * + * @param Container $container The DI container. + * + * @return Validation + * @since 3.2.0 + */ + public function getValidation(Container $container): Validation + { + return new Validation( + $container->get('Registry'), + $container->get('Customcode.Gui'), + $container->get('Placeholder'), + $container->get('Customcode'), + $container->get('Field.Core.Validation') + ); + } + + /** + * Get the Compiler Field Joomla 3 Validation + * + * @param Container $container The DI container. + * + * @return J3CoreValidation + * @since 3.2.0 + */ + public function getJ3CoreValidation(Container $container): J3CoreValidation + { + return new J3CoreValidation(); + } + + /** + * Get the Compiler Field Core Validation + * + * @param Container $container The DI container. + * + * @return CoreValidationInterface + * @since 3.2.0 + */ + public function getCoreValidation(Container $container): CoreValidationInterface + { + if (empty($this->targetVersion)) + { + $this->targetVersion = $container->get('Config')->joomla_version; + } + + return $container->get('J' . $this->targetVersion . '.Field.Core.Validation'); + } + + /** + * Get the Compiler Field Customcode + * + * @param Container $container The DI container. + * + * @return Customcode + * @since 3.2.0 + */ + public function getCustomcode(Container $container): Customcode + { + return new Customcode( + $container->get('Customcode.Dispenser') + ); + } + + /** + * Get the Compiler Field Name + * + * @param Container $container The DI container. + * + * @return Name + * @since 3.2.0 + */ + public function getFieldName(Container $container): Name + { + return new Name( + $container->get('Placeholder'), + $container->get('Field.Unique.Name'), + $container->get('Registry') + ); + } + + /** + * Get the Compiler Field Type Name + * + * @param Container $container The DI container. + * + * @return TypeName + * @since 3.2.0 + */ + public function getFieldTypeName(Container $container): TypeName + { + return new TypeName(); + } + + /** + * Get the Compiler Field Unique Name + * + * @param Container $container The DI container. + * + * @return UniqueName + * @since 3.2.0 + */ + public function getFieldUniqueName(Container $container): UniqueName + { + return new UniqueName( + $container->get('Registry') + ); + } + + /** + * Get the Compiler Field Database Name + * + * @param Container $container The DI container. + * + * @return DatabaseName + * @since 3.2.0 + */ + public function getFieldDatabaseName(Container $container): DatabaseName + { + return new DatabaseName( + $container->get('Registry') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php new file mode 100644 index 000000000..8d92f41a7 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php @@ -0,0 +1,88 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use Joomla\CMS\Version; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; +use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\History as J3History; + + +/** + * History Service Provider + * + * @since 3.2.0 + */ +class History implements ServiceProviderInterface +{ + /** + * Current Joomla Version We are IN + * + * @var int + * @since 3.2.0 + **/ + protected $currentVersion; + + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(J3History::class, 'J3.History') + ->share('J3.History', [$this, 'getJ3History'], true); + + $container->alias(HistoryInterface::class, 'History') + ->share('History', [$this, 'getHistory'], true); + } + + /** + * Get the History + * + * @param Container $container The DI container. + * + * @return HistoryInterface + * @since 3.2.0 + */ + public function getHistory(Container $container): HistoryInterface + { + if (empty($this->currentVersion)) + { + $this->currentVersion = Version::MAJOR_VERSION; + } + + return $container->get('J' . $this->currentVersion . '.History'); + } + + /** + * Get the Joomla 3 History + * + * @param Container $container The DI container. + * + * @return J3History + * @since 3.2.0 + */ + public function getJ3History(Container $container): J3History + { + return new J3History( + $container->get('Config') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php index ff3422f1b..446ab04fe 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php @@ -46,7 +46,7 @@ abstract class Indent * @return string * @since 3.2.0 */ - public function _(int $nr): string + public static function _(int $nr): string { // check if we already have the string if (!isset(self::$bucket[$nr])) From 1dddba0fc82dbae07021a85f568335fbbe2bd30b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 10 Sep 2022 10:16:44 +0200 Subject: [PATCH 04/75] Moved some arrays to the Registry, and marked and updated deprecated class methods and values in the compiler. --- README.md | 8 +- admin/README.txt | 8 +- admin/config.xml | 10 - admin/helpers/compiler.php | 50 +- admin/helpers/compiler/a_Get.php | 1088 ++--------------- admin/helpers/compiler/b_Structure.php | 22 +- admin/helpers/compiler/c_Fields.php | 94 +- admin/helpers/compiler/e_Interpretation.php | 278 ++--- admin/helpers/compiler/f_Infusion.php | 45 +- admin/helpers/extrusion/b_builder.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 5 - admin/layouts/power/code_left.php | 4 +- admin/models/power.php | 4 +- admin/sql/install.mysql.utf8.sql | 4 +- componentbuilder.xml | 2 +- 15 files changed, 338 insertions(+), 1286 deletions(-) diff --git a/README.md b/README.md index 79fdd2705..f6a473d39 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 3rd September, 2022 ++ *Last Build*: 10th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **321830** ++ *Line count*: **324186** + *Field count*: **2002** -+ *File count*: **2107** -+ *Folder count*: **363** ++ *File count*: **2125** ++ *Folder count*: **366** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 79fdd2705..f6a473d39 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 3rd September, 2022 ++ *Last Build*: 10th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **321830** ++ *Line count*: **324186** + *Field count*: **2002** -+ *File count*: **2107** -+ *Folder count*: **363** ++ *File count*: **2125** ++ *Folder count*: **366** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/config.xml b/admin/config.xml index 974a94e8f..ea930586a 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -678,16 +678,6 @@ size="60" default="" /> - -
writeFile($xmlPath, $componentXML); } // Trigger Event: jcb_ce_onBeforeUpdateFiles - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeUpdateFiles', array(&$this->componentContext, &$this) ); @@ -133,7 +133,7 @@ public function __construct($config = array()) return false; } // Trigger Event: jcb_ce_onBeforeGetCustomCode - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeGetCustomCode', array(&$this->componentContext, &$this) ); @@ -141,7 +141,7 @@ public function __construct($config = array()) if (CFactory::_('Customcode')->get()) { // Trigger Event: jcb_ce_onBeforeAddCustomCode - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeAddCustomCode', array(&$this->componentContext, &$this) ); @@ -149,7 +149,7 @@ public function __construct($config = array()) $this->addCustomCode(); } // Trigger Event: jcb_ce_onBeforeSetLangFileData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeSetLangFileData', array(&$this->componentContext, &$this) ); @@ -627,7 +627,7 @@ protected function updateFiles() protected function setFileContent(&$name, &$path, &$bom, $view = null) { // Trigger Event: jcb_ce_onBeforeSetFileContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeSetFileContent', array(&$this->componentContext, &$name, &$path, &$bom, &$view) ); @@ -642,7 +642,7 @@ protected function setFileContent(&$name, &$path, &$bom, $view = null) // get content of the file $string = ComponentbuilderHelper::getFileContents($path); // Trigger Event: jcb_ce_onGetFileContents - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onGetFileContents', array(&$this->componentContext, &$string, &$name, &$path, &$bom, &$view) @@ -670,7 +670,7 @@ protected function setFileContent(&$name, &$path, &$bom, $view = null) $answer = CFactory::_('Customcode')->update($answer); } // Trigger Event: jcb_ce_onBeforeSetFileContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeWriteFileContent', array(&$this->componentContext, &$answer, &$name, &$path, &$bom, &$view) @@ -983,7 +983,7 @@ private function setLocalRepos() . $this->componentData->sales_name . '__joomla_' . CFactory::_('Config')->get('version', 3); // Trigger Event: jcb_ce_onBeforeUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData) @@ -993,7 +993,7 @@ private function setLocalRepos() // set the new data Folder::copy($this->componentPath, $repoFullPath, '', true); // Trigger Event: jcb_ce_onAfterUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData) @@ -1014,7 +1014,7 @@ private function setLocalRepos() . $module->folder_name . '__joomla_' . CFactory::_('Config')->get('version', 3); // Trigger Event: jcb_ce_onBeforeUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeUpdateRepo', array(&$module_context, &$module->folder_path, &$repoFullPath, &$module) @@ -1028,7 +1028,7 @@ private function setLocalRepos() $module->folder_path, $repoFullPath, '', true ); // Trigger Event: jcb_ce_onAfterUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterUpdateRepo', array(&$module_context, &$module->folder_path, &$repoFullPath, &$module) @@ -1051,7 +1051,7 @@ private function setLocalRepos() . $plugin->folder_name . '__joomla_' . CFactory::_('Config')->get('version', 3); // Trigger Event: jcb_ce_onBeforeUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin) @@ -1065,7 +1065,7 @@ private function setLocalRepos() $plugin->folder_path, $repoFullPath, '', true ); // Trigger Event: jcb_ce_onAfterUpdateRepo - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin) @@ -1084,7 +1084,7 @@ private function zipComponent() $this->filepath['component'] = $this->tempPath . '/' . $this->filepath['component-folder'] . '.zip'; // Trigger Event: jcb_ce_onBeforeZipComponent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath['component'], &$this->tempPath, @@ -1099,7 +1099,7 @@ private function zipComponent() if ($this->backupPath && $this->dynamicIntegration) { // Trigger Event: jcb_ce_onBeforeBackupZip - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, @@ -1121,7 +1121,7 @@ private function zipComponent() if (isset($this->componentData->sales_server)) { // Trigger Event: jcb_ce_onBeforeMoveToServer - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, @@ -1137,7 +1137,7 @@ private function zipComponent() } } // Trigger Event: jcb_ce_onAfterZipComponent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->componentFolderName, @@ -1176,7 +1176,7 @@ private function zipModules() $this->filepath['modules'][$module->id] = $this->tempPath . '/' . $module->zip_name . '.zip'; // Trigger Event: jcb_ce_onBeforeZipModule - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeZipModule', array(&$module_context, &$module->folder_path, &$this->filepath['modules'][$module->id], @@ -1193,7 +1193,7 @@ private function zipModules() { $__module_context = 'module.' . $module_context; // Trigger Event: jcb_ce_onBeforeBackupZip - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBackupZip', array(&$__module_context, &$this->filepath['modules'][$module->id], @@ -1215,7 +1215,7 @@ private function zipModules() if (isset($module->sales_server)) { // Trigger Event: jcb_ce_onBeforeMoveToServer - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeMoveToServer', array(&$__module_context, &$this->filepath['modules'][$module->id], @@ -1232,7 +1232,7 @@ private function zipModules() } } // Trigger Event: jcb_ce_onAfterZipModule - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterZipModule', array(&$module_context, &$this->filepath['modules'][$module->id], &$this->tempPath, @@ -1270,7 +1270,7 @@ private function zipPlugins() $this->filepath['plugins'][$plugin->id] = $this->tempPath . '/' . $plugin->zip_name . '.zip'; // Trigger Event: jcb_ce_onBeforeZipPlugin - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeZipPlugin', array(&$plugin_context, &$plugin->folder_path, &$this->filepath['plugins'][$plugin->id], @@ -1287,7 +1287,7 @@ private function zipPlugins() { $__plugin_context = 'plugin.' . $plugin_context; // Trigger Event: jcb_ce_onBeforeBackupZip - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBackupZip', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], @@ -1309,7 +1309,7 @@ private function zipPlugins() if (isset($plugin->sales_server)) { // Trigger Event: jcb_ce_onBeforeMoveToServer - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeMoveToServer', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], @@ -1326,7 +1326,7 @@ private function zipPlugins() } } // Trigger Event: jcb_ce_onAfterZipPlugin - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterZipPlugin', array(&$plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index a19c91efb..6e3f2769b 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -682,6 +682,7 @@ class Get * The validation rules that should be added * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('validation.rules'); */ public $validationRules = array(); @@ -689,6 +690,7 @@ class Get * The validation linked to fields * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('validation.linked'); */ public $validationLinkedFields = array(); @@ -703,6 +705,7 @@ class Get * The field data array * * @var array + * @deprecated 3.3 */ private $_fieldData = array(); @@ -728,6 +731,7 @@ class Get * Set unique Names * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('unique.names'); */ public $uniqueNames = array(); @@ -735,6 +739,7 @@ class Get * Set unique Names * * @var array + * @deprecated */ protected $uniqueFieldNames = array(); @@ -742,6 +747,7 @@ class Get * Category other name bucket * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('category.other.name'); */ public $catOtherName = array(); @@ -749,6 +755,7 @@ class Get * The field relations values * * @var array + * @deprecate Use CFactory::_('Registry')->get('builder.field_relations'); */ public $fieldRelations = array(); @@ -772,6 +779,7 @@ class Get * The list join fields * * @var array + * @deprecate Use CFactory::_('Registry')->get('builder.list_join'); */ public $listJoinBuilder = array(); @@ -779,6 +787,7 @@ class Get * The list head over ride * * @var array + * @deprecate Use CFactory::_('Registry')->get('builder.list_head_override'); */ public $listHeadOverRide = array(); @@ -842,6 +851,7 @@ class Get * The WHMCS Encryption Switch * * @var boolean + * @deprecated 3.3 Use CFactory::_('Config')->whmcs_encryption; */ public $whmcsEncryption = false; @@ -849,6 +859,7 @@ class Get * The Basic Encryption Switch * * @var boolean + * @deprecated 3.3 Use CFactory::_('Config')->basic_encryption; */ public $basicEncryption = false; @@ -856,6 +867,7 @@ class Get * The Medium Encryption Switch * * @var boolean + * @deprecated 3.3 Use CFactory::_('Config')->medium_encryption; */ public $mediumEncryption = false; @@ -863,6 +875,7 @@ class Get * The Custom field Switch per view * * @var array + * @deprecated 3.3 */ public $customFieldScript = array(); @@ -985,7 +998,7 @@ public function __construct() // Set the params $this->params = JComponentHelper::getParams('com_componentbuilder'); // Trigger Event: jcb_ce_onBeforeGet - CFactory::_J('Event')->trigger('jcb_ce_onBeforeGet', array(&$config, &$this)); + CFactory::_('Event')->trigger('jcb_ce_onBeforeGet', array(&$config, &$this)); // set the Joomla version @deprecated $this->joomlaVersion = CFactory::_('Config')->joomla_version; // set the minfy switch of the JavaScript @deprecated @@ -1051,14 +1064,14 @@ public function __construct() CFactory::_('Customcode.Extractor')->run(); // Trigger Event: jcb_ce_onBeforeGetComponentData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeGetComponentData', array(&$this->componentContext, &$this) ); // get the component data $this->componentData = $this->getComponentData(); // Trigger Event: jcb_ce_onAfterGetComponentData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterGetComponentData', array(&$this->componentContext, &$this) ); @@ -1100,7 +1113,7 @@ public function __construct() ); // Trigger Event: jcb_ce_onBeforeGet - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterGet', array(&$this->componentContext, &$this) ); @@ -1113,12 +1126,12 @@ public function __construct() * @param int $nr The number of tag/space * * @return string - * + * @deprecated 3.3 Use Indent::_($nr); */ public function _t($nr) { // use global method for conformity - return ComponentbuilderHelper::_t($nr); + return Indent::_($nr); } /** @@ -1128,11 +1141,11 @@ public function _t($nr) * @param mix $data The values to pass to the event/plugin * * @return void - * @deprecated 3.3 Use CFactory::_J('Event')->trigger($event, $data); + * @deprecated 3.3 Use CFactory::_('Event')->trigger($event, $data); */ public function triggerEvent($event, $data) { - return CFactory::_J('Event')->trigger($event, $data); + return CFactory::_('Event')->trigger($event, $data); } /** @@ -1217,7 +1230,7 @@ public function getComponentData() ); // Trigger Event: jcb_ce_onBeforeQueryComponentData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeQueryComponentData', array(&$this->componentContext, &$this->componentID, &$query, &$this->db) @@ -1230,7 +1243,7 @@ public function getComponentData() $component = $this->db->loadObject(); // Trigger Event: jcb_ce_onBeforeModelComponentData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component) ); @@ -1622,9 +1635,9 @@ function ($field) { $field['alias'] = 0; $field['title'] = 0; // set the field details - $this->setFieldDetails($field); + CFactory::_('Field')->set($field); // set unique name counter - $this->setUniqueNameCounter($field['base_name'], 'configs'); + CFactory::_('Field.Unique.Name')->set($field['base_name'], 'configs'); // return field return $field; @@ -1635,7 +1648,7 @@ function ($field) { foreach ($component->config as $field) { // so first we lock the field name in - $this->getFieldName($field, 'configs'); + CFactory::_('Field.Name')->get($field, 'configs'); } // unset original value unset($component->addconfig); @@ -1666,10 +1679,10 @@ function ($field) { } // build update SQL - $old_admin_views = $this->getHistoryWatch( + $old_admin_views = CFactory::_('History')->get( 'component_admin_views', $component->addadmin_views_id ); - $old_component = $this->getHistoryWatch( + $old_component = CFactory::_('History')->get( 'joomla_component', CFactory::_('Config')->component_id ); if ($old_component || $old_admin_views) @@ -2079,7 +2092,7 @@ function ($array) use (&$component) { unset($component->addjoomla_plugins); // Trigger Event: jcb_ce_onAfterModelComponentData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component) ); @@ -2098,7 +2111,6 @@ function ($array) use (&$component) { * * @return void * @deprecated 3.3 Use CFactory::_('Language')->set($target, $language, $string, $addPrefix); - * */ public function setLangContent($target, $language, $string, $addPrefix = false @@ -2114,7 +2126,6 @@ public function setLangContent($target, $language, $string, * * @return string * @deprecated 3.3 - * */ public function fixLangString(&$string) { @@ -2189,7 +2200,7 @@ public function getAdminViewData($id) $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); // Trigger Event: jcb_ce_onBeforeQueryViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeQueryViewData', array(&$this->componentContext, &$id, &$query, &$this->db) ); @@ -2222,7 +2233,7 @@ public function getAdminViewData($id) $name_length = CFactory::_('Config')->component_code_name_length + strlen( $view->name_single_code ) + 5; - // when the name is larger then 49 we need to add the assets table name fix + // when the name is larger than 49 we need to add the assets' table name fix if ($name_length > 49) { $this->addAssetsTableNameFix = true; @@ -2304,7 +2315,7 @@ public function getAdminViewData($id) // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeModelViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeModelViewData', array(&$this->componentContext, &$view, &$this->placeholders) ); @@ -2495,7 +2506,7 @@ function ($field) use ( &$view, &$ignoreFields ) { // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $view->name_single_code, $view->name_list_code ); @@ -2516,7 +2527,7 @@ function ($field) use ( }, array_values($view->addfields) ); // build update SQL - if ($old_view = $this->getHistoryWatch( + if ($old_view = CFactory::_('History')->get( 'admin_fields', $view->addfields_id )) { @@ -2563,7 +2574,7 @@ function ($field) use ( foreach ($view->fields as $field) { // so first we lock the field name in - $field_name = $this->getFieldName( + $field_name = CFactory::_('Field.Name')->get( $field, $view->name_list_code ); // check if the field changed since the last compilation (default fields never change and are always added) @@ -2624,12 +2635,12 @@ function ($field) use ( $tmpfield['settings']->type_name = $field['settings']->type_name; // get the old name - $old_field_name = $this->getFieldName( + $old_field_name = CFactory::_('Field.Name')->get( $tmpfield ); // only run this if not a multi field - if (!isset($this->uniqueNames[$view->name_list_code]['names'][$field_name])) + if (CFactory::_('Registry')->get('unique.names.' . $view->name_list_code . '.names.' . $field_name) === null) { // this only works when the field is not multiple of the same field $this->setUpdateSQL( @@ -2664,7 +2675,7 @@ function ($field) use ( } unset($view->addfields); // build update SQL - if ($old_view = $this->getHistoryWatch('admin_view', $id)) + if ($old_view = CFactory::_('History')->get('admin_view', $id)) { // check if the view name changed if (StringHelper::check($old_view->name_single)) @@ -2755,10 +2766,10 @@ function ($field) use ( // set the field name $conditionValue['target_field'][$fieldKey] = array( - 'name' => $this->getFieldName( + 'name' => CFactory::_('Field.Name')->get( $fieldValues, $view->name_list_code ), - 'type' => $this->getFieldType( + 'type' => CFactory::_('Field.Type.Name')->get( $fieldValues ), 'required' => $required, @@ -2780,10 +2791,10 @@ function ($field) use ( == (int) $conditionValue['match_field']) { // set the type - $type = $this->getFieldType($fieldValue); + $type = CFactory::_('Field.Type.Name')->get($fieldValue); // set the field details $conditionValue['match_name'] - = $this->getFieldName( + = CFactory::_('Field.Name')->get( $fieldValue, $view->name_list_code ); $conditionValue['match_type'] = $type; @@ -2813,10 +2824,6 @@ function ($field) use ( } unset($view->addconditions); - // prep the buckets - $this->fieldRelations[$view->name_list_code] = array(); - $this->listJoinBuilder[$view->name_list_code] = array(); - $this->listHeadOverRide[$view->name_list_code] = array(); // set the relations $view->addrelations = (isset($view->addrelations) && JsonHelper::check($view->addrelations)) @@ -2825,7 +2832,7 @@ function ($field) use ( { foreach ($view->addrelations as $nr => $relationsValue) { - // only add if list view field is selected and joind fields are set + // only add if list view field is selected and joined fields are set if (isset($relationsValue['listfield']) && is_numeric( $relationsValue['listfield'] @@ -2845,18 +2852,11 @@ function ($field) use ( $relationsValue['set'] ); } - // check that the arrays are set - if (!isset($this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']]) - || !ArrayHelper::check( - $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']] - )) - { - $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']] - = array(); - } + // load the field relations - $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']][(int) $relationsValue['area']] - = $relationsValue; + CFactory::_('Registry')->set('builder.field_relations.' . $view->name_list_code . '.' . (int) $relationsValue['listfield'] + . '.' . (int) $relationsValue['area'], $relationsValue); + // load the list joints if (isset($relationsValue['joinfields']) && ArrayHelper::check( @@ -2865,8 +2865,7 @@ function ($field) use ( { foreach ($relationsValue['joinfields'] as $join) { - $this->listJoinBuilder[$view->name_list_code][(int) $join] - = (int) $join; + CFactory::_('Registry')->set('builder.list_join.' . $view->name_list_code . '.' . (int) $join, (int) $join); } } // set header over-ride @@ -2892,8 +2891,11 @@ function ($field) use ( 'admin', $column_name_lang, $relationsValue['column_name'] ); - $this->listHeadOverRide[$view->name_list_code][(int) $relationsValue['listfield']] - = $column_name_lang; + CFactory::_('Registry')->set('builder.list_head_override.' . + $view->name_list_code . '.' . (int) $relationsValue['listfield'], + $column_name_lang + ); + } } } @@ -3201,7 +3203,7 @@ function ($field) use ( $this->customAliasBuilder[$view->name_single_code] = (array) array_map( function ($field) use (&$view) { - return $this->getFieldName( + return CFactory::_('Field.Name')->get( $field, $view->name_list_code ); }, $alias_fields @@ -3264,7 +3266,7 @@ function ($field) use (&$view) { // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterModelViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders) ); @@ -3312,7 +3314,7 @@ public function getCustomViewData($id, $table = 'site_view') $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); // Trigger Event: jcb_ce_onBeforeQueryCustomViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeQueryCustomViewData', array(&$this->componentContext, &$id, &$table, &$query, &$this->db) ); @@ -3329,7 +3331,7 @@ public function getCustomViewData($id, $table = 'site_view') $view->Code = StringHelper::safe($view->code, 'F'); $view->CODE = StringHelper::safe($view->code, 'U'); // Trigger Event: jcb_ce_onBeforeModelCustomViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table) ); @@ -3650,7 +3652,7 @@ public function getCustomViewData($id, $table = 'site_view') } // Trigger Event: jcb_ce_onAfterModelCustomViewData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view) ); @@ -3667,432 +3669,11 @@ public function getCustomViewData($id, $table = 'site_view') * @param string $name_list The view list name * * @return oject The field data - * + * @deprecated 3.3 Use CFactory::_('Field.Data')->get($id, $name_single, $name_list); */ public function getFieldData($id, $name_single = null, $name_list = null) { - if ($id > 0 && !isset($this->_fieldData[$id])) - { - // Create a new query object. - $query = $this->db->getQuery(true); - - // Select all the values in the field - $query->select('a.*'); - $query->select( - $this->db->quoteName( - array('c.name', 'c.properties'), - array('type_name', 'properties') - ) - ); - $query->from('#__componentbuilder_field AS a'); - $query->join( - 'LEFT', - $this->db->quoteName('#__componentbuilder_fieldtype', 'c') - . ' ON (' . $this->db->quoteName('a.fieldtype') . ' = ' - . $this->db->quoteName('c.id') . ')' - ); - $query->where( - $this->db->quoteName('a.id') . ' = ' . $this->db->quote($id) - ); - - // Trigger Event: jcb_ce_onBeforeQueryFieldData - CFactory::_J('Event')->trigger( - 'jcb_ce_onBeforeQueryFieldData', - array(&$this->componentContext, &$id, &$query, &$this->db) - ); - - // Reset the query using our newly populated query object. - $this->db->setQuery($query); - $this->db->execute(); - if ($this->db->getNumRows()) - { - // Load the results as a list of stdClass objects (see later for more options on retrieving data). - $field = $this->db->loadObject(); - - // Trigger Event: jcb_ce_onBeforeModelFieldData - CFactory::_J('Event')->trigger( - 'jcb_ce_onBeforeModelFieldData', - array(&$this->componentContext, &$field) - ); - - // adding a fix for the changed name of type to fieldtype - $field->type = $field->fieldtype; - - // repeatable fields to update - $searchRepeatables = array( - // repeatablefield => checker - 'properties' => 'name' - ); - // set upater - $updater = array( - 'table' => 'fieldtype', - 'key' => 'id', - 'val' => (int) $id - ); - // update the repeatable fields - $field = ComponentbuilderHelper::convertRepeatableFields( - $field, $searchRepeatables, $updater - ); - - // load the values form params - $field->xml = CFactory::_('Customcode')->update(json_decode($field->xml)); - - // check if we have validate (validation rule set) - $validationRule = GetHelper::between( - $field->xml, 'validate="', '"' - ); - if (StringHelper::check($validationRule)) - { - // make sure it is lowercase - $validationRule = StringHelper::safe( - $validationRule - ); - // link this field to this validation - $this->validationLinkedFields[$id] = $validationRule; - // make sure it is not already set - if (!isset($this->validationRules[$validationRule])) - { - // get joomla core validation names - if ($coreValidationRules - = ComponentbuilderHelper::getExistingValidationRuleNames( - true - )) - { - // make sure this rule is not a core validation rule - if (!in_array( - $validationRule, (array) $coreValidationRules - )) - { - // get the class methods for this rule if it exists - if ($this->validationRules[$validationRule] - = GetHelper::var( - 'validation_rule', $validationRule, 'name', - 'php' - )) - { - // open and set the validation rule - $this->validationRules[$validationRule] - = CFactory::_('Customcode.Gui')->set( - CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->update( - base64_decode( - $this->validationRules[$validationRule] - ) - ), CFactory::_('Placeholder')->active - ), - array( - 'table' => 'validation_rule', - 'field' => 'php', - 'id' => GetHelper::var( - 'validation_rule', - $validationRule, 'name', 'id' - ), - 'type' => 'php') - ); - } - else - { - // set the notice that this validation rule is custom and was not found (TODO) - unset($this->validationLinkedFields[$id], $this->validationRules[$validationRule]); - } - } - else - { - // remove link (we only want custom validations linked) - unset($this->validationLinkedFields[$id]); - } - } - } - } - - // load the type values form type params - $field->properties = (isset($field->properties) - && JsonHelper::check($field->properties)) - ? json_decode($field->properties, true) : null; - if (ArrayHelper::check($field->properties)) - { - $field->properties = array_values($field->properties); - } - // check if we have WHMCS encryption - if (4 == $field->store - && (!isset($this->whmcsEncryption) - || !$this->whmcsEncryption)) - { - $this->whmcsEncryption = true; - } - // check if we have basic encryption - elseif (3 == $field->store - && (!isset($this->basicEncryption) - || !$this->basicEncryption)) - { - $this->basicEncryption = true; - } - // check if we have better encryption - elseif (5 == $field->store - && (!isset($this->mediumEncryption) - || !$this->mediumEncryption)) - { - $this->mediumEncryption = true; - } - // check if we have better encryption - elseif (6 == $field->store - && StringHelper::check( - $field->on_get_model_field - ) - && StringHelper::check( - $field->on_save_model_field - )) - { - // add only if string lenght found - if (StringHelper::check( - $field->initiator_on_save_model - )) - { - $field->initiator_save_key = md5( - $field->initiator_on_save_model - ); - $field->initiator_save = explode( - PHP_EOL, CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->update( - base64_decode( - $field->initiator_on_save_model - ) - ), CFactory::_('Placeholder')->active - ) - ); - } - if (StringHelper::check( - $field->initiator_on_save_model - )) - { - $field->initiator_get_key = md5( - $field->initiator_on_get_model - ); - $field->initiator_get = explode( - PHP_EOL, CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->update( - base64_decode( - $field->initiator_on_get_model - ) - ), CFactory::_('Placeholder')->active - ) - ); - } - // set the field modeling - $field->model_field['save'] = explode( - PHP_EOL, CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->update( - base64_decode($field->on_save_model_field) - ), CFactory::_('Placeholder')->active - ) - ); - $field->model_field['get'] = explode( - PHP_EOL, CFactory::_('Placeholder')->update( - CFactory::_('Customcode')->update( - base64_decode($field->on_get_model_field) - ), CFactory::_('Placeholder')->active - ) - ); - // remove the original values - unset($field->on_save_model_field, $field->on_get_model_field, $field->initiator_on_save_model, $field->initiator_on_get_model); - } - - // get the last used version - $field->history = $this->getHistoryWatch('field', $id); - - // Trigger Event: jcb_ce_onAfterModelFieldData - CFactory::_J('Event')->trigger( - 'jcb_ce_onAfterModelFieldData', - array(&$this->componentContext, &$field) - ); - - $this->_fieldData[$id] = $field; - } - else - { - return false; - } - } - // check if the script should be added to the view each time this field is called - if ($id > 0 && isset($this->_fieldData[$id])) - { - // check if we should load scripts for single view - if (StringHelper::check($name_single) - && !isset($this->customFieldScript[$name_single][$id])) - { - // add_javascript_view_footer - if ($this->_fieldData[$id]->add_javascript_view_footer == 1 - && StringHelper::check( - $this->_fieldData[$id]->javascript_view_footer - )) - { - $convert__ = true; - if (isset($this->_fieldData[$id]->javascript_view_footer_decoded) - && $this->_fieldData[$id]->javascript_view_footer_decoded) - { - $convert__ = false; - } - CFactory::_('Customcode.Dispenser')->set( - $this->_fieldData[$id]->javascript_view_footer, - 'view_footer', - $name_single, - null, - array( - 'table' => 'field', - 'id' => (int) $id, - 'field' => 'javascript_view_footer', - 'type' => 'js', - 'prefix' => PHP_EOL), - $convert__, - $convert__, - true - ); - if (!isset($this->_fieldData[$id]->javascript_view_footer_decoded)) - { - $this->_fieldData[$id]->javascript_view_footer_decoded - = true; - } - if (strpos( - $this->_fieldData[$id]->javascript_view_footer, - "token" - ) !== false - || strpos( - $this->_fieldData[$id]->javascript_view_footer, - "task=ajax" - ) !== false) - { - if (!isset(CFactory::_('Customcode.Dispenser')->hub['token'])) - { - CFactory::_('Customcode.Dispenser')->hub['token'] = []; - } - if (!isset(CFactory::_('Customcode.Dispenser')->hub['token'][$name_single]) - || !CFactory::_('Customcode.Dispenser')->hub['token'][$name_single]) - { - CFactory::_('Customcode.Dispenser')->hub['token'][$name_single] - = true; - } - } - } - - // add_css_view - if ($this->_fieldData[$id]->add_css_view == 1) - { - $convert__ = true; - if (isset($this->_fieldData[$id]->css_view_decoded) - && $this->_fieldData[$id]->css_view_decoded) - { - $convert__ = false; - } - CFactory::_('Customcode.Dispenser')->set( - $this->_fieldData[$id]->css_view, - 'css_view', - $name_single, - null, - array('prefix' => PHP_EOL), - $convert__, - $convert__, - true - ); - if (!isset($this->_fieldData[$id]->css_view_decoded)) - { - $this->_fieldData[$id]->css_view_decoded = true; - } - } - } - // check if we should load scripts for list views - if (StringHelper::check($name_list) - && !isset($this->customFieldScript[$name_list][$id])) - { - // add_javascript_views_footer - if ($this->_fieldData[$id]->add_javascript_views_footer == 1 - && StringHelper::check( - $this->_fieldData[$id]->javascript_views_footer - )) - { - $convert__ = true; - if (isset($this->_fieldData[$id]->javascript_views_footer_decoded) - && $this->_fieldData[$id]->javascript_views_footer_decoded) - { - $convert__ = false; - } - CFactory::_('Customcode.Dispenser')->set( - $this->_fieldData[$id]->javascript_views_footer, - 'views_footer', - $name_single, - null, - array( - 'table' => 'field', - 'id' => (int) $id, - 'field' => 'javascript_views_footer', - 'type' => 'js', - 'prefix' => PHP_EOL), - $convert__, - $convert__, - true - ); - if (!isset($this->_fieldData[$id]->javascript_views_footer_decoded)) - { - $this->_fieldData[$id]->javascript_views_footer_decoded - = true; - } - if (strpos( - $this->_fieldData[$id]->javascript_views_footer, - "token" - ) !== false - || strpos( - $this->_fieldData[$id]->javascript_views_footer, - "task=ajax" - ) !== false) - { - if (!isset(CFactory::_('Customcode.Dispenser')->hub['token'])) - { - CFactory::_('Customcode.Dispenser')->hub['token'] = []; - } - if (!isset(CFactory::_('Customcode.Dispenser')->hub['token'][$name_list]) - || !CFactory::_('Customcode.Dispenser')->hub['token'][$name_list]) - { - CFactory::_('Customcode.Dispenser')->hub['token'][$name_list] - = true; - } - } - } - // add_css_views - if ($this->_fieldData[$id]->add_css_views == 1) - { - $convert__ = true; - if (isset($this->_fieldData[$id]->css_views_decoded) - && $this->_fieldData[$id]->css_views_decoded) - { - $convert__ = false; - } - CFactory::_('Customcode.Dispenser')->set( - $this->_fieldData[$id]->css_views, - 'css_views', - $name_single, - null, - array('prefix' => PHP_EOL), - $convert__, - $convert__, - true - ); - if (!isset($this->_fieldData[$id]->css_views_decoded)) - { - $this->_fieldData[$id]->css_views_decoded = true; - } - } - } - // add this only once to single view. - $this->customFieldScript[$name_single][$id] = true; - // add this only once to list view. - $this->customFieldScript[$name_list][$id] = true; - } - if ($id > 0 && isset($this->_fieldData[$id])) - { - // return the found field data - return $this->_fieldData[$id]; - } - - return false; + return CFactory::_('Field.Data')->get($id, $name_single, $name_list); } /** @@ -4104,55 +3685,11 @@ public function getFieldData($id, $name_single = null, $name_list = null) * @param string $amicably The peaceful resolve * * @return void - * + * @deprecated 3.3 Use CFactory::_('Field')->set($field, $singleViewName, $listViewName, $amicably); */ - public function setFieldDetails(&$field, $singleViewName = null, - $listViewName = null, $amicably = '' - ) + public function setFieldDetails(&$field, $singleViewName = null, $listViewName = null, $amicably = '') { - // set hash - static $hash = 123467890; - // load hash if not found - if (!isset($field['hash'])) - { - $field['hash'] = md5($field['field'] . $hash); - // increment hash - $hash++; - } - // set the settings - if (!isset($field['settings'])) - { - $field['settings'] = $this->getFieldData( - $field['field'], $singleViewName, $listViewName - ); - } - // set real field name - if (!isset($field['base_name'])) - { - $field['base_name'] = $this->getFieldName($field); - } - // set code name for field type - if (!isset($field['type_name'])) - { - $field['type_name'] = $this->getFieldType($field); - } - // check if value is array - if (isset($field['permission']) - && !ArrayHelper::check( - $field['permission'] - ) - && is_numeric($field['permission']) - && $field['permission'] > 0) - { - $field['permission'] = array($field['permission']); - } - // set unique name keeper - if ($listViewName) - { - $this->setUniqueNameCounter( - $field['base_name'], $listViewName . $amicably - ); - } + CFactory::_('Field')->set($field, $singleViewName, $listViewName, $amicably); } /** @@ -4174,7 +3711,7 @@ public function getListViewDefaultOrdering(&$nameListCode) as $order_field ) { - if (($order_field_name = $this->getFieldDatabaseName( + if (($order_field_name = CFactory::_('Field.Database.Name')->get( $nameListCode, $order_field['field'] )) !== false) { @@ -4202,52 +3739,11 @@ public function getListViewDefaultOrdering(&$nameListCode) * @param string $targetArea The area being targeted * * @return string - * + * @deprecated 3.3 Use CFactory::_('Field.Database.Name')->get($nameListCode, $fieldId, $targetArea); */ - public function getFieldDatabaseName($nameListCode, int $fieldId, - $targetArea = 'listBuilder' - ) + public function getFieldDatabaseName($nameListCode, int $fieldId, $targetArea = 'builder.list') { - if (isset($this->{$targetArea}[$nameListCode])) - { - if ($fieldId < 0) - { - switch ($fieldId) - { - case -1: - return 'a.id'; - case -2: - return 'a.ordering'; - case -3: - return 'a.published'; - } - } - foreach ($this->{$targetArea}[$nameListCode] as $field) - { - if ($field['id'] == $fieldId) - { - // now check if this is a category - if ($field['type'] === 'category') - { - return 'c.title'; - } - // set the custom code - elseif (ArrayHelper::check( - $field['custom'] - )) - { - return $field['custom']['db'] . "." - . $field['custom']['text']; - } - else - { - return 'a.' . $field['code']; - } - } - } - } - - return false; + return CFactory::_('Field.Database.Name')->get($nameListCode, $fieldId, $targetArea); } /** @@ -4256,92 +3752,11 @@ public function getFieldDatabaseName($nameListCode, int $fieldId, * @param object $field The field object * * @return string Success returns field type - * + * @deprecated 3.3 Use CFactory::_('Field.Type.Name')->get($field); */ public function getFieldType(&$field) { - // check if we have done this already - if (isset($field['type_name'])) - { - return $field['type_name']; - } - // check that we have the poperties - if (isset($field['settings']) - && ObjectHelper::check( - $field['settings'] - ) - && isset($field['settings']->properties) - && ArrayHelper::check( - $field['settings']->properties - )) - { - // search for own custom fields - if (strpos($field['settings']->type_name, '@') !== false) - { - // set own custom field - $field['settings']->own_custom = $field['settings']->type_name; - $field['settings']->type_name = 'Custom'; - } - // set the type name - $type_name = TypeHelper::safe( - $field['settings']->type_name - ); - // if custom (we must use the xml value) - if (strtolower($type_name) === 'custom' - || strtolower($type_name) === 'customuser') - { - $type = TypeHelper::safe( - GetHelper::between( - $field['settings']->xml, 'type="', '"' - ) - ); - } - else - { - // loop over properties looking for the type value - foreach ($field['settings']->properties as $property) - { - if ($property['name'] - === 'type') // type field is never ajustable (unless custom) - { - // force the default value - if (isset($property['example']) - && StringHelper::check( - $property['example'] - )) - { - $type = TypeHelper::safe( - $property['example'] - ); - } - // fall back on the xml settings (not ideal) - else - { - $type = TypeHelper::safe( - GetHelper::between( - $field['settings']->xml, 'type="', '"' - ) - ); - } - // exit foreach loop - break; - } - } - } - // check if the value is set - if (isset($type) && StringHelper::check($type)) - { - return $type; - } - // fallback on type name set in name field (not ideal) - else - { - return $type_name; - } - } - - // fall back to text - return 'text'; + return CFactory::_('Field.Type.Name')->get($field); } /** @@ -4352,147 +3767,11 @@ public function getFieldType(&$field) * @param string $amicably The peaceful resolve (for fields in subforms in same view :) * * @return string Success returns field name - * + * @deprecated 3.3 Use CFactory::_('Field.Name')->get($field, $listViewName, $amicably); */ public function getFieldName(&$field, $listViewName = null, $amicably = '') { - // return the unique name if already set - if (StringHelper::check($listViewName) - && isset($field['hash']) - && isset( - $this->uniqueFieldNames[$listViewName . $amicably - . $field['hash']] - )) - { - return $this->uniqueFieldNames[$listViewName . $amicably - . $field['hash']]; - } - // always make sure we have a field name and type - if (!isset($field['settings']) || !isset($field['settings']->type_name) - || !isset($field['settings']->name)) - { - return 'error'; - } - // set the type name - $type_name = TypeHelper::safe( - $field['settings']->type_name - ); - // set the name of the field - $name = FieldHelper::safe($field['settings']->name); - // check that we have the properties - if (ArrayHelper::check($field['settings']->properties)) - { - foreach ($field['settings']->properties as $property) - { - if ($property['name'] === 'name') - { - // if category then name must be catid (only one per view) - if ($type_name === 'category') - { - // quick check if this is a category linked to view page - $requeSt_id = GetHelper::between( - $field['settings']->xml, 'name="', '"' - ); - if (strpos($requeSt_id, '_request_id') !== false - || strpos($requeSt_id, '_request_catid') !== false) - { - // keep it then, don't change - $name = CFactory::_('Placeholder')->update( - $requeSt_id, CFactory::_('Placeholder')->active - ); - } - else - { - $name = 'catid'; - } - // if list view name is set - if (StringHelper::check($listViewName)) - { - // check if we should use another Text Name as this views name - $otherName = CFactory::_('Placeholder')->update( - GetHelper::between( - $field['settings']->xml, 'othername="', '"' - ), CFactory::_('Placeholder')->active - ); - $otherViews = CFactory::_('Placeholder')->update( - GetHelper::between( - $field['settings']->xml, 'views="', '"' - ), CFactory::_('Placeholder')->active - ); - $otherView = CFactory::_('Placeholder')->update( - GetHelper::between( - $field['settings']->xml, 'view="', '"' - ), CFactory::_('Placeholder')->active - ); - // This is to link other view category - if (StringHelper::check($otherName) - && StringHelper::check( - $otherViews - ) - && StringHelper::check( - $otherView - )) - { - // set other category details - $this->catOtherName[$listViewName] = array( - 'name' => FieldHelper::safe( - $otherName - ), - 'views' => StringHelper::safe( - $otherViews - ), - 'view' => StringHelper::safe( - $otherView - ) - ); - } - } - } - // if tag is set then enable all tag options for this view (only one per view) - elseif ($type_name === 'tag') - { - $name = 'tags'; - } - // if the field is set as alias it must be called alias - elseif (isset($field['alias']) && $field['alias']) - { - $name = 'alias'; - } - else - { - // get value from xml - $xml = FieldHelper::safe( - CFactory::_('Placeholder')->update( - GetHelper::between( - $field['settings']->xml, 'name="', '"' - ), CFactory::_('Placeholder')->active - ) - ); - // check if a value was found - if (StringHelper::check($xml)) - { - $name = $xml; - } - } - // exit foreach loop - break; - } - } - } - // return the value unique - if (StringHelper::check($listViewName) - && isset($field['hash'])) - { - $this->uniqueFieldNames[$listViewName . $amicably . $field['hash']] - = $this->uniqueName($name, $listViewName . $amicably); - - // now return the unique name - return $this->uniqueFieldNames[$listViewName . $amicably - . $field['hash']]; - } - - // fall back to global - return $name; + return CFactory::_('Field.Name')->get($field, $listViewName, $amicably); } /** @@ -4502,26 +3781,11 @@ public function getFieldName(&$field, $listViewName = null, $amicably = '') * @param string $view The name of the view * * @return void - * + * @deprecated Use CFactory::_('Field.Unique.Name')->set($name, $view); */ protected function setUniqueNameCounter($name, $view) { - if (!isset($this->uniqueNames[$view])) - { - $this->uniqueNames[$view] = array(); - $this->uniqueNames[$view]['counter'] = array(); - $this->uniqueNames[$view]['names'] = array(); - } - if (!isset($this->uniqueNames[$view]['counter'][$name])) - { - $this->uniqueNames[$view]['counter'][$name] = 1; - - return; - } - // count how many times the field is used - $this->uniqueNames[$view]['counter'][$name]++; - - return; + CFactory::_('Field.Unique.Name')->set($name, $view); } /** @@ -4531,36 +3795,19 @@ protected function setUniqueNameCounter($name, $view) * @param string $view The name of the view * * @return string the name - * + * @deprecated */ protected function uniqueName($name, $view) { - // only increment if the field name is used multiple times - if (isset($this->uniqueNames[$view]['counter'][$name]) - && $this->uniqueNames[$view]['counter'][$name] > 1) - { - $counter = 1; - // set the unique name - $uniqueName = FieldHelper::safe( - $name . '_' . $counter - ); - while (isset($this->uniqueNames[$view]['names'][$uniqueName])) - { - // increment the number - $counter++; - // try again - $uniqueName = FieldHelper::safe( - $name . '_' . $counter - ); - } - // set the new name number - $this->uniqueNames[$view]['names'][$uniqueName] = $counter; - - // return the unique name - return $uniqueName; - } - - return $name; + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -4602,7 +3849,7 @@ public function setGetData($ids, $view_code, $context) foreach ($results as $_nr => &$result) { // Trigger Event: jcb_ce_onBeforeModelDynamicGetData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeModelDynamicGetData', array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context) ); @@ -5117,7 +4364,7 @@ function ($op) use (&$_part_of_a) { $result->plugin_events = ''; } // Trigger Event: jcb_ce_onAfterModelDynamicGetData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterModelDynamicGetData', array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context) ); @@ -5475,83 +4722,12 @@ protected function setAddSQL($type, $item, $key) * @param string $type The type of item * @param int $id The item ID * - * @return oject The history - * + * @return object The history + * @deprecated 3.3 Use CFactory::_('History')->get($type, $id); */ protected function getHistoryWatch($type, $id) { - // quick class object to store old history object - $this->tmpHistory = null; - // Create a new query object. - $query = $this->db->getQuery(true); - - $query->select('h.*'); - $query->from('#__ucm_history AS h'); - $query->where( - $this->db->quoteName('h.ucm_item_id') . ' = ' . (int) $id - ); - // Join over the content type for the type id - $query->join( - 'LEFT', '#__content_types AS ct ON ct.type_id = h.ucm_type_id' - ); - $query->where( - 'ct.type_alias = ' . $this->db->quote( - 'com_componentbuilder.' . $type - ) - ); - $query->order('h.save_date DESC'); - $this->db->setQuery($query, 0, 1); - $this->db->execute(); - if ($this->db->getNumRows()) - { - // new version of this item found - // so we need to mark it as the last compiled version - $newActive = $this->db->loadObject(); - // set the new version watch - $this->setHistoryWatch($newActive, 1); - } - // Get last compiled verion - $query = $this->db->getQuery(true); - - $query->select('h.*'); - $query->from('#__ucm_history AS h'); - $query->where( - $this->db->quoteName('h.ucm_item_id') . ' = ' . (int) $id - ); - $query->where('h.keep_forever = 1'); - $query->where('h.version_note LIKE ' . $this->db->quote('%component%')); - // make sure it does not return the active version - if (isset($newActive) && isset($newActive->version_id)) - { - $query->where('h.version_id != ' . (int) $newActive->version_id); - } - // Join over the content type for the type id - $query->join( - 'LEFT', '#__content_types AS ct ON ct.type_id = h.ucm_type_id' - ); - $query->where( - 'ct.type_alias = ' . $this->db->quote( - 'com_componentbuilder.' . $type - ) - ); - $query->order('h.save_date DESC'); - $this->db->setQuery($query); - $this->db->execute(); - if ($this->db->getNumRows()) - { - // the old active version was found - // so we may need to do an SQL update - // and unmark the old compiled version - $oldActives = $this->db->loadObjectList(); - foreach ($oldActives as $oldActive) - { - // remove old version watch - $this->setHistoryWatch($oldActive, 0); - } - } - - // return the last used history record or null. - return $this->tmpHistory; + return CFactory::_('History')->get($type, $id); } /** @@ -5564,73 +4740,19 @@ protected function getHistoryWatch($type, $id) * @param string $type The type of item * * @return bool - * + * @deprecated 3.3 */ protected function setHistoryWatch($object, $action) { - // check the note - if (JsonHelper::check($object->version_note)) - { - $version_note = json_decode($object->version_note, true); - } - else - { - $version_note = array('component' => array()); - } - // set watch - switch ($action) - { - case 0: - // remove watch - if (isset($version_note['component']) - && ($key = array_search( - CFactory::_('Config')->component_id, $version_note['component'] - )) !== false) - { - // last version that was used to build/compile - $this->tmpHistory = json_decode($object->version_data); - // remove it from this component - unset($version_note['component'][$key]); - } - else - { - // since it was not found, no need to update anything - return true; - } - break; - case 1: - // add watch - if (!in_array(CFactory::_('Config')->component_id, $version_note['component'])) - { - $version_note['component'][] = CFactory::_('Config')->component_id; - } - else - { - // since it is there already, no need to update anything - return true; - } - break; - } - // check if we need to still keep this locked - if (isset($version_note['component']) - && ArrayHelper::check($version_note['component'])) - { - // insure component ids are only added once per item - $version_note['component'] = array_unique( - $version_note['component'] - ); - // we may change this, little risky (but since JCB does not have history notes it should be okay for now) - $object->version_note = json_encode($version_note); - $object->keep_forever = '1'; - } - else - { - $object->version_note = ''; - $object->keep_forever = '0'; - } - - // run the update - return $this->db->updateObject('#__ucm_history', $object, 'version_id'); + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -6212,7 +5334,7 @@ protected function getMediaLibrary($id) function ($array) { $array['alias'] = 0; $array['title'] = 0; - $array['settings'] = $this->getFieldData( + $array['settings'] = CFactory::_('Field.Data')->get( $array['field'] ); @@ -8134,7 +7256,7 @@ function ($field) use ($key, $unique) { $field['alias'] = 0; $field['title'] = 0; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $key, $key, $unique ); // update the default if set @@ -8196,7 +7318,7 @@ function ($field) use ($key, $unique) { foreach ($form['fields'] as $field) { // so first we lock the field name in - $this->getFieldName( + CFactory::_('Field.Name')->get( $field, $module->key, $unique ); // add the fields to the global form file builder @@ -8223,7 +7345,7 @@ function ($field) use ($key, $unique) { foreach ($form['fields'] as $field) { // so first we lock the field name in - $this->getFieldName( + CFactory::_('Field.Name')->get( $field, $module->key, $unique ); // add the fields to the config builder @@ -9002,7 +8124,7 @@ function ($field) use ($key, $unique) { $field['alias'] = 0; $field['title'] = 0; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $key, $key, $unique ); // update the default if set @@ -9064,7 +8186,7 @@ function ($field) use ($key, $unique) { foreach ($form['fields'] as $field) { // so first we lock the field name in - $this->getFieldName( + CFactory::_('Field.Name')->get( $field, $plugin->key, $unique ); // add the fields to the global form file builder @@ -9091,7 +8213,7 @@ function ($field) use ($key, $unique) { foreach ($form['fields'] as $field) { // so first we lock the field name in - $this->getFieldName( + CFactory::_('Field.Name')->get( $field, $plugin->key, $unique ); // add the fields to the config builder diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 8f3da1daa..44cd7c12f 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -436,7 +436,7 @@ public function __construct() // set the Joomla Version Data $this->joomlaVersionData = $this->setJoomlaVersionData(); // Trigger Event: jcb_ce_onAfterSetJoomlaVersionData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData) ); @@ -477,7 +477,7 @@ private function buildPowers() // for plugin event TODO change event api signatures $this->powers = CFactory::_('Power')->active; // Trigger Event: jcb_ce_onBeforeSetModules - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildPowers', array(&$this->componentContext, &$this->powers) ); @@ -590,7 +590,7 @@ private function buildModules() if (ArrayHelper::check($this->joomlaModules)) { // Trigger Event: jcb_ce_onBeforeSetModules - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildModules', array(&$this->componentContext, &$this->joomlaModules) ); @@ -1171,7 +1171,7 @@ private function buildPlugins() if (ArrayHelper::check($this->joomlaPlugins)) { // Trigger Event: jcb_ce_onBeforeSetPlugins - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildPlugins', array(&$this->componentContext, &$this->joomlaPlugins) ); @@ -1587,7 +1587,7 @@ private function setLibraries() if (ArrayHelper::check($this->libraries)) { // Trigger Event: jcb_ce_onBeforeSetLibraries - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeSetLibraries', array(&$this->componentContext, &$this->libraries) ); @@ -2495,11 +2495,11 @@ public function moveFieldsRules($field, $path) } } // check if this has validation that should be moved - if (isset($this->validationLinkedFields[$field['field']])) + if (CFactory::_('Registry')->get('validation.linked.' . $field['field']) !== null) { $check = md5( $path . 'rule' - . $this->validationLinkedFields[$field['field']] + . CFactory::_('Registry')->get('validation.linked.' . $field['field']) ); // lets check if we already moved this if (!isset($this->extentionTrackingFilesMoved[$check])) @@ -2507,16 +2507,16 @@ public function moveFieldsRules($field, $path) // check files exist if (File::exists( $this->componentPath . '/admin/models/rules/' - . $this->validationLinkedFields[$field['field']] + . CFactory::_('Registry')->get('validation.linked.' . $field['field']) . '.php' )) { // copy the custom field File::copy( $this->componentPath . '/admin/models/rules/' - . $this->validationLinkedFields[$field['field']] + . CFactory::_('Registry')->get('validation.linked.' . $field['field']) . '.php', $path . '/rules/' - . $this->validationLinkedFields[$field['field']] + . CFactory::_('Registry')->get('validation.linked.' . $field['field']) . '.php' ); } @@ -2555,7 +2555,7 @@ protected function moveMultiFieldsRules($multi_field, $path) // setup the field $field = array(); $field['field'] = $id; - $this->setFieldDetails($field); + CFactory::_('Field')->set($field); // move field and rules if needed $this->moveFieldsRules($field, $path); } diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 9fe5377e4..f158238f3 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -153,6 +153,7 @@ class Fields extends Structure * list builder * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('builder.list'); */ public $listBuilder = array(); @@ -609,7 +610,7 @@ protected function stringFieldSet($view, $component, $nameSingleCode, // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildFields - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$nameSingleCode, @@ -630,7 +631,7 @@ protected function stringFieldSet($view, $component, $nameSingleCode, // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildFields - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$nameSingleCode, @@ -1028,7 +1029,7 @@ protected function simpleXMLFieldSet($view, $component, $nameSingleCode, // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildFields - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$nameSingleCode, @@ -1049,7 +1050,7 @@ protected function simpleXMLFieldSet($view, $component, $nameSingleCode, // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildFields - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$nameSingleCode, @@ -1606,8 +1607,8 @@ public function setDynamicField(&$field, &$view, &$viewType, &$langView, )) { // reset some values - $name = $this->getFieldName($field, $nameListCode); - $typeName = $this->getFieldType($field); + $name = CFactory::_('Field.Name')->get($field, $nameListCode); + $typeName = CFactory::_('Field.Type.Name')->get($field); $multiple = false; $langLabel = ''; $fieldSet = ''; @@ -2313,7 +2314,7 @@ function ($id) use ( $field = array(); $field['field'] = $id; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -2330,10 +2331,10 @@ function ($id) use ( $fieldData['settings'] )) { - $r_name = $this->getFieldName( + $r_name = CFactory::_('Field.Name')->get( $fieldData, $nameListCode, $_resolverKey ); - $r_typeName = $this->getFieldType($fieldData); + $r_typeName = CFactory::_('Field.Type.Name')->get($fieldData); $r_multiple = false; $r_langLabel = ''; // add the tabs needed @@ -2479,7 +2480,7 @@ function ($id) use ( $field = array(); $field['field'] = $id; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -2496,10 +2497,10 @@ function ($id) use ( $fieldData['settings'] )) { - $r_name = $this->getFieldName( + $r_name = CFactory::_('Field.Name')->get( $fieldData, $nameListCode, $_resolverKey ); - $r_typeName = $this->getFieldType($fieldData); + $r_typeName = CFactory::_('Field.Type.Name')->get($fieldData); $r_multiple = false; $r_langLabel = ''; // add the tabs needed @@ -3309,7 +3310,7 @@ function ($id) use ( $field = array(); $field['field'] = $id; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -3326,10 +3327,10 @@ function ($id) use ( $fieldData['settings'] )) { - $r_name = $this->getFieldName( + $r_name = CFactory::_('Field.Name')->get( $fieldData, $nameListCode, $_resolverKey ); - $r_typeName = $this->getFieldType($fieldData); + $r_typeName = CFactory::_('Field.Type.Name')->get($fieldData); $r_multiple = false; $r_langLabel = ''; // get field values @@ -3493,7 +3494,7 @@ function ($id) use ( $field = array(); $field['field'] = $id; // set the field details - $this->setFieldDetails( + CFactory::_('Field')->set( $field, $nameSingleCode, $nameListCode, $_resolverKey ); @@ -3510,10 +3511,10 @@ function ($id) use ( $fieldData['settings'] )) { - $r_name = $this->getFieldName( + $r_name = CFactory::_('Field.Name')->get( $fieldData, $nameListCode, $_resolverKey ); - $r_typeName = $this->getFieldType($fieldData); + $r_typeName = CFactory::_('Field.Type.Name')->get($fieldData); $r_multiple = false; $r_langLabel = ''; // get field values @@ -4047,8 +4048,7 @@ public function setLayoutBuilder(&$nameSingleCode, &$tabName, &$name, public function buildSiteFieldData($view, $field, $set, $type) { $decode = array('json', 'base64', 'basic_encryption', - 'whmcs_encryption', 'medium_encryption', - 'expert_mode'); + 'whmcs_encryption', 'medium_encryption', 'expert_mode'); $textareas = array('textarea', 'editor'); if (isset($this->siteFields[$view][$field]) && ArrayHelper::check( @@ -4392,11 +4392,11 @@ private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, if ($property['name'] === 'label') { if (isset($fieldAttributes['name']) - && isset($this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']])) + && CFactory::_('Registry')->get("unique.names.$nameListCode.names." . $fieldAttributes['name']) !== null) { $xmlValue .= ' (' . StringHelper::safe( - $this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']] + CFactory::_('Registry')->get("unique.names.$nameListCode.names." . $fieldAttributes['name']) ) . ')'; } } @@ -4699,7 +4699,7 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, || $field['list'] == 4)); // set list join $listJoin - = (isset($this->listJoinBuilder[$nameListCode][(int) $field['field']])); + = CFactory::_('Registry')->exists('builder.list_join.' . $nameListCode . '.' . (int) $field['field']); // add history to this view if (isset($view['history']) && $view['history']) { @@ -4720,12 +4720,9 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, // category name fix if ($typeName === 'category') { - if (isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.name')) { - $tempName = $this->catOtherName[$nameListCode]['name']; + $tempName = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.name'); } else { @@ -4786,7 +4783,13 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, // load to list builder if ($listSwitch) { - $this->listBuilder[$nameListCode][] = array( + // check if it does not exists + if (!CFactory::_('Registry')->exists('builder.list.' . $nameListCode)) + { + CFactory::_('Registry')->set('builder.list.' . $nameListCode, []); + } + // append values + CFactory::_('Registry')->append('builder.list.' . $nameListCode, [ 'id' => (int) $field['field'], 'type' => $typeName, 'code' => $name, @@ -4802,7 +4805,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, 'custom' => $custom, 'multiple' => $multiple, 'options' => $options, - 'target' => (int) $field['list']); + 'target' => (int) $field['list'] + ]); } // build custom builder list if ($listSwitch || $listJoin) @@ -4813,8 +4817,7 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, // load the list join builder if ($listJoin) { - $this->listJoinBuilder[$nameListCode][(int) $field['field']] - = array( + CFactory::_('Registry')->set('builder.list_join.' . $nameListCode . '.' . (int) $field['field'], [ 'type' => $typeName, 'code' => $name, 'lang' => $listLangName, @@ -4828,24 +4831,21 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, : false, 'custom' => $custom, 'multiple' => $multiple, - 'options' => $options); + 'options' => $options + ]); } // update the field relations - if (isset($this->fieldRelations[$nameListCode]) - && isset($this->fieldRelations[$nameListCode][(int) $field['field']]) - && ArrayHelper::check( - $this->fieldRelations[$nameListCode][(int) $field['field']] - )) + if (($field_relations = + CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode . '.' . (int) $field['field'])) !== null) { - foreach ( - $this->fieldRelations[$nameListCode][(int) $field['field']] as - $area => &$field_values - ) + $field_relations = (array) $field_relations; + foreach ($field_relations as $area => &$field_values) { $field_values['type'] = $typeName; $field_values['code'] = $name; $field_values['custom'] = $custom; } + CFactory::_('Registry')->set('builder.field_relations.' . $nameListCode . '.' . (int) $field['field'], $field_relations); } // set the hidden field of this view if ($dbSwitch && $typeName === 'hidden') @@ -4943,13 +4943,11 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, // setup category for this view if ($dbSwitch && $typeName === 'category') { - if (isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 0bcaa928e..17c492f56 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1192,7 +1192,7 @@ public function setVersionController() $modelJ = ComponentbuilderHelper::getModel('joomla_component'); $modelJ->save($newJ); // <-- to insure the history is also updated // reset the watch here - $this->getHistoryWatch('joomla_component', CFactory::_('Config')->component_id); + CFactory::_('History')->get('joomla_component', CFactory::_('Config')->component_id); // update the component update table $newU = array(); @@ -10700,7 +10700,7 @@ public function setLangAdmin() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('admin'); // Trigger Event: jcb_ce_onBeforeBuildAdminLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAdminLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -10965,7 +10965,7 @@ public function setLangAdmin() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('admin'); // Trigger Event: jcb_ce_onAfterBuildAdminLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAdminLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -10993,7 +10993,7 @@ public function setLangSite() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('site'); // Trigger Event: jcb_ce_onBeforeBuildSiteLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildSiteLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11064,7 +11064,7 @@ public function setLangSite() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('site'); // Trigger Event: jcb_ce_onAfterBuildSiteLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildSiteLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11092,7 +11092,7 @@ public function setLangSiteSys() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('sitesys'); // Trigger Event: jcb_ce_onBeforeBuildSiteSysLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildSiteSysLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11124,7 +11124,7 @@ public function setLangSiteSys() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('sitesys'); // Trigger Event: jcb_ce_onAfterBuildSiteSysLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildSiteSysLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11152,7 +11152,7 @@ public function setLangAdminSys() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('adminsys'); // Trigger Event: jcb_ce_onBeforeBuildAdminSysLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAdminSysLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11173,7 +11173,7 @@ public function setLangAdminSys() // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget('adminsys'); // Trigger Event: jcb_ce_onAfterBuildAdminSysLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAdminSysLang', array(&$this->componentContext, &$langContent, &$this->langPrefix, &$componentName) @@ -11275,10 +11275,7 @@ public function setCustomAdminViewListLink($view, $nameListCode) */ public function setListBody($nameSingleCode, $nameListCode) { - if (isset($this->listBuilder[$nameListCode]) - && ArrayHelper::check( - $this->listBuilder[$nameListCode] - )) + if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null) { // component helper name $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper'; @@ -11398,7 +11395,7 @@ public function setListBody($nameSingleCode, $nameListCode) $doNotEscape = true; } // start adding the dynamic - foreach ($this->listBuilder[$nameListCode] as $item) + foreach ($items as $item) { // check if target is admin list if (1 == $item['target'] || 3 == $item['target']) @@ -11524,20 +11521,19 @@ protected function getListItemBuilder($item, $nameSingleCode, ) { // check if we have relation fields - if (isset($this->fieldRelations[$nameListCode]) - && isset($this->fieldRelations[$nameListCode][(int) $item['id']]) - && isset($this->fieldRelations[$nameListCode][(int) $item['id']][2])) + if (($field_relations = + CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode . '.' . (int) $item['id'] . '.2')) !== null) { // set the fields array $field = array(); // use custom code $useCustomCode - = (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type']) - && $this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type'] + = (isset($field_relations['join_type']) + && $field_relations['join_type'] == 2 - && isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['set']) + && isset($field_relations['set']) && StringHelper::check( - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] + $field_relations['set'] )); // load the main list view field $field['[field=' . (int) $item['id'] . ']'] = $this->getListItem( @@ -11552,34 +11548,28 @@ protected function getListItemBuilder($item, $nameSingleCode, . $item['code']; } // now load the relations - if (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields']) - && ArrayHelper::check( - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields'] - )) + if (isset($field_relations['joinfields']) + && ArrayHelper::check($field_relations['joinfields'])) { - foreach ( - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields'] - as $join - ) + foreach ($field_relations['joinfields'] as $join) { $blankClass = ''; - if (isset($this->listJoinBuilder[$nameListCode]) - && isset($this->listJoinBuilder[$nameListCode][(int) $join])) + if (($join_item = + CFactory::_('Registry')->get('builder.list_join.' . $nameListCode . '.' . (int) $join)) !== null) { // code block $field['[field=' . (int) $join . ']'] = $this->getListItem( - $this->listJoinBuilder[$nameListCode][(int) $join], - $nameSingleCode, $nameListCode, $blankClass, + $join_item, $nameSingleCode, $nameListCode, $blankClass, $doNotEscape, $coreLoad, $core, false, $ref, $escape, $user, $refview ); // code name - if (isset($this->listJoinBuilder[$nameListCode][(int) $join]['code']) + if (isset($join_item['code']) && $useCustomCode) { $field['$item->{' . (int) $join . '}'] = '$item->' - . $this->listJoinBuilder[$nameListCode][(int) $join]['code']; + . $join_item['code']; } } } @@ -11592,18 +11582,18 @@ protected function getListItemBuilder($item, $nameSingleCode, . CFactory::_('Placeholder')->update( str_replace( array_keys($field), array_values($field), - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] + $field_relations['set'] ), $this->placeholders ) . PHP_EOL . Indent::_(3) . ""; } - elseif (isset($this->fieldRelations[$nameListCode][(int) $item['id']]['set']) + elseif (isset($field_relations['set']) && StringHelper::check( - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'] + $field_relations['set'] )) { // concatenate return PHP_EOL . Indent::_(3) . "
" . implode( - $this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'], + $field_relations['set'], $field ) . PHP_EOL . Indent::_(3) . "
"; } @@ -12146,7 +12136,7 @@ public function setDefaultViewsBody($nameSingleCode, $nameListCode) $body[] = ""; } // Trigger Event: jcb_ce_onSetDefaultViewsBodyTop - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onSetDefaultViewsBodyTop', array(&$this, &$body, @@ -12167,7 +12157,7 @@ public function setDefaultViewsBody($nameSingleCode, $nameListCode) $body[] = Indent::_(1) . "
"; $body[] = ""; // Trigger Event: jcb_ce_onSetDefaultViewsFormTop - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onSetDefaultViewsFormTop', array(&$this, &$body, @@ -12263,7 +12253,7 @@ public function setDefaultViewsBody($nameSingleCode, $nameListCode) . ""; $body[] = Indent::_(1) . ""; // Trigger Event: jcb_ce_onSetDefaultViewsFormBottom - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onSetDefaultViewsFormBottom', array(&$this, &$body, @@ -12272,7 +12262,7 @@ public function setDefaultViewsBody($nameSingleCode, $nameListCode) ); $body[] = ""; // Trigger Event: jcb_ce_onSetDefaultViewsBodyBottom - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onSetDefaultViewsBodyBottom', array(&$this, &$body, @@ -12293,10 +12283,7 @@ public function setDefaultViewsBody($nameSingleCode, $nameListCode) */ public function setListHead($nameSingleCode, $nameListCode) { - if (isset($this->listBuilder[$nameListCode]) - && ArrayHelper::check( - $this->listBuilder[$nameListCode] - )) + if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null) { // set the JHtml values based on filter type $jhtml_sort = "grid.sort"; @@ -12354,20 +12341,17 @@ public function setListHead($nameSingleCode, $nameListCode) // set footer Column number $this->listColnrBuilder[$nameListCode] = 4; // build the dynamic fields - foreach ($this->listBuilder[$nameListCode] as $item) + foreach ($items as $item) { // check if target is admin list if (1 == $item['target'] || 3 == $item['target']) { // check if we have an over-ride - if (isset($this->listHeadOverRide[$nameListCode]) - && ArrayHelper::check( - $this->listHeadOverRide[$nameListCode] - ) - && isset($this->listHeadOverRide[$nameListCode][$item['id']])) + if (($list_head_override = CFactory::_('Registry')->get('builder.list_head_override.' . + $nameListCode . '.' . (int) $item['id'])) + !== null) { - $item['lang'] - = $this->listHeadOverRide[$nameListCode][$item['id']]; + $item['lang'] = $list_head_override; } $class = 'nowrap hidden-phone'; if ($item['link']) @@ -14074,10 +14058,7 @@ public function setListBodyLinked($nameSingleCode, $nameListCode, $refview ) { - if (isset($this->listBuilder[$nameListCode]) - && ArrayHelper::check( - $this->listBuilder[$nameListCode] - )) + if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null) { // component helper name $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper'; @@ -14112,7 +14093,7 @@ public function setListBodyLinked($nameSingleCode, $nameListCode, $doNotEscape = true; } // start adding the dynamic - foreach ($this->listBuilder[$nameListCode] as $item) + foreach ($items as $item) { // check if target is linked list view if (1 == $item['target'] || 4 == $item['target']) @@ -14267,10 +14248,7 @@ public function setListHeadLinked($nameSingleCode, $nameListCode, $addNewButon, $refview ) { - if (isset($this->listBuilder[$nameListCode]) - && ArrayHelper::check( - $this->listBuilder[$nameListCode] - )) + if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null) { // component helper name $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper'; @@ -14376,20 +14354,17 @@ public function setListHeadLinked($nameSingleCode, $nameListCode, // set controller for data hiding options $controller = 1; // build the dynamic fields - foreach ($this->listBuilder[$nameListCode] as $item) + foreach ($items as $item) { // check if target is linked list view if (1 == $item['target'] || 4 == $item['target']) { // check if we have an over-ride - if (isset($this->listHeadOverRide[$nameListCode]) - && ArrayHelper::check( - $this->listHeadOverRide[$nameListCode] - ) - && isset($this->listHeadOverRide[$nameListCode][$item['id']])) + if (($list_head_override = CFactory::_('Registry')->get('builder.list_head_override.' . + $nameListCode . '.' . (int) $item['id'])) + !== null) { - $item['lang'] - = $this->listHeadOverRide[$nameListCode][$item['id']]; + $item['lang'] = $list_head_override; } $setin = (2 == $this->footableVersion) ? ' data-hide="phone"' : ' data-breakpoints="xs sm"'; @@ -14689,7 +14664,7 @@ public function setListQueryLinked($nameSingleCode, $nameListCode, as $order_field ) { - if (($order_field_name = $this->getFieldDatabaseName( + if (($order_field_name = CFactory::_('Field.Database.Name')->get( $nameListCode, $order_field['field'] // We Removed This 'listJoinBuilder' as targetArea // we will keep an eye on this @@ -15277,7 +15252,7 @@ public function setGetItemsModelMethod(&$nameSingleCode, &$nameListCode, as $order_field ) { - if (($order_field_name = $this->getFieldDatabaseName( + if (($order_field_name = CFactory::_('Field.Database.Name')->get( $nameListCode, $order_field['field'] )) !== false) { @@ -15831,7 +15806,7 @@ public function setListQuery(&$nameSingleCode, &$nameListCode) as $order_field ) { - if (($order_field_name = $this->getFieldDatabaseName( + if (($order_field_name = CFactory::_('Field.Database.Name')->get( $nameListCode, $order_field['field'] )) !== false) { @@ -18924,13 +18899,11 @@ public function setRouterCategoryViews($nameSingleCode, $nameListCode) $component = $this->componentCodeName; } // check if category has another name - if (isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -19019,13 +18992,11 @@ public function setJcontrollerAllowAdd($nameSingleCode, $nameListCode) if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -19178,13 +19149,11 @@ public function setJcontrollerAllowEdit($nameSingleCode, $nameListCode) )) { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -19567,13 +19536,11 @@ public function setJmodelAdminGetForm($nameSingleCode, $nameListCode) if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -20184,13 +20151,11 @@ public function setJmodelAdminCanDelete($nameSingleCode, $nameListCode) if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if ($coreLoad && isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -20308,13 +20273,11 @@ public function setJmodelAdminCanEditState($nameSingleCode, if (0) // isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check { // check if category has another name - if (isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view') + && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { - $otherViews = $this->catOtherName[$nameListCode]['views']; - $otherView = $this->catOtherName[$nameListCode]['view']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); + $otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view'); } else { @@ -21703,14 +21666,10 @@ public function setGetItemsMethodStringFix($nameSingleCode, $methodName = 'getItemsMethodListStringFixBuilder'; } // load the relations before modeling - if (isset($this->fieldRelations[$nameListCode]) - && ArrayHelper::check( - $this->fieldRelations[$nameListCode] - )) + if (($field_relations = + CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode)) !== null) { - foreach ( - $this->fieldRelations[$nameListCode] as $field_id => $fields - ) + foreach ($field_relations as $field_id => $fields) { foreach ($fields as $area => $field) { @@ -22072,12 +22031,10 @@ public function setGetItemsMethodStringFix($nameSingleCode, } } */ // load the relations after modeling - if (isset($this->fieldRelations[$nameListCode]) - && ArrayHelper::check( - $this->fieldRelations[$nameListCode] - )) + if (($field_relations = + CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode)) !== null) { - foreach ($this->fieldRelations[$nameListCode] as $fields) + foreach ($field_relations as $fields) { foreach ($fields as $area => $field) { @@ -22437,7 +22394,7 @@ public function setFileHeader($context, $codeName, $default = '') break; } // Trigger Event: jcb_ce_setClassHeader - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_setClassHeader', array(&$this->componentContext, &$context, &$codeName, &$headers) @@ -22602,7 +22559,7 @@ protected function setModelFieldRelation($item, $nameListCode, $tab) foreach ($item['joinfields'] as $join) { $field['$item->{' . (int) $join . '}'] = '$item->' - . $this->listJoinBuilder[$nameListCode][(int) $join]['code']; + . CFactory::_('Registry')->get('builder.list_join.' . $nameListCode . '.' . (int) $join . '.code'); } } // set based on join_type @@ -22917,13 +22874,11 @@ public function setDashboardIcons() $catCode = $this->categoryBuilder[$name_list]['code']; // check if category has another name - if (isset($this->catOtherName[$name_list]) - && ArrayHelper::check( - $this->catOtherName[$name_list] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $name_list . '.views') + && CFactory::_('Registry')->get('category.other.name.' . $name_list . '.name')) { - $otherViews = $this->catOtherName[$name_list]['views']; - $otherNames = $this->catOtherName[$name_list]['name']; + $otherViews = CFactory::_('Registry')->get('category.other.name.' . $name_list . '.views'); + $otherNames = CFactory::_('Registry')->get('category.other.name.' . $name_list . '.name'); // build lang $langName = StringHelper::safe( $otherNames, 'W' @@ -23503,13 +23458,10 @@ public function setSubMenus() $view['settings']->name_list ); // check if category has another name - if (isset($this->catOtherName[$nameListCode]) - && ArrayHelper::check( - $this->catOtherName[$nameListCode] - )) + if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views')) { $otherViews - = $this->catOtherName[$nameListCode]['views']; + = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'); } else { @@ -24171,7 +24123,7 @@ public function setConfigFieldsets($timer = 0) // set the custom table key $dbkey = 'g'; // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, @@ -24248,7 +24200,7 @@ public function setConfigFieldsets($timer = 0) elseif (2 == $timer) // this is after the admin views are build { // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, @@ -24267,7 +24219,7 @@ public function setConfigFieldsets($timer = 0) $this->setCustomControlConfigFieldsets($lang); } // Trigger Event: jcb_ce_onAfterSetConfigFieldsets - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, @@ -26629,9 +26581,9 @@ public function setEncryptionConfigFieldsets($lang) // enable the loading of dynamic field sets $dynamicAddFields = array(); // Add encryption if needed - if ((isset($this->basicEncryption) && $this->basicEncryption) - || (isset($this->whmcsEncryption) && $this->whmcsEncryption) - || (isset($this->mediumEncryption) && $this->mediumEncryption) + if (CFactory::_('Config')->basic_encryption + || CFactory::_('Config')->whmcs_encryption + || CFactory::_('Config')->medium_encryption || $this->componentData->add_license || (isset($this->configFieldSetsCustomField['Encryption Settings']) && ArrayHelper::check( @@ -26649,11 +26601,9 @@ public function setEncryptionConfigFieldsets($lang) . '_ENCRYPTION_DESC">'; // set tab lang - if (((isset($this->basicEncryption) && $this->basicEncryption) - || (isset($this->mediumEncryption) - && $this->mediumEncryption) - || (isset($this->whmcsEncryption) - && $this->whmcsEncryption)) + if ((CFactory::_('Config')->basic_encryption + || CFactory::_('Config')->medium_encryption + || CFactory::_('Config')->whmcs_encryption) && $this->componentData->add_license && $this->componentData->license_type == 3) { @@ -26668,11 +26618,9 @@ public function setEncryptionConfigFieldsets($lang) // add the next dynamic option $dynamicAddFields[] = "License & Encryption Settings"; } - elseif (((isset($this->basicEncryption) && $this->basicEncryption) - || (isset($this->mediumEncryption) - && $this->mediumEncryption) - || (isset($this->whmcsEncryption) - && $this->whmcsEncryption)) + elseif ((CFactory::_('Config')->basic_encryption + || CFactory::_('Config')->medium_encryption + || CFactory::_('Config')->whmcs_encryption) && $this->componentData->add_license && $this->componentData->license_type == 2) { @@ -26725,7 +26673,7 @@ public function setEncryptionConfigFieldsets($lang) ); } - if (isset($this->basicEncryption) && $this->basicEncryption) + if (CFactory::_('Config')->basic_encryption) { // set field lang CFactory::_('Language')->set( @@ -26759,7 +26707,7 @@ public function setEncryptionConfigFieldsets($lang) $this->configFieldSets[] = Indent::_(3) . 'default=""'; $this->configFieldSets[] = Indent::_(2) . "/>"; } - if (isset($this->mediumEncryption) && $this->mediumEncryption) + if (CFactory::_('Config')->medium_encryption) { // set field lang CFactory::_('Language')->set( @@ -26802,7 +26750,7 @@ public function setEncryptionConfigFieldsets($lang) "Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component." ); } - if (isset($this->whmcsEncryption) && $this->whmcsEncryption + if (CFactory::_('Config')->whmcs_encryption || $this->componentData->add_license) { // set field lang label and description @@ -26863,7 +26811,7 @@ public function setEncryptionConfigFieldsets($lang) } else { - if (isset($this->whmcsEncryption) && $this->whmcsEncryption) + if (CFactory::_('Config')->whmcs_encryption) { CFactory::_('Language')->set( CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL', @@ -26880,7 +26828,7 @@ public function setEncryptionConfigFieldsets($lang) } } // add the description based on global settings - if (isset($this->whmcsEncryption) && $this->whmcsEncryption) + if (CFactory::_('Config')->whmcs_encryption) { CFactory::_('Language')->set( CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_DESC', @@ -27010,7 +26958,7 @@ public function setAccessSections() $this->permissionViews = array(); // Trigger Event: jcb_ce_onBeforeBuildAccessSections - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAccessSections', array(&$this->componentContext, &$this) ); @@ -27372,8 +27320,8 @@ public function setAccessSections() $field['settings']->properties )) { - $fieldType = $this->getFieldType($field); - $fieldName = $this->getFieldName( + $fieldType = CFactory::_('Field.Type.Name')->get($field); + $fieldName = CFactory::_('Field.Name')->get( $field, $nameViews ); // loop the permission options @@ -27447,7 +27395,7 @@ public function setAccessSections() } // Trigger Event: jcb_ce_onAfterBuildAccessSections - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAccessSections', array(&$this->componentContext, &$this) ); @@ -28175,7 +28123,7 @@ public function getModuleMainXML(&$module) // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget($module->key); // Trigger Event: jcb_ce_onBeforeBuildModuleLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildModuleLang', array(&$this->componentContext, &$module, &$langContent, &$module->lang_prefix, &$module->official_name) @@ -28197,7 +28145,7 @@ public function getModuleMainXML(&$module) $total = count($values); unset($values); // Trigger Event: jcb_ce_onBeforeBuildModuleLangFiles - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildModuleLangFiles', array(&$this->componentContext, &$module, &$this->languages['modules'], @@ -28563,7 +28511,7 @@ public function getPluginMainXML(&$plugin) // for plugin event TODO change event api signatures $langContent = CFactory::_('Language')->getTarget($plugin->key); // Trigger Event: jcb_ce_onBeforeBuildPluginLang - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildPluginLang', array(&$this->componentContext, &$plugin, &$langContent, @@ -28586,7 +28534,7 @@ public function getPluginMainXML(&$plugin) $total = count($values); unset($values); // Trigger Event: jcb_ce_onBeforeBuildPluginLangFiles - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildPluginLangFiles', array(&$this->componentContext, &$plugin, &$this->languages['plugins'], diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 65dc4de66..fd9707e04 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -67,7 +67,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildFilesContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, @@ -391,7 +391,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$nameSingleCode, @@ -641,7 +641,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$nameSingleCode, @@ -666,7 +666,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, &$nameSingleCode, @@ -982,7 +982,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildAdminListViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, &$nameSingleCode, @@ -1156,7 +1156,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildAdminViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, &$nameSingleCode, @@ -1241,7 +1241,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, @@ -1430,7 +1430,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, @@ -1624,10 +1624,9 @@ protected function buildFileContent() } // build the validation rules - if (isset($this->validationRules) - && ArrayHelper::check($this->validationRules)) + if (($validationRules = CFactory::_('Registry')->_('validation.rules')) !== null) { - foreach ($this->validationRules as $rule => $_php) + foreach ($validationRules as $rule => $_php) { // setup rule file $target = array('admin' => 'a_rule_zi'); @@ -1716,7 +1715,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onBeforeBuildSiteViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, @@ -1933,7 +1932,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildSiteViewContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, @@ -2089,7 +2088,7 @@ protected function buildFileContent() if (ObjectHelper::check($power)) { // Trigger Event: jcb_ce_onBeforeInfusePowerData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeInfusePowerData', array(&$this->componentContext, &$power, &$this) ); @@ -2099,7 +2098,7 @@ protected function buildFileContent() // build the autoloader $autoloader[implode('.', $power->_namespace_prefix)] = $power->_namespace_prefix; // Trigger Event: jcb_ce_onAfterInfusePowerData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterInfusePowerData', array(&$this->componentContext, &$power, &$this) ); @@ -2120,7 +2119,7 @@ protected function buildFileContent() if (ObjectHelper::check($module)) { // Trigger Event: jcb_ce_onBeforeInfuseModuleData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeInfuseModuleData', array(&$this->componentContext, &$module, &$this) ); @@ -2150,7 +2149,7 @@ protected function buildFileContent() { // INSTALLCLASS $this->fileContentDynamic[$module->key][Placefix::_h('INSTALLCLASS')] - = CFactory::_J('Extension.InstallScript')->get($module); + = CFactory::_('Extension.InstallScript')->get($module); } // FIELDSET if (isset($module->form_files) @@ -2178,7 +2177,7 @@ protected function buildFileContent() $this->fileContentDynamic[$module->key][Placefix::_h('MAINXML')] = $this->getModuleMainXML($module); // Trigger Event: jcb_ce_onAfterInfuseModuleData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterInfuseModuleData', array(&$this->componentContext, &$module, &$this) ); @@ -2193,7 +2192,7 @@ protected function buildFileContent() if (ObjectHelper::check($plugin)) { // Trigger Event: jcb_ce_onBeforeInfusePluginData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeInfusePluginData', array(&$this->componentContext, &$plugin, &$this) ); @@ -2209,7 +2208,7 @@ protected function buildFileContent() { // INSTALLCLASS $this->fileContentDynamic[$plugin->key][Placefix::_h('INSTALLCLASS')] - = CFactory::_J('Extension.InstallScript')->get($plugin); + = CFactory::_('Extension.InstallScript')->get($plugin); } // FIELDSET if (isset($plugin->form_files) @@ -2237,7 +2236,7 @@ protected function buildFileContent() $this->fileContentDynamic[$plugin->key][Placefix::_h('MAINXML')] = $this->getPluginMainXML($plugin); // Trigger Event: jcb_ce_onAfterInfusePluginData - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterInfusePluginData', array(&$this->componentContext, &$plugin, &$this) ); @@ -2252,7 +2251,7 @@ protected function buildFileContent() // for plugin event TODO change event api signatures $this->placeholders = CFactory::_('Placeholder')->active; // Trigger Event: jcb_ce_onAfterBuildFilesContent - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, @@ -2438,7 +2437,7 @@ public function setLangFileData() // path to INI file $getPAth = $this->templatePath . '/en-GB.com_admin.ini'; // Trigger Event: jcb_ce_onBeforeBuildAllLangFiles - CFactory::_J('Event')->trigger( + CFactory::_('Event')->trigger( 'jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages['components'], &$this->langTag) diff --git a/admin/helpers/extrusion/b_builder.php b/admin/helpers/extrusion/b_builder.php index 49500600f..7afad4ea8 100644 --- a/admin/helpers/extrusion/b_builder.php +++ b/admin/helpers/extrusion/b_builder.php @@ -191,7 +191,7 @@ protected function addFields(&$view, &$view_id) */ protected function setField(&$view, &$field) { - if ($fieldType = $this->getFieldType($field['fieldType'])) + if ($fieldType = CFactory::_('Field.Type.Name')->get($field['fieldType'])) { // set the field object $object = new stdClass(); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index c9bfb09f2..5556dee6f 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3528,11 +3528,6 @@ COM_COMPONENTBUILDER_CONFIG_MAIL_CONFIGURATION="Mail Configuration" COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can choose to manually select what directories should show, or turn them off altogether." COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL="Manage JCB Package Directories" COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION="Manual Selection" -COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_DESC="Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible." -COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_LABEL="Medium Key (Path)" -COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_DESC="When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.
Never change this key once it is set, or remove the key file! DATA WILL GET CORRUPTED IF YOU DO! Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a secure connection is recommended!" -COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_LABEL="Medium Encryption" -COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_PATH_ERROR="Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component." COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION="Add the prefix you would like to use. Make sure that it is HTML Character Entities since it is being used in XML." COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT="»" COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix
diff --git a/admin/layouts/power/code_left.php b/admin/layouts/power/code_left.php index 098dc960b..85ed07e9f 100644 --- a/admin/layouts/power/code_left.php +++ b/admin/layouts/power/code_left.php @@ -29,10 +29,10 @@ 'name', 'description', 'extends', - 'implements_custom', + 'extends_custom', 'implements', + 'implements_custom', 'namespace', - 'extends_custom', 'add_head' ); diff --git a/admin/models/power.php b/admin/models/power.php index 6c2f82742..24693b742 100644 --- a/admin/models/power.php +++ b/admin/models/power.php @@ -33,10 +33,10 @@ class ComponentbuilderModelPower extends AdminModel 'name', 'description', 'extends', - 'implements_custom', + 'extends_custom', 'implements', + 'implements_custom', 'namespace', - 'extends_custom', 'add_head' ), 'right' => array( diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 15782757b..7ab8a2050 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1987,8 +1987,8 @@ INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `exten (21, 1, 'Global Unique ID Helper\r\n\r\n@since 3.0.9', '', '', '9c513baf-b279-43fd-ae29-a585c8cbc4f0', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFJldHVybnMgYSBHVUlEdjQgc3RyaW5nDQoJICogDQoJICogVGhhbmtzIHRvIERhdmUgUGVhcnNvbiAoYW5kIG90aGVyKQ0KCSAqIGh0dHBzOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmNvbS1jcmVhdGUtZ3VpZC5waHAjMTE5MTY4IA0KCSAqDQoJICogVXNlcyB0aGUgYmVzdCBjcnlwdG9ncmFwaGljYWxseSBzZWN1cmUgbWV0aG9kDQoJICogZm9yIGFsbCBzdXBwb3J0ZWQgcGxhdGZvcm1zIHdpdGggZmFsbGJhY2sgdG8gYW4gb2xkZXIsDQoJICogbGVzcyBzZWN1cmUgdmVyc2lvbi4NCgkgKg0KCSAqIEBwYXJhbSBib29sICR0cmltDQoJICoNCgkgKiBAcmV0dXJuIHN0cmluZw0KCSAqDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0KCR0cmltID0gdHJ1ZSkNCgl7DQoJCS8vIFdpbmRvd3MNCgkJaWYgKGZ1bmN0aW9uX2V4aXN0cygnY29tX2NyZWF0ZV9ndWlkJykgPT09IHRydWUpDQoJCXsNCgkJCWlmICgkdHJpbS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90ZWN0ZWQgc3RhdGljIGZ1bmN0aW9uIHZhbGlkYXRlKCRndWlkKQ0KCXsNCgkJLy8gY2hlY2sgaWYgd2UgaGF2ZSBhIHN0cmluZw0KCQlpZiAoU3RyaW5nSGVscGVyOjpjaGVjaygkZ3VpZCkpDQoJCXsNCgkJCXJldHVybiBwcmVnX21hdGNoKCIvXihceyk/W2EtZlxkXXs4fSgtW2EtZlxkXXs0fSl7NH1bYS1mXGRdezh9KD8oMSlcfSkkL2kiLCAkZ3VpZCk7DQoJCX0NCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'GuidHelper', 'VDM\\Joomla\\Utilities.GuidHelper', '1.0.0', '{}', 'Utilities GuidHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\"}}', '', 1, '2022-03-12 01:27:10', '2022-05-21 13:27:39', 12, 9), (22, 1, 'File helper\r\n\r\n@since 3.0.9', '', '', 'a223b31e-ea1d-4cdf-92ae-5f9becffaff0', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xMYW5ndWFnZVxUZXh0Ow0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxQYXRoOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEFyY2hpdmVcQXJjaGl2ZTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection2\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"}}', 'CS8qKg0KCSAqIFRyaWdnZXIgZXJyb3Igbm90aWNlIG9ubHkgb25jZQ0KCSAqDQoJICogQHZ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oaXNzZXQoJGhlYWRlcnNbMF0pICYmIGlzX3N0cmluZygkaGVhZGVyc1swXSkgJiYgc3RycG9zKCRoZWFkZXJzWzBdLCc0MDQnKSA9PT0gZmFsc2UpDQoJCQl7DQoJCQkJJGV4aXN0cyA9IHRydWU7DQoJCQl9DQoJCX0NCgkJcmV0dXJuICRleGlzdHM7DQoJfQ0K', '{}', 'FileHelper', 'VDM\\Joomla\\Utilities.FileHelper', '1.0.0', '{}', 'Utilities FileHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 02:09:18', '2022-06-11 16:54:51', 24, 9), (23, 1, 'Some component helper\r\n\r\n@since 3.0.11', '', '', '640b5352-fb09-425f-a26e-cd44eda03f15', 'dXNlIEpvb21sYVxJbnB1dFxJbnB1dDsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow==', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBjdXJyZW50IG9wdGlvbg0KCSAqDQoJICogQHZhciAgICBTdHJpbmcNCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICRvcHRpb247DQoNCgkvKioNCgkgKiBUaGUgY29tcG9uZW50IHBhcmFtcyBsaXN0IGNhY2hlDQoJICoNCgkgKiBAdmFyICAgIFJlZ2lzdHJ5W10NCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRwYXJhbXMgPSBhcnJheSgpOw0KDQoJLyoqDQoJICogR2V0cyB0aGUgcGFyYW1ldGVyIG9iamVjdCBmb3IgdGhlIGNvbXBvbmVudA0KCSAqDQoJICogQHBhcmFtICAgU3RyaW5nICAgICAgICAgICAgICAgJG9wdGlvbiAgVGhlIG9wdGlvbiBmb3IgdGhlIGNvbXBvbm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ZSBoZWxwZXIgY2xhc3Mgb2YgdGhpcyBjb21wb25lbnQgaGFzIGEgbWV0aG9kDQoJICoNCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAgJG1ldGhvZCAgVGhlIG1ldGhvZCBuYW1lIHRvIHNlYXJjaCBmb3INCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAgJG9wdGlvbiAgICBUaGUgb3B0aW9uIGZvciB0aGUgY29tcG9uZW50Lg0KCSAqDQoJICogQHJldHVybiAgYm9vbCAgICAgICAgICB0cnVlIGlmIG1ldGhvZCBleGlzdA0KCSAqDQoJICogQHNpbmNlICAgMy4wLjExDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBtZXRob2RFeGlzdHMoJG1ldGhvZCwgJG9wdGlvbiA9IG51bGwpDQoJew0KCQkvLyBnZXQgdGhlIGhlbHBlciBjbGFzcw0KCQlpZiAoKCRoZWxwZXIgPSBzZWxmOjpnZXQoJG9wdGlvbiwgZmFsc2UpKSAhPT0gZmFsc2UpDQoJCXsNCgkJCWlmIChtZXRob2RfZXhpc3RzKCRoZWxwZXIsICRtZXRob2QpKQ0KCQkJew0KCQkJCXJldHVybiB0cnVlOw0KCQkJfQ0KCQl9DQoNCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'Helper', 'VDM\\Joomla\\Utilities.Component.Helper', '1.0.0', '{}', 'Utilities Component Helper', 'abstract class', '{}', '', 1, '2022-05-13 05:36:32', '2022-05-21 13:27:39', 17, 7), -(24, 1, 'Image helper\r\n\r\n@since 3.0.11', '', '', '962b15d8-915f-4cd7-aea6-7cf82afdc20b', 'dXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXENNU1xVcmlcVXJpOw0KdXNlIEpvb21sYVxDTVNcSW1hZ2VcSW1hZ2U7', '', '', '{\"load_selection0\":{\"load\":\"91004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yB0aGUgaW1hZ2UNCgkJCQkkcHJvcGVydGllcy0+c3JjID0gVXJpOjpyb290KCkgLiAkaW1hZ2VfcHVibGljX3BhdGg7DQoJCQkJLy8gcmV0dXJuIHRoZSBpbWFnZSBwcm9wZXJ0aWVzDQoJCQkJcmV0dXJuICRwcm9wZXJ0aWVzOw0KCQkJfQ0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'ImageHelper', 'VDM\\Joomla\\Utilities.ImageHelper', '1.0.0', '{}', 'Utilities ImageHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 10:59:17', '2022-05-21 13:27:39', 17, 9), -(25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICR1c2VTdHJlYW1zID0gZmFsc2U7DQoNCgkvKioNCgkgKiBBbGxvdyB0aGUgdXBsb2FkIG9mIHVuc2FmZSBmaWxlcw0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAq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YXRoKQ0KCXsNCgkJLy8gSXMgdGhlIHBhY2thZ2UgZmlsZSBhIHZhbGlkIGZpbGU/DQoJCWlmIChpc19maWxlKCRmdWxsUGF0aCkpDQoJCXsNCgkJCUZpbGU6OmRlbGV0ZSgkZnVsbFBhdGgpOw0KCQl9DQoJCWVsc2VpZiAoaXNfZmlsZShQYXRoOjpjbGVhbigkZnVsbFBhdGgpKSkNCgkJew0KCQkJLy8gSXQgbWlnaHQgYWxzbyBiZSBqdXN0IGEgYmFzZSBmaWxlbmFtZQ0KCQkJRmlsZTo6ZGVsZXRlKFBhdGg6OmNsZWFuKCRmdWxsUGF0aCkpOw0KCQl9DQoJfQ0KDQoJLyoqDQoJICogU2V0IHRoZSBlcnJvcnMNCgkgKg0KCSAqIEBwYXJhbSAgc3RyaW5nICAgICAgICAkbWVzc2FnZSAgIFRoZSBlcnJvciBtZXNzYWdlDQoJICoNCgkgKiBAcmV0dXJuICB2b2lkDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljIGZ1bmN0aW9uIHNldEVycm9yKCRtZXNzYWdlKQ0KCXsNCgkJaWYgKHNlbGY6OiRlbnF1ZXVlRXJyb3IpDQoJCXsNCgkJCUZhY3Rvcnk6OmdldEFwcGxpY2F0aW9uKCktPmVucXVldWVNZXNzYWdlKCRtZXNzYWdlLCAnZXJyb3InKTsNCgkJfQ0KCQllbHNlDQoJCXsNCgkJCXNlbGY6OiRlcnJvcnNbXSA9ICRtZXNzYWdlOw0KCQl9DQoJfQ==', '{}', 'UploadHelper', 'VDM\\Joomla\\Utilities.UploadHelper', '1.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-05-21 13:27:39', 31, 9), +(24, 1, 'Image helper\r\n\r\n@since 3.0.11', '', '', '962b15d8-915f-4cd7-aea6-7cf82afdc20b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W92ZSB0aGUgc2VydmVyIHBhdGgNCgkJCQkkaW1hZ2VfcHVibGljX3BhdGggPSB0cmltKHN0cl9yZXBsYWNlKEpQQVRIX1NJVEUsICcnLCAkZGlyX25hbWUpLCAnLycpIC4gJy8nIC4gJG5hbWU7DQoJCQkJLy8gbm93IGFkZCB0aGUgc3JjIHBhdGggdG8gc2hvdyB0aGUgaW1hZ2UNCgkJCQkkcHJvcGVydGllcy0+c3JjID0gVXJpOjpyb290KCkgLiAkaW1hZ2VfcHVibGljX3BhdGg7DQoJCQkJLy8gcmV0dXJuIHRoZSBpbWFnZSBwcm9wZXJ0aWVzDQoJCQkJcmV0dXJuICRwcm9wZXJ0aWVzOw0KCQkJfQ0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'ImageHelper', 'VDM\\Joomla\\Utilities.ImageHelper', '1.0.0', '{}', 'Utilities ImageHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 10:59:17', '2022-09-03 17:18:33', 18, 9), +(25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmN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.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-09-03 17:20:06', 33, 9), (26, '', 'Mime Helper\r\n\r\n@since 3.0.11', '', '', 'f11dc790-713e-4706-9a85-a318ed3ad56e', '', '', '', '{}', 'W0VYVEVSTkFMQ09ERT1odHRwczovL2dpc3QuZ2l0aHVidXNlcmNvbnRlbnQuY29tL0xsZXdlbGx5bnZkbS83NGJlMzczMzU3ZTEzMWI4Nzc1YTc1ODJjM2RlNTA4Yi9yYXcvbWltZV90eXBlcy5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2dldC5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2V4dGVuc2lvbnMucGhwXQ==', '{}', 'MimeHelper', 'VDM\\Joomla\\Utilities.MimeHelper', '1.0.0', '{}', 'Utilities MimeHelper', 'abstract class', '{}', '', 1, '2022-05-16 14:27:38', '2022-05-21 13:27:39', 3, 9), (27, '', 'Just to link powers to the power updater component', '', '', '8025e71c-8e21-44cb-b23e-dce2fb5a1ab5', '', '', '', '{\"load_selection0\":{\"load\":\"db4a1e4d-be59-4e87-8b4d-c40512752232\"},\"load_selection1\":{\"load\":\"79d765b3-7319-4988-9730-446c7f347020\"},\"load_selection2\":{\"load\":\"d7600b43-771a-4747-9f5d-952765721799\"},\"load_selection3\":{\"load\":\"962b15d8-915f-4cd7-aea6-7cf82afdc20b\"},\"load_selection4\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"}}', '', '{}', 'Updater', 'VDM\\Powe\\Updater', '1.0.0', '{}', 'Power Updater', 'class', '{}', '', 1, '2022-05-21 13:15:55', '2022-06-11 16:54:51', 3, 13), (28, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoGetContents', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'ef011ee1-64f0-4048-b013-777473b727dd', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldHMgdGhlIG1ldGFkYXRhIGFuZCBjb250ZW50cyAoaWYgYSBmaWxlKSBvZiBhbiBlbnRyeSBpbiBhIHJlcG9zaXRvcnksIG9yIGEgbGlzdCBvZiBlbnRyaWVzIGlmIGEgZGlyDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICBSZXBvc2l0b3J5IG93bmVyLg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHJlcG8gICAgICAgICBSZXBvc2l0b3J5IG5hbWUuDQoJICogQHBhcmFtICAgc3RyaW5nICAkZmlsZXBhdGggICAgUmVwb3NpdG9yeSBmaWxlIHBhdGguDQoJICoNCgkgKiBAcmV0dXJuICBvYmplY3QNCgkgKg0KCSAqIEBzaW5jZSAgIDEuMA0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBnZXQoJG93bmVyLCAkcmVwbywgJGZpbGVwYXRoKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHBhdGggPSAnL3JlcG9zLycgLiAkb3duZXIgLiAnLycgLiAkcmVwbyAuICcvY29udGVudHMvJyAuICRmaWxlcGF0aDsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPmdldCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpKQ0KCQkpOw0KCX0NCg==', '{}', 'File', 'VDM\\Gitea\\Package.Repo.File', '1.0.0', '{}', 'Gitea Repo File', 'class', '{}', '', 1, '2022-05-21 13:40:09', '2022-07-09 10:28:20', 10, 4), diff --git a/componentbuilder.xml b/componentbuilder.xml index e86cbba2a..225f932f2 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 3rd September, 2022 + 10th September, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io From d757e14fac5db3a078a9f85352c2b42bdabb9835 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 14 Sep 2022 17:40:02 +0200 Subject: [PATCH 05/75] Adds the initial classes needed for the new search feature. Adds the empty view for the search feature. #952 --- README.md | 8 +- admin/README.txt | 8 +- admin/access.xml | 3 + admin/assets/css/search.css | 13 + admin/controllers/ajax.json.php | 95 + admin/controllers/search.php | 42 + admin/helpers/compiler/a_Get.php | 22 +- admin/helpers/compiler/c_Fields.php | 40 +- admin/helpers/compiler/e_Interpretation.php | 16 +- admin/helpers/compiler/f_Infusion.php | 18 +- admin/helpers/componentbuilder.php | 8 + .../en-GB/en-GB.com_componentbuilder.ini | 14 + .../en-GB/en-GB.com_componentbuilder.sys.ini | 7 + admin/models/ajax.php | 80 +- admin/models/componentbuilder.php | 1 + admin/models/search.php | 165 + admin/views/search/index.html | 1 + admin/views/search/tmpl/default.php | 52 + admin/views/search/tmpl/index.html | 1 + admin/views/search/view.html.php | 150 + componentbuilder.xml | 3 +- .../src/Componentbuilder/BaseConfig.php | 131 + .../Compiler/Component/Placeholder.php | 4 +- .../src/Componentbuilder/Compiler/Config.php | 119 +- .../Component/PlaceholderInterface.php | 2 +- .../Componentbuilder/Compiler/Registry.php | 78 +- .../Compiler/Utilities/Path.php | 4 +- .../src/Componentbuilder/Search/Agent.php | 170 + .../Componentbuilder/Search/Agent/Find.php | 180 + .../Componentbuilder/Search/Agent/Replace.php | 181 + .../Componentbuilder/Search/Agent/Search.php | 74 + .../Componentbuilder/Search/Agent/Update.php | 74 + .../Componentbuilder/Search/Agent/index.html | 1 + .../src/Componentbuilder/Search/Config.php | 125 + .../Componentbuilder/Search/Database/Get.php | 295 ++ .../Componentbuilder/Search/Database/Set.php | 187 + .../Search/Database/index.html | 1 + .../src/Componentbuilder/Search/Factory.php | 80 + .../Search/Interfaces/FindInterface.php | 65 + .../Search/Interfaces/GetInterface.php | 60 + .../Search/Interfaces/ModelInterface.php | 71 + .../Search/Interfaces/ReplaceInterface.php | 66 + .../Search/Interfaces/SetInterface.php | 60 + .../Search/Interfaces/index.html | 1 + .../src/Componentbuilder/Search/Model.php | 160 + .../src/Componentbuilder/Search/Model/Get.php | 63 + .../src/Componentbuilder/Search/Model/Set.php | 63 + .../Componentbuilder/Search/Model/index.html | 1 + .../Componentbuilder/Search/Service/Agent.php | 142 + .../Search/Service/Database.php | 80 + .../Componentbuilder/Search/Service/Model.php | 78 + .../Search/Service/Search.php | 74 + .../Search/Service/index.html | 1 + .../src/Componentbuilder/Search/Table.php | 3026 +++++++++++++++++ .../src/Componentbuilder/Search/index.html | 1 + script.php | 2 +- site/helpers/componentbuilder.php | 3 + 57 files changed, 6293 insertions(+), 177 deletions(-) create mode 100644 admin/assets/css/search.css create mode 100644 admin/controllers/search.php create mode 100644 admin/models/search.php create mode 100644 admin/views/search/index.html create mode 100644 admin/views/search/tmpl/default.php create mode 100644 admin/views/search/tmpl/index.html create mode 100644 admin/views/search/view.html.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Find.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Replace.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Search.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Update.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Set.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/FindInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ModelInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ReplaceInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SetInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Database.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Model.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/index.html create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/index.html diff --git a/README.md b/README.md index f6a473d39..20ac6437d 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th September, 2022 ++ *Last Build*: 14th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **324186** ++ *Line count*: **330282** + *Field count*: **2002** -+ *File count*: **2125** -+ *Folder count*: **366** ++ *File count*: **2161** ++ *Folder count*: **374** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index f6a473d39..20ac6437d 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th September, 2022 ++ *Last Build*: 14th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **324186** ++ *Line count*: **330282** + *Field count*: **2002** -+ *File count*: **2125** -+ *Folder count*: **366** ++ *File count*: **2161** ++ *Folder count*: **374** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/access.xml b/admin/access.xml index 1e51d294b..7503798c3 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -498,6 +498,9 @@ + + + diff --git a/admin/assets/css/search.css b/admin/assets/css/search.css new file mode 100644 index 000000000..2731fc5aa --- /dev/null +++ b/admin/assets/css/search.css @@ -0,0 +1,13 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* CSS Document */ + + diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 0d831e5ec..a626d5936 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -67,6 +67,8 @@ public function __construct($config) $this->registerTask('fieldTypeProperties', 'ajax'); $this->registerTask('getFieldPropertyDesc', 'ajax'); $this->registerTask('getCodeGlueOptions', 'ajax'); + $this->registerTask('searchTable', 'ajax'); + $this->registerTask('updateTable', 'ajax'); $this->registerTask('snippetDetails', 'ajax'); $this->registerTask('setSnippetGithub', 'ajax'); $this->registerTask('getSnippets', 'ajax'); @@ -1631,6 +1633,99 @@ public function ajax() } } break; + case 'searchTable': + try + { + $table_nameValue = $jinput->get('table_name', NULL, 'WORD'); + $search_valueValue = $jinput->get('search_value', NULL, 'RAW'); + $match_caseValue = $jinput->get('match_case', 0, 'INT'); + $whole_wordValue = $jinput->get('whole_word', 0, 'INT'); + $regex_searchValue = $jinput->get('regex_search', 0, 'INT'); + $component_idValue = $jinput->get('component_id', 0, 'INT'); + if($table_nameValue && $user->id != 0 && $search_valueValue) + { + $result = $this->getModel('ajax')->searchTable($table_nameValue, $search_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); + } + else + { + $result = false; + } + if($callback) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback) + { + echo $callback."(".json_encode($e).");"; + } + elseif($returnRaw) + { + echo json_encode($e); + } + else + { + echo "(".json_encode($e).");"; + } + } + break; + case 'updateTable': + try + { + $table_nameValue = $jinput->get('table_name', NULL, 'WORD'); + $search_valueValue = $jinput->get('search_value', NULL, 'RAW'); + $replace_valueValue = $jinput->get('replace_value', NULL, 'RAW'); + $match_caseValue = $jinput->get('match_case', 0, 'INT'); + $whole_wordValue = $jinput->get('whole_word', 0, 'INT'); + $regex_searchValue = $jinput->get('regex_search', 0, 'INT'); + $component_idValue = $jinput->get('component_id', 0, 'INT'); + if($table_nameValue && $user->id != 0 && $search_valueValue) + { + $result = $this->getModel('ajax')->updateTable($table_nameValue, $search_valueValue, $replace_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); + } + else + { + $result = false; + } + if($callback) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback) + { + echo $callback."(".json_encode($e).");"; + } + elseif($returnRaw) + { + echo json_encode($e); + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'snippetDetails': try { diff --git a/admin/controllers/search.php b/admin/controllers/search.php new file mode 100644 index 000000000..041c25ecd --- /dev/null +++ b/admin/controllers/search.php @@ -0,0 +1,42 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\CMS\MVC\Controller\BaseController; +use Joomla\Utilities\ArrayHelper; + +/** + * Componentbuilder Search Base Controller + */ +class ComponentbuilderControllerSearch extends BaseController +{ + public function __construct($config) + { + parent::__construct($config); + } + + public function dashboard() + { + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder', false)); + return; + } + + public function openCompiler() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // redirect to the libraries + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=compiler', false)); + return; + } +} diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 6e3f2769b..b8a540fed 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -1307,10 +1307,7 @@ public function getComponentData() ); // load the global placeholders - if (ArrayHelper::check($this->globalPlaceholders)) - { - CFactory::_('Placeholder')->active = $this->globalPlaceholders; - } + CFactory::_('Placeholder')->active = CFactory::_('Component.Placeholder')->get(); // set component sales name $component->sales_name = StringHelper::safe( @@ -7567,7 +7564,7 @@ function ($field) use ($key, $unique) { CFactory::_('Config')->build_target = $_backup_target; CFactory::_('Config')->lang_target = $_backup_lang; $this->langPrefix = $_backup_langPrefix; - CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix); + CFactory::_('Config')->lang_prefix = $_backup_langPrefix; unset( CFactory::_('Placeholder')->active[Placefix::_('Module_name')] @@ -7816,15 +7813,14 @@ public function setJoomlaPlugin($id, &$component) $plugin->official_name = ucwords( $plugin->group . ' - ' . $plugin->name ); - // set langPrefix - $this->langPrefix - = PluginHelper::safeLangPrefix( - $plugin->code_name, - $plugin->group - ); - CFactory::_('Config')->set('lang_prefix', $this->langPrefix); // set lang prefix - $plugin->lang_prefix = CFactory::_('Config')->lang_prefix; + $plugin->lang_prefix = PluginHelper::safeLangPrefix( + $plugin->code_name, + $plugin->group + ); + // set langPrefix + CFactory::_('Config')->lang_prefix = $plugin->lang_prefix; + $this->langPrefix = $plugin->lang_prefix; // set plugin class name $plugin->class_name = PluginHelper::safeClassName( diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index f158238f3..9390d8c85 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -3954,7 +3954,7 @@ public function setLayoutBuilder(&$nameSingleCode, &$tabName, &$name, } // now build the layout if (StringHelper::check($tabName) - && $tabName != 'publishing') + && strtolower($tabName) != 'publishing') { $this->tabCounter[$nameSingleCode][(int) $field['tab']] = $tabName; @@ -5032,6 +5032,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $this->buildSiteFieldData( $nameSingleCode, $name, 'json', $typeName ); + // add open close method to field data + $field['store'] = 'json'; break; case 2: // BASE_SIXTY_FOUR @@ -5040,6 +5042,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $this->buildSiteFieldData( $nameSingleCode, $name, 'base64', $typeName ); + // add open close method to field data + $field['store'] = 'base64'; break; case 3: // BASIC_ENCRYPTION_LOCALKEY @@ -5048,6 +5052,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $this->buildSiteFieldData( $nameSingleCode, $name, 'basic_encryption', $typeName ); + // add open close method to field data + $field['store'] = 'basic_encryption'; break; case 4: // WHMCS_ENCRYPTION_VDMKEY (DUE REMOVAL) @@ -5056,6 +5062,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $this->buildSiteFieldData( $nameSingleCode, $name, 'whmcs_encryption', $typeName ); + // add open close method to field data + $field['store'] = 'whmcs_encryption'; break; case 5: // MEDIUM_ENCRYPTION_LOCALFILE @@ -5064,6 +5072,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $this->buildSiteFieldData( $nameSingleCode, $name, 'medium_encryption', $typeName ); + // add open close method to field data + $field['store'] = 'medium_encryption'; break; case 6: // EXPERT_MODE @@ -5096,6 +5106,8 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, ); // no londer add the json again (already added) $subformJsonSwitch = false; + // add open close method to field data + $field['store'] = 'json'; break; } // just a heads-up for usergroups set to multiple @@ -5286,6 +5298,22 @@ public function setBuilders($langLabel, $langView, $nameSingleCode, $tabName = 'publishing'; } $this->setLayoutBuilder($nameSingleCode, $tabName, $name, $field); + + // only load fields we want to search + if ($dbSwitch && ComponentbuilderHelper::fieldCheck($typeName, 'search')) + { + // load a search array of view, field, and [encryption, type, tab] + CFactory::_('Registry')->set('all_search_fields.' . $nameSingleCode . '.' . $name, + [ + 'name' => $name, + 'type' => $typeName, + 'title' => (isset($this->titleBuilder[$nameSingleCode]) && $name === $this->titleBuilder[$nameSingleCode]) ? true : false, + 'list' => $nameListCode, + 'store' => (isset($field['store'])) ? $field['store'] : null, + 'tab_name' => $tabName + ] + ); + } } /** @@ -5384,15 +5412,9 @@ public function setCustomFieldTypeFile($data, $nameListCode, $replace[$replacekey] = $replacevalue; } // load the global placeholders - if (ArrayHelper::check($this->globalPlaceholders)) + foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder => $gloabalValue) { - foreach ( - $this->globalPlaceholders as $globalPlaceholder => - $gloabalValue - ) - { - $replace[$globalPlaceholder] = $gloabalValue; - } + $replace[$globalPlaceholder] = $gloabalValue; } // start loading the field type $this->fileContentDynamic['customfield_' . $data['type']] = array(); diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 17c492f56..6dd1bbd61 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -24106,17 +24106,9 @@ public function setConfigFieldsets($timer = 0) $placeholders[Placefix::_('views')] = $nameListCode; // load the global placeholders - if (ArrayHelper::check( - $this->globalPlaceholders - )) + foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder => $gloabalValue) { - foreach ( - $this->globalPlaceholders as $globalPlaceholder => - $gloabalValue - ) - { - $placeholders[$globalPlaceholder] = $gloabalValue; - } + $placeholders[$globalPlaceholder] = $gloabalValue; } $view = ''; $viewType = 0; @@ -29015,10 +29007,12 @@ public function setPowersAutoloader($namespace, $loadSite) public function getExtensionFieldsetXML(&$extension, &$fields, $dbkey = 'zz' ) { + // get global placeholders + $placeholder = CFactory::_('Component.Placeholder')->get(); // build the fieldset return $this->getFieldsetXML( $fields, $extension->lang_prefix, $extension->key, $extension->key, - $this->globalPlaceholders, $dbkey + $placeholder, $dbkey ); } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index fd9707e04..4093f1c70 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -324,17 +324,13 @@ protected function buildFileContent() = $this->addEmailHelper(); // load the global placeholders - if (ArrayHelper::check($this->globalPlaceholders)) + foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder => + $gloabalValue + ) { - foreach ( - $this->globalPlaceholders as $globalPlaceholder => - $gloabalValue - ) - { - $this->fileContentStatic[$globalPlaceholder] - = $gloabalValue; - } + $this->fileContentStatic[$globalPlaceholder] = $gloabalValue; } + // reset view array $viewarray = array(); $site_edit_view_array = array(); @@ -1169,6 +1165,10 @@ protected function buildFileContent() CFactory::_('Placeholder')->active = $this->placeholders; } + // all fields stored in database + $this->fileContentStatic[Placefix::_h('ARRAY_ALL_SEARCH_FIELDS')] = + CFactory::_('Registry')->varExport('all_search_fields', 1); + // setup the layouts $this->setCustomViewLayouts(); diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 28d69846d..780981212 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -3550,6 +3550,9 @@ public static function getDynamicScripts($type, $fieldName = false) ), 'special' => array( 'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform' + ), + 'search' => array( + 'editor', 'email', 'tel', 'text', 'textarea', 'url', 'subform' ) ); @@ -6318,6 +6321,11 @@ public static function addSubmenu($submenu) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_COMPILER'), 'index.php?option=com_componentbuilder&view=compiler', $submenu === 'compiler'); } + // Access control (search.submenu). + if ($user->authorise('search.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SEARCH'), 'index.php?option=com_componentbuilder&view=search', $submenu === 'search'); + } if ($user->authorise('joomla_component.access', 'com_componentbuilder') && $user->authorise('joomla_component.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components'); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 5556dee6f..5d19974ee 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1292,6 +1292,7 @@ COM_COMPONENTBUILDER_AJAX="Ajax" COM_COMPONENTBUILDER_ALIAS="Alias" COM_COMPONENTBUILDER_ALIGNMENT="Alignment" COM_COMPONENTBUILDER_ALL="All" +COM_COMPONENTBUILDER_ALL_FOUND_INSTANCES_IN_S_WHERE_REPLACED="All found instances in %s where replaced" COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time." COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.
Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import please let us know." @@ -7759,6 +7760,7 @@ COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" COM_COMPONENTBUILDER_MODULE="Module" COM_COMPONENTBUILDER_MODULES="Modules" +COM_COMPONENTBUILDER_MORE_SOON="More soon" COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" @@ -7789,6 +7791,7 @@ COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cr COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND="No description found." COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked" COM_COMPONENTBUILDER_NO_FOUND="No Found" +COM_COMPONENTBUILDER_NO_INSTANCES_WHERE_FOUND_S="No instances where found %s" COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_NO_LANGUAGES_FOUND="No Languages Found" @@ -8138,7 +8141,15 @@ COM_COMPONENTBUILDER_RUN_EXPANSION="Run Expansion" COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved." COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another." COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_A_BGITHUB_ACCESS_TOKENB_TO_COMPONENTBUILDER_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_TO_GITHUB_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO_TO_RETRIEVE_S="%s
You can add a gitHub Access Token to Componentbuilder global options to make authenticated requests to gitHub. An access token with only public access will do to retrieve %s." +COM_COMPONENTBUILDER_SEARCH="Search" COM_COMPONENTBUILDER_SEARCHABLE="Searchable" +COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access" +COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search." +COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access" +COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC="Allows the users in this group to access the compiler button." +COM_COMPONENTBUILDER_SEARCH_DESC="JCB Search" +COM_COMPONENTBUILDER_SEARCH_SUBMENU="Search Submenu" +COM_COMPONENTBUILDER_SEARCH_SUBMENU_DESC="Allows the users in this group to submenu of Search" COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info" COM_COMPONENTBUILDER_SELECTION="selection" COM_COMPONENTBUILDER_SELECT_ADMIN_VIEW="Select Admin View" @@ -8957,6 +8968,7 @@ COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS="Placeholders" COM_COMPONENTBUILDER_SUBMENU_POWERS="Powers" +COM_COMPONENTBUILDER_SUBMENU_SEARCH="Search" COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" @@ -9100,6 +9112,7 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new sn COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time" COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!" +COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN="There has been an error please try again" COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info." COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, no view or id found in session or view not allowed to access area, we could not load any linked to values. Please inform your system administrator!" COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.
Some of these packages would require a key, since they are not free." @@ -9358,6 +9371,7 @@ COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" COM_COMPONENTBUILDER_WE_FOUND_DYNAMIC_CODE_BALL_IN_ONE_LINEB_AND_IGNORED_IT_PLEASE_REVIEW_S_FOR_MORE_DETAILS="We found dynamic code all in one line, and ignored it! Please review (%s) for more details!" +COM_COMPONENTBUILDER_WE_FOUND_SOME_INSTANCES_IN_S="We found some instances in %s" COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved %s!" COM_COMPONENTBUILDER_WHILE_WE_DOWNLOAD_ALL_TWENTY_SIX_COMPILER_GIF_ANIMATIONS_RANDOMLY_USED_IN_THE_COMPILER_GUI_DURING_COMPILATION="While we download all 26 compiler GIF animations randomly used in the compiler GUI during compilation" COM_COMPONENTBUILDER_WIKI="Wiki" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 4e7b3ff77..34b9d4815 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -963,6 +963,7 @@ COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_MENU_PLACEHOLDERS="Placeholders" COM_COMPONENTBUILDER_MENU_POWERS="Powers" +COM_COMPONENTBUILDER_MENU_SEARCH="Search" COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates" @@ -1017,6 +1018,12 @@ COM_COMPONENTBUILDER_POWERS_SUBMENU="Powers Submenu" COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of power" COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access" COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access" +COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search." +COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access" +COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC="Allows the users in this group to access the compiler button." +COM_COMPONENTBUILDER_SEARCH_SUBMENU="Search Submenu" +COM_COMPONENTBUILDER_SEARCH_SUBMENU_DESC="Allows the users in this group to submenu of Search" COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access" COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers" COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use" diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 86ab41226..9c3ce9a3e 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -14,8 +14,8 @@ use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; -use Joomla\Registry\Registry; -use VDM\Gitea\Gitea; + +use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; /** * Componentbuilder Ajax List Model @@ -3604,6 +3604,82 @@ public function getCodeGlueOptions($listfield, $joinfields, $type, $area) return false; } + // Used in search + /** + * Search for value in a table + * + * @param string $tableName The main table to search + * @param string $searchValue The value to search for + * @param int $matchCase The switch to control match case + * @param int $wholeWord The switch to control whole word + * @param int $regexSearch The switch to control regex search + * @param int $componentId The option to filter by component + * + * @return array|null + * @since 3.2.0 + **/ + public function searchTable(string $tableName, string $searchValue, + int $matchCase, int $wholeWord, int $regexSearch, int $componentId): ?array + { + // check if this is a valid table + if (SearchFactory('Table')->exist($tableName)) + { + // load the configurations + SearchFactory('Config')->table_name = $tableName; + SearchFactory('Config')->search_value = $searchValue; + SearchFactory('Config')->match_case = $matchCase; + SearchFactory('Config')->whole_word = $wholeWord; + SearchFactory('Config')->regex_search = $regexSearch; + SearchFactory('Config')->component_id = $componentId; + + if (($items = SearchFactory('Agent')->find()) !== null) + { + return ['success' => JText::sprintf('COM_COMPONENTBUILDER_WE_FOUND_SOME_INSTANCES_IN_S', $tableName), 'items' => $items]; + } + + return ['success' => JText::sprintf('COM_COMPONENTBUILDER_NO_INSTANCES_WHERE_FOUND_S', $tableName)]; + } + + return ['error' => JText::_('COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')]; + } + + /** + * Search and replace value in a table + * + * @param string $tableName The main table to search + * @param string $searchValue The value to search for + * @param string|null $replaceValue The value to replace search value + * @param int $matchCase The switch to control match case + * @param int $wholeWord The switch to control whole word + * @param int $regexSearch The switch to control regex search + * @param int $componentId The option to filter by component + * + * @return array|null + * @since 3.2.0 + **/ + public function updateTable(string $tableName, string $searchValue, ?string $replaceValue = null, + int $matchCase, int $wholeWord, int $regexSearch, int $componentId): ?array + { + // check if this is a valid table + if (SearchFactory('Table')->exist($tableName)) + { + // load the configurations + SearchFactory('Config')->table_name = $tableName; + SearchFactory('Config')->search_value = $searchValue; + SearchFactory('Config')->replace_value = $replaceValue; + SearchFactory('Config')->match_case = $matchCase; + SearchFactory('Config')->whole_word = $wholeWord; + SearchFactory('Config')->regex_search = $regexSearch; + SearchFactory('Config')->component_id = $componentId; + + SearchFactory('Agent')->replace(); + + return ['success' => JText::sprintf('COM_COMPONENTBUILDER_ALL_FOUND_INSTANCES_IN_S_WHERE_REPLACED', $tableName)]; + } + return ['error' => JText::_('COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')]; + } + + // Used in get_snippets public function getSnippets($libraries) diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 32bfb2260..59cf8a907 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -36,6 +36,7 @@ public function getIcons() $viewAccess = array( 'compiler.submenu' => 'compiler.submenu', 'compiler.dashboard_list' => 'compiler.dashboard_list', + 'search.submenu' => 'search.submenu', 'get_snippets.submenu' => 'get_snippets.submenu', 'get_snippets.dashboard_list' => 'get_snippets.dashboard_list', 'joomla_component.create' => 'joomla_component.create', diff --git a/admin/models/search.php b/admin/models/search.php new file mode 100644 index 000000000..560080af6 --- /dev/null +++ b/admin/models/search.php @@ -0,0 +1,165 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\CMS\MVC\Model\ItemModel; +use Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; + +/** + * Componentbuilder Search Item Model + */ +class ComponentbuilderModelSearch extends ItemModel +{ + /** + * Model context string. + * + * @var string + */ + protected $_context = 'com_componentbuilder.search'; + + /** + * Model user data. + * + * @var strings + */ + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; + protected $app; + protected $input; + protected $uikitComp; + + /** + * @var object item + */ + protected $item; + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @since 1.6 + * + * @return void + */ + protected function populateState() + { + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + // Get the item main id + $id = $this->input->getInt('id', null); + $this->setState('search.id', $id); + + // Load the parameters. + parent::populateState(); + } + + /** + * Method to get article data. + * + * @param integer $pk The id of the article. + * + * @return mixed Menu item data object on success, false on failure. + */ + public function getItem($pk = null) + { + $this->user = JFactory::getUser(); + // check if this user has permission to access item + if (!$this->user->authorise('search.access', 'com_componentbuilder')) + { + $app = JFactory::getApplication(); + $app->enqueueMessage(JText::_('Not authorised!'), 'error'); + // redirect away if not a correct to cPanel/default view + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; + + $pk = (!empty($pk)) ? $pk : (int) $this->getState('search.id'); + + $pk = $this->userId; + + if ($this->_item === null) + { + $this->_item = array(); + } + + if (!isset($this->_item[$pk])) + { + try + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Get data + // load the tables and components (soon) + $data = ['tables' => SearchFactory::_('Table')->tables(), 'components' => null]; + + + if (empty($data)) + { + $app = JFactory::getApplication(); + // If no data is found redirect to default page and show warning. + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + + // set data object to item. + $this->_item[$pk] = $data; + } + catch (Exception $e) + { + if ($e->getCode() == 404) + { + // Need to go thru the error handler to allow Redirect to work. + JError::raiseWarning(404, $e->getMessage()); + } + else + { + $this->setError($e); + $this->_item[$pk] = false; + } + } + } + + return $this->_item[$pk]; + } + + /** + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ + public function getUikitComp() + { + if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp)) + { + return $this->uikitComp; + } + return false; + } +} diff --git a/admin/views/search/index.html b/admin/views/search/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/search/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/search/tmpl/default.php b/admin/views/search/tmpl/default.php new file mode 100644 index 000000000..d28ecae59 --- /dev/null +++ b/admin/views/search/tmpl/default.php @@ -0,0 +1,52 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.formvalidator'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +?> +canDo->get('search.access')): ?> + +item->id)) ? '&id='. (int) $this->item->id : ''; ?> +
+ +sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + +
+ + + + +

+ + diff --git a/admin/views/search/tmpl/index.html b/admin/views/search/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/search/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/search/view.html.php b/admin/views/search/view.html.php new file mode 100644 index 000000000..551d3d701 --- /dev/null +++ b/admin/views/search/view.html.php @@ -0,0 +1,150 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\CMS\MVC\View\HtmlView; + +/** + * Componentbuilder Html View class for the Search + */ +class ComponentbuilderViewSearch extends HtmlView +{ + // Overwriting JView display method + function display($tpl = null) + { + // get component params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // get the application + $this->app = JFactory::getApplication(); + // get the user object + $this->user = JFactory::getUser(); + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('search'); + // Initialise variables. + $this->item = $this->get('Item'); + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('search'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=search'); + $this->sidebar = JHtmlSidebar::render(); + } + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + // add the tool bar + $this->addToolBar(); + } + + // set the document + $this->setDocument(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode(PHP_EOL, $errors), 500); + } + + parent::display($tpl); + } + + /** + * Prepares the document + */ + protected function setDocument() + { + + // always make sure jquery is loaded. + JHtml::_('jquery.framework'); + // Load the header checker class. + require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' ); + // Initialize the header checker. + $HeaderCheck = new componentbuilderHeaderCheck; + + // Load uikit options. + $uikit = $this->params->get('uikit_load'); + // Set script size. + $size = $this->params->get('uikit_min'); + // Set css style. + $style = $this->params->get('uikit_style'); + + // The uikit css. + if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + JHtml::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']); + } + // The uikit js. + if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + JHtml::_('script', 'media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); + } + // add the document default css file + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/search.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + // hide the main menu + $this->app->input->set('hidemainmenu', true); + // set the title + if (isset($this->item->name) && $this->item->name) + { + $title = $this->item->name; + } + // Check for empty title and add view name if param is set + if (empty($title)) + { + $title = JText::_('COM_COMPONENTBUILDER_SEARCH'); + } + // add title to the page + JToolbarHelper::title($title,'search'); + // add cpanel button + JToolBarHelper::custom('search.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false); + if ($this->canDo->get('search.compiler')) + { + // add Compiler button. + JToolBarHelper::custom('search.openCompiler', 'cogs custom-button-opencompiler', '', 'COM_COMPONENTBUILDER_COMPILER', false); + } + + // set help url for this view if found + $this->help_url = ComponentbuilderHelper::getHelpUrl('search'); + if (ComponentbuilderHelper::checkString($this->help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } +} +?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 225f932f2..522cc8fa3 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 10th September, 2022 + 14th September, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io @@ -74,6 +74,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo COM_COMPONENTBUILDER_MENU_COMPILER + COM_COMPONENTBUILDER_MENU_SEARCH COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS COM_COMPONENTBUILDER_MENU_JOOMLA_MODULES COM_COMPONENTBUILDER_MENU_JOOMLA_PLUGINS diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php new file mode 100644 index 000000000..596296a9f --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php @@ -0,0 +1,131 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder; + + +use Joomla\Registry\Registry; +use Joomla\CMS\Factory; +use Joomla\Input\Input; +use VDM\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\String\ClassfunctionHelper; + + +/** + * Configurations + * + * @since 3.2.0 + */ +abstract class BaseConfig extends Registry +{ + /** + * Hold a JInput object for easier access to the input variables. + * + * @var Input + * @since 3.2.0 + */ + protected $input; + + /** + * The Params + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $params; + + /** + * Constructor + * + * @param Input|null $input Input + * @param Registry|null $params The component parameters + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Input $input = null, ?Registry $params = null) + { + $this->input = $input ?: Factory::getApplication()->input; + $this->params = $params ?: Helper::getParams('com_componentbuilder'); + + // use underscore as the separator + $this->separator = '_'; + + // Instantiate the internal data object. + $this->data = new \stdClass(); + } + + /** + * setting any config value + * + * @param String $key The value's key/path name + * @param mixed $value Optional default value, returned if the internal value is null. + * + * @since 3.2.0 + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * getting any valid value + * + * @param String $key The value's key/path name + * + * @since 3.2.0 + * @throws \InvalidArgumentException If $key is not a valid function name. + */ + public function __get($key) + { + // check if it has been set + if (($value = $this->get($key, '__N0T_S3T_Y3T_')) !== '__N0T_S3T_Y3T_') + { + return $value; + } + + throw new \InvalidArgumentException(sprintf('Argument %s could not be found as function [%s], or path.', $key, $method)); + } + + /** + * Get a config value. + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * @param mixed $default Optional default value, returned if the internal value is null. + * + * @return mixed Value of entry or null + * + * @since 3.2.0 + */ + public function get($path, $default = null) + { + // function name with no underscores + $method = 'get' . ucfirst(ClassfunctionHelper::safe(str_replace('_', '', $path))); + + // check if it has been set + if (($value = parent::get($path, '__N0T_S3T_Y3T_')) !== '__N0T_S3T_Y3T_') + { + return $value; + } + elseif (method_exists($this, $method)) + { + $value = $this->{$method}(); + + $this->set($path, $value); + + return $value; + } + + return $default; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php index 7cd6a1281..69552cc9a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php @@ -71,11 +71,11 @@ public function __construct(?Config $config = null, ?\JDatabaseDriver $db = null /** * get all System Placeholders * - * @return array The global placeholders + * @return array The global placeholders * * @since 3.2.0 */ - public function get() + public function get(): array { // set only once if (is_array($this->placeholders)) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index c1c5a3f05..340a58df5 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -12,13 +12,9 @@ namespace VDM\Joomla\Componentbuilder\Compiler; -use Joomla\Registry\Registry; -use Joomla\CMS\Factory; -use Joomla\Input\Input; -use VDM\Joomla\Utilities\Component\Helper; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\String\ClassfunctionHelper; +use VDM\Joomla\Componentbuilder\BaseConfig; /** @@ -26,119 +22,8 @@ * * @since 3.2.0 */ -class Config extends Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable +class Config extends BaseConfig { - /** - * Hold a JInput object for easier access to the input variables. - * - * @var Input - * @since 3.2.0 - */ - protected $input; - - /** - * The Params - * - * @var Registry - * @since 3.2.0 - */ - protected Registry $params; - - /** - * Constructor - * - * @param Input|null $input Input - * @param Registry|null $params The component parameters - * - * @throws \Exception - * @since 3.2.0 - */ - public function __construct(?Input $input = null, ?Registry $params = null) - { - $this->input = $input ?: Factory::getApplication()->input; - $this->params = $params ?: Helper::getParams('com_componentbuilder'); - - // use underscore as the separator - $this->separator = '_'; - - // Instantiate the internal data object. - $this->data = new \stdClass(); - } - - /** - * setting any config value - * - * @param String $key The value's key/path name - * @param mixed $value Optional default value, returned if the internal value is null. - * - * @since 3.2.0 - */ - public function __set($key, $value) - { - $this->set($key, $value); - } - - /** - * getting any valid value - * - * @param String $key The value's key/path name - * - * @since 3.2.0 - * @throws \InvalidArgumentException If $key is not a valid function name. - */ - public function __get($key) - { - // function name with no underscores - $method = 'get' . ucfirst(ClassfunctionHelper::safe(str_replace('_', '', $key))); - - if (($value = $this->get($key, '__N0T_S3T_')) !== '__N0T_S3T_') - { - return $value; - } - elseif (method_exists($this, $method)) - { - $value = $this->{$method}(); - - $this->set($key, $value); - - return $value; - } - - throw new \InvalidArgumentException(sprintf('Argument %s could not be found as function [%s], or path.', $key, $method)); - } - - /** - * Get a registry value. - * - * @param string $path Registry path (e.g. joomla.content.showauthor) - * @param mixed $default Optional default value, returned if the internal value is null. - * - * @return mixed Value of entry or null - * - * @since 3.2.0 - */ - public function get($path, $default = null) - { - // function name with no underscores - $method = 'get' . ucfirst(ClassfunctionHelper::safe(str_replace('_', '', $path))); - - // check if it has been set - if (($value = parent::get($path, '__N0T_S3T_Y3T_')) !== '__N0T_S3T_Y3T_') - { - return $value; - } - elseif (method_exists($this, $method)) - { - $value = $this->{$method}(); - - $this->set($path, $value); - - return $value; - } - - return $default; - } - /** * get posted component id * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php index c90737faa..062d30449 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Component/PlaceholderInterface.php @@ -26,6 +26,6 @@ interface PlaceholderInterface * * @since 3.2.0 */ - public function get(); + public function get(): array; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php index 5e188777d..484e49e70 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php @@ -13,6 +13,7 @@ use Joomla\Registry\Registry as JoomlaRegistry; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; /** @@ -24,6 +25,14 @@ */ class Registry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable { + /** + * Default indentation value + * + * @var int + * @since 1.0 + */ + protected $indent = 2; + /** * Method to iterate over any part of the registry * @@ -43,6 +52,73 @@ public function _($path) } return $data->getIterator(); - } + } + + /** + * Method to export a set of values to a PHP array + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * @param int $default The default indentation + * + * @return ?string The var set being exported as a PHP array + * + * @since 3.4.0 + */ + public function varExport(string $path, int $default = 2): ?string + { + // check if we have data + if (($data = $this->extract($path)) !== null) + { + // set the default indentation value + $this->indent = $default; + + // convert to array + $data = $data->toArray(); + + // convert to string + $data = var_export($data, true); + + // replace all space with system indentation + $data = preg_replace_callback("/^(\s{2})(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(\s{2})?(.*)/m", [$this, 'convertIndent'], $data); + + // convert all array to [] + $array = preg_split("/\r\n|\n|\r/", $data); + $array = preg_replace(["/\s*array\s\($/", "/\)(,)?$/", "/\s=>\s$/"], [NULL, ']$1', ' => ['], $array); + $data = join(PHP_EOL, array_filter(["["] + $array)); + + // add needed indentation to the last ] + $data = preg_replace("/^(\])/m", Indent::_($default) . '$1', $data); + + return $data; + } + return null; + } + + /** + * Method to convert found of grouped spaces to system indentation + * + * @param array $matches The regex array of matching values + * + * @return string The resulting string. + * + * @since 3.4.0 + */ + protected function convertIndent(array $matches): string + { + // set number to indent by default + $indent = Indent::_($this->indent); + + // update each found space (group) with one indentation + foreach (range(1, 11) as $space) + { + if (strlen($matches[$space]) > 0) + { + $indent .= Indent::_(1); + } + } + + return $indent . $matches[12]; + } + } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php index 3182fa113..32a6edc76 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php @@ -44,9 +44,9 @@ public static function fix(&$values, $targets = array()) { foreach ($targets as $target) { - if (isset($values[$target]) && strpos($values[$target], '\\') !== false) + if (isset($values[$target])) { - $values[$target] = str_replace('\\', '/', $values[$target]); + self::fix($values[$target], $targets); } } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php new file mode 100644 index 000000000..34a5b8c5b --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php @@ -0,0 +1,170 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search; + + +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Database\Get; +use VDM\Joomla\Componentbuilder\Search\Database\Set; +use VDM\Joomla\Componentbuilder\Search\Agent\Find; +use VDM\Joomla\Componentbuilder\Search\Agent\Replace; +use VDM\Joomla\Componentbuilder\Search\Agent\Search; + + +/** + * Search Agent + * + * @since 3.2.0 + */ +class Agent +{ + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Search Get Database + * + * @var Get + * @since 3.2.0 + */ + protected Get $get; + + /** + * Search Set Database + * + * @var Set + * @since 3.2.0 + */ + protected Set $set; + + /** + * Search Find + * + * @var Find + * @since 3.2.0 + */ + protected Find $find; + + /** + * Search Replace + * + * @var Replace + * @since 3.2.0 + */ + protected Replace $replace; + + /** + * Search + * + * @var Search + * @since 3.2.0 + */ + protected Search $search; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Get|null $get The search get database object. + * @param Set|null $set The search get database object. + * @param Find|null $find The search find object. + * @param Replace|null $replace The search replace object. + * @param Search|null $search The search object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Get $get = null, + ?Set$set = null, ?Find $find = null, ?Replace $replace = null, + ?Search $search = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->get = $get ?: Factory::_('Get.Database'); + $this->set = $set ?: Factory::_('Set.Database'); + $this->find = $find ?: Factory::_('Agent.Find'); + $this->replace = $replace ?: Factory::_('Agent.Replace'); + $this->search = $search ?: Factory::_('Agent.Search'); + } + + /** + * Search the posted table for the search value and return all + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function find(?string $table = null): ?array + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + $set = 1; + + // continue loading items until all are searched + while(($items = $this->get->items($table, $set)) !== null) + { + $this->find->items($items, $table); + $set++; + } + + return $this->search->found($table); + } + + /** + * Search the posted table for the search value, and replace all + * + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function replace(?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + $set = 1; + + // continue loading items until all was loaded + while(($items = $this->get->items($table, $set)) !== null) + { + // search for items + $this->find->items($items, $table); + + // update those found + $this->replace->items($this->find->get($table), $table); + + // update the database + $this->set->items($this->replace->get($table), $table); + + // reset found items + $this->find->reset($table); + $this->replace->reset($table); + + $set++; + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Find.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Find.php new file mode 100644 index 000000000..9c3e4d5fd --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Find.php @@ -0,0 +1,180 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Agent; + + +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Agent\Search; +use VDM\Joomla\Componentbuilder\Search\Interfaces\FindInterface; + + +/** + * Search Agent Find + * + * @since 3.2.0 + */ +class Find implements FindInterface +{ + /** + * Found Values + * + * @var array + * @since 3.2.0 + */ + protected array $found = []; + + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Search + * + * @var Search + * @since 3.2.0 + */ + protected Search $search; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Search|null $search The search object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Search $search = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->search = $search ?: Factory::_('Agent.Search'); + } + + /** + * Get found values + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function get(?string $table = null): ?array + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (isset($this->found[$table])) + { + return $this->found[$table]; + } + + return null; + } + + /** + * Search over an item fields + * + * @param object $item The item object of fields to search through + * @param int|null $id The item id + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function item(object $item, ?int $id =null, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // set the item id + if (empty($id)) + { + $id = $item->id; + } + + if (ObjectHelper::check($item)) + { + foreach ($item as $field => $value) + { + if ($field !== 'id' && $this->search->value($value, $id, $field, $table)) + { + if (empty($this->found[$table][$id])) + { + $this->found[$table][$id] = new \stdClass(); + $this->found[$table][$id]->id = $id; + } + $this->found[$table][$id]->{$field} = $value; + } + } + } + } + + /** + * Search over an array of items + * + * @param array|null $items The array of items to search through + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (ArrayHelper::check($items)) + { + foreach ($items as $id => $item) + { + $this->item($item, $id, $table); + } + } + } + + /** + * Reset all found values of a table + * + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function reset(?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // empty or unset the table active values + unset($this->found[$table]); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Replace.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Replace.php new file mode 100644 index 000000000..c0de189bf --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Replace.php @@ -0,0 +1,181 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Agent; + + +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Agent\Update; +use VDM\Joomla\Componentbuilder\Search\Interfaces\ReplaceInterface; + + +/** + * Search Agent Replace + * + * @since 3.2.0 + */ +class Replace implements ReplaceInterface +{ + /** + * Updated Values + * + * @var array + * @since 3.2.0 + */ + protected array $updated = []; + + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Update + * + * @var Update + * @since 3.2.0 + */ + protected Update $update; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Update|null $update The update object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Update $update = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->update = $update ?: Factory::_('Agent.Update'); + } + + /** + * Get updated values + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function get(?string $table = null): ?array + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (isset($this->updated[$table])) + { + return $this->updated[$table]; + } + + return null; + } + + /** + * Search over an item fields + * + * @param object $item The item object of fields to search through + * @param int|null $id The item id + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function item(object $item, ?int $id =null, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // set the item id + if (empty($id)) + { + $id = $item->id; + } + + if (ObjectHelper::check($item)) + { + foreach ($item as $field => $value) + { + if ($field !== 'id' && ($_value = $this->update->value($value, $id, $field, $table)) !== null) + { + if (empty($this->updated[$table][$id])) + { + $this->updated[$table][$id] = new \stdClass(); + $this->updated[$table][$id]->id = $id; + } + // add updated value + $this->updated[$table][$id]->{$field} = $_value; + } + } + } + } + + /** + * Search over an array of items + * + * @param array|null $items The array of items to search through + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (ArrayHelper::check($items)) + { + foreach ($items as $id => $item) + { + $this->item($item, $id, $table); + } + } + } + + /** + * Reset all updated values of a table + * + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function reset(?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // empty or unset the table active values + unset($this->updated[$table]); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Search.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Search.php new file mode 100644 index 000000000..3aac163b5 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Search.php @@ -0,0 +1,74 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Agent; + + +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; + + +/** + * Search Agent Search + * + * @since 3.2.0 + */ +class Search +{ + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Table|null $table The search table object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Table $table = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->table = $table ?: Factory::_('Table'); + } + + /** + * Search inside a value + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function value($value, int $id, string $field, ?string $table = null): bool + { + return true; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Update.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Update.php new file mode 100644 index 000000000..b253e4bbd --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/Update.php @@ -0,0 +1,74 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Agent; + + +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; + + +/** + * Search Agent Update + * + * @since 3.2.0 + */ +class Update +{ + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Table|null $table The search table object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Table $table = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->table = $table ?: Factory::_('Table'); + } + + /** + * Update value + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, int $id, string $field, ?string $table = null) + { + return $value; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php new file mode 100644 index 000000000..83e423980 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php @@ -0,0 +1,125 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search; + + +use VDM\Joomla\Componentbuilder\BaseConfig; + + +/** + * Search Configurations + * + * @since 3.2.0 + */ +class Config extends BaseConfig +{ + /** + * get posted search value + * + * @return string Raw search value + * @since 3.2.0 + */ + protected function getSearchvalue(): string + { + return $this->input->post->get('search_value', null, 'RAW'); + } + + /** + * get posted replace value + * + * @return string Raw replace value + * @since 3.2.0 + */ + protected function getReplacevalue(): string + { + return $this->input->post->get('replace_value', null, 'RAW'); + } + + /** + * get posted search match case + * + * @return int Match case + * @since 3.2.0 + */ + protected function getMatchcase(): int + { + return $this->input->post->get('match_case', 0, 'INT'); + } + + /** + * get posted search whole word + * + * @return int Whole word + * @since 3.2.0 + */ + protected function getWholeword(): int + { + return $this->input->post->get('whole_word', 0, 'INT'); + } + + /** + * get posted search regex + * + * @return int Regex + * @since 3.2.0 + */ + protected function getRegex(): int + { + return $this->input->post->get('regex_search', 0, 'INT'); + } + + /** + * get posted component + * + * @return int Component ID + * @since 3.2.0 + */ + protected function getComponentid(): int + { + return $this->input->post->get('component_id', 0, 'INT'); + } + + /** + * get posted area/table + * + * @return string Table name + * @since 3.2.0 + */ + protected function getTablename(): string + { + return $this->input->post->get('table_name', null, 'word'); + } + + /** + * get posted field + * + * @return string Field name + * @since 3.2.0 + */ + protected function getFieldname(): string + { + return $this->input->post->get('field_name', null, 'word'); + } + + /** + * get posted item id + * + * @return int Item id + * @since 3.2.0 + */ + protected function getItemid(): int + { + return $this->input->post->get('item_id', 0, 'INT'); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php new file mode 100644 index 000000000..d84927f53 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php @@ -0,0 +1,295 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Database; + + +use Joomla\CMS\Factory as JoomlaFactory; +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; +use VDM\Joomla\Componentbuilder\Search\Model\Get as Model; +use VDM\Joomla\Componentbuilder\Search\Interfaces\GetInterface; + + +/** + * Search Database Get + * + * @since 3.2.0 + */ +class Get implements GetInterface +{ + /** + * Bundle Size + * + * @var int + * @since 3.2.0 + */ + protected int $bundle = 300; + + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Search Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Search Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database object to query local DB + * + * @var \JDatabaseDriver + * @since 3.2.0 + **/ + protected \JDatabaseDriver $db; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Table|null $table The search table object. + * @param Model|null $model The search get model object. + * @param \JDatabaseDriver|null $db The database object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Table $table = null, + ?Model $model = null, ?\JDatabaseDriver $db = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->table = $table ?: Factory::_('Table'); + $this->model = $model ?: Factory::_('Get.Model'); + $this->db = $db ?: JoomlaFactory::getDbo(); + } + + /** + * Get values from a given table + * Example: $this->value(23, 'value_key', 'table_name'); + * + * @param string $field The field key + * @param int $id The item ID + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value(string $field, int $id, string $table = null) + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid field and table + if ($id > 0 && ($name = $this->table->get($table, $field, 'name')) !== null) + { + // Create a new query object. + $query = $this->db->getQuery(true); + + // Order it by the ordering field. + $query->select($name); + $query->from($this->db->quoteName('#__componentbuilder_' . $table)); + + // get by id + $query->where($this->db->quoteName('id') . " = " . $id); + + // Reset the query using our newly populated query object. + $this->db->setQuery($query); + $this->db->execute(); + + // check if we have any values + if ($this->db->getNumRows()) + { + // return found values + return $this->model->value($this->db->loadResult(), $name, $table); + } + } + return null; + } + + /** + * Get values from a given table + * Example: $this->item(23, 'table_name'); + * + * @param int $id The item ID + * @param string| null $table The table + * + * @return object|null + * @since 3.2.0 + */ + public function item(int $id, string $table = null): ?object + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if ($id > 0 && ($fields = $this->table->fields($table)) !== null) + { + // add the ID + array_unshift($fields , 'id'); + + // Create a new query object. + $query = $this->db->getQuery(true); + + // Order it by the ordering field. + $query->select($this->db->quoteName($fields)); + $query->from($this->db->quoteName('#__componentbuilder_' . $table)); + + // get by id + $query->where($this->db->quoteName('id') . " = " . $id); + + // Reset the query using our newly populated query object. + $this->db->setQuery($query); + $this->db->execute(); + + // check if we have any values + if ($this->db->getNumRows()) + { + // return found values + return $this->model->item($this->db->loadObject(), $table); + } + } + return null; + } + + /** + * Get values from a given table + * Example: $this->items('table_name'); + * + * @param string|null $table The table + * @param int $bundle The bundle to return (0 = all) + * + * @return array|null + * @since 3.2.0 + */ + public function items(string $table = null, int $bundle = 0): ?array + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (($fields = $this->table->fields($table)) !== null) + { + // add the ID + array_unshift($fields , 'id'); + + // get the title value + $title = $this->table->titleName($table); + + // Create a new query object. + $query = $this->db->getQuery(true); + + // Order it by the ordering field. + $query->select($this->db->quoteName($fields)); + $query->from($this->db->quoteName('#__componentbuilder_' . $table)); + $query->order($title .' ASC'); + + // add limitation and pagination + if ($bundle > 0) + { + // get the incremental number + $query->where($this->db->quoteName('id') . " >= " . $this->next($table, $bundle)); + + // only return a limited number + $query->setLimit($this->bundle); + } + + // Reset the query using our newly populated query object. + $this->db->setQuery($query); + $this->db->execute(); + + // check if we have any values + if ($this->db->getNumRows()) + { + // return found values + return $this->model->items($this->db->loadObjectList('id'), $table); + } + } + return null; + } + + /** + * Get next id to call + * + * @param string $table The table + * @param int $bundle The bundle to return + * + * @return int + * @since 3.2.0 + */ + protected function next(string $table, int $bundle): int + { + if ($bundle == 1 || $bundle == 0) + { + return 1; + } + + if (($number = $this->model->last($table)) !== null) + { + return $number + 1; + } + + return $this->incremental($bundle); + } + + /** + * Get Incremental number where the set starts + * + * @param int $bundle The bundle to return + * + * @return int + * @since 3.2.0 + */ + protected function incremental(int $bundle): int + { + // just in case + if ($bundle == 1 || $bundle == 0) + { + return 1; + } + + /** Number two set starts at 301 + * 2 x 300 = 600 + * 600 - 300 = 300 + * 300 + 1 = 301 <-- + * Number five set starts at 1201 + * 5 x 300 = 1500 + * 1500 - 300 = 1200 + * 1200 + 1 = 1201 <-- + **/ + return (($bundle * $this->bundle) - $this->bundle) + 1; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Set.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Set.php new file mode 100644 index 000000000..8afa6201d --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Set.php @@ -0,0 +1,187 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Database; + + +use Joomla\CMS\Factory as JoomlaFactory; +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; +use VDM\Joomla\Componentbuilder\Search\Model\Set as Model; +use VDM\Joomla\Componentbuilder\Search\Interfaces\SetInterface; + + +/** + * Search Database Set + * + * @since 3.2.0 + */ +class Set implements SetInterface +{ + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Search Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Search Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database object to query local DB + * + * @var \JDatabaseDriver + * @since 3.2.0 + **/ + protected \JDatabaseDriver $db; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Table|null $table The search table object. + * @param Model|null $model The search get model object. + * @param \JDatabaseDriver|null $db The database object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Table $table = null, + ?Model $model = null, ?\JDatabaseDriver $db = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->table = $table ?: Factory::_('Table'); + $this->model = $model ?: Factory::_('Set.Model'); + $this->db = $db ?: JoomlaFactory::getDbo(); + } + + /** + * Set values to a given table + * Example: $this->value(Value, 23, 'value_key', 'table_name'); + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function value($value, int $id, string $field, ?string $table = null): bool + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid field and table + if ($id > 0 && ($name = $this->table->get($table, $field, 'name')) !== null) + { + // build the object + $item = new \stdClass(); + $item->id = $id; + $item->{$name} = $this->model->value($value, $name, $table); + + // Update the column of this table using id as the primary key. + return $this->db->updateObject('#__componentbuilder_' . $table, $item, 'id'); + } + return false; + } + + /** + * Set values to a given table + * Example: $this->item(Object, 23, 'table_name'); + * + * @param object $item The item to save + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, ?string $table = null): bool + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (($fields = $this->table->fields($table)) !== null) + { + // model the item values + foreach ($fields as $field) + { + if (isset($item->{$field})) + { + $item->{$field} = $this->model->value($item->{$field}, $field, $table); + } + } + + // Update the column of this table using id as the primary key. + return $this->db->updateObject('#__componentbuilder_' . $table, $item, 'id'); + } + return false; + } + + /** + * Set values to a given table + * Example: $this->items(Array, 'table_name'); + * + * @param array $items The items being saved + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function items(array $items, string $table = null): bool + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (ArrayHelper::check($items)) + { + $success = true; + foreach ($items as $item) + { + if ($this->item($item, $table) !== true) + { + $success = false; + break; + } + } + return $success; + } + return false; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php new file mode 100644 index 000000000..8f712414b --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php @@ -0,0 +1,80 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search; + + +use Joomla\DI\Container; + + +/** + * Search Factory + * + * @since 3.2.0 + */ +abstract class Factory +{ + /** + * Global Compiler Container + * + * @var Container + * @since 3.2.0 + **/ + protected static $container = null; + + /** + * Get any class from the compiler container + * + * @param string $key The container class key + * + * @return Mixed + * @since 3.2.0 + */ + public static function _($key) + { + return self::getContainer()->get($key); + } + + /** + * Get a the global compiler container + * + * @return Container + * @since 3.2.0 + */ + public static function getContainer(): Container + { + if (!self::$container) + { + self::$container = self::createContainer(); + } + + return self::$container; + } + + /** + * Create a container object + * + * @return Container + * @since 3.2.0 + */ + protected static function createContainer(): Container + { + $container = (new Container()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Search()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Model()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Database()) + ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Agent()); + + return $container; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/FindInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/FindInterface.php new file mode 100644 index 000000000..d8bca4d6b --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/FindInterface.php @@ -0,0 +1,65 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Interfaces; + + +/** + * Search Find Interface + * + * @since 3.2.0 + */ +interface FindInterface +{ + /** + * Get found values + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function get(?string $table = null): ?array; + + /** + * Search over an item fields + * + * @param object $item The item object of fields to search through + * @param int|null $id The item id + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function item(object $item, ?int $id =null, ?string $table = null); + + /** + * Search over an array of items + * + * @param array|null $items The array of items to search through + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null); + + /** + * Reset all found values of a table + * + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function reset(?string $table = null); +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php new file mode 100644 index 000000000..d02daeef1 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php @@ -0,0 +1,60 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Interfaces; + + +/** + * Search Database Get Interface + * + * @since 3.2.0 + */ +interface GetInterface +{ + /** + * Get values from a given table + * Example: $this->value(23, 'value_key', 'table_name'); + * + * @param string $field The field key + * @param int $id The item ID + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value(string $field, int $id, string $table = null); + + /** + * Get values from a given table + * Example: $this->item(23, 'table_name'); + * + * @param int $id The item ID + * @param string| null $table The table + * + * @return object|null + * @since 3.2.0 + */ + public function item(int $id, string $table = null): ?object; + + /** + * Get values from a given table + * Example: $this->items('table_name'); + * + * @param string|null $table The table + * @param int $bundle The bundle to return (0 = all) + * + * @return array|null + * @since 3.2.0 + */ + public function items(string $table = null, int $bundle = 0): ?array; + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ModelInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ModelInterface.php new file mode 100644 index 000000000..c0aa6a2a2 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ModelInterface.php @@ -0,0 +1,71 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Interfaces; + + +/** + * Search Model Interface + * + * @since 3.2.0 + */ +interface ModelInterface +{ + /** + * Model the value + * Example: $this->value(value, 'value_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null); + + /** + * Model the values of an item + * Example: $this->item('table_name', Object); + * + * @param string $table The table + * @param object $item The item object + * + * @return object + * @since 3.2.0 + */ + public function item(object $item, ?string $table = null): object; + + /** + * Model the values of multiple items + * Example: $this->items(Array, 'table_name'); + * + * @param array|null $items The array of item objects + * @param string|null $table The table + * + * @return array|null + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null): ?array; + + /** + * Get last modeled ID + * Example: $this->last('table_name'); + * + * @param string|null $table The table + * + * @return int|null + * @since 3.2.0 + */ + public function last(?string $table = null): ?int; + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ReplaceInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ReplaceInterface.php new file mode 100644 index 000000000..bb619f2cf --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/ReplaceInterface.php @@ -0,0 +1,66 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Interfaces; + + +/** + * Search Replace Interface + * + * @since 3.2.0 + */ +interface ReplaceInterface +{ + /** + * Get updated values + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function get(?string $table = null): ?array; + + /** + * Search over an item fields + * + * @param object $item The item object of fields to search through + * @param int|null $id The item id + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function item(object $item, ?int $id =null, ?string $table = null); + + /** + * Search over an array of items + * + * @param array|null $items The array of items to search through + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null); + + /** + * Reset all updated values of a table + * + * @param string|null $table The table being searched + * + * @return void + * @since 3.2.0 + */ + public function reset(?string $table = null); + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SetInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SetInterface.php new file mode 100644 index 000000000..f8a62ee82 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SetInterface.php @@ -0,0 +1,60 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Interfaces; + + +/** + * Search Database Set Interface + * + * @since 3.2.0 + */ +interface SetInterface +{ + /** + * Set values to a given table + * Example: $this->value(Value, 23, 'value_key', 'table_name'); + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function value($value, int $id, string $field, ?string $table = null): bool; + + /** + * Set values to a given table + * Example: $this->item(Object, 23, 'table_name'); + * + * @param object $item The item to save + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, ?string $table = null): bool; + + /** + * Set values to a given table + * Example: $this->items(Array, 'table_name'); + * + * @param array $items The items being saved + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function items(array $items, string $table = null): bool; +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php new file mode 100644 index 000000000..7e5cc2984 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php @@ -0,0 +1,160 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search; + + +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; +use VDM\Joomla\Utilities\ArrayHelper; + + +/** + * Search Model + * + * @since 3.2.0 + */ +abstract class Model +{ + /** + * Last ID + * + * @var array + * @since 3.2.0 + */ + protected array $last; + + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Search Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * @param Table|null $table The search table object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Table $table = null) + { + $this->config = $config ?: Factory::_('Config'); + $this->table = $table ?: Factory::_('Table'); + } + + /** + * Model the values of an item + * Example: $this->item(Object, 'table_name'); + * + * @param object $item The item object + * @param string|null $table The table + * + * @return object + * @since 3.2.0 + */ + public function item(object $item, ?string $table = null): object + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (($fields = $this->table->fields($table)) !== null) + { + foreach ($fields as $field) + { + if(isset($item->{$field})) + { + $item->{$field} = $this->value($item->{$field}, $field, $table); + } + } + } + + return $item; + } + + /** + * Model the values of multiple items + * Example: $this->items(Array, 'table_name'); + * + * @param array|null $items The array of item objects + * @param string|null $table The table + * + * @return array|null + * @since 3.2.0 + */ + public function items(?array $items = null, ?string $table = null): ?array + { + // check if this is a valid table + if (ArrayHelper::check($items)) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + foreach ($items as $id => &$item) + { + // model the item + $item = $this->item($item, $table); + + // add the last ID + $this->last[$table] = $item->id; + } + } + + return $items; + } + + /** + * Get last modeled ID + * Example: $this->last('table_name'); + * + * @param string|null $table The table + * + * @return int|null + * @since 3.2.0 + */ + public function last(?string $table = null): ?int + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if ($table && isset($this->last[$table])) + { + return $this->last[$table]; + } + + return null; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php new file mode 100644 index 000000000..4f5b3d756 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php @@ -0,0 +1,63 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Model; + + +use VDM\Joomla\Componentbuilder\Search\Interfaces\ModelInterface; +use VDM\Joomla\Componentbuilder\Search\Model; + + +/** + * Search Get Model + * + * @since 3.2.0 + */ +class Get extends Model implements ModelInterface +{ + /** + * Model the value + * Example: $this->value(value, 'value_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = \base64_decode($value); + break; + case 'json': + $value = \json_decode($value, true); + break; + } + } + return $value; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php new file mode 100644 index 000000000..274f0e897 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php @@ -0,0 +1,63 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Model; + + +use VDM\Joomla\Componentbuilder\Search\Interfaces\ModelInterface; +use VDM\Joomla\Componentbuilder\Search\Model; + + +/** + * Search Set Model + * + * @since 3.2.0 + */ +class Set extends Model implements ModelInterface +{ + /** + * Model the value + * Example: $this->value(value, 'field_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = \base64_encode($value); + break; + case 'json': + $value = \json_encode($value, JSON_FORCE_OBJECT); + break; + } + } + return $value; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php new file mode 100644 index 000000000..d487ab809 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php @@ -0,0 +1,142 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Search\Agent as SearchAgent; +use VDM\Joomla\Componentbuilder\Search\Agent\Find; +use VDM\Joomla\Componentbuilder\Search\Agent\Replace; +use VDM\Joomla\Componentbuilder\Search\Agent\Search; +use VDM\Joomla\Componentbuilder\Search\Agent\Update; + + +/** + * Agent Service Provider + * + * @since 3.2.0 + */ +class Agent implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(SearchAgent::class, 'Agent') + ->share('Agent', [$this, 'getAgent'], true); + + $container->alias(Find::class, 'Agent.Find') + ->share('Agent.Find', [$this, 'getFind'], true); + + $container->alias(Replace::class, 'Agent.Replace') + ->share('Agent.Replace', [$this, 'getReplace'], true); + + $container->alias(Search::class, 'Agent.Search') + ->share('Agent.Search', [$this, 'getSearch'], true); + + $container->alias(Update::class, 'Agent.Update') + ->share('Agent.Update', [$this, 'getUpdate'], true); + } + + /** + * Get the Search Agent + * + * @param Container $container The DI container. + * + * @return SearchAgent + * @since 3.2.0 + */ + public function getAgent(Container $container): SearchAgent + { + return new SearchAgent( + $container->get('Config'), + $container->get('Get.Database'), + $container->get('Set.Database'), + $container->get('Agent.Find'), + $container->get('Agent.Replace'), + $container->get('Agent.Search') + ); + } + + /** + * Get the Search Agent Find + * + * @param Container $container The DI container. + * + * @return Find + * @since 3.2.0 + */ + public function getFind(Container $container): Find + { + return new Find( + $container->get('Config'), + $container->get('Agent.Search') + ); + } + + /** + * Get the Search Agent Replace + * + * @param Container $container The DI container. + * + * @return Replace + * @since 3.2.0 + */ + public function getReplace(Container $container): Replace + { + return new Replace( + $container->get('Config'), + $container->get('Agent.Update') + ); + } + + /** + * Get the Search Agent Search + * + * @param Container $container The DI container. + * + * @return Search + * @since 3.2.0 + */ + public function getSearch(Container $container): Search + { + return new Search( + $container->get('Config'), + $container->get('Table') + ); + } + + /** + * Get the Search Agent Update + * + * @param Container $container The DI container. + * + * @return Update + * @since 3.2.0 + */ + public function getUpdate(Container $container): Update + { + return new Update( + $container->get('Config'), + $container->get('Table') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Database.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Database.php new file mode 100644 index 000000000..d5586a786 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Database.php @@ -0,0 +1,80 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Search\Database\Get as GetDatabase; +use VDM\Joomla\Componentbuilder\Search\Database\Set as SetDatabase; + + +/** + * Database Service Provider + * + * @since 3.2.0 + */ +class Database implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(GetDatabase::class, 'Get.Database') + ->share('Get.Database', [$this, 'getDatabaseGet'], true); + + $container->alias(SetDatabase::class, 'Set.Database') + ->share('Set.Database', [$this, 'getDatabaseSet'], true); + } + + /** + * Get the Get Database + * + * @param Container $container The DI container. + * + * @return GetDatabase + * @since 3.2.0 + */ + public function getDatabaseGet(Container $container): GetDatabase + { + return new GetDatabase( + $container->get('Config'), + $container->get('Table'), + $container->get('Get.Model') + ); + } + + /** + * Get the Set Database + * + * @param Container $container The DI container. + * + * @return SetDatabase + * @since 3.2.0 + */ + public function getDatabaseSet(Container $container): SetDatabase + { + return new SetDatabase( + $container->get('Config'), + $container->get('Table'), + $container->get('Set.Model') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Model.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Model.php new file mode 100644 index 000000000..9e3817f83 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Model.php @@ -0,0 +1,78 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Search\Model\Get; +use VDM\Joomla\Componentbuilder\Search\Model\Set; + + +/** + * Model Service Provider + * + * @since 3.2.0 + */ +class Model implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(Get::class, 'Get.Model') + ->share('Get.Model', [$this, 'getModelGet'], true); + + $container->alias(Set::class, 'Set.Model') + ->share('Set.Model', [$this, 'getModelSet'], true); + } + + /** + * Get the Get Model + * + * @param Container $container The DI container. + * + * @return Get + * @since 3.2.0 + */ + public function getModelGet(Container $container): Get + { + return new Get( + $container->get('Config'), + $container->get('Table') + ); + } + + /** + * Get the Set Model + * + * @param Container $container The DI container. + * + * @return Set + * @since 3.2.0 + */ + public function getModelSet(Container $container): Set + { + return new Set( + $container->get('Config'), + $container->get('Table') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php new file mode 100644 index 000000000..6b26bf9aa --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php @@ -0,0 +1,74 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Search\Config; +use VDM\Joomla\Componentbuilder\Search\Table; + + +/** + * Search Service Provider + * + * @since 3.2.0 + */ +class Search implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(Config::class, 'Config') + ->share('Config', [$this, 'getConfig'], true); + + $container->alias(Table::class, 'Table') + ->share('Table', [$this, 'getTable'], true); + } + + /** + * Get the Config + * + * @param Container $container The DI container. + * + * @return Config + * @since 3.2.0 + */ + public function getConfig(Container $container): Config + { + return new Config(); + } + + /** + * Get the Table + * + * @param Container $container The DI container. + * + * @return Table + * @since 3.2.0 + */ + public function getTable(Container $container): Table + { + return new Table( + $container->get('Config') + ); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php new file mode 100644 index 000000000..d40448f72 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php @@ -0,0 +1,3026 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Search; + + +use VDM\Joomla\Componentbuilder\Search\Factory; +use VDM\Joomla\Componentbuilder\Search\Config; + + +/** + * Search Table + * + * @since 3.2.0 + */ +class Table +{ + /** + * All areas/views/tables with their field details to SEARCH + * + * @var array + * @since 3.2.0 + **/ + protected $tables = [ + 'joomla_component' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => true, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'name_code' => [ + 'name' => 'name_code', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'short_description' => [ + 'name' => 'short_description', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'companyname' => [ + 'name' => 'companyname', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_helper_both' => [ + 'name' => 'php_helper_both', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'crowdin_project_identifier' => [ + 'name' => 'crowdin_project_identifier', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'php_method_uninstall' => [ + 'name' => 'php_method_uninstall', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'php_preflight_install' => [ + 'name' => 'php_preflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'css_admin' => [ + 'name' => 'css_admin', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'php_admin_event' => [ + 'name' => 'php_admin_event', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'php_site_event' => [ + 'name' => 'php_site_event', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'author' => [ + 'name' => 'author', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_postflight_install' => [ + 'name' => 'php_postflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'email' => [ + 'name' => 'email', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'sql_uninstall' => [ + 'name' => 'sql_uninstall', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'website' => [ + 'name' => 'website', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_helper_admin' => [ + 'name' => 'php_helper_admin', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'whmcs_key' => [ + 'name' => 'whmcs_key', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'php_helper_site' => [ + 'name' => 'php_helper_site', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'whmcs_url' => [ + 'name' => 'whmcs_url', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'javascript' => [ + 'name' => 'javascript', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'whmcs_buy_link' => [ + 'name' => 'whmcs_buy_link', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'css_site' => [ + 'name' => 'css_site', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], + 'license' => [ + 'name' => 'license', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_preflight_update' => [ + 'name' => 'php_preflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'php_postflight_update' => [ + 'name' => 'php_postflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'copyright' => [ + 'name' => 'copyright', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'sql' => [ + 'name' => 'sql', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'update_server_url' => [ + 'name' => 'update_server_url', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'component_version' => [ + 'name' => 'component_version', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'crowdin_username' => [ + 'name' => 'crowdin_username', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Dynamic Integration', + ], + 'buildcompsql' => [ + 'name' => 'buildcompsql', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dynamic Build (beta)', + ], + 'menu_prefix' => [ + 'name' => 'menu_prefix', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Settings', + ], + 'toignore' => [ + 'name' => 'toignore', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Settings', + ], + 'export_key' => [ + 'name' => 'export_key', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Settings', + ], + 'joomla_source_link' => [ + 'name' => 'joomla_source_link', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Settings', + ], + 'export_buy_link' => [ + 'name' => 'export_buy_link', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Settings', + ], + 'addcontributors' => [ + 'name' => 'addcontributors', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'json', + 'tab_name' => 'Settings', + ], + 'readme' => [ + 'name' => 'readme', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Readme', + ], + 'crowdin_project_api_key' => [ + 'name' => 'crowdin_project_api_key', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Dynamic Integration', + ], + 'crowdin_account_api_key' => [ + 'name' => 'crowdin_account_api_key', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Dynamic Integration', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'joomla_module' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => true, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'HTML', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'HTML', + ], + 'default' => [ + 'name' => 'default', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'HTML', + ], + 'module_version' => [ + 'name' => 'module_version', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'HTML', + ], + 'php_preflight_update' => [ + 'name' => 'php_preflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'php_preflight_uninstall' => [ + 'name' => 'php_preflight_uninstall', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'mod_code' => [ + 'name' => 'mod_code', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Code', + ], + 'php_postflight_install' => [ + 'name' => 'php_postflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'php_postflight_update' => [ + 'name' => 'php_postflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'php_method_uninstall' => [ + 'name' => 'php_method_uninstall', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'class_helper_header' => [ + 'name' => 'class_helper_header', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Helper', + ], + 'sql' => [ + 'name' => 'sql', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'class_helper_code' => [ + 'name' => 'class_helper_code', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Helper', + ], + 'sql_uninstall' => [ + 'name' => 'sql_uninstall', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'fields' => [ + 'name' => 'fields', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'json', + 'tab_name' => 'Forms & Fields', + ], + 'readme' => [ + 'name' => 'readme', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Readme', + ], + 'update_server_url' => [ + 'name' => 'update_server_url', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'php_script_construct' => [ + 'name' => 'php_script_construct', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'php_preflight_install' => [ + 'name' => 'php_preflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_modules', + 'store' => NULL, + 'tab_name' => 'HTML', + ], + ], + 'joomla_plugin' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => true, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'method_selection' => [ + 'name' => 'method_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'property_selection' => [ + 'name' => 'property_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'head' => [ + 'name' => 'head', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Code', + ], + 'main_class_code' => [ + 'name' => 'main_class_code', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Code', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'php_postflight_install' => [ + 'name' => 'php_postflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'plugin_version' => [ + 'name' => 'plugin_version', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'php_postflight_update' => [ + 'name' => 'php_postflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'fields' => [ + 'name' => 'fields', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'json', + 'tab_name' => 'Forms & Fields', + ], + 'php_method_uninstall' => [ + 'name' => 'php_method_uninstall', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'sql' => [ + 'name' => 'sql', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'php_script_construct' => [ + 'name' => 'php_script_construct', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'sql_uninstall' => [ + 'name' => 'sql_uninstall', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'readme' => [ + 'name' => 'readme', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Readme', + ], + 'php_preflight_install' => [ + 'name' => 'php_preflight_install', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'update_server_url' => [ + 'name' => 'update_server_url', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'php_preflight_update' => [ + 'name' => 'php_preflight_update', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'php_preflight_uninstall' => [ + 'name' => 'php_preflight_uninstall', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => 'base64', + 'tab_name' => 'Script File', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_plugins', + 'store' => NULL, + 'tab_name' => 'Code', + ], + ], + 'power' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => true, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'namespace' => [ + 'name' => 'namespace', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'power_version' => [ + 'name' => 'power_version', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'load_selection' => [ + 'name' => 'load_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'main_class_code' => [ + 'name' => 'main_class_code', + 'type' => 'editor', + 'title' => false, + 'list' => 'powers', + 'store' => 'base64', + 'tab_name' => 'Code', + ], + 'use_selection' => [ + 'name' => 'use_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'property_selection' => [ + 'name' => 'property_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'implements_custom' => [ + 'name' => 'implements_custom', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'extends_custom' => [ + 'name' => 'extends_custom', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + 'method_selection' => [ + 'name' => 'method_selection', + 'type' => 'subform', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', + 'tab_name' => 'Code', + ], + 'head' => [ + 'name' => 'head', + 'type' => 'editor', + 'title' => false, + 'list' => 'powers', + 'store' => 'base64', + 'tab_name' => 'Code', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + ], + ], + 'admin_view' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'name_single' => [ + 'name' => 'name_single', + 'type' => 'text', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'short_description' => [ + 'name' => 'short_description', + 'type' => 'text', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_allowedit' => [ + 'name' => 'php_allowedit', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_postsavehook' => [ + 'name' => 'php_postsavehook', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_before_save' => [ + 'name' => 'php_before_save', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_getlistquery' => [ + 'name' => 'php_getlistquery', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_import_ext' => [ + 'name' => 'php_import_ext', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'php_after_publish' => [ + 'name' => 'php_after_publish', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_after_cancel' => [ + 'name' => 'php_after_cancel', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_batchmove' => [ + 'name' => 'php_batchmove', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_after_delete' => [ + 'name' => 'php_after_delete', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_import' => [ + 'name' => 'php_import', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'addpermissions' => [ + 'name' => 'addpermissions', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'Settings', + ], + 'php_getitems_after_all' => [ + 'name' => 'php_getitems_after_all', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_getform' => [ + 'name' => 'php_getform', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'addtabs' => [ + 'name' => 'addtabs', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'Settings', + ], + 'php_save' => [ + 'name' => 'php_save', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_allowadd' => [ + 'name' => 'php_allowadd', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_before_cancel' => [ + 'name' => 'php_before_cancel', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'addlinked_views' => [ + 'name' => 'addlinked_views', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'Settings', + ], + 'php_batchcopy' => [ + 'name' => 'php_batchcopy', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_before_publish' => [ + 'name' => 'php_before_publish', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_before_delete' => [ + 'name' => 'php_before_delete', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_document' => [ + 'name' => 'php_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'sql' => [ + 'name' => 'sql', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'MySQL', + ], + 'php_import_display' => [ + 'name' => 'php_import_display', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'php_import_setdata' => [ + 'name' => 'php_import_setdata', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'name_list' => [ + 'name' => 'name_list', + 'type' => 'text', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'css_view' => [ + 'name' => 'css_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'CSS', + ], + 'css_views' => [ + 'name' => 'css_views', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'CSS', + ], + 'javascript_view_file' => [ + 'name' => 'javascript_view_file', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript', + ], + 'javascript_view_footer' => [ + 'name' => 'javascript_view_footer', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript', + ], + 'javascript_views_file' => [ + 'name' => 'javascript_views_file', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript', + ], + 'javascript_views_footer' => [ + 'name' => 'javascript_views_footer', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript', + ], + 'custom_button' => [ + 'name' => 'custom_button', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'Custom Buttons', + ], + 'php_controller' => [ + 'name' => 'php_controller', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'php_model' => [ + 'name' => 'php_model', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'php_controller_list' => [ + 'name' => 'php_controller_list', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'php_model_list' => [ + 'name' => 'php_model_list', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'addtables' => [ + 'name' => 'addtables', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'MySQL', + ], + 'php_ajaxmethod' => [ + 'name' => 'php_ajaxmethod', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'ajax_input' => [ + 'name' => 'ajax_input', + 'type' => 'subform', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'json', + 'tab_name' => 'PHP', + ], + 'html_import_view' => [ + 'name' => 'html_import_view', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'php_getitem' => [ + 'name' => 'php_getitem', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_import_headers' => [ + 'name' => 'php_import_headers', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'php_import_save' => [ + 'name' => 'php_import_save', + 'type' => 'textarea', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Import', + ], + 'php_getitems' => [ + 'name' => 'php_getitems', + 'type' => 'editor', + 'title' => false, + 'list' => 'admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'admin_views', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + ], + 'custom_admin_view' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'css_document' => [ + 'name' => 'css_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'css' => [ + 'name' => 'css', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'js_document' => [ + 'name' => 'js_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'javascript_file' => [ + 'name' => 'javascript_file', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'codename' => [ + 'name' => 'codename', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'default' => [ + 'name' => 'default', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'context' => [ + 'name' => 'context', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_ajaxmethod' => [ + 'name' => 'php_ajaxmethod', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'ajax_input' => [ + 'name' => 'ajax_input', + 'type' => 'subform', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'json', + 'tab_name' => 'PHP', + ], + 'php_document' => [ + 'name' => 'php_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_view' => [ + 'name' => 'php_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_jview_display' => [ + 'name' => 'php_jview_display', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'custom_button' => [ + 'name' => 'custom_button', + 'type' => 'subform', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'json', + 'tab_name' => 'Custom Buttons', + ], + 'php_jview' => [ + 'name' => 'php_jview', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_controller' => [ + 'name' => 'php_controller', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'php_model' => [ + 'name' => 'php_model', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_admin_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + ], + 'site_view' => [ + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => false, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'js_document' => [ + 'name' => 'js_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'codename' => [ + 'name' => 'codename', + 'type' => 'text', + 'title' => false, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'javascript_file' => [ + 'name' => 'javascript_file', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'context' => [ + 'name' => 'context', + 'type' => 'text', + 'title' => false, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'default' => [ + 'name' => 'default', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'css_document' => [ + 'name' => 'css_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'css' => [ + 'name' => 'css', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'JavaScript & CSS', + ], + 'php_ajaxmethod' => [ + 'name' => 'php_ajaxmethod', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'ajax_input' => [ + 'name' => 'ajax_input', + 'type' => 'subform', + 'title' => false, + 'list' => 'site_views', + 'store' => 'json', + 'tab_name' => 'PHP', + ], + 'php_document' => [ + 'name' => 'php_document', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_view' => [ + 'name' => 'php_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_jview_display' => [ + 'name' => 'php_jview_display', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'custom_button' => [ + 'name' => 'custom_button', + 'type' => 'subform', + 'title' => false, + 'list' => 'site_views', + 'store' => 'json', + 'tab_name' => 'Custom Buttons', + ], + 'php_jview' => [ + 'name' => 'php_jview', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'PHP', + ], + 'php_controller' => [ + 'name' => 'php_controller', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'site_views', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'php_model' => [ + 'name' => 'php_model', + 'type' => 'editor', + 'title' => false, + 'list' => 'site_views', + 'store' => 'base64', + 'tab_name' => 'Custom Buttons', + ], + ], + 'template' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'templates', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'templates', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_view' => [ + 'name' => 'php_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'templates', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'template' => [ + 'name' => 'template', + 'type' => 'editor', + 'title' => false, + 'list' => 'templates', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'alias' => [ + 'name' => 'alias', + 'type' => 'text', + 'title' => false, + 'list' => 'templates', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'layout' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'layouts', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'layouts', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_view' => [ + 'name' => 'php_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'layouts', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'layout' => [ + 'name' => 'layout', + 'type' => 'editor', + 'title' => false, + 'list' => 'layouts', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'alias' => [ + 'name' => 'alias', + 'type' => 'text', + 'title' => false, + 'list' => 'layouts', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'dynamic_get' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'dynamic_gets', + 'store' => NULL, + 'tab_name' => 'Main', + ], + 'php_router_parse' => [ + 'name' => 'php_router_parse', + 'type' => 'textarea', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'php_before_getitems' => [ + 'name' => 'php_before_getitems', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'php_after_getitems' => [ + 'name' => 'php_after_getitems', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'php_after_getitem' => [ + 'name' => 'php_after_getitem', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'php_getlistquery' => [ + 'name' => 'php_getlistquery', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'join_db_table' => [ + 'name' => 'join_db_table', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Joint', + ], + 'view_selection' => [ + 'name' => 'view_selection', + 'type' => 'textarea', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => NULL, + 'tab_name' => 'Main', + ], + 'php_custom_get' => [ + 'name' => 'php_custom_get', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Main', + ], + 'db_selection' => [ + 'name' => 'db_selection', + 'type' => 'textarea', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => NULL, + 'tab_name' => 'Main', + ], + 'php_calculation' => [ + 'name' => 'php_calculation', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Abacus', + ], + 'php_before_getitem' => [ + 'name' => 'php_before_getitem', + 'type' => 'editor', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'base64', + 'tab_name' => 'Custom Script', + ], + 'getcustom' => [ + 'name' => 'getcustom', + 'type' => 'text', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => NULL, + 'tab_name' => 'Main', + ], + 'filter' => [ + 'name' => 'filter', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Tweak', + ], + 'where' => [ + 'name' => 'where', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Tweak', + ], + 'order' => [ + 'name' => 'order', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Tweak', + ], + 'group' => [ + 'name' => 'group', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Tweak', + ], + 'global' => [ + 'name' => 'global', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Tweak', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'join_view_table' => [ + 'name' => 'join_view_table', + 'type' => 'subform', + 'title' => false, + 'list' => 'dynamic_gets', + 'store' => 'json', + 'tab_name' => 'Joint', + ], + ], + 'custom_code' => [ + 'path' => [ + 'name' => 'path', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'function_name' => [ + 'name' => 'function_name', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'system_name' => [ + 'name' => 'system_name', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'code' => [ + 'name' => 'code', + 'type' => 'editor', + 'title' => false, + 'list' => 'custom_codes', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'hashendtarget' => [ + 'name' => 'hashendtarget', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'to_line' => [ + 'name' => 'to_line', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'from_line' => [ + 'name' => 'from_line', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'hashtarget' => [ + 'name' => 'hashtarget', + 'type' => 'text', + 'title' => false, + 'list' => 'custom_codes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'class_property' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'class_properties', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'class_properties', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'comment' => [ + 'name' => 'comment', + 'type' => 'textarea', + 'title' => false, + 'list' => 'class_properties', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'default' => [ + 'name' => 'default', + 'type' => 'textarea', + 'title' => false, + 'list' => 'class_properties', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + ], + 'class_method' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'class_methods', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'class_methods', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'code' => [ + 'name' => 'code', + 'type' => 'editor', + 'title' => false, + 'list' => 'class_methods', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'comment' => [ + 'name' => 'comment', + 'type' => 'textarea', + 'title' => false, + 'list' => 'class_methods', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'arguments' => [ + 'name' => 'arguments', + 'type' => 'text', + 'title' => false, + 'list' => 'class_methods', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + ], + 'placeholder' => [ + 'target' => [ + 'name' => 'target', + 'type' => 'text', + 'title' => true, + 'list' => 'placeholders', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'value' => [ + 'name' => 'value', + 'type' => 'text', + 'title' => false, + 'list' => 'placeholders', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + ], + 'library' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'libraries', + 'store' => NULL, + 'tab_name' => 'Behaviour', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'libraries', + 'store' => NULL, + 'tab_name' => 'Behaviour', + ], + 'php_setdocument' => [ + 'name' => 'php_setdocument', + 'type' => 'textarea', + 'title' => false, + 'list' => 'libraries', + 'store' => 'base64', + 'tab_name' => 'Behaviour', + ], + 'addconditions' => [ + 'name' => 'addconditions', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries', + 'store' => 'json', + 'tab_name' => 'Behaviour', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'libraries', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + ], + 'snippet' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'url' => [ + 'name' => 'url', + 'type' => 'url', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'heading' => [ + 'name' => 'heading', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + 'contributor_email' => [ + 'name' => 'contributor_email', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Contributor', + ], + 'contributor_name' => [ + 'name' => 'contributor_name', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Contributor', + ], + 'contributor_website' => [ + 'name' => 'contributor_website', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Contributor', + ], + 'contributor_company' => [ + 'name' => 'contributor_company', + 'type' => 'text', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Contributor', + ], + 'snippet' => [ + 'name' => 'snippet', + 'type' => 'textarea', + 'title' => false, + 'list' => 'snippets', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'usage' => [ + 'name' => 'usage', + 'type' => 'textarea', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'snippets', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'validation_rule' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'validation_rules', + 'store' => NULL, + 'tab_name' => 'Extends FormRule', + ], + 'short_description' => [ + 'name' => 'short_description', + 'type' => 'text', + 'title' => false, + 'list' => 'validation_rules', + 'store' => NULL, + 'tab_name' => 'Extends FormRule', + ], + 'php' => [ + 'name' => 'php', + 'type' => 'textarea', + 'title' => false, + 'list' => 'validation_rules', + 'store' => 'base64', + 'tab_name' => 'Extends FormRule', + ], + ], + 'field' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'fields', + 'store' => NULL, + 'tab_name' => 'Set Properties', + ], + 'on_get_model_field' => [ + 'name' => 'on_get_model_field', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + ], + 'on_save_model_field' => [ + 'name' => 'on_save_model_field', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + ], + 'initiator_on_get_model' => [ + 'name' => 'initiator_on_get_model', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + ], + 'css_view' => [ + 'name' => 'css_view', + 'type' => 'editor', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Scripts', + ], + 'javascript_view_footer' => [ + 'name' => 'javascript_view_footer', + 'type' => 'editor', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Scripts', + ], + 'css_views' => [ + 'name' => 'css_views', + 'type' => 'editor', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Scripts', + ], + 'datadefault_other' => [ + 'name' => 'datadefault_other', + 'type' => 'text', + 'title' => false, + 'list' => 'fields', + 'store' => NULL, + 'tab_name' => 'Database', + ], + 'datalenght_other' => [ + 'name' => 'datalenght_other', + 'type' => 'text', + 'title' => false, + 'list' => 'fields', + 'store' => NULL, + 'tab_name' => 'Database', + ], + 'javascript_views_footer' => [ + 'name' => 'javascript_views_footer', + 'type' => 'editor', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Scripts', + ], + 'initiator_on_save_model' => [ + 'name' => 'initiator_on_save_model', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'fields', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + ], + 'fieldtype' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'datadefault_other' => [ + 'name' => 'datadefault_other', + 'type' => 'text', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'Database (defaults)', + ], + 'datalenght_other' => [ + 'name' => 'datalenght_other', + 'type' => 'text', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'Database (defaults)', + ], + 'short_description' => [ + 'name' => 'short_description', + 'type' => 'text', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'properties' => [ + 'name' => 'properties', + 'type' => 'subform', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => 'json', + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'guid' => [ + 'name' => 'guid', + 'type' => 'text', + 'title' => false, + 'list' => 'fieldtypes', + 'store' => NULL, + 'tab_name' => 'publishing', + ], + ], + 'language_translation' => [ + 'source' => [ + 'name' => 'source', + 'type' => 'textarea', + 'title' => true, + 'list' => 'language_translations', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'translation' => [ + 'name' => 'translation', + 'type' => 'subform', + 'title' => false, + 'list' => 'language_translations', + 'store' => 'json', + 'tab_name' => 'Details', + ], + ], + 'language' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'languages', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'langtag' => [ + 'name' => 'langtag', + 'type' => 'text', + 'title' => false, + 'list' => 'languages', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'server' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'servers', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'signature' => [ + 'name' => 'signature', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'private_key' => [ + 'name' => 'private_key', + 'type' => 'textarea', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'private' => [ + 'name' => 'private', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'path' => [ + 'name' => 'path', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'port' => [ + 'name' => 'port', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'host' => [ + 'name' => 'host', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + 'username' => [ + 'name' => 'username', + 'type' => 'text', + 'title' => false, + 'list' => 'servers', + 'store' => 'basic_encryption', + 'tab_name' => 'Details', + ], + ], + 'help_document' => [ + 'title' => [ + 'name' => 'title', + 'type' => 'text', + 'title' => true, + 'list' => 'help_documents', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'content' => [ + 'name' => 'content', + 'type' => 'editor', + 'title' => false, + 'list' => 'help_documents', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'url' => [ + 'name' => 'url', + 'type' => 'url', + 'title' => false, + 'list' => 'help_documents', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'alias' => [ + 'name' => 'alias', + 'type' => 'text', + 'title' => false, + 'list' => 'help_documents', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'admin_fields' => [ + 'addfields' => [ + 'name' => 'addfields', + 'type' => 'subform', + 'title' => false, + 'list' => 'admins_fields', + 'store' => 'json', + 'tab_name' => 'Fields', + ], + ], + 'admin_fields_conditions' => [ + 'addconditions' => [ + 'name' => 'addconditions', + 'type' => 'subform', + 'title' => false, + 'list' => 'admins_fields_conditions', + 'store' => 'json', + 'tab_name' => 'Conditions', + ], + ], + 'admin_fields_relations' => [ + 'addrelations' => [ + 'name' => 'addrelations', + 'type' => 'subform', + 'title' => false, + 'list' => 'admins_fields_relations', + 'store' => 'json', + 'tab_name' => 'Relations', + ], + ], + 'admin_custom_tabs' => [ + 'tabs' => [ + 'name' => 'tabs', + 'type' => 'subform', + 'title' => false, + 'list' => 'admins_custom_tabs', + 'store' => 'json', + 'tab_name' => 'Tabs', + ], + ], + 'component_admin_views' => [ + 'addadmin_views' => [ + 'name' => 'addadmin_views', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_admin_views', + 'store' => 'json', + 'tab_name' => 'Views', + ], + ], + 'component_site_views' => [ + 'addsite_views' => [ + 'name' => 'addsite_views', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_site_views', + 'store' => 'json', + 'tab_name' => 'Views', + ], + ], + 'component_custom_admin_views' => [ + 'addcustom_admin_views' => [ + 'name' => 'addcustom_admin_views', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_custom_admin_views', + 'store' => 'json', + 'tab_name' => 'Views', + ], + ], + 'component_updates' => [ + 'version_update' => [ + 'name' => 'version_update', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_updates', + 'store' => 'json', + 'tab_name' => 'Updates', + ], + ], + 'component_mysql_tweaks' => [ + 'sql_tweak' => [ + 'name' => 'sql_tweak', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_mysql_tweaks', + 'store' => 'json', + 'tab_name' => 'Mysql Tweaks', + ], + ], + 'component_custom_admin_menus' => [ + 'addcustommenus' => [ + 'name' => 'addcustommenus', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_custom_admin_menus', + 'store' => 'json', + 'tab_name' => 'Menus', + ], + ], + 'component_config' => [ + 'addconfig' => [ + 'name' => 'addconfig', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_config', + 'store' => 'json', + 'tab_name' => 'Options', + ], + ], + 'component_dashboard' => [ + 'dashboard_tab' => [ + 'name' => 'dashboard_tab', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_dashboard', + 'store' => 'json', + 'tab_name' => 'Dashboard', + ], + 'php_dashboard_methods' => [ + 'name' => 'php_dashboard_methods', + 'type' => 'textarea', + 'title' => false, + 'list' => 'components_dashboard', + 'store' => 'base64', + 'tab_name' => 'Dashboard', + ], + ], + 'component_files_folders' => [ + 'addfoldersfullpath' => [ + 'name' => 'addfoldersfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_files_folders', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfilesfullpath' => [ + 'name' => 'addfilesfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_files_folders', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfolders' => [ + 'name' => 'addfolders', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_files_folders', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addfiles' => [ + 'name' => 'addfiles', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_files_folders', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + ], + 'component_placeholders' => [ + 'addplaceholders' => [ + 'name' => 'addplaceholders', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_placeholders', + 'store' => 'json', + 'tab_name' => 'Details', + ], + ], + 'component_plugins' => [ + 'addjoomla_plugins' => [ + 'name' => 'addjoomla_plugins', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_plugins', + 'store' => 'json', + 'tab_name' => 'Plugins', + ], + ], + 'component_modules' => [ + 'addjoomla_modules' => [ + 'name' => 'addjoomla_modules', + 'type' => 'subform', + 'title' => false, + 'list' => 'components_modules', + 'store' => 'json', + 'tab_name' => 'Modules', + ], + ], + 'snippet_type' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'snippet_types', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'type' => 'text', + 'title' => false, + 'list' => 'snippet_types', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'library_config' => [ + 'addconfig' => [ + 'name' => 'addconfig', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_config', + 'store' => 'json', + 'tab_name' => 'Tweaks', + ], + ], + 'library_files_folders_urls' => [ + 'addfoldersfullpath' => [ + 'name' => 'addfoldersfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfilesfullpath' => [ + 'name' => 'addfilesfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfolders' => [ + 'name' => 'addfolders', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addfiles' => [ + 'name' => 'addfiles', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addurls' => [ + 'name' => 'addurls', + 'type' => 'subform', + 'title' => false, + 'list' => 'libraries_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + ], + 'class_extends' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'class_extendings', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'head' => [ + 'name' => 'head', + 'type' => 'editor', + 'title' => false, + 'list' => 'class_extendings', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + 'comment' => [ + 'name' => 'comment', + 'type' => 'textarea', + 'title' => false, + 'list' => 'class_extendings', + 'store' => 'base64', + 'tab_name' => 'Details', + ], + ], + 'joomla_module_updates' => [ + 'version_update' => [ + 'name' => 'version_update', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_updates', + 'store' => 'json', + 'tab_name' => 'Updates', + ], + ], + 'joomla_module_files_folders_urls' => [ + 'addfoldersfullpath' => [ + 'name' => 'addfoldersfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfilesfullpath' => [ + 'name' => 'addfilesfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfolders' => [ + 'name' => 'addfolders', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addfiles' => [ + 'name' => 'addfiles', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addurls' => [ + 'name' => 'addurls', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_modules_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + ], + 'joomla_plugin_group' => [ + 'name' => [ + 'name' => 'name', + 'type' => 'text', + 'title' => true, + 'list' => 'joomla_plugin_groups', + 'store' => NULL, + 'tab_name' => 'Details', + ], + ], + 'joomla_plugin_updates' => [ + 'version_update' => [ + 'name' => 'version_update', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_updates', + 'store' => 'json', + 'tab_name' => 'Updates', + ], + ], + 'joomla_plugin_files_folders_urls' => [ + 'addfoldersfullpath' => [ + 'name' => 'addfoldersfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfilesfullpath' => [ + 'name' => 'addfilesfullpath', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Advance', + ], + 'addfolders' => [ + 'name' => 'addfolders', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addfiles' => [ + 'name' => 'addfiles', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + 'addurls' => [ + 'name' => 'addurls', + 'type' => 'subform', + 'title' => false, + 'list' => 'joomla_plugins_files_folders_urls', + 'store' => 'json', + 'tab_name' => 'Basic', + ], + ], + ]; + + /** + * Search Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Constructor + * + * @param Config|null $config The search config object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null) + { + $this->config = $config ?: Factory::_('Config'); + } + + /** + * Get any value from a item/field/column of an area/view/table + * Example: $this->get('table_name', 'field_name', 'value_key'); + * Get an item/field/column of an area/view/table + * Example: $this->get('table_name', 'field_name'); + * Get all items/fields/columns of an area/view/table + * Example: $this->get('table_name'); + * Get all areas/views/tables with all their item/field/column details + * Example: $this->get(); + * + * @param string|null $table The table + * @param string|null $field The field + * @param string|null $key The value key + * + * @return mixed + * @since 3.2.0 + */ + public function get(?string $table = null, ?string $field = null, ?string $key = null) + { + // load the table + if (empty($table) && is_string($field)) + { + $table = $this->config->table_name; + } + + // return the item/field/column of an area/view/table + if (is_string($field) && is_string($key)) + { + // return the value of a item/field/column of an area/view/table + if (isset($this->tables[$table][$field][$key])) + { + return $this->tables[$table][$field][$key]; + } + return null; + } + // return the item/field/column of an area/view/table + elseif (is_string($field)) + { + if (isset($this->tables[$table][$field])) + { + return $this->tables[$table][$field]; + } + return null; + } + // return an area/view/table + elseif (is_string($table)) + { + if (isset($this->tables[$table])) + { + return $this->tables[$table]; + } + return null; + } + + // return all + return $this->tables; + } + + /** + * Get title field from an area/view/table + * + * @param string|null $table The area + * + * @return ?array + * @since 3.2.0 + */ + public function title(?string $table = null): ?array + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // return the title item/field/column of an area/view/table + if (($table = $this->get($table)) !== null) + { + foreach ($table as $item) + { + if ($item['title']) + { + return $item; + } + } + } + + // none found + return null; + } + + /** + * Get title field name + * + * @param string|null $table The area + * + * @return string + * @since 3.2.0 + */ + public function titleName(?string $table = null): string + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // return the title name of an area/view/table + if (($field = $this->title($table)) !== null) + { + return $field['name']; + } + + // none found default to ID + return 'id'; + } + + /** + * Get all tables + * + * @return array + * @since 3.2.0 + */ + public function tables(): array + { + // return all areas/views/tables + return array_keys($this->tables); + } + + /** + * Check if a table exist + * + * @param string|null $table The area + * + * @return bool + * @since 3.2.0 + */ + public function exist(?string $table = null): bool + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (isset($table) && isset($this->tables[$table])) + { + return true; + } + + return false; + } + + /** + * Get all fields of an area/view/table + * + * @param string|null $table The area + * + * @return ?array + * @since 3.2.0 + */ + public function fields(?string $table = null): ?array + { + // load the table + if (empty($table)) + { + $table = $this->config->table_name; + } + + // return all fields of an area/view/table + if (($table = $this->get($table)) !== null) + { + return array_keys($table); + } + + // none found + return null; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/script.php b/script.php index a6b8b4cb2..273dbc77b 100644 --- a/script.php +++ b/script.php @@ -6755,7 +6755,7 @@ public function postflight($type, ComponentAdapter $parent) { $rule_length = $db->loadResult(); // Check the size of the rules column - if ($rule_length <= 96960) + if ($rule_length <= 97440) { // Fix the assets table rules column size $fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';"; diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index c77a1c867..7033e9fc1 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -3547,6 +3547,9 @@ public static function getDynamicScripts($type, $fieldName = false) ), 'special' => array( 'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform' + ), + 'search' => array( + 'editor', 'email', 'tel', 'text', 'textarea', 'url', 'subform' ) ); From c53ece2a2d221ae6ee7b58ab9568ace2c4cb0f99 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 16 Sep 2022 23:41:41 +0200 Subject: [PATCH 06/75] Adds more classes, and refactoring to the search feature. Adds test search to search page. #952 --- README.md | 8 +- admin/README.txt | 8 +- .../en-GB/en-GB.com_componentbuilder.ini | 1 - admin/models/ajax.php | 18 +- admin/views/search/tmpl/default.php | 25 +- componentbuilder.xml | 2 +- .../src/Componentbuilder/Search/Agent.php | 2 +- .../Componentbuilder/Search/Agent/Replace.php | 2 +- .../Componentbuilder/Search/Agent/Search.php | 253 ++++++++++++++++-- .../Componentbuilder/Search/Agent/Update.php | 107 ++++++-- .../src/Componentbuilder/Search/Config.php | 8 +- .../Search/Interfaces/FindInterface.php | 3 +- .../Search/Interfaces/ModelInterface.php | 10 +- .../Search/Interfaces/SearchInterface.php | 56 ++++ .../Search/Interfaces/SearchTypeInterface.php | 43 +++ .../src/Componentbuilder/Search/Model.php | 51 +++- .../src/Componentbuilder/Search/Model/Get.php | 10 +- .../Componentbuilder/Search/Service/Agent.php | 6 +- .../Search/Service/Search.php | 77 ++++++ .../Componentbuilder/Search/Type/Basic.php | 127 +++++++++ .../Componentbuilder/Search/Type/Regex.php | 112 ++++++++ .../Componentbuilder/Search/Type/index.html | 1 + 22 files changed, 842 insertions(+), 88 deletions(-) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SearchInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/SearchTypeInterface.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/index.html diff --git a/README.md b/README.md index 20ac6437d..342c18d3f 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 14th September, 2022 ++ *Last Build*: 16th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **330282** ++ *Line count*: **331035** + *Field count*: **2002** -+ *File count*: **2161** -+ *Folder count*: **374** ++ *File count*: **2166** ++ *Folder count*: **375** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 20ac6437d..342c18d3f 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 14th September, 2022 ++ *Last Build*: 16th September, 2022 + *Version*: 3.1.5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **330282** ++ *Line count*: **331035** + *Field count*: **2002** -+ *File count*: **2161** -+ *Folder count*: **374** ++ *File count*: **2166** ++ *Folder count*: **375** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 5d19974ee..8fb1a0828 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -7760,7 +7760,6 @@ COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" COM_COMPONENTBUILDER_MODULE="Module" COM_COMPONENTBUILDER_MODULES="Modules" -COM_COMPONENTBUILDER_MORE_SOON="More soon" COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 9c3ce9a3e..b347bafa8 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -3622,17 +3622,17 @@ public function searchTable(string $tableName, string $searchValue, int $matchCase, int $wholeWord, int $regexSearch, int $componentId): ?array { // check if this is a valid table - if (SearchFactory('Table')->exist($tableName)) + if (SearchFactory::_('Table')->exist($tableName)) { // load the configurations - SearchFactory('Config')->table_name = $tableName; - SearchFactory('Config')->search_value = $searchValue; - SearchFactory('Config')->match_case = $matchCase; - SearchFactory('Config')->whole_word = $wholeWord; - SearchFactory('Config')->regex_search = $regexSearch; - SearchFactory('Config')->component_id = $componentId; - - if (($items = SearchFactory('Agent')->find()) !== null) + SearchFactory::_('Config')->table_name = $tableName; + SearchFactory::_('Config')->search_value = $searchValue; + SearchFactory::_('Config')->match_case = $matchCase; + SearchFactory::_('Config')->whole_word = $wholeWord; + SearchFactory::_('Config')->regex_search = $regexSearch; + SearchFactory::_('Config')->component_id = $componentId; + + if (($items = SearchFactory::_('Agent')->find()) !== null) { return ['success' => JText::sprintf('COM_COMPONENTBUILDER_WE_FOUND_SOME_INSTANCES_IN_S', $tableName), 'items' => $items]; } diff --git a/admin/views/search/tmpl/default.php b/admin/views/search/tmpl/default.php index d28ecae59..5413d57c0 100644 --- a/admin/views/search/tmpl/default.php +++ b/admin/views/search/tmpl/default.php @@ -16,6 +16,7 @@ JHtml::_('behavior.formvalidator'); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); +use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; ?> canDo->get('search.access')): ?> - - -

diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 970ebbf4c..1a6cc9be3 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -40,11 +40,18 @@ function display($tpl = null) JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=compiler'); $this->sidebar = JHtmlSidebar::render(); } + // get the success message if set $this->SuccessMessage = $this->app->getUserState('com_componentbuilder.success_message', false); + + // get active components $this->Components = $this->get('Components'); - $this->form = $this->setForm(); + + // get the needed form fields + $this->Form = $this->getDynamicForm(); + // set the compiler artwork from global settings $this->builder_gif_size = $this->params->get('builder_gif_size', '480-272'); + // only run these checks if he has access if ($this->canDo->get('compiler.compiler_animations')) { @@ -96,7 +103,14 @@ function display($tpl = null) // JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout are loaded // JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout are loaded - public function setForm() + /** + * Get the dynamic build form fields needed on the page + * + * @return array|null The array of form fields + * + * @since 3.2.0 + */ + public function getDynamicForm(): ?array { if(ComponentbuilderHelper::checkArray($this->Components)) { @@ -209,8 +223,10 @@ public function setForm() // return the form array return $form; } - return false; - } + + return null; + } + /** * Prepares the document @@ -396,7 +412,7 @@ protected function addToolBar() if ($this->canDo->get('compiler.compiler_animations')) { // add Compiler Animations button. - JToolBarHelper::custom('compiler.getCompilerAnimations', 'download custom-button-getcompileranimations', '', 'COM_COMPONENTBUILDER_COMPILER_ANIMATIONS', false); + JToolBarHelper::custom('compiler.getDynamicContent', 'download custom-button-getdynamiccontent', '', 'COM_COMPONENTBUILDER_COMPILER_ANIMATIONS', false); } if ($this->canDo->get('compiler.clear_tmp')) { diff --git a/admin/views/search/tmpl/default.php b/admin/views/search/tmpl/default.php index 3b6806e03..a19313068 100644 --- a/admin/views/search/tmpl/default.php +++ b/admin/views/search/tmpl/default.php @@ -17,6 +17,10 @@ JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; + +$this->app->input->set('hidemainmenu', false); +$selectNotice = '

' . JText::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '

'; +$selectNotice .= '

' . JText::_('COM_COMPONENTBUILDER_ENTER_YOUR_SEARCH_TEXT') . '

'; ?> canDo->get('search.access')): ?> item->id)) ? '&id='. (int) $this->item->id : ''; ?> -
sidebar)): ?>
@@ -42,33 +45,55 @@
- table_name = $tableName; - SearchFactory::_('Config')->search_value = $searchValue; - SearchFactory::_('Config')->match_case = 1; - SearchFactory::_('Config')->whole_word = 0; - SearchFactory::_('Config')->regex_search = 1; - SearchFactory::_('Config')->component_id = 0; + form): ?> + +
+
+
+ form->renderField('type_search'); ?> + form->renderField('search_value'); ?> + form->renderField('replace_value'); ?> +
+
+ form->renderFieldset('settings'); ?> +
+
+
+
+ + + + + + + + + + + +
+
+
+ +
+ + +
+item['tables']) && ComponentbuilderHelper::checkArray($this->item['tables'])) : ?> + +

diff --git a/admin/views/search/view.html.php b/admin/views/search/view.html.php index 551d3d701..423db2bde 100644 --- a/admin/views/search/view.html.php +++ b/admin/views/search/view.html.php @@ -13,6 +13,9 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\View\HtmlView; +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Form\Form; +use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; /** * Componentbuilder Html View class for the Search @@ -38,7 +41,11 @@ function display($tpl = null) ComponentbuilderHelper::addSubmenu('search'); JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=search'); $this->sidebar = JHtmlSidebar::render(); - } + } + + // get the needed form fields + $this->form = $this->getDynamicForm(); + // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') @@ -59,6 +66,184 @@ function display($tpl = null) parent::display($tpl); } + /** + * Get the dynamic build form fields needed on the page + * + * @return Form|null The array of form fields + * + * @since 3.2.0 + */ + public function getDynamicForm(): ?Form + { + if(ComponentbuilderHelper::checkArray($this->item) && + ComponentbuilderHelper::checkArray($this->item['tables']) && + ComponentbuilderHelper::checkArray($this->item['components'])) + { + // start the form + $form = new Form('Search'); + + $form->load('
+
+
+
+
'); + + // Search Mode + $attributes = [ + 'type' => 'radio', + 'name' => 'type_search', + 'label' => 'COM_COMPONENTBUILDER_MODE', + 'class' => 'btn-group', + 'description' => 'COM_COMPONENTBUILDER_SEARCH_OR_SEARCH_AND_REPLACE', + 'default' => '1']; + // set the mode options + $options = [ + 1 => 'COM_COMPONENTBUILDER_SEARCH', + 2 => 'COM_COMPONENTBUILDER_REPLACE']; + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'search'); + } + + // search text attributes + $attributes = [ + 'type' => 'text', + 'name' => 'search_value', + 'label' => 'COM_COMPONENTBUILDER_SEARCH', + 'size' => 150, + 'maxlength' => 200, + 'description' => 'COM_COMPONENTBUILDER_HERE_YOU_CAN_ENTER_YOUR_SEARCH_TEXT', + 'filter' => 'RAW', + 'class' => 'search-value span12', + 'hint' => 'COM_COMPONENTBUILDER_ENTER_YOUR_SEARCH_TEXT', + 'autocomplete' => true]; + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'search'); + } + + // replace text attributes + $attributes = [ + 'type' => 'text', + 'name' => 'replace_value', + 'label' => 'COM_COMPONENTBUILDER_REPLACE', + 'size' => 150, + 'maxlength' => 200, + 'description' => 'COM_COMPONENTBUILDER_HERE_YOU_CAN_ENTER_THE_REPLACE_TEXT_THAT_YOU_WOULD_LIKE_TO_USE_AS_REPLACEMENT_FOR_THE_SEARCH_TEXT_FOUND', + 'filter' => 'RAW', + 'class' => 'replace-value span12', + 'hint' => 'COM_COMPONENTBUILDER_ENTER_YOUR_REPLACE_TEXT', + 'autocomplete' => true, + 'showon' => 'type_search:2']; + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'search'); + } + + // Search Behaviour + $attributes = [ + 'type' => 'checkboxes', + 'name' => 'search_behaviour', + 'label' => 'COM_COMPONENTBUILDER_BEHAVIOUR', + 'class' => 'btn-group', + 'description' => 'COM_COMPONENTBUILDER_SET_THE_SEARCH_BEHAVIOUR_HERE']; + // set the mode options + $options = [ + 'match_case' => 'COM_COMPONENTBUILDER_MATCH_CASE', + 'whole_word' => 'COM_COMPONENTBUILDER_WHOLE_WORD', + 'regex_search' => 'COM_COMPONENTBUILDER_REGEX_SEARCH']; + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'settings'); + } + + // component attributes + $attributes = [ + 'type' => 'list', + 'name' => 'component_id', + 'label' => 'COM_COMPONENTBUILDER_COMPONENTS_BR_SMALLDISABLED_SOONSMALL', + 'class' => 'list_class', + 'description' => 'COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_SEARCH', + 'required' => 'true', + 'disable' => 'true', + 'readonly' => 'true', + 'default' => -1]; + // start the component options + $options = []; + $options['-1'] = 'COM_COMPONENTBUILDER__SEARCH_ALL_'; + // load component options from array + foreach($this->item['components'] as $component) + { + $options[(int) $component->id] = $this->escape($component->name); + } + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'settings'); + } + + // table attributes + $attributes = [ + 'type' => 'list', + 'name' => 'table_name', + 'label' => 'COM_COMPONENTBUILDER_TABLES', + 'class' => 'list_class', + 'description' => 'COM_COMPONENTBUILDER_SELECT_THE_TABLE_TO_SEARCH', + 'required' => 'true', + 'default' => -1]; + // start the component options + $options = []; + $options['-1'] = 'COM_COMPONENTBUILDER__SEARCH_ALL_'; + // load table options from array + foreach($this->item['tables'] as $table) + { + $options[$table] = $this->escape($table); + } + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'settings'); + } + + // editor attributes + $attributes = [ + 'type' => 'editor', + 'name' => 'full_text', + 'label' => 'COM_COMPONENTBUILDER_FULL_TEXT', + 'width' => '100%', + 'height' => '450px', + 'class' => 'full_text_editor', + 'syntax' => 'php', + 'buttons' => 'false', + 'filter' => 'raw', + 'editor' => 'codemirror|none']; + // add to form + $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); + if ($xml instanceof SimpleXMLElement) + { + $form->setField($xml, null, true, 'view'); + } + + // return the form array + return $form; + } + + return null; + } + + /** * Prepares the document */ @@ -72,6 +257,9 @@ protected function setDocument() // Initialize the header checker. $HeaderCheck = new componentbuilderHeaderCheck; + // Add View JavaScript File + $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/search.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + // Load uikit options. $uikit = $this->params->get('uikit_load'); // Set script size. @@ -89,6 +277,40 @@ protected function setDocument() { JHtml::_('script', 'media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); } + + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'uk-progress'; + } + + // Load the needed uikit components in this view. + if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) + { + // load just in case. + jimport('joomla.filesystem.file'); + // loading... + foreach ($uikitComp as $class) + { + foreach (ComponentbuilderHelper::$uk_components[$class] as $name) + { + // check if the CSS file exists. + if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + { + // load the css. + JHtml::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); + } + // check if the JavaScript file exists. + if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + { + // load the js. + JHtml::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); + } + } + } + } // add the document default css file $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/search.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); } diff --git a/componentbuilder.xml b/componentbuilder.xml index a5bd7a14d..840ddb7db 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 6th October, 2022 + 20th October, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php index dfa6ba645..eba3a4a89 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php @@ -175,7 +175,7 @@ public function get(string $guid, int $build = 0) * * @param string $guid The global unique id of the power * - * @return bool + * @return bool true on successful setting of a power * @since 3.2.0 */ protected function set(string $guid): bool @@ -190,39 +190,52 @@ protected function set(string $guid): bool // Create a new query object. $query = $this->db->getQuery(true); + // select all values $query->select('a.*'); - // from these tables + + // from this table $query->from('#__componentbuilder_power AS a'); $query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid)); + $this->db->setQuery($query); $this->db->execute(); + if ($this->db->getNumRows()) { // make sure that in recursion we // don't try to load this power again + // since during the load of a power we also load + // all powers linked to it $this->state[$guid] = true; + // get the power data $this->active[$guid] = $this->db->loadObject(); + // make sure to add any language strings found to all language files // since we can't know where this is used at this point $tmp_lang_target = $this->config->lang_target; $this->config->lang_target = 'both'; + // we set the fix usr if needed $this->fixUrl = '"index.php?option=com_componentbuilder&view=powers&task=power.edit&id=' . $this->active[$guid]->id . '" target="_blank"'; + // set some keys $this->active[$guid]->target_type = 'P0m3R!'; $this->active[$guid]->key = $this->active[$guid]->id . '_' . $this->active[$guid]->target_type; + // now set the name $this->active[$guid]->name = $this->placeholder->update( $this->customcode->update($this->active[$guid]->name), $this->placeholder->active ); + // now set the code_name and class name $this->active[$guid]->code_name = $this->active[$guid]->class_name = ClassfunctionHelper::safe( $this->active[$guid]->name ); + // set official name $this->active[$guid]->official_name = StringHelper::safe( $this->active[$guid]->name, 'W' @@ -287,6 +300,7 @@ protected function set(string $guid): bool { // set GUI mapper field $guiMapper['field'] = 'head'; + // base64 Decode code $this->active[$guid]->head = $this->gui->set( $this->placeholder->update( @@ -333,6 +347,7 @@ protected function set(string $guid): bool return true; } } + // we failed to get the power, // so we raise an error message // only if guid is valid @@ -343,6 +358,7 @@ protected function set(string $guid): bool 'Error' ); } + // let's not try again $this->state[$guid] = false; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Engine.php similarity index 93% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Engine.php index fcb902a80..0199a81ae 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Engine.php @@ -17,11 +17,11 @@ /** - * Search Type Regex + * Search Engine * * @since 3.2.0 */ -abstract class Type +abstract class Engine { /** * Search Config diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php index 79e0b057e..08cdaee10 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php @@ -19,6 +19,7 @@ use VDM\Joomla\Componentbuilder\Search\Agent\Find; use VDM\Joomla\Componentbuilder\Search\Agent\Replace; use VDM\Joomla\Componentbuilder\Search\Agent\Search; +use VDM\Joomla\Componentbuilder\Search\Agent\Update; /** @@ -76,6 +77,14 @@ class Agent */ protected Search $search; + /** + * Update + * + * @var Update + * @since 3.2.0 + */ + protected Update $update; + /** * Constructor * @@ -90,7 +99,7 @@ class Agent */ public function __construct(?Config $config = null, ?Get $get = null, ?Set$set = null, ?Find $find = null, ?Replace $replace = null, - ?Search $search = null) + ?Search $search = null, ?Update $update = null) { $this->config = $config ?: Factory::_('Config'); $this->get = $get ?: Factory::_('Get.Database'); @@ -98,6 +107,65 @@ public function __construct(?Config $config = null, ?Get $get = null, $this->find = $find ?: Factory::_('Agent.Find'); $this->replace = $replace ?: Factory::_('Agent.Replace'); $this->search = $search ?: Factory::_('Agent.Search'); + $this->update = $update ?: Factory::_('Agent.Update'); + } + + /** + * Get the value of a field in a row and table + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param mixed $line The field line + * @param string|null $table The table + * @param bool $update The switch to triger an update (default is false) + * + * @return mixed + * @since 3.2.0 + */ + public function getValue(int $id, string $field, $line = null, + ?string $table = null, bool $update = false) + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if (($value = $this->get->value($id, $field, $table)) !== null) + { + // try to update the value if required + if ($update && ($updated_value = $this->update->value($value, $line)) !== null) + { + return $updated_value; + } + + return $value; + } + + return null; + } + + /** + * Set the value of a field in a row and table + * + * @param mixed $value The field value + * @param int $id The item ID + * @param string $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + public function setValue($value, int $id, string $field, ?string $table = null): bool + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + return $this->set->value($value, $id, $field, $table); } /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php index 70bdc5f7e..e1e52e892 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Database/Get.php @@ -87,17 +87,17 @@ public function __construct(?Config $config = null, ?Table $table = null, } /** - * Get values from a given table + * Get a value from a given table * Example: $this->value(23, 'value_key', 'table_name'); * - * @param string $field The field key * @param int $id The item ID + * @param string $field The field key * @param string|null $table The table * * @return mixed * @since 3.2.0 */ - public function value(string $field, int $id, string $table = null) + public function value(int $id, string $field, string $table = null) { // load the table if (empty($table)) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php similarity index 92% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php index a2959ad30..c7d19a988 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php @@ -9,14 +9,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VDM\Joomla\Componentbuilder\Search\Type; +namespace VDM\Joomla\Componentbuilder\Search\Engine; use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Componentbuilder\Search\Interfaces\SearchTypeInterface; -use VDM\Joomla\Componentbuilder\Search\Abstraction\Type; +use VDM\Joomla\Componentbuilder\Search\Abstraction\Engine; /** @@ -24,7 +24,7 @@ * * @since 3.2.0 */ -class Basic extends Type implements SearchTypeInterface +class Basic extends Engine implements SearchTypeInterface { /** * Regex Search Value diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Regex.php similarity index 89% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Regex.php index 19bd68a69..c2a89b872 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Regex.php @@ -9,14 +9,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VDM\Joomla\Componentbuilder\Search\Type; +namespace VDM\Joomla\Componentbuilder\Search\Engine; use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Componentbuilder\Search\Interfaces\SearchTypeInterface; -use VDM\Joomla\Componentbuilder\Search\Abstraction\Type; +use VDM\Joomla\Componentbuilder\Search\Abstraction\Engine; /** @@ -24,7 +24,7 @@ * * @since 3.2.0 */ -class Regex extends Type implements SearchTypeInterface +class Regex extends Engine implements SearchTypeInterface { /** * Regex Search Value diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/index.html similarity index 100% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/index.html rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/index.html diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php index 9085109e8..0ad634810 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Search.php @@ -17,8 +17,8 @@ use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Componentbuilder\Search\Table; use VDM\Joomla\Componentbuilder\Search\Interfaces\SearchTypeInterface as SearchEngine; -use VDM\Joomla\Componentbuilder\Search\Type\Regex; -use VDM\Joomla\Componentbuilder\Search\Type\Basic; +use VDM\Joomla\Componentbuilder\Search\Engine\Regex; +use VDM\Joomla\Componentbuilder\Search\Engine\Basic; /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php index d9c3fa440..f30bb7c26 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Table.php @@ -2981,14 +2981,15 @@ public function tables(): array } /** - * Check if a table exist + * Check if a table (and field) exist * * @param string|null $table The area + * @param string|null $field The area * * @return bool * @since 3.2.0 */ - public function exist(?string $table = null): bool + public function exist(?string $table = null, ?string $field = null): bool { // load the table if (empty($table)) @@ -2996,9 +2997,20 @@ public function exist(?string $table = null): bool $table = $this->config->table_name; } - if (isset($table) && isset($this->tables[$table])) + if (is_string($table) && isset($this->tables[$table])) { - return true; + // if we have a field + if (is_string($field)) + { + if (isset($this->tables[$table][$field])) + { + return true; + } + } + else + { + return true; + } } return false; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php index baa6c42b1..91a3a61a5 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php @@ -33,11 +33,12 @@ abstract class GetHelper * @param string $operator The operator between $whereString/field and $where/value * @param string $main The component in which the table is found * - * @return mix string/int/float - * + * @return mixed string/int/float * @since 3.0.9 */ - public static function var($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = null) + public static function var(string $table, ?string $where = null, + string $whereString = 'user', string $what = 'id', + string $operator = '=', ?string $main = null) { if(empty($where)) { @@ -85,6 +86,7 @@ public static function var($table, $where = null, $whereString = 'user', $what = { return $db->loadResult(); } + return false; } @@ -99,11 +101,12 @@ public static function var($table, $where = null, $whereString = 'user', $what = * @param string $main The component in which the table is found * @param bool $unique The switch to return a unique array * - * @return array - * + * @return array|null * @since 3.0.9 */ - public static function vars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = null, $unique = true) + public static function vars(string $table, ?string $where = null, + string $whereString = 'user', string $what = 'id', string $operator = 'IN', + ?string $main = null, bool $unique = true): ?array { if(empty($where)) { @@ -147,11 +150,11 @@ public static function vars($table, $where = null, $whereString = 'user', $what // add strings to array search if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator) { - $query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")'); + $query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","', $where) . '")'); } else { - $query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')'); + $query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',', $where) . ')'); } $db->setQuery($query); @@ -166,71 +169,83 @@ public static function vars($table, $where = null, $whereString = 'user', $what return $db->loadColumn(); } } - return false; + + return null; } /** * get all strings between two other strings * - * @param string $content The content to search - * @param string $start The starting value - * @param string $end The ending value + * @param string $content The content to search + * @param string $start The starting value + * @param string $end The ending value * - * @return array On success - * + * @return array|null On success * @since 3.0.9 */ - public static function allBetween($content, $start, $end) + public static function allBetween(string $content, string $start, string $end): ?array { // reset bucket - $bucket = array(); + $bucket = []; for ($i = 0; ; $i++) { // search for string - $found = self::between($content,$start,$end); + $found = self::between($content, $start, $end); + if (StringHelper::check($found)) { // add to bucket $bucket[] = $found; + // build removal string - $remove = $start.$found.$end; + $remove = $start . $found . $end; + // remove from content - $content = str_replace($remove,'',$content); + $content = str_replace($remove, '', $content); } else { break; } + // safety catch if ($i == 500) { break; } } + // only return unique array of values - return array_unique($bucket); + if (ArrayHelper::check($bucket)) + { + return array_unique($bucket); + } + + return null; } /** * get a string between two other strings * - * @param string $content The content to search - * @param string $start The starting value - * @param string $end The ending value - * @param string $default The default value if none found + * @param string $content The content to search + * @param string $start The starting value + * @param string $end The ending value + * @param string $default The default value if none found * * @return string On success / empty string on failure - * * @since 3.0.9 */ - public static function between($content, $start, $end, $default = '') + public static function between(string $content, string $start, string $end, string $default = ''): string { - $r = explode($start, $content); - if (isset($r[1])) + $array = explode($start, $content); + if (isset($array[1]) && strpos($array[1], $end) !== false) { - $r = explode($end, $r[1]); - return $r[0]; + $array = explode($end, $array[1]); + + // return string found between + return $array[0]; } + return $default; } From 869a1879cb63bb961457dc322068c6afea50f019 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 23 Oct 2022 23:18:02 +0200 Subject: [PATCH 14/75] Moved some class around for better structure in the jcb_powers of JCB. Fixed small issue with JCB package export. --- README.md | 10 ++-- admin/README.txt | 10 ++-- .../en-GB/en-GB.com_componentbuilder.ini | 1 + admin/models/joomla_components.php | 11 +++++ admin/models/powers.php | 2 +- admin/sql/install.mysql.utf8.sql | 2 +- admin/views/search/tmpl/default.php | 4 ++ componentbuilder.xml | 6 +-- componentbuilder_update_server.xml | 4 +- .../{Registry.php => BaseConfig.php} | 4 +- .../Abstraction/BaseRegistry.php | 49 +++++++++++++++++++ .../src/Componentbuilder/Compiler/Config.php | 4 +- .../src/Componentbuilder/Compiler/Factory.php | 35 ++++++++----- .../Componentbuilder/Compiler/Registry.php | 27 +--------- .../src/Componentbuilder/Search/Config.php | 4 +- .../src/Componentbuilder/Search/Factory.php | 12 +++-- .../VDM.Joomla/src/Utilities/GetHelper.php | 30 ++++++------ script.php | 2 +- 18 files changed, 136 insertions(+), 81 deletions(-) rename libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/{Registry.php => BaseConfig.php} (94%) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseRegistry.php diff --git a/README.md b/README.md index 3910a0eee..fce66bb47 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.1.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.1.9) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -140,13 +140,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th October, 2022 -+ *Version*: 3.1.8 ++ *Last Build*: 23rd October, 2022 ++ *Version*: 3.1.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **332785** ++ *Line count*: **332840** + *Field count*: **2004** -+ *File count*: **2173** ++ *File count*: **2174** + *Folder count*: **378** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 3910a0eee..fce66bb47 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.1.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.1.9) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -140,13 +140,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th October, 2022 -+ *Version*: 3.1.8 ++ *Last Build*: 23rd October, 2022 ++ *Version*: 3.1.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **332785** ++ *Line count*: **332840** + *Field count*: **2004** -+ *File count*: **2173** ++ *File count*: **2174** + *Folder count*: **378** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 19e0214b1..cfb5142f5 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -9215,6 +9215,7 @@ COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_RETURN_ANY_DATA="The url (%s) set to retrieve the packages does not return any data!" COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your JCB system has internet connection." COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" +COM_COMPONENTBUILDER_THIS_AREA_IS_STILL_UNDER_DEVELOPMENT_AND_DOES_NOT_WORK="This area is still under development and does not work." COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This %s is not linked to any other areas of JCB at this time!" COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT="This may take a while depending on the size of your project." COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package PASSED the checksum validation!

Manually also validate that the correct checksum was used.
This checksum: %s must be the same as the one found @ " diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 64d70fde8..145aa306d 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -693,17 +693,26 @@ protected function setData($table, $values, $key, $string = false) { $values = json_decode($values, true); } + // let's check for just a string or int + elseif (is_string($values) || (is_numeric($values) && $values > 0)) + { + $values = [$values]; + } + // make sure we have an array of values if (!ComponentbuilderHelper::checkArray($values, true) || !ComponentbuilderHelper::checkString($table) || !ComponentbuilderHelper::checkString($key)) { return false; } + // start the query $query = $this->_db->getQuery(true); // Select some fields $query->select(array('a.*')); + // From the componentbuilder_ANY table $query->from($this->_db->quoteName('#__componentbuilder_'. $table, 'a')); + // check if this is an array of integers if ($this->is_numeric($values)) { @@ -722,12 +731,14 @@ protected function setData($table, $values, $key, $string = false) return $this->_db->quote($var); }, $values)) . ')'); } + // Implement View Level Access if (!$this->user->authorise('core.options', 'com_componentbuilder')) { $groups = implode(',', $this->user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } + // Order the results by ordering $query->order('a.ordering ASC'); // Load the items diff --git a/admin/models/powers.php b/admin/models/powers.php index 9a3f0a281..ddeb3149d 100644 --- a/admin/models/powers.php +++ b/admin/models/powers.php @@ -271,7 +271,7 @@ protected function getListQuery() else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.system_name LIKE '.$search.' OR a.type LIKE '.$search.' OR a.description LIKE '.$search.' OR a.extends_custom LIKE '.$search.' OR a.extends LIKE '.$search.' OR a.name LIKE '.$search.')'); + $query->where('(a.system_name LIKE '.$search.' OR a.type LIKE '.$search.' OR a.description LIKE '.$search.' OR a.extends_custom LIKE '.$search.' OR a.extends LIKE '.$search.' OR a.guid LIKE '.$search.' OR a.name LIKE '.$search.')'); } } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index aa399d72b..a01155039 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1983,7 +1983,7 @@ INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `exten (14, '', 'Control the naming of a namespace helper\r\n\r\n@since 3.0.9', '', '', 'ce8cf834-6bac-44fb-941c-861f7e046cc0', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBuYW1lc3BhY2Ugc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJHN0cmluZykNCgl7DQoJCS8vIDBubHkgY29udGludWUgaWYgd2UgaGF2ZSBhIHN0cmluZw0KCQlpZiAoU3RyaW5nSGVscGVyOjpjaGVjaygkc3RyaW5nKSkNCgkJew0KCQkJLy8gbWFrZSBzdXJlIGl0IGhhcyBub3QgbnVtYmVycw0KCQkJJHN0cmluZyA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkc3RyaW5nKTsNCg0KCQkJLy8gVHJhbnNsaXRlcmF0ZSBzdHJpbmcgVE9ETzogbG9vayBhZ2FpbiBhcyB0aGlzIG1ha2UgaXQgbG93ZXJjYXNlDQoJCQkvLyAkc3RyaW5nID0gU3RyaW5nSGVscGVyOjp0cmFuc2xpdGVyYXRlKCRzdHJpbmcpOw0KDQoJCQkvLyBmaXJzdCByZW1vdmUgYWxsIFtcXSBiYWNrc2xhc2hlcw0KCQkJJHN0cmluZyA9IHN0cl9yZXBsYWNlKCdcXCcsICcxJywgJHN0cmluZyk7DQoNCgkJCS8vIHJlbW92ZSBhbGwgYW5kIGtlZXAgb25seSBjaGFyYWN0ZXJzIGFuZCBbXF0gYmFja3NsYXNoZXMgaW5zaWRlIG9mIHRoZSBzdHJpbmcNCgkJCSRzdHJpbmcgPSB0cmltKCBwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejFdLyIsICcnLCAkc3RyaW5nKSwgJzEnKTsNCg0KCQkJLy8gcGxhY2UgdGhlIFtcXSBiYWNrc2xhc2hlcyBiYWNrDQoJCQlyZXR1cm4gdHJpbSggcHJlZ19yZXBsYWNlKCIvMSsvIiwgJ1xcJywgJHN0cmluZykpOw0KCQl9DQoJCS8vIG5vdCBhIHN0cmluZw0KCQlyZXR1cm4gJyc7DQoJfQ0K', '{}', 'NamespaceHelper', 'VDM\\Joomla\\Utilities.String.NamespaceHelper', '1.0.0', '{}', 'String Namespace Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:27:57', '2022-09-20 10:09:58', 16, 5), (15, 1, 'Control the naming of a field type\r\n\r\n@since 3.0.9', '', '', 'a8935cbe-7701-40dc-bfd5-675f2d600954', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0K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ew0KCQkJCQkkc3RyaW5nID0gU3RyaW5nSGVscGVyOjpudW1iZXJzKCRzdHJpbmcpOw0KCQkJCX0NCg0KCQkJCS8vIFRyYW5zbGl0ZXJhdGUgc3RyaW5nDQoJCQkJJHN0cmluZyA9IFN0cmluZ0hlbHBlcjo6dHJhbnNsaXRlcmF0ZSgkc3RyaW5nKTsNCg0KCQkJCS8vIHJlbW92ZSBhbGwgYW5kIGtlZXAgb25seSBjaGFyYWN0ZXJzIGFuZCBudW1iZXJzIGFuZCBwb2ludCAoVE9ETyBqdXN0IG9uZSBwb2ludCkNCgkJCQkkc3RyaW5nID0gdHJpbShwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejAtOVwuXS8iLCAnJywgJHN0cmluZykpOw0KDQoJCQkJLy8gYmVzdCBpcyB0byByZXR1cm4gbG93ZXIgKGZvciBhbGwgc3RyaW5nIGVxdWFsaXR5IGluIGNvbXBpbGVyKQ0KCQkJCXJldHVybiBzdHJ0b2xvd2VyKCRzdHJpbmcpOw0KCQkJfQ0KCQkJLy8gbm90IGEgc3RyaW5nDQoJCQlyZXR1cm4gJyc7DQoJCX0NCg0KCQkvLyB1c2UgdGhlIGRlZmF1bHQgKG9yaWdpbmFsIGJlaGF2aW91ci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'TypeHelper', 'VDM\\Joomla\\Utilities.String.TypeHelper', '1.0.0', '{}', 'String Type Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:33:09', '2022-09-20 10:10:03', 15, 5), (16, '', 'Control the naming of a class and function\r\n\r\n@since 3.0.9', '', '', '30c5b4c2-f75f-4d15-869a-f8bfedd87358', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBjbGFzcyBvciBmdW5jdGlvbiBuYW1lIHNhZmUNCgkgKg0KCSAqIEBpbnB1dAlzdHJpbmcgICAgICAgVGhlIG5hbWUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJG5hbWUpDQoJew0KCQkvLyByZW1vdmUgbnVtYmVycyBpZiB0aGUgZmlyc3QgY2hhcmFjdGVyIGlzIGEgbnVtYmVyDQoJCWlmIChpc19udW1lcmljKHN1YnN0cigkbmFtZSwgMCwgMSkpKQ0KCQl7DQoJCQkkbmFtZSA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkbmFtZSk7DQoJCX0NCg0KCQkvLyByZW1vdmUgYWxsIHNwYWNlcyBhbmQgc3RyYW5nZSBjaGFyYWN0ZXJzDQoJCXJldHVybiB0cmltKHByZWdfcmVwbGFjZSgiL1teQS1aYS16MC05Xy1dLyIsICcnLCAkbmFtZSkpOw0KCX0NCg==', '{}', 'ClassfunctionHelper', 'VDM\\Joomla\\Utilities.String.ClassfunctionHelper', '1.0.0', '{}', 'String Classfunction Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:43:10', '2022-09-20 10:10:07', 15, 5), -(17, 1, 'Some easy get...\r\n\r\n@since 3.0.9', '', '', 'db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIEdldCBh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1.0.0', '{}', 'Utilities GetHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-09 00:21:06', '2022-10-20 14:18:47', 24, 9), +(17, 1, 'Some easy get...\r\n\r\n@since 3.0.9', '', '', 'db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIEdldCBhIFZhcmlhYmxlIA0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nfG51bGwgICR0YWJsZSAgICAgICAgVGhlIHRhYmxlIGZyb20gd2hpY2ggdG8gZ2V0IHRoZSB2YXJpYWJsZQ0KCSAqIEBwYXJhbSAgIG1peGVkICAgICAgICAkd2hlcmUgICAgICAgIFRoZSB2YWx1ZSB3aGVyZQ0KCSAqIEBwYXJhbSAgIHN0cmluZyAgICAgICAkd2hlcmVTdHJpbmcgIFRoZSB0YXJnZXQvZmllbGQgc3RyaW5nIHdoZXJlL25hbWUNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAgICAgJHdoYXQgICAgICAgICBUaGUgcmV0dXJuIGZpZWxkDQoJICogQHBhcmFtICAgc3RyaW5nICAgICAgICRvcGVyYXRvciAgICAgVGhlIG9wZXJhdG9yIGJldHdlZW4gJHdoZXJlU3RyaW5nL2ZpZWxkIGFuZCAkd2hlcmUvdmFsdWUNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAgICAgJG1haW4gICAgICAgICBUaGUgY29tcG9uZW50IGluIHdoaWNoIHRoZSB0YWJsZSBpcyBmb3VuZA0KCSAqDQoJICogQHJldHVybiAgbWl4ZWQgc3RyaW5nL2ludC9mbG9hdA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgK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RyaW5nICRzdGFydCwgc3RyaW5nICRlbmQsIHN0cmluZyAkZGVmYXVsdCA9ICcnKTogc3RyaW5nDQoJew0KCQkkYXJyYXkgPSBleHBsb2RlKCRzdGFydCwgJGNvbnRlbnQpOw0KCQlpZiAoaXNzZXQoJGFycmF5WzFdKSAmJiBzdHJwb3MoJGFycmF5WzFdLCAkZW5kKSAhPT0gZmFsc2UpDQoJCXsNCgkJCSRhcnJheSA9IGV4cGxvZGUoJGVuZCwgJGFycmF5WzFdKTsNCg0KCQkJLy8gcmV0dXJuIHN0cmluZyBmb3VuZCBiZXR3ZWVuDQoJCQlyZXR1cm4gJGFycmF5WzBdOw0KCQl9DQoNCgkJcmV0dXJuICRkZWZhdWx0Ow0KCX0NCg==', '{}', 'GetHelper', 'VDM\\Joomla\\Utilities.GetHelper', '1.0.0', '{}', 'Utilities GetHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-09 00:21:06', '2022-10-21 15:26:39', 27, 9), (18, '', 'Some object tricks\r\n\r\n@since 3.0.9', '', '', '91004529-94a9-4590-b842-e7c6b624ecf5', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gb2JqZWN0IHdpdGggYSBsZW5ndGgNCgkgKg0KCSAqIEBpbnB1dAlvYmplY3QgICBUaGUgb2JqZWN0IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRvYmplY3QpDQoJew0KCQlpZiAoaXNfb2JqZWN0KCRvYmplY3QpKQ0KCQl7DQoJCQlyZXR1cm4gY291bnQoKGFycmF5KSAkb2JqZWN0KSA+IDA7DQoJCX0NCg0KCQlyZXR1cm4gZmFsc2U7DQoJfQ0K', '{}', 'ObjectHelper', 'VDM\\Joomla\\Utilities.ObjectHelper', '1.0.0', '{}', 'Utilities Object Helper', 'abstract class', '{}', '', 1, '2022-03-09 00:35:23', '2022-09-20 09:51:31', 15, 8), (19, '', 'Basic Math Helper\r\n\r\n@since 3.0.9', '', '', '152c8793-8b75-4715-996a-257b9f65451c', '', '', '', '{}', 'CS8qKg0KCSAqIGJjIG1hdGggd3JhcHBlciAodmVyeSBiYXNpYyBub3QgZm9yIGFjY291bnRpbmcpDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAkdHlwZSAgICBUaGUgdHlwZSBiYyBtYXRoDQoJICogQHBhcmFtICAgaW50ICAgICAgJHZhbDEgICAgVGhlIGZpcnN0IHZhbHVlDQoJICogQHBhcmFtICAgaW50ICAgICAgJHZhbDIgICAgVGhlIHNlY29uZCB2YWx1ZQ0KCSAqIEBwYXJhbSAgIGludCAgICAgICRzY2FsZSAgIFRoZSBzY2FsZSB2YWx1ZQ0KCSAqDQoJICogQHJldHVybiBpbnQNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBiYygkdHlwZSwgJHZhbDEsICR2YWwyLCAkc2NhbGUgPSAwKQ0KCXsNCgkJLy8gYnVpbGQgZnVuY3Rpb24gbmFtZQ0KCQkkZnVuY3Rpb24gPSAnYmMnIC4gJHR5cGU7DQoJCS8vIHVzZSB0aGUgYmNtYXRoIGZ1bmN0aW9uIGlmIGF2YWlsYWJsZQ0KCQlpZiAoZnVuY3Rpb25fZXhpc3RzKCRmdW5jdGlvbikpDQoJCXsNCgkJCXJldHVybiAkZnVuY3Rpb24oJHZhbDEsICR2YWwyLCAkc2NhbGUpOw0KCQl9DQoJCS8vIGlmIGZ1bmN0aW9uIGRvZXMgbm90IGV4aXN0IHdlIHVzZSArLSovIG9wZXJhdG9ycyAoZmFsbGJhY2sgLSBub3QgaWRlYWwpDQoJCXN3aXRjaCAoJHR5cGUpDQoJCXs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F5ICAgJGFycmF5ICAgIFRoZSB2YWx1ZXMgdG8gc3VtDQoJICogQHBhcmFtICAgaW50ICAgICAgJHNjYWxlICAgVGhlIHNjYWxlIHZhbHVlDQoJICoNCgkgKiBAcmV0dXJuIGZsb2F0DQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc3VtKCRhcnJheSwgJHNjYWxlID0gNCkNCgl7DQoJCS8vIHVzZSB0aGUgYmNhZGQgZnVuY3Rpb24gaWYgYXZhaWxhYmxlDQoJCWlmIChmdW5jdGlvbl9leGlzdHMoJ2JjYWRkJykpDQoJCXsNCgkJCS8vIHNldCB0aGUgc3RhcnQgdmFsdWUNCgkJCSR2YWx1ZSA9IDAuMDsNCgkJCS8vIGxvb3AgdGhlIHZhbHVlcyBhbmQgcnVuIGJjYWRkDQoJCQlmb3JlYWNoKCRhcnJheSBhcyAkdmFsKQ0KCQkJew0KCQkJCSR2YWx1ZSA9IGJjYWRkKCR2YWx1ZSwgJHZhbCwgJHNjYWxlKTsNCgkJCX0NCgkJCXJldHVybiAkdmFsdWU7DQoJCX0NCgkJLy8gZmFsbCBiYWNrIG9uIGFycmF5IHN1bQ0KCQlyZXR1cm4gYXJyYXlfc3VtKCRhcnJheSk7DQoJfQ0K', '{}', 'MathHelper', 'VDM\\Joomla\\Utilities.MathHelper', '1.0.0', '{}', 'Utilities Math Helper', 'abstract class', '{}', '', 1, '2022-03-09 13:05:39', '2022-09-20 09:51:26', 11, 9), (20, '', 'Control the naming of a plugin\r\n\r\n@since 3.0.9', '', '', '3cf76fbf-fd95-4a33-878e-7aff6d36b7f6', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBwbHVnaW4gZm9sZGVyIG5hbWUgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAkY29kZU5hbWUgICBUaGUgbmFtZQ0KCSAqIEBpbnB1dAlzdHJpbmcgICAgJGdyb3VwICAgVGh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45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBzYWZlTGFuZ1ByZWZpeCgkY29kZU5hbWUsICRncm91cCkNCgl7DQoJCS8vIGVkaXRvcnMteHRkIGdyb3VwIHBsdWdpbnMgbXVzdCBoYXZlIGEgY2xhc3Mgd2l0aCBwbGdCdXR0b248UGx1Z2luTmFtZT4gc3RydWN0dXJlDQoJCWlmICgkZ3JvdXAgPT09ICdlZGl0b3JzLXh0ZCcpDQoJCXsNCgkJCSRncm91cCA9ICdCdXR0b24nOw0KCQl9DQoNCgkJcmV0dXJuICdQTEdfJyAuIHN0cnRvdXBwZXIoJGdyb3VwKSAuICdfJyAuIHN0cnRvdXBwZXIoDQoJCQkkY29kZU5hbWUNCgkJKTsNCgl9DQo=', '{}', 'PluginHelper', 'VDM\\Joomla\\Utilities.String.PluginHelper', '1.0.0', '{}', 'String Plugin Helper', 'abstract class', '{}', '', 1, '2022-03-09 14:44:58', '2022-09-20 10:10:12', 14, 5), diff --git a/admin/views/search/tmpl/default.php b/admin/views/search/tmpl/default.php index a19313068..90394fe94 100644 --- a/admin/views/search/tmpl/default.php +++ b/admin/views/search/tmpl/default.php @@ -37,6 +37,10 @@ item->id)) ? '&id='. (int) $this->item->id : ''; ?> + +
sidebar)): ?>
sidebar; ?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 840ddb7db..4382d26e3 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 20th October, 2022 + 23rd October, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 3.1.8 + 3.1.9 Component Builder (v.3.1.8) +

Component Builder (v.3.1.9)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index cce9c4b17..8e3c099fc 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -1097,10 +1097,10 @@ pkg_component_builder package site - 3.1.8 + 3.1.9 https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.1.8.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.1.9.zip stable diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php similarity index 94% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php index b3a36519f..4cfe4a71b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php @@ -20,11 +20,11 @@ /** - * Registry + * Config * * @since 3.2.0 */ -abstract class Registry extends JoomlaRegistry +abstract class BaseConfig extends JoomlaRegistry { /** * Hold a JInput object for easier access to the input variables. diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseRegistry.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseRegistry.php new file mode 100644 index 000000000..105b818a0 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/BaseRegistry.php @@ -0,0 +1,49 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Abstraction; + + +use Joomla\Registry\Registry as JoomlaRegistry; + + +/** + * Registry + * + * So we have full control over this class + * + * @since 3.2.0 + */ +abstract class BaseRegistry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable +{ + /** + * Method to iterate over any part of the registry + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * + * @return \ArrayIterator This object represented as an ArrayIterator. + * + * @since 3.4.0 + */ + public function _($path) + { + $data = $this->extract($path); + + if ($data === null) + { + return null; + } + + return $data->getIterator(); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index aeff2fe86..59a3e5e2c 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -14,7 +14,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Componentbuilder\Abstraction\Registry; +use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; /** @@ -22,7 +22,7 @@ * * @since 3.2.0 */ -class Config extends Registry +class Config extends BaseConfig { /** * get posted component id diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php index 6fa761580..135c4b9d4 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php @@ -13,6 +13,16 @@ use Joomla\DI\Container; +use VDM\Joomla\Componentbuilder\Compiler\Service\Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Service\Event; +use VDM\Joomla\Componentbuilder\Compiler\Service\History; +use VDM\Joomla\Componentbuilder\Compiler\Service\Language; +use VDM\Joomla\Componentbuilder\Compiler\Service\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Service\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Service\Power; +use VDM\Joomla\Componentbuilder\Compiler\Service\Component; +use VDM\Joomla\Componentbuilder\Compiler\Service\Extension; +use VDM\Joomla\Componentbuilder\Compiler\Service\Field; /** @@ -43,7 +53,7 @@ abstract class Factory * * @param string $key The container class key * - * @return Mixed + * @return mixed * @since 3.2.0 */ public static function _($key) @@ -56,7 +66,7 @@ public static function _($key) * * @param string $key The container class key * - * @return Mixed + * @return mixed * @since 3.2.0 */ public static function _J($key) @@ -94,20 +104,19 @@ public static function getContainer(): Container protected static function createContainer(): Container { $container = (new Container()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Compiler()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Event()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\History()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Language()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Placeholder()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Customcode()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Power()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Component()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Extension()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Field()); + ->registerServiceProvider(new Compiler()) + ->registerServiceProvider(new Event()) + ->registerServiceProvider(new History()) + ->registerServiceProvider(new Language()) + ->registerServiceProvider(new Placeholder()) + ->registerServiceProvider(new Customcode()) + ->registerServiceProvider(new Power()) + ->registerServiceProvider(new Component()) + ->registerServiceProvider(new Extension()) + ->registerServiceProvider(new Field()); return $container; } - } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php index 0400c1782..a0cfeb17a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Registry.php @@ -12,18 +12,16 @@ namespace VDM\Joomla\Componentbuilder\Compiler; -use Joomla\Registry\Registry as JoomlaRegistry; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Abstraction\BaseRegistry; /** * Compiler Registry * - * So we have full control over this class - * * @since 3.2.0 */ -class Registry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable +class Registry extends BaseRegistry { /** * Default indentation value @@ -33,27 +31,6 @@ class Registry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess */ protected $indent = 2; - /** - * Method to iterate over any part of the registry - * - * @param string $path Registry path (e.g. joomla.content.showauthor) - * - * @return \ArrayIterator This object represented as an ArrayIterator. - * - * @since 3.4.0 - */ - public function _($path) - { - $data = $this->extract($path); - - if ($data === null) - { - return null; - } - - return $data->getIterator(); - } - /** * Method to export a set of values to a PHP array * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php index 7a9690c0a..aef0bc5b7 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Search; -use VDM\Joomla\Componentbuilder\Abstraction\Registry; +use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; /** @@ -20,7 +20,7 @@ * * @since 3.2.0 */ -class Config extends Registry +class Config extends BaseConfig { /** * get posted search value diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php index e07a0fd91..54c2e9e18 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Factory.php @@ -13,6 +13,10 @@ use Joomla\DI\Container; +use VDM\Joomla\Componentbuilder\Search\Service\Search; +use VDM\Joomla\Componentbuilder\Search\Service\Model; +use VDM\Joomla\Componentbuilder\Search\Service\Database; +use VDM\Joomla\Componentbuilder\Search\Service\Agent; /** @@ -68,10 +72,10 @@ public static function getContainer(): Container protected static function createContainer(): Container { $container = (new Container()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Search()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Model()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Database()) - ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Search\Service\Agent()); + ->registerServiceProvider(new Search()) + ->registerServiceProvider(new Model()) + ->registerServiceProvider(new Database()) + ->registerServiceProvider(new Agent()); return $container; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php index 91a3a61a5..f58409767 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/GetHelper.php @@ -26,17 +26,17 @@ abstract class GetHelper /** * Get a Variable * - * @param string $table The table from which to get the variable - * @param string $where The value where - * @param string $whereString The target/field string where/name - * @param string $what The return field - * @param string $operator The operator between $whereString/field and $where/value - * @param string $main The component in which the table is found + * @param string|null $table The table from which to get the variable + * @param mixed $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found * * @return mixed string/int/float * @since 3.0.9 */ - public static function var(string $table, ?string $where = null, + public static function var(?string $table = null, $where = null, string $whereString = 'user', string $what = 'id', string $operator = '=', ?string $main = null) { @@ -93,18 +93,18 @@ public static function var(string $table, ?string $where = null, /** * Get array of variables * - * @param string $table The table from which to get the variables - * @param string $where The value where - * @param string $whereString The target/field string where/name - * @param string $what The return field - * @param string $operator The operator between $whereString/field and $where/value - * @param string $main The component in which the table is found - * @param bool $unique The switch to return a unique array + * @param string|null $table The table from which to get the variables + * @param mixed $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * @param bool $unique The switch to return a unique array * * @return array|null * @since 3.0.9 */ - public static function vars(string $table, ?string $where = null, + public static function vars(?string $table = null, $where = null, string $whereString = 'user', string $what = 'id', string $operator = 'IN', ?string $main = null, bool $unique = true): ?array { diff --git a/script.php b/script.php index 259113b68..080711acf 100644 --- a/script.php +++ b/script.php @@ -9422,7 +9422,7 @@ function validGUID ($guid, &$usedGUID) echo ' -

Upgrade to Version 3.1.8 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 3.1.9 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) From f2ea22d0ad4dac154ffca9ece9dd4502b848c4ee Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 31 Oct 2022 00:34:54 +0200 Subject: [PATCH 15/75] Continued development on the search feature --- README.md | 8 +- admin/README.txt | 8 +- admin/assets/js/search.js | 358 ++--- admin/controllers/ajax.json.php | 12 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 + admin/layouts/rows.php | 43 + admin/layouts/table.php | 72 + admin/models/ajax.php | 35 +- admin/sql/install.mysql.utf8.sql | 4 +- admin/views/search/tmpl/default.php | 142 +- admin/views/search/view.html.php | 62 +- componentbuilder.xml | 3 +- .../src/Componentbuilder/Search/Agent.php | 174 ++- .../Componentbuilder/Search/Engine/Basic.php | 2 +- .../Search/Interfaces/GetInterface.php | 6 +- .../Componentbuilder/Search/Service/Agent.php | 4 +- .../VDM.Joomla/src/Utilities/StringHelper.php | 4 +- media/datatable/css/datatables.min.css | 57 + media/datatable/css/index.html | 1 + media/datatable/index.html | 1 + media/datatable/js/datatables.min.js | 1238 +++++++++++++++++ media/datatable/js/index.html | 1 + media/datatable/js/pdfmake.min.js | 3 + media/datatable/js/vfs_fonts.js | 6 + 24 files changed, 1903 insertions(+), 343 deletions(-) create mode 100644 admin/layouts/rows.php create mode 100644 admin/layouts/table.php create mode 100644 media/datatable/css/datatables.min.css create mode 100644 media/datatable/css/index.html create mode 100644 media/datatable/index.html create mode 100644 media/datatable/js/datatables.min.js create mode 100644 media/datatable/js/index.html create mode 100644 media/datatable/js/pdfmake.min.js create mode 100644 media/datatable/js/vfs_fonts.js diff --git a/README.md b/README.md index fce66bb47..a3130edd2 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 23rd October, 2022 ++ *Last Build*: 30th October, 2022 + *Version*: 3.1.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **332840** ++ *Line count*: **333093** + *Field count*: **2004** -+ *File count*: **2174** -+ *Folder count*: **378** ++ *File count*: **2183** ++ *Folder count*: **381** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index fce66bb47..a3130edd2 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,14 +140,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 23rd October, 2022 ++ *Last Build*: 30th October, 2022 + *Version*: 3.1.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **332840** ++ *Line count*: **333093** + *Field count*: **2004** -+ *File count*: **2174** -+ *Folder count*: **378** ++ *File count*: **2183** ++ *Folder count*: **381** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/assets/js/search.js b/admin/assets/js/search.js index 0b439743f..d82a07a7d 100644 --- a/admin/assets/js/search.js +++ b/admin/assets/js/search.js @@ -14,38 +14,36 @@ */ const doSearch = async (signal, tables) => { try { - let searchValue = document.querySelector('input[name="search_value"]').value; - let replaceValue = document.querySelector('input[name="replace_value"]').value; + // build form + const formData = new FormData(); + + // load the result table + const resultsTable = new DataTable('#search_results_table'); + + // set some search values + let searchValue = searchObject.value; + let replaceValue = replaceObject.value; + + // add the form data + formData.append('table_name', ''); + formData.append('search_value', searchValue); + formData.append('replace_value', replaceValue); + formData.append('match_case', matchObject.checked ? 1 : 0); + formData.append('whole_word', wholeObject.checked ? 1 : 0); + formData.append('regex_search', regexObject.checked ? 1 : 0); - // Display 'loading' message in search results message div - document.getElementById('search-mssg-box').innerHTML = - '' + - '
' + - ' 0% ' + - 'Loading for search text: ' + searchValue + '' - ; - // Clear results table - let search_loading_percent = document.getElementById('search-loading-percent'); - let tbl_obj_body = document.getElementById('search-results-tbl-tbody'); - tbl_obj_body.innerHTML = ''; let abort_this_search_value = false; let total = 0; let index; - for (index = 0; index < searchTables.length; index++) { - const formData = new FormData(); - let tableName = searchTables[index]; + for (index = 0; index < tables.length; index++) { - formData.append('table_name', ''); - formData.append('search_value', searchValue); - formData.append('replace_value', replaceValue); - formData.append('match_case', document.querySelector('input[name="match_case"]').checked ? 1 : 0); - formData.append('whole_word', document.querySelector('input[name="whole_word"]').checked ? 1 : 0); - formData.append('regex_search', document.querySelector('input[name="regex_search"]').checked ? 1 : 0); - formData.append('table_name', tableName); + let tableName = tables[index]; + + // add the table name + formData.set('table_name', tableName); - let url = document.getElementById('adminForm').getAttribute('action') + '&layout=dosearch'; let options = { signal: signal, method: 'POST', // *GET, POST, PUT, DELETE, etc. @@ -56,71 +54,19 @@ const doSearch = async (signal, tables) => { console.log('Aborting this searchValue:' + searchValue); break; } - console.log(total + ' -- SEARCHING: ' + searchValue + ' @[' + tableName + ']'); - const response = await fetch(url, options) - // Note: response.text() is a promise ... - .then(response => { - total++; - //console.log(total + ' ' + sTables.length); - if (sTables.length == total) setTimeout(function () { - document.getElementById('search-mssg-box').innerHTML = ''; - }, 200); - - response.text().then(data => { - console.log('++ Fetched for ' + searchValue + ' [' + tableName + ']'); - let percent = 100.0 * (total / sTables.length); - search_loading_percent.innerHTML = '' + percent.toFixed(2) + '%'; - document.getElementById('search-loading-progressbar').value = percent; - - let use_json = false, json_data = false, items = false; - if (use_json) { - try { - json_data = data ? JSON.parse(data) : false; - items = json_data ? json_data.items : false; - } catch (error) { - console.log(error); - } - } - - // Very fast and low memory display HTML table row prepared server-side via PHP instead of JS !! - if (!json_data) { - tbl_obj_body.innerHTML = tbl_obj_body.innerHTML + data; - } - - // Very slow fast and very high memory: Display HTML table rows by creating them now in browser (client-side) via JS instead of using PHP - if (json_data && items) { - let table_rows = ''; - for (const [row_num, row_field_vals] of Object.entries(items)) { - for (const [fname, fvals] of Object.entries(row_field_vals)) { - for (const [line, fval] of Object.entries(fvals)) { - let lnk = 'getFSText(this, \'' + tableName + '\', ' + row_num + ', \'' + fname + '\', line)'; - let val = fval; - val = val.replaceAll(marker_start, ''); - val = val.replaceAll(marker_end, ''); - table_rows = table_rows + '' + - '' + val + '' + - '' + tableName + '' + - '' + fname + '' + - '' + row_num + '' + - '' + line + '' + - ''; - } - } - } - tbl_obj_body.innerHTML = tbl_obj_body.innerHTML + table_rows; - } // END IF json_data && items - - }); - }) - .catch(error => { - total++; - if (sTables.length == total) document.getElementById('search-mssg-box').innerHTML = ''; - // Stop further searches for this search value - if (error.name === "AbortError") abort_this_search_value = true; - error.name === "AbortError" - ? console.log(" ... ABORTED fetch() for: " + searchValue) - : console.log(error.toString()); - }); + const response = await fetch(Url + 'doSearch', options).then(response => { + total++; + if (response.ok) { + return response.json(); + } + }).then((data) => { + if (typeof data.items !== 'undefined') { + console.log('++ Fetched for ' + searchValue + ' [' + tableName + ']'); + addTableItems(resultsTable, data.items); + } + }).catch(error => { + console.log(error); + }); } } catch (error) { console.log(error); @@ -130,183 +76,133 @@ const doSearch = async (signal, tables) => { }; /** - * JS Function to execute the search + * JS Function to fetch selected item */ -const getFSText = async (el, table_name, row_id, field_name, line) => { - let sibling = el.parentNode.firstElementChild; - do { - sibling != el - ? sibling.classList.remove('active') - : sibling.classList.add('active'); - } while (sibling = sibling.nextElementSibling); - +const getSelectedItem = async (table, row, field, line) => { try { + // get the search mode + let mode = modeObject.querySelector('input[type=\'radio\']:checked').value; + + // build form const formData = new FormData(); - formData.append('table_name', table_name); - formData.append('get_full_search_text', 1); - formData.append('row_id', row_id); - formData.append('field_name', field_name); + // get search value + if (mode == 1) { + formData.append('field_name', field); + formData.append('row_id', row); + formData.append('table_name', table); + + // calling URL + getURL = Url + 'getSearchValue'; + } else { + formData.append('field_name', field); + formData.append('row_id', row); + formData.append('line_nr', line); + formData.append('table_name', table); + formData.append('search_value', searchObject.value); + formData.append('replace_value', replaceObject.value); + formData.append('match_case', matchObject.checked ? 1 : 0); + formData.append('whole_word', wholeObject.checked ? 1 : 0); + formData.append('regex_search', regexObject.checked ? 1 : 0); + + // calling URL + getURL = Url + 'getReplaceValue'; + } - //let url = `https://jsonplaceholder.typicode.com/posts/${searchValue}`, - let url = document.getElementById('adminForm').getAttribute('action') + '&layout=dosearch'; let options = { method: 'POST', // *GET, POST, PUT, DELETE, etc. - mode: 'cors', // no-cors, *cors, same-origin - cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached - credentials: 'same-origin', // include, *same-origin, omit - /* - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/json', //'application/x-www-form-urlencoded', - },*/ - redirect: 'follow', // manual, *follow, error - referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // body: JSON.stringify(formData) // body data type must match "Content-Type" header body: formData } - // Clear full text box - document.getElementById('match-full-text-box').innerHTML = 'Loading ...'; - const response = await fetch(url, options) - // Note: response.text() is a promise ... - .then(response => { - response.text().then(data => { - console.log("Fetched full text for row: " + row_id + ' field name: ' + field_name + ' for Table: ' + table_name); - document.getElementById('match-full-text-box').innerHTML = '
' - + table_name + ' @ ' + field_name + ': ' + row_id + '
'; - document.getElementById('match-full-text-box').style.display = ''; - attachCodeMirror(jQuery('#match-full-text'), null); - cm_toggle_fully_searchable('match-full-text', 1); - cm_jumpToLine('match-full-text', line); - //cm_toggle_plain_textarea('match-full-text-box', 1); - }); - }) - .catch(error => { - // Stop further searches for this search value - if (error.name === "AbortError") abort_this_search_value = true; - error.name === "AbortError" - ? console.log(" ... ABORTED fetch() for: " + searchValue) - : console.log(error.toString()); - }); + const response = await fetch(getURL, options).then(response => { + if (response.ok) { + return response.json(); + } + }).then((data) => { + if (typeof data.value !== 'undefined') { + addSelectedItem(data.value, table, row, field, line); + } + }).catch(error => { + console.log(error); + }); } catch (error) { console.log(error); } finally { // Executed regardless if we caught the error } -}; - - -const cm_jumpToLine = function (tag_id, row) -{ - console.log('#' + tag_id); - let codeMirrorEl = jQuery('#' + tag_id).next('.CodeMirror'); - if (!codeMirrorEl.length) return; - let codeMirrorRef = jQuery('#' + tag_id).next('.CodeMirror').get(0).CodeMirror; - let t = codeMirrorRef.charCoords({line: row, ch: 0}, "local").top; - let middleHeight = codeMirrorRef.getScrollerElement().offsetHeight / 2; - codeMirrorRef.scrollTo(null, t - middleHeight - 5); } -/* Attach CodeMirror with optional settings */ -const cm_toggle_fully_searchable = function (el, toggle) -{ - if (typeof CodeMirror === 'undefined') {alert('CodeMirror not loaded'); return;} - - jQuery([el]).each(function(i, tag_id) { - let codeMirrorEl = jQuery('#' + tag_id).next('.CodeMirror'); - if (!codeMirrorEl.length) return; - let codeMirrorRef = jQuery('#' + tag_id).next('.CodeMirror').get(0).CodeMirror; - codeMirrorRef.setOption('viewportMargin', toggle ? '9999' : ''); - }); - +/** + * JS Function to add item to the editor + */ +const addSelectedItem = async (value, table, row, field, line) => { + // display area + if (value.length > 1) + { + editorObject.setValue(value); + editorNoticeObject.innerHTML = 'Table: ' + table + '(id:' + row + ') | Field: ' + field + '(line:' + line + ')'; + } } -const cm_toggle_plain_textarea = function (el, toggle) -{ - if (typeof CodeMirror === 'undefined') {alert('CodeMirror not loaded'); return;} - - jQuery([el]).each(function(i, tag_id) { - let codeMirrorEl = jQuery('#' + tag_id).next('.CodeMirror'); - if (toggle) { - let options = jQuery('#' + tag_id).data('options'); - options.viewportMargin = jQuery('#cm_toggle_fully_searchable_btn input').prop('checked') ? '9999' : ''; - jQuery('#' + tag_id).prev('p').show(); - attachCodeMirror(jQuery('#' + tag_id), options); - } - else if (codeMirrorEl.length) - { - let codeMirrorRef = codeMirrorEl.get(0).CodeMirror; - jQuery('#' + tag_id).prev('p').hide(); - jQuery('#' + tag_id).css({width: '100%', height: '400px'}); - codeMirrorRef.toTextArea(); - // Remove codemirror container in case that removing it failed - if (jQuery('#' + tag_id).next('.CodeMirror').length) { - jQuery('#' + tag_id).next('.CodeMirror').remove(); - } - } - }); - +/** + * JS Function to clear item from the editor and hide it + */ +const clearSelectedItem = async () => { + // display area + editorObject.setValue(''); + editorNoticeObject.innerHTML = ''; } -const attachCodeMirror = function (txtareas, CMoptions, mode) -{ - CMoptions = typeof CMoptions!=='undefined' && CMoptions ? CMoptions : { - mode: mode || 'application/x-httpd-php', - indentUnit: 2, - lineNumbers: true, - matchBrackets: true, - lineWrapping: true, - onCursorActivity: function(CM) - { - CM.setLineClass(hlLine, null); - hlLine = CM.setLineClass(CM.getCursor().line, 'activeline'); - } - }; +/** + * JS Function to clear table items + */ +const clearTableItems = async () => { + let table = new DataTable('#search_results_table'); + table.clear().draw( true ); +} - var editor, theArea; - txtareas.each(function(i, txtarea) - { - theArea = jQuery(txtarea); - theArea.removeClass(); // Remove all classes from the textarea - editor = CodeMirror.fromTextArea(theArea.get(0), CMoptions); - editor.refresh(); - }); +/** + * JS Function to clear all details of the search + */ +const clearAll = async () => { + // clear all details + clearTableItems(); + clearSelectedItem(); +} - return txtareas.length==1 ? editor : true; +/** + * JS Function to add items to the table + */ +const addTableItems = async (table, items) => { + table.rows.add(items).draw( false ); } /** * JS Function to execute (A) on search text change , (B) on search options changes */ const onChange = () => { - const searchValue = searchValueInp.value; + const searchValue = searchObject.value; if (searchValue.length > 2) { // Cancel any ongoing requests if (controller) controller.abort(); + // we clear the table again + clearAll(); + // Create new controller and issue new request controller = new AbortController(); - doSearch(controller.signal, sTables); + + // check if any specific table was set + let tables = []; + let table = tableObject.value; + if (table != -1) { + tables.push(table); + doSearch(controller.signal, tables); + } else { + doSearch(controller.signal, searchTables); + } } else { - // Clear any message in search results message div - //document.getElementById('search-mssg-box').innerHTML = ''; + // Clear the table + clearAll(); } }; - -const previewReplace = () => { - const replaceValue = replaceValueInp.value; - console.log(replaceValueInp); - if (replaceValue.length) { - document.getElementById('search-mssg-box').innerHTML = replaceValue; - } -} - -// Do the search on key up of search or replace input element -searchValueInp.onkeyup = onChange; -replaceValueInp.onkeyup = previewReplace; - -// Do the search on key up of search input element -caseSensitiveLbl.onchange = onChange; -completeWordLbl.onchange = onChange; -regexpSearchLbl.onchange = onChange; diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 3e31a059d..f6271d5a8 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -67,8 +67,8 @@ public function __construct($config) $this->registerTask('fieldTypeProperties', 'ajax'); $this->registerTask('getFieldPropertyDesc', 'ajax'); $this->registerTask('getCodeGlueOptions', 'ajax'); - $this->registerTask('searchTable', 'ajax'); - $this->registerTask('updateTable', 'ajax'); + $this->registerTask('doSearch', 'ajax'); + $this->registerTask('replaceAll', 'ajax'); $this->registerTask('getSearchValue', 'ajax'); $this->registerTask('getReplaceValue', 'ajax'); $this->registerTask('setValue', 'ajax'); @@ -1636,7 +1636,7 @@ public function ajax() } } break; - case 'searchTable': + case 'doSearch': try { $table_nameValue = $jinput->get('table_name', NULL, 'WORD'); @@ -1647,7 +1647,7 @@ public function ajax() $component_idValue = $jinput->get('component_id', 0, 'INT'); if($table_nameValue && $user->id != 0 && $search_valueValue) { - $result = $this->getModel('ajax')->searchTable($table_nameValue, $search_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); + $result = $this->getModel('ajax')->doSearch($table_nameValue, $search_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); } else { @@ -1682,7 +1682,7 @@ public function ajax() } } break; - case 'updateTable': + case 'replaceAll': try { $table_nameValue = $jinput->get('table_name', NULL, 'WORD'); @@ -1694,7 +1694,7 @@ public function ajax() $component_idValue = $jinput->get('component_id', 0, 'INT'); if($table_nameValue && $user->id != 0 && $search_valueValue) { - $result = $this->getModel('ajax')->updateTable($table_nameValue, $search_valueValue, $replace_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); + $result = $this->getModel('ajax')->replaceAll($table_nameValue, $search_valueValue, $replace_valueValue, $match_caseValue, $whole_wordValue, $regex_searchValue, $component_idValue); } else { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index cfb5142f5..2f32d3cd7 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -5448,6 +5448,7 @@ COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder %s was moved to COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder %s was not moved to %s" COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE="Force Local Update" COM_COMPONENTBUILDER_FORCE_THAT_THIS_JCB_PACKAGE_IMPORT_SEARCH_FOR_LOCAL_ITEMS_TO_BE_DONE_WITH_GUID_VALUE_ONLY_IF_BMERGEB_IS_SET_TO_YES_ABOVE="Force that this JCB package import (search for local items) to be done with GUID value only, if Merge is set to yes above." +COM_COMPONENTBUILDER_FOUND="Found" COM_COMPONENTBUILDER_FOUND_TEXT="Found Text" COM_COMPONENTBUILDER_FREEOPEN="Free/Open" COM_COMPONENTBUILDER_FULL_TEXT="Full Text" @@ -5493,6 +5494,7 @@ COM_COMPONENTBUILDER_GREAT_THIS_PLACEHOLDER_WILL_WORK="Great, this placeholder w COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK="Great, this validation rule name (%s) will work!" COM_COMPONENTBUILDER_GROUP="group" COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata" +COM_COMPONENTBUILDER_HEADERS="Headers" COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document" COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access" diff --git a/admin/layouts/rows.php b/admin/layouts/rows.php new file mode 100644 index 000000000..5379aea33 --- /dev/null +++ b/admin/layouts/rows.php @@ -0,0 +1,43 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +$headers = $displayData['headers']; +$items = $displayData['items']; + +?> + + $values): ?> + + + + + + + + + + +    + + + + + + + +    + + + + diff --git a/admin/layouts/table.php b/admin/layouts/table.php new file mode 100644 index 000000000..a42bef2cb --- /dev/null +++ b/admin/layouts/table.php @@ -0,0 +1,72 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +$table_id = (isset($displayData['id'])) ? $displayData['id'] : ComponentbuilderHelper::randomkey(7); +$name = (isset($displayData['name'])) ? $displayData['name'] : false; +$headers = (isset($displayData['headers'])) ? $displayData['headers'] : [JText::_('COM_COMPONENTBUILDER_NO'), JText::_('COM_COMPONENTBUILDER_HEADERS'), JText::_('COM_COMPONENTBUILDER_FOUND')]; +$items = (isset($displayData['items'])) ? $displayData['items'] : 6; + +?> +
+ + + + + + + + + + $header): ?> + + + + + + + + + + + + + + + + + + + $headers, 'items' => $items]); ?> + +
+
+ + + diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 39951a1ec..3f3320249 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -3619,7 +3619,7 @@ public function getCodeGlueOptions($listfield, $joinfields, $type, $area) * @return array|null * @since 3.2.0 **/ - public function searchTable(string $tableName, string $searchValue, + public function doSearch(string $tableName, string $searchValue, int $matchCase, int $wholeWord, int $regexSearch, int $componentId): ?array { // check if this is a valid table @@ -3633,7 +3633,7 @@ public function searchTable(string $tableName, string $searchValue, SearchFactory::_('Config')->regex_search = $regexSearch; SearchFactory::_('Config')->component_id = $componentId; - if (($items = SearchFactory::_('Agent')->find()) !== null) + if (($items = SearchFactory::_('Agent')->table($tableName)) !== null) { return ['success' => JText::sprintf('COM_COMPONENTBUILDER_WE_FOUND_SOME_INSTANCES_IN_S', $tableName), 'items' => $items]; } @@ -3658,7 +3658,7 @@ public function searchTable(string $tableName, string $searchValue, * @return array|null * @since 3.2.0 **/ - public function updateTable(string $tableName, string $searchValue, ?string $replaceValue = null, + public function replaceAll(string $tableName, string $searchValue, ?string $replaceValue = null, int $matchCase, int $wholeWord, int $regexSearch, int $componentId): ?array { // check if this is a valid table @@ -3673,7 +3673,7 @@ public function updateTable(string $tableName, string $searchValue, ?string $rep SearchFactory::_('Config')->regex_search = $regexSearch; SearchFactory::_('Config')->component_id = $componentId; - SearchFactory::_('Agent')->replace(); + // SearchFactory::_('Agent')->replace(); // TODO show danger message before allowing this!!!!! return ['success' => JText::sprintf('COM_COMPONENTBUILDER_ALL_FOUND_INSTANCES_IN_S_WHERE_REPLACED', $tableName)]; } @@ -3693,11 +3693,22 @@ public function updateTable(string $tableName, string $searchValue, ?string $rep public function getSearchValue(string $fieldName, int $rowId, string $tableName): array { // check if this is a valid table and field - if ($rowId > 0 && SearchFactory('Table')->exist($tableName, $fieldName) && - ($value = SearchFactory('Agent')->getValue($fieldName, $rowId, 0, $tableName)) !== null) + if ($rowId > 0 && SearchFactory::_('Table')->exist($tableName, $fieldName)) { - // load the value - return ['value' => $value]; + // load the configurations + SearchFactory::_('Config')->table_name = $tableName; + // load dummy data... TODO this should not be needed! + SearchFactory::_('Config')->search_value = ''; + SearchFactory::_('Config')->replace_value = ''; + SearchFactory::_('Config')->match_case = 0; + SearchFactory::_('Config')->whole_word = 0; + SearchFactory::_('Config')->regex_search = 0; + + if (($value = SearchFactory::_('Agent')->getValue($rowId, $fieldName, 0, $tableName)) !== null) + { + // load the value + return ['value' => $value]; + } } return ['error' => JText::_('COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')]; } @@ -3722,7 +3733,7 @@ public function getReplaceValue(string $fieldName, int $rowId, $line, string $ta string $searchValue, ?string $replaceValue = null, int $matchCase, int $wholeWord, int $regexSearch): array { // check if this is a valid table and field - if ($rowId > 0 && SearchFactory('Table')->exist($tableName, $fieldName)) + if ($rowId > 0 && SearchFactory::_('Table')->exist($tableName, $fieldName)) { // load the configurations SearchFactory::_('Config')->table_name = $tableName; @@ -3733,7 +3744,7 @@ public function getReplaceValue(string $fieldName, int $rowId, $line, string $ta SearchFactory::_('Config')->regex_search = $regexSearch; // load the value - if (($value = SearchFactory('Agent')->getValue($fieldName, $rowId, $line, $tableName, true)) !== null) + if (($value = SearchFactory::_('Agent')->getValue($rowId, $fieldName, $line, $tableName, true)) !== null) { return ['value' => $value]; } @@ -3755,8 +3766,8 @@ public function getReplaceValue(string $fieldName, int $rowId, $line, string $ta public function setValue($value, int $rowId, string $fieldName, string $tableName): array { // check if this is a valid table and field - if ($rowId > 0 && SearchFactory('Table')->exist($tableName, $fieldName) && - SearchFactory('Agent')->setValue($value, $rowId, $fieldName, $tableName)) + if ($rowId > 0 && SearchFactory::_('Table')->exist($tableName, $fieldName) && + SearchFactory::_('Agent')->setValue($value, $rowId, $fieldName, $tableName)) { return ['success' => JText::sprintf( '%s (%s:%s) was successfully updated!', diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index a01155039..1e9dc692b 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1978,7 +1978,7 @@ INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `exten (9, 1, '', '', '', '011813ba-8dd2-4beb-98f9-50ab3f3665d1', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2\":{\"load\":\"51195163-1e87-4251-b755-a03c376798a6\"}}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBbW1tBcGldXV0gb2JqZWN0Lg0KCSAqDQoJICogQHZhciAgICBhcnJheQ0KCSAqIEBzaW5jZSAgMS4wDQoJICovDQoJcHJvdGVjdGVkICRvcHRpb25zOw0KDQoJLyoqDQoJICogVGhlIEhUVFAgY2xpZW50IG9iamVjdCB0byB1c2UgaW4gc2VuZGluZyBIVFRQIHJlcXVlc3RzLg0KCSAqDQoJICogQHZhciAgICBCYXNlSHR0cA0KCSAqIEBzaW5jZSAgMS4wDQoJICovDQoJcHJvdGVjdGVkICRjbGllbnQ7DQoNCgkvKioNCgkgKiBDb25zdHJ1Y3Rvci4NCgkgKg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W5jdGlvbiBnZXRPcHRpb24oJGtleSkNCgl7DQoJCXJldHVybiBpc3NldCgkdGhpcy0+b3B0aW9uc1ska2V5XSkgPyAkdGhpcy0+b3B0aW9uc1ska2V5XSA6IG51bGw7DQoJfQ0KDQoJLyoqDQoJICogU2V0IGFuIG9wdGlvbiBmb3IgdGhlIFtbW0FwaV1dXSBpbnN0YW5jZS4NCgkgKg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJGtleSAgICBUaGUgbmFtZSBvZiB0aGUgb3B0aW9uIHRvIHNldC4NCgkgKiBAcGFyYW0gICBtaXhlZCAgICR2YWx1ZSAgVGhlIG9wdGlvbiB2YWx1ZSB0byBzZXQuDQoJICoNCgkgKiBAcmV0dXJuICBbW1tBcGldXV0gIFRoaXMgb2JqZWN0IGZvciBtZXRob2QgY2hhaW5pbmcuDQoJICoNCgkgKiBAc2luY2UgICAxLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gc2V0T3B0aW9uKCRrZXksICR2YWx1ZSkNCgl7DQoJCSR0aGlzLT5vcHRpb25zWyRrZXldID0gJHZhbHVlOw0KDQoJCXJldHVybiAkdGhpczsNCgl9DQo=', '{}', '[[[Api]]]', '[[[COMPANY]]]\\[[[Api]]]\\[[[Api]]]', '1.0.0', '{}', 'API', 'class', '{}', '', 1, '2022-01-05 00:44:15', '2022-09-20 10:09:49', 6, 4), (10, 1, 'Control the naming of a field\r\n\r\n@since 3.0.9', '', '', '9ef0eb24-aae4-4f5a-99af-d724db44808f', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgbmFtZXMgc2FmZQ0KCS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DQoJCS8vIHVzZSB0aGUgZGVmYXVsdCAob3JpZ2luYWwgYmVoYXZpb3IvY29udmVudGlvbikNCgkJcmV0dXJuIFN0cmluZ0hlbHBlcjo6c2FmZSgkc3RyaW5nKTsNCgl9DQo=', '{}', 'FieldHelper', 'VDM\\Joomla\\Utilities.String.FieldHelper', '1.0.0', '{}', 'String Field Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 20:46:56', '2022-09-20 10:09:54', 21, 5), (11, '', 'The json checker\r\n\r\n@since 3.0.9', '', '', '4b225c51-d293-48e4-b3f6-5136cf5c3f18', '', '', '', '{\"load_selection0\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection1\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection2\":{\"load\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\"}}', 'CS8qKg0KCSAqIENoZWNrIGlmIHlvdSBoYXZlIGEganNvbiBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICRzdHJpbmcgIFRoZSBqc29uIHN0cmluZyB0byBjaGVjaw0KCSAqDQoJICogQHJldHVybnMgYm9vbCB0cnVlIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBjaGVjaygkc3RyaW5nKTogYm9vbA0KCXsNCgkJaWYgKFN0cmluZ0hlbHBlcjo6Y2hlY2soJHN0cmluZykpDQoJCXsNCgkJCWpzb25fZGVjb2RlKCRzdHJpbmcpOw0KCQkJcmV0dXJuIChqc29uX2xhc3RfZXJyb3IoKSA9PT0gSlNPTl9FUlJPUl9OT05FKTsNCgkJfQ0KDQoJCXJldHVyb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tZSA9IEdldEhlbHBlcjo6dmFyKG51bGwsICR2YWwsICRpZCwgJG5hbWUsICc9JywgJHRhYmxlKSkNCgkJCQkJCQl7DQoJCQkJCQkJCSRuYW1lc1tdID0gJF9uYW1lOw0KCQkJCQkJCX0NCgkJCQkJCX0NCgkJCQkJCWVsc2UNCgkJCQkJCXsNCgkJCQkJCQlpZiAoJF9uYW1lID0gR2V0SGVscGVyOjp2YXIoJHRhYmxlLCAkdmFsLCAkaWQsICRuYW1lKSkNCgkJCQkJCQl7DQoJCQkJCQkJCSRuYW1lc1tdID0gJF9uYW1lOw0KCQkJCQkJCX0NCgkJCQkJCX0NCgkJCQkJfQ0KCQkJCQlpZiAoQXJyYXlIZWxwZXI6OmNoZWNrKCRuYW1lcykpDQoJCQkJCXsNCgkJCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRuYW1lcyk7DQoJCQkJCX0JDQoJCQkJfQ0KCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRyZXN1bHQpOw0KCQkJfQ0KCQkJcmV0dXJuIChzdHJpbmcpIGpzb25fZGVjb2RlKCR2YWx1ZSk7DQoJCX0NCgkJcmV0dXJuICR2YWx1ZTsNCgl9DQo=', '{}', 'JsonHelper', 'VDM\\Joomla\\Utilities.JsonHelper', '1.0.0', '{}', 'Utilities Json Helper', 'abstract class', '{}', '', 1, '2022-03-08 21:03:54', '2022-09-20 09:51:51', 21, 6), -(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3VhZ2U7', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"}}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZS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CQkJCQlpZigkciA8IDEwMCkNCgkJCQkJew0KCQkJCQkJJHcgLj0gJ2FuZCAnOw0KCQkJCQl9DQoJCQkJCSR3IC49IHNlbGY6Om51bWJlcigkcik7DQoJCQkJfQ0KCQkJfQ0KCQl9DQoJCXJldHVybiAkdzsNCgl9DQoNCgkvKioNCgkgKiBSYW5kb20gS2V5DQoJICoNCgkgKiBAcmV0dXJucyBhIHN0cmluZw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHJhbmRvbSgkc2l6ZSkNCgl7DQoJCSRiYWcgPSAiYWJjZWZnaGlqa25vcHFyc3R1d3h5ekFCQ0RERUZHSElKS0xMTU1OT1BRUlNUVVZWV1hZWmFiY2RkZWZnaGlqa2xsbW1ub3BxcnN0dXZ2d3h5ekFCQ0VGR0hJSktOT1BRUlNUVVdYWVoiOw0KCQkka2V5ID0gYXJyYXkoKTsNCgkJJGJhZ3NpemUgPSBzdHJsZW4oJGJhZykgLSAxOw0KDQoJCWZvciAoJGkgPSAwOyAkaSA8ICRzaXplOyAkaSsrKQ0KCQl7DQoJCQkkZ2V0ID0gcmFuZCgwLCAkYmFnc2l6ZSk7DQoJCQkka2V5W10gPSAkYmFnWyRnZXRdOw0KCQl9DQoNCgkJcmV0dXJuIGltcGxvZGUoJGtleSk7DQoJfQ0K', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2022-09-20 09:51:46', 28, 7), +(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2V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KSAuJyBtaWxsaW9uJzsNCgkJCQkkciA9IGZtb2QoJHgsIDEwMDAwMDApOw0KCQkJCWlmKCRyID4gMCkNCgkJCQl7DQoJCQkJCSR3IC49ICcgJzsNCgkJCQkJaWYoJHIgPCAxMDApDQoJCQkJCXsNCgkJCQkJCSR3IC49ICdhbmQgJzsNCgkJCQkJfQ0KCQkJCQkkdyAuPSBzZWxmOjpudW1iZXIoJHIpOw0KCQkJCX0NCgkJCX0NCgkJfQ0KCQlyZXR1cm4gJHc7DQoJfQ0KDQoJLyoqDQoJICogUmFuZG9tIEtleQ0KCSAqDQoJICogQHJldHVybnMgYSBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiByYW5kb20oJHNpemUpDQoJew0KCQkkYmFnID0gImFiY2VmZ2hpamtub3BxcnN0dXd4eXpBQkNEREVGR0hJSktMTE1NTk9QUVJTVFVWVldYWVphYmNkZGVmZ2hpamtsbG1tbm9wcXJzdHV2dnd4eXpBQkNFRkdISUpLTk9QUVJTVFVXWFlaIjsNCgkJJGtleSA9IGFycmF5KCk7DQoJCSRiYWdzaXplID0gc3RybGVuKCRiYWcpIC0gMTsNCg0KCQlmb3IgKCRpID0gMDsgJGkgPCAkc2l6ZTsgJGkrKykNCgkJew0KCQkJJGdldCA9IHJhbmQoMCwgJGJhZ3NpemUpOw0KCQkJJGtleVtdID0gJGJhZ1skZ2V0XTsNCgkJfQ0KDQoJCXJldHVybiBpbXBsb2RlKCRrZXkpOw0KCX0NCg==', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2022-10-29 21:40:16', 29, 7), (13, '', 'Some array tricks helper\r\n\r\n@since 3.0.9', '', '', '0a59c65c-9daf-4bc9-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rayHelper', '1.0.0', '{}', 'Utilities Array Helper', 'abstract class', '{}', '', 1, '2022-03-08 22:53:52', '2022-09-20 09:51:40', 17, 8), (14, '', 'Control the naming of a namespace helper\r\n\r\n@since 3.0.9', '', '', 'ce8cf834-6bac-44fb-941c-861f7e046cc0', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBuYW1lc3BhY2Ugc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJHN0cmluZykNCgl7DQoJCS8vIDBubHkgY29udGludWUgaWYgd2UgaGF2ZSBhIHN0cmluZw0KCQlpZiAoU3RyaW5nSGVscGVyOjpjaGVjaygkc3RyaW5nKSkNCgkJew0KCQkJLy8gbWFrZSBzdXJlIGl0IGhhcyBub3QgbnVtYmVycw0KCQkJJHN0cmluZyA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkc3RyaW5nKTsNCg0KCQkJLy8gVHJhbnNsaXRlcmF0ZSBzdHJpbmcgVE9ETzogbG9vayBhZ2FpbiBhcyB0aGlzIG1ha2UgaXQgbG93ZXJjYXNlDQoJCQkvLyAkc3RyaW5nID0gU3RyaW5nSGVscGVyOjp0cmFuc2xpdGVyYXRlKCRzdHJpbmcpOw0KDQoJCQkvLyBmaXJzdCByZW1vdmUgYWxsIFtcXSBiYWNrc2xhc2hlcw0KCQkJJHN0cmluZyA9IHN0cl9yZXBsYWNlKCdcXCcsICcxJywgJHN0cmluZyk7DQoNCgkJCS8vIHJlbW92ZSBhbGwgYW5kIGtlZXAgb25seSBjaGFyYWN0ZXJzIGFuZCBbXF0gYmFja3NsYXNoZXMgaW5zaWRlIG9mIHRoZSBzdHJpbmcNCgkJCSRzdHJpbmcgPSB0cmltKCBwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejFdLyIsICcnLCAkc3RyaW5nKSwgJzEnKTsNCg0KCQkJLy8gcGxhY2UgdGhlIFtcXSBiYWNrc2xhc2hlcyBiYWNrDQoJCQlyZXR1cm4gdHJpbSggcHJlZ19yZXBsYWNlKCIvMSsvIiwgJ1xcJywgJHN0cmluZykpOw0KCQl9DQoJCS8vIG5vdCBhIHN0cmluZw0KCQlyZXR1cm4gJyc7DQoJfQ0K', '{}', 'NamespaceHelper', 'VDM\\Joomla\\Utilities.String.NamespaceHelper', '1.0.0', '{}', 'String Namespace Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:27:57', '2022-09-20 10:09:58', 16, 5), (15, 1, 'Control the naming of a field type\r\n\r\n@since 3.0.9', '', '', 'a8935cbe-7701-40dc-bfd5-675f2d600954', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgdHlwZSBuYW1lIHNhZmUNCgkgKg0KCSAqIEBwYXJhbSAgIFN0cmluZyAgICAgICRzdHJpbmcgICAgIFRoZSB5b3Ugd291bGQgbGlrZSB0byBtYWtlIHNhZmUNCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAkb3B0aW9uICAgIFRoZSBvcHRpb24gZm9yIHRoZSBjb21wb25lbnQuDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8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3RyaW5nIGVxdWFsaXR5IGluIGNvbXBpbGVyKQ0KCQkJCXJldHVybiBzdHJ0b2xvd2VyKCRzdHJpbmcpOw0KCQkJfQ0KCQkJLy8gbm90IGEgc3RyaW5nDQoJCQlyZXR1cm4gJyc7DQoJCX0NCg0KCQkvLyB1c2UgdGhlIGRlZmF1bHQgKG9yaWdpbmFsIGJlaGF2aW91ci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'TypeHelper', 'VDM\\Joomla\\Utilities.String.TypeHelper', '1.0.0', '{}', 'String Type Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:33:09', '2022-09-20 10:10:03', 15, 5), @@ -2519,7 +2519,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( `target` VARCHAR(255) NOT NULL DEFAULT '', `hash` VARCHAR(64) NOT NULL DEFAULT '', PRIMARY KEY (`target`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; diff --git a/admin/views/search/tmpl/default.php b/admin/views/search/tmpl/default.php index 90394fe94..a85d22228 100644 --- a/admin/views/search/tmpl/default.php +++ b/admin/views/search/tmpl/default.php @@ -16,7 +16,6 @@ JHtml::_('behavior.formvalidator'); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); -use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; $this->app->input->set('hidemainmenu', false); $selectNotice = '

' . JText::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '

'; @@ -54,33 +53,25 @@ name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
-
+
form->renderField('type_search'); ?> form->renderField('search_value'); ?> form->renderField('replace_value'); ?>
-
+
form->renderFieldset('settings'); ?>
-
-
- - - - - - - - - - - -
+
+
+
+ 'search_results_table', 'headers' => $this->table_headers, 'items' => 7, 'init' => false]); ?>
- @@ -88,14 +79,115 @@
item['tables']) && ComponentbuilderHelper::checkArray($this->item['tables'])) : ?> diff --git a/admin/views/search/view.html.php b/admin/views/search/view.html.php index 423db2bde..6cf532a4a 100644 --- a/admin/views/search/view.html.php +++ b/admin/views/search/view.html.php @@ -13,7 +13,6 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\View\HtmlView; -use Joomla\CMS\Filesystem\File; use Joomla\CMS\Form\Form; use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory; @@ -45,7 +44,16 @@ function display($tpl = null) // get the needed form fields $this->form = $this->getDynamicForm(); - + + // build our table headers + $this->table_headers = array( + 'edit' => 'E', + 'code' => JText::_('COM_COMPONENTBUILDER_FOUND_TEXT'), + 'table' => JText::_('COM_COMPONENTBUILDER_TABLE'), + 'field' => JText::_('COM_COMPONENTBUILDER_FIELD'), + 'id' => JText::_('ID'), + 'line' => JText::_('COM_COMPONENTBUILDER_LINE') + ); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') @@ -223,7 +231,7 @@ public function getDynamicForm(): ?Form 'name' => 'full_text', 'label' => 'COM_COMPONENTBUILDER_FULL_TEXT', 'width' => '100%', - 'height' => '450px', + 'height' => '250px', 'class' => 'full_text_editor', 'syntax' => 'php', 'buttons' => 'false', @@ -257,6 +265,12 @@ protected function setDocument() // Initialize the header checker. $HeaderCheck = new componentbuilderHeaderCheck; + // always load these files. + $this->document->addStyleSheet(JURI::root(true) . "/media/com_componentbuilder/datatable/css/datatables.min.css", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/css"); + $this->document->addScript(JURI::root(true) . "/media/com_componentbuilder/datatable/js/pdfmake.min.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + $this->document->addScript(JURI::root(true) . "/media/com_componentbuilder/datatable/js/vfs_fonts.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + $this->document->addScript(JURI::root(true) . "/media/com_componentbuilder/datatable/js/datatables.min.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + // Add View JavaScript File $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/search.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); @@ -277,42 +291,16 @@ protected function setDocument() { JHtml::_('script', 'media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']); } - - // Load the script to find all uikit components needed. - if ($uikit != 2) - { - // Set the default uikit components in this view. - $uikitComp = array(); - $uikitComp[] = 'uk-progress'; - } - - // Load the needed uikit components in this view. - if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) - { - // load just in case. - jimport('joomla.filesystem.file'); - // loading... - foreach ($uikitComp as $class) - { - foreach (ComponentbuilderHelper::$uk_components[$class] as $name) - { - // check if the CSS file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) - { - // load the css. - JHtml::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); - } - // check if the JavaScript file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) - { - // load the js. - JHtml::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); - } - } - } - } // add the document default css file $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/search.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Set the Custom CSS script to view + $this->document->addStyleDeclaration(" + .found_code { + color: #46a546; + font-weight: bolder; + } + + "); } /** diff --git a/componentbuilder.xml b/componentbuilder.xml index 4382d26e3..166c99692 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 23rd October, 2022 + 30th October, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io @@ -39,6 +39,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo js css images + datatable uikit-v2 footable-v3 diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php index 08cdaee10..49732a4b8 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Agent.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Search; +use Joomla\CMS\Language\Text; use VDM\Joomla\Componentbuilder\Search\Factory; use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Componentbuilder\Search\Database\Get; @@ -20,6 +21,7 @@ use VDM\Joomla\Componentbuilder\Search\Agent\Replace; use VDM\Joomla\Componentbuilder\Search\Agent\Search; use VDM\Joomla\Componentbuilder\Search\Agent\Update; +use VDM\Joomla\Componentbuilder\Search\Table; /** @@ -85,21 +87,55 @@ class Agent */ protected Update $update; + /** + * Table + * + * @var Table + * @since 3.2.0 + */ + protected Table $table; + + /** + * Return value to search view + * + * @var string + * @since 3.2.0 + */ + protected string $return; + + /** + * Marker start and end values + * + * @var array + * @since 3.2.0 + */ + protected array $marker; + + /** + * Marker start and end html values + * + * @var array + * @since 3.2.0 + */ + protected array $markerHtml; + /** * Constructor * - * @param Config|null $config The search config object. - * @param Get|null $get The search get database object. - * @param Set|null $set The search get database object. - * @param Find|null $find The search find object. - * @param Replace|null $replace The search replace object. - * @param Search|null $search The search object. + * @param Config|null $config The search config object. + * @param Get|null $get The search get database object. + * @param Set|null $set The search get database object. + * @param Find|null $find The search find object. + * @param Replace|null $replace The search replace object. + * @param Search|null $search The search object. + * @param Update|null $update The update object. + * @param Table|null $table The table object. * * @since 3.2.0 */ public function __construct(?Config $config = null, ?Get $get = null, ?Set$set = null, ?Find $find = null, ?Replace $replace = null, - ?Search $search = null, ?Update $update = null) + ?Search $search = null, ?Update $update = null, ?Table $table = null) { $this->config = $config ?: Factory::_('Config'); $this->get = $get ?: Factory::_('Get.Database'); @@ -108,23 +144,23 @@ public function __construct(?Config $config = null, ?Get $get = null, $this->replace = $replace ?: Factory::_('Agent.Replace'); $this->search = $search ?: Factory::_('Agent.Search'); $this->update = $update ?: Factory::_('Agent.Update'); + $this->table = $table ?: Factory::_('Table'); } /** * Get the value of a field in a row and table * - * @param mixed $value The field value * @param int $id The item ID * @param string $field The field key * @param mixed $line The field line * @param string|null $table The table * @param bool $update The switch to triger an update (default is false) * - * @return mixed + * @return string * @since 3.2.0 */ public function getValue(int $id, string $field, $line = null, - ?string $table = null, bool $update = false) + ?string $table = null, bool $update = false): string { // set the table name if (empty($table)) @@ -134,13 +170,19 @@ public function getValue(int $id, string $field, $line = null, if (($value = $this->get->value($id, $field, $table)) !== null) { - // try to update the value if required - if ($update && ($updated_value = $this->update->value($value, $line)) !== null) + // we only return strings that can load in an editor + if (is_string($value)) { - return $updated_value; + // try to update the value if required + if ($update && ($updated_value = $this->update->value($value, $line)) !== null) + { + return $updated_value; + } + + return $value; } - return $value; + return '// VALUE CAN NOT BE LOADED (AT THIS TIME) SINCE ITS NOT A STRING'; } return null; @@ -168,6 +210,48 @@ public function setValue($value, int $id, string $field, ?string $table = null): return $this->set->value($value, $id, $field, $table); } + /** + * Return Table Ready Search Results + * + * @param string|null $table The table being searched + * + * @return array|null + * @since 3.2.0 + */ + public function table(?string $table = null): ?array + { + // set the table name + if (empty($table)) + { + $table = $this->config->table_name; + } + + if(($values = $this->find($table)) !== null) + { + $table_rows = []; + + // set the return value + $this->return = urlencode(base64_encode('index.php?option=com_componentbuilder&view=search')); + + // set the markers + $this->marker = [$this->config->marker_start, $this->config->marker_end]; + $this->markerHtml = ['','']; + + foreach ($values as $id => $fields) + { + foreach ($fields as $field => $lines) + { + foreach ($lines as $line => $code) + { + $table_rows[] = $this->getRow($code, $table, $field, $id, $line); + } + } + } + return $table_rows; + } + return null; + } + /** * Search the posted table for the search value and return all * @@ -233,6 +317,68 @@ public function replace(?string $table = null) $set++; } } + + /** + * Return prepared code string for table + * + * @param string $code The code value fro the table + * @param string|null $table The table + * @param string $field The field key + * @param int $id The the row id + * @param mixed $line The code line where found + * + * @return array + * @since 3.2.0 + */ + protected function getRow(string $code, string $table, string $field, int $id, $line): array + { + return [ + 'edit' => $this->getRowEditButton($table, $field, $id, $line), + 'code' => $this->getRowCode($code), + 'table' => $table, + 'field' => $field, + 'id' => $id, + 'line' => $line + ]; + } + + /** + * Return prepared code string for table + * + * @param string $code The code value fro the table + * + * @return string + * @since 3.2.0 + */ + protected function getRowCode(string $code): string + { + return str_replace($this->marker, $this->markerHtml, htmlentities($code)); + } + + /** + * Get the Item button to edit an item + * + * @param string|null $view The single view + * @param string $field The field key + * @param int $id The the row id + * @param mixed $line The code line where found + * + * @return string + * @since 3.2.0 + */ + protected function getRowEditButton(string $view, string $field, int $id, $line): string + { + // get list view + $views = $this->table->get($view, $field, 'list'); + + // return edit link + return ''; + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php index c7d19a988..2a6e8f334 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Engine/Basic.php @@ -46,7 +46,7 @@ public function __construct(?Config $config = null) parent::__construct($config); // quote all regular expression characters - $searchValue = \preg_quote($this->searchValue); + $searchValue = preg_quote($this->searchValue, '/'); $start = ''; $end = ''; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php index 5ae0b98c7..5816ba6ff 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Interfaces/GetInterface.php @@ -20,17 +20,17 @@ interface GetInterface { /** - * Get values from a given table + * Get a value from a given table * Example: $this->value(23, 'value_key', 'table_name'); * - * @param string $field The field key * @param int $id The item ID + * @param string $field The field key * @param string|null $table The table * * @return mixed * @since 3.2.0 */ - public function value(string $field, int $id, string $table = null); + public function value(int $id, string $field, string $table = null); /** * Get values from a given table diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php index b2bf81a82..e74ea731b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Service/Agent.php @@ -70,7 +70,9 @@ public function getAgent(Container $container): SearchAgent $container->get('Set.Database'), $container->get('Agent.Find'), $container->get('Agent.Replace'), - $container->get('Agent.Search') + $container->get('Agent.Search'), + $container->get('Agent.Update'), + $container->get('Table') ); } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php index fa4e59683..359fa4b33 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php @@ -237,7 +237,7 @@ public static function transliterate($string) * * @since 3.0.9 */ - public static function html($var, $charset = 'UTF-8', $shorten = false, $length = 40) + public static function html($var, $charset = 'UTF-8', $shorten = false, $length = 40, $addTip = true) { if (self::check($var)) { @@ -254,7 +254,7 @@ public static function html($var, $charset = 'UTF-8', $shorten = false, $length ); if ($shorten) { - return self::shorten($string, $length); + return self::shorten($string, $length, $addTip); } return $string; } diff --git a/media/datatable/css/datatables.min.css b/media/datatable/css/datatables.min.css new file mode 100644 index 000000000..5c9d00a40 --- /dev/null +++ b/media/datatable/css/datatables.min.css @@ -0,0 +1,57 @@ +/* + * This combined file was created by the DataTables downloader builder: + * https://datatables.net/download + * + * To rebuild or modify this file with the latest versions of the included + * software please visit: + * https://datatables.net/download/#dt/jszip-2.5.0/dt-1.11.5/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.2/fc-4.0.2/fh-3.2.2/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.2/sp-2.0.0/sl-1.3.4/sr-1.1.0 + * + * Included libraries: + * JSZip 2.5.0, DataTables 1.11.5, Buttons 2.2.2, Column visibility 2.2.2, HTML5 export 2.2.2, Print view 2.2.2, ColReorder 1.5.5, DateTime 1.1.2, FixedColumns 4.0.2, FixedHeader 3.2.2, KeyTable 2.6.4, Responsive 2.2.9, RowGroup 1.1.4, RowReorder 1.2.8, Scroller 2.0.5, SearchBuilder 1.3.2, SearchPanes 2.0.0, Select 1.3.4, StateRestore 1.1.0 + */ + +table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable td.dt-control{text-align:center;cursor:pointer}table.dataTable td.dt-control:before{height:1em;width:1em;margin-top:-9px;display:inline-block;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#31b131}table.dataTable tr.dt-hasChild td.dt-control:before{content:"-";background-color:#d33333}table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("/DataTables-1.11.5/images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("/DataTables-1.11.5/images/sort_asc.png") !important}table.dataTable thead .sorting_desc{background-image:url("/DataTables-1.11.5/images/sort_desc.png") !important}table.dataTable thead .sorting_asc_disabled{background-image:url("/DataTables-1.11.5/images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("/DataTables-1.11.5/images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_length select{border:1px solid #aaa;border-radius:3px;padding:5px;background-color:transparent;padding:4px}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{border:1px solid #aaa;border-radius:3px;padding:5px;background-color:transparent;margin-left:3px}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, white 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, white 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, white 0%, #dcdcdc 100%);background:-o-linear-gradient(top, white 0%, #dcdcdc 100%);background:linear-gradient(to bottom, white 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));background:-webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:.5em}} + + +@keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dataTables_wrapper{position:relative}div.dt-buttons{position:initial}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 4px 10px 1px rgba(0, 0, 0, 0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dtb-popover-close{position:absolute;top:10px;right:10px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}button.dtb-hide-drop{display:none !important}div.dt-button-collection-title{text-align:center;padding:.3em 0 .5em;margin-left:.5em;margin-right:.5em;font-size:.9em}div.dt-button-collection-title:empty{display:none}span.dt-button-spacer{display:inline-block;margin:.5em;white-space:nowrap}span.dt-button-spacer.bar{border-left:1px solid rgba(0, 0, 0, 0.3);vertical-align:middle;padding-left:.5em}span.dt-button-spacer.bar:empty{height:1em;width:1px;padding-left:0}div.dt-button-collection span.dt-button-spacer{width:100%;font-size:.9em;text-align:center;margin:.5em 0}div.dt-button-collection span.dt-button-spacer:empty{height:0;width:100%}div.dt-button-collection span.dt-button-spacer.bar{border-left:none;border-bottom:1px solid rgba(0, 0, 0, 0.3);padding-left:0}button.dt-button,div.dt-button,a.dt-button,input.dt-button{position:relative;display:inline-block;box-sizing:border-box;margin-left:.167em;margin-right:.167em;margin-bottom:.333em;padding:.5em 1em;border:1px solid rgba(0, 0, 0, 0.3);border-radius:2px;cursor:pointer;font-size:.88em;line-height:1.6em;color:black;white-space:nowrap;overflow:hidden;background-color:rgba(0, 0, 0, 0.1);background:-webkit-linear-gradient(top, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-moz-linear-gradient(top, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-ms-linear-gradient(top, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-o-linear-gradient(top, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:linear-gradient(to bottom, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="rgba(230, 230, 230, 0.1)", EndColorStr="rgba(0, 0, 0, 0.1)");-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;outline:none;text-overflow:ellipsis}button.dt-button:first-child,div.dt-button:first-child,a.dt-button:first-child,input.dt-button:first-child{margin-left:0}button.dt-button.disabled,div.dt-button.disabled,a.dt-button.disabled,input.dt-button.disabled{cursor:default;opacity:.4}button.dt-button:active:not(.disabled),button.dt-button.active:not(.disabled),div.dt-button:active:not(.disabled),div.dt-button.active:not(.disabled),a.dt-button:active:not(.disabled),a.dt-button.active:not(.disabled),input.dt-button:active:not(.disabled),input.dt-button.active:not(.disabled){background-color:rgba(0, 0, 0, 0.1);background:-webkit-linear-gradient(top, rgba(179, 179, 179, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-moz-linear-gradient(top, rgba(179, 179, 179, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-ms-linear-gradient(top, rgba(179, 179, 179, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-o-linear-gradient(top, rgba(179, 179, 179, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:linear-gradient(to bottom, rgba(179, 179, 179, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="rgba(179, 179, 179, 0.1)", EndColorStr="rgba(0, 0, 0, 0.1)");box-shadow:inset 1px 1px 3px #999}button.dt-button:active:not(.disabled):hover:not(.disabled),button.dt-button.active:not(.disabled):hover:not(.disabled),div.dt-button:active:not(.disabled):hover:not(.disabled),div.dt-button.active:not(.disabled):hover:not(.disabled),a.dt-button:active:not(.disabled):hover:not(.disabled),a.dt-button.active:not(.disabled):hover:not(.disabled),input.dt-button:active:not(.disabled):hover:not(.disabled),input.dt-button.active:not(.disabled):hover:not(.disabled){box-shadow:inset 1px 1px 3px #999;background-color:rgba(0, 0, 0, 0.1);background:-webkit-linear-gradient(top, rgba(128, 128, 128, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-moz-linear-gradient(top, rgba(128, 128, 128, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-ms-linear-gradient(top, rgba(128, 128, 128, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-o-linear-gradient(top, rgba(128, 128, 128, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:linear-gradient(to bottom, rgba(128, 128, 128, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="rgba(128, 128, 128, 0.1)", EndColorStr="rgba(0, 0, 0, 0.1)")}button.dt-button:hover,div.dt-button:hover,a.dt-button:hover,input.dt-button:hover{text-decoration:none}button.dt-button:hover:not(.disabled),div.dt-button:hover:not(.disabled),a.dt-button:hover:not(.disabled),input.dt-button:hover:not(.disabled){border:1px solid #666;background-color:rgba(0, 0, 0, 0.1);background:-webkit-linear-gradient(top, rgba(153, 153, 153, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-moz-linear-gradient(top, rgba(153, 153, 153, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-ms-linear-gradient(top, rgba(153, 153, 153, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:-o-linear-gradient(top, rgba(153, 153, 153, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);background:linear-gradient(to bottom, rgba(153, 153, 153, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="rgba(153, 153, 153, 0.1)", EndColorStr="rgba(0, 0, 0, 0.1)")}button.dt-button:focus:not(.disabled),div.dt-button:focus:not(.disabled),a.dt-button:focus:not(.disabled),input.dt-button:focus:not(.disabled){border:1px solid #426c9e;text-shadow:0 1px 0 #c4def1;outline:none;background-color:#79ace9;background:-webkit-linear-gradient(top, #d1e2f7 0%, #79ace9 100%);background:-moz-linear-gradient(top, #d1e2f7 0%, #79ace9 100%);background:-ms-linear-gradient(top, #d1e2f7 0%, #79ace9 100%);background:-o-linear-gradient(top, #d1e2f7 0%, #79ace9 100%);background:linear-gradient(to bottom, #d1e2f7 0%, #79ace9 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#d1e2f7", EndColorStr="#79ace9")}button.dt-button span.dt-down-arrow,div.dt-button span.dt-down-arrow,a.dt-button span.dt-down-arrow,input.dt-button span.dt-down-arrow{position:relative;top:-2px;color:rgba(70, 70, 70, 0.75);font-size:8px;padding-left:10px;line-height:1em}.dt-button embed{outline:none}div.dt-buttons{float:left}div.dt-buttons.buttons-right{float:right}div.dataTables_layout_cell div.dt-buttons{float:none}div.dataTables_layout_cell div.dt-buttons.buttons-right{float:none}div.dt-btn-split-wrapper{display:inline-block}div.dt-button-collection{position:absolute;top:0;left:0;width:200px;margin-top:3px;margin-bottom:3px;padding:4px 4px 2px 4px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.4);background-color:white;overflow:hidden;z-index:2002;border-radius:5px;box-shadow:3px 4px 10px 1px rgba(0, 0, 0, 0.3);box-sizing:border-box}div.dt-button-collection button.dt-button,div.dt-button-collection div.dt-button,div.dt-button-collection a.dt-button{position:relative;left:0;right:0;width:100%;display:block;float:none;margin:4px 0 2px 0}div.dt-button-collection button.dt-button:active:not(.disabled),div.dt-button-collection button.dt-button.active:not(.disabled),div.dt-button-collection div.dt-button:active:not(.disabled),div.dt-button-collection div.dt-button.active:not(.disabled),div.dt-button-collection a.dt-button:active:not(.disabled),div.dt-button-collection a.dt-button.active:not(.disabled){background-color:#dadada;background:-webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-moz-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-ms-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-o-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:linear-gradient(to bottom, #f0f0f0 0%, #dadada 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#f0f0f0", EndColorStr="#dadada");box-shadow:inset 1px 1px 3px #666}div.dt-button-collection button.dt-button:first-child,div.dt-button-collection div.dt-button:first-child,div.dt-button-collection a.dt-button:first-child{margin-top:0;border-top-left-radius:3px;border-top-right-radius:3px}div.dt-button-collection button.dt-button:last-child,div.dt-button-collection div.dt-button:last-child,div.dt-button-collection a.dt-button:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}div.dt-button-collection div.dt-btn-split-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:stretch;margin:4px 0 2px 0}div.dt-button-collection div.dt-btn-split-wrapper button.dt-button{margin:0;display:inline-block;width:0;flex-grow:1;flex-shrink:0;flex-basis:50px;border-radius:0}div.dt-button-collection div.dt-btn-split-wrapper button.dt-btn-split-drop{min-width:20px;flex-grow:0;flex-shrink:0;flex-basis:0}div.dt-button-collection div.dt-btn-split-wrapper:first-child{margin-top:0}div.dt-button-collection div.dt-btn-split-wrapper:first-child button.dt-button{border-top-left-radius:3px}div.dt-button-collection div.dt-btn-split-wrapper:first-child button.dt-btn-split-drop{border-top-right-radius:3px}div.dt-button-collection div.dt-btn-split-wrapper:last-child button.dt-button{border-bottom-left-radius:3px}div.dt-button-collection div.dt-btn-split-wrapper:last-child button.dt-btn-split-drop{border-bottom-right-radius:3px}div.dt-button-collection div.dt-btn-split-wrapper:active:not(.disabled) button.dt-button,div.dt-button-collection div.dt-btn-split-wrapper.active:not(.disabled) button.dt-button{background-color:#dadada;background:-webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-moz-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-ms-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:-o-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background:linear-gradient(to bottom, #f0f0f0 0%, #dadada 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#f0f0f0", EndColorStr="#dadada");box-shadow:inset 0px 0px 4px #666}div.dt-button-collection div.dt-btn-split-wrapper:active:not(.disabled) button.dt-btn-split-drop,div.dt-button-collection div.dt-btn-split-wrapper.active:not(.disabled) button.dt-btn-split-drop{box-shadow:none}div.dt-button-collection.fixed .dt-button:first-child{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}div.dt-button-collection.fixed .dt-button:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0}div.dt-button-collection.fixed{position:fixed;display:block;top:50%;left:50%;margin-left:-75px;border-radius:5px;background-color:white}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection.fixed.columns{margin-left:-409px}@media screen and (max-width: 1024px){div.dt-button-collection.fixed.columns{margin-left:-308px}}@media screen and (max-width: 640px){div.dt-button-collection.fixed.columns{margin-left:-203px}}@media screen and (max-width: 460px){div.dt-button-collection.fixed.columns{margin-left:-100px}}div.dt-button-collection.fixed>:last-child{max-height:100vh;overflow:auto}div.dt-button-collection.two-column>:last-child,div.dt-button-collection.three-column>:last-child,div.dt-button-collection.four-column>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection.two-column>:last-child>*,div.dt-button-collection.three-column>:last-child>*,div.dt-button-collection.four-column>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;column-count:4}div.dt-button-collection .dt-button{border-radius:0}div.dt-button-collection.columns{width:auto}div.dt-button-collection.columns>:last-child{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px;width:818px;padding-bottom:1px}div.dt-button-collection.columns>:last-child .dt-button{min-width:200px;flex:0 1;margin:0}div.dt-button-collection.columns.dtb-b3>:last-child,div.dt-button-collection.columns.dtb-b2>:last-child,div.dt-button-collection.columns.dtb-b1>:last-child{justify-content:space-between}div.dt-button-collection.columns.dtb-b3 .dt-button{flex:1 1 32%}div.dt-button-collection.columns.dtb-b2 .dt-button{flex:1 1 48%}div.dt-button-collection.columns.dtb-b1 .dt-button{flex:1 1 100%}@media screen and (max-width: 1024px){div.dt-button-collection.columns>:last-child{width:612px}}@media screen and (max-width: 640px){div.dt-button-collection.columns>:last-child{width:406px}div.dt-button-collection.columns.dtb-b3 .dt-button{flex:0 1 32%}}@media screen and (max-width: 460px){div.dt-button-collection.columns>:last-child{width:200px}}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);background:-ms-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);background:-moz-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);background:-o-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);background:-webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0, 0, 0, 0.3)), color-stop(1, rgba(0, 0, 0, 0.7)));background:-webkit-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);background:radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);z-index:2001}@media screen and (max-width: 640px){div.dt-buttons{float:none !important;text-align:center}}button.dt-button.processing,div.dt-button.processing,a.dt-button.processing{color:rgba(0, 0, 0, 0.2)}button.dt-button.processing:after,div.dt-button.processing:after,a.dt-button.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:" ";border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}button.dt-btn-split-drop{margin-left:calc(-1px - .333em);padding-bottom:calc(.5em - 1px);border-radius:0px 1px 1px 0px;color:rgba(70, 70, 70, 0.9);border-left:none}button.dt-btn-split-drop span.dt-btn-split-drop-arrow{position:relative;top:-1px;left:-2px;font-size:8px}button.dt-btn-split-drop:hover{z-index:2}button.buttons-split{border-right:1px solid rgba(70, 70, 70, 0);border-radius:1px 0px 0px 1px}button.dt-btn-split-drop-button{background-color:white}button.dt-btn-split-drop-button:hover{background-color:white} + + +table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255, 255, 255, 0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0259c4;z-index:201} + + +div.dt-datetime{position:absolute;background-color:white;z-index:2050;border:1px solid #ccc;box-shadow:0 5px 15px -5px rgba(0, 0, 0, 0.5);padding:0 20px 6px 20px;width:275px}div.dt-datetime.inline{position:relative;box-shadow:none}div.dt-datetime div.dt-datetime-title{text-align:center;padding:5px 0px 3px}div.dt-datetime div.dt-datetime-buttons{text-align:center}div.dt-datetime div.dt-datetime-buttons a{display:inline-block;padding:0 .5em .5em .5em;margin:0;font-size:.9em}div.dt-datetime div.dt-datetime-buttons a:hover{text-decoration:underline}div.dt-datetime table{border-spacing:0;margin:12px 0;width:100%}div.dt-datetime table.dt-datetime-table-nospace{margin-top:-12px}div.dt-datetime table th{font-size:.8em;color:#777;font-weight:normal;width:14.285714286%;padding:0 0 4px 0;text-align:center}div.dt-datetime table td{font-size:.9em;color:#444;padding:0}div.dt-datetime table td.selectable{text-align:center;background:#f5f5f5}div.dt-datetime table td.selectable.disabled{color:#aaa;background:white}div.dt-datetime table td.selectable.disabled button:hover{color:#aaa;background:white}div.dt-datetime table td.selectable.now{background-color:#ddd}div.dt-datetime table td.selectable.now button{font-weight:bold}div.dt-datetime table td.selectable.selected button{background:#4e6ca3;color:white;border-radius:2px}div.dt-datetime table td.selectable button:hover{background:#ff8000;color:white;border-radius:2px}div.dt-datetime table td.dt-datetime-week{font-size:.7em}div.dt-datetime table button{width:100%;box-sizing:border-box;border:none;background:transparent;font-size:inherit;color:inherit;text-align:center;padding:4px 0;cursor:pointer;margin:0}div.dt-datetime table button span{display:inline-block;min-width:14px;text-align:right}div.dt-datetime table.weekNumber th{width:12.5%}div.dt-datetime div.dt-datetime-calendar table{margin-top:0}div.dt-datetime div.dt-datetime-label{position:relative;display:inline-block;height:30px;padding:5px 6px;border:1px solid transparent;box-sizing:border-box;cursor:pointer}div.dt-datetime div.dt-datetime-label:hover{border:1px solid #ddd;border-radius:2px;background-color:#f5f5f5}div.dt-datetime div.dt-datetime-label select{position:absolute;top:6px;left:0;cursor:pointer;opacity:0}div.dt-datetime.horizontal{width:550px}div.dt-datetime.horizontal div.dt-datetime-date,div.dt-datetime.horizontal div.dt-datetime-time{width:48%}div.dt-datetime.horizontal div.dt-datetime-time{margin-left:4%}div.dt-datetime div.dt-datetime-date{position:relative;float:left;width:100%}div.dt-datetime div.dt-datetime-time{position:relative;float:left;width:100%;text-align:center}div.dt-datetime div.dt-datetime-time>span{vertical-align:middle}div.dt-datetime div.dt-datetime-time th{text-align:left}div.dt-datetime div.dt-datetime-time div.dt-datetime-timeblock{display:inline-block;vertical-align:middle}div.dt-datetime div.dt-datetime-iconLeft,div.dt-datetime div.dt-datetime-iconRight,div.dt-datetime div.dt-datetime-iconUp,div.dt-datetime div.dt-datetime-iconDown{width:30px;height:30px;background-position:center;background-repeat:no-repeat;opacity:.3;overflow:hidden;box-sizing:border-box}div.dt-datetime div.dt-datetime-iconLeft:hover,div.dt-datetime div.dt-datetime-iconRight:hover,div.dt-datetime div.dt-datetime-iconUp:hover,div.dt-datetime div.dt-datetime-iconDown:hover{border:1px solid #ccc;border-radius:2px;background-color:#f0f0f0;opacity:.6}div.dt-datetime div.dt-datetime-iconLeft button,div.dt-datetime div.dt-datetime-iconRight button,div.dt-datetime div.dt-datetime-iconUp button,div.dt-datetime div.dt-datetime-iconDown button{border:none;background:transparent;text-indent:30px;height:100%;width:100%;cursor:pointer}div.dt-datetime div.dt-datetime-iconLeft{position:absolute;top:5px;left:5px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==")}div.dt-datetime div.dt-datetime-iconRight{position:absolute;top:5px;right:5px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=")}div.dt-datetime div.dt-datetime-iconUp{height:20px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAL0lEQVR4AWOgJmBhxCvLyopHnpmVjY2VCadeoCxIHrcsWJ4RlyxCHlMWCTBRJxwAjrIBDMWSiM0AAAAASUVORK5CYII=")}div.dt-datetime div.dt-datetime-iconDown{height:20px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAMElEQVR4AWOgDmBiRQIsmPKMrGxQgJDFlEfIYpoPk8Utz8qM232MYFfhkQfKUg8AANefAQxecJ58AAAAAElFTkSuQmCC")}div.dt-datetime-error{clear:both;padding:0 1em;max-width:240px;font-size:11px;line-height:1.25em;text-align:center;color:#b11f1f} + + +table.dataTable.display tbody tr.DTFC_NoData{background-color:transparent}tr.even td{background-color:#fff}tr.odd td{background-color:#f9f9f9}tr.selected td{background-color:#a6b4cd}thead th{background-color:white}tfoot th{background-color:white}tr.dt-rowReorder-moving td.dtfc-fixed-left,tr.dt-rowReorder-moving td.dtfc-fixed-right{border-top:2px solid #555 !important;border-bottom:2px solid #555 !important}tr.dt-rowReorder-moving td.dtfc-fixed-left:first-child{border-left:2px solid #555 !important}tr.dt-rowReorder-moving td.dtfc-fixed-right:last-child{border-right:2px solid #555 !important} + + +table.fixedHeader-floating{background-color:white}table.fixedHeader-floating.no-footer{border-bottom-width:0}table.fixedHeader-locked{position:absolute !important;background-color:white}@media print{table.fixedHeader-floating{display:none}} + + +table.dataTable tbody th.focus,table.dataTable tbody td.focus{box-shadow:inset 0 0 1px 2px #36f}div.dtk-focus-alt table.dataTable tbody th.focus,div.dtk-focus-alt table.dataTable tbody td.focus{box-shadow:inset 0 0 1px 2px #ff8b33} + + +table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before{top:50%;left:5px;height:1em;width:1em;margin-top:-9px;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before{content:"-";background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control:before{left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:.8em;width:.8em;margin-top:-0.5em;margin-left:-0.5em;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#31b131}table.dataTable.dtr-column>tbody>tr.parent td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent th.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:"-";background-color:#d33333}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:.5em;box-shadow:0 12px 30px rgba(0, 0, 0, 0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0, 0, 0, 0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}} + + +table.dataTable tr.dtrg-group td{background-color:#e0e0e0}table.dataTable tr.dtrg-group.dtrg-level-0 td{font-weight:bold}table.dataTable tr.dtrg-group.dtrg-level-1 td,table.dataTable tr.dtrg-group.dtrg-level-2 td,table.dataTable tr.dtrg-group.dtrg-level-3 td,table.dataTable tr.dtrg-group.dtrg-level-4 td,table.dataTable tr.dtrg-group.dtrg-level-5 td{background-color:#f0f0f0;padding-top:.25em;padding-bottom:.25em;padding-left:2em;font-size:.9em}table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f3f3f3;padding-left:2.5em}table.dataTable tr.dtrg-group.dtrg-level-3 td{background-color:#f3f3f3;padding-left:3em}table.dataTable tr.dtrg-group.dtrg-level-4 td{background-color:#f3f3f3;padding-left:3.5em}table.dataTable tr.dtrg-group.dtrg-level-5 td{background-color:#f3f3f3;padding-left:4em} + + +table.dt-rowReorder-float{position:absolute !important;opacity:.8;table-layout:fixed;outline:2px solid #888;outline-offset:-2px;z-index:2001}tr.dt-rowReorder-moving{outline:2px solid #555;outline-offset:-2px}body.dt-rowReorder-noOverflow{overflow-x:hidden}table.dataTable td.reorder{text-align:center;cursor:move} + + +div.dts{display:block !important}div.dts tbody th,div.dts tbody td{white-space:nowrap}div.dts div.dts_loading{z-index:1}div.dts div.dts_label{position:absolute;right:10px;background:rgba(0, 0, 0, 0.8);color:white;box-shadow:3px 3px 10px rgba(0, 0, 0, 0.5);text-align:right;border-radius:3px;padding:.4em;z-index:2;display:none}div.dts div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px)}div.dts div.dataTables_scrollBody table{z-index:2}div.dts div.dataTables_paginate,div.dts div.dataTables_length{display:none} + + +div.dt-button-collection{overflow:visible !important;z-index:2002 !important}div.dt-button-collection div.dtsb-searchBuilder{width:99% !important;padding-left:10px !important;padding-right:10px !important}div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow{padding-right:40px}.dtsb-greyscale{border:1px solid #cecece !important}div.dtsb-logicContainer .dtsb-greyscale{border:none !important}div.dtsb-searchBuilder{justify-content:space-evenly;cursor:default;margin-bottom:1em;text-align:left}div.dtsb-searchBuilder button.dtsb-button,div.dtsb-searchBuilder select{font-size:1em}div.dtsb-searchBuilder div.dtsb-titleRow{justify-content:space-evenly;margin-bottom:.5em}div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title{display:inline-block;padding-top:6px}div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title:empty{display:inline}div.dtsb-searchBuilder div.dtsb-titleRow button.dtsb-clearAll{float:right;margin-bottom:.333em}div.dtsb-searchBuilder div.dtsb-vertical .dtsb-value,div.dtsb-searchBuilder div.dtsb-vertical .dtsb-data,div.dtsb-searchBuilder div.dtsb-vertical .dtsb-condition{display:block}div.dtsb-searchBuilder div.dtsb-group{position:relative;clear:both;margin-bottom:.8em}div.dtsb-searchBuilder div.dtsb-group button.dtsb-clearGroup{margin:2px;text-align:center;padding:0}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);position:absolute;margin-top:.8em;margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria{margin-bottom:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input{padding:.4em;margin-right:.8em;max-width:20em;background-color:rgba(200, 200, 200, 0.3)}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown option.dtsb-notItalic,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic{font-style:normal}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-italic{font-style:italic}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer{float:right;display:inline-block}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-delete,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-right,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-left{margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-delete:last-child,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-right:last-child,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-left:last-child{margin-right:0}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria span.dtsp-joiner{margin-right:.8em}div.dtsb-searchBuilder button,div.dtsb-searchBuilder select,div.dtsb-searchBuilder input{background-color:#f9f9f9}div.dtsb-searchBuilder button.dtsb-button{position:relative;display:inline-block;box-sizing:border-box;padding:.5em 1em;border:1px solid rgba(0, 0, 0, 0.3);border-radius:2px;cursor:pointer;font-size:.88em;line-height:1.6em;color:black;white-space:nowrap;overflow:hidden;background-color:rgba(0, 0, 0, 0.1);background:linear-gradient(to bottom, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;outline:none;text-overflow:ellipsis}div.dtsb-searchBuilder button.dtsb-button:hover{background-color:#cecece !important;cursor:pointer}div.dtsb-searchBuilder div.dtsb-logicContainer{border:1px solid rgba(0, 0, 0, 0.3);background-color:rgba(0, 0, 0, 0.1);background:linear-gradient(to right, rgba(230, 230, 230, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%)}div.dtsb-searchBuilder div.dtsb-logicContainer button{border:1px solid transparent;background:transparent}div.dtsb-searchBuilder button.dtsb-clearGroup{min-width:2em;padding:0}div.dtsb-searchBuilder button.dtsb-iptbtn{min-width:100px;text-align:left}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer{border:1px solid;border-color:#cecece;border-radius:3px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic{border:none;border-radius:0px;flex-grow:1;flex-shrink:0;flex-basis:3em;margin:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup{border:none;border-radius:0px;width:2em;margin:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input{border:1px solid;border-radius:3px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition{border-color:#48b13c}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data{border-color:#e70f00}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value{border-color:#0069ba}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition option.dtsb-option,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data option.dtsb-option,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value option.dtsb-option{background-color:white} + + +div.dtsp-topRow{display:flex;flex-direction:row;flex-wrap:nowrap;border:2px solid rgba(0, 0, 0, 0);border-radius:3px;justify-content:space-around;align-content:flex-start;align-items:flex-start;min-height:37px}div.dtsp-topRow input.dtsp-search{text-overflow:ellipsis;min-width:50px;flex-basis:90px;max-width:none}div.dtsp-topRow input.dtsp-search::placeholder{color:black}div.dtsp-topRow div.dtsp-subRow1{display:flex;flex-direction:row;flex-wrap:nowrap;flex:1 1 auto}div.dtsp-topRow div.dtsp-subRow1 div.dtsp-searchCont{position:relative;width:100%}div.dtsp-topRow div.dtsp-subRow1 div.dtsp-searchCont input.dtsp-disabledButton{padding-top:10px;padding-bottom:10px;background-color:transparent}div.dtsp-topRow div.dtsp-subRow1 input{padding-right:2em;width:100% !important;box-sizing:border-box;font-size:1em}div.dtsp-topRow div.dtsp-subRow1 button.dtsp-searchIcon{position:absolute;top:0;right:0;bottom:0;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABbmlDQ1BpY2MAACiRdZE7SwNBFIU/EyWikRRaiFhsoWKhEBREO42FTZAQFYza7G5eQhKX3QQJtoKNhWAh2vgq/AfaCrYKgqAIIhb+Al+NhPVOEkiQZJbZ+3FmzmXmDHjCGTPrtAYhm8vb0bmQthxb0Xzv+PHRxRSabjrWTCQSpun4eaRF1YdR1av5voajM55wTGhpF54wLTsvPC0c3sxbineFe8y0Hhc+ER6x5YDCt0o3KvymOFXhL8X2YnQWPKqnlqpjo47NtJ0VHhYeyGYKZvU86ib+RG5pQWqfzH4coswRQsOgwDoZ8oxKzUlmjX3Bsm+eDfGY8rcoYosjRVq8I6IWpGtCalL0hHwZiir3/3k6yfGxSnd/CNpeXfdzEHz7UNpz3d9T1y2dgfcFrnM1/4bkNPkt+l5NGziGwDZc3tQ04wCudqD32dJtvSx5ZXqSSfi4gK4YdN9Dx2olq+o650+wuCVPdAeHRzAk+wNrfw8JaBFXEnV+AAAACXBIWXMAAA9hAAAPYQGoP6dpAAABMUlEQVQoU6XRr0vDQRjH8akoM4iIjqGoOIZ5oIjB5XWxajaYDGLSIhhNYjcPRDSJwbQNw+L+BNGgYYo/5pT5/shz8vDlBgMPXux7z3N3z+25VOofYyCyd4ZYCavI4gXPsRp9LqiDdrEMH+8wv8Vh8gBfWclFPOEUN3hAHjlMoRa7wTzBS5xgKLFglPkZLjDic6HyDsEMNvGR2Nxifoci3tEI+X770JU0XmPXIlax+LTPh83fFox1X6kxyzdjm9UcdXi9S+Vti6svfyNULhNR9TVsYNhW6Ff9KKCNR7/Zv6eeaQ+6+qcdpu9BqGlp1HFgud+FYdzzUcUExu0Q/cdzHGEFetIlXKPjK/sbqYoOftMiS+j9jzEJPd1Wt+5+kdR/9EM9ucIC5jCbyPc01Q32kfsBppYz3hYFcCwAAAAASUVORK5CYII=") !important;background-repeat:no-repeat;background-position:center;background-size:12px}div.dtsp-topRow div.dtsp-subRow2{white-space:nowrap;flex:0 0 auto}div.dtsp-topRow button.dtsp-nameButton{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAABcGlDQ1BpY2MAACiRdZHNSwJBGMYftTDS8FCHkA57sOigIAXRMQzyYh3UIKvL7rirwe66zK6IdA26dBA6RF36OvQf1DXoWhAERRAR9B/0dQnZ3nEFJXSG2ffHs/O8zDwD+DM6M+yBJGCYDs+mU9JaYV0KviNMM4QoEjKzreXcUh59x88jfKI+JESv/vt6jlBRtRngGyKeYxZ3iBeIMzXHErxHPMbKcpH4hDjO6YDEt0JXPH4TXPL4SzDPZxcBv+gplbpY6WJW5gbxNHHM0KusfR5xk7BqruaoRmlNw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/kIyw/gFByHC9AHw910hv1aUUumyd8yy0QfhmEkfiNod0Xusct68J1qc8Tdux0Z97Q+hsDb+AYGYEbF/4Guw2Q/qDPqZG/zXgT+3Qj8AtKnfWhFwmuAAAAAAElFTkSuQmCC") !important;background-repeat:no-repeat;background-position:center;background-size:23px;vertical-align:bottom}div.dtsp-topRow button.dtsp-countButton{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABcGlDQ1BpY2MAACiRdZHNSwJBGMYftTDS8FCHkA57sOigIAXRMQzyYh3UIKvL7rirwe66zK6IdA26dBA6RF36OvQf1DXoWhAERRAR9B/0dQnZ3nEFJXSG2ffHs/O8zDwD+DM6M+yBJGCYDs+mU9JaYV0KviNMM4QoEjKzreXcUh59x88jfKI+JESv/vt6jlBRtRngGyKeYxZ3iBeIMzXHErxHPMbKcpH4hDjO6YDEt0JXPH4TXPL4SzDPZxcBv+gplbpY6WJW5gbxNHHM0KusfR5xk7BqruaoRmlNwEYWaaQgQUEVW9DhIEHVpMx6+5It3woq5GH0tVAHJ0cJZfLGSa1SV5WqRrpKU0dd5P4/T1ubnfG6h1PA4Kvrfk4CwX2g2XDd31PXbZ4BgRfg2uz4K5TT/DfpjY4WOwYiO8DlTUdTDoCrXWD82ZK53JICtPyaBnxcACMFYPQeGN7wsmr/x/kTkN+mJ7oDDo+AKdof2fwDCBRoDkL8UccAAAAJcEhZcwAAD2EAAA9hAag/p2kAAAG5SURBVEgN3VU9LwVBFF0fiYhofUSlEQkKhU7z/oBCQkIiGr9BgUbhVzy9BAnhFyjV/AYFiU5ICM7ZN+c5Zud5dm3lJmfmzrkz9+7cu3c3y/6jjOBSF8CxXS7FmTkbwqIJjDpJvTcmsJ4K3KPZUpyZsx0sxoB9J6mnAkyC7wGuuCFIipNtEcpcWExgXpOBc78vgj6N+QO4NVsjwdFM59tUIDxDrHMBOeIQ34C5ZDregXuAQm4YcI68nN9B3wr2PcwPAIPkN2EqtJH6b+QZm1ajjTx7BqwAr26Lb+C2Kvpbt0Mb2HAJ7NrGFGfmXO3DeA4UshDfQAVmH0gaUFg852TTTDvlxwBlCtxy9zXyBhQFaq0wMmIdRebrfgosA3zb2hKnqG0oqchp4QbuR8X0TjzABhbdOT8jnQ/atcgqpnfwOA7yqZyTU587ZkIGdesLTt2EkynOnbreMUUKMI/dA4B/QVOcO13CQh+5wWCgDwo/75u59odB/wjmfhbgvACcAOyZPHihMWAoIwxyCLgf1oxfgjzVbgBXSTzIN+f0pg6s5DkcesLMRpsBrgE2XO3CN64JFP7JtUeKHX4CKtRRXFZ+7dEAAAAASUVORK5CYII=") !important;background-repeat:no-repeat;background-position:center;background-size:18px;vertical-align:bottom}div.dtsp-topRow button.dtsp-collapseButton span.dtsp-caret{position:relative;top:2px;display:inline-block}div.dtsp-topRow button.dtsp-collapseButton.dtsp-rotated{transform:rotate(180deg)}div.dtsp-topRow.dtsp-bordered{border:2px solid #f0f0f0;border-radius:3px}div.dtsp-topRow.dtsp-bordered:hover{background-color:#f0f0f0;opacity:.6;border:2px solid #cfcfcf;border-radius:3px;cursor:pointer !important}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane table thead th,div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane table thead td{width:100% !important}div.dt-button-collection{z-index:2002}div.dt-button-collection.dtb-collection-closeable div.dtsp-titleRow{padding-right:25px}div.dtsp-columns-1{max-width:100%;margin:0px !important}div.dtsp-columns-2{max-width:49%;margin:0px !important}div.dtsp-columns-3{max-width:32%;margin:0px !important}div.dtsp-columns-4{max-width:24%;margin:0px !important}div.dtsp-columns-5{max-width:19%;margin:0px !important}div.dtsp-columns-6{max-width:16%;margin:0px !important}div.dtsp-columns-7{max-width:14%;margin:0px !important}div.dtsp-columns-8{min-width:12%;margin:0px !important}div.dtsp-columns-9{max-width:10.5%;margin:0px !important}div.dt-button-collection{float:none}div.dtsp-panesContainer{margin-bottom:1em}div.dtsp-panesContainer div.dataTables_wrapper{width:100%}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_layout_cell{padding:0}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollHead{display:none !important}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody{background:white !important;border-bottom:none}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody thead{display:none}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table{table-layout:fixed}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table tr>th,div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table tr>td{padding:5px 10px}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody td.dtsp-nameColumn{width:100% !important}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont{width:100%;display:flex;flex-direction:row;justify-content:flex-start;align-content:flex-start;align-items:flex-start}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-name,div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill{cursor:default}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-name{text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;white-space:nowrap;flex-grow:1;text-align:left}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill{display:inline-block;background-color:#cfcfcf;text-align:center;border:1px solid #cfcfcf;border-radius:10px;width:auto;min-width:30px;color:black;font-size:.9em;padding:0 4px}div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill:empty{display:none}div.dtsp-panesContainer{clear:both;padding-left:0;padding-right:0;text-align:center}div.dtsp-panesContainer div.dtsp-searchPanes{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-content:flex-start;align-items:stretch;clear:both;text-align:left}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane{flex-grow:1;flex-shrink:0;font-size:.9em;margin-top:15px !important}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper{flex:1;box-sizing:border-box}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper div.dataTables_filter{display:none}div.dtsp-panesContainer div.dtsp-title{float:left;padding:10px 0}div.dtsp-panesContainer button.dtsp-clearAll,div.dtsp-panesContainer button.dtsp-collapseAll,div.dtsp-panesContainer button.dtsp-showAll{float:right;padding:10px}div.dtsp-hidden{display:none !important}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper{border:2px solid #f0f0f0;border-radius:4px}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper:hover{border:2px solid #cfcfcf}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dtsp-selected{border:2px solid #3276b1;border-radius:4px}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dtsp-selected:hover{border:2px solid #286092}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dtsp-topRow div.dtsp-searchCont input.dtsp-search{border:none;padding-left:3px}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane input.dtsp-paneInputButton,div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane button.dtsp-paneButton{height:35px;width:35px;min-width:0;display:inline-block;margin:2px;border:0px solid transparent;background-color:transparent;margin-bottom:0px}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane input.dtsp-paneInputButton:hover,div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane button.dtsp-paneButton:hover{background-color:#f0f0f0;border-radius:2px;cursor:pointer}div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane button.dtsp-paneButton{opacity:.6}div.dtsp-panesContainer button.dtsp-clearAll,div.dtsp-panesContainer button.dtsp-collapseAll,div.dtsp-panesContainer button.dtsp-showAll{border:1px solid transparent;background-color:transparent}div.dtsp-panesContainer button.dtsp-clearAll:hover,div.dtsp-panesContainer button.dtsp-collapseAll:hover,div.dtsp-panesContainer button.dtsp-showAll:hover{background-color:#f0f0f0;border-radius:2px;cursor:pointer}div.dtsp-panesContainer button.dtsp-disabledButton{cursor:default !important;color:#7c7c7c}div.dtsp-panesContainer button.dtsp-disabledButton:hover{background-color:transparent}div.dtsp-panesContainer button.dtsp-disabledButton:focus{outline:none}div.dtsp-topRow.dtsp-bordered:hover button.dtsp-disabledButton{cursor:pointer !important;pointer-events:none}div.dtsp-topRow.dtsp-bordered:hover input.dtsp-paneInputButton{pointer-events:none}div.dtsp-narrow{flex-direction:column !important}div.dtsp-narrow div.dtsp-subRows{width:100%;text-align:right}@media screen and (max-width: 767px){div.dtsp-columns-4,div.dtsp-columns-5,div.dtsp-columns-6{max-width:31% !important;min-width:31% !important}}@media screen and (max-width: 640px){div.dtsp-searchPanes{flex-direction:column !important}div.dtsp-searchPane{max-width:98% !important;min-width:98% !important}} + + +table.dataTable tbody>tr.selected,table.dataTable tbody>tr>.selected{background-color:#b0bed9}table.dataTable.stripe tbody>tr.odd.selected,table.dataTable.stripe tbody>tr.odd>.selected,table.dataTable.display tbody>tr.odd.selected,table.dataTable.display tbody>tr.odd>.selected{background-color:#acbad4}table.dataTable.hover tbody>tr.selected:hover,table.dataTable.hover tbody>tr>.selected:hover,table.dataTable.display tbody>tr.selected:hover,table.dataTable.display tbody>tr>.selected:hover{background-color:#aab7d1}table.dataTable.order-column tbody>tr.selected>.sorting_1,table.dataTable.order-column tbody>tr.selected>.sorting_2,table.dataTable.order-column tbody>tr.selected>.sorting_3,table.dataTable.order-column tbody>tr>.selected,table.dataTable.display tbody>tr.selected>.sorting_1,table.dataTable.display tbody>tr.selected>.sorting_2,table.dataTable.display tbody>tr.selected>.sorting_3,table.dataTable.display tbody>tr>.selected{background-color:#acbad5}table.dataTable.display tbody>tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody>tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody>tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody>tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody>tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody>tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody>tr.odd>.selected,table.dataTable.order-column.stripe tbody>tr.odd>.selected{background-color:#a6b4cd}table.dataTable.display tbody>tr.even>.selected,table.dataTable.order-column.stripe tbody>tr.even>.selected{background-color:#acbad5}table.dataTable.display tbody>tr.selected:hover>.sorting_1,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody>tr.selected:hover>.sorting_2,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody>tr.selected:hover>.sorting_3,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_3{background-color:#a5b2cb}table.dataTable.display tbody>tr:hover>.selected,table.dataTable.display tbody>tr>.selected:hover,table.dataTable.order-column.hover tbody>tr:hover>.selected,table.dataTable.order-column.hover tbody>tr>.selected:hover{background-color:#a2aec7}table.dataTable tbody td.select-checkbox,table.dataTable tbody th.select-checkbox{position:relative}table.dataTable tbody td.select-checkbox:before,table.dataTable tbody td.select-checkbox:after,table.dataTable tbody th.select-checkbox:before,table.dataTable tbody th.select-checkbox:after{display:block;position:absolute;top:1.2em;left:50%;width:12px;height:12px;box-sizing:border-box}table.dataTable tbody td.select-checkbox:before,table.dataTable tbody th.select-checkbox:before{content:" ";margin-top:-6px;margin-left:-6px;border:1px solid black;border-radius:3px}table.dataTable tr.selected td.select-checkbox:after,table.dataTable tr.selected th.select-checkbox:after{content:"✓";font-size:20px;margin-top:-19px;margin-left:-6px;text-align:center;text-shadow:1px 1px #b0bed9,-1px -1px #b0bed9,1px -1px #b0bed9,-1px 1px #b0bed9}table.dataTable.compact tbody td.select-checkbox:before,table.dataTable.compact tbody th.select-checkbox:before{margin-top:-12px}table.dataTable.compact tr.selected td.select-checkbox:after,table.dataTable.compact tr.selected th.select-checkbox:after{margin-top:-16px}div.dataTables_wrapper span.select-info,div.dataTables_wrapper span.select-item{margin-left:.5em}@media screen and (max-width: 640px){div.dataTables_wrapper span.select-info,div.dataTables_wrapper span.select-item{margin-left:0;display:block}} + + +div.dtsr-confirmation,div.dtsr-creation{position:fixed;top:20%;left:50%;width:500px;background-color:white;margin-left:-250px;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:2003;box-sizing:border-box;padding:1em}div.dtsr-confirmation div.dtsr-confirmation-title-row,div.dtsr-creation div.dtsr-confirmation-title-row{text-align:left}div.dtsr-confirmation div.dtsr-confirmation-title-row h2,div.dtsr-creation div.dtsr-confirmation-title-row h2{border-bottom:0px;margin-top:0px;padding-top:0px}div.dtsr-confirmation div.dtsr-confirmation-text,div.dtsr-creation div.dtsr-confirmation-text{text-align:center}div.dtsr-confirmation div.dtsr-confirmation-buttons,div.dtsr-creation div.dtsr-confirmation-buttons{text-align:right;margin-top:1em}div.dtsr-confirmation div.dtsr-confirmation-buttons button.dtsr-confirmation-button,div.dtsr-creation div.dtsr-confirmation-buttons button.dtsr-confirmation-button{margin:0px}div.dtsr-confirmation div.dtsr-creation-text,div.dtsr-creation div.dtsr-creation-text{text-align:left;padding:0px;border:none}div.dtsr-confirmation div.dtsr-creation-text span,div.dtsr-creation div.dtsr-creation-text span{font-size:20px}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-left,div.dtsr-confirmation div.dtsr-creation-form div.dtsr-right,div.dtsr-creation div.dtsr-creation-form div.dtsr-left,div.dtsr-creation div.dtsr-creation-form div.dtsr-right{display:inline-block;width:50%}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-left,div.dtsr-creation div.dtsr-creation-form div.dtsr-left{text-align:right}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-right,div.dtsr-confirmation div.dtsr-creation-form div.dtsr-name-row,div.dtsr-creation div.dtsr-creation-form div.dtsr-right,div.dtsr-creation div.dtsr-creation-form div.dtsr-name-row{text-align:left}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-form-row label.dtsr-name-label,div.dtsr-creation div.dtsr-creation-form div.dtsr-form-row label.dtsr-name-label{width:33.3%;display:inline-block;text-align:right;padding-right:15px;padding-left:15px}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-form-row input.dtsr-name-input,div.dtsr-creation div.dtsr-creation-form div.dtsr-form-row input.dtsr-name-input{width:66.6%;display:inline-block}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-form-row input.dtsr-check-box,div.dtsr-creation div.dtsr-creation-form div.dtsr-form-row input.dtsr-check-box{margin-left:33.3%;margin-right:14px;display:inline-block}div.dtsr-confirmation div.dtsr-creation-form div.dtsr-form-row label.dtsr-toggle-title,div.dtsr-creation div.dtsr-creation-form div.dtsr-form-row label.dtsr-toggle-title{margin-right:-33.3%}div.dtsr-confirmation div.dtsr-confirmation-text,div.dtsr-creation div.dtsr-confirmation-text{text-align:left}div.dtsr-confirmation div.dtsr-confirmation-text label.dtsr-name-label,div.dtsr-creation div.dtsr-confirmation-text label.dtsr-name-label{width:auto;display:inline-block;text-align:right;padding-right:15px}div.dtsr-confirmation div.dtsr-confirmation-text input.dtsr-name-input,div.dtsr-creation div.dtsr-confirmation-text input.dtsr-name-input{width:66.6%;display:inline-block}div.dtsr-confirmation div.dtsr-confirmation-text input.dtsr-check-box,div.dtsr-creation div.dtsr-confirmation-text input.dtsr-check-box{margin-left:33.3%;margin-right:14px;display:inline-block}div.dtsr-confirmation div.dtsr-modal-foot,div.dtsr-creation div.dtsr-modal-foot{text-align:right;padding-top:10px}div.dtsr-confirmation span.dtsr-modal-error,div.dtsr-creation span.dtsr-modal-error{color:red;font-size:.9em}div.dtsr-creation{top:10%}div.dtsr-form-row{padding:10px}div.dtsr-check-row{padding-top:0px}div.dtsr-creation-text{padding:10px}div.dtsr-popover-close{position:absolute;top:10px;right:10px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtsr-background{z-index:2002;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%)}div.dt-button-collection h3{text-align:center;margin-top:4px;margin-bottom:8px;font-size:1.5em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}div.dt-button-collection span.dtsr-emptyStates{border-radius:5px;display:inline-block;line-height:1.6em;white-space:nowrap;text-align:center;vertical-align:middle;width:100%;padding-bottom:7px;padding-top:3px}div.dt-button-collection h3{font-size:1.1em}div.dtsr-creation-form div.dtsr-form-row input.dtsr-name-input{width:57% !important;padding:5px 4px;border:1px solid #aaa;border-radius:3px}div.dtsr-creation-form div.dtsr-form-row input.dtsr-check-box{margin-left:calc(33.3% + 30px) !important}div.dtsr-creation-form div.dtsr-form-row label.dtsr-toggle-title{margin-right:calc(-33.3% - 30px) !important} + + diff --git a/media/datatable/css/index.html b/media/datatable/css/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/datatable/css/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/datatable/index.html b/media/datatable/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/datatable/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/datatable/js/datatables.min.js b/media/datatable/js/datatables.min.js new file mode 100644 index 000000000..cd9d16380 --- /dev/null +++ b/media/datatable/js/datatables.min.js @@ -0,0 +1,1238 @@ +/* + * This combined file was created by the DataTables downloader builder: + * https://datatables.net/download + * + * To rebuild or modify this file with the latest versions of the included + * software please visit: + * https://datatables.net/download/#dt/jszip-2.5.0/dt-1.11.5/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.2/fc-4.0.2/fh-3.2.2/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.2/sp-2.0.0/sl-1.3.4/sr-1.1.0 + * + * Included libraries: + * JSZip 2.5.0, DataTables 1.11.5, Buttons 2.2.2, Column visibility 2.2.2, HTML5 export 2.2.2, Print view 2.2.2, ColReorder 1.5.5, DateTime 1.1.2, FixedColumns 4.0.2, FixedHeader 3.2.2, KeyTable 2.6.4, Responsive 2.2.9, RowGroup 1.1.4, RowReorder 1.2.8, Scroller 2.0.5, SearchBuilder 1.3.2, SearchPanes 2.0.0, Select 1.3.4, StateRestore 1.1.0 + */ + +/*! + +JSZip - A Javascript class for generating and reading zip files + + +(c) 2009-2014 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/master/LICENSE +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},x=function(a){return"/"!=a.slice(-1)&&(a+="/"),a},y=function(a,b){return b="undefined"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var f,g=new j;return a._data instanceof j?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=i.STORE,g.compressedContent="",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(f=a._data.getContent(),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c))):(f=p(a),(!f||0===f.length||a.dir)&&(b=i.STORE,f=""),g.uncompressedSize=f.length,g.crc32=e(f),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a){return 63&(a||0)},C=function(a,b,c,g,h){var i,j,k,m,n=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),o=b.comment||"",p=d.transformTo("string",l.utf8encode(o)),q=n.length!==b.name.length,r=p.length!==o.length,t=b.options,u="",v="",w="";k=b._initialMetadata.dir!==b.dir?b.dir:t.dir,m=b._initialMetadata.date!==b.date?b.date:t.date;var x=0,y=0;k&&(x|=16),"UNIX"===h?(y=798,x|=A(b.unixPermissions,k)):(y=20,x|=B(b.dosPermissions,k)),i=m.getHours(),i<<=6,i|=m.getMinutes(),i<<=5,i|=m.getSeconds()/2,j=m.getFullYear()-1980,j<<=4,j|=m.getMonth()+1,j<<=5,j|=m.getDate(),q&&(v=s(1,1)+s(e(n),4)+n,u+="up"+s(v.length,2)+v),r&&(w=s(1,1)+s(this.crc32(p),4)+p,u+="uc"+s(w.length,2)+w);var z="";z+="\n\x00",z+=q||r?"\x00\b":"\x00\x00",z+=c.compressionMethod,z+=s(i,2),z+=s(j,2),z+=s(c.crc32,4),z+=s(c.compressedSize,4),z+=s(c.uncompressedSize,4),z+=s(n.length,2),z+=s(u.length,2);var C=f.LOCAL_FILE_HEADER+z+n+u,D=f.CENTRAL_FILE_HEADER+s(y,2)+z+s(p.length,2)+"\x00\x00\x00\x00"+s(x,4)+s(g,4)+n+u+p;return{fileRecord:C,dirRecord:D,compressedObject:c}},D={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a>8;this.dir=16&this.externalFileAttributes?!0:!1,a===h&&(this.dosPermissions=63&this.externalFileAttributes),a===i&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead=hb&&(a.ins_h=(a.ins_h<=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=hb&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1); +break}for(c.back=0;Ab=c.lencode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)}); + +/*! + Copyright 2008-2021 SpryMedia Ltd. + + This source file is free software, available under the following license: + MIT license - http://datatables.net/license + + This source file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + + For details please refer to: http://www.datatables.net + DataTables 1.11.5 + ©2008-2021 SpryMedia Ltd - datatables.net/license +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,z,A){l instanceof String&&(l=String(l));for(var q=l.length,E=0;E").css({position:"fixed",top:0,left:-1*l(z).scrollLeft(),height:1, +width:1,overflow:"hidden"}).append(l("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("
").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth} +function Cb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function Ya(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ga(a,d,l(b).data())}function Ga(a,b,c){b=a.aoColumns[b]; +var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Ab(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),l.extend(b,c),X(b,c,"sWidth","sWidthOrig"),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]),X(b,c,"aDataSort"));var f=b.mData,g=na(f), +k=b.mRender?na(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c? +(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Za(a);for(var c=0,d=b.length;cm[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;pb&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c").appendTo(d));var k=0;for(b=g.length;k=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Gb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f",{"class":h?d[0]:""}).append(l("",{valign:"top",colSpan:oa(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0],db(a),m,n,k]);F(a,"aoFooterCallback", +"footer",[l(a.nTFoot).children("tr")[0],db(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Hb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Ib(a){var b=a.oClasses,c=l(a.nTable);c=l("
").insertBefore(c);var d=a.oFeatures,e=l("
",{id:a.sTableId+"_wrapper", +"class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1,n.length-1):k.className=n;t+=p}e.append(k); +e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Jb(a);else if("f"==g&&d.bFilter)f=Kb(a);else if("r"==g&&d.bProcessing)f=Lb(a);else if("t"==g)f=Mb(a);else if("i"==g&&d.bInfo)f=Nb(a);else if("p"==g&&d.bPaginate)f=Ob(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("
",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("
").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){kb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Ob(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("
").addClass(a.oClasses.sPaging+b)[0]; +var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;nh&& +(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function V(a,b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none"); +F(a,null,"processing",[a,b])}function Mb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("
",{"class":h.sScrollWrapper}).append(l("
",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?K(d):null:"100%"}).append(l("
",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box", +width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("
",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("
",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("
",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===g?f:null).append(b.children("tfoot"))))); +b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ha,sName:"scrolling"});return k[0]}function Ha(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k=g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p= +g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,aa=a.oBrowser,L=aa.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],ea=[],Y,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var fa=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==fa&&a.scrollBarVis!==q)a.scrollBarVis=fa,sa(a);else{a.scrollBarVis=fa;w.children("thead, tfoot").remove(); +if(G){var ba=G.clone().prependTo(w);var la=G.find("tr");ba=ba.find("tr")}var mb=x.clone().prependTo(w);x=x.find("tr");fa=mb.find("tr");mb.find("th, td").removeAttr("tabindex");c||(p.width="100%",h[0].style.width="100%");l.each(Na(a,mb),function(D,W){Y=ta(a,D);W.style.width=a.aoColumns[Y].sWidth});G&&ca(function(D){D.style.width=""},ba);h=w.outerWidth();""===c?(C.width="100%",L&&(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()): +""!==d&&(C.width=K(d),h=w.outerWidth());ca(Ba,fa);ca(function(D){var W=z.getComputedStyle?z.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},fa);ca(function(D,W){D.style.width=O[W]},x);l(fa).css("height",0);G&&(ca(Ba,ba),ca(function(D){ea.push(D.innerHTML);I.push(K(l(D).css("width")))},ba),ca(function(D,W){D.style.width=I[W]},la),l(ba).height(0));ca(function(D,W){D.innerHTML='
'+H[W]+"
";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow= +"hidden";D.style.width=O[W]},fa);G&&ca(function(D,W){D.innerHTML='
'+ea[W]+"
";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},ba);Math.round(w.outerWidth())g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(la-b)),""!==c&&""===d||da(a,1,"Possible column misalignment",6)):la="100%";p.width=K(la);f.width=K(la); +G&&(a.nScrollFoot.style.width=K(la));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(aa.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead"));n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function ca(a,b,c){for(var d=0,e=0,h= +b.length,f,g;e").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Na(a,g.find("thead")[0]);for(v=0;v").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h?(g.css("width","auto"),g.removeAttr("width"),g.width()").css("width",K(a)).appendTo(b||A.body);b=a[0].offsetWidth;a.remove();return b}function $b(a,b){var c= +ac(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l("").html(T(a,c,b,"display"))[0]}function ac(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;hd&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function pa(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&& +!Array.isArray(n[0])?h.push(n):l.merge(h,n)};Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;aG?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return CG?1:0}):f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;tG?1:0})}a.bSorted=!0}function cc(a){var b=a.aoColumns,c=pa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d/g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0e?e+1:3))}e= +0;for(h=d.length;ee?e+1:3))}a.aLastSort=d}function bc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g=e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,Wb(b.search));if(b.columns){f=0;for(d=b.columns.length;f=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function gb(a,b){a=a.renderer;var c=u.ext.renderer[b];return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function Q(a){return a.oFeatures.bServerSide? +"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Da(a,b){var c=ec.numbers_length,d=Math.floor(c/2);b<=c?a=qa(0,b):a<=d?(a=qa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=qa(b-(c-2),b):(a=qa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Xa(a){l.each({num:function(b){return Ua(b,a)},"num-fmt":function(b){return Ua(b,a,rb)},"html-num":function(b){return Ua(b,a,Va)},"html-num-fmt":function(b){return Ua(b,a,Va,rb)}},function(b, +c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function fc(a){return function(){var b=[Ta(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Ta(this[M.iApiIndex])):new B(this)};this.fnAddData= +function(f,g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ha(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m= +this.api(!0);f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data(): +k.row(f).data()||null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]}; +this.fnPageChange=function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Ta(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust(); +(m===q||m)&&p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;for(var h in u.ext.internal)h&&(this[h]=fc(h));this.each(function(){var f={},g=1").appendTo(t));r.nTHead=H[0];var ea=t.children("tbody");0===ea.length&&(ea=l("").insertAfter(H));r.nTBody=ea[0];H=t.children("tfoot");0===H.length&&0").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0/g,vc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,wc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,rb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,Z=function(a){return a&&!0!==a&&"-"!==a?!1:!0},hc= +function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},ic=function(a,b){sb[b]||(sb[b]=new RegExp(jb(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(sb[b],"."):a},tb=function(a,b,c){var d="string"===typeof a;if(Z(a))return!0;b&&d&&(a=ic(a,b));c&&d&&(a=a.replace(rb,""));return!isNaN(parseFloat(a))&&isFinite(a)},jc=function(a,b,c){return Z(a)?!0:Z(a)||"string"===typeof a?tb(a.replace(Va,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length;if(c!==q)for(;e< +h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;ea.length)){var b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d< +e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var h,f=0;d=0;a:for(;d")[0],tc=Qa.textContent!==q,uc=/<.*?>/g,hb=u.util.throttle,nc=[],N=Array.prototype,xc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e= +l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=xc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;ea?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=oa(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},qc=u.util.throttle(function(a){Ca(a[0])},500),xb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!== +q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),qc(c))},rc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ac(c[0]),qc(c))}},Ac=function(a){var b=new B(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"); +0g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g;g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)}; +y("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=vb(b);var c=this.iterator("table",function(d){return Cc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows", +sc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Ea(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return Ea(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()", +function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;fd;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot?l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b= +!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;y("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){y(b+"()",function(){var c=Array.prototype.slice.call(arguments);c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes()); +d[b].apply(d,c);return this})});y("clear()",function(){return this.iterator("table",function(a){Ka(a)})});y("settings()",function(){return new B(this.context,this.context)});y("init()",function(){var a=this.context;return a.length?a[0].oInit:null});y("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});y("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,h=b.nTBody,f=b.nTHead, +g=b.nTFoot,k=l(e);h=l(h);var m=l(b.nTableWrapper),n=l.map(b.aoData,function(t){return t.nTr}),p;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);m.off(".DT").find(":not(tbody *)").off(".DT");l(z).off(".DT-"+b.sInstance);e!=f.parentNode&&(k.children("thead").detach(),k.append(f));g&&e!=g.parentNode&&(k.children("tfoot").detach(),k.append(g));b.aaSorting=[];b.aaSortingFixed=[];Sa(b);l(n).removeClass(b.asStripeClasses.join(" "));l("th, td",f).removeClass(d.sSortable+ +" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);h.children().detach();h.append(n);f=a?"remove":"detach";k[f]();m[f]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),k.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&h.children().each(function(t){l(this).addClass(b.asDestroyStripes[t%p])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c,1)})});l.each(["column","row","cell"],function(a,b){y(b+"s().every()",function(c){var d=this.selector.opts,e= +this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});y("i18n()",function(a,b,c){var d=this.context[0];a=na(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.11.5";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1};u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"", +src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10, +25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null, +fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}}, +fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)", +sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults);u.defaults.column={aDataSort:null, +iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null, +iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[], +aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0, +bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,h= +e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},builder:"dt/jszip-2.5.0/dt-1.11.5/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.2/fc-4.0.2/fh-3.2.2/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.2/sp-2.0.0/sl-1.3.4/sr-1.1.0",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck, +iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter", +sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody", +sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ec=u.ext.pager;l.extend(ec,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Da(a,b)]},simple_numbers:function(a,b){return["previous",Da(a,b),"next"]}, +full_numbers:function(a,b){return["first","previous",Da(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Da(a,b),"last"]},_numbers:Da,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ra(a,I.data.action,!0)};var aa=0;for(r=w.length;aa").appendTo(x); +t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId,"aria-label":k[L], +"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),ob(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return tb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!vc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||Z(a)?"date":null},function(a, +b){b=b.oLanguage.sDecimal;return tb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return Z(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return Z(a)?a:"string"===typeof a?a.replace(gc," ").replace(Va,""):""},string:function(a){return Z(a)?a:"string"===typeof a?a.replace(gc," "):a}});var Ua=function(a, +b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=ic(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return Z(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return Z(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return a< +b?1:a>b?-1:0}});Xa("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+ +" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var yb=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):a};u.render= +{number:function(a,b,c,d,e){return{display:function(h){if("number"!==typeof h&&"string"!==typeof h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return yb(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:yb,filter:yb}}};l.extend(u.ext.internal,{_fnExternApiFunc:fc,_fnBuildAjax:Oa,_fnAjaxUpdate:Gb,_fnAjaxParameters:Pb, +_fnAjaxUpdateDraw:Qb,_fnAjaxDataSrc:za,_fnAddColumn:Ya,_fnColumnOptions:Ga,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:oa,_fnGetColumns:Ia,_fnColumnTypes:$a,_fnApplyColumnDefs:Db,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:ma,_fnBrowserDetect:Bb,_fnAddData:ia,_fnAddTr:Ja,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T, +_fnSetCellData:Eb,_fnSplitObjNotation:cb,_fnGetObjectDataFn:na,_fnSetObjectDataFn:ha,_fnGetDataMaster:db,_fnClearTable:Ka,_fnDeleteIndex:La,_fnInvalidate:va,_fnGetRowElements:bb,_fnCreateTr:ab,_fnBuildHead:Fb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Ib,_fnDetectHeader:wa,_fnGetUniqueThs:Na,_fnFeatureHtmlFilter:Kb,_fnFilterComplete:ya,_fnFilterCustom:Tb,_fnFilterColumn:Sb,_fnFilter:Rb,_fnFilterCreateSearch:ib,_fnEscapeRegex:jb,_fnFilterData:Ub,_fnFeatureHtmlInfo:Nb,_fnUpdateInfo:Xb, +_fnInfoMacros:Yb,_fnInitialise:Aa,_fnInitComplete:Pa,_fnLengthChange:kb,_fnFeatureHtmlLength:Jb,_fnFeatureHtmlPaginate:Ob,_fnPageChange:Ra,_fnFeatureHtmlProcessing:Lb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Mb,_fnScrollDraw:Ha,_fnApplyToChildren:ca,_fnCalculateColumnWidths:Za,_fnThrottle:hb,_fnConvertToWidth:Zb,_fnGetWidestNode:$b,_fnGetMaxLenString:ac,_fnStringToCss:K,_fnSortFlatten:pa,_fnSort:Hb,_fnSortAria:cc,_fnSortListener:nb,_fnSortAttachListener:fb,_fnSortingClasses:Sa,_fnSortData:bc,_fnSaveState:Ca, +_fnLoadState:dc,_fnImplementState:pb,_fnSettingsFromNode:Ta,_fnLog:da,_fnMap:X,_fnBindAction:ob,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:lb,_fnRenderer:gb,_fnDataSource:Q,_fnRowAttributes:eb,_fnExtend:qb,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()};l.each(u,function(a,b){l.fn.DataTable[a]=b});return u}); + + +/*! + DataTables styling integration + ©2018 SpryMedia Ltd - datatables.net/license +*/ +(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable}); + + +/*! + Buttons for DataTables 2.2.2 + ©2016-2022 SpryMedia Ltd - datatables.net/license +*/ +(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(z){return d(z,window,document)}):"object"===typeof exports?module.exports=function(z,B){z||(z=window);B&&B.fn.dataTable||(B=require("datatables.net")(z,B).$);return d(B,z,z.document)}:d(jQuery,window,document)})(function(d,z,B,p){function I(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} +function L(a,b){a=new u.Api(a);b=b?b:a.init().buttons||u.defaults.buttons;return(new x(a,b)).container()}var u=d.fn.dataTable,O=0,P=0,C=u.ext.buttons,x=function(a,b){if(!(this instanceof x))return function(c){return(new x(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},x.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new u.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:d("<"+this.c.dom.container.tag+ +"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(x.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===p)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===p)return c.hasClass(a);c.toggleClass(a,b===p?!0:b);return this},add:function(a,b,c){var e=this.s.buttons;if("string"===typeof b){b=b.split("-");var h=this.s;e=0;for(var f=b.length-1;e");k.conf._collection=k.collection;if(k.conf.split)for(var t=0;t'+this.c.dom.splitDropdown.text+""));this._expandButton(k.buttons,k.conf.buttons,k.conf.split,!b,b,f,k.conf)}k.conf.parent=g;n.init&&n.init.call(l.button(k.node),l,d(k.node),n);m++}}}},_buildButton:function(a,b,c,e){var h=this.c.dom.button,f=this.c.dom.buttonLiner,g=this.c.dom.collection,l=this.c.dom.splitCollection,m=this.c.dom.splitDropdownButton, +r=this.s.dt,q=function(w){return"function"===typeof w?w(r,k,a):w};if(a.spacer){var n=d("").addClass("dt-button-spacer "+a.style+" "+h.spacerClass).html(q(a.text));return{conf:a,node:n,inserter:n,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}}!c&&e&&l?h=m:!c&&b&&g.button&&(h=g.button);!c&&e&&l.buttonLiner?f=l.buttonLiner:!c&&b&&g.buttonLiner&&(f=g.buttonLiner);if(a.available&&!a.available(r,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var k=d(a.html); +else{var t=function(w,D,F,G){G.action.call(D.button(F),w,D,F,G);d(D.table().node()).triggerHandler("buttons-action.dt",[D.button(F),D,F,G])};g=a.tag||h.tag;var y=a.clickBlurs===p?!0:a.clickBlurs;k=d("<"+g+"/>").addClass(h.className).addClass(e?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(w){w.preventDefault();!k.hasClass(h.disabled)&&a.action&&t(w,r,k,a);y&&k.trigger("blur")}).on("keypress.dtb", +function(w){13===w.keyCode&&(w.preventDefault(),!k.hasClass(h.disabled)&&a.action&&t(w,r,k,a))});"a"===g.toLowerCase()&&k.attr("href","#");"button"===g.toLowerCase()&&k.attr("type","button");f.tag?(g=d("<"+f.tag+"/>").html(q(a.text)).addClass(f.className),"a"===f.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(q(a.text));!1===a.enabled&&k.addClass(h.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",q(a.titleAttr));a.attr&&k.attr(a.attr);a.namespace||(a.namespace= +".dt-button-"+P++);a.config!==p&&a.config.split&&(a.split=a.config.split)}f=(f=this.c.dom.buttonContainer)&&f.tag?d("<"+f.tag+"/>").addClass(f.className).append(k):k;this._addKey(a);this.c.buttonCreated&&(f=this.c.buttonCreated(a,f));if(c){n=d("
").addClass(this.c.dom.splitWrapper.className);n.append(k);var v=d.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":!0,"aria-expanded":!1},align:this.c.dom.splitDropdown.align, +splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(v);var E=function(w,D,F,G){C.split.action.call(D.button(d("div.dt-btn-split-wrapper")[0]),w,D,F,G);d(D.table().node()).triggerHandler("buttons-action.dt",[D.button(F),D,F,G]);F.attr("aria-expanded",!0)},A=d('").on("click.dtb",function(w){w.preventDefault();w.stopPropagation(); +A.hasClass(h.disabled)||E(w,r,A,v);y&&A.trigger("blur")}).on("keypress.dtb",function(w){13===w.keyCode&&(w.preventDefault(),A.hasClass(h.disabled)||E(w,r,A,v))});0===a.split.length&&A.addClass("dtb-hide-drop");n.append(A).attr(v.attr)}return{conf:a,node:c?n.get(0):k.get(0),inserter:c?n:f,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass("dt-button-collection").addClass(f.collectionLayout).addClass(f.splitAlignClass).addClass(e).css("display","none");a=d(a).addClass(f.contentClassName).attr("role","menu").appendTo(m);g.attr("aria-expanded","true");g.parents("body")[0]!== +B.body&&(g=B.body.lastChild);f.popoverTitle?m.prepend('
'+f.popoverTitle+"
"):f.collectionTitle&&m.prepend('
'+f.collectionTitle+"
");f.closeButton&&m.prepend('
x
').addClass("dtb-collection-closeable");I(m.insertAfter(g),f.fade);c=d(b.table().container());var r=m.css("position");if("container"===f.span||"dt-container"===f.align)g=g.parent(),m.css("width",c.width());if("absolute"=== +r){var q=d(g[0].offsetParent);c=g.position();e=g.offset();var n=q.offset(),k=q.position(),t=z.getComputedStyle(q[0]);n.height=q.outerHeight();n.width=q.width()+parseFloat(t.paddingLeft);n.right=n.left+n.width;n.bottom=n.top+n.height;q=c.top+g.outerHeight();var y=c.left;m.css({top:q,left:y});t=z.getComputedStyle(m[0]);var v=m.offset();v.height=m.outerHeight();v.width=m.outerWidth();v.right=v.left+v.width;v.bottom=v.top+v.height;v.marginTop=parseFloat(t.marginTop);v.marginBottom=parseFloat(t.marginBottom); +f.dropup&&(q=c.top-v.height-v.marginTop-v.marginBottom);if("button-right"===f.align||m.hasClass(f.rightAlignClassName))y=c.left-v.width+g.outerWidth();if("dt-container"===f.align||"container"===f.align)yn.width&&(y=n.width-v.width);k.left+y+v.width>d(z).width()&&(y=d(z).width()-v.width-k.left);0>e.left+y&&(y=-e.left);k.top+q+v.height>d(z).height()+d(z).scrollTop()&&(q=c.top-v.height-v.marginTop-v.marginBottom);k.top+qE&&(A=E);m.css("marginTop",-1*A)},r(),d(z).on("resize.dtb-collection",function(){r()});f.background&&x.background(!0,f.backgroundClassName,f.fade,f.backgroundHost||g);d("div.dt-button-background").on("click.dtb-collection",function(){});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(E,A,w,D){D[0]!==g[0]&&l()})},0);d(m).trigger("buttons-popover.dt");b.on("destroy",l);setTimeout(function(){h=!1;d("body").on("click.dtb-collection", +function(E){if(!h){var A=d.fn.addBack?"addBack":"andSelf",w=d(E.target).parent()[0];(!d(E.target).parents()[A]().filter(a).length&&!d(w).hasClass("dt-buttons")||d(E.target).hasClass("dt-button-background"))&&l()}}).on("keyup.dtb-collection",function(E){27===E.keyCode&&l()})},0)}}});x.background=function(a,b,c,e){c===p&&(c=400);e||(e=B.body);a?I(d("
").addClass(b).css("display","none").insertAfter(e),c):J(d("div."+b),c,function(){d(this).removeClass(b).remove()})};x.instanceSelector=function(a, +b){if(a===p||null===a)return d.map(b,function(f){return f.inst});var c=[],e=d.map(b,function(f){return f.name}),h=function(f){if(Array.isArray(f))for(var g=0,l=f.length;g)<[^<]*)*<\/script>/gi,"");a=a.replace(//g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};x.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button", +className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}}; +x.version="2.2.2";d.extend(C,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a,b,c,e){e._collection.parents("body").length?this.popover(!1,e):this.popover(e._collection,e)},attr:{"aria-haspopup":!0}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(a,b,c){return b.attr("aria-expanded",!1)}, +action:function(a,b,c,e){this.popover(e._collection,e)},attr:{"aria-haspopup":!0}},copy:function(a,b){if(C.copyHtml5)return"copyHtml5"},csv:function(a,b){if(C.csvHtml5&&C.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(C.excelHtml5&&C.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(C.pdfHtml5&&C.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var e=0;e"+a+"":"";I(d('
').html(a).append(d("
")["string"=== +typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==p&&0!==c&&(H=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});return this});u.Api.register("buttons.exportData()",function(a){if(this.context.length)return Q(new u.Api(this.context[0]),a)});u.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==p&&null!==b.title&&""!==b.title?b.title:b.filename;"function"=== +typeof c&&(c=c());c===p||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",d("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===p?null:"function"===typeof a? +a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=d("