Component Builder (v.4.0.0-rc1)
+ Component Builder (v.4.0.0-rc2)
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 9b279eb50..b57283f58 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -26,7 +26,7 @@
4.0.0-alpha
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta1.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-alpha8.zip
alpha
@@ -41,79 +41,7 @@
pkg_component_builder
package
site
- 4.0.0-beta1
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta1.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 4.0.0-beta2
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta2.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 4.0.0-beta3
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta3.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 4.0.0-beta4
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta4.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 4.0.0-beta5
+ 4.0.0-beta
https://dev.vdm.io
https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-beta5.zip
@@ -131,10 +59,10 @@
pkg_component_builder
package
site
- 4.0.0-rc1
+ 4.0.0-rc2
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-rc1.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-rc2.zip
releasecandidate
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
index 043954dcc..71835a2fb 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
@@ -12,6 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaPower;
+use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Power\ExtractorInterface;
use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor as ExtendingExtractor;
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
index 2f4b56a6d..bf14861fc 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
@@ -121,7 +121,8 @@ class Utilities implements ServiceProviderInterface
public function getFileInjector(Container $container): FileInjector
{
return new FileInjector(
- $container->get('Power.Injector')
+ $container->get('Power.Injector'),
+ $container->get('Joomla.Power.Injector')
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
index 47c9af0bf..eaf28e2c6 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
@@ -13,6 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
use VDM\Joomla\Componentbuilder\Compiler\Power\Injector as Power;
+use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector as JoomlaPower;
use VDM\Joomla\Utilities\MathHelper;
@@ -33,23 +34,41 @@ final class FileInjector
protected Power $power;
/**
- * The pattern to get the powers
+ * The Joomla Injector Class.
+ *
+ * @var JoomlaPower
+ * @since 3.2.1
+ */
+ protected JoomlaPower $joomla;
+
+ /**
+ * The power pattern to get the powers
*
* @var string
* @since 3.2.0
**/
- protected string $pattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
+ protected string $powerPattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
+
+ /**
+ * The Joomla power pattern to get the powers
+ *
+ * @var string
+ * @since 3.2.1
+ **/
+ protected string $joomlaPattern = '/Joomla_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/**
* Constructor.
*
- * @param Power $power The Injector Class.
+ * @param Power $power The Injector Class.
+ * @param JoomlaPower $joomla The Joomla Injector Class.
*
- * @since 3.2.0
+ * @since 3.2.1
*/
- public function __construct(Power $power)
+ public function __construct(Power $power, JoomlaPower $joomla)
{
$this->power = $power;
+ $this->joomla = $joomla;
}
/**
@@ -72,7 +91,9 @@ final class FileInjector
throw new \InvalidArgumentException('Position cannot be negative.');
}
- $found_super_powers = preg_match($this->pattern, $data);
+ $found_joomla_powers = preg_match($this->joomlaPattern, $data);
+ $found_super_powers = preg_match($this->powerPattern, $data);
+
$actual_file = $this->openFileWithLock($file);
try
@@ -85,6 +106,11 @@ final class FileInjector
$this->processFile($actual_file, $temp_file, $data, $position, $replace);
+ if ($found_joomla_powers)
+ {
+ $this->injectJoomlaPowers($actual_file);
+ }
+
if ($found_super_powers)
{
$this->injectSuperPowers($actual_file);
@@ -207,6 +233,28 @@ final class FileInjector
ftruncate($actual_file, 0);
rewind($actual_file);
+ fwrite($actual_file, $power_data);
+ }
+
+ /**
+ * Injects Joomla powers into the file content, if found, and updates the file.
+ *
+ * @param resource $actual_file The file handle of the actual file.
+ *
+ * @return void
+ * @since 3.2.1
+ */
+ private function injectJoomlaPowers($actual_file): void
+ {
+ rewind($actual_file);
+
+ $power_data = $this->joomla->power(
+ stream_get_contents($actual_file)
+ );
+
+ ftruncate($actual_file, 0);
+ rewind($actual_file);
+
fwrite($actual_file, $power_data);
}
}
diff --git a/media/js/help_document.js b/media/js/help_document.js
index 15d7f0fbf..1d4ee7777 100644
--- a/media/js/help_document.js
+++ b/media/js/help_document.js
@@ -9,11 +9,11 @@
*/
// Some Global Values
-jform_vvvvwcovyd_required = false;
-jform_vvvvwcpvye_required = false;
-jform_vvvvwcqvyf_required = false;
-jform_vvvvwcrvyg_required = false;
-jform_vvvvwctvyh_required = false;
+jform_vvvvwcovyc_required = false;
+jform_vvvvwcpvyd_required = false;
+jform_vvvvwcqvye_required = false;
+jform_vvvvwcrvyf_required = false;
+jform_vvvvwctvyg_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
@@ -45,26 +45,26 @@ function vvvvwco(location_vvvvwco)
{
jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field
- if (jform_vvvvwcovyd_required)
+ if (jform_vvvvwcovyc_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
- jform_vvvvwcovyd_required = false;
+ jform_vvvvwcovyc_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field
- if (!jform_vvvvwcovyd_required)
+ if (!jform_vvvvwcovyc_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
- jform_vvvvwcovyd_required = true;
+ jform_vvvvwcovyc_required = true;
}
}
}
@@ -77,26 +77,26 @@ function vvvvwcp(location_vvvvwcp)
{
jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field
- if (jform_vvvvwcpvye_required)
+ if (jform_vvvvwcpvyd_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
- jform_vvvvwcpvye_required = false;
+ jform_vvvvwcpvyd_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field
- if (!jform_vvvvwcpvye_required)
+ if (!jform_vvvvwcpvyd_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
- jform_vvvvwcpvye_required = true;
+ jform_vvvvwcpvyd_required = true;
}
}
}
@@ -122,26 +122,26 @@ function vvvvwcq(type_vvvvwcq)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
- if (jform_vvvvwcqvyf_required)
+ if (jform_vvvvwcqvye_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
- jform_vvvvwcqvyf_required = false;
+ jform_vvvvwcqvye_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
- if (!jform_vvvvwcqvyf_required)
+ if (!jform_vvvvwcqvye_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
- jform_vvvvwcqvyf_required = true;
+ jform_vvvvwcqvye_required = true;
}
}
}
@@ -178,26 +178,26 @@ function vvvvwcr(type_vvvvwcr)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
- if (jform_vvvvwcrvyg_required)
+ if (jform_vvvvwcrvyf_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
- jform_vvvvwcrvyg_required = false;
+ jform_vvvvwcrvyf_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
- if (!jform_vvvvwcrvyg_required)
+ if (!jform_vvvvwcrvyf_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
- jform_vvvvwcrvyg_required = true;
+ jform_vvvvwcrvyf_required = true;
}
}
}
@@ -259,26 +259,26 @@ function vvvvwct(target_vvvvwct)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
- if (jform_vvvvwctvyh_required)
+ if (jform_vvvvwctvyg_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
- jform_vvvvwctvyh_required = false;
+ jform_vvvvwctvyg_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
- if (!jform_vvvvwctvyh_required)
+ if (!jform_vvvvwctvyg_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
- jform_vvvvwctvyh_required = true;
+ jform_vvvvwctvyg_required = true;
}
}
}