diff --git a/composer.json b/composer.json index 058f278..1ca8345 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "minimum-stability": "stable", "require": { - "vitexsoftware/ease-twbootstrap4": ">=1.1" + "vitexsoftware/ease-twbootstrap4": "^1.9" }, "require-dev": { "phpunit/phpunit": "*", diff --git a/debian/changelog b/debian/changelog index f88a20b..1f5d30f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -php-vitexsoftware-ease-bootstrap4-widgets (1.4.0) UNRELEASED; urgency=medium +php-vitexsoftware-ease-bootstrap4-widgets (1.5.0) UNRELEASED; urgency=medium + + * Semantic Versioning ready + + -- vitex Sat, 16 Nov 2024 16:22:11 +0100 + +php-vitexsoftware-ease-bootstrap4-widgets (1.4.0) unstable; urgency=medium * Strict types update - -- vitex Sat, 21 Sep 2024 03:26:00 +0200 + -- vitex Sat, 16 Nov 2024 16:21:58 +0100 php-vitexsoftware-ease-bootstrap4-widgets (1.3) unstable; urgency=medium diff --git a/src/Ease/TWB4/Widgets/BrowsingHistory.php b/src/Ease/TWB4/Widgets/BrowsingHistory.php deleted file mode 100644 index fb6446a..0000000 --- a/src/Ease/TWB4/Widgets/BrowsingHistory.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Ease\TWB4\Widgets; - -/** - * Show history of visited pages in app. - * - * @param mixed $content - * @param array $properties - */ -class BrowsingHistory extends \Ease\Html\DivTag -{ - /** - * Show history of visited pages in app. - * - * @param mixed $content - * @param array $properties - */ - public function __construct($content = null, $properties = null) - { - $webPage = \Ease\WebPage::singleton(); - - if (null === $properties) { - $properties = []; - } - - $properties['id'] = 'history'; - - if (!isset($_SESSION['history'])) { - $_SESSION['history'] = []; - } - - parent::__construct(null, $properties); - - $currentUrl = \Ease\Document::phpSelf(false); - $currentTitle = $webPage->pageTitle; - - foreach ($_SESSION['history'] as $hid => $page) { - if ($page['url'] === $currentUrl) { - unset($_SESSION['history'][$hid]); - } - } - - array_unshift( - $_SESSION['history'], - ['url' => $currentUrl, 'title' => $currentTitle], - ); - - foreach ($_SESSION['history'] as $bookmark) { - $this->addItem(new \Ease\Html\SpanTag( - new \Ease\Html\ATag( - $bookmark['url'], - ['🔖 '.$bookmark['title']], - ), - ['class' => 'hitem'], - )); - } - } - - /** - * Add Css. - */ - public function finalize(): void - { - $this->addCss(<<<'EOD' - - .hitem { background-color: #B5FFC4; margin: 5px; border-radius: 15px 50px 30px 5px; padding-left: 3px; padding-right: 10px; } - #history { margin: 5px; } - -EOD); - parent::finalize(); - } -} diff --git a/src/Ease/TWB4/Widgets/FaIcon.php b/src/Ease/TWB4/Widgets/FaIcon.php index 798e586..cfca9ac 100644 --- a/src/Ease/TWB4/Widgets/FaIcon.php +++ b/src/Ease/TWB4/Widgets/FaIcon.php @@ -27,8 +27,8 @@ class FaIcon extends PairTag /** * Font Awesome Icon tag. * - * @param string $icon Font Awesome Icon class name (maybe without fa- prefix) - * @param array $tagProperties eg. ['aria-hidden'=>false] + * @param string $icon Font Awesome Icon class name (maybe without fa- prefix) + * @param array $tagProperties eg. ['aria-hidden'=>false] */ public function __construct($icon, $tagProperties = null) { diff --git a/src/Ease/TWB4/Widgets/LangLinks.php b/src/Ease/TWB4/Widgets/LangLinks.php deleted file mode 100644 index 3785c6d..0000000 --- a/src/Ease/TWB4/Widgets/LangLinks.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Ease\TWB4\Widgets; - -/** - * Description of LangSelect. - * - * @author vitex - */ -class LangLinks extends \Ease\Html\UlTag -{ - public function __construct($properties = []) - { - parent::__construct(null, $properties); - - foreach (\Ease\Locale::singleton()->availble() as $code => $name) { - $name = substr($name, 0, strpos($name, ' (')); - - if (\Ease\Locale::$localeUsed === $code) { - $this->addItemSmart(new \Ease\Html\StrongTag(new \Ease\Html\ATag( - '?locale='.$code, - $name, - ))); - } else { - $this->addItemSmart(new \Ease\Html\ATag('?locale='.$code, $name)); - } - } - } -} diff --git a/src/Ease/TWB4/Widgets/LangSelect.php b/src/Ease/TWB4/Widgets/LangSelect.php deleted file mode 100644 index 4459f21..0000000 --- a/src/Ease/TWB4/Widgets/LangSelect.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Ease\TWB4\Widgets; - -/** - * Description of LangSelect. - * - * @author vitex - */ -class LangSelect extends \Ease\Html\SelectTag -{ - public function __construct(string $name = 'locale', array $properties = []) - { - parent::__construct($name, \Ease\Locale::singleton()->availble(), \Ease\Locale::$localeUsed, $properties); - } -} diff --git a/src/Ease/TWB4/Widgets/MainPageMenu.php b/src/Ease/TWB4/Widgets/MainPageMenu.php index 1c2b94e..7a994f1 100644 --- a/src/Ease/TWB4/Widgets/MainPageMenu.php +++ b/src/Ease/TWB4/Widgets/MainPageMenu.php @@ -28,7 +28,6 @@ class MainPageMenu extends \Ease\TWB4\Row public function __construct() { parent::__construct( - null, [], [ 'class' => 'container', @@ -40,16 +39,16 @@ public function __construct() /** * Add Item to mainpage Menu. * - * @param string $title caption - * @param string $url image link href url - * @param string $image url - * @param mixed $description - * @param null|mixed $buttonText - * @param array $properties for Card + * @param string $title caption + * @param string $url image link href url + * @param string $image url + * @param mixed $description + * @param null|mixed $buttonText + * @param array $properties for Card * * @return \Ease\Html\ATag */ - public function addMenuItem($title, $url, $image, $description, $buttonText = null, $properties = []) + public function addMenuItem($title, $url, $image, $description, $buttonText = null, array $properties = []) { $icon = new \Ease\Html\ImgTag($image, $title, ['alt' => $title, 'class' => 'card-img-top']); // $cardHeader = new \Ease\Html\DivTag($title, ['class' => 'card-header']); diff --git a/src/Ease/TWB4/Widgets/PasswordInputShowHide.php b/src/Ease/TWB4/Widgets/PasswordInputShowHide.php index efc40c8..dd29dee 100644 --- a/src/Ease/TWB4/Widgets/PasswordInputShowHide.php +++ b/src/Ease/TWB4/Widgets/PasswordInputShowHide.php @@ -25,9 +25,9 @@ class PasswordInputShowHide extends DivTag { /** - * @var unique widget identifier + * @var string unique widget identifier */ - public unique $key = null; + public string $key = ''; /** * Password Input with Eye. diff --git a/src/Ease/TWB4/Widgets/Toggle.php b/src/Ease/TWB4/Widgets/Toggle.php index 294a3d2..ca09ce7 100644 --- a/src/Ease/TWB4/Widgets/Toggle.php +++ b/src/Ease/TWB4/Widgets/Toggle.php @@ -19,6 +19,8 @@ class Toggle extends \Ease\Html\CheckboxTag { /** * Properties holder. + * + * @var array */ public array $properties = []; @@ -35,10 +37,10 @@ class Toggle extends \Ease\Html\CheckboxTag /** * Twitter Bootstrap switch. * - * @param string $name tag name - * @param bool $checked checkbox state - * @param string $value returned value - * @param array $properties tag parameters + * @param string $name tag name + * @param bool $checked checkbox state + * @param string $value returned value + * @param array $properties tag parameters */ public function __construct( $name, @@ -64,7 +66,7 @@ public function __construct( /** * Properties setter. * - * @param array $properties values to change + * @param array $properties values to change */ public function setProperties($properties): void {