From 4f5985cf636d53237b96844c59ff123f9a0ef97a Mon Sep 17 00:00:00 2001 From: Maurice Renck Date: Fri, 24 Jan 2025 16:19:33 +0100 Subject: [PATCH] feat: kirby 5 compatibility --- components/fields.php | 5 + composer.lock | 306 +++++++++++------------ index.js | 2 +- src/components/Pexels.vue | 30 +-- vendor/composer/autoload_classmap.php | 4 +- vendor/composer/autoload_psr4.php | 2 +- vendor/composer/autoload_static.php | 6 +- vendor/composer/installed.php | 32 +-- vendor/guzzlehttp/promises/src/Utils.php | 4 +- 9 files changed, 192 insertions(+), 199 deletions(-) diff --git a/components/fields.php b/components/fields.php index abbfa1e..3a52e6b 100644 --- a/components/fields.php +++ b/components/fields.php @@ -4,6 +4,11 @@ return [ 'pexels' => [ + 'computed' => [ + 'pageId' => function (): string { + return $this->model()->id(); + } + ], 'props' => [ 'downloadSize' => function () { return option('mauricerenck.PexelsImageField.downloadSize', 'large'); diff --git a/composer.lock b/composer.lock index 5613f68..2fd6f99 100644 --- a/composer.lock +++ b/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": "504d12c803a7535899017ca0833af928", + "content-hash": "3ada9519ba40deb5f44ede95630bb8d1", "packages": [ { "name": "doctrine/collections", @@ -94,29 +94,27 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -124,7 +122,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -135,9 +133,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" }, - "time": "2024-01-30T19:34:25+00:00" + "time": "2024-12-07T21:18:45+00:00" }, { "name": "getkirby/composer-installer", @@ -314,16 +312,16 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "shasum": "" }, "require": { @@ -377,7 +375,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.3" + "source": "https://github.com/guzzle/promises/tree/2.0.4" }, "funding": [ { @@ -393,7 +391,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T10:29:17+00:00" + "time": "2024-10-17T10:06:22+00:00" }, { "name": "guzzlehttp/psr7", @@ -767,16 +765,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -784,12 +782,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -814,7 +812,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -830,7 +828,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -858,8 +856,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -913,16 +911,16 @@ }, { "name": "symfony/yaml", - "version": "v6.4.11", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "be37e7f13195e05ab84ca5269365591edd240335" + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/be37e7f13195e05ab84ca5269365591edd240335", - "reference": "be37e7f13195e05ab84ca5269365591edd240335", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", "shasum": "" }, "require": { @@ -965,7 +963,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.11" + "source": "https://github.com/symfony/yaml/tree/v6.4.13" }, "funding": [ { @@ -981,7 +979,7 @@ "type": "tidelift" } ], - "time": "2024-08-12T09:55:28+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "webeweb/core-library", @@ -1279,24 +1277,24 @@ }, { "name": "composer/semver", - "version": "3.4.2", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -1340,7 +1338,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.2" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -1356,7 +1354,7 @@ "type": "tidelift" } ], - "time": "2024-07-12T11:35:52+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "doctrine/instantiator", @@ -1430,26 +1428,26 @@ }, { "name": "filp/whoops", - "version": "2.15.4", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", - "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", + "url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2", + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", + "php": "^7.1 || ^8.0", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -1489,7 +1487,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.4" + "source": "https://github.com/filp/whoops/tree/2.16.0" }, "funding": [ { @@ -1497,26 +1495,26 @@ "type": "github" } ], - "time": "2023-11-03T12:00:00+00:00" + "time": "2024-09-25T12:00:00+00:00" }, { "name": "getkirby/cms", - "version": "4.4.0", + "version": "4.5.0", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "d14bc478632c3f1eec9b06ff2a5679ef1db2992e" + "reference": "94cc37ee7c3004ebb4950a53f14e1329ed4d28d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/d14bc478632c3f1eec9b06ff2a5679ef1db2992e", - "reference": "d14bc478632c3f1eec9b06ff2a5679ef1db2992e", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/94cc37ee7c3004ebb4950a53f14e1329ed4d28d3", + "reference": "94cc37ee7c3004ebb4950a53f14e1329ed4d28d3", "shasum": "" }, "require": { "christian-riesen/base32": "1.6.0", "claviska/simpleimage": "4.2.0", - "composer/semver": "3.4.2", + "composer/semver": "3.4.3", "ext-ctype": "*", "ext-curl": "*", "ext-dom": "*", @@ -1528,15 +1526,15 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-simplexml": "*", - "filp/whoops": "2.15.4", + "filp/whoops": "2.16.0", "getkirby/composer-installer": "^1.2.1", - "laminas/laminas-escaper": "2.13.0", + "laminas/laminas-escaper": "2.14.0", "michelf/php-smartypants": "1.8.1", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "phpmailer/phpmailer": "6.9.1", - "symfony/polyfill-intl-idn": "1.30.0", - "symfony/polyfill-mbstring": "1.30.0", - "symfony/yaml": "6.4.11" + "phpmailer/phpmailer": "6.9.2", + "symfony/polyfill-intl-idn": "1.31.0", + "symfony/polyfill-mbstring": "1.31.0", + "symfony/yaml": "6.4.13" }, "replace": { "symfony/polyfill-php72": "*" @@ -1600,37 +1598,37 @@ "type": "custom" } ], - "time": "2024-09-12T12:27:21+00:00" + "time": "2024-11-28T10:10:23+00:00" }, { "name": "laminas/laminas-escaper", - "version": "2.13.0", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" + "reference": "0f7cb975f4443cf22f33408925c231225cfba8cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/0f7cb975f4443cf22f33408925c231225cfba8cb", + "reference": "0f7cb975f4443cf22f33408925c231225cfba8cb", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.27.0", - "laminas/laminas-coding-standard": "~2.5.0", + "infection/infection": "^0.27.9", + "laminas/laminas-coding-standard": "~3.0.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "^0.19.0", + "vimeo/psalm": "^5.21.1" }, "type": "library", "autoload": { @@ -1662,7 +1660,7 @@ "type": "community_bridge" } ], - "time": "2023-10-10T08:35:13+00:00" + "time": "2024-10-24T10:12:53+00:00" }, { "name": "league/color-extractor", @@ -1781,16 +1779,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -1829,7 +1827,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -1837,20 +1835,20 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v5.2.0", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -1893,9 +1891,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-09-15T16:40:33+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "phar-io/manifest", @@ -2070,16 +2068,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", + "version": "5.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", "shasum": "" }, "require": { @@ -2088,17 +2086,17 @@ "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", + "phpstan/phpdoc-parser": "^1.7|^2.0", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.5", + "mockery/mockery": "~1.3.5 || ~1.6.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -2128,29 +2126,29 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2024-12-07T09:39:29+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.2", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18|^2.0" }, "require-dev": { "ext-tokenizer": "*", @@ -2186,22 +2184,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "time": "2024-02-23T11:10:43+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { "name": "phpmailer/phpmailer", - "version": "v6.9.1", + "version": "v6.9.2", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" + "reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", - "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a7b17b42fa4887c92146243f3d2f4ccb962af17c", + "reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c", "shasum": "" }, "require": { @@ -2261,7 +2259,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.9.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.2" }, "funding": [ { @@ -2269,30 +2267,31 @@ "type": "github" } ], - "time": "2023-11-25T22:23:28+00:00" + "time": "2024-10-09T10:07:50+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" + "reference": "a0165c648cab6a80311c74ffc708a07bb53ecc93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/a0165c648cab6a80311c74ffc708a07bb53ecc93", + "reference": "a0165c648cab6a80311c74ffc708a07bb53ecc93", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^3.40", "phpspec/phpspec": "^6.0 || ^7.0", "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" @@ -2336,36 +2335,36 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.20.0" }, - "time": "2024-02-29T11:52:51+00:00" + "time": "2024-11-19T13:12:41+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.30.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e" + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^5.3.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", "symfony/process": "^5.2" }, "type": "library", @@ -2383,9 +2382,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" }, - "time": "2024-09-07T20:13:05+00:00" + "time": "2024-10-13T11:29:49+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3774,22 +3773,21 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -3797,8 +3795,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3838,7 +3836,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -3854,7 +3852,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -3879,8 +3877,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3939,20 +3937,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -3963,8 +3961,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3999,7 +3997,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -4015,7 +4013,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "theseer/tokenizer", diff --git a/index.js b/index.js index 007a490..9392d26 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -(function(){"use strict";function n(i,e,t,o,p,c,g,u){var a=typeof i=="function"?i.options:i;return e&&(a.render=e,a.staticRenderFns=t,a._compiled=!0),{exports:i,options:a}}const s={props:{label:String,value:String,downloadSize:String},data:function(){return{items:[],selectedPhoto:{id:"",photo:"",photographer:"",photographerUrl:"",downloadUrl:""},keyword:"",pexelPage:1,perPage:1,remaining:0,totalResults:0,loading:!1,downloaded:!1}},computed:{pageId(){return this.$store.getters["content/id"]()},pages(){return Math.round(this.totalResults/this.perPage,10)}},methods:{onInput(i){this.keyword=i},onSubmit(i){this.timer!==null&&clearTimeout(this.timer),!(this.keyword.length<3)&&(this.timer=setTimeout(()=>{this.search(this.keyword)},250))},showNext(){this.pexelPage*this.perPage>this.remaining||(this.pexelPage++,this.search(this.keyword))},showPrev(){this.pexelPage!==1&&(this.pexelPage--,this.search(this.keyword))},search(i){this.loading=!0,this.$api.get(`pexels/search/${i}/${this.pexelPage}/${this.downloadSize}`).then(e=>{this.page=e.page,this.perPage=e.perPage,this.remaining=e.remaining,this.totalResults=e.totalResults,this.loading=!1,this.items=e.photos.map(t=>({id:t.id,downloadUrl:t.downloadUrl,link:t.downloadUrl,photographer:t.photographer,photographerUrl:t.photographerUrl,text:`${t.photographer}
${t.width} × ${t.height}`,options:[{icon:"open",text:"View",link:t.downloadUrl,target:"_blank"},{icon:"download",text:"Download",click:()=>{this.downloadImage(t.id)}}],image:{src:t.small,width:t.width}}))})},downloadImage(i){this.downloaded=!1;const e=this.items.find(o=>o.id===i),t=e.text;e.text="Downloading…",panel.api.post("pexels/download",{imageId:i,pageId:this.pageId.split("?")[0],downloadUrl:e.downloadUrl,photographer:e.photographer,photographerUrl:e.photographerUrl}).then(()=>{this.downloaded=!1,panel.view.reload(),window.panel.notification.success("Image downloaded"),e.text=t}).catch(()=>{this.downloaded=!1,window.panel.notification.error("Image download failed"),e.text=t})}}};var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"k-pexels-field"},[t("k-field",{attrs:{label:e.label}},[t("k-input",{attrs:{theme:"field",icon:"search",type:"text",name:"textfield",value:e.value},on:{input:e.onInput,keyup:e.onSubmit}})],1),t("div",[e.loading?t("div",{staticClass:"loader"},[t("div",[t("k-icon",{attrs:{type:"loader"}})],1)]):t("div",{staticClass:"imagegrid"},[t("k-collection",{attrs:{layout:"cards",items:e.items}}),e.pages>0?t("div",{staticClass:"prev-next"},[t("button",{staticClass:"k-link k-button",on:{click:e.showPrev}},[t("k-icon",{attrs:{type:"angle-left"}})],1),t("span",[e._v(e._s(e.pexelPage)+" of "+e._s(e.pages))]),t("button",{staticClass:"k-link k-button",on:{click:e.showNext}},[t("k-icon",{attrs:{type:"angle-right"}})],1)]):e._e()],1)])],1)},r=[],d=n(s,l,r);const h=d.exports;panel.plugin("mauricerenck/PexelsImageField",{fields:{pexels:h}})})(); +(function(){"use strict";function s(i,t,e,o,p,g,c,w){var a=typeof i=="function"?i.options:i;return t&&(a.render=t,a.staticRenderFns=e,a._compiled=!0),{exports:i,options:a}}const n={props:{label:String,value:String,downloadSize:String,pageId:String},data:function(){return{items:[],selectedPhoto:{id:"",photo:"",photographer:"",photographerUrl:"",downloadUrl:""},keyword:"",pexelPage:1,perPage:1,remaining:0,totalResults:0,loading:!1,downloaded:!1}},computed:{pages(){return Math.round(this.totalResults/this.perPage,10)}},methods:{onSubmit(i){this.keyword=i,this.timer!==null&&clearTimeout(this.timer),!(i.length<3)&&(this.timer=setTimeout(()=>{this.search(i)},250))},showNext(){this.pexelPage*this.perPage>this.remaining||(this.pexelPage++,this.search(this.keyword))},showPrev(){this.pexelPage!==1&&(this.pexelPage--,this.search(this.keyword))},search(i){this.loading=!0,this.$api.get(`pexels/search/${i}/${this.pexelPage}/${this.downloadSize}`).then(t=>{this.page=t.page,this.perPage=t.perPage,this.remaining=t.remaining,this.totalResults=t.totalResults,this.loading=!1,this.items=t.photos.map(e=>({id:e.id,downloadUrl:e.downloadUrl,link:e.downloadUrl,photographer:e.photographer,photographerUrl:e.photographerUrl,text:`${e.photographer}
${e.width} × ${e.height}`,options:[{icon:"open",text:"View",link:e.downloadUrl,target:"_blank"},{icon:"download",text:"Download",click:()=>{this.downloadImage(e.id)}}],image:{src:e.small,width:e.width}}))})},downloadImage(i){this.downloaded=!1;const t=this.items.find(o=>o.id===i),e=t.text;t.text="Downloading…",this.$api.post("pexels/download",{imageId:i,pageId:this.pageId.split("?")[0],downloadUrl:t.downloadUrl,photographer:t.photographer,photographerUrl:t.photographerUrl}).then(()=>{this.downloaded=!1,panel.view.reload(),window.panel.notification.success("Image downloaded"),t.text=e}).catch(()=>{this.downloaded=!1,window.panel.notification.error("Image download failed"),t.text=e})}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-pexels-field"},[e("k-field",{attrs:{label:t.label}},[e("k-input",{attrs:{theme:"field",icon:"search",type:"text",name:"textfield",value:this.keyword},on:{input:t.onSubmit}})],1),e("div",[t.loading?e("div",{staticClass:"loader"},[e("div",[e("k-icon",{attrs:{type:"loader"}})],1)]):e("div",{staticClass:"imagegrid"},[e("k-collection",{attrs:{layout:"cards",items:t.items}}),t.pages>0?e("div",{staticClass:"prev-next"},[e("button",{staticClass:"k-link k-button",on:{click:t.showPrev}},[e("k-icon",{attrs:{type:"angle-left"}})],1),e("span",[t._v(t._s(t.pexelPage)+" of "+t._s(t.pages))]),e("button",{staticClass:"k-link k-button",on:{click:t.showNext}},[e("k-icon",{attrs:{type:"angle-right"}})],1)]):t._e()],1)])],1)},r=[],d=s(n,l,r);const h=d.exports;panel.plugin("mauricerenck/PexelsImageField",{fields:{pexels:h}})})(); diff --git a/src/components/Pexels.vue b/src/components/Pexels.vue index 16e6005..5921129 100644 --- a/src/components/Pexels.vue +++ b/src/components/Pexels.vue @@ -1,15 +1,7 @@