Переглянути джерело

Merge branch 'master' of https://github.com/unaio/una

RomanL 4 роки тому
батько
коміт
d8360347fd

+ 1 - 1
composer.json

@@ -76,7 +76,7 @@
         "unaio/amazon-s3-php-class-hmac-v2": "*",
         "tpyo/amazon-s3-php-class": "dev-master",
         "snipe/banbuilder": "dev-master",
-        "chargebee/chargebee-php": "^2.0",
+        "chargebee/chargebee-php": "^3.0",
         "curl/cacert": "*",
         "facebook/graph-sdk": "^5.6.0",
         "ffmpeg/ffmpeg": "*",

+ 363 - 25
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "66416d9b669859af8845a58c1c602a16",
+    "content-hash": "72047611e8ffc41665d341fe1cfa1f8b",
     "packages": [
         {
             "name": "achingbrain/php5-akismet",
@@ -210,23 +210,34 @@
         },
         {
             "name": "chargebee/chargebee-php",
-            "version": "v2.8.3",
+            "version": "v3.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
-                "reference": "e0819230cd7a8364337a0a228f7aecab80b6776b"
+                "reference": "a0e74758cdb78f70e76b704b48e63cdf198053de"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/e0819230cd7a8364337a0a228f7aecab80b6776b",
-                "reference": "e0819230cd7a8364337a0a228f7aecab80b6776b",
+                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/a0e74758cdb78f70e76b704b48e63cdf198053de",
+                "reference": "a0e74758cdb78f70e76b704b48e63cdf198053de",
                 "shasum": ""
             },
+            "require": {
+                "ext-curl": "*",
+                "guzzlehttp/guzzle": ">=6.5",
+                "php": ">=5.6.0"
+            },
+            "require-dev": {
+                "simpletest/simpletest": "^1.1"
+            },
             "type": "library",
             "autoload": {
-                "files": [
-                    "lib/ChargeBee.php"
-                ]
+                "psr-0": {
+                    "ChargeBee": "lib/"
+                },
+                "psr-4": {
+                    "ChargeBee\\": "lib/"
+                }
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
@@ -242,9 +253,9 @@
             ],
             "support": {
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
-                "source": "https://github.com/chargebee/chargebee-php/tree/v2.8.3"
+                "source": "https://github.com/chargebee/chargebee-php/tree/v3.3.0"
             },
-            "time": "2021-07-22T06:25:07+00:00"
+            "time": "2022-01-21T03:55:28+00:00"
         },
         {
             "name": "curl/cacert",
@@ -325,12 +336,12 @@
             },
             "type": "library",
             "autoload": {
-                "psr-0": {
-                    "HTMLPurifier": "library/"
-                },
                 "files": [
                     "library/HTMLPurifier.composer.php"
                 ],
+                "psr-0": {
+                    "HTMLPurifier": "library/"
+                },
                 "exclude-from-classmap": [
                     "/library/HTMLPurifier/Language/"
                 ]
@@ -429,6 +440,214 @@
             },
             "type": "library"
         },
