From c4c065ab6193abb8df773ea6142e152cf4babfff Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Fri, 19 Apr 2024 22:29:53 +0200 Subject: [PATCH 01/15] SortSelect using radix-vue --- resources/js/app.js | 2 + .../js/components/catalog-new/SortSelect.vue | 88 ++++++++++++++ .../frontend/catalog-new/index.blade.php | 107 +----------------- 3 files changed, 96 insertions(+), 101 deletions(-) create mode 100644 resources/js/components/catalog-new/SortSelect.vue diff --git a/resources/js/app.js b/resources/js/app.js index f1eb3592a..e64682c74 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -44,6 +44,7 @@ import CatalogNewArtworkImageController from './components/catalog-new/ArtworkIm import CatalogNewNumberFormatter from './components/catalog-new/NumberFormatter.vue' import CatalogNewAuthorFormatter from './components/catalog-new/AuthorFormatter.vue' import CatalogNewPopover from './components/catalog-new/Popover.vue' +import CatalogNewSortSelect from './components/catalog-new/SortSelect.vue' import Flickity from './components/Flickity.vue' import HomeShuffleOrchestrator from './components/home/ShuffleOrchestrator.vue' import HomeTransitionInPlace from './components/home/TransitionInPlace.vue' @@ -103,6 +104,7 @@ createApp({ .component('catalog.number-formatter', CatalogNewNumberFormatter) .component('catalog.author-formatter', CatalogNewAuthorFormatter) .component('catalog.popover', CatalogNewPopover) + .component('catalog.sort-select', CatalogNewSortSelect) .component('flickity', Flickity) .component('home.shuffle-orchestrator', HomeShuffleOrchestrator) .component('home.transition-in-place', HomeTransitionInPlace) diff --git a/resources/js/components/catalog-new/SortSelect.vue b/resources/js/components/catalog-new/SortSelect.vue new file mode 100644 index 000000000..2679a3376 --- /dev/null +++ b/resources/js/components/catalog-new/SortSelect.vue @@ -0,0 +1,88 @@ + + diff --git a/resources/views/frontend/catalog-new/index.blade.php b/resources/views/frontend/catalog-new/index.blade.php index 9a30e6976..f31e3c732 100644 --- a/resources/views/frontend/catalog-new/index.blade.php +++ b/resources/views/frontend/catalog-new/index.blade.php @@ -872,108 +872,13 @@ class="tw-capitalize">{{ trans_choice('item.filter.displaying', 5) }} - {{ trans_choice('item.filter.artworks_sorted_by', 5) }} - -
- - - - - - -
+ {{ trans_choice('item.filter.artworks_sorted_by', 5) }}
+ + + {{ utrans('item.filter.try_also') }} diff --git a/resources/views/components/icons/arrow-counter-clockwise.blade.php b/resources/views/components/icons/arrow-counter-clockwise.blade.php deleted file mode 100644 index a81e07c0e..000000000 --- a/resources/views/components/icons/arrow-counter-clockwise.blade.php +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/resources/views/components/icons/magnifying-glass.blade.php b/resources/views/components/icons/magnifying-glass.blade.php deleted file mode 100644 index 7846924d9..000000000 --- a/resources/views/components/icons/magnifying-glass.blade.php +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/resources/views/frontend/catalog-new/index.blade.php b/resources/views/frontend/catalog-new/index.blade.php index 888db5b0e..ce7012627 100644 --- a/resources/views/frontend/catalog-new/index.blade.php +++ b/resources/views/frontend/catalog-new/index.blade.php @@ -133,11 +133,11 @@ class="tw-ml-2"
- {{ trans('item.filter.clear') }} - +
- {{ trans('item.filter.clear') }} - +
{{ trans('item.filter.extended_filter') }} class="tw-text-lg tw-font-semibold">{{ utrans('item.filter.title') }} @endslot @slot('reset_button') - {{ trans('item.filter.clear_all') }} - + @endslot @slot('body')
- {{ trans('item.filter.clear') }} - +
@endslot @@ -426,11 +426,11 @@ class="tw-px-4"
- {{ trans('item.filter.clear') }} - +
@endslot @@ -483,11 +483,11 @@ class="tw-pb-2" @endslot @slot('reset_button') - {{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body') {{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body')
{{ trans('item.filter.clear') }} - + @endslot @slot('body')
enter-active-class="tw-transition tw-duration-100" leave-active-class="tw-transition tw-duration-100" class="mb-4"> - {{ trans('item.filter.clear') }} - +
From 3d86b75c1b8434c1417ff3585f22de058ab2a1ea Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Thu, 25 Apr 2024 13:58:41 +0200 Subject: [PATCH 09/15] Replace @lottiefiles/lottie-player with vue3-lottie In order to silence compilation warnings --- package-lock.json | 91 ++++++------------- package.json | 4 +- resources/js/app.js | 3 +- .../components/catalog-new/EmptyAnimation.vue | 7 ++ .../components/catalog-new/SelectOptions.vue | 8 +- .../frontend/catalog-new/index.blade.php | 4 +- 6 files changed, 42 insertions(+), 75 deletions(-) create mode 100644 resources/js/components/catalog-new/EmptyAnimation.vue diff --git a/package-lock.json b/package-lock.json index 5ba1f6c7d..6c0a87509 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "packages": { "": { "dependencies": { - "@lottiefiles/lottie-player": "^1.7.1", "@popperjs/core": "^2.11.7", "axios": "^1.6.0", "bootstrap": "^3.4.1", @@ -34,7 +33,8 @@ "vue-masonry": "^0.16.0", "vue-select": "^4.0.0-beta.6", "vue-slider-component": "^4.1.0-beta.7", - "vue3-click-away": "^1.2.4" + "vue3-click-away": "^1.2.4", + "vue3-lottie": "^3.3.0" }, "devDependencies": { "@prettier/plugin-php": "^0.18.2", @@ -672,28 +672,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.2.0", - "license": "BSD-3-Clause" - }, - "node_modules/@lit/reactive-element": { - "version": "1.6.3", - "license": "BSD-3-Clause", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.0.0" - } - }, - "node_modules/@lottiefiles/lottie-player": { - "version": "1.7.1", - "license": "MIT", - "dependencies": { - "@types/pako": "^1.0.1", - "lit": "^2.1.2", - "lottie-web": "^5.10.0", - "pako": "^2.0.4", - "resize-observer-polyfill": "^1.5.1" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "dev": true, @@ -1067,14 +1045,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/pako": { - "version": "1.0.7", - "license": "MIT" - }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", - "license": "MIT" - }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", @@ -2687,6 +2657,14 @@ "dev": true, "license": "MIT" }, + "node_modules/klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", + "engines": { + "node": ">= 8" + } + }, "node_modules/laravel-vite-plugin": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.0.2.tgz", @@ -2789,31 +2767,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lit": { - "version": "2.8.0", - "license": "BSD-3-Clause", - "dependencies": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/lit-element": { - "version": "3.3.3", - "license": "BSD-3-Clause", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.0", - "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/lit-html": { - "version": "2.8.0", - "license": "BSD-3-Clause", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, "node_modules/lodash": { "version": "4.17.21", "license": "MIT" @@ -3133,10 +3086,6 @@ "node": ">=4" } }, - "node_modules/pako": { - "version": "2.1.0", - "license": "(MIT AND Zlib)" - }, "node_modules/path-key": { "version": "2.0.1", "dev": true, @@ -3488,10 +3437,6 @@ "node": ">=0.10.0" } }, - "node_modules/resize-observer-polyfill": { - "version": "1.5.1", - "license": "MIT" - }, "node_modules/resolve": { "version": "1.22.8", "dev": true, @@ -4335,6 +4280,22 @@ "version": "1.2.4", "license": "MIT" }, + "node_modules/vue3-lottie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/vue3-lottie/-/vue3-lottie-3.3.0.tgz", + "integrity": "sha512-Omv26YN3e78fh0QgQooeZcmPo8O2j5mJ5pacZh1mGdHH9ZTGayWlY1Yp6h+wAvfBKAvJ80JXrSgeBOKA4MRBYA==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "klona": "^2.0.6", + "lottie-web": "5.12.2" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "vue": "^3.2" + } + }, "node_modules/which": { "version": "1.3.1", "dev": true, diff --git a/package.json b/package.json index 846f9deb8..5da524f73 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "vue": "^3.2.47" }, "dependencies": { - "@lottiefiles/lottie-player": "^1.7.1", "@popperjs/core": "^2.11.7", "axios": "^1.6.0", "bootstrap": "^3.4.1", @@ -52,6 +51,7 @@ "vue-masonry": "^0.16.0", "vue-select": "^4.0.0-beta.6", "vue-slider-component": "^4.1.0-beta.7", - "vue3-click-away": "^1.2.4" + "vue3-click-away": "^1.2.4", + "vue3-lottie": "^3.3.0" } } diff --git a/resources/js/app.js b/resources/js/app.js index 0623c736b..25c76a0f7 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -13,7 +13,6 @@ import 'lazysizes' import 'lazysizes/plugins/unveilhooks/ls.unveilhooks' import 'lazysizes/plugins/respimg/ls.respimg' import 'jquery.easing' -import '@lottiefiles/lottie-player' // Components import './components/searchbar' @@ -30,6 +29,7 @@ import FeaturedPieceClickTracker from './components/FeaturedPieceClickTracker.vu import FilterSortBy from './components/filter/SortBy.vue' import FilterCheckbox from './components/filter/Checkbox.vue' import FilterCustomSelect from './components/filter/CustomSelect.vue' +import CatalogNewEmptyAnimation from './components/catalog-new/EmptyAnimation.vue' import CatalogNewItemsFilterController from './components/catalog-new/ItemsFilterController.vue' import CatalogNewNewCustomSelectPopoverLabel from './components/catalog-new/NewCustomSelectPopoverLabel.vue' import CatalogNewNewColorSlider from './components/catalog-new/NewColorSlider.vue' @@ -95,6 +95,7 @@ createApp({ .component('filter-disclosure-controller', CatalogNewDisclosureModalController) .component('toggle-controller', ToggleController) .component('reload-controller', ReloadController) + .component('catalog.empty-animation', CatalogNewEmptyAnimation) .component('catalog.infinite-scroll', CatalogNewInfiniteScroll) .component('catalog.artwork-image-controller', CatalogNewArtworkImageController) .component('catalog.number-formatter', CatalogNewNumberFormatter) diff --git a/resources/js/components/catalog-new/EmptyAnimation.vue b/resources/js/components/catalog-new/EmptyAnimation.vue new file mode 100644 index 000000000..5e8569c8c --- /dev/null +++ b/resources/js/components/catalog-new/EmptyAnimation.vue @@ -0,0 +1,7 @@ + + + diff --git a/resources/js/components/catalog-new/SelectOptions.vue b/resources/js/components/catalog-new/SelectOptions.vue index 864be30f6..95ed6b82c 100644 --- a/resources/js/components/catalog-new/SelectOptions.vue +++ b/resources/js/components/catalog-new/SelectOptions.vue @@ -5,6 +5,7 @@ import { formatAuthorName } from './formatters' import ResetButton from './ResetButton.vue' import Count from './NumberFormatter.vue' +import EmptyAnimation from './EmptyAnimation.vue' const props = defineProps<{ options: { value: string; count: number }[] @@ -86,12 +87,11 @@ const options = computed(() => {
- - - Uuups, nič sme nenašli :( + + {{ $t('item.filter.nothing_found') }}
diff --git a/resources/views/frontend/catalog-new/index.blade.php b/resources/views/frontend/catalog-new/index.blade.php index ce7012627..6057bf15a 100644 --- a/resources/views/frontend/catalog-new/index.blade.php +++ b/resources/views/frontend/catalog-new/index.blade.php @@ -839,9 +839,7 @@ class="tw-flex tw-w-full tw-flex-col tw-items-center tw-justify-center tw-py-40
- - +
{{ utrans('item.filter.nothing_found') }} From 728e8fe0c4a3525c3969b60563b1842cbf7d060a Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Thu, 25 Apr 2024 13:59:41 +0200 Subject: [PATCH 10/15] Remove vue3-click-away as it is no longer needed --- package-lock.json | 5 ----- package.json | 1 - resources/js/app.js | 2 -- 3 files changed, 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c0a87509..21a037676 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,6 @@ "vue-masonry": "^0.16.0", "vue-select": "^4.0.0-beta.6", "vue-slider-component": "^4.1.0-beta.7", - "vue3-click-away": "^1.2.4", "vue3-lottie": "^3.3.0" }, "devDependencies": { @@ -4276,10 +4275,6 @@ "version": "4.1.0-beta.7", "license": "MIT" }, - "node_modules/vue3-click-away": { - "version": "1.2.4", - "license": "MIT" - }, "node_modules/vue3-lottie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/vue3-lottie/-/vue3-lottie-3.3.0.tgz", diff --git a/package.json b/package.json index 5da524f73..7fd3e6b9b 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "vue-masonry": "^0.16.0", "vue-select": "^4.0.0-beta.6", "vue-slider-component": "^4.1.0-beta.7", - "vue3-click-away": "^1.2.4", "vue3-lottie": "^3.3.0" } } diff --git a/resources/js/app.js b/resources/js/app.js index 25c76a0f7..992f10508 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -21,7 +21,6 @@ import './components/clipboard-button' // // Vue import { createApp } from 'vue' import { VueMasonryPlugin } from 'vue-masonry' -import VueClickAway from 'vue3-click-away' import { i18nVue } from 'laravel-vue-i18n' import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.es' @@ -74,7 +73,6 @@ createApp({ }, }) .use(VueMasonryPlugin) - .use(VueClickAway) .use(i18nVue, { resolve: async (lang) => { const langs = import.meta.glob('../../lang/*.json') From 8dba3be5968d71c8abbfa27534f2759529f5bda1 Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Thu, 25 Apr 2024 14:48:11 +0200 Subject: [PATCH 11/15] AuthorSelectOptions --- resources/js/app.js | 2 ++ .../catalog-new/AuthorSelectOptions.vue | 8 +++++++ .../components/catalog-new/SelectOptions.vue | 23 +++++++++++-------- .../frontend/catalog-new/index.blade.php | 17 ++++---------- 4 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 resources/js/components/catalog-new/AuthorSelectOptions.vue diff --git a/resources/js/app.js b/resources/js/app.js index 992f10508..a149614b4 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -28,6 +28,7 @@ import FeaturedPieceClickTracker from './components/FeaturedPieceClickTracker.vu import FilterSortBy from './components/filter/SortBy.vue' import FilterCheckbox from './components/filter/Checkbox.vue' import FilterCustomSelect from './components/filter/CustomSelect.vue' +import CatalogNewAuthorSelectOptions from './components/catalog-new/AuthorSelectOptions.vue' import CatalogNewEmptyAnimation from './components/catalog-new/EmptyAnimation.vue' import CatalogNewItemsFilterController from './components/catalog-new/ItemsFilterController.vue' import CatalogNewNewCustomSelectPopoverLabel from './components/catalog-new/NewCustomSelectPopoverLabel.vue' @@ -93,6 +94,7 @@ createApp({ .component('filter-disclosure-controller', CatalogNewDisclosureModalController) .component('toggle-controller', ToggleController) .component('reload-controller', ReloadController) + .component('catalog.author-select-options', CatalogNewAuthorSelectOptions) .component('catalog.empty-animation', CatalogNewEmptyAnimation) .component('catalog.infinite-scroll', CatalogNewInfiniteScroll) .component('catalog.artwork-image-controller', CatalogNewArtworkImageController) diff --git a/resources/js/components/catalog-new/AuthorSelectOptions.vue b/resources/js/components/catalog-new/AuthorSelectOptions.vue new file mode 100644 index 000000000..e4562678e --- /dev/null +++ b/resources/js/components/catalog-new/AuthorSelectOptions.vue @@ -0,0 +1,8 @@ + + + diff --git a/resources/js/components/catalog-new/SelectOptions.vue b/resources/js/components/catalog-new/SelectOptions.vue index 95ed6b82c..808abe393 100644 --- a/resources/js/components/catalog-new/SelectOptions.vue +++ b/resources/js/components/catalog-new/SelectOptions.vue @@ -1,7 +1,6 @@