From a4ffdc31016636868af086be22ad71acc8e4e977 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 29 Nov 2023 09:01:57 +0100 Subject: [PATCH] wait #6533 @0.25 --- app/Fluidbook/Link/LinksData.php | 15 +++++- app/SubForms/Link/SlideshowInline.php | 2 +- composer.lock | 78 +++++++++++++-------------- 3 files changed, 54 insertions(+), 41 deletions(-) diff --git a/app/Fluidbook/Link/LinksData.php b/app/Fluidbook/Link/LinksData.php index 25085a5b3..f588c8dc0 100644 --- a/app/Fluidbook/Link/LinksData.php +++ b/app/Fluidbook/Link/LinksData.php @@ -16,6 +16,7 @@ use PhpOffice\PhpSpreadsheet\Exception; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Alignment; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; +use Termwind\Components\Li; class LinksData { @@ -269,13 +270,25 @@ class LinksData self::_fixCloseButton($links); self::_fixColors($links); self::_fixInline($links); + self::_fixInlineSlideshows($links); + } + + protected static function _fixInlineSlideshows(&$links) + { + foreach ($links as $k => $link) { + if ($link['type'] == Link::IMAGE && str_ends_with($link['to'], '.zip')) { + $links[$k]['type'] = Link::SLIDESHOW_INLINE; + $links[$k]['extra'] = $link['image_rollover']; + $links[$k]['image_rollover'] = ''; + } + } } protected static function _fixID($links) { foreach ($links as $k => $link) { if (empty($link['uid'])) { - $link['uid'] = self::generateUID(); + $links[$k]['uid'] = self::generateUID(); } } } diff --git a/app/SubForms/Link/SlideshowInline.php b/app/SubForms/Link/SlideshowInline.php index 1c7ee9394..bbe6c9b91 100644 --- a/app/SubForms/Link/SlideshowInline.php +++ b/app/SubForms/Link/SlideshowInline.php @@ -5,7 +5,7 @@ namespace App\SubForms\Link; use App\Fluidbook\Link\Link; use Cubist\Backpack\Magic\Fields\FilesOrURL; -class SlideshowInline +class SlideshowInline extends Web { public $type = Link::SLIDESHOW_INLINE; diff --git a/composer.lock b/composer.lock index 626168c8f..ded37541f 100644 --- a/composer.lock +++ b/composer.lock @@ -2050,13 +2050,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_net.git", - "reference": "4a0e6efad661c32c33e66384c221df230e06a040" + "reference": "badaf4bddf35dc1d8c90bb8ed0fa7ddde1491c38" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-41040e.tar", - "reference": "4a0e6efad661c32c33e66384c221df230e06a040", - "shasum": "970ac53923bcbbac458216870f8b77ac511913f4" + "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-d981a1.tar", + "reference": "badaf4bddf35dc1d8c90bb8ed0fa7ddde1491c38", + "shasum": "00ced09d51f85f14d6c7a1f516da8eec7381a9e9" }, "require": { "cubist/util": "dev-master", @@ -2080,7 +2080,7 @@ } ], "description": "net cubist composer package", - "time": "2023-11-23T16:52:20+00:00" + "time": "2023-11-28T14:39:30+00:00" }, { "name": "cubist/pdf", @@ -2175,13 +2175,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "7008756cdf4d2cd69ff309a677730291becd08f6" + "reference": "1ddf6d789cda3c9a8e105dce707db6d990b38d79" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-5589bd.tar", - "reference": "7008756cdf4d2cd69ff309a677730291becd08f6", - "shasum": "d39cfbb10bba5a5c0e18c244da1eac2abe724337" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-04eb08.tar", + "reference": "1ddf6d789cda3c9a8e105dce707db6d990b38d79", + "shasum": "8ac3543053403fdd6a40090308704802c9811533" }, "require": { "cubist/net": "dev-master", @@ -2215,7 +2215,7 @@ } ], "description": "Utilities class", - "time": "2023-11-24T17:02:13+00:00" + "time": "2023-11-28T14:00:53+00:00" }, { "name": "cviebrock/eloquent-sluggable", @@ -3835,13 +3835,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/fluidbook_tools.git", - "reference": "9d74b725e456b8912e26e4f630b712929c1ffcce" + "reference": "eadb8196e5870f2fe530e1e9a332bfdc37a44c77" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-e6610a.tar", - "reference": "9d74b725e456b8912e26e4f630b712929c1ffcce", - "shasum": "abb301d693b5224d89704e53160307df206808b9" + "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-27ecb0.tar", + "reference": "eadb8196e5870f2fe530e1e9a332bfdc37a44c77", + "shasum": "96fac75cd361ec5179d62d295e1de3078e11af43" }, "require": { "barryvdh/laravel-debugbar": "*", @@ -3877,7 +3877,7 @@ } ], "description": "Fluidbook Tools", - "time": "2023-11-24T15:36:20+00:00" + "time": "2023-11-29T07:49:46+00:00" }, { "name": "fruitcake/php-cors", @@ -5113,16 +5113,16 @@ }, { "name": "laravel/framework", - "version": "v10.33.0", + "version": "v10.34.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "4536872e3e5b6be51b1f655dafd12c9a4fa0cfe8" + "reference": "c581caa233e380610b34cc491490bfa147a3b62b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/4536872e3e5b6be51b1f655dafd12c9a4fa0cfe8", - "reference": "4536872e3e5b6be51b1f655dafd12c9a4fa0cfe8", + "url": "https://api.github.com/repos/laravel/framework/zipball/c581caa233e380610b34cc491490bfa147a3b62b", + "reference": "c581caa233e380610b34cc491490bfa147a3b62b", "shasum": "" }, "require": { @@ -5311,7 +5311,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-11-21T14:49:31+00:00" + "time": "2023-11-28T19:06:27+00:00" }, { "name": "laravel/prompts", @@ -7022,31 +7022,31 @@ }, { "name": "norkunas/youtube-dl-php", - "version": "v2.2.2", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/norkunas/youtube-dl-php.git", - "reference": "bc0a83c114afa4e8051fabd438666e4bafca08c5" + "reference": "4c2fee7b8bb4a46efff2a625a1d5f399b960a6c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/norkunas/youtube-dl-php/zipball/bc0a83c114afa4e8051fabd438666e4bafca08c5", - "reference": "bc0a83c114afa4e8051fabd438666e4bafca08c5", + "url": "https://api.github.com/repos/norkunas/youtube-dl-php/zipball/4c2fee7b8bb4a46efff2a625a1d5f399b960a6c2", + "reference": "4c2fee7b8bb4a46efff2a625a1d5f399b960a6c2", "shasum": "" }, "require": { "ext-json": "*", "php": ">=7.4.0", - "symfony/filesystem": "^4.4|^5.1|^6.0", + "symfony/filesystem": "^4.4|^5.1|^6.0|^7.0", "symfony/polyfill-php80": "^1.26", - "symfony/process": "^4.4|^5.1|^6.0" + "symfony/process": "^4.4|^5.1|^6.0|^7.0" }, "require-dev": { - "mikey179/vfsstream": "^1.6.10", - "php-cs-fixer/shim": "^3.9", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "symfony/phpunit-bridge": "^6.1" + "mikey179/vfsstream": "^1.6.11", + "php-cs-fixer/shim": "^3.40", + "phpstan/phpstan": "^1.10.45", + "phpstan/phpstan-phpunit": "^1.3.15", + "symfony/phpunit-bridge": "^6.3.2" }, "type": "library", "extra": { @@ -7077,9 +7077,9 @@ ], "support": { "issues": "https://github.com/norkunas/youtube-dl-php/issues", - "source": "https://github.com/norkunas/youtube-dl-php/tree/v2.2.2" + "source": "https://github.com/norkunas/youtube-dl-php/tree/v2.3.0" }, - "time": "2023-08-25T03:38:29+00:00" + "time": "2023-11-28T11:55:21+00:00" }, { "name": "nothingworks/blade-svg", @@ -15408,16 +15408,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.3", + "version": "1.24.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083" + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083", - "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", "shasum": "" }, "require": { @@ -15449,9 +15449,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.24.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" }, - "time": "2023-11-18T20:15:32+00:00" + "time": "2023-11-26T18:29:22+00:00" }, { "name": "phpunit/php-code-coverage", -- 2.39.5