+        {
+            "name": "guzzlehttp/guzzle",
+            "version": "7.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/guzzle.git",
+                "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
+                "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "guzzlehttp/promises": "^1.5",
+                "guzzlehttp/psr7": "^1.8.3 || ^2.1",
+                "php": "^7.2.5 || ^8.0",
+                "psr/http-client": "^1.0",
+                "symfony/deprecation-contracts": "^2.2 || ^3.0"
+            },
+            "provide": {
+                "psr/http-client-implementation": "1.0"
+            },
+            "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.4.1",
+                "ext-curl": "*",
+                "php-http/client-integration-tests": "^3.0",
+                "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+                "psr/log": "^1.1 || ^2.0 || ^3.0"
+            },
+            "suggest": {
+                "ext-curl": "Required for CURL handler support",
+                "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+                "psr/log": "Required for using the Log middleware"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "7.4-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions_include.php"
+                ],
+                "psr-4": {
+                    "GuzzleHttp\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Graham Campbell",
+                    "email": "hello@gjcampbell.co.uk",
+                    "homepage": "https://github.com/GrahamCampbell"
+                },
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                },
+                {
+                    "name": "Jeremy Lindblom",
+                    "email": "jeremeamia@gmail.com",
+                    "homepage": "https://github.com/jeremeamia"
+                },
+                {
+                    "name": "George Mponos",
+                    "email": "gmponos@gmail.com",
+                    "homepage": "https://github.com/gmponos"
+                },
+                {
+                    "name": "Tobias Nyholm",
+                    "email": "tobias.nyholm@gmail.com",
+                    "homepage": "https://github.com/Nyholm"
+                },
+                {
+                    "name": "Márk Sági-Kazár",
+                    "email": "mark.sagikazar@gmail.com",
+                    "homepage": "https://github.com/sagikazarmark"
+                },
+                {
+                    "name": "Tobias Schultze",
+                    "email": "webmaster@tubo-world.de",
+                    "homepage": "https://github.com/Tobion"
+                }
+            ],
+            "description": "Guzzle is a PHP HTTP client library",
+            "keywords": [
+                "client",
+                "curl",
+                "framework",
+                "http",
+                "http client",
+                "psr-18",
+                "psr-7",
+                "rest",
+                "web service"
+            ],
+            "support": {
+                "issues": "https://github.com/guzzle/guzzle/issues",
+                "source": "https://github.com/guzzle/guzzle/tree/7.4.1"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/GrahamCampbell",
+                    "type": "github"
+                },
+                {
+                    "url": "https://github.com/Nyholm",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-12-06T18:43:05+00:00"
+        },
+        {
+            "name": "guzzlehttp/promises",
+            "version": "1.5.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/promises.git",
+                "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
+                "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "symfony/phpunit-bridge": "^4.4 || ^5.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.5-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions_include.php"
+                ],
+                "psr-4": {
+                    "GuzzleHttp\\Promise\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Graham Campbell",
+                    "email": "hello@gjcampbell.co.uk",
+                    "homepage": "https://github.com/GrahamCampbell"
+                },
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                },
+                {
+                    "name": "Tobias Nyholm",
+                    "email": "tobias.nyholm@gmail.com",
+                    "homepage": "https://github.com/Nyholm"
+                },
+                {
+                    "name": "Tobias Schultze",
+                    "email": "webmaster@tubo-world.de",
+                    "homepage": "https://github.com/Tobion"
+                }
+            ],
+            "description": "Guzzle promises library",
+            "keywords": [
+                "promise"
+            ],
+            "support": {
+                "issues": "https://github.com/guzzle/promises/issues",
+                "source": "https://github.com/guzzle/promises/tree/1.5.1"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/GrahamCampbell",
+                    "type": "github"
+                },
+                {
+                    "url": "https://github.com/Nyholm",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-10-22T20:56:57+00:00"
+        },
         {
             "name": "guzzlehttp/psr7",
             "version": "2.1.0",
@@ -997,16 +1216,16 @@
         },
         {
             "name": "phpmailer/phpmailer",
-            "version": "v6.5.4",
+            "version": "v6.6.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/PHPMailer/PHPMailer.git",
-                "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285"
+                "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285",
-                "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285",
+                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
+                "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
                 "shasum": ""
             },
             "require": {
@@ -1063,7 +1282,7 @@
             "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
             "support": {
                 "issues": "https://github.com/PHPMailer/PHPMailer/issues",
-                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4"
+                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
             },
             "funding": [
                 {
@@ -1071,7 +1290,59 @@
                     "type": "github"
                 }
             ],
-            "time": "2022-02-17T08:19:04+00:00"
+            "time": "2022-02-28T15:31:21+00:00"
+        },
+        {
+            "name": "psr/http-client",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-client.git",
+                "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
+                "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0 || ^8.0",
+                "psr/http-message": "^1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Client\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP clients",
+            "homepage": "https://github.com/php-fig/http-client",
+            "keywords": [
+                "http",
+                "http-client",
+                "psr",
+                "psr-18"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/http-client/tree/master"
+            },
+            "time": "2020-06-29T06:28:15+00:00"
         },
         {
             "name": "psr/http-factory",
@@ -1329,16 +1600,16 @@
         },
         {
             "name": "stripe/stripe-php",
-            "version": "v7.114.0",
+            "version": "v7.116.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/stripe/stripe-php.git",
-                "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b"
+                "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/stripe/stripe-php/zipball/63be231686c6874befb5b3a47fb8effb4c30b78b",
-                "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b",
+                "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a39f594f213ed3f443a95adf769d1ecbc8393e7",
+                "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7",
                 "shasum": ""
             },
             "require": {
@@ -1383,9 +1654,76 @@
             ],
             "support": {
                 "issues": "https://github.com/stripe/stripe-php/issues",
-                "source": "https://github.com/stripe/stripe-php/tree/v7.114.0"
+                "source": "https://github.com/stripe/stripe-php/tree/v7.116.0"
+            },
+            "time": "2022-03-02T15:51:15+00:00"
+        },
+        {
+            "name": "symfony/deprecation-contracts",
+            "version": "v2.5.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/deprecation-contracts.git",
+                "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
+                "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "2.5-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "function.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "A generic function and convention to trigger deprecation notices",
+            "homepage": "https://symfony.com",
+            "support": {
+                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
             },
-            "time": "2022-02-15T22:48:31+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-07-12T14:48:14+00:00"
         },
         {
             "name": "tpyo/amazon-s3-php-class",

+ 44 - 0
modules/boonex/artificer/data/template/bx_market/attachments.html

@@ -0,0 +1,44 @@
+<div class="bx-base-text-attachments bx-market-attachments">
+    <bx_repeat:attachments>
+        <bx_if:show_separator>
+            <div class="bx-market-attachment-separator bx-base-text-attachment bx-market-attachment w-full pl-2 box-border"><div class="text-xl pt-4"> __type__</div></div>
+        </bx_if:show_separator>
+        <div class="bx-base-text-attachment-wrp inline-block w-1/4 min-w-48">
+            <div class="bx-base-text-attachment bx-market-attachment bx-def-box bx-def-color-bg-box bx-def-round-corners relative m-2 __class__">
+                <bx_if:main>
+                    <div class="bx-market-a-main absolute top-1 right-2 text-2xl">
+                        <i class="sys-icon check col-green3" title="<bx_text_attribute:_bx_market_txt_most_current_version />"></i>
+                    </div>
+                </bx_if:main>
+                <bx_if:image>
+                    <a target="_blank" href="javascript:void(0);" title="__attr_file_name__" onclick="$('#__popup_id__').dolPopupImage('__url_original__', $(this).parent())">
+                        <img class="bx-def-gal-img-size" src="__url_preview__" />
+                    </a>
+                    __popup__
+                </bx_if:image>
+                <bx_if:video>
+                    __video__
+                </bx_if:video>
+                <bx_if:not_image>
+                    <div class="bx-market-a-text p-4">
+                        <div class="bx-market-at-row flex items-center">
+                            <i class="sys-icon far file-archive sys-colored block mr-2 text-4xl"></i>
+                            <div class="bx-market-attachment-text overflow-hidden">
+                                <bx_if:show_version>
+                                    <div class="text-xl"> __file_version__</div>
+                                </bx_if:show_version>
+                                <bx_if:show_update>
+                                    <div class="text-xl">__file_version_from_to__</div>
+                                </bx_if:show_update>
+                                <div class="bx-market-attachment-info bx-def-font-small bx-def-font-grayed truncate">__file_type__ &bull; <span title="__file_name_attr__">__file_name__</span></div>
+                            </div>
+                        </div>
+                        <div class="bx-market-at-row mt-2">
+                            <a target="_blank" href="__url_original__" title="__attr_file_name__" class="bx-btn bx-btn-primary bx-btn-small"><bx_text_attribute:_bx_market_menu_item_title_download /></a>
+                        </div>
+                    </div>
+                </bx_if:not_image>
+            </div>
+        </div>
+    </bx_repeat:attachments>
+</div>

+ 9 - 0
modules/boonex/artificer/data/template/bx_market/css/main.css

@@ -2,6 +2,15 @@
 import url(../../../../../market/template/css/main.css); 
 */
 
+/*--- Snippet ---*/
 div.bx-market-unit-author-name a.sys-author {
     font-weight: 700;
+}
+
+/*--- Attachments ---*/
+div.bx-market-attachment {
+    display: none;
+}
+div.bx-market-attachment.bx-market-attachment-main {
+    display: block;
 }

+ 1 - 1
modules/boonex/artificer/data/template/system/css/forms.css

@@ -313,7 +313,7 @@ import url(../../../../../../../template/css/forms.css);
 }
 .bx-form-value .bx-form-input-autotoken:not(.bx-form-input-labels) .bx-base-pofile-unit-wo-info {
     display: inline-block;
-    vertical-align: middle;
+    vertical-align: top;
 
     margin-right: 0.5rem;
 }

+ 7 - 0
modules/boonex/artificer/data/template/system/menu_panel.html

@@ -0,0 +1,7 @@
+<div id="bx-menu-panel" class="bx-menu-panel bx-menu-object-__object__">
+    <bx_repeat:menu_items>
+        <div class="bx-menu-panel-item __class__ bx-def-padding-sec-topbottom">
+            <div class="bx-menu-panel-item-cnt">__item__</div>
+        </div>
+    </bx_repeat:menu_items>
+</div>

+ 2 - 2
modules/boonex/artificer/data/template/system/profile_avatar.html

@@ -1,5 +1,5 @@
 <div class="bx-profile-avatar group text-gray-600 dark:text-gray-300">
-    <div class="bx-profile-avatar-cnt relative flex items-center p-2">
+    <div class="bx-profile-avatar-cnt relative flex items-center">
         <div class="bx-pa-img absolute">__profile_unit__</div>
         <div class="bx-pa-info w-full" sidebar-toggle-item>
             <div class="bx-pa-info-cnt flex flex-col justify-center h-10 pl-12 pr-4 box-border">
@@ -12,7 +12,7 @@
             </div>
         </div>
         <bx_if:show_switcher_icon>
-            <div class="bx-pa-actions absolute right-2" sidebar-toggle-item>
+            <div class="bx-pa-actions absolute right-0" sidebar-toggle-item>
                 <a class="block" href="__switcher_url__" onclick="__switcher_onclick__">
                     <div class="bx-pa-action flex items-center justify-center h-8 w-8 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full"><i class="sys-icon arrows-alt-v flex-shrink-0 text-gray-400 group-hover:text-gray-500"></i></div>
                 </a>

+ 1 - 0
modules/boonex/lucid/data/template/system/scripts/BxTemplMenuSite.php

@@ -26,6 +26,7 @@ class BxTemplMenuSite extends BxTemplMenuMoreAuto
         $this->_oModule = BxDolModule::getInstance($this->_sModule);
 
         $this->_sJsClassMoreAuto = 'BxLucidMenuMoreAuto';
+        $this->_sJsCallMoreAuto = "if(!{js_object}) {var {js_object} = new {js_class}({js_params}); $(document).ready(function() {{js_object}.init();});}";
 
         $this->_bSiteMenu = $this->_sObject == 'sys_site';
         $this->_bSiteMenuSubmenu = false;

+ 2 - 1
modules/boonex/market/classes/BxMarketTemplate.php

@@ -382,10 +382,11 @@ class BxMarketTemplate extends BxBaseModTextTemplate
                 $bSeparatorNeeded = true;
                 $sCaptionType = 'latest';
             }
-            
+
             $bAttachment = !empty($aFiles[$iAttachmentId]);
             $aAttachments[$iAttachmentId]['bx_if:not_image']['content'] = array_merge($aAttachments[$iAttachmentId]['bx_if:not_image']['content'], [
                 'file_type' => $bAttachment ? _t('_bx_market_form_entry_input_files_type_' . $aFiles[$iAttachmentId]['type']) : '',
+                'file_name_attr' => bx_html_attribute($aAttachments[$iAttachmentId]['file_name']),
                 'bx_if:show_version' => [
                     'condition' => $bAttachment && $aFiles[$iAttachmentId]['type'] == BX_MARKET_FILE_TYPE_VERSION,
                     'content' => [

+ 1 - 1
modules/boonex/market/template/attachments.html

@@ -28,7 +28,7 @@
                         <bx_if:show_update>
                             <div class="bx-def-font-h3">__file_version_from_to__</div>
                         </bx_if:show_update>
-                        <div class="bx-market-attachment-info bx-def-font-small bx-def-font-grayed">__file_type__ &bull; __file_name__ </div>
+                        <div class="bx-market-attachment-info bx-def-font-small bx-def-font-grayed">__file_type__ &bull; <span title="__file_name_attr__">__file_name__</span></div>
                     </div>
                     <div class="bx-def-margin-sec-top">
                         <a target="_blank" href="__url_original__" title="__attr_file_name__" class="bx-btn bx-btn-primary bx-btn-small"><bx_text_attribute:_bx_market_menu_item_title_download /></a>

+ 3 - 2
modules/boonex/market/template/css/forms.css

@@ -1,5 +1,6 @@
-.bx-form-value .bx-form-input-autotoken b {
-    padding-left:0.5rem;
+/*--- Subentries field ---*/
+#bx-form-element-subentries .bx-form-value .bx-form-input-autotoken b {
+    padding-left: 0.5rem;
 }
 
 /*--- Uploader Ghost ---*/

+ 20 - 14
modules/boonex/payment/classes/BxPaymentProviderChargebee.php

@@ -12,6 +12,12 @@
 define('CBEE_MODE_LIVE', 1);
 define('CBEE_MODE_TEST', 2);
 
+use ChargeBee\ChargeBee\Environment;
+use ChargeBee\ChargeBee\Models\Addon;
+use ChargeBee\ChargeBee\Models\Customer;
+use ChargeBee\ChargeBee\Models\HostedPage;
+use ChargeBee\ChargeBee\Models\Subscription;
+
 class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBxBaseModPaymentProvider
 {
     protected $_iMode;
@@ -138,8 +144,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
                     'pending_id' => $iPendingId
                 ));
 
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_HostedPage::checkoutNew($aPage);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = HostedPage::checkoutNew($aPage);
 
             $oPage = $oResult->hostedPage();
         }
@@ -160,8 +166,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
         $oPage = null;
 
         try {
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_HostedPage::retrieve($sPageId);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = HostedPage::retrieve($sPageId);
 
             $oPage = $oResult->hostedPage();
         }
@@ -182,8 +188,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
         $oSubscription = null;
 
         try {
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_Subscription::retrieve($sSubscriptionId);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = Subscription::retrieve($sSubscriptionId);
 
             $oSubscription = $oResult->subscription();
             if($oSubscription->id != $sSubscriptionId)
@@ -224,8 +230,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
     public function deleteSubscription($sSubscriptionId)
     {
         try {
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_Subscription::cancel($sSubscriptionId);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = Subscription::cancel($sSubscriptionId);
 
             $oSubscription = $oResult->subscription();
             if($oSubscription->status != 'cancelled')
@@ -256,8 +262,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
             if(!empty($iLimit))
                 $aParams['limit'] = $iLimit;
             
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResults = ChargeBee_Addon::all($aParams);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResults = Addon::all($aParams);
 
             foreach($oResults as $oResult)
                 $aAddons[] = $oResult->addon();
@@ -292,8 +298,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
         $oAddon = null;
 
         try {
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_Addon::retrieve($sId);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = Addon::retrieve($sId);
 
             $oAddon = $oResult->addon();
             if($oAddon->id != $sId)
@@ -325,8 +331,8 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
         $oCustomer = null;
 
         try {
-            ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-            $oResult = ChargeBee_Customer::retrieve($sCustomerId);
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = Customer::retrieve($sCustomerId);
 
             $oCustomer = $oResult->customer();
             if($oCustomer->id != $sCustomerId)

+ 45 - 42
modules/boonex/payment/classes/BxPaymentProviderChargebeeV3.php

@@ -11,6 +11,8 @@
 
 require_once('BxPaymentProviderChargebee.php');
 
+use ChargeBee\ChargeBee\Models\PortalSession;
+
 class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
 {
     function __construct($aConfig)
@@ -64,21 +66,21 @@ class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
     public function actionGetPortal($iPendingId)
     {
     	if(!isLogged())
-    		return echoJson(array());
+            return echoJson(array());
 
     	$aPending = $this->_oModule->_oDb->getOrderPending(array('type' => 'id', 'id' => $iPendingId));
     	if(empty($aPending) || !is_array($aPending))
-    		return echoJson(array());
+            return echoJson(array());
 
     	$this->initOptionsByVendor((int)$aPending['seller_id']);
 
     	$aSubscription = $this->_oModule->_oDb->getSubscription(array('type' => 'pending_id', 'pending_id' => $iPendingId));
     	if(empty($aSubscription) || !is_array($aSubscription))
-    		return echoJson(array());
+            return echoJson(array());
 
     	$oPortal = $this->getPortal($aSubscription['customer_id'], $aSubscription['subscription_id']);
     	if($oPortal === false)
-    		return echoJson(array());
+            return echoJson(array());
 
     	header('Content-type: text/html; charset=utf-8');
     	echo $oPortal->toJson();
@@ -87,7 +89,7 @@ class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
     public function addJsCss()
     {
     	if(!$this->isActive())
-    		return;
+            return;
 
         $this->_oModule->_oTemplate->addJs($this->_aIncludeJs);
         $this->_oModule->_oTemplate->addCss($this->_aIncludeCss);
@@ -106,39 +108,39 @@ class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
     {
         $sPageId = bx_process_input(bx_get('page_id'));
         if(empty($sPageId) || empty($iPendingId))
-        	return $this->_sLangsPrefix . 'err_wrong_data';
+            return $this->_sLangsPrefix . 'err_wrong_data';
 
     	$aItem = array_shift($aCartInfo['items']);
     	if(empty($aItem) || !is_array($aItem))
-    		return $this->_sLangsPrefix . 'err_empty_items';
+            return $this->_sLangsPrefix . 'err_empty_items';
 
-		$aClient = $this->_oModule->getProfileInfo();
-		$aVendor = $this->_oModule->getProfileInfo($aCartInfo['vendor_id']);
+        $aClient = $this->_oModule->getProfileInfo();
+        $aVendor = $this->_oModule->getProfileInfo($aCartInfo['vendor_id']);
 
-		$oPage = $this->retreiveHostedPage($sPageId);
-		if($oPage === false)
-			return $this->_sLangsPrefix . 'err_cannot_perform';
+        $oPage = $this->retreiveHostedPage($sPageId);
+        if($oPage === false)
+            return $this->_sLangsPrefix . 'err_cannot_perform';
 
-		$aPending = $this->_oModule->_oDb->getOrderPending(array('type' => 'id', 'id' => $iPendingId));
-		if(!empty($aPending['order']) || !empty($aPending['error_code']) || !empty($aPending['error_msg']) || (int)$aPending['processed'] != 0)
+        $aPending = $this->_oModule->_oDb->getOrderPending(array('type' => 'id', 'id' => $iPendingId));
+        if(!empty($aPending['order']) || !empty($aPending['error_code']) || !empty($aPending['error_msg']) || (int)$aPending['processed'] != 0)
             return $this->_sLangsPrefix . 'err_already_processed';
 
         if($aPending['type'] != BX_PAYMENT_TYPE_RECURRING) 
             return $this->_sLangsPrefix . 'err_wrong_data';
 
-		$oCustomer = $oPage->content()->customer();
-		$oSubscription = $oPage->content()->subscription();
-
-		return array(
-			'code' => 0,
-			'eval' => $this->_oModule->_oConfig->getJsObject('cart') . '.onSubscribeSubmit(oData);',
-			'redirect' => $this->getReturnDataUrl($aVendor['id'], array(
-				'order_id' => $oSubscription->id,
-				'customer_id' => $oCustomer->id,
-				'pending_id' => $aPending['id'],
-				'redirect' => $sRedirect
-			))
-		);
+        $oCustomer = $oPage->content()->customer();
+        $oSubscription = $oPage->content()->subscription();
+
+        return array(
+            'code' => 0,
+            'eval' => $this->_oModule->_oConfig->getJsObject('cart') . '.onSubscribeSubmit(oData);',
+            'redirect' => $this->getReturnDataUrl($aVendor['id'], array(
+                'order_id' => $oSubscription->id,
+                'customer_id' => $oCustomer->id,
+                'pending_id' => $aPending['id'],
+                'redirect' => $sRedirect
+            ))
+        );
     }
 
     public function finalizeCheckout(&$aData)
@@ -191,21 +193,22 @@ class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
     	$oPortal = false;
 
     	try {
-    		ChargeBee_Environment::configure($this->_getSite(), $this->_getApiKey());
-    		$oResult = ChargeBee_PortalSession::create(array(
-				'customer' => array(
-					'id' => $sCustomerId
-				)));
-
-    		$oPortal = $oResult->portalSession();
+            Environment::configure($this->_getSite(), $this->_getApiKey());
+            $oResult = PortalSession::create(array(
+                'customer' => array(
+                    'id' => $sCustomerId
+                )
+            ));
+
+            $oPortal = $oResult->portalSession();
     	}
     	catch (Exception $oException) {
-    		$iError = $oException->getCode();
-    		$sError = $oException->getMessage();
+            $iError = $oException->getCode();
+            $sError = $oException->getMessage();
 
-    		$this->log('Get Portal Error: ' . $sError . '(' . $iError . ')');
+            $this->log('Get Portal Error: ' . $sError . '(' . $iError . ')');
 
-    		return false;
+            return false;
     	}
 
     	return $oPortal;
@@ -215,13 +218,13 @@ class BxPaymentProviderChargebeeV3 extends BxPaymentProviderChargebee
     {
     	$sSite = '';
     	bx_alert($this->_oModule->_oConfig->getName(), $this->_sName . '_get_js_code', 0, 0, array(
-	    	'site' => &$sSite,
-	    	'params' => &$aParams
+            'site' => &$sSite,
+            'params' => &$aParams
     	));
 
     	return $this->_oModule->_oTemplate->getJsCode($this->_sName, array_merge(array(
-			'sProvider' => $this->_sName,
-			'sSite' => !empty($sSite) ? $sSite : $this->_getSite()
+            'sProvider' => $this->_sName,
+            'sSite' => !empty($sSite) ? $sSite : $this->_getSite()
     	), $aParams));
     }
 

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -651,7 +651,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
     public function getExtenalsEvery($sType = 'default')
     {
         if($this->isInfiniteScroll())
-            $sType = 'preload';
+            $sType .= '_preload';
 
         $iExtenalsEvery = (int)getParam($this->getPrefix('option') . 'extenals_every_' . $sType);
         if(!$iExtenalsEvery)

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 1 - 0
plugins_public/tailwind/js/tailwind.config.js

@@ -82,6 +82,7 @@ module.exports = {
         minWidth: {
             4: '1rem',
             6: '1.5rem',
+            48: '12rem',
             88: '22rem'
         },
         maxWidth: {

+ 1 - 1
template/_sub_header.html

@@ -46,7 +46,7 @@
     <div id="bx-menu-main-bar-wrapper" class="bx-menu-main-bar-wrapper bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800 __site_submenu_hidden__">
         <div id="bx-menu-main-bar" class="bx-menu-main-bar __site_submenu_class__ bx-def-page-width mx-auto px-4 sm:px-6 lg:px-8 box-border">
             <div class="bx-menu-main-bar-cnt relative -mb-px">
-                <div class="absolute w-full">
+                <div class="absolute w-full text-center overflow-x-auto">
                     <bx_injection:injection_top_menu_before />
                     <bx_menu:sys_site_submenu />
                     <bx_injection:injection_top_menu_after />

+ 15 - 13
template/scripts/BxBaseMenuMoreAuto.php

@@ -21,9 +21,10 @@ class BxBaseMenuMoreAuto extends BxTemplMenu
     protected $_bMoreAuto;
     protected $_iMoreAutoItemsStatic;
     protected $_bMoreAutoItemsStaticOnly;
-    
+
     protected $_sJsClassMoreAuto;
     protected $_sJsObjectMoreAuto;
+    protected $_sJsCallMoreAuto;
 
     protected $_aHtmlIds;
 
@@ -37,9 +38,10 @@ class BxBaseMenuMoreAuto extends BxTemplMenu
         $this->_bMoreAuto = null;
         $this->_iMoreAutoItemsStatic = 1;
         $this->_bMoreAutoItemsStaticOnly = false;
-        
+
         $this->_sJsClassMoreAuto = 'BxDolMenuMoreAuto';
         $this->_sJsObjectMoreAuto = 'oMenuMoreAuto' . bx_gen_method_name($this->_sObject);
+        $this->_sJsCallMoreAuto = "if(!{js_object}) {var {js_object} = new {js_class}({js_params}); {js_object}.init();}";
 
         $sPrefix = str_replace('_', '-', $this->_sObject);
         $this->_aHtmlIds = array(
@@ -98,18 +100,18 @@ class BxBaseMenuMoreAuto extends BxTemplMenu
 
     protected function _getJsCodeMoreAuto()
     {
-        $sJsClass = $this->_getJsClassMoreAuto();
-        $sJsObject = $this->_getJsObjectMoreAuto();
-        $aJsParams = array(
-            'sObject' => $this->_sObject,
-            'iItemsStatic' => $this->_iMoreAutoItemsStatic,
-            'bItemsStaticOnly' => $this->_bMoreAutoItemsStaticOnly ? 1 : 0,
-            'aHtmlIds' => $this->_getHtmlIds()
-        );
-
-        return $this->_oTemplate->_wrapInTagJsCode("if(!" . $sJsObject . ") {var " . $sJsObject . " = new " . $sJsClass . "(" . json_encode($aJsParams) . "); " . $sJsObject . ".init();}");
+        return $this->_oTemplate->_wrapInTagJsCode(bx_replace_markers($this->_sJsCallMoreAuto, [
+            'js_class' => $this->_getJsClassMoreAuto(),
+            'js_object' => $this->_getJsObjectMoreAuto(),
+            'js_params' => json_encode([
+                'sObject' => $this->_sObject,
+                'iItemsStatic' => $this->_iMoreAutoItemsStatic,
+                'bItemsStaticOnly' => $this->_bMoreAutoItemsStaticOnly ? 1 : 0,
+                'aHtmlIds' => $this->_getHtmlIds()
+            ])
+        ]));
     }
-    
+
     protected function _getMenuItem ($aItem)
     {
         $aItem['popup'] = '';

+ 4 - 5
template/scripts/BxBaseServiceProfiles.php

@@ -553,12 +553,11 @@ class BxBaseServiceProfiles extends BxDol
         if(!in_array($sAction, ['watch', 'use']) || !isset($aProfileInfo['birthday']))
             return false;
 
-        $iResult = 0;
-        if(empty($aProfileInfo['birthday']) || in_array($aProfileInfo['birthday'], array('0000-00-00', '0000-00-00 00:00:00'))) 
-            return $iResult;
-
-        $iAge = bx_birthday2age($aProfileInfo['birthday']);
+        $iAge = 0;
+        if(!empty($aProfileInfo['birthday']) && !in_array($aProfileInfo['birthday'], array('0000-00-00', '0000-00-00 00:00:00'))) 
+            $iAge = bx_birthday2age($aProfileInfo['birthday']);
 
+        $iResult = 0;
         switch($iValue) {
             case 1:
                 $iResult = $iValue;

Деякі файли не було показано, через те що забагато файлів було змінено