diff --git a/.github/workflows/assets_artifact_build.yml b/.github/workflows/assets_artifact_build.yml index c950375b..447f95bf 100644 --- a/.github/workflows/assets_artifact_build.yml +++ b/.github/workflows/assets_artifact_build.yml @@ -60,7 +60,7 @@ jobs: ${{ runner.os }}-yarn- - name: Setup node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: '20' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 66e2f40c..c7c0965b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.2', '8.3', '8.4' ] + php-versions: ['8.2', '8.3', '8.4', '8.5' ] db-type: [ 'mysql', 'sqlite', 'postgres' ] env: @@ -104,7 +104,7 @@ jobs: run: composer install --prefer-dist --no-progress - name: Setup node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: '20' diff --git a/.gitignore b/.gitignore index 76655919..dd5c43db 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ yarn-error.log ###> phpstan/phpstan ### phpstan.neon ###< phpstan/phpstan ### + +.claude/ +CLAUDE.md \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..bc4d0bf3 --- /dev/null +++ b/Makefile @@ -0,0 +1,91 @@ +# PartDB Makefile for Test Environment Management + +.PHONY: help deps-install lint format format-check test coverage pre-commit all test-typecheck \ +test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run test-reset \ +section-dev dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset + +# Default target +help: ## Show this help + @awk 'BEGIN {FS = ":.*##"}; /^[a-zA-Z0-9][a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +# Dependencies +deps-install: ## Install PHP dependencies with unlimited memory + @echo "๐Ÿ“ฆ Installing PHP dependencies..." + COMPOSER_MEMORY_LIMIT=-1 composer install + yarn install + @echo "โœ… Dependencies installed" + +# Complete test environment setup +test-setup: test-clean test-db-create test-db-migrate test-fixtures ## Complete test setup (clean, create DB, migrate, fixtures) + @echo "โœ… Test environment setup complete!" + +# Clean test environment +test-clean: ## Clean test cache and database files + @echo "๐Ÿงน Cleaning test environment..." + rm -rf var/cache/test + rm -f var/app_test.db + @echo "โœ… Test environment cleaned" + +# Create test database +test-db-create: ## Create test database (if not exists) + @echo "๐Ÿ—„๏ธ Creating test database..." + -php bin/console doctrine:database:create --if-not-exists --env test || echo "โš ๏ธ Database creation failed (expected for SQLite) - continuing..." + +# Run database migrations for test environment +test-db-migrate: ## Run database migrations for test environment + @echo "๐Ÿ”„ Running database migrations..." + COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env test + +# Clear test cache +test-cache-clear: ## Clear test cache + @echo "๐Ÿ—‘๏ธ Clearing test cache..." + rm -rf var/cache/test + @echo "โœ… Test cache cleared" + +# Load test fixtures +test-fixtures: ## Load test fixtures + @echo "๐Ÿ“ฆ Loading test fixtures..." + php bin/console partdb:fixtures:load -n --env test + +# Run PHPUnit tests +test-run: ## Run PHPUnit tests + @echo "๐Ÿงช Running tests..." + php bin/phpunit + +# Quick test reset (clean + migrate + fixtures, skip DB creation) +test-reset: test-cache-clear test-db-migrate test-fixtures + @echo "โœ… Test environment reset complete!" + +test-typecheck: ## Run static analysis (PHPStan) + @echo "๐Ÿงช Running type checks..." + COMPOSER_MEMORY_LIMIT=-1 composer phpstan + +# Development helpers +dev-setup: dev-clean dev-db-create dev-db-migrate dev-warmup ## Complete development setup (clean, create DB, migrate, warmup) + @echo "โœ… Development environment setup complete!" + +dev-clean: ## Clean development cache and database files + @echo "๐Ÿงน Cleaning development environment..." + rm -rf var/cache/dev + rm -f var/app_dev.db + @echo "โœ… Development environment cleaned" + +dev-db-create: ## Create development database (if not exists) + @echo "๐Ÿ—„๏ธ Creating development database..." + -php bin/console doctrine:database:create --if-not-exists --env dev || echo "โš ๏ธ Database creation failed (expected for SQLite) - continuing..." + +dev-db-migrate: ## Run database migrations for development environment + @echo "๐Ÿ”„ Running database migrations..." + COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env dev + +dev-cache-clear: ## Clear development cache + @echo "๐Ÿ—‘๏ธ Clearing development cache..." + rm -rf var/cache/dev + @echo "โœ… Development cache cleared" + +dev-warmup: ## Warm up development cache + @echo "๐Ÿ”ฅ Warming up development cache..." + COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=1G bin/console cache:warmup --env dev -n + +dev-reset: dev-cache-clear dev-db-migrate ## Quick development reset (cache clear + migrate) + @echo "โœ… Development environment reset complete!" \ No newline at end of file diff --git a/VERSION b/VERSION index eca07e4c..ccbccc3d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.2 +2.2.0 diff --git a/assets/controllers/bulk_import_controller.js b/assets/controllers/bulk_import_controller.js new file mode 100644 index 00000000..49e4d60f --- /dev/null +++ b/assets/controllers/bulk_import_controller.js @@ -0,0 +1,359 @@ +import { Controller } from "@hotwired/stimulus" +import { generateCsrfHeaders } from "./csrf_protection_controller" + +export default class extends Controller { + static targets = ["progressBar", "progressText"] + static values = { + jobId: Number, + partId: Number, + researchUrl: String, + researchAllUrl: String, + markCompletedUrl: String, + markSkippedUrl: String, + markPendingUrl: String + } + + connect() { + // Auto-refresh progress if job is in progress + if (this.hasProgressBarTarget) { + this.startProgressUpdates() + } + + // Restore scroll position after page reload (if any) + this.restoreScrollPosition() + } + + getHeaders() { + const headers = { + 'Content-Type': 'application/json', + 'X-Requested-With': 'XMLHttpRequest' + } + + // Add CSRF headers if available + const form = document.querySelector('form') + if (form) { + const csrfHeaders = generateCsrfHeaders(form) + Object.assign(headers, csrfHeaders) + } + + return headers + } + + async fetchWithErrorHandling(url, options = {}, timeout = 30000) { + const controller = new AbortController() + const timeoutId = setTimeout(() => controller.abort(), timeout) + + try { + const response = await fetch(url, { + ...options, + headers: { ...this.getHeaders(), ...options.headers }, + signal: controller.signal + }) + + clearTimeout(timeoutId) + + if (!response.ok) { + const errorText = await response.text() + throw new Error(`Server error (${response.status}): ${errorText}`) + } + + return await response.json() + } catch (error) { + clearTimeout(timeoutId) + + if (error.name === 'AbortError') { + throw new Error('Request timed out. Please try again.') + } else if (error.message.includes('Failed to fetch')) { + throw new Error('Network error. Please check your connection and try again.') + } else { + throw error + } + } + } + + disconnect() { + if (this.progressInterval) { + clearInterval(this.progressInterval) + } + } + + startProgressUpdates() { + // Progress updates are handled via page reload for better reliability + // No need for periodic updates since state changes trigger page refresh + } + + restoreScrollPosition() { + const savedPosition = sessionStorage.getItem('bulkImportScrollPosition') + if (savedPosition) { + // Restore scroll position after a small delay to ensure page is fully loaded + setTimeout(() => { + window.scrollTo(0, parseInt(savedPosition)) + // Clear the saved position so it doesn't interfere with normal navigation + sessionStorage.removeItem('bulkImportScrollPosition') + }, 100) + } + } + + async markCompleted(event) { + const partId = event.currentTarget.dataset.partId + + try { + const url = this.markCompletedUrlValue.replace('__PART_ID__', partId) + const data = await this.fetchWithErrorHandling(url, { method: 'POST' }) + + if (data.success) { + this.updateProgressDisplay(data) + this.markRowAsCompleted(partId) + + if (data.job_completed) { + this.showJobCompletedMessage() + } + } else { + this.showErrorMessage(data.error || 'Failed to mark part as completed') + } + } catch (error) { + console.error('Error marking part as completed:', error) + this.showErrorMessage(error.message || 'Failed to mark part as completed') + } + } + + async markSkipped(event) { + const partId = event.currentTarget.dataset.partId + const reason = prompt('Reason for skipping (optional):') || '' + + try { + const url = this.markSkippedUrlValue.replace('__PART_ID__', partId) + const data = await this.fetchWithErrorHandling(url, { + method: 'POST', + body: JSON.stringify({ reason }) + }) + + if (data.success) { + this.updateProgressDisplay(data) + this.markRowAsSkipped(partId) + } else { + this.showErrorMessage(data.error || 'Failed to mark part as skipped') + } + } catch (error) { + console.error('Error marking part as skipped:', error) + this.showErrorMessage(error.message || 'Failed to mark part as skipped') + } + } + + async markPending(event) { + const partId = event.currentTarget.dataset.partId + + try { + const url = this.markPendingUrlValue.replace('__PART_ID__', partId) + const data = await this.fetchWithErrorHandling(url, { method: 'POST' }) + + if (data.success) { + this.updateProgressDisplay(data) + this.markRowAsPending(partId) + } else { + this.showErrorMessage(data.error || 'Failed to mark part as pending') + } + } catch (error) { + console.error('Error marking part as pending:', error) + this.showErrorMessage(error.message || 'Failed to mark part as pending') + } + } + + updateProgressDisplay(data) { + if (this.hasProgressBarTarget) { + this.progressBarTarget.style.width = `${data.progress}%` + this.progressBarTarget.setAttribute('aria-valuenow', data.progress) + } + + if (this.hasProgressTextTarget) { + this.progressTextTarget.textContent = `${data.completed_count} / ${data.total_count} completed` + } + } + + markRowAsCompleted(partId) { + // Save scroll position and refresh page to show updated state + sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString()) + window.location.reload() + } + + markRowAsSkipped(partId) { + // Save scroll position and refresh page to show updated state + sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString()) + window.location.reload() + } + + markRowAsPending(partId) { + // Save scroll position and refresh page to show updated state + sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString()) + window.location.reload() + } + + showJobCompletedMessage() { + const alert = document.createElement('div') + alert.className = 'alert alert-success alert-dismissible fade show' + alert.innerHTML = ` + + Job completed! All parts have been processed. + + ` + + const container = document.querySelector('.card-body') + container.insertBefore(alert, container.firstChild) + } + + async researchPart(event) { + event.preventDefault() + event.stopPropagation() + + const partId = event.currentTarget.dataset.partId + const spinner = event.currentTarget.querySelector(`[data-research-spinner="${partId}"]`) + const button = event.currentTarget + + // Show loading state + if (spinner) { + spinner.style.display = 'inline-block' + } + button.disabled = true + + try { + const url = this.researchUrlValue.replace('__PART_ID__', partId) + const controller = new AbortController() + const timeoutId = setTimeout(() => controller.abort(), 30000) // 30 second timeout + + const response = await fetch(url, { + method: 'POST', + headers: this.getHeaders(), + signal: controller.signal + }) + + clearTimeout(timeoutId) + + if (!response.ok) { + const errorText = await response.text() + throw new Error(`Server error (${response.status}): ${errorText}`) + } + + const data = await response.json() + + if (data.success) { + this.showSuccessMessage(`Research completed for part. Found ${data.results_count} results.`) + // Save scroll position and reload to show updated results + sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString()) + window.location.reload() + } else { + this.showErrorMessage(data.error || 'Research failed') + } + } catch (error) { + console.error('Error researching part:', error) + + if (error.name === 'AbortError') { + this.showErrorMessage('Research timed out. Please try again.') + } else if (error.message.includes('Failed to fetch')) { + this.showErrorMessage('Network error. Please check your connection and try again.') + } else { + this.showErrorMessage(error.message || 'Research failed due to an unexpected error') + } + } finally { + // Hide loading state + if (spinner) { + spinner.style.display = 'none' + } + button.disabled = false + } + } + + async researchAllParts(event) { + event.preventDefault() + event.stopPropagation() + + const spinner = document.getElementById('research-all-spinner') + const button = event.currentTarget + + // Show loading state + if (spinner) { + spinner.style.display = 'inline-block' + } + button.disabled = true + + try { + const controller = new AbortController() + const timeoutId = setTimeout(() => controller.abort(), 120000) // 2 minute timeout for bulk operations + + const response = await fetch(this.researchAllUrlValue, { + method: 'POST', + headers: this.getHeaders(), + signal: controller.signal + }) + + clearTimeout(timeoutId) + + if (!response.ok) { + const errorText = await response.text() + throw new Error(`Server error (${response.status}): ${errorText}`) + } + + const data = await response.json() + + if (data.success) { + this.showSuccessMessage(`Research completed for ${data.researched_count} parts.`) + // Save scroll position and reload to show updated results + sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString()) + window.location.reload() + } else { + this.showErrorMessage(data.error || 'Bulk research failed') + } + } catch (error) { + console.error('Error researching all parts:', error) + + if (error.name === 'AbortError') { + this.showErrorMessage('Bulk research timed out. This may happen with large batches. Please try again or process smaller batches.') + } else if (error.message.includes('Failed to fetch')) { + this.showErrorMessage('Network error. Please check your connection and try again.') + } else { + this.showErrorMessage(error.message || 'Bulk research failed due to an unexpected error') + } + } finally { + // Hide loading state + if (spinner) { + spinner.style.display = 'none' + } + button.disabled = false + } + } + + showSuccessMessage(message) { + this.showToast('success', message) + } + + showErrorMessage(message) { + this.showToast('error', message) + } + + showToast(type, message) { + // Create a simple alert that doesn't disrupt layout + const alertId = 'alert-' + Date.now() + const iconClass = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-triangle' + const alertClass = type === 'success' ? 'alert-success' : 'alert-danger' + + const alertHTML = ` +
+ + ${message} + +
+ ` + + // Add alert to body + document.body.insertAdjacentHTML('beforeend', alertHTML) + + // Auto-remove after 5 seconds + setTimeout(() => { + const alertElement = document.getElementById(alertId) + if (alertElement) { + alertElement.remove() + } + }, 5000) + } +} \ No newline at end of file diff --git a/assets/controllers/bulk_job_manage_controller.js b/assets/controllers/bulk_job_manage_controller.js new file mode 100644 index 00000000..c26e37c6 --- /dev/null +++ b/assets/controllers/bulk_job_manage_controller.js @@ -0,0 +1,92 @@ +import { Controller } from "@hotwired/stimulus" +import { generateCsrfHeaders } from "./csrf_protection_controller" + +export default class extends Controller { + static values = { + deleteUrl: String, + stopUrl: String, + deleteConfirmMessage: String, + stopConfirmMessage: String + } + + connect() { + // Controller initialized + } + getHeaders() { + const headers = { + 'X-Requested-With': 'XMLHttpRequest' + } + + // Add CSRF headers if available + const form = document.querySelector('form') + if (form) { + const csrfHeaders = generateCsrfHeaders(form) + Object.assign(headers, csrfHeaders) + } + + return headers + } + async deleteJob(event) { + const jobId = event.currentTarget.dataset.jobId + const confirmMessage = this.deleteConfirmMessageValue || 'Are you sure you want to delete this job?' + + if (confirm(confirmMessage)) { + try { + const deleteUrl = this.deleteUrlValue.replace('__JOB_ID__', jobId) + + const response = await fetch(deleteUrl, { + method: 'DELETE', + headers: this.getHeaders() + }) + + if (!response.ok) { + const errorText = await response.text() + throw new Error(`HTTP ${response.status}: ${errorText}`) + } + + const data = await response.json() + + if (data.success) { + location.reload() + } else { + alert('Error deleting job: ' + (data.error || 'Unknown error')) + } + } catch (error) { + console.error('Error deleting job:', error) + alert('Error deleting job: ' + error.message) + } + } + } + + async stopJob(event) { + const jobId = event.currentTarget.dataset.jobId + const confirmMessage = this.stopConfirmMessageValue || 'Are you sure you want to stop this job?' + + if (confirm(confirmMessage)) { + try { + const stopUrl = this.stopUrlValue.replace('__JOB_ID__', jobId) + + const response = await fetch(stopUrl, { + method: 'POST', + headers: this.getHeaders() + }) + + if (!response.ok) { + const errorText = await response.text() + throw new Error(`HTTP ${response.status}: ${errorText}`) + } + + const data = await response.json() + + if (data.success) { + location.reload() + } else { + alert('Error stopping job: ' + (data.error || 'Unknown error')) + } + } catch (error) { + console.error('Error stopping job:', error) + alert('Error stopping job: ' + error.message) + } + } + } +} \ No newline at end of file diff --git a/assets/controllers/field_mapping_controller.js b/assets/controllers/field_mapping_controller.js new file mode 100644 index 00000000..9c9c8ac6 --- /dev/null +++ b/assets/controllers/field_mapping_controller.js @@ -0,0 +1,136 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + static targets = ["tbody", "addButton", "submitButton"] + static values = { + mappingIndex: Number, + maxMappings: Number, + prototype: String, + maxMappingsReachedMessage: String + } + + connect() { + this.updateAddButtonState() + this.updateFieldOptions() + this.attachEventListeners() + } + + attachEventListeners() { + // Add event listeners to existing field selects + const fieldSelects = this.tbodyTarget.querySelectorAll('select[name*="[field]"]') + fieldSelects.forEach(select => { + select.addEventListener('change', this.updateFieldOptions.bind(this)) + }) + + // Note: Add button click is handled by Stimulus action in template (data-action="click->field-mapping#addMapping") + // No manual event listener needed + + // Form submit handler + const form = this.element.querySelector('form') + if (form && this.hasSubmitButtonTarget) { + form.addEventListener('submit', this.handleFormSubmit.bind(this)) + } + } + + addMapping() { + const currentMappings = this.tbodyTarget.querySelectorAll('.mapping-row').length + + if (currentMappings >= this.maxMappingsValue) { + alert(this.maxMappingsReachedMessageValue) + return + } + + const newRowHtml = this.prototypeValue.replace(/__name__/g, this.mappingIndexValue) + const tempDiv = document.createElement('div') + tempDiv.innerHTML = newRowHtml + + const fieldWidget = tempDiv.querySelector('select[name*="[field]"]') || tempDiv.children[0] + const providerWidget = tempDiv.querySelector('select[name*="[providers]"]') || tempDiv.children[1] + const priorityWidget = tempDiv.querySelector('input[name*="[priority]"]') || tempDiv.children[2] + + const newRow = document.createElement('tr') + newRow.className = 'mapping-row' + newRow.innerHTML = ` + ${fieldWidget ? fieldWidget.outerHTML : ''} + ${providerWidget ? providerWidget.outerHTML : ''} + ${priorityWidget ? priorityWidget.outerHTML : ''} + + + + ` + + this.tbodyTarget.appendChild(newRow) + this.mappingIndexValue++ + + const newFieldSelect = newRow.querySelector('select[name*="[field]"]') + if (newFieldSelect) { + newFieldSelect.value = '' + newFieldSelect.addEventListener('change', this.updateFieldOptions.bind(this)) + } + + this.updateFieldOptions() + this.updateAddButtonState() + } + + removeMapping(event) { + const row = event.target.closest('tr') + row.remove() + this.updateFieldOptions() + this.updateAddButtonState() + } + + updateFieldOptions() { + const fieldSelects = this.tbodyTarget.querySelectorAll('select[name*="[field]"]') + + const selectedFields = Array.from(fieldSelects) + .map(select => select.value) + .filter(value => value && value !== '') + + fieldSelects.forEach(select => { + Array.from(select.options).forEach(option => { + const isCurrentValue = option.value === select.value + const isEmptyOption = !option.value || option.value === '' + const isAlreadySelected = selectedFields.includes(option.value) + + if (!isEmptyOption && isAlreadySelected && !isCurrentValue) { + option.disabled = true + option.style.display = 'none' + } else { + option.disabled = false + option.style.display = '' + } + }) + }) + } + + updateAddButtonState() { + const currentMappings = this.tbodyTarget.querySelectorAll('.mapping-row').length + + if (this.hasAddButtonTarget) { + if (currentMappings >= this.maxMappingsValue) { + this.addButtonTarget.disabled = true + this.addButtonTarget.title = this.maxMappingsReachedMessageValue + } else { + this.addButtonTarget.disabled = false + this.addButtonTarget.title = '' + } + } + } + + handleFormSubmit(event) { + if (this.hasSubmitButtonTarget) { + this.submitButtonTarget.disabled = true + + // Disable the entire form to prevent changes during processing + const form = event.target + const formElements = form.querySelectorAll('input, select, textarea, button') + formElements.forEach(element => { + if (element !== this.submitButtonTarget) { + element.disabled = true + } + }) + } + } +} \ No newline at end of file diff --git a/assets/css/app/tables.css b/assets/css/app/tables.css index 8d4b200c..b2d8882c 100644 --- a/assets/css/app/tables.css +++ b/assets/css/app/tables.css @@ -94,6 +94,11 @@ th.select-checkbox { display: inline-flex; } +/** Add spacing between column visibility button and length menu */ +.buttons-colvis { + margin-right: 0.2em !important; +} + /** Fix datatables select-checkbox position */ table.dataTable tr.selected td.select-checkbox:after { diff --git a/composer.json b/composer.json index 80b413f8..9f335f94 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,6 @@ "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "^3.2.0", "dompdf/dompdf": "^v3.0.0", - "part-db/swap-bundle": "^6.0.0", "gregwar/captcha-bundle": "^2.1.0", "hshn/base64-encoded-file": "^5.0", "jbtronics/2fa-webauthn": "^3.0.0", @@ -37,6 +36,7 @@ "league/csv": "^9.8.0", "league/html-to-markdown": "^5.0.1", "liip/imagine-bundle": "^2.2", + "maennchen/zipstream-php": "2.1", "nbgrp/onelogin-saml-bundle": "^v2.0.2", "nelexa/zip": "^4.0", "nelmio/cors-bundle": "^2.3", @@ -45,6 +45,8 @@ "omines/datatables-bundle": "^0.10.0", "paragonie/sodium_compat": "^1.21", "part-db/label-fonts": "^1.0", + "part-db/swap-bundle": "^6.0.0", + "phpoffice/phpspreadsheet": "^5.0.0", "rhukster/dom-sanitizer": "^1.0", "runtime/frankenphp-symfony": "^0.2.0", "s9e/text-formatter": "^2.1", @@ -157,7 +159,7 @@ "post-update-cmd": [ "@auto-scripts" ], - "phpstan": "vendor/bin/phpstan analyse src --level 5 --memory-limit 1G" + "phpstan": "php -d memory_limit=1G vendor/bin/phpstan analyse src --level 5" }, "conflict": { "symfony/symfony": "*" diff --git a/composer.lock b/composer.lock index 1f67b80f..1970868e 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": "fe6dfc229f551945cfa6be8ca26a437e", + "content-hash": "10fd1b276a868a4f195721ac5fcd82de", "packages": [ { "name": "amphp/amp", @@ -968,16 +968,16 @@ }, { "name": "api-platform/doctrine-common", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/doctrine-common.git", - "reference": "e0ef3f5d1c4a9d023da519ea120a1d7732e0b1a7" + "reference": "8acbed7c2768f7c15a5b030018132e454f895e55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/doctrine-common/zipball/e0ef3f5d1c4a9d023da519ea120a1d7732e0b1a7", - "reference": "e0ef3f5d1c4a9d023da519ea120a1d7732e0b1a7", + "url": "https://api.github.com/repos/api-platform/doctrine-common/zipball/8acbed7c2768f7c15a5b030018132e454f895e55", + "reference": "8acbed7c2768f7c15a5b030018132e454f895e55", "shasum": "" }, "require": { @@ -995,7 +995,8 @@ "doctrine/mongodb-odm": "^2.10", "doctrine/orm": "^2.17 || ^3.0", "phpspec/prophecy-phpunit": "^2.2", - "phpunit/phpunit": "11.5.x-dev" + "phpunit/phpunit": "11.5.x-dev", + "symfony/type-info": "^7.3" }, "suggest": { "api-platform/graphql": "For GraphQl mercure subscriptions.", @@ -1017,7 +1018,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1050,31 +1052,31 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/doctrine-common/tree/v4.1.23" + "source": "https://github.com/api-platform/doctrine-common/tree/v4.2.0" }, - "time": "2025-08-18T13:30:43+00:00" + "time": "2025-08-27T12:34:14+00:00" }, { "name": "api-platform/doctrine-orm", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/doctrine-orm.git", - "reference": "61a199da6f6014dba2da43ea1a66b2c9dda27263" + "reference": "23b0de35bb7d2903854c6ee3ac300b7f5056c12b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/doctrine-orm/zipball/61a199da6f6014dba2da43ea1a66b2c9dda27263", - "reference": "61a199da6f6014dba2da43ea1a66b2c9dda27263", + "url": "https://api.github.com/repos/api-platform/doctrine-orm/zipball/23b0de35bb7d2903854c6ee3ac300b7f5056c12b", + "reference": "23b0de35bb7d2903854c6ee3ac300b7f5056c12b", "shasum": "" }, "require": { - "api-platform/doctrine-common": "^4.1.11", + "api-platform/doctrine-common": "^4.2.0-alpha.3@alpha", "api-platform/metadata": "^4.1.11", "api-platform/state": "^4.1.11", "doctrine/orm": "^2.17 || ^3.0", "php": ">=8.2", - "symfony/property-info": "^6.4 || ^7.1" + "symfony/type-info": "^7.3" }, "require-dev": { "doctrine/doctrine-bundle": "^2.11", @@ -1085,6 +1087,7 @@ "symfony/cache": "^6.4 || ^7.0", "symfony/framework-bundle": "^6.4 || ^7.0", "symfony/property-access": "^6.4 || ^7.0", + "symfony/property-info": "^6.4 || ^7.1", "symfony/serializer": "^6.4 || ^7.0", "symfony/uid": "^6.4 || ^7.0", "symfony/validator": "^6.4 || ^7.0", @@ -1102,7 +1105,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1135,22 +1139,22 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/doctrine-orm/tree/v4.1.23" + "source": "https://github.com/api-platform/doctrine-orm/tree/v4.2.0" }, - "time": "2025-06-06T14:56:47+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/documentation", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/documentation.git", - "reference": "1a0ac988d659008ef8667d05bc9978863026bab8" + "reference": "c5a54336d8c51271aa5d54e57147cdee7162ab3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/documentation/zipball/1a0ac988d659008ef8667d05bc9978863026bab8", - "reference": "1a0ac988d659008ef8667d05bc9978863026bab8", + "url": "https://api.github.com/repos/api-platform/documentation/zipball/c5a54336d8c51271aa5d54e57147cdee7162ab3a", + "reference": "c5a54336d8c51271aa5d54e57147cdee7162ab3a", "shasum": "" }, "require": { @@ -1172,7 +1176,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1197,22 +1202,22 @@ ], "description": "API Platform documentation controller.", "support": { - "source": "https://github.com/api-platform/documentation/tree/v4.2.0-alpha.1" + "source": "https://github.com/api-platform/documentation/tree/v4.2.0" }, - "time": "2025-06-06T14:56:47+00:00" + "time": "2025-08-19T08:04:29+00:00" }, { "name": "api-platform/http-cache", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/http-cache.git", - "reference": "f65f092c90311a87ebb6dda87db3ca08b57c10d6" + "reference": "aef434b026b861ea451d814c86838b5470b8bfb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/http-cache/zipball/f65f092c90311a87ebb6dda87db3ca08b57c10d6", - "reference": "f65f092c90311a87ebb6dda87db3ca08b57c10d6", + "url": "https://api.github.com/repos/api-platform/http-cache/zipball/aef434b026b861ea451d814c86838b5470b8bfb4", + "reference": "aef434b026b861ea451d814c86838b5470b8bfb4", "shasum": "" }, "require": { @@ -1226,7 +1231,8 @@ "phpspec/prophecy-phpunit": "^2.2", "phpunit/phpunit": "11.5.x-dev", "symfony/dependency-injection": "^6.4 || ^7.0", - "symfony/http-client": "^6.4 || ^7.0" + "symfony/http-client": "^6.4 || ^7.0", + "symfony/type-info": "^7.3" }, "type": "library", "extra": { @@ -1240,7 +1246,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1275,32 +1282,33 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/http-cache/tree/v4.1.23" + "source": "https://github.com/api-platform/http-cache/tree/v4.2.0" }, - "time": "2025-06-06T14:56:47+00:00" + "time": "2025-09-16T12:51:08+00:00" }, { "name": "api-platform/hydra", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/hydra.git", - "reference": "8c75b814af143c95ffc1857565169ff5b6f1b421" + "reference": "5061103e7a5f019097993e6370232c46e24b9b42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/hydra/zipball/8c75b814af143c95ffc1857565169ff5b6f1b421", - "reference": "8c75b814af143c95ffc1857565169ff5b6f1b421", + "url": "https://api.github.com/repos/api-platform/hydra/zipball/5061103e7a5f019097993e6370232c46e24b9b42", + "reference": "5061103e7a5f019097993e6370232c46e24b9b42", "shasum": "" }, "require": { - "api-platform/documentation": "^4.1.11", - "api-platform/json-schema": "^4.1.11", - "api-platform/jsonld": "^4.1.11", - "api-platform/metadata": "^4.1.11", - "api-platform/serializer": "^4.1.11", - "api-platform/state": "^4.1.11", + "api-platform/documentation": "^4.1", + "api-platform/json-schema": "^4.2@beta", + "api-platform/jsonld": "^4.1", + "api-platform/metadata": "^4.2@beta", + "api-platform/serializer": "^4.1", + "api-platform/state": "^4.1.8", "php": ">=8.2", + "symfony/type-info": "^7.3", "symfony/web-link": "^6.4 || ^7.1" }, "require-dev": { @@ -1323,7 +1331,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1360,38 +1369,40 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/hydra/tree/v4.1.23" + "source": "https://github.com/api-platform/hydra/tree/v4.2.0" }, - "time": "2025-07-15T14:10:59+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/json-api", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/json-api.git", - "reference": "7ea9bbe5f801f58b3f78730f6e6cd4b168b450d4" + "reference": "e8da698d55fb1702b25c63d7c821d1760159912e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/json-api/zipball/7ea9bbe5f801f58b3f78730f6e6cd4b168b450d4", - "reference": "7ea9bbe5f801f58b3f78730f6e6cd4b168b450d4", + "url": "https://api.github.com/repos/api-platform/json-api/zipball/e8da698d55fb1702b25c63d7c821d1760159912e", + "reference": "e8da698d55fb1702b25c63d7c821d1760159912e", "shasum": "" }, "require": { "api-platform/documentation": "^4.1.11", - "api-platform/json-schema": "^4.1.11", - "api-platform/metadata": "^4.1.11", + "api-platform/json-schema": "^4.2@beta", + "api-platform/metadata": "^4.2@beta", "api-platform/serializer": "^4.1.11", "api-platform/state": "^4.1.11", "php": ">=8.2", "symfony/error-handler": "^6.4 || ^7.0", - "symfony/http-foundation": "^6.4 || ^7.0" + "symfony/http-foundation": "^6.4 || ^7.0", + "symfony/type-info": "^7.3" }, "require-dev": { "phpspec/prophecy": "^1.19", "phpspec/prophecy-phpunit": "^2.2", - "phpunit/phpunit": "11.5.x-dev" + "phpunit/phpunit": "11.5.x-dev", + "symfony/type-info": "^7.3" }, "type": "library", "extra": { @@ -1405,7 +1416,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1439,30 +1451,31 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/json-api/tree/v4.1.23" + "source": "https://github.com/api-platform/json-api/tree/v4.2.0" }, - "time": "2025-08-06T07:56:58+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/json-schema", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/json-schema.git", - "reference": "1d1c6eaa4841f3989e2bec4cdf8167fb0ca42a8f" + "reference": "e25a8d95b3958abdbe07055833bd69f5f3ed4aeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/json-schema/zipball/1d1c6eaa4841f3989e2bec4cdf8167fb0ca42a8f", - "reference": "1d1c6eaa4841f3989e2bec4cdf8167fb0ca42a8f", + "url": "https://api.github.com/repos/api-platform/json-schema/zipball/e25a8d95b3958abdbe07055833bd69f5f3ed4aeb", + "reference": "e25a8d95b3958abdbe07055833bd69f5f3ed4aeb", "shasum": "" }, "require": { - "api-platform/metadata": "^4.1.11", + "api-platform/metadata": "^4.2@beta", "php": ">=8.2", "symfony/console": "^6.4 || ^7.0", "symfony/property-info": "^6.4 || ^7.1", "symfony/serializer": "^6.4 || ^7.0", + "symfony/type-info": "^7.3", "symfony/uid": "^6.4 || ^7.0" }, "require-dev": { @@ -1481,7 +1494,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1518,22 +1532,22 @@ "swagger" ], "support": { - "source": "https://github.com/api-platform/json-schema/tree/v4.1.23" + "source": "https://github.com/api-platform/json-schema/tree/v4.2.0" }, - "time": "2025-06-29T12:24:14+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/jsonld", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/jsonld.git", - "reference": "e122bf1f04f895e80e6469e0f09d1f06f7508ca6" + "reference": "0f4c79c1f57680cbbcaaf7219e4e0aa2865a2c51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/jsonld/zipball/e122bf1f04f895e80e6469e0f09d1f06f7508ca6", - "reference": "e122bf1f04f895e80e6469e0f09d1f06f7508ca6", + "url": "https://api.github.com/repos/api-platform/jsonld/zipball/0f4c79c1f57680cbbcaaf7219e4e0aa2865a2c51", + "reference": "0f4c79c1f57680cbbcaaf7219e4e0aa2865a2c51", "shasum": "" }, "require": { @@ -1543,7 +1557,8 @@ "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "11.5.x-dev" + "phpunit/phpunit": "11.5.x-dev", + "symfony/type-info": "^7.3" }, "type": "library", "extra": { @@ -1557,7 +1572,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1596,22 +1612,22 @@ "rest" ], "support": { - "source": "https://github.com/api-platform/jsonld/tree/v4.1.23" + "source": "https://github.com/api-platform/jsonld/tree/v4.2.0" }, - "time": "2025-07-25T10:05:30+00:00" + "time": "2025-09-09T12:23:22+00:00" }, { "name": "api-platform/metadata", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/metadata.git", - "reference": "58b25f9a82c12727afab09b5a311828aacff8e88" + "reference": "71db1e169d3c0b28d1d3eab5b572720285ad1a6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/metadata/zipball/58b25f9a82c12727afab09b5a311828aacff8e88", - "reference": "58b25f9a82c12727afab09b5a311828aacff8e88", + "url": "https://api.github.com/repos/api-platform/metadata/zipball/71db1e169d3c0b28d1d3eab5b572720285ad1a6c", + "reference": "71db1e169d3c0b28d1d3eab5b572720285ad1a6c", "shasum": "" }, "require": { @@ -1653,7 +1669,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1693,40 +1710,42 @@ "swagger" ], "support": { - "source": "https://github.com/api-platform/metadata/tree/v4.1.23" + "source": "https://github.com/api-platform/metadata/tree/v4.2.0" }, - "time": "2025-09-05T09:06:52+00:00" + "time": "2025-09-15T12:27:38+00:00" }, { "name": "api-platform/openapi", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/openapi.git", - "reference": "793b53e51a5c24076d4024b6aa77de29e74015cd" + "reference": "8e400e24ef695f17dbeeaeb60442707ba9c1dbd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/openapi/zipball/793b53e51a5c24076d4024b6aa77de29e74015cd", - "reference": "793b53e51a5c24076d4024b6aa77de29e74015cd", + "url": "https://api.github.com/repos/api-platform/openapi/zipball/8e400e24ef695f17dbeeaeb60442707ba9c1dbd1", + "reference": "8e400e24ef695f17dbeeaeb60442707ba9c1dbd1", "shasum": "" }, "require": { - "api-platform/json-schema": "^4.1.11", - "api-platform/metadata": "^4.1.11", - "api-platform/state": "^4.1.11", + "api-platform/json-schema": "^4.2@beta", + "api-platform/metadata": "^4.2@beta", + "api-platform/state": "^4.2@beta", "php": ">=8.2", "symfony/console": "^6.4 || ^7.0", "symfony/filesystem": "^6.4 || ^7.0", "symfony/property-access": "^6.4 || ^7.0", - "symfony/serializer": "^6.4 || ^7.0" + "symfony/serializer": "^6.4 || ^7.0", + "symfony/type-info": "^7.3" }, "require-dev": { "api-platform/doctrine-common": "^4.1", "api-platform/doctrine-odm": "^4.1", "api-platform/doctrine-orm": "^4.1", "phpspec/prophecy-phpunit": "^2.2", - "phpunit/phpunit": "11.5.x-dev" + "phpunit/phpunit": "11.5.x-dev", + "symfony/type-info": "^7.3" }, "type": "library", "extra": { @@ -1740,7 +1759,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1780,26 +1800,26 @@ "swagger" ], "support": { - "source": "https://github.com/api-platform/openapi/tree/v4.1.23" + "source": "https://github.com/api-platform/openapi/tree/v4.2.0" }, - "time": "2025-07-29T08:53:27+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/serializer", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/serializer.git", - "reference": "70dbdeac9584870be444d78c1a796b6edb9e46a5" + "reference": "8c94416556df14fd20203975d000c0213a308e2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/serializer/zipball/70dbdeac9584870be444d78c1a796b6edb9e46a5", - "reference": "70dbdeac9584870be444d78c1a796b6edb9e46a5", + "url": "https://api.github.com/repos/api-platform/serializer/zipball/8c94416556df14fd20203975d000c0213a308e2d", + "reference": "8c94416556df14fd20203975d000c0213a308e2d", "shasum": "" }, "require": { - "api-platform/metadata": "^4.1.11", + "api-platform/metadata": "^4.1.16", "api-platform/state": "^4.1.11", "php": ">=8.2", "symfony/property-access": "^6.4 || ^7.0", @@ -1817,6 +1837,7 @@ "phpspec/prophecy-phpunit": "^2.2", "phpunit/phpunit": "11.5.x-dev", "symfony/mercure-bundle": "*", + "symfony/type-info": "^7.3", "symfony/var-dumper": "^6.4 || ^7.0", "symfony/yaml": "^6.4 || ^7.0" }, @@ -1836,7 +1857,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1871,22 +1893,22 @@ "serializer" ], "support": { - "source": "https://github.com/api-platform/serializer/tree/v4.1.23" + "source": "https://github.com/api-platform/serializer/tree/v4.2.0" }, - "time": "2025-08-29T15:13:26+00:00" + "time": "2025-09-15T13:20:40+00:00" }, { "name": "api-platform/state", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/state.git", - "reference": "056b07285cdc904984fb44c2614f7df8f4620a95" + "reference": "439b0c542e4c2e921f909f2f2e01d077ed0248f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/state/zipball/056b07285cdc904984fb44c2614f7df8f4620a95", - "reference": "056b07285cdc904984fb44c2614f7df8f4620a95", + "url": "https://api.github.com/repos/api-platform/state/zipball/439b0c542e4c2e921f909f2f2e01d077ed0248f4", + "reference": "439b0c542e4c2e921f909f2f2e01d077ed0248f4", "shasum": "" }, "require": { @@ -1898,9 +1920,11 @@ "symfony/translation-contracts": "^3.0" }, "require-dev": { + "api-platform/serializer": "^4.1", "api-platform/validator": "^4.1", "phpunit/phpunit": "11.5.x-dev", "symfony/http-foundation": "^6.4 || ^7.0", + "symfony/type-info": "^7.3", "symfony/web-link": "^6.4 || ^7.1", "willdurand/negotiation": "^3.1" }, @@ -1923,7 +1947,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -1963,22 +1988,22 @@ "swagger" ], "support": { - "source": "https://github.com/api-platform/state/tree/v4.1.23" + "source": "https://github.com/api-platform/state/tree/v4.2.0" }, - "time": "2025-07-16T14:01:52+00:00" + "time": "2025-09-17T08:54:53+00:00" }, { "name": "api-platform/symfony", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/symfony.git", - "reference": "e35839489b4e76ffc5fc2b0cbadbbaece75b9ad1" + "reference": "c3fa7d2176bd9c36e2961d88c4a69a5a7e948b83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/symfony/zipball/e35839489b4e76ffc5fc2b0cbadbbaece75b9ad1", - "reference": "e35839489b4e76ffc5fc2b0cbadbbaece75b9ad1", + "url": "https://api.github.com/repos/api-platform/symfony/zipball/c3fa7d2176bd9c36e2961d88c4a69a5a7e948b83", + "reference": "c3fa7d2176bd9c36e2961d88c4a69a5a7e948b83", "shasum": "" }, "require": { @@ -1987,12 +2012,13 @@ "api-platform/hydra": "^4.1.11", "api-platform/json-schema": "^4.1.11", "api-platform/jsonld": "^4.1.11", - "api-platform/metadata": "^4.1.11", + "api-platform/metadata": "^4.2@beta", "api-platform/openapi": "^4.1.11", "api-platform/serializer": "^4.1.11", - "api-platform/state": "^4.1.11", + "api-platform/state": "^4.2@beta", "api-platform/validator": "^4.1.11", "php": ">=8.2", + "symfony/finder": "^6.4 || ^7.0", "symfony/property-access": "^6.4 || ^7.0", "symfony/property-info": "^6.4 || ^7.1", "symfony/security-core": "^6.4 || ^7.0", @@ -2009,8 +2035,11 @@ "phpspec/prophecy-phpunit": "^2.2", "phpunit/phpunit": "11.5.x-dev", "symfony/expression-language": "^6.4 || ^7.0", + "symfony/intl": "^6.4 || ^7.0", "symfony/mercure-bundle": "*", + "symfony/object-mapper": "^7.0", "symfony/routing": "^6.4 || ^7.0", + "symfony/type-info": "^7.3", "symfony/validator": "^6.4 || ^7.0", "webonyx/graphql-php": "^15.0" }, @@ -2019,6 +2048,7 @@ "api-platform/doctrine-orm": "To support Doctrine ORM.", "api-platform/elasticsearch": "To support Elasticsearch.", "api-platform/graphql": "To support GraphQL.", + "api-platform/hal": "to support the HAL format", "api-platform/ramsey-uuid": "To support Ramsey's UUID identifiers.", "ocramius/package-versions": "To display the API Platform's version in the debug bar.", "phpstan/phpdoc-parser": "To support extracting metadata from PHPDoc.", @@ -2046,7 +2076,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -2087,22 +2118,22 @@ "symfony" ], "support": { - "source": "https://github.com/api-platform/symfony/tree/v4.1.23" + "source": "https://github.com/api-platform/symfony/tree/v4.2.0" }, - "time": "2025-09-05T07:30:37+00:00" + "time": "2025-09-16T12:49:22+00:00" }, { "name": "api-platform/validator", - "version": "v4.1.23", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/api-platform/validator.git", - "reference": "9f0bde95dccf1d86e6a6165543d601a4a46eaa9a" + "reference": "562f97b0acdacef462ff9ececd62158ae4709530" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/validator/zipball/9f0bde95dccf1d86e6a6165543d601a4a46eaa9a", - "reference": "9f0bde95dccf1d86e6a6165543d601a4a46eaa9a", + "url": "https://api.github.com/repos/api-platform/validator/zipball/562f97b0acdacef462ff9ececd62158ae4709530", + "reference": "562f97b0acdacef462ff9ececd62158ae4709530", "shasum": "" }, "require": { @@ -2110,7 +2141,7 @@ "php": ">=8.2", "symfony/http-kernel": "^6.4 || ^7.1", "symfony/serializer": "^6.4 || ^7.1", - "symfony/type-info": "^7.2", + "symfony/type-info": "^7.3", "symfony/validator": "^6.4 || ^7.1", "symfony/web-link": "^6.4 || ^7.1" }, @@ -2130,7 +2161,8 @@ "branch-alias": { "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev", - "dev-main": "4.2.x-dev" + "dev-4.2": "4.2.x-dev", + "dev-main": "4.3.x-dev" } }, "autoload": { @@ -2162,9 +2194,9 @@ "validator" ], "support": { - "source": "https://github.com/api-platform/validator/tree/v4.1.23" + "source": "https://github.com/api-platform/validator/tree/v4.2.0" }, - "time": "2025-07-16T14:01:52+00:00" + "time": "2025-09-05T08:12:26+00:00" }, { "name": "beberlei/assert", @@ -2500,6 +2532,85 @@ ], "time": "2022-01-17T14:14:24+00:00" }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, { "name": "daverandom/libdns", "version": "v2.1.0", @@ -3035,16 +3146,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.16.1", + "version": "2.16.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "152d5083f0cd205a278131dc4351a8c94d007fe1" + "reference": "1c10de0fe995f01eca6b073d1c2549ef0b603a7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/152d5083f0cd205a278131dc4351a8c94d007fe1", - "reference": "152d5083f0cd205a278131dc4351a8c94d007fe1", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/1c10de0fe995f01eca6b073d1c2549ef0b603a7f", + "reference": "1c10de0fe995f01eca6b073d1c2549ef0b603a7f", "shasum": "" }, "require": { @@ -3078,12 +3189,11 @@ "phpstan/phpstan": "2.1.1", "phpstan/phpstan-phpunit": "2.0.3", "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "^9.6.22", + "phpunit/phpunit": "^10.5.53", "psr/log": "^1.1.4 || ^2.0 || ^3.0", "symfony/doctrine-messenger": "^6.4 || ^7.0", "symfony/expression-language": "^6.4 || ^7.0", "symfony/messenger": "^6.4 || ^7.0", - "symfony/phpunit-bridge": "^7.2", "symfony/property-info": "^6.4 || ^7.0", "symfony/security-bundle": "^6.4 || ^7.0", "symfony/stopwatch": "^6.4 || ^7.0", @@ -3138,7 +3248,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.16.1" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.16.2" }, "funding": [ { @@ -3154,7 +3264,7 @@ "type": "tidelift" } ], - "time": "2025-09-05T15:24:53+00:00" + "time": "2025-09-10T19:14:48+00:00" }, { "name": "doctrine/doctrine-migrations-bundle", @@ -3912,16 +4022,16 @@ }, { "name": "dompdf/dompdf", - "version": "v3.1.0", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "a51bd7a063a65499446919286fb18b518177155a" + "reference": "b3493e35d31a5e76ec24c3b64a29b0034b2f32a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/a51bd7a063a65499446919286fb18b518177155a", - "reference": "a51bd7a063a65499446919286fb18b518177155a", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/b3493e35d31a5e76ec24c3b64a29b0034b2f32a6", + "reference": "b3493e35d31a5e76ec24c3b64a29b0034b2f32a6", "shasum": "" }, "require": { @@ -3970,9 +4080,9 @@ "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v3.1.0" + "source": "https://github.com/dompdf/dompdf/tree/v3.1.2" }, - "time": "2025-01-15T14:09:04+00:00" + "time": "2025-09-23T03:06:41+00:00" }, { "name": "dompdf/php-font-lib", @@ -4835,16 +4945,16 @@ }, { "name": "jbtronics/dompdf-font-loader-bundle", - "version": "v1.1.4", + "version": "v1.1.5", "source": { "type": "git", "url": "https://github.com/jbtronics/dompdf-font-loader-bundle.git", - "reference": "1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f" + "reference": "83a0e50ecceefea0a63915dae758e00788fd067e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jbtronics/dompdf-font-loader-bundle/zipball/1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f", - "reference": "1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f", + "url": "https://api.github.com/repos/jbtronics/dompdf-font-loader-bundle/zipball/83a0e50ecceefea0a63915dae758e00788fd067e", + "reference": "83a0e50ecceefea0a63915dae758e00788fd067e", "shasum": "" }, "require": { @@ -4884,22 +4994,22 @@ ], "support": { "issues": "https://github.com/jbtronics/dompdf-font-loader-bundle/issues", - "source": "https://github.com/jbtronics/dompdf-font-loader-bundle/tree/v1.1.4" + "source": "https://github.com/jbtronics/dompdf-font-loader-bundle/tree/v1.1.5" }, - "time": "2025-07-07T20:39:34+00:00" + "time": "2025-07-25T20:29:05+00:00" }, { "name": "jbtronics/settings-bundle", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/jbtronics/settings-bundle.git", - "reference": "9103bd7f78f0b223d1c7167feb824004fc2a9f07" + "reference": "1067dd3d816cd0a6be7ac3d3989587ea05040bd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/9103bd7f78f0b223d1c7167feb824004fc2a9f07", - "reference": "9103bd7f78f0b223d1c7167feb824004fc2a9f07", + "url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/1067dd3d816cd0a6be7ac3d3989587ea05040bd4", + "reference": "1067dd3d816cd0a6be7ac3d3989587ea05040bd4", "shasum": "" }, "require": { @@ -4960,7 +5070,7 @@ ], "support": { "issues": "https://github.com/jbtronics/settings-bundle/issues", - "source": "https://github.com/jbtronics/settings-bundle/tree/v3.0.1" + "source": "https://github.com/jbtronics/settings-bundle/tree/v3.1.1" }, "funding": [ { @@ -4972,7 +5082,7 @@ "type": "github" } ], - "time": "2025-08-24T21:20:15+00:00" + "time": "2025-09-22T22:00:15+00:00" }, { "name": "jfcherng/php-color-output", @@ -5271,16 +5381,16 @@ }, { "name": "knpuniversity/oauth2-client-bundle", - "version": "v2.18.4", + "version": "v2.19.0", "source": { "type": "git", "url": "https://github.com/knpuniversity/oauth2-client-bundle.git", - "reference": "2f48e1ff7969ef0252482d0f6af874eca639ea2d" + "reference": "cd1cb6945a46df81be6e94944872546ca4bf335c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/knpuniversity/oauth2-client-bundle/zipball/2f48e1ff7969ef0252482d0f6af874eca639ea2d", - "reference": "2f48e1ff7969ef0252482d0f6af874eca639ea2d", + "url": "https://api.github.com/repos/knpuniversity/oauth2-client-bundle/zipball/cd1cb6945a46df81be6e94944872546ca4bf335c", + "reference": "cd1cb6945a46df81be6e94944872546ca4bf335c", "shasum": "" }, "require": { @@ -5324,9 +5434,9 @@ ], "support": { "issues": "https://github.com/knpuniversity/oauth2-client-bundle/issues", - "source": "https://github.com/knpuniversity/oauth2-client-bundle/tree/v2.18.4" + "source": "https://github.com/knpuniversity/oauth2-client-bundle/tree/v2.19.0" }, - "time": "2025-08-18T15:33:00+00:00" + "time": "2025-09-17T15:00:36+00:00" }, { "name": "lcobucci/clock", @@ -5656,16 +5766,16 @@ }, { "name": "league/csv", - "version": "9.24.1", + "version": "9.25.0", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8" + "reference": "f856f532866369fb1debe4e7c5a1db185f40ef86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/e0221a3f16aa2a823047d59fab5809d552e29bc8", - "reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/f856f532866369fb1debe4e7c5a1db185f40ef86", + "reference": "f856f532866369fb1debe4e7c5a1db185f40ef86", "shasum": "" }, "require": { @@ -5681,7 +5791,7 @@ "phpstan/phpstan-deprecation-rules": "^1.2.1", "phpstan/phpstan-phpunit": "^1.4.2", "phpstan/phpstan-strict-rules": "^1.6.2", - "phpunit/phpunit": "^10.5.16 || ^11.5.22", + "phpunit/phpunit": "^10.5.16 || ^11.5.22 || ^12.3.6", "symfony/var-dumper": "^6.4.8 || ^7.3.0" }, "suggest": { @@ -5743,7 +5853,7 @@ "type": "github" } ], - "time": "2025-06-25T14:53:51+00:00" + "time": "2025-09-11T08:29:08+00:00" }, { "name": "league/html-to-markdown", @@ -6315,6 +6425,188 @@ }, "time": "2023-07-31T13:36:50+00:00" }, + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Mรคnnchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "Andrรกs Kolesรกr", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2020-05-30T13:11:16+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, { "name": "masterminds/html5", "version": "2.10.0", @@ -6486,17 +6778,80 @@ "time": "2025-03-24T10:02:05+00:00" }, { - "name": "nbgrp/onelogin-saml-bundle", - "version": "v2.0.2", + "name": "myclabs/php-enum", + "version": "1.8.5", "source": { "type": "git", - "url": "https://github.com/nbgrp/onelogin-saml-bundle.git", - "reference": "d2feeb7de6ab5b98e69deeea31ad0ceb20a1c4dc" + "url": "https://github.com/myclabs/php-enum.git", + "reference": "e7be26966b7398204a234f8673fdad5ac6277802" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nbgrp/onelogin-saml-bundle/zipball/d2feeb7de6ab5b98e69deeea31ad0ceb20a1c4dc", - "reference": "d2feeb7de6ab5b98e69deeea31ad0ceb20a1c4dc", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/e7be26966b7398204a234f8673fdad5ac6277802", + "reference": "e7be26966b7398204a234f8673fdad5ac6277802", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^4.6.2 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "https://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.8.5" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", + "type": "tidelift" + } + ], + "time": "2025-01-14T11:49:03+00:00" + }, + { + "name": "nbgrp/onelogin-saml-bundle", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/nbgrp/onelogin-saml-bundle.git", + "reference": "cbf58a8742ee8179dce0547e6f2f826cd19b525f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nbgrp/onelogin-saml-bundle/zipball/cbf58a8742ee8179dce0547e6f2f826cd19b525f", + "reference": "cbf58a8742ee8179dce0547e6f2f826cd19b525f", "shasum": "" }, "require": { @@ -6544,9 +6899,9 @@ ], "support": { "issues": "https://github.com/nbgrp/onelogin-saml-bundle/issues", - "source": "https://github.com/nbgrp/onelogin-saml-bundle/tree/v2.0.2" + "source": "https://github.com/nbgrp/onelogin-saml-bundle/tree/v2.0.3" }, - "time": "2024-09-01T22:16:27+00:00" + "time": "2025-09-19T14:08:21+00:00" }, { "name": "nelexa/zip", @@ -6685,16 +7040,16 @@ }, { "name": "nelmio/security-bundle", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/nelmio/NelmioSecurityBundle.git", - "reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7" + "reference": "f3a7bf628a0873788172a0d05d20c0224080f5eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7", - "reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7", + "url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/f3a7bf628a0873788172a0d05d20c0224080f5eb", + "reference": "f3a7bf628a0873788172a0d05d20c0224080f5eb", "shasum": "" }, "require": { @@ -6753,9 +7108,9 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioSecurityBundle/issues", - "source": "https://github.com/nelmio/NelmioSecurityBundle/tree/v3.5.1" + "source": "https://github.com/nelmio/NelmioSecurityBundle/tree/v3.6.0" }, - "time": "2025-03-13T09:17:16+00:00" + "time": "2025-09-19T08:24:46+00:00" }, { "name": "nette/schema", @@ -7233,24 +7588,26 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v3.0.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + "reference": "5e9b582660b997de205a84c02a3aac7c060900c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/5e9b582660b997de205a84c02a3aac7c060900c9", + "reference": "5e9b582660b997de205a84c02a3aac7c060900c9", "shasum": "" }, "require": { "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4|^5" + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" }, "type": "library", "autoload": { @@ -7296,7 +7653,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:36:18+00:00" + "time": "2025-09-22T21:00:33+00:00" }, { "name": "paragonie/random_compat", @@ -7350,16 +7707,16 @@ }, { "name": "paragonie/sodium_compat", - "version": "v1.21.1", + "version": "v1.21.2", "source": { "type": "git", "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "bb312875dcdd20680419564fe42ba1d9564b9e37" + "reference": "d3043fd10faacb72e9eeb2df4c21a13214b45c33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/bb312875dcdd20680419564fe42ba1d9564b9e37", - "reference": "bb312875dcdd20680419564fe42ba1d9564b9e37", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/d3043fd10faacb72e9eeb2df4c21a13214b45c33", + "reference": "d3043fd10faacb72e9eeb2df4c21a13214b45c33", "shasum": "" }, "require": { @@ -7430,9 +7787,9 @@ ], "support": { "issues": "https://github.com/paragonie/sodium_compat/issues", - "source": "https://github.com/paragonie/sodium_compat/tree/v1.21.1" + "source": "https://github.com/paragonie/sodium_compat/tree/v1.21.2" }, - "time": "2024-04-22T22:05:04+00:00" + "time": "2025-09-19T16:14:19+00:00" }, { "name": "part-db/exchanger", @@ -8110,6 +8467,112 @@ }, "time": "2024-11-09T15:12:26+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fd26e45a814e94ae2aad0df757d9d1739c4bf2e0", + "reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0", + "shasum": "" + }, + "require": { + "composer/pcre": "^1||^2||^3", + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^8.1", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^2.0 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1 || ^2.0", + "phpstan/phpstan-deprecation-rules": "^1.0 || ^2.0", + "phpstan/phpstan-phpunit": "^1.0 || ^2.0", + "phpunit/phpunit": "^10.5", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.1.0" + }, + "time": "2025-09-04T05:34:49+00:00" + }, { "name": "phpstan/phpdoc-parser", "version": "2.3.0", @@ -8466,16 +8929,16 @@ }, { "name": "psr/http-message", - "version": "2.0", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { @@ -8484,7 +8947,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -8499,7 +8962,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -8513,9 +8976,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2023-04-04T09:54:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/link", @@ -15973,16 +16436,16 @@ }, { "name": "symplify/easy-coding-standard", - "version": "12.5.24", + "version": "12.6.0", "source": { "type": "git", "url": "https://github.com/easy-coding-standard/easy-coding-standard.git", - "reference": "4b90f2b6efed9508000968eac2397ac7aff34354" + "reference": "781e6124dc7e14768ae999a8f5309566bbe62004" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/4b90f2b6efed9508000968eac2397ac7aff34354", - "reference": "4b90f2b6efed9508000968eac2397ac7aff34354", + "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/781e6124dc7e14768ae999a8f5309566bbe62004", + "reference": "781e6124dc7e14768ae999a8f5309566bbe62004", "shasum": "" }, "require": { @@ -16018,7 +16481,7 @@ ], "support": { "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", - "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.5.24" + "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.6.0" }, "funding": [ { @@ -16030,7 +16493,7 @@ "type": "github" } ], - "time": "2025-08-21T06:57:14+00:00" + "time": "2025-09-10T14:21:58+00:00" }, { "name": "tecnickcom/tc-lib-barcode", @@ -17825,16 +18288,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.22", + "version": "2.1.28", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" + "reference": "578fa296a166605d97b94091f724f1257185d278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578fa296a166605d97b94091f724f1257185d278", + "reference": "578fa296a166605d97b94091f724f1257185d278", "shasum": "" }, "require": { @@ -17879,20 +18342,20 @@ "type": "github" } ], - "time": "2025-08-04T19:17:37+00:00" + "time": "2025-09-19T08:58:49+00:00" }, { "name": "phpstan/phpstan-doctrine", - "version": "2.0.5", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-doctrine.git", - "reference": "eeff19808f8ae3a6f7c4e43e388a2848eb2b0865" + "reference": "934f5734812341358fc41c44006b30fa00c785f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/eeff19808f8ae3a6f7c4e43e388a2848eb2b0865", - "reference": "eeff19808f8ae3a6f7c4e43e388a2848eb2b0865", + "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/934f5734812341358fc41c44006b30fa00c785f0", + "reference": "934f5734812341358fc41c44006b30fa00c785f0", "shasum": "" }, "require": { @@ -17949,9 +18412,9 @@ "description": "Doctrine extensions for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-doctrine/issues", - "source": "https://github.com/phpstan/phpstan-doctrine/tree/2.0.5" + "source": "https://github.com/phpstan/phpstan-doctrine/tree/2.0.6" }, - "time": "2025-09-07T11:52:30+00:00" + "time": "2025-09-10T07:06:30+00:00" }, { "name": "phpstan/phpstan-strict-rules", @@ -18409,16 +18872,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.36", + "version": "11.5.40", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "264a87c7ef68b1ab9af7172357740dc266df5957" + "reference": "4102b2f9250d6dd57d1a1c8c4132b1c744b14b1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/264a87c7ef68b1ab9af7172357740dc266df5957", - "reference": "264a87c7ef68b1ab9af7172357740dc266df5957", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4102b2f9250d6dd57d1a1c8c4132b1c744b14b1c", + "reference": "4102b2f9250d6dd57d1a1c8c4132b1c744b14b1c", "shasum": "" }, "require": { @@ -18442,7 +18905,7 @@ "sebastian/comparator": "^6.3.2", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.1", - "sebastian/exporter": "^6.3.0", + "sebastian/exporter": "^6.3.1", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", "sebastian/type": "^5.1.3", @@ -18490,7 +18953,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.36" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.40" }, "funding": [ { @@ -18514,20 +18977,20 @@ "type": "tidelift" } ], - "time": "2025-09-03T06:24:17+00:00" + "time": "2025-09-23T06:23:40+00:00" }, { "name": "rector/rector", - "version": "2.1.6", + "version": "2.1.7", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "729aabc0ec66e700ef164e26454a1357f222a2f3" + "reference": "c34cc07c4698f007a20dc5c99ff820089ae413ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/729aabc0ec66e700ef164e26454a1357f222a2f3", - "reference": "729aabc0ec66e700ef164e26454a1357f222a2f3", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/c34cc07c4698f007a20dc5c99ff820089ae413ce", + "reference": "c34cc07c4698f007a20dc5c99ff820089ae413ce", "shasum": "" }, "require": { @@ -18566,7 +19029,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.1.6" + "source": "https://github.com/rectorphp/rector/tree/2.1.7" }, "funding": [ { @@ -18574,7 +19037,7 @@ "type": "github" } ], - "time": "2025-09-05T15:43:08+00:00" + "time": "2025-09-10T11:13:58+00:00" }, { "name": "roave/security-advisories", @@ -18582,12 +19045,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "dc5c4ede5c331ae21fb68947ff89672df9b7cc7d" + "reference": "f48b3e601515b060334744b4b495f0d6b3cc2e6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dc5c4ede5c331ae21fb68947ff89672df9b7cc7d", - "reference": "dc5c4ede5c331ae21fb68947ff89672df9b7cc7d", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f48b3e601515b060334744b4b495f0d6b3cc2e6b", + "reference": "f48b3e601515b060334744b4b495f0d6b3cc2e6b", "shasum": "" }, "conflict": { @@ -18725,6 +19188,7 @@ "dapphp/securimage": "<3.6.6", "darylldoyle/safe-svg": "<1.9.10", "datadog/dd-trace": ">=0.30,<0.30.2", + "datahihi1/tiny-env": "<1.0.3|>=1.0.9,<1.0.11", "datatables/datatables": "<1.10.10", "david-garcia/phpwhois": "<=4.3.1", "dbrisinajumi/d2files": "<1", @@ -18975,6 +19439,7 @@ "laravel/socialite": ">=1,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=9|==10.1", + "lavitto/typo3-form-to-database": "<2.2.5|>=3,<3.2.2|>=4,<4.2.3|>=5,<5.0.2", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", "league/commonmark": "<2.7", "league/flysystem": "<1.1.4|>=2,<2.1.1", @@ -18996,13 +19461,14 @@ "luyadev/yii-helpers": "<1.2.1", "macropay-solutions/laravel-crud-wizard-free": "<3.4.17", "maestroerror/php-heic-to-jpg": "<1.0.5", - "magento/community-edition": "<2.4.5.0-patch14|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch12|>=2.4.7.0-beta1,<2.4.7.0-patch7|>=2.4.8.0-beta1,<2.4.8.0-patch1", + "magento/community-edition": "<=2.4.5.0-patch14|==2.4.6|>=2.4.6.0-patch1,<=2.4.6.0-patch12|>=2.4.7.0-beta1,<=2.4.7.0-patch7|>=2.4.8.0-beta1,<=2.4.8.0-patch2|>=2.4.9.0-alpha1,<=2.4.9.0-alpha2|==2.4.9", "magento/core": "<=1.9.4.5", "magento/magento1ce": "<1.9.4.3-dev", "magento/magento1ee": ">=1,<1.14.4.3-dev", "magento/product-community-edition": "<2.4.4.0-patch9|>=2.4.5,<2.4.5.0-patch8|>=2.4.6,<2.4.6.0-patch6|>=2.4.7,<2.4.7.0-patch1", "magento/project-community-edition": "<=2.0.2", "magneto/core": "<1.9.4.4-dev", + "mahocommerce/maho": "<25.9", "maikuolan/phpmussel": ">=1,<1.6", "mainwp/mainwp": "<=4.4.3.3", "manogi/nova-tiptap": "<=3.2.6", @@ -19215,10 +19681,10 @@ "setasign/fpdi": "<2.6.4", "sfroemken/url_redirect": "<=1.2.1", "sheng/yiicms": "<1.2.1", - "shopware/core": "<6.5.8.18-dev|>=6.6,<6.6.10.3-dev|>=6.7.0.0-RC1-dev,<6.7.0.0-RC2-dev", + "shopware/core": "<6.5.8.18-dev|>=6.6,<6.6.10.3-dev|>=6.7,<6.7.2.1-dev", "shopware/platform": "<=6.6.10.4|>=6.7.0.0-RC1-dev,<6.7.0.0-RC2-dev", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.17", + "shopware/shopware": "<=5.7.17|>=6.7,<6.7.2.1-dev", "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", "shopxo/shopxo": "<=6.4", "showdoc/showdoc": "<2.10.4", @@ -19260,7 +19726,7 @@ "slim/slim": "<2.6", "slub/slub-events": "<3.0.3", "smarty/smarty": "<4.5.3|>=5,<5.1.1", - "snipe/snipe-it": "<8.1", + "snipe/snipe-it": "<8.1.18", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "solspace/craft-freeform": ">=5,<5.10.16", @@ -19366,14 +19832,14 @@ "tribalsystems/zenario": "<=9.7.61188", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", - "twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2", + "twbs/bootstrap": "<3.4.1|>=4,<=4.6.2", "twig/twig": "<3.11.2|>=3.12,<3.14.1|>=3.16,<3.19", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", - "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<10.4.46|>=11,<11.5.40|>=12,<=12.4.30|>=13,<=13.4.11", + "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/cms-belog": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", - "typo3/cms-beuser": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", - "typo3/cms-core": "<=8.7.56|>=9,<=9.5.50|>=10,<=10.4.49|>=11,<=11.5.43|>=12,<=12.4.30|>=13,<=13.4.11", - "typo3/cms-dashboard": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", + "typo3/cms-beuser": ">=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", + "typo3/cms-core": "<=8.7.56|>=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", + "typo3/cms-dashboard": ">=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", "typo3/cms-extensionmanager": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", "typo3/cms-felogin": ">=4.2,<4.2.3", @@ -19383,10 +19849,13 @@ "typo3/cms-indexed-search": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", "typo3/cms-install": "<4.1.14|>=4.2,<4.2.16|>=4.3,<4.3.9|>=4.4,<4.4.5|>=12.2,<12.4.8|==13.4.2", "typo3/cms-lowlevel": ">=11,<=11.5.41", + "typo3/cms-recordlist": ">=11,<11.5.48", + "typo3/cms-recycler": ">=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/cms-rte-ckeditor": ">=9.5,<9.5.42|>=10,<10.4.39|>=11,<11.5.30", "typo3/cms-scheduler": ">=11,<=11.5.41", "typo3/cms-setup": ">=9,<=9.5.50|>=10,<=10.4.49|>=11,<=11.5.43|>=12,<=12.4.30|>=13,<=13.4.11", "typo3/cms-webhooks": ">=12,<=12.4.30|>=13,<=13.4.11", + "typo3/cms-workspaces": ">=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "typo3/html-sanitizer": ">=1,<=1.5.2|>=2,<=2.1.3", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", @@ -19447,7 +19916,7 @@ "xataface/xataface": "<3", "xpressengine/xpressengine": "<3.0.15", "yab/quarx": "<2.4.5", - "yeswiki/yeswiki": "<4.5.4", + "yeswiki/yeswiki": "<=4.5.4", "yetiforce/yetiforce-crm": "<6.5", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", @@ -19539,7 +20008,7 @@ "type": "tidelift" } ], - "time": "2025-09-04T20:05:35+00:00" + "time": "2025-09-19T18:07:33+00:00" }, { "name": "sebastian/cli-parser", @@ -20006,16 +20475,16 @@ }, { "name": "sebastian/exporter", - "version": "6.3.0", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" + "reference": "8f67e53d3fcaf53105f95cc14f1630493d0fa2e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", - "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/8f67e53d3fcaf53105f95cc14f1630493d0fa2e6", + "reference": "8f67e53d3fcaf53105f95cc14f1630493d0fa2e6", "shasum": "" }, "require": { @@ -20029,7 +20498,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -20072,15 +20541,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2024-12-05T09:17:50+00:00" + "time": "2025-09-22T05:34:00+00:00" }, { "name": "sebastian/global-state", @@ -21049,9 +21530,9 @@ "ext-json": "*", "ext-mbstring": "*" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.2.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/packages/doctrine.php b/config/packages/doctrine.php new file mode 100644 index 00000000..47584ed7 --- /dev/null +++ b/config/packages/doctrine.php @@ -0,0 +1,33 @@ +. + */ + +declare(strict_types=1); + +/** + * This class extends the default doctrine ORM configuration to enable native lazy objects on PHP 8.4+. + * We have to do this in a PHP file, because the yaml file does not support conditionals on PHP version. + */ + +return static function(\Symfony\Config\DoctrineConfig $doctrine) { + //On PHP 8.4+ we can use native lazy objects, which are much more efficient than proxies. + if (PHP_VERSION_ID >= 80400) { + $doctrine->orm()->enableNativeLazyObjects(true); + } +}; diff --git a/config/packages/nelmio_security.yaml b/config/packages/nelmio_security.yaml index c283cd8e..6b2b7337 100644 --- a/config/packages/nelmio_security.yaml +++ b/config/packages/nelmio_security.yaml @@ -20,12 +20,6 @@ nelmio_security: - 'digikey.com' - 'nexar.com' - # forces Microsoft's XSS-Protection with - # its block mode - xss_protection: - enabled: true - mode_block: true - # Send a full URL in the `Referer` header when performing a same-origin request, # only send the origin of the document to secure destination (HTTPS->HTTPS), # and send no header to a less secure destination (HTTPS->HTTP). diff --git a/config/parameters.yaml b/config/parameters.yaml index 154fbd8a..5b40899d 100644 --- a/config/parameters.yaml +++ b/config/parameters.yaml @@ -104,3 +104,9 @@ parameters: env(SAML_ROLE_MAPPING): '{}' env(DATABASE_EMULATE_NATURAL_SORT): 0 + + ###################################################################################################################### + # Bulk Info Provider Import Configuration + ###################################################################################################################### + partdb.bulk_import.batch_size: 20 # Number of parts to process in each batch during bulk operations + partdb.bulk_import.max_parts_per_operation: 1000 # Maximum number of parts allowed per bulk import operation diff --git a/docs/assets/usage/import_export/part_import_example.csv b/docs/assets/usage/import_export/part_import_example.csv index 08701426..14d4500f 100644 --- a/docs/assets/usage/import_export/part_import_example.csv +++ b/docs/assets/usage/import_export/part_import_example.csv @@ -1,4 +1,7 @@ -name;description;category;notes;footprint;tags;quantity;storage_location;mass;ipn;mpn;manufacturing_status;manufacturer;supplier;spn;price;favorite;needs_review;minamount;partUnit;manufacturing_status -BC547;NPN transistor;Transistors -> NPN;very important notes;TO -> TO-92;NPN,Transistor;5;Room 1 -> Shelf 1 -> Box 2;10;;;Manufacturer;;You need to fill this line, to use spn and price;BC547C;2,3;0;;;; -BC557;PNP transistor;HTML;;TO -> TO-92;PNP,Transistor;10;Room 2-> Box 3;;Internal1234;;;;;;;;1;;;active -Copper Wire;;Wire;;;;;;;;;;;;;;;;;Meter; \ No newline at end of file +name;description;category;notes;footprint;tags;quantity;storage_location;mass;ipn;mpn;manufacturing_status;manufacturer;supplier;spn;price;favorite;needs_review;minamount;partUnit;eda_info.reference_prefix;eda_info.value;eda_info.visibility;eda_info.exclude_from_bom;eda_info.exclude_from_board;eda_info.exclude_from_sim;eda_info.kicad_symbol;eda_info.kicad_footprint +"MLCC; 0603; 0.22uF";Multilayer ceramic capacitor;Electrical Components->Passive Components->Capacitors_SMD;High quality MLCC;0603;Capacitor,SMD,MLCC,0603;500;Room 1->Shelf 1->Box 2;0.1;CL10B224KO8NNNC;CL10B224KO8NNNC;active;Samsung;LCSC;C160828;0.0023;0;0;1;pcs;C;0.22uF;1;0;0;0;Device:C;Capacitor_SMD:C_0603_1608Metric +"MLCC; 0402; 10pF";Small MLCC for high frequency;Electrical Components->Passive Components->Capacitors_SMD;;0402;Capacitor,SMD,MLCC,0402;500;Room 1->Shelf 1->Box 3;0.05;FCC0402N100J500AT;FCC0402N100J500AT;active;Fenghua;LCSC;C5137557;0.0015;0;0;1;pcs;C;10pF;1;0;0;0;Device:C;Capacitor_SMD:C_0402_1005Metric +"Diode; 1N4148W";Fast switching diode;Electrical Components->Semiconductors->Diodes;Fast recovery time;Diode_SMD:D_SOD-123;Diode,SMD,Schottky;100;Room 2->Box 1;0.2;1N4148W;1N4148W;active;Vishay;LCSC;C917030;0.008;0;0;1;pcs;D;1N4148W;1;0;0;0;Device:D;Diode_SMD:D_SOD-123 +BC547;NPN transistor;Transistors->NPN;very important notes;TO->TO-92;NPN,Transistor;5;Room 1->Shelf 1->Box 2;10;BC547;BC547;active;Generic;LCSC;BC547C;2.3;0;0;1;pcs;Q;BC547;1;0;0;0;Device:Q_NPN_EBC;TO_SOT_Packages_SMD:TO-92_HandSolder +BC557;PNP transistor;Transistors->PNP;PNP complement to BC547;TO->TO-92;PNP,Transistor;10;Room 2->Box 3;10;BC557;BC557;active;Generic;LCSC;BC557C;2.1;0;0;1;pcs;Q;BC557;1;0;0;0;Device:Q_PNP_EBC;TO_SOT_Packages_SMD:TO-92_HandSolder +Copper Wire;Bare copper wire;Wire->Copper;For prototyping;Wire;Wire,Copper;50;Room 3->Spool Rack;0.5;CW-22AWG;CW-22AWG;active;Generic;Local Supplier;LS-CW-22;0.15;0;0;1;Meter;W;22AWG;1;0;0;0;Device:Wire;Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical diff --git a/docs/usage/import_export.md b/docs/usage/import_export.md index 0534221f..136624e2 100644 --- a/docs/usage/import_export.md +++ b/docs/usage/import_export.md @@ -142,6 +142,9 @@ You can select between the following export formats: efficiently. * **YAML** (Yet Another Markup Language): Very similar to JSON * **XML** (Extensible Markup Language): Good support with nested data structures. Similar use cases as JSON and YAML. +* **Excel**: Similar to CSV, but in a native Excel format. Can be opened in Excel and LibreOffice Calc. Does not support nested + data structures or sub-data (like parameters, attachments, etc.), very well (many columns are generated, as every + possible sub-data is exported as a separate column). Also, you can select between the following export levels: diff --git a/docs/usage/information_provider_system.md b/docs/usage/information_provider_system.md index 953db409..bc6fe76e 100644 --- a/docs/usage/information_provider_system.md +++ b/docs/usage/information_provider_system.md @@ -68,6 +68,13 @@ If you already have attachment types for images and datasheets and want the info can add the alternative names "Datasheet" and "Image" to the alternative names field of the attachment types. +## Bulk import + +If you want to update the information of multiple parts, you can use the bulk import system: Go to a part table and select +the parts you want to update. In the bulk actions dropdown select "Bulk info provider import" and click "Apply". +You will be redirected to a page, where you can select how part fields should be mapped to info provider fields, and the +results will be shown. + ## Data providers The system tries to be as flexible as possible, so many different information sources can be used. diff --git a/makefile b/makefile index 9041ba0f..bc4d0bf3 100644 --- a/makefile +++ b/makefile @@ -1,112 +1,91 @@ # PartDB Makefile for Test Environment Management -.PHONY: help test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset deps-install +.PHONY: help deps-install lint format format-check test coverage pre-commit all test-typecheck \ +test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run test-reset \ +section-dev dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset # Default target -help: - @echo "PartDB Test Environment Management" - @echo "==================================" - @echo "" - @echo "Available targets:" - @echo " deps-install - Install PHP dependencies with unlimited memory" - @echo "" - @echo "Development Environment:" - @echo " dev-setup - Complete development environment setup (clean, create DB, migrate, warmup)" - @echo " dev-clean - Clean development cache and database files" - @echo " dev-db-create - Create development database (if not exists)" - @echo " dev-db-migrate - Run database migrations for development environment" - @echo " dev-cache-clear - Clear development cache" - @echo " dev-warmup - Warm up development cache" - @echo " dev-reset - Quick development reset (clean + migrate)" - @echo "" - @echo "Test Environment:" - @echo " test-setup - Complete test environment setup (clean, create DB, migrate, load fixtures)" - @echo " test-clean - Clean test cache and database files" - @echo " test-db-create - Create test database (if not exists)" - @echo " test-db-migrate - Run database migrations for test environment" - @echo " test-cache-clear- Clear test cache" - @echo " test-fixtures - Load test fixtures" - @echo " test-run - Run PHPUnit tests" - @echo "" - @echo " help - Show this help message" +help: ## Show this help + @awk 'BEGIN {FS = ":.*##"}; /^[a-zA-Z0-9][a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) -# Install PHP dependencies with unlimited memory -deps-install: +# Dependencies +deps-install: ## Install PHP dependencies with unlimited memory @echo "๐Ÿ“ฆ Installing PHP dependencies..." COMPOSER_MEMORY_LIMIT=-1 composer install + yarn install @echo "โœ… Dependencies installed" # Complete test environment setup -test-setup: deps-install test-clean test-db-create test-db-migrate test-fixtures +test-setup: test-clean test-db-create test-db-migrate test-fixtures ## Complete test setup (clean, create DB, migrate, fixtures) @echo "โœ… Test environment setup complete!" # Clean test environment -test-clean: +test-clean: ## Clean test cache and database files @echo "๐Ÿงน Cleaning test environment..." rm -rf var/cache/test rm -f var/app_test.db @echo "โœ… Test environment cleaned" # Create test database -test-db-create: +test-db-create: ## Create test database (if not exists) @echo "๐Ÿ—„๏ธ Creating test database..." -php bin/console doctrine:database:create --if-not-exists --env test || echo "โš ๏ธ Database creation failed (expected for SQLite) - continuing..." # Run database migrations for test environment -test-db-migrate: +test-db-migrate: ## Run database migrations for test environment @echo "๐Ÿ”„ Running database migrations..." - php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env test + COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env test # Clear test cache -test-cache-clear: +test-cache-clear: ## Clear test cache @echo "๐Ÿ—‘๏ธ Clearing test cache..." rm -rf var/cache/test @echo "โœ… Test cache cleared" # Load test fixtures -test-fixtures: +test-fixtures: ## Load test fixtures @echo "๐Ÿ“ฆ Loading test fixtures..." php bin/console partdb:fixtures:load -n --env test # Run PHPUnit tests -test-run: +test-run: ## Run PHPUnit tests @echo "๐Ÿงช Running tests..." php bin/phpunit -test-typecheck: - @echo "๐Ÿงช Running type checks..." - COMPOSER_MEMORY_LIMIT=-1 composer phpstan - # Quick test reset (clean + migrate + fixtures, skip DB creation) test-reset: test-cache-clear test-db-migrate test-fixtures @echo "โœ… Test environment reset complete!" +test-typecheck: ## Run static analysis (PHPStan) + @echo "๐Ÿงช Running type checks..." + COMPOSER_MEMORY_LIMIT=-1 composer phpstan + # Development helpers -dev-setup: deps-install dev-clean dev-db-create dev-db-migrate dev-warmup +dev-setup: dev-clean dev-db-create dev-db-migrate dev-warmup ## Complete development setup (clean, create DB, migrate, warmup) @echo "โœ… Development environment setup complete!" -dev-clean: +dev-clean: ## Clean development cache and database files @echo "๐Ÿงน Cleaning development environment..." rm -rf var/cache/dev rm -f var/app_dev.db @echo "โœ… Development environment cleaned" -dev-db-create: +dev-db-create: ## Create development database (if not exists) @echo "๐Ÿ—„๏ธ Creating development database..." -php bin/console doctrine:database:create --if-not-exists --env dev || echo "โš ๏ธ Database creation failed (expected for SQLite) - continuing..." -dev-db-migrate: +dev-db-migrate: ## Run database migrations for development environment @echo "๐Ÿ”„ Running database migrations..." - php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env dev + COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env dev -dev-cache-clear: +dev-cache-clear: ## Clear development cache @echo "๐Ÿ—‘๏ธ Clearing development cache..." - php -d memory_limit=1G bin/console cache:clear --env dev -n + rm -rf var/cache/dev @echo "โœ… Development cache cleared" -dev-warmup: +dev-warmup: ## Warm up development cache @echo "๐Ÿ”ฅ Warming up development cache..." - php -d memory_limit=1G bin/console cache:warmup --env dev -n + COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=1G bin/console cache:warmup --env dev -n -dev-reset: dev-cache-clear dev-db-migrate +dev-reset: dev-cache-clear dev-db-migrate ## Quick development reset (cache clear + migrate) @echo "โœ… Development environment reset complete!" \ No newline at end of file diff --git a/migrations/Version20250802205143.php b/migrations/Version20250802205143.php new file mode 100644 index 00000000..5eb09a77 --- /dev/null +++ b/migrations/Version20250802205143.php @@ -0,0 +1,70 @@ +addSql('CREATE TABLE bulk_info_provider_import_jobs (id INT AUTO_INCREMENT NOT NULL, name LONGTEXT NOT NULL, field_mappings LONGTEXT NOT NULL, search_results LONGTEXT NOT NULL, status VARCHAR(20) NOT NULL, created_at DATETIME NOT NULL, completed_at DATETIME DEFAULT NULL, prefetch_details TINYINT(1) NOT NULL, created_by_id INT NOT NULL, CONSTRAINT FK_7F58C1EDB03A8386 FOREIGN KEY (created_by_id) REFERENCES `users` (id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE INDEX IDX_7F58C1EDB03A8386 ON bulk_info_provider_import_jobs (created_by_id)'); + + $this->addSql('CREATE TABLE bulk_info_provider_import_job_parts (id INT AUTO_INCREMENT NOT NULL, status VARCHAR(20) NOT NULL, reason LONGTEXT DEFAULT NULL, completed_at DATETIME DEFAULT NULL, job_id INT NOT NULL, part_id INT NOT NULL, CONSTRAINT FK_CD93F28FBE04EA9 FOREIGN KEY (job_id) REFERENCES bulk_info_provider_import_jobs (id), CONSTRAINT FK_CD93F28F4CE34BEC FOREIGN KEY (part_id) REFERENCES `parts` (id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE INDEX IDX_CD93F28FBE04EA9 ON bulk_info_provider_import_job_parts (job_id)'); + $this->addSql('CREATE INDEX IDX_CD93F28F4CE34BEC ON bulk_info_provider_import_job_parts (part_id)'); + $this->addSql('CREATE UNIQUE INDEX unique_job_part ON bulk_info_provider_import_job_parts (job_id, part_id)'); + } + + public function mySQLDown(Schema $schema): void + { + $this->addSql('DROP TABLE bulk_info_provider_import_job_parts'); + $this->addSql('DROP TABLE bulk_info_provider_import_jobs'); + } + + public function sqLiteUp(Schema $schema): void + { + $this->addSql('CREATE TABLE bulk_info_provider_import_jobs (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name CLOB NOT NULL, field_mappings CLOB NOT NULL, search_results CLOB NOT NULL, status VARCHAR(20) NOT NULL, created_at DATETIME NOT NULL, completed_at DATETIME DEFAULT NULL, prefetch_details BOOLEAN NOT NULL, created_by_id INTEGER NOT NULL, CONSTRAINT FK_7F58C1EDB03A8386 FOREIGN KEY (created_by_id) REFERENCES "users" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); + $this->addSql('CREATE INDEX IDX_7F58C1EDB03A8386 ON bulk_info_provider_import_jobs (created_by_id)'); + + $this->addSql('CREATE TABLE bulk_info_provider_import_job_parts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, status VARCHAR(20) NOT NULL, reason CLOB DEFAULT NULL, completed_at DATETIME DEFAULT NULL, job_id INTEGER NOT NULL, part_id INTEGER NOT NULL, CONSTRAINT FK_CD93F28FBE04EA9 FOREIGN KEY (job_id) REFERENCES bulk_info_provider_import_jobs (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CD93F28F4CE34BEC FOREIGN KEY (part_id) REFERENCES "parts" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); + $this->addSql('CREATE INDEX IDX_CD93F28FBE04EA9 ON bulk_info_provider_import_job_parts (job_id)'); + $this->addSql('CREATE INDEX IDX_CD93F28F4CE34BEC ON bulk_info_provider_import_job_parts (part_id)'); + $this->addSql('CREATE UNIQUE INDEX unique_job_part ON bulk_info_provider_import_job_parts (job_id, part_id)'); + } + + public function sqLiteDown(Schema $schema): void + { + $this->addSql('DROP TABLE bulk_info_provider_import_job_parts'); + $this->addSql('DROP TABLE bulk_info_provider_import_jobs'); + } + + public function postgreSQLUp(Schema $schema): void + { + $this->addSql('CREATE TABLE bulk_info_provider_import_jobs (id SERIAL PRIMARY KEY NOT NULL, name TEXT NOT NULL, field_mappings TEXT NOT NULL, search_results TEXT NOT NULL, status VARCHAR(20) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, completed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, prefetch_details BOOLEAN NOT NULL, created_by_id INT NOT NULL, CONSTRAINT FK_7F58C1EDB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); + $this->addSql('CREATE INDEX IDX_7F58C1EDB03A8386 ON bulk_info_provider_import_jobs (created_by_id)'); + + $this->addSql('CREATE TABLE bulk_info_provider_import_job_parts (id SERIAL PRIMARY KEY NOT NULL, status VARCHAR(20) NOT NULL, reason TEXT DEFAULT NULL, completed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, job_id INT NOT NULL, part_id INT NOT NULL, CONSTRAINT FK_CD93F28FBE04EA9 FOREIGN KEY (job_id) REFERENCES bulk_info_provider_import_jobs (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CD93F28F4CE34BEC FOREIGN KEY (part_id) REFERENCES parts (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); + $this->addSql('CREATE INDEX IDX_CD93F28FBE04EA9 ON bulk_info_provider_import_job_parts (job_id)'); + $this->addSql('CREATE INDEX IDX_CD93F28F4CE34BEC ON bulk_info_provider_import_job_parts (part_id)'); + $this->addSql('CREATE UNIQUE INDEX unique_job_part ON bulk_info_provider_import_job_parts (job_id, part_id)'); + } + + public function postgreSQLDown(Schema $schema): void + { + $this->addSql('DROP TABLE bulk_info_provider_import_job_parts'); + $this->addSql('DROP TABLE bulk_info_provider_import_jobs'); + } +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4a37b420..3feb4940 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,7 +4,7 @@ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" colors="true" - failOnDeprecation="true" + failOnDeprecation="false" failOnNotice="true" failOnWarning="true" bootstrap="tests/bootstrap.php" diff --git a/src/Controller/BulkInfoProviderImportController.php b/src/Controller/BulkInfoProviderImportController.php new file mode 100644 index 00000000..2d3dd7f6 --- /dev/null +++ b/src/Controller/BulkInfoProviderImportController.php @@ -0,0 +1,588 @@ +. + */ + +declare(strict_types=1); + +namespace App\Controller; + +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use App\Entity\Parts\Part; +use App\Entity\Parts\Supplier; +use App\Entity\UserSystem\User; +use App\Form\InfoProviderSystem\GlobalFieldMappingType; +use App\Services\InfoProviderSystem\BulkInfoProviderService; +use App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use Doctrine\ORM\EntityManagerInterface; +use Psr\Log\LoggerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\DependencyInjection\Attribute\Autowire; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/tools/bulk_info_provider_import')] +class BulkInfoProviderImportController extends AbstractController +{ + public function __construct( + private readonly BulkInfoProviderService $bulkService, + private readonly EntityManagerInterface $entityManager, + private readonly LoggerInterface $logger, + #[Autowire(param: 'partdb.bulk_import.batch_size')] + private readonly int $bulkImportBatchSize, + #[Autowire(param: 'partdb.bulk_import.max_parts_per_operation')] + private readonly int $bulkImportMaxParts + ) { + } + + /** + * Convert field mappings from array format to FieldMappingDTO[]. + * + * @param array $fieldMappings Array of field mapping arrays + * @return BulkSearchFieldMappingDTO[] Array of FieldMappingDTO objects + */ + private function convertFieldMappingsToDto(array $fieldMappings): array + { + $dtos = []; + foreach ($fieldMappings as $mapping) { + $dtos[] = new BulkSearchFieldMappingDTO(field: $mapping['field'], providers: $mapping['providers'], priority: $mapping['priority'] ?? 1); + } + return $dtos; + } + + private function createErrorResponse(string $message, int $statusCode = 400, array $context = []): JsonResponse + { + $this->logger->warning('Bulk import operation failed', array_merge([ + 'error' => $message, + 'user' => $this->getUser()?->getUserIdentifier(), + ], $context)); + + return $this->json([ + 'success' => false, + 'error' => $message + ], $statusCode); + } + + private function validateJobAccess(int $jobId): ?BulkInfoProviderImportJob + { + $this->denyAccessUnlessGranted('@info_providers.create_parts'); + + $job = $this->entityManager->getRepository(BulkInfoProviderImportJob::class)->find($jobId); + + if (!$job) { + return null; + } + + if ($job->getCreatedBy() !== $this->getUser()) { + return null; + } + + return $job; + } + + private function updatePartSearchResults(BulkInfoProviderImportJob $job, ?BulkSearchPartResultsDTO $newResults): void + { + if ($newResults === null) { + return; + } + + // Only deserialize and update if we have new results + $allResults = $job->getSearchResults($this->entityManager); + + // Find and update the results for this specific part + $allResults = $allResults->replaceResultsForPart($newResults); + + // Save updated results back to job + $job->setSearchResults($allResults); + } + + #[Route('/step1', name: 'bulk_info_provider_step1')] + public function step1(Request $request): Response + { + $this->denyAccessUnlessGranted('@info_providers.create_parts'); + + set_time_limit(600); + + $ids = $request->query->get('ids'); + if (!$ids) { + $this->addFlash('error', 'No parts selected for bulk import'); + return $this->redirectToRoute('homepage'); + } + + $partIds = explode(',', $ids); + $partRepository = $this->entityManager->getRepository(Part::class); + $parts = $partRepository->getElementsFromIDArray($partIds); + + if (empty($parts)) { + $this->addFlash('error', 'No valid parts found for bulk import'); + return $this->redirectToRoute('homepage'); + } + + // Validate against configured maximum + if (count($parts) > $this->bulkImportMaxParts) { + $this->addFlash('error', sprintf( + 'Too many parts selected (%d). Maximum allowed is %d parts per operation.', + count($parts), + $this->bulkImportMaxParts + )); + return $this->redirectToRoute('homepage'); + } + + if (count($parts) > ($this->bulkImportMaxParts / 2)) { + $this->addFlash('warning', 'Processing ' . count($parts) . ' parts may take several minutes and could timeout. Consider processing smaller batches.'); + } + + // Generate field choices + $fieldChoices = [ + 'info_providers.bulk_search.field.mpn' => 'mpn', + 'info_providers.bulk_search.field.name' => 'name', + ]; + + // Add dynamic supplier fields + $suppliers = $this->entityManager->getRepository(Supplier::class)->findAll(); + foreach ($suppliers as $supplier) { + $supplierKey = strtolower(str_replace([' ', '-', '_'], '_', $supplier->getName())); + $fieldChoices["Supplier: " . $supplier->getName() . " (SPN)"] = $supplierKey . '_spn'; + } + + // Initialize form with useful default mappings + $initialData = [ + 'field_mappings' => [ + ['field' => 'mpn', 'providers' => [], 'priority' => 1] + ], + 'prefetch_details' => false + ]; + + $form = $this->createForm(GlobalFieldMappingType::class, $initialData, [ + 'field_choices' => $fieldChoices + ]); + $form->handleRequest($request); + + $searchResults = null; + + if ($form->isSubmitted() && $form->isValid()) { + $formData = $form->getData(); + $fieldMappingDtos = $this->convertFieldMappingsToDto($formData['field_mappings']); + $prefetchDetails = $formData['prefetch_details'] ?? false; + + $user = $this->getUser(); + if (!$user instanceof User) { + throw new \RuntimeException('User must be authenticated and of type User'); + } + + // Validate part count against configuration limit + if (count($parts) > $this->bulkImportMaxParts) { + $this->addFlash('error', "Too many parts selected. Maximum allowed: {$this->bulkImportMaxParts}"); + $partIds = array_map(fn($part) => $part->getId(), $parts); + return $this->redirectToRoute('bulk_info_provider_step1', ['ids' => implode(',', $partIds)]); + } + + // Create and save the job + $job = new BulkInfoProviderImportJob(); + $job->setFieldMappings($fieldMappingDtos); + $job->setPrefetchDetails($prefetchDetails); + $job->setCreatedBy($user); + + foreach ($parts as $part) { + $jobPart = new BulkInfoProviderImportJobPart($job, $part); + $job->addJobPart($jobPart); + } + + $this->entityManager->persist($job); + $this->entityManager->flush(); + + try { + $searchResultsDto = $this->bulkService->performBulkSearch($parts, $fieldMappingDtos, $prefetchDetails); + + // Save search results to job + $job->setSearchResults($searchResultsDto); + $job->markAsInProgress(); + $this->entityManager->flush(); + + // Prefetch details if requested + if ($prefetchDetails) { + $this->bulkService->prefetchDetailsForResults($searchResultsDto); + } + + return $this->redirectToRoute('bulk_info_provider_step2', ['jobId' => $job->getId()]); + + } catch (\Exception $e) { + $this->logger->error('Critical error during bulk import search', [ + 'job_id' => $job->getId(), + 'error' => $e->getMessage(), + 'exception' => $e + ]); + + $this->entityManager->remove($job); + $this->entityManager->flush(); + + $this->addFlash('error', 'Search failed due to an error: ' . $e->getMessage()); + $partIds = array_map(fn($part) => $part->getId(), $parts); + return $this->redirectToRoute('bulk_info_provider_step1', ['ids' => implode(',', $partIds)]); + } + } + + // Get existing in-progress jobs for current user + $existingJobs = $this->entityManager->getRepository(BulkInfoProviderImportJob::class) + ->findBy(['createdBy' => $this->getUser(), 'status' => BulkImportJobStatus::IN_PROGRESS], ['createdAt' => 'DESC'], 10); + + return $this->render('info_providers/bulk_import/step1.html.twig', [ + 'form' => $form, + 'parts' => $parts, + 'search_results' => $searchResults, + 'existing_jobs' => $existingJobs, + 'fieldChoices' => $fieldChoices + ]); + } + + #[Route('/manage', name: 'bulk_info_provider_manage')] + public function manageBulkJobs(): Response + { + $this->denyAccessUnlessGranted('@info_providers.create_parts'); + + // Get all jobs for current user + $allJobs = $this->entityManager->getRepository(BulkInfoProviderImportJob::class) + ->findBy([], ['createdAt' => 'DESC']); + + // Check and auto-complete jobs that should be completed + // Also clean up jobs with no results (failed searches) + $updatedJobs = false; + $jobsToDelete = []; + + foreach ($allJobs as $job) { + if ($job->isAllPartsCompleted() && !$job->isCompleted()) { + $job->markAsCompleted(); + $updatedJobs = true; + } + + // Mark jobs with no results for deletion (failed searches) + if ($job->getResultCount() === 0 && $job->isInProgress()) { + $jobsToDelete[] = $job; + } + } + + // Delete failed jobs + foreach ($jobsToDelete as $job) { + $this->entityManager->remove($job); + $updatedJobs = true; + } + + // Flush changes if any jobs were updated + if ($updatedJobs) { + $this->entityManager->flush(); + + if (!empty($jobsToDelete)) { + $this->addFlash('info', 'Cleaned up ' . count($jobsToDelete) . ' failed job(s) with no results.'); + } + } + + return $this->render('info_providers/bulk_import/manage.html.twig', [ + 'jobs' => $this->entityManager->getRepository(BulkInfoProviderImportJob::class) + ->findBy([], ['createdAt' => 'DESC']) // Refetch after cleanup + ]); + } + + #[Route('/job/{jobId}/delete', name: 'bulk_info_provider_delete', methods: ['DELETE'])] + public function deleteJob(int $jobId): Response + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + // Only allow deletion of completed, failed, or stopped jobs + if (!$job->isCompleted() && !$job->isFailed() && !$job->isStopped()) { + return $this->json(['error' => 'Cannot delete active job'], 400); + } + + $this->entityManager->remove($job); + $this->entityManager->flush(); + + return $this->json(['success' => true]); + } + + #[Route('/job/{jobId}/stop', name: 'bulk_info_provider_stop', methods: ['POST'])] + public function stopJob(int $jobId): Response + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + // Only allow stopping of pending or in-progress jobs + if (!$job->canBeStopped()) { + return $this->json(['error' => 'Cannot stop job in current status'], 400); + } + + $job->markAsStopped(); + $this->entityManager->flush(); + + return $this->json(['success' => true]); + } + + + #[Route('/step2/{jobId}', name: 'bulk_info_provider_step2')] + public function step2(int $jobId): Response + { + $this->denyAccessUnlessGranted('@info_providers.create_parts'); + + $job = $this->entityManager->getRepository(BulkInfoProviderImportJob::class)->find($jobId); + + if (!$job) { + $this->addFlash('error', 'Bulk import job not found'); + return $this->redirectToRoute('bulk_info_provider_step1'); + } + + // Check if user owns this job + if ($job->getCreatedBy() !== $this->getUser()) { + $this->addFlash('error', 'Access denied to this bulk import job'); + return $this->redirectToRoute('bulk_info_provider_step1'); + } + + // Get the parts and deserialize search results + $parts = $job->getJobParts()->map(fn($jobPart) => $jobPart->getPart())->toArray(); + $searchResults = $job->getSearchResults($this->entityManager); + + return $this->render('info_providers/bulk_import/step2.html.twig', [ + 'job' => $job, + 'parts' => $parts, + 'search_results' => $searchResults, + ]); + } + + + #[Route('/job/{jobId}/part/{partId}/mark-completed', name: 'bulk_info_provider_mark_completed', methods: ['POST'])] + public function markPartCompleted(int $jobId, int $partId): Response + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + $job->markPartAsCompleted($partId); + + // Auto-complete job if all parts are done + if ($job->isAllPartsCompleted() && !$job->isCompleted()) { + $job->markAsCompleted(); + } + + $this->entityManager->flush(); + + return $this->json([ + 'success' => true, + 'progress' => $job->getProgressPercentage(), + 'completed_count' => $job->getCompletedPartsCount(), + 'total_count' => $job->getPartCount(), + 'job_completed' => $job->isCompleted() + ]); + } + + #[Route('/job/{jobId}/part/{partId}/mark-skipped', name: 'bulk_info_provider_mark_skipped', methods: ['POST'])] + public function markPartSkipped(int $jobId, int $partId, Request $request): Response + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + $reason = $request->request->get('reason', ''); + $job->markPartAsSkipped($partId, $reason); + + // Auto-complete job if all parts are done + if ($job->isAllPartsCompleted() && !$job->isCompleted()) { + $job->markAsCompleted(); + } + + $this->entityManager->flush(); + + return $this->json([ + 'success' => true, + 'progress' => $job->getProgressPercentage(), + 'completed_count' => $job->getCompletedPartsCount(), + 'skipped_count' => $job->getSkippedPartsCount(), + 'total_count' => $job->getPartCount(), + 'job_completed' => $job->isCompleted() + ]); + } + + #[Route('/job/{jobId}/part/{partId}/mark-pending', name: 'bulk_info_provider_mark_pending', methods: ['POST'])] + public function markPartPending(int $jobId, int $partId): Response + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + $job->markPartAsPending($partId); + $this->entityManager->flush(); + + return $this->json([ + 'success' => true, + 'progress' => $job->getProgressPercentage(), + 'completed_count' => $job->getCompletedPartsCount(), + 'skipped_count' => $job->getSkippedPartsCount(), + 'total_count' => $job->getPartCount(), + 'job_completed' => $job->isCompleted() + ]); + } + + #[Route('/job/{jobId}/part/{partId}/research', name: 'bulk_info_provider_research_part', methods: ['POST'])] + public function researchPart(int $jobId, int $partId): JsonResponse + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + $part = $this->entityManager->getRepository(Part::class)->find($partId); + if (!$part) { + return $this->createErrorResponse('Part not found', 404, ['part_id' => $partId]); + } + + // Only refresh if the entity might be stale (optional optimization) + if ($this->entityManager->getUnitOfWork()->isScheduledForUpdate($part)) { + $this->entityManager->refresh($part); + } + + try { + // Use the job's field mappings to perform the search + $fieldMappingDtos = $job->getFieldMappings(); + $prefetchDetails = $job->isPrefetchDetails(); + + try { + $searchResultsDto = $this->bulkService->performBulkSearch([$part], $fieldMappingDtos, $prefetchDetails); + } catch (\Exception $searchException) { + // Handle "no search results found" as a normal case, not an error + if (str_contains($searchException->getMessage(), 'No search results found')) { + $searchResultsDto = null; + } else { + throw $searchException; + } + } + + // Update the job's search results for this specific part efficiently + $this->updatePartSearchResults($job, $searchResultsDto[0] ?? null); + + // Prefetch details if requested + if ($prefetchDetails && $searchResultsDto !== null) { + $this->bulkService->prefetchDetailsForResults($searchResultsDto); + } + + $this->entityManager->flush(); + + // Return the new results for this part + $newResults = $searchResultsDto[0] ?? null; + + return $this->json([ + 'success' => true, + 'part_id' => $partId, + 'results_count' => $newResults ? $newResults->getResultCount() : 0, + 'errors_count' => $newResults ? $newResults->getErrorCount() : 0, + 'message' => 'Part research completed successfully' + ]); + + } catch (\Exception $e) { + return $this->createErrorResponse( + 'Research failed: ' . $e->getMessage(), + 500, + [ + 'job_id' => $jobId, + 'part_id' => $partId, + 'exception' => $e->getMessage() + ] + ); + } + } + + #[Route('/job/{jobId}/research-all', name: 'bulk_info_provider_research_all', methods: ['POST'])] + public function researchAllParts(int $jobId): JsonResponse + { + $job = $this->validateJobAccess($jobId); + if (!$job) { + return $this->createErrorResponse('Job not found or access denied', 404, ['job_id' => $jobId]); + } + + // Get all parts that are not completed or skipped + $parts = []; + foreach ($job->getJobParts() as $jobPart) { + if (!$jobPart->isCompleted() && !$jobPart->isSkipped()) { + $parts[] = $jobPart->getPart(); + } + } + + if (empty($parts)) { + return $this->json([ + 'success' => true, + 'message' => 'No parts to research', + 'researched_count' => 0 + ]); + } + + try { + $fieldMappingDtos = $job->getFieldMappings(); + $prefetchDetails = $job->isPrefetchDetails(); + + // Process in batches to reduce memory usage for large operations + $allResults = new BulkSearchResponseDTO(partResults: []); + $batches = array_chunk($parts, $this->bulkImportBatchSize); + + foreach ($batches as $batch) { + $batchResultsDto = $this->bulkService->performBulkSearch($batch, $fieldMappingDtos, $prefetchDetails); + $allResults = BulkSearchResponseDTO::merge($allResults, $batchResultsDto); + + // Properly manage entity manager memory without losing state + $jobId = $job->getId(); + //$this->entityManager->clear(); //TODO: This seems to cause problems with the user relation, when trying to flush later + $job = $this->entityManager->find(BulkInfoProviderImportJob::class, $jobId); + } + + // Update the job's search results + $job->setSearchResults($allResults); + + // Prefetch details if requested + if ($prefetchDetails) { + $this->bulkService->prefetchDetailsForResults($allResults); + } + + $this->entityManager->flush(); + + return $this->json([ + 'success' => true, + 'researched_count' => count($parts), + 'message' => sprintf('Successfully researched %d parts', count($parts)) + ]); + + } catch (\Exception $e) { + return $this->createErrorResponse( + 'Bulk research failed: ' . $e->getMessage(), + 500, + [ + 'job_id' => $jobId, + 'part_count' => count($parts), + 'exception' => $e->getMessage() + ] + ); + } + } +} diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php index b9f6c775..8f4cafed 100644 --- a/src/Controller/PartController.php +++ b/src/Controller/PartController.php @@ -64,14 +64,17 @@ use Symfony\Contracts\Translation\TranslatorInterface; use function Symfony\Component\Translation\t; #[Route(path: '/part')] -class PartController extends AbstractController +final class PartController extends AbstractController { - public function __construct(protected PricedetailHelper $pricedetailHelper, - protected PartPreviewGenerator $partPreviewGenerator, + public function __construct( + private readonly PricedetailHelper $pricedetailHelper, + private readonly PartPreviewGenerator $partPreviewGenerator, private readonly TranslatorInterface $translator, - private readonly AttachmentSubmitHandler $attachmentSubmitHandler, private readonly EntityManagerInterface $em, - protected EventCommentHelper $commentHelper, private readonly PartInfoSettings $partInfoSettings) - { + private readonly AttachmentSubmitHandler $attachmentSubmitHandler, + private readonly EntityManagerInterface $em, + private readonly EventCommentHelper $commentHelper, + private readonly PartInfoSettings $partInfoSettings, + ) { } /** @@ -80,9 +83,16 @@ class PartController extends AbstractController */ #[Route(path: '/{id}/info/{timestamp}', name: 'part_info')] #[Route(path: '/{id}', requirements: ['id' => '\d+'])] - public function show(Part $part, Request $request, TimeTravel $timeTravel, HistoryHelper $historyHelper, - DataTableFactory $dataTable, ParameterExtractor $parameterExtractor, PartLotWithdrawAddHelper $withdrawAddHelper, ?string $timestamp = null): Response - { + public function show( + Part $part, + Request $request, + TimeTravel $timeTravel, + HistoryHelper $historyHelper, + DataTableFactory $dataTable, + ParameterExtractor $parameterExtractor, + PartLotWithdrawAddHelper $withdrawAddHelper, + ?string $timestamp = null + ): Response { $this->denyAccessUnlessGranted('read', $part); $timeTravel_timestamp = null; @@ -132,7 +142,43 @@ class PartController extends AbstractController { $this->denyAccessUnlessGranted('edit', $part); - return $this->renderPartForm('edit', $request, $part); + // Check if this is part of a bulk import job + $jobId = $request->query->get('jobId'); + $bulkJob = null; + if ($jobId) { + $bulkJob = $this->em->getRepository(\App\Entity\InfoProviderSystem\BulkInfoProviderImportJob::class)->find($jobId); + // Verify user owns this job + if ($bulkJob && $bulkJob->getCreatedBy() !== $this->getUser()) { + $bulkJob = null; + } + } + + return $this->renderPartForm('edit', $request, $part, [], [ + 'bulk_job' => $bulkJob + ]); + } + + #[Route(path: '/{id}/bulk-import-complete/{jobId}', name: 'part_bulk_import_complete', methods: ['POST'])] + public function markBulkImportComplete(Part $part, int $jobId, Request $request): Response + { + $this->denyAccessUnlessGranted('edit', $part); + + if (!$this->isCsrfTokenValid('bulk_complete_' . $part->getId(), $request->request->get('_token'))) { + throw $this->createAccessDeniedException('Invalid CSRF token'); + } + + $bulkJob = $this->em->getRepository(\App\Entity\InfoProviderSystem\BulkInfoProviderImportJob::class)->find($jobId); + if (!$bulkJob || $bulkJob->getCreatedBy() !== $this->getUser()) { + throw $this->createNotFoundException('Bulk import job not found'); + } + + $bulkJob->markPartAsCompleted($part->getId()); + $this->em->persist($bulkJob); + $this->em->flush(); + + $this->addFlash('success', 'Part marked as completed in bulk import'); + + return $this->redirectToRoute('bulk_info_provider_step2', ['jobId' => $jobId]); } #[Route(path: '/{id}/delivered', name: 'part_delivered')] @@ -161,7 +207,7 @@ class PartController extends AbstractController { $this->denyAccessUnlessGranted('delete', $part); - if ($this->isCsrfTokenValid('delete'.$part->getID(), $request->request->get('_token'))) { + if ($this->isCsrfTokenValid('delete' . $part->getID(), $request->request->get('_token'))) { $this->commentHelper->setMessage($request->request->get('log_comment', null)); @@ -180,11 +226,15 @@ class PartController extends AbstractController #[Route(path: '/new', name: 'part_new')] #[Route(path: '/{id}/clone', name: 'part_clone')] #[Route(path: '/new_build_part/{project_id}', name: 'part_new_build_part')] - public function new(Request $request, EntityManagerInterface $em, TranslatorInterface $translator, - AttachmentSubmitHandler $attachmentSubmitHandler, ProjectBuildPartHelper $projectBuildPartHelper, + public function new( + Request $request, + EntityManagerInterface $em, + TranslatorInterface $translator, + AttachmentSubmitHandler $attachmentSubmitHandler, + ProjectBuildPartHelper $projectBuildPartHelper, #[MapEntity(mapping: ['id' => 'id'])] ?Part $part = null, - #[MapEntity(mapping: ['project_id' => 'id'])] ?Project $project = null): Response - { + #[MapEntity(mapping: ['project_id' => 'id'])] ?Project $project = null + ): Response { if ($part instanceof Part) { //Clone part @@ -279,9 +329,14 @@ class PartController extends AbstractController } #[Route(path: '/{id}/from_info_provider/{providerKey}/{providerId}/update', name: 'info_providers_update_part', requirements: ['providerId' => '.+'])] - public function updateFromInfoProvider(Part $part, Request $request, string $providerKey, string $providerId, - PartInfoRetriever $infoRetriever, PartMerger $partMerger): Response - { + public function updateFromInfoProvider( + Part $part, + Request $request, + string $providerKey, + string $providerId, + PartInfoRetriever $infoRetriever, + PartMerger $partMerger + ): Response { $this->denyAccessUnlessGranted('edit', $part); $this->denyAccessUnlessGranted('@info_providers.create_parts'); @@ -295,10 +350,22 @@ class PartController extends AbstractController $this->addFlash('notice', t('part.merge.flash.please_review')); + // Check if this is part of a bulk import job + $jobId = $request->query->get('jobId'); + $bulkJob = null; + if ($jobId) { + $bulkJob = $this->em->getRepository(\App\Entity\InfoProviderSystem\BulkInfoProviderImportJob::class)->find($jobId); + // Verify user owns this job + if ($bulkJob && $bulkJob->getCreatedBy() !== $this->getUser()) { + $bulkJob = null; + } + } + return $this->renderPartForm('update_from_ip', $request, $part, [ 'info_provider_dto' => $dto, ], [ - 'tname_before' => $old_name + 'tname_before' => $old_name, + 'bulk_job' => $bulkJob ]); } @@ -333,7 +400,7 @@ class PartController extends AbstractController } catch (AttachmentDownloadException $attachmentDownloadException) { $this->addFlash( 'error', - $this->translator->trans('attachment.download_failed').' '.$attachmentDownloadException->getMessage() + $this->translator->trans('attachment.download_failed') . ' ' . $attachmentDownloadException->getMessage() ); } } @@ -374,6 +441,12 @@ class PartController extends AbstractController return $this->redirectToRoute('part_new'); } + // Check if we're in bulk import mode and preserve jobId + $jobId = $request->query->get('jobId'); + if ($jobId && isset($merge_infos['bulk_job'])) { + return $this->redirectToRoute('part_edit', ['id' => $new_part->getID(), 'jobId' => $jobId]); + } + return $this->redirectToRoute('part_edit', ['id' => $new_part->getID()]); } @@ -392,13 +465,17 @@ class PartController extends AbstractController $template = 'parts/edit/update_from_ip.html.twig'; } - return $this->render($template, + return $this->render( + $template, [ 'part' => $new_part, 'form' => $form, 'merge_old_name' => $merge_infos['tname_before'] ?? null, - 'merge_other' => $merge_infos['other_part'] ?? null - ]); + 'merge_other' => $merge_infos['other_part'] ?? null, + 'bulk_job' => $merge_infos['bulk_job'] ?? null, + 'jobId' => $request->query->get('jobId') + ] + ); } @@ -408,17 +485,17 @@ class PartController extends AbstractController if ($this->isCsrfTokenValid('part_withraw' . $part->getID(), $request->request->get('_csfr'))) { //Retrieve partlot from the request $partLot = $em->find(PartLot::class, $request->request->get('lot_id')); - if(!$partLot instanceof PartLot) { + if (!$partLot instanceof PartLot) { throw new \RuntimeException('Part lot not found!'); } //Ensure that the partlot belongs to the part - if($partLot->getPart() !== $part) { + if ($partLot->getPart() !== $part) { throw new \RuntimeException("The origin partlot does not belong to the part!"); } //Try to determine the target lot (used for move actions), if the parameter is existing $targetId = $request->request->get('target_id', null); - $targetLot = $targetId ? $em->find(PartLot::class, $targetId) : null; + $targetLot = $targetId ? $em->find(PartLot::class, $targetId) : null; if ($targetLot && $targetLot->getPart() !== $part) { throw new \RuntimeException("The target partlot does not belong to the part!"); } @@ -432,12 +509,12 @@ class PartController extends AbstractController $timestamp = null; $timestamp_str = $request->request->getString('timestamp', ''); //Try to parse the timestamp - if($timestamp_str !== '') { + if ($timestamp_str !== '') { $timestamp = new DateTime($timestamp_str); } //Ensure that the timestamp is not in the future - if($timestamp !== null && $timestamp > new DateTime("+20min")) { + if ($timestamp !== null && $timestamp > new DateTime("+20min")) { throw new \LogicException("The timestamp must not be in the future!"); } @@ -481,7 +558,7 @@ class PartController extends AbstractController err: //If a redirect was passed, then redirect there - if($request->request->get('_redirect')) { + if ($request->request->get('_redirect')) { return $this->redirect($request->request->get('_redirect')); } //Otherwise just redirect to the part page diff --git a/src/Controller/PartListsController.php b/src/Controller/PartListsController.php index b2df18c1..8ea218f4 100644 --- a/src/Controller/PartListsController.php +++ b/src/Controller/PartListsController.php @@ -154,12 +154,17 @@ class PartListsController extends AbstractController $filter_changer($filter); } - $filterForm = $this->createForm(PartFilterType::class, $filter, ['method' => 'GET']); - if($form_changer !== null) { - $form_changer($filterForm); - } + //If we are in a post request for the tables, we only have to apply the filter form if the submit query param was set + //This saves us some time from creating this complicated term on simple list pages, where no special filter is applied + $filterForm = null; + if ($request->getMethod() !== 'POST' || $request->query->has('part_filter')) { + $filterForm = $this->createForm(PartFilterType::class, $filter, ['method' => 'GET']); + if ($form_changer !== null) { + $form_changer($filterForm); + } - $filterForm->handleRequest($formRequest); + $filterForm->handleRequest($formRequest); + } $table = $this->dataTableFactory->createFromType(PartsDataTable::class, array_merge( ['filter' => $filter], $additional_table_vars), @@ -186,7 +191,7 @@ class PartListsController extends AbstractController return $this->render($template, array_merge([ 'datatable' => $table, - 'filterForm' => $filterForm->createView(), + 'filterForm' => $filterForm?->createView(), ], $additonal_template_vars)); } diff --git a/src/DataTables/Filters/Constraints/Part/BulkImportJobExistsConstraint.php b/src/DataTables/Filters/Constraints/Part/BulkImportJobExistsConstraint.php new file mode 100644 index 00000000..9d21dd58 --- /dev/null +++ b/src/DataTables/Filters/Constraints/Part/BulkImportJobExistsConstraint.php @@ -0,0 +1,59 @@ +. + */ + +namespace App\DataTables\Filters\Constraints\Part; + +use App\DataTables\Filters\Constraints\BooleanConstraint; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use Doctrine\ORM\QueryBuilder; + +class BulkImportJobExistsConstraint extends BooleanConstraint +{ + + public function __construct() + { + parent::__construct('bulk_import_job_exists'); + } + + public function apply(QueryBuilder $queryBuilder): void + { + // Do not apply a filter if value is null (filter is set to ignore) + if (!$this->isEnabled()) { + return; + } + + // Use EXISTS subquery to avoid join conflicts + $existsSubquery = $queryBuilder->getEntityManager()->createQueryBuilder(); + $existsSubquery->select('1') + ->from(BulkInfoProviderImportJobPart::class, 'bip_exists') + ->where('bip_exists.part = part.id'); + + if ($this->value === true) { + // Filter for parts that ARE in bulk import jobs + $queryBuilder->andWhere('EXISTS (' . $existsSubquery->getDQL() . ')'); + } else { + // Filter for parts that are NOT in bulk import jobs + $queryBuilder->andWhere('NOT EXISTS (' . $existsSubquery->getDQL() . ')'); + } + } +} diff --git a/src/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraint.php b/src/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraint.php new file mode 100644 index 00000000..d9451577 --- /dev/null +++ b/src/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraint.php @@ -0,0 +1,64 @@ +. + */ + +namespace App\DataTables\Filters\Constraints\Part; + +use App\DataTables\Filters\Constraints\AbstractConstraint; +use App\DataTables\Filters\Constraints\ChoiceConstraint; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use Doctrine\ORM\QueryBuilder; + +class BulkImportJobStatusConstraint extends ChoiceConstraint +{ + + public function __construct() + { + parent::__construct('bulk_import_job_status'); + } + + public function apply(QueryBuilder $queryBuilder): void + { + // Do not apply a filter if values are empty or operator is null + if (!$this->isEnabled()) { + return; + } + + // Use EXISTS subquery to check if part has a job with the specified status(es) + $existsSubquery = $queryBuilder->getEntityManager()->createQueryBuilder(); + $existsSubquery->select('1') + ->from(BulkInfoProviderImportJobPart::class, 'bip_status') + ->join('bip_status.job', 'job_status') + ->where('bip_status.part = part.id'); + + // Add status conditions based on operator + if ($this->operator === 'ANY') { + $existsSubquery->andWhere('job_status.status IN (:job_status_values)'); + $queryBuilder->andWhere('EXISTS (' . $existsSubquery->getDQL() . ')'); + $queryBuilder->setParameter('job_status_values', $this->value); + } elseif ($this->operator === 'NONE') { + $existsSubquery->andWhere('job_status.status IN (:job_status_values)'); + $queryBuilder->andWhere('NOT EXISTS (' . $existsSubquery->getDQL() . ')'); + $queryBuilder->setParameter('job_status_values', $this->value); + } + } +} diff --git a/src/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraint.php b/src/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraint.php new file mode 100644 index 00000000..7656a290 --- /dev/null +++ b/src/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraint.php @@ -0,0 +1,61 @@ +. + */ + +namespace App\DataTables\Filters\Constraints\Part; + +use App\DataTables\Filters\Constraints\ChoiceConstraint; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use Doctrine\ORM\QueryBuilder; + +class BulkImportPartStatusConstraint extends ChoiceConstraint +{ + public function __construct() + { + parent::__construct('bulk_import_part_status'); + } + + public function apply(QueryBuilder $queryBuilder): void + { + // Do not apply a filter if values are empty or operator is null + if (!$this->isEnabled()) { + return; + } + + // Use EXISTS subquery to check if part has the specified status(es) + $existsSubquery = $queryBuilder->getEntityManager()->createQueryBuilder(); + $existsSubquery->select('1') + ->from(BulkInfoProviderImportJobPart::class, 'bip_part_status') + ->where('bip_part_status.part = part.id'); + + // Add status conditions based on operator + if ($this->operator === 'ANY') { + $existsSubquery->andWhere('bip_part_status.status IN (:part_status_values)'); + $queryBuilder->andWhere('EXISTS (' . $existsSubquery->getDQL() . ')'); + $queryBuilder->setParameter('part_status_values', $this->value); + } elseif ($this->operator === 'NONE') { + $existsSubquery->andWhere('bip_part_status.status IN (:part_status_values)'); + $queryBuilder->andWhere('NOT EXISTS (' . $existsSubquery->getDQL() . ')'); + $queryBuilder->setParameter('part_status_values', $this->value); + } + } +} diff --git a/src/DataTables/Filters/PartFilter.php b/src/DataTables/Filters/PartFilter.php index 3e79ed45..7e6db49c 100644 --- a/src/DataTables/Filters/PartFilter.php +++ b/src/DataTables/Filters/PartFilter.php @@ -29,6 +29,9 @@ use App\DataTables\Filters\Constraints\DateTimeConstraint; use App\DataTables\Filters\Constraints\EntityConstraint; use App\DataTables\Filters\Constraints\IntConstraint; use App\DataTables\Filters\Constraints\NumberConstraint; +use App\DataTables\Filters\Constraints\Part\BulkImportJobExistsConstraint; +use App\DataTables\Filters\Constraints\Part\BulkImportJobStatusConstraint; +use App\DataTables\Filters\Constraints\Part\BulkImportPartStatusConstraint; use App\DataTables\Filters\Constraints\Part\LessThanDesiredConstraint; use App\DataTables\Filters\Constraints\Part\ParameterConstraint; use App\DataTables\Filters\Constraints\Part\TagsConstraint; @@ -104,6 +107,14 @@ class PartFilter implements FilterInterface public readonly TextConstraint $bomName; public readonly TextConstraint $bomComment; + /************************************************* + * Bulk Import Job tab + *************************************************/ + + public readonly BulkImportJobExistsConstraint $inBulkImportJob; + public readonly BulkImportJobStatusConstraint $bulkImportJobStatus; + public readonly BulkImportPartStatusConstraint $bulkImportPartStatus; + public function __construct(NodesListBuilder $nodesListBuilder) { //Must be done for every new set of attachment filters, to ensure deterministic parameter names. @@ -134,7 +145,7 @@ class PartFilter implements FilterInterface */ $this->amountSum = (new IntConstraint('( SELECT COALESCE(SUM(__partLot.amount), 0.0) - FROM '.PartLot::class.' __partLot + FROM ' . PartLot::class . ' __partLot WHERE __partLot.part = part.id AND __partLot.instock_unknown = false AND (__partLot.expiration_date IS NULL OR __partLot.expiration_date > CURRENT_DATE()) @@ -170,6 +181,11 @@ class PartFilter implements FilterInterface $this->bomName = new TextConstraint('_projectBomEntries.name'); $this->bomComment = new TextConstraint('_projectBomEntries.comment'); + // Bulk Import Job filters + $this->inBulkImportJob = new BulkImportJobExistsConstraint(); + $this->bulkImportJobStatus = new BulkImportJobStatusConstraint(); + $this->bulkImportPartStatus = new BulkImportPartStatusConstraint(); + } public function apply(QueryBuilder $queryBuilder): void diff --git a/src/DataTables/PartsDataTable.php b/src/DataTables/PartsDataTable.php index 62be8b80..de7313b7 100644 --- a/src/DataTables/PartsDataTable.php +++ b/src/DataTables/PartsDataTable.php @@ -142,18 +142,20 @@ final class PartsDataTable implements DataTableTypeInterface 'label' => $this->translator->trans('part.table.storeLocations'), //We need to use a aggregate function to get the first store location, as we have a one-to-many relation 'orderField' => 'NATSORT(MIN(_storelocations.name))', - 'render' => fn ($value, Part $context) => $this->partDataTableHelper->renderStorageLocations($context), + 'render' => fn($value, Part $context) => $this->partDataTableHelper->renderStorageLocations($context), ], alias: 'storage_location') ->add('amount', TextColumn::class, [ 'label' => $this->translator->trans('part.table.amount'), - 'render' => fn ($value, Part $context) => $this->partDataTableHelper->renderAmount($context), + 'render' => fn($value, Part $context) => $this->partDataTableHelper->renderAmount($context), 'orderField' => 'amountSum' ]) ->add('minamount', TextColumn::class, [ 'label' => $this->translator->trans('part.table.minamount'), - 'render' => fn($value, Part $context): string => htmlspecialchars($this->amountFormatter->format($value, - $context->getPartUnit())), + 'render' => fn($value, Part $context): string => htmlspecialchars($this->amountFormatter->format( + $value, + $context->getPartUnit() + )), ]) ->add('orderamount', TextColumn::class, [ 'label' => $this->translator->trans('part.table.orderamount'), @@ -167,7 +169,7 @@ final class PartsDataTable implements DataTableTypeInterface ->add('partUnit', TextColumn::class, [ 'label' => $this->translator->trans('part.table.partUnit'), 'orderField' => 'NATSORT(_partUnit.name)', - 'render' => function($value, Part $context): string { + 'render' => function ($value, Part $context): string { $partUnit = $context->getPartUnit(); if ($partUnit === null) { return ''; @@ -176,7 +178,7 @@ final class PartsDataTable implements DataTableTypeInterface $tmp = htmlspecialchars($partUnit->getName()); if ($partUnit->getUnit()) { - $tmp .= ' ('.htmlspecialchars($partUnit->getUnit()).')'; + $tmp .= ' (' . htmlspecialchars($partUnit->getUnit()) . ')'; } return $tmp; } @@ -239,7 +241,7 @@ final class PartsDataTable implements DataTableTypeInterface } if (count($projects) > $max) { - $tmp .= ", + ".(count($projects) - $max); + $tmp .= ", + " . (count($projects) - $max); } return $tmp; @@ -375,7 +377,7 @@ final class PartsDataTable implements DataTableTypeInterface $builder->addSelect( '( SELECT COALESCE(SUM(partLot.amount), 0.0) - FROM '.PartLot::class.' partLot + FROM ' . PartLot::class . ' partLot WHERE partLot.part = part.id AND partLot.instock_unknown = false AND (partLot.expiration_date IS NULL OR partLot.expiration_date > CURRENT_DATE()) @@ -432,6 +434,13 @@ final class PartsDataTable implements DataTableTypeInterface //Do not group by many-to-* relations, as it would restrict the COUNT having clauses to be maximum 1 //$builder->addGroupBy('_projectBomEntries'); } + if (str_contains($dql, '_jobPart')) { + $builder->leftJoin('part.bulkImportJobParts', '_jobPart'); + $builder->leftJoin('_jobPart.job', '_bulkImportJob'); + //Do not group by many-to-* relations, as it would restrict the COUNT having clauses to be maximum 1 + //$builder->addGroupBy('_jobPart'); + //$builder->addGroupBy('_bulkImportJob'); + } return $builder; } diff --git a/src/Entity/Base/AbstractCompany.php b/src/Entity/Base/AbstractCompany.php index 947d1339..57a3f722 100644 --- a/src/Entity/Base/AbstractCompany.php +++ b/src/Entity/Base/AbstractCompany.php @@ -81,7 +81,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement /** * @var string The website of the company */ - #[Assert\Url] + #[Assert\Url(requireTld: false)] #[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])] #[ORM\Column(type: Types::STRING)] #[Assert\Length(max: 255)] diff --git a/src/Entity/InfoProviderSystem/BulkImportJobStatus.php b/src/Entity/InfoProviderSystem/BulkImportJobStatus.php new file mode 100644 index 00000000..7a88802f --- /dev/null +++ b/src/Entity/InfoProviderSystem/BulkImportJobStatus.php @@ -0,0 +1,35 @@ +. + */ + +declare(strict_types=1); + +namespace App\Entity\InfoProviderSystem; + +use Symfony\Contracts\Translation\TranslatableInterface; +use Symfony\Contracts\Translation\TranslatorInterface; + +enum BulkImportJobStatus: string +{ + case PENDING = 'pending'; + case IN_PROGRESS = 'in_progress'; + case COMPLETED = 'completed'; + case STOPPED = 'stopped'; + case FAILED = 'failed'; +} diff --git a/src/Entity/InfoProviderSystem/BulkImportPartStatus.php b/src/Entity/InfoProviderSystem/BulkImportPartStatus.php new file mode 100644 index 00000000..0eedc553 --- /dev/null +++ b/src/Entity/InfoProviderSystem/BulkImportPartStatus.php @@ -0,0 +1,32 @@ +. + */ + +declare(strict_types=1); + +namespace App\Entity\InfoProviderSystem; + + +enum BulkImportPartStatus: string +{ + case PENDING = 'pending'; + case COMPLETED = 'completed'; + case SKIPPED = 'skipped'; + case FAILED = 'failed'; +} diff --git a/src/Entity/InfoProviderSystem/BulkInfoProviderImportJob.php b/src/Entity/InfoProviderSystem/BulkInfoProviderImportJob.php new file mode 100644 index 00000000..bc842a26 --- /dev/null +++ b/src/Entity/InfoProviderSystem/BulkInfoProviderImportJob.php @@ -0,0 +1,449 @@ +. + */ + +declare(strict_types=1); + +namespace App\Entity\InfoProviderSystem; + +use App\Entity\Base\AbstractDBElement; +use App\Entity\Parts\Part; +use App\Entity\UserSystem\User; +use App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; +use Doctrine\DBAL\Types\Types; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping as ORM; + +#[ORM\Entity] +#[ORM\Table(name: 'bulk_info_provider_import_jobs')] +class BulkInfoProviderImportJob extends AbstractDBElement +{ + #[ORM\Column(type: Types::TEXT)] + private string $name = ''; + + #[ORM\Column(type: Types::JSON)] + private array $fieldMappings = []; + + /** + * @var BulkSearchFieldMappingDTO[] The deserialized field mappings DTOs, cached for performance + */ + private ?array $fieldMappingsDTO = null; + + #[ORM\Column(type: Types::JSON)] + private array $searchResults = []; + + /** + * @var BulkSearchResponseDTO|null The deserialized search results DTO, cached for performance + */ + private ?BulkSearchResponseDTO $searchResultsDTO = null; + + #[ORM\Column(type: Types::STRING, length: 20, enumType: BulkImportJobStatus::class)] + private BulkImportJobStatus $status = BulkImportJobStatus::PENDING; + + #[ORM\Column(type: Types::DATETIME_IMMUTABLE)] + private \DateTimeImmutable $createdAt; + + #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)] + private ?\DateTimeImmutable $completedAt = null; + + #[ORM\Column(type: Types::BOOLEAN)] + private bool $prefetchDetails = false; + + #[ORM\ManyToOne(targetEntity: User::class)] + #[ORM\JoinColumn(nullable: false)] + private ?User $createdBy = null; + + /** @var Collection */ + #[ORM\OneToMany(targetEntity: BulkInfoProviderImportJobPart::class, mappedBy: 'job', cascade: ['persist', 'remove'], orphanRemoval: true)] + private Collection $jobParts; + + public function __construct() + { + $this->createdAt = new \DateTimeImmutable(); + $this->jobParts = new ArrayCollection(); + } + + public function getName(): string + { + return $this->name; + } + + public function getDisplayNameKey(): string + { + return 'info_providers.bulk_import.job_name_template'; + } + + public function getDisplayNameParams(): array + { + return ['%count%' => $this->getPartCount()]; + } + + public function getFormattedTimestamp(): string + { + return $this->createdAt->format('Y-m-d H:i:s'); + } + + public function setName(string $name): self + { + $this->name = $name; + return $this; + } + + public function getJobParts(): Collection + { + return $this->jobParts; + } + + public function addJobPart(BulkInfoProviderImportJobPart $jobPart): self + { + if (!$this->jobParts->contains($jobPart)) { + $this->jobParts->add($jobPart); + $jobPart->setJob($this); + } + return $this; + } + + public function removeJobPart(BulkInfoProviderImportJobPart $jobPart): self + { + if ($this->jobParts->removeElement($jobPart)) { + if ($jobPart->getJob() === $this) { + $jobPart->setJob(null); + } + } + return $this; + } + + public function getPartIds(): array + { + return $this->jobParts->map(fn($jobPart) => $jobPart->getPart()->getId())->toArray(); + } + + public function setPartIds(array $partIds): self + { + // This method is kept for backward compatibility but should be replaced with addJobPart + // Clear existing job parts + $this->jobParts->clear(); + + // Add new job parts (this would need the actual Part entities, not just IDs) + // This is a simplified implementation - in practice, you'd want to pass Part entities + return $this; + } + + public function addPart(Part $part): self + { + $jobPart = new BulkInfoProviderImportJobPart($this, $part); + $this->addJobPart($jobPart); + return $this; + } + + /** + * @return BulkSearchFieldMappingDTO[] The deserialized field mappings + */ + public function getFieldMappings(): array + { + if ($this->fieldMappingsDTO === null) { + // Lazy load the DTOs from the raw JSON data + $this->fieldMappingsDTO = array_map( + static fn($data) => BulkSearchFieldMappingDTO::fromSerializableArray($data), + $this->fieldMappings + ); + } + + return $this->fieldMappingsDTO; + } + + /** + * @param BulkSearchFieldMappingDTO[] $fieldMappings + * @return $this + */ + public function setFieldMappings(array $fieldMappings): self + { + //Ensure that we are dealing with the objects here + if (count($fieldMappings) > 0 && !$fieldMappings[0] instanceof BulkSearchFieldMappingDTO) { + throw new \InvalidArgumentException('Expected an array of FieldMappingDTO objects'); + } + + $this->fieldMappingsDTO = $fieldMappings; + + $this->fieldMappings = array_map( + static fn(BulkSearchFieldMappingDTO $dto) => $dto->toSerializableArray(), + $fieldMappings + ); + return $this; + } + + public function getSearchResultsRaw(): array + { + return $this->searchResults; + } + + public function setSearchResultsRaw(array $searchResults): self + { + $this->searchResults = $searchResults; + return $this; + } + + public function setSearchResults(BulkSearchResponseDTO $searchResponse): self + { + $this->searchResultsDTO = $searchResponse; + $this->searchResults = $searchResponse->toSerializableRepresentation(); + return $this; + } + + public function getSearchResults(EntityManagerInterface $entityManager): BulkSearchResponseDTO + { + if ($this->searchResultsDTO === null) { + // Lazy load the DTO from the raw JSON data + $this->searchResultsDTO = BulkSearchResponseDTO::fromSerializableRepresentation($this->searchResults, $entityManager); + } + return $this->searchResultsDTO; + } + + public function hasSearchResults(): bool + { + return !empty($this->searchResults); + } + + public function getStatus(): BulkImportJobStatus + { + return $this->status; + } + + public function setStatus(BulkImportJobStatus $status): self + { + $this->status = $status; + return $this; + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->createdAt; + } + + public function getCompletedAt(): ?\DateTimeImmutable + { + return $this->completedAt; + } + + public function setCompletedAt(?\DateTimeImmutable $completedAt): self + { + $this->completedAt = $completedAt; + return $this; + } + + public function isPrefetchDetails(): bool + { + return $this->prefetchDetails; + } + + public function setPrefetchDetails(bool $prefetchDetails): self + { + $this->prefetchDetails = $prefetchDetails; + return $this; + } + + public function getCreatedBy(): User + { + return $this->createdBy; + } + + public function setCreatedBy(User $createdBy): self + { + $this->createdBy = $createdBy; + return $this; + } + + public function getProgress(): array + { + $progress = []; + foreach ($this->jobParts as $jobPart) { + $progressData = [ + 'status' => $jobPart->getStatus()->value + ]; + + // Only include completed_at if it's not null + if ($jobPart->getCompletedAt() !== null) { + $progressData['completed_at'] = $jobPart->getCompletedAt()->format('c'); + } + + // Only include reason if it's not null + if ($jobPart->getReason() !== null) { + $progressData['reason'] = $jobPart->getReason(); + } + + $progress[$jobPart->getPart()->getId()] = $progressData; + } + return $progress; + } + + public function markAsCompleted(): self + { + $this->status = BulkImportJobStatus::COMPLETED; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsFailed(): self + { + $this->status = BulkImportJobStatus::FAILED; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsStopped(): self + { + $this->status = BulkImportJobStatus::STOPPED; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsInProgress(): self + { + $this->status = BulkImportJobStatus::IN_PROGRESS; + return $this; + } + + public function isPending(): bool + { + return $this->status === BulkImportJobStatus::PENDING; + } + + public function isInProgress(): bool + { + return $this->status === BulkImportJobStatus::IN_PROGRESS; + } + + public function isCompleted(): bool + { + return $this->status === BulkImportJobStatus::COMPLETED; + } + + public function isFailed(): bool + { + return $this->status === BulkImportJobStatus::FAILED; + } + + public function isStopped(): bool + { + return $this->status === BulkImportJobStatus::STOPPED; + } + + public function canBeStopped(): bool + { + return $this->status === BulkImportJobStatus::PENDING || $this->status === BulkImportJobStatus::IN_PROGRESS; + } + + public function getPartCount(): int + { + return $this->jobParts->count(); + } + + public function getResultCount(): int + { + $count = 0; + foreach ($this->searchResults as $partResult) { + $count += count($partResult['search_results'] ?? []); + } + return $count; + } + + public function markPartAsCompleted(int $partId): self + { + $jobPart = $this->findJobPartByPartId($partId); + if ($jobPart) { + $jobPart->markAsCompleted(); + } + return $this; + } + + public function markPartAsSkipped(int $partId, string $reason = ''): self + { + $jobPart = $this->findJobPartByPartId($partId); + if ($jobPart) { + $jobPart->markAsSkipped($reason); + } + return $this; + } + + public function markPartAsPending(int $partId): self + { + $jobPart = $this->findJobPartByPartId($partId); + if ($jobPart) { + $jobPart->markAsPending(); + } + return $this; + } + + public function isPartCompleted(int $partId): bool + { + $jobPart = $this->findJobPartByPartId($partId); + return $jobPart ? $jobPart->isCompleted() : false; + } + + public function isPartSkipped(int $partId): bool + { + $jobPart = $this->findJobPartByPartId($partId); + return $jobPart ? $jobPart->isSkipped() : false; + } + + public function getCompletedPartsCount(): int + { + return $this->jobParts->filter(fn($jobPart) => $jobPart->isCompleted())->count(); + } + + public function getSkippedPartsCount(): int + { + return $this->jobParts->filter(fn($jobPart) => $jobPart->isSkipped())->count(); + } + + private function findJobPartByPartId(int $partId): ?BulkInfoProviderImportJobPart + { + foreach ($this->jobParts as $jobPart) { + if ($jobPart->getPart()->getId() === $partId) { + return $jobPart; + } + } + return null; + } + + public function getProgressPercentage(): float + { + $total = $this->getPartCount(); + if ($total === 0) { + return 100.0; + } + + $completed = $this->getCompletedPartsCount() + $this->getSkippedPartsCount(); + return round(($completed / $total) * 100, 1); + } + + public function isAllPartsCompleted(): bool + { + $total = $this->getPartCount(); + if ($total === 0) { + return true; + } + + $completed = $this->getCompletedPartsCount() + $this->getSkippedPartsCount(); + return $completed >= $total; + } +} diff --git a/src/Entity/InfoProviderSystem/BulkInfoProviderImportJobPart.php b/src/Entity/InfoProviderSystem/BulkInfoProviderImportJobPart.php new file mode 100644 index 00000000..90519561 --- /dev/null +++ b/src/Entity/InfoProviderSystem/BulkInfoProviderImportJobPart.php @@ -0,0 +1,182 @@ +. + */ + +declare(strict_types=1); + +/* + * This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony). + * + * Copyright (C) 2019 - 2023 Jan Bรถhmer (https://github.com/jbtronics) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace App\Entity\InfoProviderSystem; + +use App\Entity\Base\AbstractDBElement; +use App\Entity\Parts\Part; +use Doctrine\DBAL\Types\Types; +use Doctrine\ORM\Mapping as ORM; + +#[ORM\Entity] +#[ORM\Table(name: 'bulk_info_provider_import_job_parts')] +#[ORM\UniqueConstraint(name: 'unique_job_part', columns: ['job_id', 'part_id'])] +class BulkInfoProviderImportJobPart extends AbstractDBElement +{ + #[ORM\ManyToOne(targetEntity: BulkInfoProviderImportJob::class, inversedBy: 'jobParts')] + #[ORM\JoinColumn(nullable: false)] + private BulkInfoProviderImportJob $job; + + #[ORM\ManyToOne(targetEntity: Part::class, inversedBy: 'bulkImportJobParts')] + #[ORM\JoinColumn(nullable: false)] + private Part $part; + + #[ORM\Column(type: Types::STRING, length: 20, enumType: BulkImportPartStatus::class)] + private BulkImportPartStatus $status = BulkImportPartStatus::PENDING; + + #[ORM\Column(type: Types::TEXT, nullable: true)] + private ?string $reason = null; + + #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)] + private ?\DateTimeImmutable $completedAt = null; + + public function __construct(BulkInfoProviderImportJob $job, Part $part) + { + $this->job = $job; + $this->part = $part; + } + + public function getJob(): BulkInfoProviderImportJob + { + return $this->job; + } + + public function setJob(?BulkInfoProviderImportJob $job): self + { + $this->job = $job; + return $this; + } + + public function getPart(): Part + { + return $this->part; + } + + public function setPart(?Part $part): self + { + $this->part = $part; + return $this; + } + + public function getStatus(): BulkImportPartStatus + { + return $this->status; + } + + public function setStatus(BulkImportPartStatus $status): self + { + $this->status = $status; + return $this; + } + + public function getReason(): ?string + { + return $this->reason; + } + + public function setReason(?string $reason): self + { + $this->reason = $reason; + return $this; + } + + public function getCompletedAt(): ?\DateTimeImmutable + { + return $this->completedAt; + } + + public function setCompletedAt(?\DateTimeImmutable $completedAt): self + { + $this->completedAt = $completedAt; + return $this; + } + + public function markAsCompleted(): self + { + $this->status = BulkImportPartStatus::COMPLETED; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsSkipped(string $reason = ''): self + { + $this->status = BulkImportPartStatus::SKIPPED; + $this->reason = $reason; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsFailed(string $reason = ''): self + { + $this->status = BulkImportPartStatus::FAILED; + $this->reason = $reason; + $this->completedAt = new \DateTimeImmutable(); + return $this; + } + + public function markAsPending(): self + { + $this->status = BulkImportPartStatus::PENDING; + $this->reason = null; + $this->completedAt = null; + return $this; + } + + public function isPending(): bool + { + return $this->status === BulkImportPartStatus::PENDING; + } + + public function isCompleted(): bool + { + return $this->status === BulkImportPartStatus::COMPLETED; + } + + public function isSkipped(): bool + { + return $this->status === BulkImportPartStatus::SKIPPED; + } + + public function isFailed(): bool + { + return $this->status === BulkImportPartStatus::FAILED; + } +} diff --git a/src/Entity/LogSystem/LogTargetType.php b/src/Entity/LogSystem/LogTargetType.php index 1c6e4f8c..61a2b081 100644 --- a/src/Entity/LogSystem/LogTargetType.php +++ b/src/Entity/LogSystem/LogTargetType.php @@ -24,6 +24,8 @@ namespace App\Entity\LogSystem; use App\Entity\Attachments\Attachment; use App\Entity\Attachments\AttachmentType; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; use App\Entity\LabelSystem\LabelProfile; use App\Entity\Parameters\AbstractParameter; use App\Entity\Parts\Category; @@ -67,6 +69,8 @@ enum LogTargetType: int case LABEL_PROFILE = 19; case PART_ASSOCIATION = 20; + case BULK_INFO_PROVIDER_IMPORT_JOB = 21; + case BULK_INFO_PROVIDER_IMPORT_JOB_PART = 22; /** * Returns the class name of the target type or null if the target type is NONE. @@ -96,6 +100,8 @@ enum LogTargetType: int self::PARAMETER => AbstractParameter::class, self::LABEL_PROFILE => LabelProfile::class, self::PART_ASSOCIATION => PartAssociation::class, + self::BULK_INFO_PROVIDER_IMPORT_JOB => BulkInfoProviderImportJob::class, + self::BULK_INFO_PROVIDER_IMPORT_JOB_PART => BulkInfoProviderImportJobPart::class, }; } diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index 50f036c0..d3c6ffdf 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -22,8 +22,6 @@ declare(strict_types=1); namespace App\Entity\Parts; -use App\ApiPlatform\Filter\TagFilter; -use Doctrine\Common\Collections\Criteria; use ApiPlatform\Doctrine\Common\Filter\DateFilterInterface; use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter; use ApiPlatform\Doctrine\Orm\Filter\DateFilter; @@ -40,10 +38,12 @@ use ApiPlatform\Serializer\Filter\PropertyFilter; use App\ApiPlatform\Filter\EntityFilter; use App\ApiPlatform\Filter\LikeFilter; use App\ApiPlatform\Filter\PartStoragelocationFilter; +use App\ApiPlatform\Filter\TagFilter; use App\Entity\Attachments\Attachment; use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Attachments\PartAttachment; use App\Entity\EDA\EDAPartInfo; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; use App\Entity\Parameters\ParametersTrait; use App\Entity\Parameters\PartParameter; use App\Entity\Parts\PartTraits\AdvancedPropertyTrait; @@ -59,6 +59,7 @@ use App\Repository\PartRepository; use App\Validator\Constraints\UniqueObjectCollection; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\Mapping as ORM; use Doctrine\DBAL\Types\Types; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -84,8 +85,18 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; #[ORM\Index(columns: ['ipn'], name: 'parts_idx_ipn')] #[ApiResource( operations: [ - new Get(normalizationContext: ['groups' => ['part:read', 'provider_reference:read', 'api:basic:read', 'part_lot:read', - 'orderdetail:read', 'pricedetail:read', 'parameter:read', 'attachment:read', 'eda_info:read'], + new Get(normalizationContext: [ + 'groups' => [ + 'part:read', + 'provider_reference:read', + 'api:basic:read', + 'part_lot:read', + 'orderdetail:read', + 'pricedetail:read', + 'parameter:read', + 'attachment:read', + 'eda_info:read' + ], 'openapi_definition_name' => 'Read', ], security: 'is_granted("read", object)'), new GetCollection(security: 'is_granted("@parts.read")'), @@ -93,7 +104,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; new Patch(security: 'is_granted("edit", object)'), new Delete(security: 'is_granted("delete", object)'), ], - normalizationContext: ['groups' => ['part:read', 'provider_reference:read', 'api:basic:read', 'part_lot:read'], 'openapi_definition_name' => 'Read'], + normalizationContext: ['groups' => ['part:read', 'provider_reference:read', 'api:basic:read', 'part_lot:read'], 'openapi_definition_name' => 'Read'], denormalizationContext: ['groups' => ['part:write', 'api:basic:write', 'eda_info:write', 'attachment:write', 'parameter:write'], 'openapi_definition_name' => 'Write'], )] #[ApiFilter(PropertyFilter::class)] @@ -101,7 +112,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; #[ApiFilter(PartStoragelocationFilter::class, properties: ["storage_location"])] #[ApiFilter(LikeFilter::class, properties: ["name", "comment", "description", "ipn", "manufacturer_product_number"])] #[ApiFilter(TagFilter::class, properties: ["tags"])] -#[ApiFilter(BooleanFilter::class, properties: ["favorite" , "needs_review"])] +#[ApiFilter(BooleanFilter::class, properties: ["favorite", "needs_review"])] #[ApiFilter(RangeFilter::class, properties: ["mass", "minamount", "orderamount"])] #[ApiFilter(DateFilter::class, strategy: DateFilterInterface::EXCLUDE_NULL)] #[ApiFilter(OrderFilter::class, properties: ['name', 'id', 'orderDelivery', 'addedDate', 'lastModified'])] @@ -170,6 +181,12 @@ class Part extends AttachmentContainingDBElement #[Groups(['part:read'])] protected ?\DateTimeImmutable $lastModified = null; + /** + * @var Collection + */ + #[ORM\OneToMany(mappedBy: 'part', targetEntity: BulkInfoProviderImportJobPart::class, cascade: ['remove'], orphanRemoval: true)] + protected Collection $bulkImportJobParts; + public function __construct() { @@ -182,6 +199,7 @@ class Part extends AttachmentContainingDBElement $this->associated_parts_as_owner = new ArrayCollection(); $this->associated_parts_as_other = new ArrayCollection(); + $this->bulkImportJobParts = new ArrayCollection(); //By default, the part has no provider $this->providerReference = InfoProviderReference::noProvider(); @@ -260,4 +278,38 @@ class Part extends AttachmentContainingDBElement } } } + + /** + * Get all bulk import job parts for this part + * @return Collection + */ + public function getBulkImportJobParts(): Collection + { + return $this->bulkImportJobParts; + } + + /** + * Add a bulk import job part to this part + */ + public function addBulkImportJobPart(BulkInfoProviderImportJobPart $jobPart): self + { + if (!$this->bulkImportJobParts->contains($jobPart)) { + $this->bulkImportJobParts->add($jobPart); + $jobPart->setPart($this); + } + return $this; + } + + /** + * Remove a bulk import job part from this part + */ + public function removeBulkImportJobPart(BulkInfoProviderImportJobPart $jobPart): self + { + if ($this->bulkImportJobParts->removeElement($jobPart)) { + if ($jobPart->getPart() === $this) { + $jobPart->setPart(null); + } + } + return $this; + } } diff --git a/src/Entity/Parts/PartTraits/ManufacturerTrait.php b/src/Entity/Parts/PartTraits/ManufacturerTrait.php index 5d7f8749..911a0806 100644 --- a/src/Entity/Parts/PartTraits/ManufacturerTrait.php +++ b/src/Entity/Parts/PartTraits/ManufacturerTrait.php @@ -49,7 +49,7 @@ trait ManufacturerTrait /** * @var string The url to the part on the manufacturer's homepage */ - #[Assert\Url] + #[Assert\Url(requireTld: false)] #[Groups(['full', 'import', 'part:read', 'part:write'])] #[ORM\Column(type: Types::TEXT)] protected string $manufacturer_product_url = ''; diff --git a/src/Entity/PriceInformations/Orderdetail.php b/src/Entity/PriceInformations/Orderdetail.php index 3709b37d..8ed76a46 100644 --- a/src/Entity/PriceInformations/Orderdetail.php +++ b/src/Entity/PriceInformations/Orderdetail.php @@ -124,7 +124,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N /** * @var string The URL to the product on the supplier's website */ - #[Assert\Url] + #[Assert\Url(requireTld: false)] #[Groups(['full', 'import', 'orderdetail:read', 'orderdetail:write'])] #[ORM\Column(type: Types::TEXT)] protected string $supplier_product_url = ''; diff --git a/src/EventListener/LogSystem/EventLoggerListener.php b/src/EventListener/LogSystem/EventLoggerListener.php index 96c6ef51..f5029c28 100644 --- a/src/EventListener/LogSystem/EventLoggerListener.php +++ b/src/EventListener/LogSystem/EventLoggerListener.php @@ -170,6 +170,7 @@ class EventLoggerListener public function hasFieldRestrictions(AbstractDBElement $element): bool { foreach (array_keys(static::FIELD_BLACKLIST) as $class) { + /** @var string $class */ if ($element instanceof $class) { return true; } @@ -184,6 +185,7 @@ class EventLoggerListener public function shouldFieldBeSaved(AbstractDBElement $element, string $field_name): bool { foreach (static::FIELD_BLACKLIST as $class => $blacklist) { + /** @var string $class */ if ($element instanceof $class && in_array($field_name, $blacklist, true)) { return false; } @@ -215,6 +217,7 @@ class EventLoggerListener $mappings = $metadata->getAssociationMappings(); //Check if class is whitelisted for CollectionElementDeleted entry foreach (static::TRIGGER_ASSOCIATION_LOG_WHITELIST as $class => $whitelist) { + /** @var string $class */ if ($entity instanceof $class) { //Check names foreach ($mappings as $field => $mapping) { diff --git a/src/Form/AdminPages/ImportType.php b/src/Form/AdminPages/ImportType.php index 3e87812c..0bd3cea1 100644 --- a/src/Form/AdminPages/ImportType.php +++ b/src/Form/AdminPages/ImportType.php @@ -59,6 +59,8 @@ class ImportType extends AbstractType 'XML' => 'xml', 'CSV' => 'csv', 'YAML' => 'yaml', + 'XLSX' => 'xlsx', + 'XLS' => 'xls', ], 'label' => 'export.format', 'disabled' => $disabled, diff --git a/src/Form/Filters/LogFilterType.php b/src/Form/Filters/LogFilterType.php index 42b367b7..c973ad0f 100644 --- a/src/Form/Filters/LogFilterType.php +++ b/src/Form/Filters/LogFilterType.php @@ -100,7 +100,7 @@ class LogFilterType extends AbstractType ]); $builder->add('user', UserEntityConstraintType::class, [ - 'label' => 'log.user', + 'label' => 'log.user', ]); $builder->add('targetType', EnumConstraintType::class, [ @@ -128,11 +128,13 @@ class LogFilterType extends AbstractType LogTargetType::PARAMETER => 'parameter.label', LogTargetType::LABEL_PROFILE => 'label_profile.label', LogTargetType::PART_ASSOCIATION => 'part_association.label', + LogTargetType::BULK_INFO_PROVIDER_IMPORT_JOB => 'bulk_info_provider_import_job.label', + LogTargetType::BULK_INFO_PROVIDER_IMPORT_JOB_PART => 'bulk_info_provider_import_job_part.label', }, ]); $builder->add('targetId', NumberConstraintType::class, [ - 'label' => 'log.target_id', + 'label' => 'log.target_id', 'min' => 1, 'step' => 1, ]); diff --git a/src/Form/Filters/PartFilterType.php b/src/Form/Filters/PartFilterType.php index ed38e2f2..0bc349c8 100644 --- a/src/Form/Filters/PartFilterType.php +++ b/src/Form/Filters/PartFilterType.php @@ -22,9 +22,12 @@ declare(strict_types=1); */ namespace App\Form\Filters; +use App\DataTables\Filters\Constraints\Part\BulkImportPartStatusConstraint; use App\DataTables\Filters\Constraints\Part\ParameterConstraint; use App\DataTables\Filters\PartFilter; use App\Entity\Attachments\AttachmentType; +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use App\Entity\InfoProviderSystem\BulkImportPartStatus; use App\Entity\Parts\Category; use App\Entity\Parts\Footprint; use App\Entity\Parts\Manufacturer; @@ -33,8 +36,12 @@ use App\Entity\Parts\StorageLocation; use App\Entity\Parts\Supplier; use App\Entity\ProjectSystem\Project; use App\Form\Filters\Constraints\BooleanConstraintType; +use App\Form\Filters\Constraints\BulkImportJobExistsConstraintType; +use App\Form\Filters\Constraints\BulkImportJobStatusConstraintType; +use App\Form\Filters\Constraints\BulkImportPartStatusConstraintType; use App\Form\Filters\Constraints\ChoiceConstraintType; use App\Form\Filters\Constraints\DateTimeConstraintType; +use App\Form\Filters\Constraints\EnumConstraintType; use App\Form\Filters\Constraints\NumberConstraintType; use App\Form\Filters\Constraints\ParameterConstraintType; use App\Form\Filters\Constraints\StructuralEntityConstraintType; @@ -50,6 +57,8 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +use function Symfony\Component\Translation\t; + class PartFilterType extends AbstractType { public function __construct(private readonly Security $security) @@ -308,6 +317,31 @@ class PartFilterType extends AbstractType } + /************************************************************************** + * Bulk Import Job tab + **************************************************************************/ + if ($this->security->isGranted('@info_providers.create_parts')) { + $builder + ->add('inBulkImportJob', BooleanConstraintType::class, [ + 'label' => 'part.filter.in_bulk_import_job', + ]) + ->add('bulkImportJobStatus', EnumConstraintType::class, [ + 'enum_class' => BulkImportJobStatus::class, + 'label' => 'part.filter.bulk_import_job_status', + 'choice_label' => function (BulkImportJobStatus $value) { + return t('bulk_import.status.' . $value->value); + }, + ]) + ->add('bulkImportPartStatus', EnumConstraintType::class, [ + 'enum_class' => BulkImportPartStatus::class, + 'label' => 'part.filter.bulk_import_part_status', + 'choice_label' => function (BulkImportPartStatus $value) { + return t('bulk_import.part_status.' . $value->value); + }, + ]) + ; + } + $builder->add('submit', SubmitType::class, [ 'label' => 'filter.submit', diff --git a/src/Form/History/EnforceEventCommentTypesType.php b/src/Form/History/EnforceEventCommentTypesType.php index 8bb095b9..85e43e6e 100644 --- a/src/Form/History/EnforceEventCommentTypesType.php +++ b/src/Form/History/EnforceEventCommentTypesType.php @@ -38,7 +38,7 @@ class EnforceEventCommentTypesType extends AbstractType return EnumType::class; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'multiple' => true, @@ -46,4 +46,4 @@ class EnforceEventCommentTypesType extends AbstractType 'empty_data' => [], ]); } -} \ No newline at end of file +} diff --git a/src/Form/InfoProviderSystem/BulkProviderSearchType.php b/src/Form/InfoProviderSystem/BulkProviderSearchType.php new file mode 100644 index 00000000..24a3cfb4 --- /dev/null +++ b/src/Form/InfoProviderSystem/BulkProviderSearchType.php @@ -0,0 +1,62 @@ +. + */ + +declare(strict_types=1); + +namespace App\Form\InfoProviderSystem; + +use App\Entity\Parts\Part; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\CollectionType; +use Symfony\Component\Form\Extension\Core\Type\HiddenType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class BulkProviderSearchType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $parts = $options['parts']; + + $builder->add('part_configurations', CollectionType::class, [ + 'entry_type' => PartProviderConfigurationType::class, + 'entry_options' => [ + 'label' => false, + ], + 'allow_add' => false, + 'allow_delete' => false, + 'label' => false, + ]); + + $builder->add('submit', SubmitType::class, [ + 'label' => 'info_providers.bulk_search.submit' + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'parts' => [], + ]); + $resolver->setRequired('parts'); + } +} \ No newline at end of file diff --git a/src/Form/InfoProviderSystem/FieldToProviderMappingType.php b/src/Form/InfoProviderSystem/FieldToProviderMappingType.php new file mode 100644 index 00000000..13e9581e --- /dev/null +++ b/src/Form/InfoProviderSystem/FieldToProviderMappingType.php @@ -0,0 +1,75 @@ +. + */ + +declare(strict_types=1); + +namespace App\Form\InfoProviderSystem; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\IntegerType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class FieldToProviderMappingType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $fieldChoices = $options['field_choices'] ?? []; + + $builder->add('field', ChoiceType::class, [ + 'label' => 'info_providers.bulk_search.search_field', + 'choices' => $fieldChoices, + 'expanded' => false, + 'multiple' => false, + 'required' => false, + 'placeholder' => 'info_providers.bulk_search.field.select', + ]); + + $builder->add('providers', ProviderSelectType::class, [ + 'label' => 'info_providers.bulk_search.providers', + 'help' => 'info_providers.bulk_search.providers.help', + 'required' => false, + ]); + + $builder->add('priority', IntegerType::class, [ + 'label' => 'info_providers.bulk_search.priority', + 'help' => 'info_providers.bulk_search.priority.help', + 'required' => false, + 'data' => 1, // Default priority + 'attr' => [ + 'min' => 1, + 'max' => 10, + 'class' => 'form-control-sm', + 'style' => 'width: 80px;' + ], + 'constraints' => [ + new \Symfony\Component\Validator\Constraints\Range(['min' => 1, 'max' => 10]), + ], + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'field_choices' => [], + ]); + } +} diff --git a/src/Form/InfoProviderSystem/GlobalFieldMappingType.php b/src/Form/InfoProviderSystem/GlobalFieldMappingType.php new file mode 100644 index 00000000..ea70284f --- /dev/null +++ b/src/Form/InfoProviderSystem/GlobalFieldMappingType.php @@ -0,0 +1,67 @@ +. + */ + +declare(strict_types=1); + +namespace App\Form\InfoProviderSystem; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; +use Symfony\Component\Form\Extension\Core\Type\CollectionType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class GlobalFieldMappingType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $fieldChoices = $options['field_choices'] ?? []; + + $builder->add('field_mappings', CollectionType::class, [ + 'entry_type' => FieldToProviderMappingType::class, + 'entry_options' => [ + 'label' => false, + 'field_choices' => $fieldChoices, + ], + 'allow_add' => true, + 'allow_delete' => true, + 'prototype' => true, + 'label' => false, + ]); + + $builder->add('prefetch_details', CheckboxType::class, [ + 'label' => 'info_providers.bulk_import.prefetch_details', + 'required' => false, + 'help' => 'info_providers.bulk_import.prefetch_details_help', + ]); + + $builder->add('submit', SubmitType::class, [ + 'label' => 'info_providers.bulk_import.search.submit' + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'field_choices' => [], + ]); + } +} \ No newline at end of file diff --git a/src/Form/InfoProviderSystem/PartProviderConfigurationType.php b/src/Form/InfoProviderSystem/PartProviderConfigurationType.php new file mode 100644 index 00000000..cecf62a3 --- /dev/null +++ b/src/Form/InfoProviderSystem/PartProviderConfigurationType.php @@ -0,0 +1,55 @@ +. + */ + +declare(strict_types=1); + +namespace App\Form\InfoProviderSystem; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\HiddenType; +use Symfony\Component\Form\FormBuilderInterface; + +class PartProviderConfigurationType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->add('part_id', HiddenType::class); + + $builder->add('search_field', ChoiceType::class, [ + 'label' => 'info_providers.bulk_search.search_field', + 'choices' => [ + 'info_providers.bulk_search.field.mpn' => 'mpn', + 'info_providers.bulk_search.field.name' => 'name', + 'info_providers.bulk_search.field.digikey_spn' => 'digikey_spn', + 'info_providers.bulk_search.field.mouser_spn' => 'mouser_spn', + 'info_providers.bulk_search.field.lcsc_spn' => 'lcsc_spn', + 'info_providers.bulk_search.field.farnell_spn' => 'farnell_spn', + ], + 'expanded' => false, + 'multiple' => false, + ]); + + $builder->add('providers', ProviderSelectType::class, [ + 'label' => 'info_providers.bulk_search.providers', + 'help' => 'info_providers.bulk_search.providers.help', + ]); + } +} \ No newline at end of file diff --git a/src/Form/Type/LocaleSelectType.php b/src/Form/Type/LocaleSelectType.php index aa7af5c2..d47fb57f 100644 --- a/src/Form/Type/LocaleSelectType.php +++ b/src/Form/Type/LocaleSelectType.php @@ -44,10 +44,10 @@ class LocaleSelectType extends AbstractType return LocaleType::class; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'preferred_choices' => $this->preferred_languages, ]); } -} \ No newline at end of file +} diff --git a/src/Security/UserChecker.php b/src/Security/UserChecker.php index 16afb37e..239a6096 100644 --- a/src/Security/UserChecker.php +++ b/src/Security/UserChecker.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace App\Security; use App\Entity\UserSystem\User; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Exception\AccountStatusException; use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; use Symfony\Component\Security\Core\User\UserCheckerInterface; @@ -51,7 +52,7 @@ final class UserChecker implements UserCheckerInterface * * @throws AccountStatusException */ - public function checkPostAuth(UserInterface $user): void + public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void { if (!$user instanceof User) { return; diff --git a/src/Security/Voter/BOMEntryVoter.php b/src/Security/Voter/BOMEntryVoter.php index 121c8172..4ce40d47 100644 --- a/src/Security/Voter/BOMEntryVoter.php +++ b/src/Security/Voter/BOMEntryVoter.php @@ -27,6 +27,7 @@ use App\Entity\ProjectSystem\Project; use App\Entity\ProjectSystem\ProjectBOMEntry; use Symfony\Bundle\SecurityBundle\Security; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authorization\Voter\Vote; use Symfony\Component\Security\Core\Authorization\Voter\Voter; /** @@ -46,7 +47,7 @@ class BOMEntryVoter extends Voter return $this->supportsAttribute($attribute) && is_a($subject, ProjectBOMEntry::class, true); } - protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool + protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool { if (!is_a($subject, ProjectBOMEntry::class, true)) { return false; @@ -87,4 +88,4 @@ class BOMEntryVoter extends Voter { return $subjectType === 'string' || is_a($subjectType, ProjectBOMEntry::class, true); } -} \ No newline at end of file +} diff --git a/src/Security/Voter/HasAccessPermissionsVoter.php b/src/Security/Voter/HasAccessPermissionsVoter.php index bd466d07..9adef977 100644 --- a/src/Security/Voter/HasAccessPermissionsVoter.php +++ b/src/Security/Voter/HasAccessPermissionsVoter.php @@ -26,6 +26,7 @@ namespace App\Security\Voter; use App\Services\UserSystem\PermissionManager; use App\Services\UserSystem\VoterHelper; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authorization\Voter\Vote; use Symfony\Component\Security\Core\Authorization\Voter\Voter; /** @@ -41,7 +42,7 @@ final class HasAccessPermissionsVoter extends Voter { } - protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool + protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token, ?Vote $vote = null): bool { $user = $this->helper->resolveUser($token); return $this->permissionManager->hasAnyPermissionSetToAllowInherited($user); @@ -56,4 +57,4 @@ final class HasAccessPermissionsVoter extends Voter { return $attribute === self::ROLE; } -} \ No newline at end of file +} diff --git a/src/Services/Attachments/AttachmentSubmitHandler.php b/src/Services/Attachments/AttachmentSubmitHandler.php index a30163ae..9fbc3fe3 100644 --- a/src/Services/Attachments/AttachmentSubmitHandler.php +++ b/src/Services/Attachments/AttachmentSubmitHandler.php @@ -57,6 +57,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface; */ class AttachmentSubmitHandler { + /** + * @var array The mapping used to determine which folder will be used for an attachment type + */ protected array $folder_mapping; private ?int $max_upload_size_bytes = null; @@ -160,6 +163,7 @@ class AttachmentSubmitHandler } else { //If not, check for instance of: foreach ($this->folder_mapping as $class => $folder) { + /** @var string $class */ if ($attachment instanceof $class) { $prefix = $folder; break; diff --git a/src/Services/ElementTypeNameGenerator.php b/src/Services/ElementTypeNameGenerator.php index 14247145..326707b7 100644 --- a/src/Services/ElementTypeNameGenerator.php +++ b/src/Services/ElementTypeNameGenerator.php @@ -22,13 +22,13 @@ declare(strict_types=1); namespace App\Services; -use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Attachments\Attachment; +use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Attachments\AttachmentType; use App\Entity\Base\AbstractDBElement; use App\Entity\Contracts\NamedElementInterface; -use App\Entity\Parts\PartAssociation; -use App\Entity\ProjectSystem\Project; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; use App\Entity\LabelSystem\LabelProfile; use App\Entity\Parameters\AbstractParameter; use App\Entity\Parts\Category; @@ -36,12 +36,14 @@ use App\Entity\Parts\Footprint; use App\Entity\Parts\Manufacturer; use App\Entity\Parts\MeasurementUnit; use App\Entity\Parts\Part; +use App\Entity\Parts\PartAssociation; use App\Entity\Parts\PartLot; use App\Entity\Parts\StorageLocation; use App\Entity\Parts\Supplier; use App\Entity\PriceInformations\Currency; use App\Entity\PriceInformations\Orderdetail; use App\Entity\PriceInformations\Pricedetail; +use App\Entity\ProjectSystem\Project; use App\Entity\ProjectSystem\ProjectBOMEntry; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\User; @@ -79,6 +81,8 @@ class ElementTypeNameGenerator AbstractParameter::class => $this->translator->trans('parameter.label'), LabelProfile::class => $this->translator->trans('label_profile.label'), PartAssociation::class => $this->translator->trans('part_association.label'), + BulkInfoProviderImportJob::class => $this->translator->trans('bulk_info_provider_import_job.label'), + BulkInfoProviderImportJobPart::class => $this->translator->trans('bulk_info_provider_import_job_part.label'), ]; } @@ -130,10 +134,10 @@ class ElementTypeNameGenerator { $type = $this->getLocalizedTypeLabel($entity); if ($use_html) { - return ''.$type.': '.htmlspecialchars($entity->getName()); + return '' . $type . ': ' . htmlspecialchars($entity->getName()); } - return $type.': '.$entity->getName(); + return $type . ': ' . $entity->getName(); } diff --git a/src/Services/EntityMergers/Mergers/PartMerger.php b/src/Services/EntityMergers/Mergers/PartMerger.php index 4ce779e8..01b53e25 100644 --- a/src/Services/EntityMergers/Mergers/PartMerger.php +++ b/src/Services/EntityMergers/Mergers/PartMerger.php @@ -100,7 +100,8 @@ class PartMerger implements EntityMergerInterface return $target; } - private function comparePartAssociations(PartAssociation $t, PartAssociation $o): bool { + private function comparePartAssociations(PartAssociation $t, PartAssociation $o): bool + { //We compare the translation keys, as it contains info about the type and other type info return $t->getOther() === $o->getOther() && $t->getTypeTranslationKey() === $o->getTypeTranslationKey(); @@ -141,40 +142,39 @@ class PartMerger implements EntityMergerInterface $owner->addAssociatedPartsAsOwner($clone); } + // Merge orderdetails, considering same supplier+part number as duplicates $this->mergeCollections($target, $other, 'orderdetails', function (Orderdetail $t, Orderdetail $o) { - //First check that the orderdetails infos are equal - $tmp = $t->getSupplier() === $o->getSupplier() - && $t->getSupplierPartNr() === $o->getSupplierPartNr() - && $t->getSupplierProductUrl(false) === $o->getSupplierProductUrl(false); - - if (!$tmp) { - return false; - } - - //Check if the pricedetails are equal - $t_pricedetails = $t->getPricedetails(); - $o_pricedetails = $o->getPricedetails(); - //Ensure that both pricedetails have the same length - if (count($t_pricedetails) !== count($o_pricedetails)) { - return false; - } - - //Check if all pricedetails are equal - for ($n=0, $nMax = count($t_pricedetails); $n< $nMax; $n++) { - $t_price = $t_pricedetails->get($n); - $o_price = $o_pricedetails->get($n); - - if (!$t_price->getPrice()->isEqualTo($o_price->getPrice()) - || $t_price->getCurrency() !== $o_price->getCurrency() - || $t_price->getPriceRelatedQuantity() !== $o_price->getPriceRelatedQuantity() - || $t_price->getMinDiscountQuantity() !== $o_price->getMinDiscountQuantity() - ) { - return false; + // If supplier and part number match, merge the orderdetails + if ($t->getSupplier() === $o->getSupplier() && $t->getSupplierPartNr() === $o->getSupplierPartNr()) { + // Update URL if target doesn't have one + if (empty($t->getSupplierProductUrl(false)) && !empty($o->getSupplierProductUrl(false))) { + $t->setSupplierProductUrl($o->getSupplierProductUrl(false)); } + // Merge price details: add new ones, update empty ones, keep existing non-empty ones + foreach ($o->getPricedetails() as $otherPrice) { + $found = false; + foreach ($t->getPricedetails() as $targetPrice) { + if ($targetPrice->getMinDiscountQuantity() === $otherPrice->getMinDiscountQuantity() + && $targetPrice->getCurrency() === $otherPrice->getCurrency()) { + // Only update price if the existing one is zero/empty (most logical) + if ($targetPrice->getPrice()->isZero()) { + $targetPrice->setPrice($otherPrice->getPrice()); + $targetPrice->setPriceRelatedQuantity($otherPrice->getPriceRelatedQuantity()); + } + $found = true; + break; + } + } + // Add completely new price tiers + if (!$found) { + $clonedPrice = clone $otherPrice; + $clonedPrice->setOrderdetail($t); + $t->addPricedetail($clonedPrice); + } + } + return true; // Consider them equal so the other one gets skipped } - - //If all pricedetails are equal, the orderdetails are equal - return true; + return false; // Different supplier/part number, add as new }); //The pricedetails are not correctly assigned to the new orderdetails, so fix that foreach ($target->getOrderdetails() as $orderdetail) { diff --git a/src/Services/ImportExportSystem/EntityExporter.php b/src/Services/ImportExportSystem/EntityExporter.php index 271642da..70feb8e6 100644 --- a/src/Services/ImportExportSystem/EntityExporter.php +++ b/src/Services/ImportExportSystem/EntityExporter.php @@ -38,6 +38,9 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\Serializer\SerializerInterface; use function Symfony\Component\String\u; +use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PhpOffice\PhpSpreadsheet\Writer\Xlsx; +use PhpOffice\PhpSpreadsheet\Writer\Xls; /** * Use this class to export an entity to multiple file formats. @@ -52,7 +55,7 @@ class EntityExporter protected function configureOptions(OptionsResolver $resolver): void { $resolver->setDefault('format', 'csv'); - $resolver->setAllowedValues('format', ['csv', 'json', 'xml', 'yaml']); + $resolver->setAllowedValues('format', ['csv', 'json', 'xml', 'yaml', 'xlsx', 'xls']); $resolver->setDefault('csv_delimiter', ';'); $resolver->setAllowedTypes('csv_delimiter', 'string'); @@ -88,28 +91,35 @@ class EntityExporter $options = $resolver->resolve($options); + //Handle Excel formats by converting from CSV + if (in_array($options['format'], ['xlsx', 'xls'], true)) { + return $this->exportToExcel($entities, $options); + } + //If include children is set, then we need to add the include_children group $groups = [$options['level']]; if ($options['include_children']) { $groups[] = 'include_children'; } - return $this->serializer->serialize($entities, $options['format'], + return $this->serializer->serialize( + $entities, + $options['format'], [ 'groups' => $groups, 'as_collection' => true, 'csv_delimiter' => $options['csv_delimiter'], 'xml_root_node_name' => 'PartDBExport', 'partdb_export' => true, - //Skip the item normalizer, so that we dont get IRIs in the output + //Skip the item normalizer, so that we dont get IRIs in the output SkippableItemNormalizer::DISABLE_ITEM_NORMALIZER => true, - //Handle circular references + //Handle circular references AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => $this->handleCircularReference(...), ] ); } - private function handleCircularReference(object $object, string $format, array $context): string + private function handleCircularReference(object $object): string { if ($object instanceof AbstractStructuralDBElement) { return $object->getFullPath("->"); @@ -119,7 +129,75 @@ class EntityExporter return $object->__toString(); } - throw new CircularReferenceException('Circular reference detected for object of type '.get_class($object)); + throw new CircularReferenceException('Circular reference detected for object of type ' . get_class($object)); + } + + /** + * Exports entities to Excel format (xlsx or xls). + * + * @param AbstractNamedDBElement[] $entities The entities to export + * @param array $options The export options + * + * @return string The Excel file content as binary string + */ + protected function exportToExcel(array $entities, array $options): string + { + //First get CSV data using existing serializer + $groups = [$options['level']]; + if ($options['include_children']) { + $groups[] = 'include_children'; + } + + $csvData = $this->serializer->serialize( + $entities, + 'csv', + [ + 'groups' => $groups, + 'as_collection' => true, + 'csv_delimiter' => $options['csv_delimiter'], + 'partdb_export' => true, + SkippableItemNormalizer::DISABLE_ITEM_NORMALIZER => true, + AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => $this->handleCircularReference(...), + ] + ); + + //Convert CSV to Excel + $spreadsheet = new Spreadsheet(); + $worksheet = $spreadsheet->getActiveSheet(); + + $rows = explode("\n", $csvData); + $rowIndex = 1; + + foreach ($rows as $row) { + if (trim($row) === '') { + continue; + } + + $columns = str_getcsv($row, $options['csv_delimiter'], '"', '\\'); + $colIndex = 1; + + foreach ($columns as $column) { + $cellCoordinate = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex) . $rowIndex; + $worksheet->setCellValue($cellCoordinate, $column); + $colIndex++; + } + $rowIndex++; + } + + //Save to memory stream + $writer = $options['format'] === 'xlsx' ? new Xlsx($spreadsheet) : new Xls($spreadsheet); + + $memFile = fopen("php://temp", 'r+b'); + $writer->save($memFile); + rewind($memFile); + $content = stream_get_contents($memFile); + fclose($memFile); + + if ($content === false) { + throw new \RuntimeException('Failed to read Excel content from memory stream.'); + } + + return $content; } /** @@ -156,19 +234,15 @@ class EntityExporter //Determine the content type for the response - //Plain text should work for all types - $content_type = 'text/plain'; - //Try to use better content types based on the format $format = $options['format']; - switch ($format) { - case 'xml': - $content_type = 'application/xml'; - break; - case 'json': - $content_type = 'application/json'; - break; - } + $content_type = match ($format) { + 'xml' => 'application/xml', + 'json' => 'application/json', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xls' => 'application/vnd.ms-excel', + default => 'text/plain', + }; $response->headers->set('Content-Type', $content_type); //If view option is not specified, then download the file. @@ -186,7 +260,7 @@ class EntityExporter $level = $options['level']; - $filename = 'export_'.$entity_name.'_'.$level.'.'.$format; + $filename = "export_{$entity_name}_{$level}.{$format}"; //Sanitize the filename $filename = FilenameSanatizer::sanitizeFilename($filename); diff --git a/src/Services/ImportExportSystem/EntityImporter.php b/src/Services/ImportExportSystem/EntityImporter.php index 11915cfb..459866ba 100644 --- a/src/Services/ImportExportSystem/EntityImporter.php +++ b/src/Services/ImportExportSystem/EntityImporter.php @@ -38,6 +38,9 @@ use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; +use PhpOffice\PhpSpreadsheet\IOFactory; +use PhpOffice\PhpSpreadsheet\Spreadsheet; +use Psr\Log\LoggerInterface; /** * @see \App\Tests\Services\ImportExportSystem\EntityImporterTest @@ -50,7 +53,7 @@ class EntityImporter */ private const ENCODINGS = ["ASCII", "UTF-8", "ISO-8859-1", "ISO-8859-15", "Windows-1252", "UTF-16", "UTF-32"]; - public function __construct(protected SerializerInterface $serializer, protected EntityManagerInterface $em, protected ValidatorInterface $validator) + public function __construct(protected SerializerInterface $serializer, protected EntityManagerInterface $em, protected ValidatorInterface $validator, protected LoggerInterface $logger) { } @@ -102,7 +105,7 @@ class EntityImporter foreach ($names as $name) { //Count indentation level (whitespace characters at the beginning of the line) - $identSize = strlen($name)-strlen(ltrim($name)); + $identSize = strlen($name) - strlen(ltrim($name)); //If the line is intended more than the last line, we have a new parent element if ($identSize > end($indentations)) { @@ -195,16 +198,20 @@ class EntityImporter } //The [] behind class_name denotes that we expect an array. - $entities = $this->serializer->deserialize($data, $options['class'].'[]', $options['format'], + $entities = $this->serializer->deserialize( + $data, + $options['class'] . '[]', + $options['format'], [ 'groups' => $groups, 'csv_delimiter' => $options['csv_delimiter'], 'create_unknown_datastructures' => $options['create_unknown_datastructures'], 'path_delimiter' => $options['path_delimiter'], 'partdb_import' => true, - //Disable API Platform normalizer, as we don't want to use it here + //Disable API Platform normalizer, as we don't want to use it here SkippableItemNormalizer::DISABLE_ITEM_NORMALIZER => true, - ]); + ] + ); //Ensure we have an array of entity elements. if (!is_array($entities)) { @@ -279,7 +286,7 @@ class EntityImporter 'path_delimiter' => '->', //The delimiter used to separate the path elements in the name of a structural element ]); - $resolver->setAllowedValues('format', ['csv', 'json', 'xml', 'yaml']); + $resolver->setAllowedValues('format', ['csv', 'json', 'xml', 'yaml', 'xlsx', 'xls']); $resolver->setAllowedTypes('csv_delimiter', 'string'); $resolver->setAllowedTypes('preserve_children', 'bool'); $resolver->setAllowedTypes('class', 'string'); @@ -335,6 +342,33 @@ class EntityImporter */ public function importFile(File $file, array $options = [], array &$errors = []): array { + $resolver = new OptionsResolver(); + $this->configureOptions($resolver); + $options = $resolver->resolve($options); + + if (in_array($options['format'], ['xlsx', 'xls'], true)) { + $this->logger->info('Converting Excel file to CSV', [ + 'filename' => $file->getFilename(), + 'format' => $options['format'], + 'delimiter' => $options['csv_delimiter'] + ]); + + $csvData = $this->convertExcelToCsv($file, $options['csv_delimiter']); + $options['format'] = 'csv'; + + $this->logger->debug('Excel to CSV conversion completed', [ + 'csv_length' => strlen($csvData), + 'csv_lines' => substr_count($csvData, "\n") + 1 + ]); + + // Log the converted CSV for debugging (first 1000 characters) + $this->logger->debug('Converted CSV preview', [ + 'csv_preview' => substr($csvData, 0, 1000) . (strlen($csvData) > 1000 ? '...' : '') + ]); + + return $this->importString($csvData, $options, $errors); + } + return $this->importString($file->getContent(), $options, $errors); } @@ -354,10 +388,103 @@ class EntityImporter 'xml' => 'xml', 'csv', 'tsv' => 'csv', 'yaml', 'yml' => 'yaml', + 'xlsx' => 'xlsx', + 'xls' => 'xls', default => null, }; } + /** + * Converts Excel file to CSV format using PhpSpreadsheet. + * + * @param File $file The Excel file to convert + * @param string $delimiter The CSV delimiter to use + * + * @return string The CSV data as string + */ + protected function convertExcelToCsv(File $file, string $delimiter = ';'): string + { + try { + $this->logger->debug('Loading Excel file', ['path' => $file->getPathname()]); + $spreadsheet = IOFactory::load($file->getPathname()); + $worksheet = $spreadsheet->getActiveSheet(); + + $csvData = []; + $highestRow = $worksheet->getHighestRow(); + $highestColumn = $worksheet->getHighestColumn(); + + $this->logger->debug('Excel file dimensions', [ + 'rows' => $highestRow, + 'columns_detected' => $highestColumn, + 'worksheet_title' => $worksheet->getTitle() + ]); + + $highestColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($highestColumn); + + for ($row = 1; $row <= $highestRow; $row++) { + $rowData = []; + + // Read all columns using numeric index + for ($colIndex = 1; $colIndex <= $highestColumnIndex; $colIndex++) { + $col = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex); + try { + $cellValue = $worksheet->getCell("{$col}{$row}")->getCalculatedValue(); + $rowData[] = $cellValue ?? ''; + + } catch (\Exception $e) { + $this->logger->warning('Error reading cell value', [ + 'cell' => "{$col}{$row}", + 'error' => $e->getMessage() + ]); + $rowData[] = ''; + } + } + + $csvRow = implode($delimiter, array_map(function ($value) use ($delimiter) { + $value = (string) $value; + if (strpos($value, $delimiter) !== false || strpos($value, '"') !== false || strpos($value, "\n") !== false) { + return '"' . str_replace('"', '""', $value) . '"'; + } + return $value; + }, $rowData)); + + $csvData[] = $csvRow; + + // Log first few rows for debugging + if ($row <= 3) { + $this->logger->debug("Row {$row} converted", [ + 'original_data' => $rowData, + 'csv_row' => $csvRow, + 'first_cell_raw' => $worksheet->getCell("A{$row}")->getValue(), + 'first_cell_calculated' => $worksheet->getCell("A{$row}")->getCalculatedValue() + ]); + } + } + + $result = implode("\n", $csvData); + + $this->logger->info('Excel to CSV conversion successful', [ + 'total_rows' => count($csvData), + 'total_characters' => strlen($result) + ]); + + $this->logger->debug('Full CSV data', [ + 'csv_data' => $result + ]); + + return $result; + + } catch (\Exception $e) { + $this->logger->error('Failed to convert Excel to CSV', [ + 'file' => $file->getFilename(), + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + throw $e; + } + } + + /** * This functions corrects the parent setting based on the children value of the parent. * diff --git a/src/Services/InfoProviderSystem/BulkInfoProviderService.php b/src/Services/InfoProviderSystem/BulkInfoProviderService.php new file mode 100644 index 00000000..586fb873 --- /dev/null +++ b/src/Services/InfoProviderSystem/BulkInfoProviderService.php @@ -0,0 +1,380 @@ + Cache for normalized supplier names */ + private array $supplierCache = []; + + public function __construct( + private readonly PartInfoRetriever $infoRetriever, + private readonly ExistingPartFinder $existingPartFinder, + private readonly ProviderRegistry $providerRegistry, + private readonly EntityManagerInterface $entityManager, + private readonly LoggerInterface $logger + ) {} + + /** + * Perform bulk search across multiple parts and providers. + * + * @param Part[] $parts Array of parts to search for + * @param BulkSearchFieldMappingDTO[] $fieldMappings Array of field mappings defining search strategy + * @param bool $prefetchDetails Whether to prefetch detailed information for results + * @return BulkSearchResponseDTO Structured response containing all search results + * @throws \InvalidArgumentException If no valid parts provided + * @throws \RuntimeException If no search results found for any parts + */ + public function performBulkSearch(array $parts, array $fieldMappings, bool $prefetchDetails = false): BulkSearchResponseDTO + { + if (empty($parts)) { + throw new \InvalidArgumentException('No valid parts found for bulk import'); + } + + $partResults = []; + $hasAnyResults = false; + + // Group providers by batch capability + $batchProviders = []; + $regularProviders = []; + + foreach ($fieldMappings as $mapping) { + foreach ($mapping->providers as $providerKey) { + if (!is_string($providerKey)) { + $this->logger->error('Invalid provider key type', [ + 'providerKey' => $providerKey, + 'type' => gettype($providerKey) + ]); + continue; + } + + $provider = $this->providerRegistry->getProviderByKey($providerKey); + if ($provider instanceof BatchInfoProviderInterface) { + $batchProviders[$providerKey] = $provider; + } else { + $regularProviders[$providerKey] = $provider; + } + } + } + + // Process batch providers first (more efficient) + $batchResults = $this->processBatchProviders($parts, $fieldMappings, $batchProviders); + + // Process regular providers + $regularResults = $this->processRegularProviders($parts, $fieldMappings, $regularProviders, $batchResults); + + // Combine and format results for each part + foreach ($parts as $part) { + $searchResults = []; + + // Get results from batch and regular processing + $allResults = array_merge( + $batchResults[$part->getId()] ?? [], + $regularResults[$part->getId()] ?? [] + ); + + if (!empty($allResults)) { + $hasAnyResults = true; + $searchResults = $this->formatSearchResults($allResults); + } + + $partResults[] = new BulkSearchPartResultsDTO( + part: $part, + searchResults: $searchResults, + errors: [] + ); + } + + if (!$hasAnyResults) { + throw new \RuntimeException('No search results found for any of the selected parts'); + } + + $response = new BulkSearchResponseDTO($partResults); + + // Prefetch details if requested + if ($prefetchDetails) { + $this->prefetchDetailsForResults($response); + } + + return $response; + } + + /** + * Process parts using batch-capable info providers. + * + * @param Part[] $parts Array of parts to search for + * @param BulkSearchFieldMappingDTO[] $fieldMappings Array of field mapping configurations + * @param array $batchProviders Batch providers indexed by key + * @return array Results indexed by part ID + */ + private function processBatchProviders(array $parts, array $fieldMappings, array $batchProviders): array + { + $batchResults = []; + + foreach ($batchProviders as $providerKey => $provider) { + $keywords = $this->collectKeywordsForProvider($parts, $fieldMappings, $providerKey); + + if (empty($keywords)) { + continue; + } + + try { + $providerResults = $provider->searchByKeywordsBatch($keywords); + + // Map results back to parts + foreach ($parts as $part) { + foreach ($fieldMappings as $mapping) { + if (!in_array($providerKey, $mapping->providers, true)) { + continue; + } + + $keyword = $this->getKeywordFromField($part, $mapping->field); + if ($keyword && isset($providerResults[$keyword])) { + foreach ($providerResults[$keyword] as $dto) { + $batchResults[$part->getId()][] = new BulkSearchPartResultDTO( + searchResult: $dto, + sourceField: $mapping->field, + sourceKeyword: $keyword, + localPart: $this->existingPartFinder->findFirstExisting($dto), + priority: $mapping->priority + ); + } + } + } + } + } catch (\Exception $e) { + $this->logger->error('Batch search failed for provider ' . $providerKey, [ + 'error' => $e->getMessage(), + 'provider' => $providerKey + ]); + } + } + + return $batchResults; + } + + /** + * Process parts using regular (non-batch) info providers. + * + * @param Part[] $parts Array of parts to search for + * @param BulkSearchFieldMappingDTO[] $fieldMappings Array of field mapping configurations + * @param array $regularProviders Regular providers indexed by key + * @param array $excludeResults Results to exclude (from batch processing) + * @return array Results indexed by part ID + */ + private function processRegularProviders(array $parts, array $fieldMappings, array $regularProviders, array $excludeResults): array + { + $regularResults = []; + + foreach ($parts as $part) { + $regularResults[$part->getId()] = []; + + // Skip if we already have batch results for this part + if (!empty($excludeResults[$part->getId()] ?? [])) { + continue; + } + + foreach ($fieldMappings as $mapping) { + $providers = array_intersect($mapping->providers, array_keys($regularProviders)); + + if (empty($providers)) { + continue; + } + + $keyword = $this->getKeywordFromField($part, $mapping->field); + if (!$keyword) { + continue; + } + + try { + $dtos = $this->infoRetriever->searchByKeyword($keyword, $providers); + + foreach ($dtos as $dto) { + $regularResults[$part->getId()][] = new BulkSearchPartResultDTO( + searchResult: $dto, + sourceField: $mapping->field, + sourceKeyword: $keyword, + localPart: $this->existingPartFinder->findFirstExisting($dto), + priority: $mapping->priority + ); + } + } catch (ClientException $e) { + $this->logger->error('Regular search failed', [ + 'part_id' => $part->getId(), + 'field' => $mapping->field, + 'error' => $e->getMessage() + ]); + } + } + } + + return $regularResults; + } + + /** + * Collect unique keywords for a specific provider from all parts and field mappings. + * + * @param Part[] $parts Array of parts to collect keywords from + * @param BulkSearchFieldMappingDTO[] $fieldMappings Array of field mapping configurations + * @param string $providerKey The provider key to collect keywords for + * @return string[] Array of unique keywords + */ + private function collectKeywordsForProvider(array $parts, array $fieldMappings, string $providerKey): array + { + $keywords = []; + + foreach ($parts as $part) { + foreach ($fieldMappings as $mapping) { + if (!in_array($providerKey, $mapping->providers, true)) { + continue; + } + + $keyword = $this->getKeywordFromField($part, $mapping->field); + if ($keyword && !in_array($keyword, $keywords, true)) { + $keywords[] = $keyword; + } + } + } + + return $keywords; + } + + private function getKeywordFromField(Part $part, string $field): ?string + { + return match ($field) { + 'mpn' => $part->getManufacturerProductNumber(), + 'name' => $part->getName(), + default => $this->getSupplierPartNumber($part, $field) + }; + } + + private function getSupplierPartNumber(Part $part, string $field): ?string + { + if (!str_ends_with($field, '_spn')) { + return null; + } + + $supplierKey = substr($field, 0, -4); + $supplier = $this->getSupplierByNormalizedName($supplierKey); + + if (!$supplier) { + return null; + } + + $orderDetail = $part->getOrderdetails()->filter( + fn($od) => $od->getSupplier()?->getId() === $supplier->getId() + )->first(); + + return $orderDetail !== false ? $orderDetail->getSupplierpartnr() : null; + } + + /** + * Get supplier by normalized name with caching to prevent N+1 queries. + * + * @param string $normalizedKey The normalized supplier key to search for + * @return Supplier|null The matching supplier or null if not found + */ + private function getSupplierByNormalizedName(string $normalizedKey): ?Supplier + { + // Check cache first + if (isset($this->supplierCache[$normalizedKey])) { + return $this->supplierCache[$normalizedKey]; + } + + // Use efficient database query with PHP normalization + // Since DQL doesn't support REPLACE, we'll load all suppliers once and cache the normalization + if (empty($this->supplierCache)) { + $this->loadSuppliersIntoCache(); + } + + $supplier = $this->supplierCache[$normalizedKey] ?? null; + + // Cache the result (including null results to prevent repeated queries) + $this->supplierCache[$normalizedKey] = $supplier; + + return $supplier; + } + + /** + * Load all suppliers into cache with normalized names to avoid N+1 queries. + */ + private function loadSuppliersIntoCache(): void + { + /** @var Supplier[] $suppliers */ + $suppliers = $this->entityManager->getRepository(Supplier::class)->findAll(); + + foreach ($suppliers as $supplier) { + $normalizedName = strtolower(str_replace([' ', '-', '_'], '_', $supplier->getName())); + $this->supplierCache[$normalizedName] = $supplier; + } + } + + /** + * Format and deduplicate search results. + * + * @param BulkSearchPartResultDTO[] $bulkResults Array of bulk search results + * @return BulkSearchPartResultDTO[] Array of formatted search results with metadata + */ + private function formatSearchResults(array $bulkResults): array + { + // Sort by priority and remove duplicates + usort($bulkResults, fn($a, $b) => $a->priority <=> $b->priority); + + $uniqueResults = []; + $seenKeys = []; + + foreach ($bulkResults as $result) { + $key = "{$result->searchResult->provider_key}|{$result->searchResult->provider_id}"; + if (!in_array($key, $seenKeys, true)) { + $seenKeys[] = $key; + $uniqueResults[] = $result; + } + } + + return $uniqueResults; + } + + /** + * Prefetch detailed information for search results. + * + * @param BulkSearchResponseDTO $searchResults Search results (supports both new DTO and legacy array format) + */ + public function prefetchDetailsForResults(BulkSearchResponseDTO $searchResults): void + { + $prefetchCount = 0; + + // Handle both new DTO format and legacy array format for backwards compatibility + foreach ($searchResults->partResults as $partResult) { + foreach ($partResult->searchResults as $result) { + $dto = $result->searchResult; + + try { + $this->infoRetriever->getDetails($dto->provider_key, $dto->provider_id); + $prefetchCount++; + } catch (\Exception $e) { + $this->logger->warning('Failed to prefetch details for provider part', [ + 'provider_key' => $dto->provider_key, + 'provider_id' => $dto->provider_id, + 'error' => $e->getMessage() + ]); + } + } + } + + $this->logger->info("Prefetched details for {$prefetchCount} search results"); + } +} diff --git a/src/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTO.php b/src/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTO.php new file mode 100644 index 00000000..50b7f4cf --- /dev/null +++ b/src/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTO.php @@ -0,0 +1,91 @@ +. + */ + +declare(strict_types=1); + +namespace App\Services\InfoProviderSystem\DTOs; + +/** + * Represents a mapping between a part field and the info providers that should search in that field. + */ +readonly class BulkSearchFieldMappingDTO +{ + /** + * @param string $field The field to search in (e.g., 'mpn', 'name', or supplier-specific fields like 'digikey_spn') + * @param string[] $providers Array of provider keys to search with (e.g., ['digikey', 'farnell']) + * @param int $priority Priority for this field mapping (1-10, lower numbers = higher priority) + */ + public function __construct( + public string $field, + public array $providers, + public int $priority = 1 + ) { + if ($priority < 1 || $priority > 10) { + throw new \InvalidArgumentException('Priority must be between 1 and 10'); + } + } + + /** + * Create a FieldMappingDTO from legacy array format. + * @param array{field: string, providers: string[], priority?: int} $data + */ + public static function fromSerializableArray(array $data): self + { + return new self( + field: $data['field'], + providers: $data['providers'] ?? [], + priority: $data['priority'] ?? 1 + ); + } + + /** + * Convert this DTO to the legacy array format for backwards compatibility. + * @return array{field: string, providers: string[], priority: int} + */ + public function toSerializableArray(): array + { + return [ + 'field' => $this->field, + 'providers' => $this->providers, + 'priority' => $this->priority, + ]; + } + + /** + * Check if this field mapping is for a supplier part number field. + */ + public function isSupplierPartNumberField(): bool + { + return str_ends_with($this->field, '_spn'); + } + + /** + * Get the supplier key from a supplier part number field. + * Returns null if this is not a supplier part number field. + */ + public function getSupplierKey(): ?string + { + if (!$this->isSupplierPartNumberField()) { + return null; + } + + return substr($this->field, 0, -4); + } +} diff --git a/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultDTO.php b/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultDTO.php new file mode 100644 index 00000000..d46624d4 --- /dev/null +++ b/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultDTO.php @@ -0,0 +1,44 @@ +. + */ + +declare(strict_types=1); + +namespace App\Services\InfoProviderSystem\DTOs; + +use App\Entity\Parts\Part; + +/** + * Represents a single search result from bulk search with additional context information, like how the part was found. + */ +readonly class BulkSearchPartResultDTO +{ + public function __construct( + /** The base search result DTO containing provider data */ + public SearchResultDTO $searchResult, + /** The field that was used to find this result */ + public ?string $sourceField = null, + /** The actual keyword that was searched for */ + public ?string $sourceKeyword = null, + /** Local part that matches this search result, if any */ + public ?Part $localPart = null, + /** Priority for this search result */ + public int $priority = 1 + ) {} +} diff --git a/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTO.php b/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTO.php new file mode 100644 index 00000000..8614f4ec --- /dev/null +++ b/src/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTO.php @@ -0,0 +1,83 @@ +. + */ + +declare(strict_types=1); + +namespace App\Services\InfoProviderSystem\DTOs; + +use App\Entity\Parts\Part; + +/** + * Represents the search results for a single part from bulk info provider search. + * It contains multiple search results, that match the part. + */ +readonly class BulkSearchPartResultsDTO +{ + /** + * @param Part $part The part that was searched for + * @param BulkSearchPartResultDTO[] $searchResults Array of search results found for this part + * @param string[] $errors Array of error messages encountered during search + */ + public function __construct( + public Part $part, + public array $searchResults = [], + public array $errors = [] + ) {} + + /** + * Check if this part has any search results. + */ + public function hasResults(): bool + { + return !empty($this->searchResults); + } + + /** + * Check if this part has any errors. + */ + public function hasErrors(): bool + { + return !empty($this->errors); + } + + /** + * Get the number of search results for this part. + */ + public function getResultCount(): int + { + return count($this->searchResults); + } + + public function getErrorCount(): int + { + return count($this->errors); + } + + /** + * Get search results sorted by priority (ascending). + * @return BulkSearchPartResultDTO[] + */ + public function getResultsSortedByPriority(): array + { + $results = $this->searchResults; + usort($results, static fn(BulkSearchPartResultDTO $a, BulkSearchPartResultDTO $b) => $a->priority <=> $b->priority); + return $results; + } +} diff --git a/src/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTO.php b/src/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTO.php new file mode 100644 index 00000000..58e9e240 --- /dev/null +++ b/src/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTO.php @@ -0,0 +1,231 @@ +. + */ + +declare(strict_types=1); + +namespace App\Services\InfoProviderSystem\DTOs; + +use App\Entity\Parts\Part; +use Doctrine\ORM\EntityManagerInterface; +use Traversable; + +/** + * Represents the complete response from a bulk info provider search operation. + * It contains a list of PartSearchResultDTOs, one for each part searched. + */ +readonly class BulkSearchResponseDTO implements \ArrayAccess, \IteratorAggregate +{ + /** + * @param BulkSearchPartResultsDTO[] $partResults Array of search results for each part + */ + public function __construct( + public array $partResults + ) {} + + /** + * Replaces the search results for a specific part, and returns a new instance. + * The part to replaced, is identified by the part property of the new_results parameter. + * The original instance remains unchanged. + * @param BulkSearchPartResultsDTO $new_results + * @return BulkSearchResponseDTO + */ + public function replaceResultsForPart(BulkSearchPartResultsDTO $new_results): self + { + $array = $this->partResults; + $replaced = false; + foreach ($array as $index => $partResult) { + if ($partResult->part === $new_results->part) { + $array[$index] = $new_results; + $replaced = true; + break; + } + } + + if (!$replaced) { + throw new \InvalidArgumentException("Part not found in existing results."); + } + + return new self($array); + } + + /** + * Check if any parts have search results. + */ + public function hasAnyResults(): bool + { + foreach ($this->partResults as $partResult) { + if ($partResult->hasResults()) { + return true; + } + } + return false; + } + + /** + * Get the total number of search results across all parts. + */ + public function getTotalResultCount(): int + { + $count = 0; + foreach ($this->partResults as $partResult) { + $count += $partResult->getResultCount(); + } + return $count; + } + + /** + * Get all parts that have search results. + * @return BulkSearchPartResultsDTO[] + */ + public function getPartsWithResults(): array + { + return array_filter($this->partResults, fn($result) => $result->hasResults()); + } + + /** + * Get all parts that have errors. + * @return BulkSearchPartResultsDTO[] + */ + public function getPartsWithErrors(): array + { + return array_filter($this->partResults, fn($result) => $result->hasErrors()); + } + + /** + * Get the number of parts processed. + */ + public function getPartCount(): int + { + return count($this->partResults); + } + + /** + * Get the number of parts with successful results. + */ + public function getSuccessfulPartCount(): int + { + return count($this->getPartsWithResults()); + } + + /** + * Merge multiple BulkSearchResponseDTO instances into one. + * @param BulkSearchResponseDTO ...$responses + * @return BulkSearchResponseDTO + */ + public static function merge(BulkSearchResponseDTO ...$responses): BulkSearchResponseDTO + { + $mergedResults = []; + foreach ($responses as $response) { + foreach ($response->partResults as $partResult) { + $mergedResults[] = $partResult; + } + } + return new BulkSearchResponseDTO($mergedResults); + } + + /** + * Convert this DTO to a serializable representation suitable for storage in the database + * @return array + */ + public function toSerializableRepresentation(): array + { + $serialized = []; + + foreach ($this->partResults as $partResult) { + $partData = [ + 'part_id' => $partResult->part->getId(), + 'search_results' => [], + 'errors' => $partResult->errors ?? [] + ]; + + foreach ($partResult->searchResults as $result) { + $partData['search_results'][] = [ + 'dto' => $result->searchResult->toNormalizedSearchResultArray(), + 'source_field' => $result->sourceField ?? null, + 'source_keyword' => $result->sourceKeyword ?? null, + 'localPart' => $result->localPart?->getId(), + 'priority' => $result->priority + ]; + } + + $serialized[] = $partData; + } + + return $serialized; + } + + /** + * Creates a BulkSearchResponseDTO from a serializable representation. + * @param array $data + * @param EntityManagerInterface $entityManager + * @return BulkSearchResponseDTO + * @throws \Doctrine\ORM\Exception\ORMException + */ + public static function fromSerializableRepresentation(array $data, EntityManagerInterface $entityManager): BulkSearchResponseDTO + { + $partResults = []; + foreach ($data as $partData) { + $partResults[] = new BulkSearchPartResultsDTO( + part: $entityManager->getReference(Part::class, $partData['part_id']), + searchResults: array_map(fn($result) => new BulkSearchPartResultDTO( + searchResult: SearchResultDTO::fromNormalizedSearchResultArray($result['dto']), + sourceField: $result['source_field'] ?? null, + sourceKeyword: $result['source_keyword'] ?? null, + localPart: isset($result['localPart']) ? $entityManager->getReference(Part::class, $result['localPart']) : null, + priority: $result['priority'] ?? null + ), $partData['search_results'] ?? []), + errors: $partData['errors'] ?? [] + ); + } + + return new BulkSearchResponseDTO($partResults); + } + + public function offsetExists(mixed $offset): bool + { + if (!is_int($offset)) { + throw new \InvalidArgumentException("Offset must be an integer."); + } + return isset($this->partResults[$offset]); + } + + public function offsetGet(mixed $offset): ?BulkSearchPartResultsDTO + { + if (!is_int($offset)) { + throw new \InvalidArgumentException("Offset must be an integer."); + } + return $this->partResults[$offset] ?? null; + } + + public function offsetSet(mixed $offset, mixed $value): void + { + throw new \LogicException("BulkSearchResponseDTO is immutable."); + } + + public function offsetUnset(mixed $offset): void + { + throw new \LogicException('BulkSearchResponseDTO is immutable.'); + } + + public function getIterator(): Traversable + { + return new \ArrayIterator($this->partResults); + } +} diff --git a/src/Services/InfoProviderSystem/DTOs/FileDTO.php b/src/Services/InfoProviderSystem/DTOs/FileDTO.php index 0d1db76a..84eed0c9 100644 --- a/src/Services/InfoProviderSystem/DTOs/FileDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/FileDTO.php @@ -28,12 +28,12 @@ namespace App\Services\InfoProviderSystem\DTOs; * This could be a datasheet, a 3D model, a picture or similar. * @see \App\Tests\Services\InfoProviderSystem\DTOs\FileDTOTest */ -class FileDTO +readonly class FileDTO { /** * @var string The URL where to get this file */ - public readonly string $url; + public string $url; /** * @param string $url The URL where to get this file @@ -41,7 +41,7 @@ class FileDTO */ public function __construct( string $url, - public readonly ?string $name = null, + public ?string $name = null, ) { //Find all occurrences of non URL safe characters and replace them with their URL encoded version. //We only want to replace characters which can not have a valid meaning in a URL (what would break the URL). @@ -50,4 +50,4 @@ class FileDTO } -} \ No newline at end of file +} diff --git a/src/Services/InfoProviderSystem/DTOs/ParameterDTO.php b/src/Services/InfoProviderSystem/DTOs/ParameterDTO.php index 0b54d1a9..f5868039 100644 --- a/src/Services/InfoProviderSystem/DTOs/ParameterDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/ParameterDTO.php @@ -28,17 +28,17 @@ namespace App\Services\InfoProviderSystem\DTOs; * This could be a voltage, a current, a temperature or similar. * @see \App\Tests\Services\InfoProviderSystem\DTOs\ParameterDTOTest */ -class ParameterDTO +readonly class ParameterDTO { public function __construct( - public readonly string $name, - public readonly ?string $value_text = null, - public readonly ?float $value_typ = null, - public readonly ?float $value_min = null, - public readonly ?float $value_max = null, - public readonly ?string $unit = null, - public readonly ?string $symbol = null, - public readonly ?string $group = null, + public string $name, + public ?string $value_text = null, + public ?float $value_typ = null, + public ?float $value_min = null, + public ?float $value_max = null, + public ?string $unit = null, + public ?string $symbol = null, + public ?string $group = null, ) { } diff --git a/src/Services/InfoProviderSystem/DTOs/PartDetailDTO.php b/src/Services/InfoProviderSystem/DTOs/PartDetailDTO.php index 9f365f1e..41d50510 100644 --- a/src/Services/InfoProviderSystem/DTOs/PartDetailDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/PartDetailDTO.php @@ -70,4 +70,4 @@ class PartDetailDTO extends SearchResultDTO footprint: $footprint, ); } -} \ No newline at end of file +} diff --git a/src/Services/InfoProviderSystem/DTOs/PriceDTO.php b/src/Services/InfoProviderSystem/DTOs/PriceDTO.php index f1eb28f7..2acf3e57 100644 --- a/src/Services/InfoProviderSystem/DTOs/PriceDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/PriceDTO.php @@ -28,21 +28,21 @@ use Brick\Math\BigDecimal; /** * This DTO represents a price for a single unit in a certain discount range */ -class PriceDTO +readonly class PriceDTO { - private readonly BigDecimal $price_as_big_decimal; + private BigDecimal $price_as_big_decimal; public function __construct( /** @var float The minimum amount that needs to get ordered for this price to be valid */ - public readonly float $minimum_discount_amount, + public float $minimum_discount_amount, /** @var string The price as string (with .) */ - public readonly string $price, + public string $price, /** @var string The currency of the used ISO code of this price detail */ - public readonly ?string $currency_iso_code, + public ?string $currency_iso_code, /** @var bool If the price includes tax */ - public readonly ?bool $includes_tax = true, + public ?bool $includes_tax = true, /** @var float the price related quantity */ - public readonly ?float $price_related_quantity = 1.0, + public ?float $price_related_quantity = 1.0, ) { $this->price_as_big_decimal = BigDecimal::of($this->price); diff --git a/src/Services/InfoProviderSystem/DTOs/PurchaseInfoDTO.php b/src/Services/InfoProviderSystem/DTOs/PurchaseInfoDTO.php index bcd8be43..9ac142ff 100644 --- a/src/Services/InfoProviderSystem/DTOs/PurchaseInfoDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/PurchaseInfoDTO.php @@ -27,15 +27,15 @@ namespace App\Services\InfoProviderSystem\DTOs; * This DTO represents a purchase information for a part (supplier name, order number and prices). * @see \App\Tests\Services\InfoProviderSystem\DTOs\PurchaseInfoDTOTest */ -class PurchaseInfoDTO +readonly class PurchaseInfoDTO { public function __construct( - public readonly string $distributor_name, - public readonly string $order_number, + public string $distributor_name, + public string $order_number, /** @var PriceDTO[] */ - public readonly array $prices, + public array $prices, /** @var string|null An url to the product page of the vendor */ - public readonly ?string $product_url = null, + public ?string $product_url = null, ) { //Ensure that the prices are PriceDTO instances @@ -45,4 +45,4 @@ class PurchaseInfoDTO } } } -} \ No newline at end of file +} diff --git a/src/Services/InfoProviderSystem/DTOs/SearchResultDTO.php b/src/Services/InfoProviderSystem/DTOs/SearchResultDTO.php index 28943702..a70b2486 100644 --- a/src/Services/InfoProviderSystem/DTOs/SearchResultDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/SearchResultDTO.php @@ -59,8 +59,8 @@ class SearchResultDTO public readonly ?string $provider_url = null, /** @var string|null A footprint representation of the providers page */ public readonly ?string $footprint = null, - ) { - + ) + { if ($preview_image_url !== null) { //Utilize the escaping mechanism of FileDTO to ensure that the preview image URL is correctly encoded //See issue #521: https://github.com/Part-DB/Part-DB-server/issues/521 @@ -71,4 +71,47 @@ class SearchResultDTO $this->preview_image_url = null; } } -} \ No newline at end of file + + /** + * This method creates a normalized array representation of the DTO. + * @return array + */ + public function toNormalizedSearchResultArray(): array + { + return [ + 'provider_key' => $this->provider_key, + 'provider_id' => $this->provider_id, + 'name' => $this->name, + 'description' => $this->description, + 'category' => $this->category, + 'manufacturer' => $this->manufacturer, + 'mpn' => $this->mpn, + 'preview_image_url' => $this->preview_image_url, + 'manufacturing_status' => $this->manufacturing_status?->value, + 'provider_url' => $this->provider_url, + 'footprint' => $this->footprint, + ]; + } + + /** + * Creates a SearchResultDTO from a normalized array representation. + * @param array $data + * @return self + */ + public static function fromNormalizedSearchResultArray(array $data): self + { + return new self( + provider_key: $data['provider_key'], + provider_id: $data['provider_id'], + name: $data['name'], + description: $data['description'], + category: $data['category'] ?? null, + manufacturer: $data['manufacturer'] ?? null, + mpn: $data['mpn'] ?? null, + preview_image_url: $data['preview_image_url'] ?? null, + manufacturing_status: isset($data['manufacturing_status']) ? ManufacturingStatus::tryFrom($data['manufacturing_status']) : null, + provider_url: $data['provider_url'] ?? null, + footprint: $data['footprint'] ?? null, + ); + } +} diff --git a/src/Services/InfoProviderSystem/Providers/BatchInfoProviderInterface.php b/src/Services/InfoProviderSystem/Providers/BatchInfoProviderInterface.php new file mode 100644 index 00000000..549f117a --- /dev/null +++ b/src/Services/InfoProviderSystem/Providers/BatchInfoProviderInterface.php @@ -0,0 +1,40 @@ +. + */ + +declare(strict_types=1); + + +namespace App\Services\InfoProviderSystem\Providers; + +use App\Services\InfoProviderSystem\DTOs\SearchResultDTO; + +/** + * This interface marks a provider as a info provider which can provide information directly in batch operations + */ +interface BatchInfoProviderInterface extends InfoProviderInterface +{ + /** + * Search for multiple keywords in a single batch operation and return the results, ordered by the keywords. + * This allows for a more efficient search compared to running multiple single searches. + * @param string[] $keywords + * @return array An associative array where the key is the keyword and the value is the search results for that keyword + */ + public function searchByKeywordsBatch(array $keywords): array; +} diff --git a/src/Services/InfoProviderSystem/Providers/EmptyProvider.php b/src/Services/InfoProviderSystem/Providers/EmptyProvider.php new file mode 100644 index 00000000..e0de9772 --- /dev/null +++ b/src/Services/InfoProviderSystem/Providers/EmptyProvider.php @@ -0,0 +1,76 @@ +. + */ + +declare(strict_types=1); + + +namespace App\Services\InfoProviderSystem\Providers; + +use App\Services\InfoProviderSystem\DTOs\FileDTO; +use App\Services\InfoProviderSystem\DTOs\PartDetailDTO; +use App\Services\InfoProviderSystem\DTOs\SearchResultDTO; +use Symfony\Component\DependencyInjection\Attribute\When; + +/** + * This is a provider, which is used during tests. It always returns no results. + */ +#[When(env: 'test')] +class EmptyProvider implements InfoProviderInterface +{ + public function getProviderInfo(): array + { + return [ + 'name' => 'Empty Provider', + 'description' => 'This is a test provider', + //'url' => 'https://example.com', + 'disabled_help' => 'This provider is disabled for testing purposes' + ]; + } + + public function getProviderKey(): string + { + return 'empty'; + } + + public function isActive(): bool + { + return true; + } + + public function searchByKeyword(string $keyword): array + { + return [ + + ]; + } + + public function getCapabilities(): array + { + return [ + ProviderCapabilities::BASIC, + ProviderCapabilities::FOOTPRINT, + ]; + } + + public function getDetails(string $id): PartDetailDTO + { + throw new \RuntimeException('No part details available'); + } +} diff --git a/src/Services/InfoProviderSystem/Providers/LCSCProvider.php b/src/Services/InfoProviderSystem/Providers/LCSCProvider.php index 2d83fc7c..ede34eb8 100755 --- a/src/Services/InfoProviderSystem/Providers/LCSCProvider.php +++ b/src/Services/InfoProviderSystem/Providers/LCSCProvider.php @@ -33,7 +33,7 @@ use App\Settings\InfoProviderSystem\LCSCSettings; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Contracts\HttpClient\HttpClientInterface; -class LCSCProvider implements InfoProviderInterface +class LCSCProvider implements BatchInfoProviderInterface { private const ENDPOINT_URL = 'https://wmsc.lcsc.com/ftps/wm'; @@ -69,9 +69,10 @@ class LCSCProvider implements InfoProviderInterface /** * @param string $id + * @param bool $lightweight If true, skip expensive operations like datasheet resolution * @return PartDetailDTO */ - private function queryDetail(string $id): PartDetailDTO + private function queryDetail(string $id, bool $lightweight = false): PartDetailDTO { $response = $this->lcscClient->request('GET', self::ENDPOINT_URL . "/product/detail", [ 'headers' => [ @@ -89,7 +90,7 @@ class LCSCProvider implements InfoProviderInterface throw new \RuntimeException('Could not find product code: ' . $id); } - return $this->getPartDetail($product); + return $this->getPartDetail($product, $lightweight); } /** @@ -99,30 +100,42 @@ class LCSCProvider implements InfoProviderInterface private function getRealDatasheetUrl(?string $url): string { if ($url !== null && trim($url) !== '' && preg_match("/^https:\/\/(datasheet\.lcsc\.com|www\.lcsc\.com\/datasheet)\/.*(C\d+)\.pdf$/", $url, $matches) > 0) { - if (preg_match("/^https:\/\/datasheet\.lcsc\.com\/lcsc\/(.*\.pdf)$/", $url, $rewriteMatches) > 0) { - $url = 'https://www.lcsc.com/datasheet/lcsc_datasheet_' . $rewriteMatches[1]; - } - $response = $this->lcscClient->request('GET', $url, [ - 'headers' => [ - 'Referer' => 'https://www.lcsc.com/product-detail/_' . $matches[2] . '.html' - ], - ]); - if (preg_match('/(previewPdfUrl): ?("[^"]+wmsc\.lcsc\.com[^"]+\.pdf")/', $response->getContent(), $matches) > 0) { - //HACKY: The URL string contains escaped characters like \u002F, etc. To decode it, the JSON decoding is reused - //See https://github.com/Part-DB/Part-DB-server/pull/582#issuecomment-2033125934 - $jsonObj = json_decode('{"' . $matches[1] . '": ' . $matches[2] . '}'); - $url = $jsonObj->previewPdfUrl; - } + if (preg_match("/^https:\/\/datasheet\.lcsc\.com\/lcsc\/(.*\.pdf)$/", $url, $rewriteMatches) > 0) { + $url = 'https://www.lcsc.com/datasheet/lcsc_datasheet_' . $rewriteMatches[1]; + } + $response = $this->lcscClient->request('GET', $url, [ + 'headers' => [ + 'Referer' => 'https://www.lcsc.com/product-detail/_' . $matches[2] . '.html' + ], + ]); + if (preg_match('/(previewPdfUrl): ?("[^"]+wmsc\.lcsc\.com[^"]+\.pdf")/', $response->getContent(), $matches) > 0) { + //HACKY: The URL string contains escaped characters like \u002F, etc. To decode it, the JSON decoding is reused + //See https://github.com/Part-DB/Part-DB-server/pull/582#issuecomment-2033125934 + $jsonObj = json_decode('{"' . $matches[1] . '": ' . $matches[2] . '}'); + $url = $jsonObj->previewPdfUrl; + } } return $url; } /** * @param string $term + * @param bool $lightweight If true, skip expensive operations like datasheet resolution * @return PartDetailDTO[] */ - private function queryByTerm(string $term): array + private function queryByTerm(string $term, bool $lightweight = false): array { + // Optimize: If term looks like an LCSC part number (starts with C followed by digits), + // use direct detail query instead of slower search + if (preg_match('/^C\d+$/i', trim($term))) { + try { + return [$this->queryDetail(trim($term), $lightweight)]; + } catch (\Exception $e) { + // If direct lookup fails, fall back to search + // This handles cases where the C-code might not exist + } + } + $response = $this->lcscClient->request('POST', self::ENDPOINT_URL . "/search/v2/global", [ 'headers' => [ 'Cookie' => new Cookie('currencyCode', $this->settings->currency) @@ -145,11 +158,11 @@ class LCSCProvider implements InfoProviderInterface // detailed product listing. It does so utilizing a product tip field. // If product tip exists and there are no products in the product list try a detail query if (count($products) === 0 && $tipProductCode !== null) { - $result[] = $this->queryDetail($tipProductCode); + $result[] = $this->queryDetail($tipProductCode, $lightweight); } foreach ($products as $product) { - $result[] = $this->getPartDetail($product); + $result[] = $this->getPartDetail($product, $lightweight); } return $result; @@ -178,7 +191,7 @@ class LCSCProvider implements InfoProviderInterface * @param array $product * @return PartDetailDTO */ - private function getPartDetail(array $product): PartDetailDTO + private function getPartDetail(array $product, bool $lightweight = false): PartDetailDTO { // Get product images in advance $product_images = $this->getProductImages($product['productImages'] ?? null); @@ -214,10 +227,10 @@ class LCSCProvider implements InfoProviderInterface manufacturing_status: null, provider_url: $this->getProductShortURL($product['productCode']), footprint: $this->sanitizeField($footprint), - datasheets: $this->getProductDatasheets($product['pdfUrl'] ?? null), - images: $product_images, - parameters: $this->attributesToParameters($product['paramVOList'] ?? []), - vendor_infos: $this->pricesToVendorInfo($product['productCode'], $this->getProductShortURL($product['productCode']), $product['productPriceList'] ?? []), + datasheets: $lightweight ? [] : $this->getProductDatasheets($product['pdfUrl'] ?? null), + images: $product_images, // Always include images - users need to see them + parameters: $lightweight ? [] : $this->attributesToParameters($product['paramVOList'] ?? []), + vendor_infos: $lightweight ? [] : $this->pricesToVendorInfo($product['productCode'], $this->getProductShortURL($product['productCode']), $product['productPriceList'] ?? []), mass: $product['weight'] ?? null, ); } @@ -286,7 +299,7 @@ class LCSCProvider implements InfoProviderInterface */ private function getProductShortURL(string $product_code): string { - return 'https://www.lcsc.com/product-detail/' . $product_code .'.html'; + return 'https://www.lcsc.com/product-detail/' . $product_code . '.html'; } /** @@ -327,7 +340,7 @@ class LCSCProvider implements InfoProviderInterface //Skip this attribute if it's empty if (in_array(trim((string) $attribute['paramValueEn']), ['', '-'], true)) { - continue; + continue; } $result[] = ParameterDTO::parseValueIncludingUnit(name: $attribute['paramNameEn'], value: $attribute['paramValueEn'], group: null); @@ -338,12 +351,86 @@ class LCSCProvider implements InfoProviderInterface public function searchByKeyword(string $keyword): array { - return $this->queryByTerm($keyword); + return $this->queryByTerm($keyword, true); // Use lightweight mode for search + } + + /** + * Batch search multiple keywords asynchronously (like JavaScript Promise.all) + * @param array $keywords Array of keywords to search + * @return array Results indexed by keyword + */ + public function searchByKeywordsBatch(array $keywords): array + { + if (empty($keywords)) { + return []; + } + + $responses = []; + $results = []; + + // Start all requests immediately (like JavaScript promises without await) + foreach ($keywords as $keyword) { + if (preg_match('/^C\d+$/i', trim($keyword))) { + // Direct detail API call for C-codes + $responses[$keyword] = $this->lcscClient->request('GET', self::ENDPOINT_URL . "/product/detail", [ + 'headers' => [ + 'Cookie' => new Cookie('currencyCode', $this->settings->currency) + ], + 'query' => [ + 'productCode' => trim($keyword), + ], + ]); + } else { + // Search API call for other terms + $responses[$keyword] = $this->lcscClient->request('POST', self::ENDPOINT_URL . "/search/v2/global", [ + 'headers' => [ + 'Cookie' => new Cookie('currencyCode', $this->settings->currency) + ], + 'json' => [ + 'keyword' => $keyword, + ], + ]); + } + } + + // Now collect all results (like .then() in JavaScript) + foreach ($responses as $keyword => $response) { + try { + $arr = $response->toArray(); // This waits for the response + $results[$keyword] = $this->processSearchResponse($arr, $keyword); + } catch (\Exception $e) { + $results[$keyword] = []; // Empty results on error + } + } + + return $results; + } + + private function processSearchResponse(array $arr, string $keyword): array + { + $result = []; + + // Check if this looks like a detail response (direct C-code lookup) + if (isset($arr['result']['productCode'])) { + $product = $arr['result']; + $result[] = $this->getPartDetail($product, true); // lightweight mode + } else { + // This is a search response + $products = $arr['result']['productSearchResultVO']['productList'] ?? []; + $tipProductCode = $arr['result']['tipProductDetailUrlVO']['productCode'] ?? null; + + // If no products but has tip, we'd need another API call - skip for batch mode + foreach ($products as $product) { + $result[] = $this->getPartDetail($product, true); // lightweight mode + } + } + + return $result; } public function getDetails(string $id): PartDetailDTO { - $tmp = $this->queryByTerm($id); + $tmp = $this->queryByTerm($id, false); if (count($tmp) === 0) { throw new \RuntimeException('No part found with ID ' . $id); } diff --git a/src/Services/InfoProviderSystem/Providers/MouserProvider.php b/src/Services/InfoProviderSystem/Providers/MouserProvider.php index 6639e5c1..3171c994 100644 --- a/src/Services/InfoProviderSystem/Providers/MouserProvider.php +++ b/src/Services/InfoProviderSystem/Providers/MouserProvider.php @@ -132,6 +132,15 @@ class MouserProvider implements InfoProviderInterface ], ]); + // Check for API errors before processing response + if ($response->getStatusCode() !== 200) { + throw new \RuntimeException(sprintf( + 'Mouser API returned HTTP %d: %s', + $response->getStatusCode(), + $response->getContent(false) + )); + } + return $this->responseToDTOArray($response); } @@ -169,6 +178,16 @@ class MouserProvider implements InfoProviderInterface ] ], ]); + + // Check for API errors before processing response + if ($response->getStatusCode() !== 200) { + throw new \RuntimeException(sprintf( + 'Mouser API returned HTTP %d: %s', + $response->getStatusCode(), + $response->getContent(false) + )); + } + $tmp = $this->responseToDTOArray($response); //Ensure that we have exactly one result @@ -286,6 +305,17 @@ class MouserProvider implements InfoProviderInterface return (float)$val; } + private function mapCurrencyCode(string $currency): string + { + //Mouser uses "RMB" for Chinese Yuan, but the correct ISO code is "CNY" + if ($currency === "RMB") { + return "CNY"; + } + + //For all other currencies, we assume that the ISO code is correct + return $currency; + } + /** * Converts the pricing (StandardPricing field) from the Mouser API to an array of PurchaseInfoDTOs * @param array $price_breaks @@ -302,7 +332,7 @@ class MouserProvider implements InfoProviderInterface $prices[] = new PriceDTO( minimum_discount_amount: $price_break['Quantity'], price: (string)$number, - currency_iso_code: $price_break['Currency'] + currency_iso_code: $this->mapCurrencyCode($price_break['Currency']) ); } diff --git a/src/Services/LabelSystem/Barcodes/BarcodeContentGenerator.php b/src/Services/LabelSystem/Barcodes/BarcodeContentGenerator.php index 7ceb30dd..3df7d227 100644 --- a/src/Services/LabelSystem/Barcodes/BarcodeContentGenerator.php +++ b/src/Services/LabelSystem/Barcodes/BarcodeContentGenerator.php @@ -95,6 +95,11 @@ final class BarcodeContentGenerator return $prefix.$id; } + /** + * @param array $map + * @param object $target + * @return string + */ private function classToString(array $map, object $target): string { $class = $target::class; diff --git a/src/Services/Parts/PartsTableActionHandler.php b/src/Services/Parts/PartsTableActionHandler.php index 616df229..945cff7b 100644 --- a/src/Services/Parts/PartsTableActionHandler.php +++ b/src/Services/Parts/PartsTableActionHandler.php @@ -30,13 +30,11 @@ use App\Entity\Parts\Manufacturer; use App\Entity\Parts\MeasurementUnit; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; -use App\Repository\PartRepository; use Doctrine\ORM\EntityManagerInterface; use InvalidArgumentException; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Contracts\Translation\TranslatableInterface; use function Symfony\Component\Translation\t; @@ -100,7 +98,7 @@ implode(',', array_map(static fn (PartLot $lot) => $lot->getID(), $part->getPart //When action starts with "export_" we have to redirect to the export controller $matches = []; - if (preg_match('/^export_(json|yaml|xml|csv)$/', $action, $matches)) { + if (preg_match('/^export_(json|yaml|xml|csv|xlsx)$/', $action, $matches)) { $ids = implode(',', array_map(static fn (Part $part) => $part->getID(), $selected_parts)); $level = match ($target_id) { 2 => 'extended', @@ -119,6 +117,16 @@ implode(',', array_map(static fn (PartLot $lot) => $lot->getID(), $part->getPart ); } + if ($action === 'bulk_info_provider_import') { + $ids = implode(',', array_map(static fn (Part $part) => $part->getID(), $selected_parts)); + return new RedirectResponse( + $this->urlGenerator->generate('bulk_info_provider_step1', [ + 'ids' => $ids, + '_redirect' => $redirect_url + ]) + ); + } + //Iterate over the parts and apply the action to it: foreach ($selected_parts as $part) { diff --git a/src/Services/Trees/ToolsTreeBuilder.php b/src/Services/Trees/ToolsTreeBuilder.php index f7a9d1c4..036797f6 100644 --- a/src/Services/Trees/ToolsTreeBuilder.php +++ b/src/Services/Trees/ToolsTreeBuilder.php @@ -138,6 +138,11 @@ class ToolsTreeBuilder $this->translator->trans('info_providers.search.title'), $this->urlGenerator->generate('info_providers_search') ))->setIcon('fa-treeview fa-fw fa-solid fa-cloud-arrow-down'); + + $nodes[] = (new TreeViewNode( + $this->translator->trans('info_providers.bulk_import.manage_jobs'), + $this->urlGenerator->generate('bulk_info_provider_manage') + ))->setIcon('fa-treeview fa-fw fa-solid fa-tasks'); } return $nodes; diff --git a/src/Twig/Sandbox/InheritanceSecurityPolicy.php b/src/Twig/Sandbox/InheritanceSecurityPolicy.php index 93e874e9..06ab3a1f 100644 --- a/src/Twig/Sandbox/InheritanceSecurityPolicy.php +++ b/src/Twig/Sandbox/InheritanceSecurityPolicy.php @@ -34,9 +34,14 @@ use function is_array; */ final class InheritanceSecurityPolicy implements SecurityPolicyInterface { + /** + * @var array + */ private array $allowedMethods; - public function __construct(private array $allowedTags = [], private array $allowedFilters = [], array $allowedMethods = [], private array $allowedProperties = [], private array $allowedFunctions = []) + public function __construct(private array $allowedTags = [], private array $allowedFilters = [], array $allowedMethods = [], + /** @var array */ + private array $allowedProperties = [], private array $allowedFunctions = []) { $this->setAllowedMethods($allowedMethods); } diff --git a/templates/components/datatables.macro.html.twig b/templates/components/datatables.macro.html.twig index 009f815e..d7873498 100644 --- a/templates/components/datatables.macro.html.twig +++ b/templates/components/datatables.macro.html.twig @@ -30,8 +30,6 @@
- {# #} -
@@ -41,7 +39,7 @@ diff --git a/templates/info_providers/bulk_import/manage.html.twig b/templates/info_providers/bulk_import/manage.html.twig new file mode 100644 index 00000000..9bbed906 --- /dev/null +++ b/templates/info_providers/bulk_import/manage.html.twig @@ -0,0 +1,124 @@ +{% extends "main_card.html.twig" %} + +{% block title %} + {% trans %}info_providers.bulk_import.manage_jobs{% endtrans %} +{% endblock %} + +{% block card_title %} + {% trans %}info_providers.bulk_import.manage_jobs{% endtrans %} +{% endblock %} + +{% block card_content %} + +
+ +
+

+ {% trans %}info_providers.bulk_import.manage_jobs_description{% endtrans %} +

+
+ + {% if jobs is not empty %} +
+ + + + + + + + + + + + + + + + {% for job in jobs %} + + + + + + + + + + + + {% endfor %} + +
{% trans %}info_providers.bulk_import.job_name{% endtrans %}{% trans %}info_providers.bulk_import.parts_count{% endtrans %}{% trans %}info_providers.bulk_import.results_count{% endtrans %}{% trans %}info_providers.bulk_import.progress{% endtrans %}{% trans %}info_providers.bulk_import.status{% endtrans %}{% trans %}info_providers.bulk_import.created_by{% endtrans %}{% trans %}info_providers.bulk_import.created_at{% endtrans %}{% trans %}info_providers.bulk_import.completed_at{% endtrans %}{% trans %}info_providers.bulk_import.action.label{% endtrans %}
+ {{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }} + {% if job.isInProgress %} + Active + {% endif %} + {{ job.partCount }}{{ job.resultCount }} +
+
+
+
+
+ {{ job.progressPercentage }}% +
+ + {% trans with {'%current%': job.completedPartsCount + job.skippedPartsCount, '%total%': job.partCount} %}info_providers.bulk_import.progress_label{% endtrans %} + +
+ {% if job.isPending %} + {% trans %}info_providers.bulk_import.status.pending{% endtrans %} + {% elseif job.isInProgress %} + {% trans %}info_providers.bulk_import.status.in_progress{% endtrans %} + {% elseif job.isCompleted %} + {% trans %}info_providers.bulk_import.status.completed{% endtrans %} + {% elseif job.isStopped %} + {% trans %}info_providers.bulk_import.status.stopped{% endtrans %} + {% elseif job.isFailed %} + {% trans %}info_providers.bulk_import.status.failed{% endtrans %} + {% endif %} + {{ job.createdBy.fullName(true) }}{{ job.createdAt|format_datetime('short') }} + {% if job.completedAt %} + {{ job.completedAt|format_datetime('short') }} + {% else %} + - + {% endif %} + +
+ {% if job.isInProgress or job.isCompleted or job.isStopped %} + + {% trans %}info_providers.bulk_import.view_results{% endtrans %} + + {% endif %} + {% if job.canBeStopped %} + + {% endif %} + {% if job.isCompleted or job.isFailed or job.isStopped %} + + {% endif %} +
+
+
+ {% else %} + + {% endif %} + +
+ +{% endblock %} diff --git a/templates/info_providers/bulk_import/step1.html.twig b/templates/info_providers/bulk_import/step1.html.twig new file mode 100644 index 00000000..bb9bb351 --- /dev/null +++ b/templates/info_providers/bulk_import/step1.html.twig @@ -0,0 +1,304 @@ +{% extends "main_card.html.twig" %} + +{% import "info_providers/providers.macro.html.twig" as providers_macro %} +{% import "helper.twig" as helper %} + +{% block title %} + {% trans %}info_providers.bulk_import.step1.title{% endtrans %} +{% endblock %} + +{% block card_title %} + {% trans %}info_providers.bulk_import.step1.title{% endtrans %} + {{ parts|length }} {% trans %}info_providers.bulk_import.parts_selected{% endtrans %} +{% endblock %} + +{% block card_content %} + +
+ + + {% if existing_jobs is not empty %} +
+
+
{% trans %}info_providers.bulk_import.existing_jobs{% endtrans %}
+
+
+
+ + + + + + + + + + + + + + {% for job in existing_jobs %} + + + + + + + + + + {% endfor %} + +
{% trans %}info_providers.bulk_import.job_name{% endtrans %}{% trans %}info_providers.bulk_import.parts_count{% endtrans %}{% trans %}info_providers.bulk_import.results_count{% endtrans %}{% trans %}info_providers.bulk_import.progress{% endtrans %}{% trans %}info_providers.bulk_import.status{% endtrans %}{% trans %}info_providers.bulk_import.created_at{% endtrans %}{% trans %}info_providers.bulk_import.action.label{% endtrans %}
{{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }}{{ job.partCount }}{{ job.resultCount }} +
+
+
+
+
+ {{ job.progressPercentage }}% +
+ {{ job.completedPartsCount }}/{{ job.partCount }} +
+ {% if job.isPending %} + {% trans %}info_providers.bulk_import.status.pending{% endtrans %} + {% elseif job.isInProgress %} + {% trans %}info_providers.bulk_import.status.in_progress{% endtrans %} + {% elseif job.isCompleted %} + {% trans %}info_providers.bulk_import.status.completed{% endtrans %} + {% elseif job.isFailed %} + {% trans %}info_providers.bulk_import.status.failed{% endtrans %} + {% endif %} + {{ job.createdAt|date('Y-m-d H:i') }} + {% if job.isInProgress or job.isCompleted %} + + {% trans %}info_providers.bulk_import.view_results{% endtrans %} + + {% endif %} +
+
+
+
+ {% endif %} + + + + + + + + +
+
+
{% trans %}info_providers.bulk_import.selected_parts{% endtrans %}
+
+ +
+ + {{ form_start(form) }} + +
+
+
{% trans %}info_providers.bulk_import.field_mappings{% endtrans %}
+ {% trans %}info_providers.bulk_import.field_mappings_help{% endtrans %} +
+
+ + + + + + + + + + + {% for mapping in form.field_mappings %} + + + + + + + {% endfor %} + +
{% trans %}info_providers.bulk_search.search_field{% endtrans %}{% trans %}info_providers.bulk_search.providers{% endtrans %}{% trans %}info_providers.bulk_search.priority{% endtrans %}{% trans %}info_providers.bulk_import.actions.label{% endtrans %}
{{ form_widget(mapping.field) }}{{ form_errors(mapping.field) }}{{ form_widget(mapping.providers) }}{{ form_errors(mapping.providers) }}{{ form_widget(mapping.priority) }}{{ form_errors(mapping.priority) }} + +
+ +
+
+ +
+ + +
+ {{ form_widget(form.prefetch_details, {'attr': {'class': 'form-check-input'}}) }} + {{ form_label(form.prefetch_details, null, {'label_attr': {'class': 'form-check-label'}}) }} + {{ form_help(form.prefetch_details) }} +
+ + {{ form_widget(form.submit, {'attr': {'class': 'btn btn-primary', 'data-field-mapping-target': 'submitButton'}}) }} +
+ + {{ form_end(form) }} + + {% if search_results is not null %} +
+

{% trans %}info_providers.bulk_import.search_results.title{% endtrans %}

+ + {% for part_result in search_results %} + {% set part = part_result.part %} +
+
+
+ {{ part.name }} + {% if part_result.errors is not empty %} + {{ part_result.errors|length }} {% trans %}info_providers.bulk_import.errors{% endtrans %} + {% endif %} + {{ part_result.search_results|length }} {% trans %}info_providers.bulk_import.results_found{% endtrans %} +
+
+
+ {% if part_result.errors is not empty %} + {% for error in part_result.errors %} + + {% endfor %} + {% endif %} + + {% if part_result.search_results|length > 0 %} +
+ + + + + + + + + + + + + + {% for result in part_result.search_results %} + {% set dto = result.dto %} + {% set localPart = result.localPart %} + + + + + + + + + + {% endfor %} + +
{% trans %}name.label{% endtrans %}{% trans %}description.label{% endtrans %}{% trans %}manufacturer.label{% endtrans %}{% trans %}info_providers.table.provider.label{% endtrans %}{% trans %}info_providers.bulk_import.source_field{% endtrans %}{% trans %}info_providers.bulk_import.action.label{% endtrans %}
+ + + {% if dto.provider_url is not null %} + {{ dto.name }} + {% else %} + {{ dto.name }} + {% endif %} + {% if dto.mpn is not null %} +
{{ dto.mpn }} + {% endif %} +
{{ dto.description }}{{ dto.manufacturer ?? '' }} + {{ info_provider_label(dto.provider_key)|default(dto.provider_key) }} +
{{ dto.provider_id }} +
+ {{ result.source_field ?? 'unknown' }} + {% if result.source_keyword %} +
{{ result.source_keyword }} + {% endif %} +
+
+ {% set updateHref = path('info_providers_update_part', + {'id': part.id, 'providerKey': dto.provider_key, 'providerId': dto.provider_id}) %} + + {% trans %}info_providers.bulk_import.update_part{% endtrans %} + + + {% if localPart is not null %} + + {% trans %}info_providers.bulk_import.view_existing{% endtrans %} + + {% endif %} +
+
+
+ {% else %} + + {% endif %} +
+
+ {% endfor %} + {% endif %} + +
+ +{% endblock %} + diff --git a/templates/info_providers/bulk_import/step2.html.twig b/templates/info_providers/bulk_import/step2.html.twig new file mode 100644 index 00000000..559ca20a --- /dev/null +++ b/templates/info_providers/bulk_import/step2.html.twig @@ -0,0 +1,240 @@ +{% extends "main_card.html.twig" %} + +{% import "info_providers/providers.macro.html.twig" as providers_macro %} +{% import "helper.twig" as helper %} + +{% block title %} + {% trans %}info_providers.bulk_import.step2.title{% endtrans %} +{% endblock %} + +{% block card_title %} + {% trans %}info_providers.bulk_import.step2.title{% endtrans %} + {{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }} +{% endblock %} + +{% block card_content %} + +
+
+
+
{{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }}
+ + {{ job.partCount }} {% trans %}info_providers.bulk_import.parts{% endtrans %} โ€ข + {{ job.resultCount }} {% trans %}info_providers.bulk_import.results{% endtrans %} โ€ข + {% trans %}info_providers.bulk_import.created_at{% endtrans %}: {{ job.createdAt|date('Y-m-d H:i') }} + +
+
+ {% if job.isPending %} + {% trans %}info_providers.bulk_import.status.pending{% endtrans %} + {% elseif job.isInProgress %} + {% trans %}info_providers.bulk_import.status.in_progress{% endtrans %} + {% elseif job.isCompleted %} + {% trans %}info_providers.bulk_import.status.completed{% endtrans %} + {% elseif job.isFailed %} + {% trans %}info_providers.bulk_import.status.failed{% endtrans %} + {% endif %} +
+
+ + +
+
+
+
Progress
+ {{ job.completedPartsCount }} / {{ job.partCount }} completed +
+
+
+
+
+
+ + {{ job.completedPartsCount }} {% trans %}info_providers.bulk_import.completed{% endtrans %} โ€ข + {{ job.skippedPartsCount }} {% trans %}info_providers.bulk_import.skipped{% endtrans %} + + {{ job.progressPercentage }}% +
+
+
+ + + + + +
+
+
+
+
{% trans %}info_providers.bulk_import.research.title{% endtrans %}
+ {% trans %}info_providers.bulk_import.research.description{% endtrans %} +
+
+ +
+
+
+
+ + {% for part_result in search_results %} + {# @var part_result \App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO #} + + {% set part = part_result.part %} + {% set isCompleted = job.isPartCompleted(part.id) %} + {% set isSkipped = job.isPartSkipped(part.id) %} +
+
+
+
+ + {{ part.name }} + + {% if isCompleted %} + + {% trans %}info_providers.bulk_import.completed{% endtrans %} + + {% elseif isSkipped %} + + {% trans %}info_providers.bulk_import.skipped{% endtrans %} + + {% endif %} + {% if part_result.errors is not empty %} + {% trans with {'%count%': part_result.errors|length} %}info_providers.bulk_import.errors{% endtrans %} + {% endif %} + {% trans with {'%count%': part_result.searchResults|length} %}info_providers.bulk_import.results_found{% endtrans %} +
+
+
+ + {% if not isCompleted and not isSkipped %} + + + {% elseif isCompleted %} + + {% elseif isSkipped %} + + {% endif %} +
+
+
+ {% if part_result.errors is not empty %} + {% for error in part_result.errors %} + + {% endfor %} + {% endif %} + + {% if part_result.searchResults|length > 0 %} +
+ + + + + + + + + + + + + + {% for result in part_result.searchResults %} + {# @var result \App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO #} + {% set dto = result.searchResult %} + {% set localPart = result.localPart %} + + + + + + + + + + {% endfor %} + +
{% trans %}name.label{% endtrans %}{% trans %}description.label{% endtrans %}{% trans %}manufacturer.label{% endtrans %}{% trans %}info_providers.table.provider.label{% endtrans %}{% trans %}info_providers.bulk_import.source_field{% endtrans %}{% trans %}info_providers.bulk_import.action.label{% endtrans %}
+ + + {% if dto.provider_url is not null %} + {{ dto.name }} + {% else %} + {{ dto.name }} + {% endif %} + {% if dto.mpn is not null %} +
{{ dto.mpn }} + {% endif %} +
{{ dto.description }}{{ dto.manufacturer ?? '' }} + {{ info_provider_label(dto.provider_key)|default(dto.provider_key) }} +
{{ dto.provider_id }} +
+ {{ result.sourceField ?? 'unknown' }} + {% if result.sourceKeyword %} +
{{ result.sourceKeyword }} + {% endif %} +
+
+ {% set updateHref = path('info_providers_update_part', + {'id': part.id, 'providerKey': dto.provider_key, 'providerId': dto.provider_id}) ~ '?jobId=' ~ job.id %} + + {% trans %}info_providers.bulk_import.update_part{% endtrans %} + +
+
+
+ {% else %} + + {% endif %} +
+
+ {% endfor %} + +
+{% endblock %} + diff --git a/templates/parts/edit/edit_part_info.html.twig b/templates/parts/edit/edit_part_info.html.twig index 20cddbd7..28a88132 100644 --- a/templates/parts/edit/edit_part_info.html.twig +++ b/templates/parts/edit/edit_part_info.html.twig @@ -4,6 +4,32 @@ {% trans with {'%name%': part.name|escape } %}part.edit.title{% endtrans %} {% endblock %} +{% block before_card %} + {% if bulk_job and jobId %} +
+
+
+ + + {% trans %}info_providers.bulk_import.back{% endtrans %} + +
+ + +
+
+ + {% trans %}info_providers.bulk_import.editing_part{% endtrans %} +
+
+
+
+ {% endif %} +{% endblock %} + {% block card_title %} {% trans with {'%name%': part.name|escape } %}part.edit.card_title{% endtrans %} diff --git a/templates/parts/edit/update_from_ip.html.twig b/templates/parts/edit/update_from_ip.html.twig index fb1dfad3..1ab2ca59 100644 --- a/templates/parts/edit/update_from_ip.html.twig +++ b/templates/parts/edit/update_from_ip.html.twig @@ -5,6 +5,19 @@ {% block card_border %}border-info{% endblock %} {% block card_type %}bg-info text-bg-info{% endblock %} +{% block before_card %} + {% if bulk_job and jobId %} +
+
+
+ + {% trans %}info_providers.bulk_import.editing_part{% endtrans %} +
+
+
+ {% endif %} +{% endblock %} + {% block title %} {% trans %}info_providers.update_part.title{% endtrans %}: {{ merge_old_name }} {% endblock %} diff --git a/templates/parts/lists/_filter.html.twig b/templates/parts/lists/_filter.html.twig index f578f0df..397b1857 100644 --- a/templates/parts/lists/_filter.html.twig +++ b/templates/parts/lists/_filter.html.twig @@ -31,6 +31,11 @@ {% endif %} + {% if filterForm.inBulkImportJob is defined %} + + {% endif %} {{ form_start(filterForm, {"attr": {"data-controller": "helpers--form-cleanup", "data-action": "helpers--form-cleanup#submit"}}) }} @@ -128,6 +133,13 @@ {{ form_row(filterForm.bomComment) }}
{% endif %} + {% if filterForm.inBulkImportJob is defined %} +
+ {{ form_row(filterForm.inBulkImportJob) }} + {{ form_row(filterForm.bulkImportJobStatus) }} + {{ form_row(filterForm.bulkImportPartStatus) }} +
+ {% endif %}
diff --git a/tests/Controller/BulkInfoProviderImportControllerTest.php b/tests/Controller/BulkInfoProviderImportControllerTest.php new file mode 100644 index 00000000..e71a5fa2 --- /dev/null +++ b/tests/Controller/BulkInfoProviderImportControllerTest.php @@ -0,0 +1,889 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Controller; + +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\Parts\Part; +use App\Entity\UserSystem\User; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use App\Services\InfoProviderSystem\DTOs\SearchResultDTO; +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; +use Symfony\Component\HttpFoundation\Response; + +/** + * @group slow + * @group DB + */ +class BulkInfoProviderImportControllerTest extends WebTestCase +{ + public function testStep1WithoutIds(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('GET', '/tools/bulk_info_provider_import/step1'); + + self::assertResponseRedirects(); + } + + public function testStep1WithInvalidIds(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=999999,888888'); + + self::assertResponseRedirects(); + } + + public function testManagePage(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('GET', '/tools/bulk_info_provider_import/manage'); + + // Follow any redirects (like locale redirects) + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + self::assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testAccessControlForStep1(): void + { + $client = static::createClient(); + + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=1'); + self::assertResponseRedirects(); + + $this->loginAsUser($client, 'noread'); + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=1'); + + // Follow redirects if any, then check for 403 or final response + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + // The user might get redirected to an error page instead of direct 403 + $this->assertTrue( + $client->getResponse()->getStatusCode() === Response::HTTP_FORBIDDEN || + $client->getResponse()->getStatusCode() === Response::HTTP_OK + ); + } + + public function testAccessControlForManage(): void + { + $client = static::createClient(); + + $client->request('GET', '/tools/bulk_info_provider_import/manage'); + self::assertResponseRedirects(); + + $this->loginAsUser($client, 'noread'); + $client->request('GET', '/tools/bulk_info_provider_import/manage'); + + // Follow redirects if any, then check for 403 or final response + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + // The user might get redirected to an error page instead of direct 403 + $this->assertTrue( + $client->getResponse()->getStatusCode() === Response::HTTP_FORBIDDEN || + $client->getResponse()->getStatusCode() === Response::HTTP_OK + ); + } + + public function testStep2TemplateRendering(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = static::getContainer()->get('doctrine')->getManager(); + + // Use an existing part from test fixtures (ID 1 should exist) + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Get the admin user for the createdBy field + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Create a test job with search results that include source_field and source_keyword + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + $job->addPart($part); + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + + $searchResults = new BulkSearchResponseDTO(partResults: [ + new BulkSearchPartResultsDTO(part: $part, + searchResults: [new BulkSearchPartResultDTO( + searchResult: new SearchResultDTO(provider_key: 'test_provider', provider_id: 'TEST123', name: 'Test Component', description: 'Test component description', manufacturer: 'Test Manufacturer', mpn: 'TEST-MPN-123', provider_url: 'https://example.com/test', preview_image_url: null,), + sourceField: 'test_field', + sourceKeyword: 'test_keyword', + localPart: null, + )] + ) + ]); + + $job->setSearchResults($searchResults); + + $entityManager->persist($job); + $entityManager->flush(); + + // Test that step2 renders correctly with the search results + $client->request('GET', '/tools/bulk_info_provider_import/step2/' . $job->getId()); + + // Follow any redirects (like locale redirects) + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + self::assertResponseStatusCodeSame(Response::HTTP_OK); + + // Verify the template rendered the source_field and source_keyword correctly + $content = $client->getResponse()->getContent(); + $this->assertStringContainsString('test_field', $content); + $this->assertStringContainsString('test_keyword', $content); + + // Clean up - find by ID to avoid detached entity issues + $jobId = $job->getId(); + $entityManager->clear(); // Clear all entities + $jobToRemove = $entityManager->find(BulkInfoProviderImportJob::class, $jobId); + if ($jobToRemove) { + $entityManager->remove($jobToRemove); + $entityManager->flush(); + } + } + + public function testStep1WithValidIds(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=' . $part->getId()); + + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + + public function testDeleteJobWithValidJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = self::getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get a test part + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Create a completed job + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + $job->addPart($part); + $job->setStatus(BulkImportJobStatus::COMPLETED); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('DELETE', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/delete'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertTrue($response['success']); + } + + public function testDeleteJobWithNonExistentJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('DELETE', '/en/tools/bulk_info_provider_import/job/999999/delete'); + + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertArrayHasKey('error', $response); + } + + public function testDeleteJobWithActiveJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = self::getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1]); + + // Create an active job + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('DELETE', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/delete'); + + $this->assertResponseStatusCodeSame(Response::HTTP_BAD_REQUEST); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertArrayHasKey('error', $response); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testStopJobWithValidJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = self::getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1]); + + // Create an active job + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/stop'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertTrue($response['success']); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testStopJobWithNonExistentJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/999999/stop'); + + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertArrayHasKey('error', $response); + } + + public function testMarkPartCompleted(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1, 2]); + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-completed'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertTrue($response['success']); + $this->assertArrayHasKey('progress', $response); + $this->assertArrayHasKey('completed_count', $response); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testMarkPartSkipped(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1, 2]); + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-skipped', [ + 'reason' => 'Test skip reason' + ]); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertTrue($response['success']); + $this->assertArrayHasKey('skipped_count', $response); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testMarkPartPending(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1]); + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-pending'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertTrue($response['success']); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testStep2WithNonExistentJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('GET', '/tools/bulk_info_provider_import/step2/999999'); + + $this->assertResponseRedirects(); + } + + public function testStep2WithUnauthorizedAccess(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $admin = $userRepository->findOneBy(['name' => 'admin']); + $readonly = $userRepository->findOneBy(['name' => 'noread']); + + if (!$admin || !$readonly) { + $this->markTestSkipped('Required test users not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1]); + + // Create job as admin + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($admin); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + // Try to access as readonly user + $this->loginAsUser($client, 'noread'); + $client->request('GET', '/tools/bulk_info_provider_import/step2/' . $job->getId()); + + $this->assertResponseRedirects(); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + public function testJobAccessControlForDelete(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $admin = $userRepository->findOneBy(['name' => 'admin']); + $readonly = $userRepository->findOneBy(['name' => 'noread']); + + if (!$admin || !$readonly) { + $this->markTestSkipped('Required test users not found in fixtures'); + } + + // Get test parts + $parts = $this->getTestParts($entityManager, [1]); + + // Create job as readonly user + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($readonly); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::COMPLETED); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + // Try to delete as admin (should fail due to ownership) + $client->request('DELETE', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/delete'); + + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + private function loginAsUser($client, string $username): void + { + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => $username]); + + if (!$user) { + $this->markTestSkipped("User {$username} not found"); + } + + $client->loginUser($user); + } + + private function getTestParts($entityManager, array $ids): array + { + $partRepository = $entityManager->getRepository(Part::class); + $parts = []; + + foreach ($ids as $id) { + $part = $partRepository->find($id); + if (!$part) { + $this->markTestSkipped("Test part with ID {$id} not found in fixtures"); + } + $parts[] = $part; + } + + return $parts; + } + + public function testStep1Form(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=' . $part->getId()); + + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertStringContainsString('Bulk Info Provider Import', $client->getResponse()->getContent()); + } + + public function testStep1FormSubmissionWithErrors(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/tools/bulk_info_provider_import/step1?ids=' . $part->getId()); + + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertStringContainsString('Bulk Info Provider Import', $client->getResponse()->getContent()); + } + + public function testBulkInfoProviderServiceKeywordExtraction(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Test that the service can extract keywords from parts + $bulkService = $client->getContainer()->get(\App\Services\InfoProviderSystem\BulkInfoProviderService::class); + + // Create field mappings to verify the service works + $fieldMappings = [ + new \App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO('name', ['test'], 1), + new \App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO('mpn', ['test'], 2) + ]; + + // The service may return an empty result or throw when no results are found + try { + $result = $bulkService->performBulkSearch([$part], $fieldMappings, false); + $this->assertInstanceOf(\App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO::class, $result); + } catch (\RuntimeException $e) { + $this->assertStringContainsString('No search results found', $e->getMessage()); + } + } + + public function testManagePageWithJobCleanup(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + $job->addPart($part); + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('GET', '/tools/bulk_info_provider_import/manage'); + + if ($client->getResponse()->isRedirect()) { + $client->followRedirect(); + } + + self::assertResponseStatusCodeSame(Response::HTTP_OK); + + // Find job from database to avoid detached entity errors + $jobId = $job->getId(); + $entityManager->clear(); + $persistedJob = $entityManager->find(BulkInfoProviderImportJob::class, $jobId); + if ($persistedJob) { + $entityManager->remove($persistedJob); + $entityManager->flush(); + } + } + + public function testBulkInfoProviderServiceSupplierPartNumberExtraction(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Test that the service can handle supplier part number fields + $bulkService = $client->getContainer()->get(\App\Services\InfoProviderSystem\BulkInfoProviderService::class); + + // Create field mappings with supplier SPN field mapping + $fieldMappings = [ + new \App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO('invalid_field', ['test'], 1), + new \App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO('test_supplier_spn', ['test'], 2) + ]; + + // The service should be able to process the request and throw an exception when no results are found + try { + $bulkService->performBulkSearch([$part], $fieldMappings, false); + $this->fail('Expected RuntimeException to be thrown when no search results are found'); + } catch (\RuntimeException $e) { + $this->assertStringContainsString('No search results found', $e->getMessage()); + } + } + + public function testBulkInfoProviderServiceBatchProcessing(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Test that the service can handle batch processing + $bulkService = $client->getContainer()->get(\App\Services\InfoProviderSystem\BulkInfoProviderService::class); + + // Create field mappings with multiple keywords + $fieldMappings = [ + new \App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO('empty', ['test'], 1) + ]; + + // The service should be able to process the request and throw an exception when no results are found + try { + $response = $bulkService->performBulkSearch([$part], $fieldMappings, false); + $this->fail('Expected RuntimeException to be thrown when no search results are found'); + } catch (\RuntimeException $e) { + $this->assertStringContainsString('No search results found', $e->getMessage()); + } + } + + public function testBulkInfoProviderServicePrefetchDetails(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + // Test that the service can handle prefetch details + $bulkService = $client->getContainer()->get(\App\Services\InfoProviderSystem\BulkInfoProviderService::class); + + // Create empty search results to test prefetch method + $searchResults = new BulkSearchResponseDTO([ + new BulkSearchPartResultsDTO(part: $part, searchResults: [], errors: []) + ]); + + // The prefetch method should not throw any errors + $bulkService->prefetchDetailsForResults($searchResults); + + // If we get here, the method executed successfully + $this->assertTrue(true); + } + + public function testJobAccessControlForStopAndMarkOperations(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $admin = $userRepository->findOneBy(['name' => 'admin']); + $readonly = $userRepository->findOneBy(['name' => 'noread']); + + if (!$admin || !$readonly) { + $this->markTestSkipped('Required test users not found in fixtures'); + } + + $parts = $this->getTestParts($entityManager, [1]); + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($readonly); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/stop'); + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-completed'); + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-skipped', [ + 'reason' => 'Test reason' + ]); + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/part/1/mark-pending'); + $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); + + // Find job from database to avoid detached entity errors + $jobId = $job->getId(); + $entityManager->clear(); + $persistedJob = $entityManager->find(BulkInfoProviderImportJob::class, $jobId); + if ($persistedJob) { + $entityManager->remove($persistedJob); + $entityManager->flush(); + } + } + + public function testOperationsOnCompletedJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$user) { + $this->markTestSkipped('Admin user not found in fixtures'); + } + + $parts = $this->getTestParts($entityManager, [1]); + + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + foreach ($parts as $part) { + $job->addPart($part); + } + $job->setStatus(BulkImportJobStatus::COMPLETED); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('POST', '/en/tools/bulk_info_provider_import/job/' . $job->getId() . '/stop'); + $this->assertResponseStatusCodeSame(Response::HTTP_BAD_REQUEST); + $response = json_decode($client->getResponse()->getContent(), true); + $this->assertArrayHasKey('error', $response); + + $entityManager->remove($job); + $entityManager->flush(); + } +} diff --git a/tests/Controller/PartControllerTest.php b/tests/Controller/PartControllerTest.php new file mode 100644 index 00000000..c47c62f8 --- /dev/null +++ b/tests/Controller/PartControllerTest.php @@ -0,0 +1,334 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Controller; + +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\Parts\Category; +use App\Entity\Parts\Footprint; +use App\Entity\Parts\Manufacturer; +use App\Entity\Parts\Part; +use App\Entity\Parts\StorageLocation; +use App\Entity\Parts\Supplier; +use App\Entity\UserSystem\User; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; +use Symfony\Component\HttpFoundation\Response; + +/** + * @group slow + * @group DB + */ +class PartControllerTest extends WebTestCase +{ + public function testShowPart(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/' . $part->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testShowPartWithTimestamp(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $timestamp = time(); + $client->request('GET', "/en/part/{$part->getId()}/info/{$timestamp}"); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testEditPart(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/' . $part->getId() . '/edit'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertSelectorExists('form[name="part_base"]'); + } + + public function testEditPartWithBulkJob(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => 'admin']); + + if (!$part || !$user) { + $this->markTestSkipped('Required test data not found in fixtures'); + } + + // Create a bulk job + $job = new BulkInfoProviderImportJob(); + $job->setCreatedBy($user); + $job->setPartIds([$part->getId()]); + $job->setStatus(BulkImportJobStatus::IN_PROGRESS); + $job->setSearchResults(new BulkSearchResponseDTO([])); + + $entityManager->persist($job); + $entityManager->flush(); + + $client->request('GET', '/en/part/' . $part->getId() . '/edit?jobId=' . $job->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + + // Clean up + $entityManager->remove($job); + $entityManager->flush(); + } + + + + public function testNewPart(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $client->request('GET', '/en/part/new'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertSelectorExists('form[name="part_base"]'); + } + + public function testNewPartWithCategory(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $categoryRepository = $entityManager->getRepository(Category::class); + $category = $categoryRepository->find(1); + + if (!$category) { + $this->markTestSkipped('Test category with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/new?category=' . $category->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testNewPartWithFootprint(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $footprintRepository = $entityManager->getRepository(Footprint::class); + $footprint = $footprintRepository->find(1); + + if (!$footprint) { + $this->markTestSkipped('Test footprint with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/new?footprint=' . $footprint->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testNewPartWithManufacturer(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $manufacturerRepository = $entityManager->getRepository(Manufacturer::class); + $manufacturer = $manufacturerRepository->find(1); + + if (!$manufacturer) { + $this->markTestSkipped('Test manufacturer with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/new?manufacturer=' . $manufacturer->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testNewPartWithStorageLocation(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $storageLocationRepository = $entityManager->getRepository(StorageLocation::class); + $storageLocation = $storageLocationRepository->find(1); + + if (!$storageLocation) { + $this->markTestSkipped('Test storage location with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/new?storelocation=' . $storageLocation->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testNewPartWithSupplier(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $supplierRepository = $entityManager->getRepository(Supplier::class); + $supplier = $supplierRepository->find(1); + + if (!$supplier) { + $this->markTestSkipped('Test supplier with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/new?supplier=' . $supplier->getId()); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + } + + public function testClonePart(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/' . $part->getId() . '/clone'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertSelectorExists('form[name="part_base"]'); + } + + public function testMergeParts(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'admin'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $categoryRepository = $entityManager->getRepository(Category::class); + $category = $categoryRepository->find(1); + + if (!$category) { + $this->markTestSkipped('Test category with ID 1 not found in fixtures'); + } + + // Create two test parts + $targetPart = new Part(); + $targetPart->setName('Target Part'); + $targetPart->setCategory($category); + + $otherPart = new Part(); + $otherPart->setName('Other Part'); + $otherPart->setCategory($category); + + $entityManager->persist($targetPart); + $entityManager->persist($otherPart); + $entityManager->flush(); + + $client->request('GET', "/en/part/{$targetPart->getId()}/merge/{$otherPart->getId()}"); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertSelectorExists('form[name="part_base"]'); + + // Clean up + $entityManager->remove($targetPart); + $entityManager->remove($otherPart); + $entityManager->flush(); + } + + + + + + public function testAccessControlForUnauthorizedUser(): void + { + $client = static::createClient(); + $this->loginAsUser($client, 'noread'); + + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $partRepository = $entityManager->getRepository(Part::class); + $part = $partRepository->find(1); + + if (!$part) { + $this->markTestSkipped('Test part with ID 1 not found in fixtures'); + } + + $client->request('GET', '/en/part/' . $part->getId()); + + // Should either be forbidden or redirected to error page + $this->assertTrue( + $client->getResponse()->getStatusCode() === Response::HTTP_FORBIDDEN || + $client->getResponse()->isRedirect() + ); + } + + private function loginAsUser($client, string $username): void + { + $entityManager = $client->getContainer()->get('doctrine')->getManager(); + $userRepository = $entityManager->getRepository(User::class); + $user = $userRepository->findOneBy(['name' => $username]); + + if (!$user) { + $this->markTestSkipped("User {$username} not found"); + } + + $client->loginUser($user); + } + +} diff --git a/tests/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraintTest.php b/tests/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraintTest.php new file mode 100644 index 00000000..816a8035 --- /dev/null +++ b/tests/DataTables/Filters/Constraints/Part/BulkImportJobStatusConstraintTest.php @@ -0,0 +1,250 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\DataTables\Filters\Constraints\Part; + +use App\DataTables\Filters\Constraints\Part\BulkImportJobStatusConstraint; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\QueryBuilder; +use PHPUnit\Framework\TestCase; + +class BulkImportJobStatusConstraintTest extends TestCase +{ + private BulkImportJobStatusConstraint $constraint; + private QueryBuilder $queryBuilder; + private EntityManagerInterface $entityManager; + + protected function setUp(): void + { + $this->constraint = new BulkImportJobStatusConstraint(); + $this->entityManager = $this->createMock(EntityManagerInterface::class); + $this->queryBuilder = $this->createMock(QueryBuilder::class); + + $this->queryBuilder->method('getEntityManager') + ->willReturn($this->entityManager); + } + + public function testConstructor(): void + { + $this->assertEquals([], $this->constraint->getValue()); + $this->assertEmpty($this->constraint->getOperator()); + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testGetAndSetValues(): void + { + $values = ['pending', 'in_progress']; + $this->constraint->setValue($values); + + $this->assertEquals($values, $this->constraint->getValue()); + } + + public function testGetAndSetOperator(): void + { + $operator = 'ANY'; + $this->constraint->setOperator($operator); + + $this->assertEquals($operator, $this->constraint->getOperator()); + } + + public function testIsEnabledWithEmptyValues(): void + { + $this->constraint->setOperator('ANY'); + + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testIsEnabledWithNullOperator(): void + { + $this->constraint->setValue(['pending']); + + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testIsEnabledWithValuesAndOperator(): void + { + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + + $this->assertTrue($this->constraint->isEnabled()); + } + + public function testApplyWithEmptyValues(): void + { + $this->constraint->setOperator('ANY'); + + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithNullOperator(): void + { + $this->constraint->setValue(['pending']); + + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithAnyOperator(): void + { + $this->constraint->setValue(['pending', 'in_progress']); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('join')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->expects($this->once()) + ->method('andWhere') + ->with('EXISTS (EXISTS_SUBQUERY_DQL)'); + + $this->queryBuilder->expects($this->once()) + ->method('setParameter') + ->with('job_status_values', ['pending', 'in_progress']); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithNoneOperator(): void + { + $this->constraint->setValue(['completed']); + $this->constraint->setOperator('NONE'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('join')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->expects($this->once()) + ->method('andWhere') + ->with('NOT EXISTS (EXISTS_SUBQUERY_DQL)'); + + $this->queryBuilder->expects($this->once()) + ->method('setParameter') + ->with('job_status_values', ['completed']); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithUnsupportedOperator(): void + { + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('UNKNOWN'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('join')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + // Should not call andWhere for unsupported operator + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testSubqueryStructure(): void + { + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + + $subQueryBuilder->expects($this->once()) + ->method('select') + ->with('1') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('from') + ->with(BulkInfoProviderImportJobPart::class, 'bip_status') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('join') + ->with('bip_status.job', 'job_status') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('where') + ->with('bip_status.part = part.id') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('andWhere') + ->with('job_status.status IN (:job_status_values)') + ->willReturnSelf(); + + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->method('andWhere'); + $this->queryBuilder->method('setParameter'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testValuesAndOperatorMutation(): void + { + // Test that values and operator can be changed after creation + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + $this->assertTrue($this->constraint->isEnabled()); + + $this->constraint->setValue([]); + $this->assertFalse($this->constraint->isEnabled()); + + $this->constraint->setValue(['completed']); + $this->assertTrue($this->constraint->isEnabled()); + + $this->constraint->setOperator(''); + $this->assertFalse($this->constraint->isEnabled()); + + $this->constraint->setOperator('NONE'); + $this->assertTrue($this->constraint->isEnabled()); + } +} diff --git a/tests/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraintTest.php b/tests/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraintTest.php new file mode 100644 index 00000000..bc110eda --- /dev/null +++ b/tests/DataTables/Filters/Constraints/Part/BulkImportPartStatusConstraintTest.php @@ -0,0 +1,299 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\DataTables\Filters\Constraints\Part; + +use App\DataTables\Filters\Constraints\Part\BulkImportPartStatusConstraint; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\QueryBuilder; +use PHPUnit\Framework\TestCase; + +class BulkImportPartStatusConstraintTest extends TestCase +{ + private BulkImportPartStatusConstraint $constraint; + private QueryBuilder $queryBuilder; + private EntityManagerInterface $entityManager; + + protected function setUp(): void + { + $this->constraint = new BulkImportPartStatusConstraint(); + $this->entityManager = $this->createMock(EntityManagerInterface::class); + $this->queryBuilder = $this->createMock(QueryBuilder::class); + + $this->queryBuilder->method('getEntityManager') + ->willReturn($this->entityManager); + } + + public function testConstructor(): void + { + $this->assertEquals([], $this->constraint->getValue()); + $this->assertEmpty($this->constraint->getOperator()); + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testGetAndSetValues(): void + { + $values = ['pending', 'completed', 'skipped']; + $this->constraint->setValue($values); + + $this->assertEquals($values, $this->constraint->getValue()); + } + + public function testGetAndSetOperator(): void + { + $operator = 'ANY'; + $this->constraint->setOperator($operator); + + $this->assertEquals($operator, $this->constraint->getOperator()); + } + + public function testIsEnabledWithEmptyValues(): void + { + $this->constraint->setOperator('ANY'); + + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testIsEnabledWithNullOperator(): void + { + $this->constraint->setValue(['pending']); + + $this->assertFalse($this->constraint->isEnabled()); + } + + public function testIsEnabledWithValuesAndOperator(): void + { + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + + $this->assertTrue($this->constraint->isEnabled()); + } + + public function testApplyWithEmptyValues(): void + { + $this->constraint->setOperator('ANY'); + + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithNullOperator(): void + { + $this->constraint->setValue(['pending']); + + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithAnyOperator(): void + { + $this->constraint->setValue(['pending', 'completed']); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->expects($this->once()) + ->method('andWhere') + ->with('EXISTS (EXISTS_SUBQUERY_DQL)'); + + $this->queryBuilder->expects($this->once()) + ->method('setParameter') + ->with('part_status_values', ['pending', 'completed']); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithNoneOperator(): void + { + $this->constraint->setValue(['failed']); + $this->constraint->setOperator('NONE'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->expects($this->once()) + ->method('andWhere') + ->with('NOT EXISTS (EXISTS_SUBQUERY_DQL)'); + + $this->queryBuilder->expects($this->once()) + ->method('setParameter') + ->with('part_status_values', ['failed']); + + $this->constraint->apply($this->queryBuilder); + } + + public function testApplyWithUnsupportedOperator(): void + { + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('UNKNOWN'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + // Should not call andWhere for unsupported operator + $this->queryBuilder->expects($this->never()) + ->method('andWhere'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testSubqueryStructure(): void + { + $this->constraint->setValue(['completed', 'skipped']); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + + $subQueryBuilder->expects($this->once()) + ->method('select') + ->with('1') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('from') + ->with(BulkInfoProviderImportJobPart::class, 'bip_part_status') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('where') + ->with('bip_part_status.part = part.id') + ->willReturnSelf(); + + $subQueryBuilder->expects($this->once()) + ->method('andWhere') + ->with('bip_part_status.status IN (:part_status_values)') + ->willReturnSelf(); + + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->method('andWhere'); + $this->queryBuilder->method('setParameter'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testValuesAndOperatorMutation(): void + { + // Test that values and operator can be changed after creation + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + $this->assertTrue($this->constraint->isEnabled()); + + $this->constraint->setValue([]); + $this->assertFalse($this->constraint->isEnabled()); + + $this->constraint->setValue(['completed', 'skipped']); + $this->assertTrue($this->constraint->isEnabled()); + + $this->constraint->setOperator(""); + $this->assertFalse($this->constraint->isEnabled()); + + $this->constraint->setOperator('NONE'); + $this->assertTrue($this->constraint->isEnabled()); + } + + public function testDifferentFromJobStatusConstraint(): void + { + // This constraint should work differently from BulkImportJobStatusConstraint + // It queries the part status directly, not the job status + $this->constraint->setValue(['pending']); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + // Should use different alias than job status constraint + $subQueryBuilder->expects($this->once()) + ->method('from') + ->with(BulkInfoProviderImportJobPart::class, 'bip_part_status'); + + // Should not join with job table like job status constraint does + $subQueryBuilder->expects($this->never()) + ->method('join'); + + $this->queryBuilder->method('andWhere'); + $this->queryBuilder->method('setParameter'); + + $this->constraint->apply($this->queryBuilder); + } + + public function testMultipleStatusValues(): void + { + $statusValues = ['pending', 'completed', 'skipped', 'failed']; + $this->constraint->setValue($statusValues); + $this->constraint->setOperator('ANY'); + + $subQueryBuilder = $this->createMock(QueryBuilder::class); + $subQueryBuilder->method('select')->willReturnSelf(); + $subQueryBuilder->method('from')->willReturnSelf(); + $subQueryBuilder->method('where')->willReturnSelf(); + $subQueryBuilder->method('andWhere')->willReturnSelf(); + $subQueryBuilder->method('getDQL')->willReturn('EXISTS_SUBQUERY_DQL'); + + $this->entityManager->method('createQueryBuilder') + ->willReturn($subQueryBuilder); + + $this->queryBuilder->expects($this->once()) + ->method('setParameter') + ->with('part_status_values', $statusValues); + + $this->constraint->apply($this->queryBuilder); + + $this->assertEquals($statusValues, $this->constraint->getValue()); + } +} diff --git a/tests/Entity/BulkImportJobStatusTest.php b/tests/Entity/BulkImportJobStatusTest.php new file mode 100644 index 00000000..e8b4a977 --- /dev/null +++ b/tests/Entity/BulkImportJobStatusTest.php @@ -0,0 +1,71 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Entity; + +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use PHPUnit\Framework\TestCase; + +class BulkImportJobStatusTest extends TestCase +{ + public function testEnumValues(): void + { + $this->assertEquals('pending', BulkImportJobStatus::PENDING->value); + $this->assertEquals('in_progress', BulkImportJobStatus::IN_PROGRESS->value); + $this->assertEquals('completed', BulkImportJobStatus::COMPLETED->value); + $this->assertEquals('stopped', BulkImportJobStatus::STOPPED->value); + $this->assertEquals('failed', BulkImportJobStatus::FAILED->value); + } + + public function testEnumCases(): void + { + $cases = BulkImportJobStatus::cases(); + + $this->assertCount(5, $cases); + $this->assertContains(BulkImportJobStatus::PENDING, $cases); + $this->assertContains(BulkImportJobStatus::IN_PROGRESS, $cases); + $this->assertContains(BulkImportJobStatus::COMPLETED, $cases); + $this->assertContains(BulkImportJobStatus::STOPPED, $cases); + $this->assertContains(BulkImportJobStatus::FAILED, $cases); + } + + public function testFromString(): void + { + $this->assertEquals(BulkImportJobStatus::PENDING, BulkImportJobStatus::from('pending')); + $this->assertEquals(BulkImportJobStatus::IN_PROGRESS, BulkImportJobStatus::from('in_progress')); + $this->assertEquals(BulkImportJobStatus::COMPLETED, BulkImportJobStatus::from('completed')); + $this->assertEquals(BulkImportJobStatus::STOPPED, BulkImportJobStatus::from('stopped')); + $this->assertEquals(BulkImportJobStatus::FAILED, BulkImportJobStatus::from('failed')); + } + + public function testTryFromInvalidValue(): void + { + $this->assertNull(BulkImportJobStatus::tryFrom('invalid')); + $this->assertNull(BulkImportJobStatus::tryFrom('')); + } + + public function testFromInvalidValueThrowsException(): void + { + $this->expectException(\ValueError::class); + BulkImportJobStatus::from('invalid'); + } +} diff --git a/tests/Entity/BulkInfoProviderImportJobPartTest.php b/tests/Entity/BulkInfoProviderImportJobPartTest.php new file mode 100644 index 00000000..dd9600dd --- /dev/null +++ b/tests/Entity/BulkInfoProviderImportJobPartTest.php @@ -0,0 +1,301 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Entity; + +use App\Entity\InfoProviderSystem\BulkImportPartStatus; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJobPart; +use App\Entity\Parts\Part; +use PHPUnit\Framework\TestCase; + +class BulkInfoProviderImportJobPartTest extends TestCase +{ + private BulkInfoProviderImportJob $job; + private Part $part; + private BulkInfoProviderImportJobPart $jobPart; + + protected function setUp(): void + { + $this->job = $this->createMock(BulkInfoProviderImportJob::class); + $this->part = $this->createMock(Part::class); + + $this->jobPart = new BulkInfoProviderImportJobPart($this->job, $this->part); + } + + public function testConstructor(): void + { + $this->assertSame($this->job, $this->jobPart->getJob()); + $this->assertSame($this->part, $this->jobPart->getPart()); + $this->assertEquals(BulkImportPartStatus::PENDING, $this->jobPart->getStatus()); + $this->assertNull($this->jobPart->getReason()); + $this->assertNull($this->jobPart->getCompletedAt()); + } + + public function testGetAndSetJob(): void + { + $newJob = $this->createMock(BulkInfoProviderImportJob::class); + + $result = $this->jobPart->setJob($newJob); + + $this->assertSame($this->jobPart, $result); + $this->assertSame($newJob, $this->jobPart->getJob()); + } + + public function testGetAndSetPart(): void + { + $newPart = $this->createMock(Part::class); + + $result = $this->jobPart->setPart($newPart); + + $this->assertSame($this->jobPart, $result); + $this->assertSame($newPart, $this->jobPart->getPart()); + } + + public function testGetAndSetStatus(): void + { + $result = $this->jobPart->setStatus(BulkImportPartStatus::COMPLETED); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::COMPLETED, $this->jobPart->getStatus()); + } + + public function testGetAndSetReason(): void + { + $reason = 'Test reason'; + + $result = $this->jobPart->setReason($reason); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals($reason, $this->jobPart->getReason()); + } + + public function testGetAndSetCompletedAt(): void + { + $completedAt = new \DateTimeImmutable(); + + $result = $this->jobPart->setCompletedAt($completedAt); + + $this->assertSame($this->jobPart, $result); + $this->assertSame($completedAt, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsCompleted(): void + { + $beforeTime = new \DateTimeImmutable(); + + $result = $this->jobPart->markAsCompleted(); + + $afterTime = new \DateTimeImmutable(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::COMPLETED, $this->jobPart->getStatus()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + $this->assertGreaterThanOrEqual($beforeTime, $this->jobPart->getCompletedAt()); + $this->assertLessThanOrEqual($afterTime, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsSkipped(): void + { + $reason = 'Skipped for testing'; + $beforeTime = new \DateTimeImmutable(); + + $result = $this->jobPart->markAsSkipped($reason); + + $afterTime = new \DateTimeImmutable(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::SKIPPED, $this->jobPart->getStatus()); + $this->assertEquals($reason, $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + $this->assertGreaterThanOrEqual($beforeTime, $this->jobPart->getCompletedAt()); + $this->assertLessThanOrEqual($afterTime, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsSkippedWithoutReason(): void + { + $result = $this->jobPart->markAsSkipped(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::SKIPPED, $this->jobPart->getStatus()); + $this->assertEquals('', $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsFailed(): void + { + $reason = 'Failed for testing'; + $beforeTime = new \DateTimeImmutable(); + + $result = $this->jobPart->markAsFailed($reason); + + $afterTime = new \DateTimeImmutable(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::FAILED, $this->jobPart->getStatus()); + $this->assertEquals($reason, $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + $this->assertGreaterThanOrEqual($beforeTime, $this->jobPart->getCompletedAt()); + $this->assertLessThanOrEqual($afterTime, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsFailedWithoutReason(): void + { + $result = $this->jobPart->markAsFailed(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::FAILED, $this->jobPart->getStatus()); + $this->assertEquals('', $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + } + + public function testMarkAsPending(): void + { + // First mark as completed to have something to reset + $this->jobPart->markAsCompleted(); + + $result = $this->jobPart->markAsPending(); + + $this->assertSame($this->jobPart, $result); + $this->assertEquals(BulkImportPartStatus::PENDING, $this->jobPart->getStatus()); + $this->assertNull($this->jobPart->getReason()); + $this->assertNull($this->jobPart->getCompletedAt()); + } + + public function testIsPending(): void + { + $this->assertTrue($this->jobPart->isPending()); + + $this->jobPart->setStatus(BulkImportPartStatus::COMPLETED); + $this->assertFalse($this->jobPart->isPending()); + + $this->jobPart->setStatus(BulkImportPartStatus::SKIPPED); + $this->assertFalse($this->jobPart->isPending()); + + $this->jobPart->setStatus(BulkImportPartStatus::FAILED); + $this->assertFalse($this->jobPart->isPending()); + } + + public function testIsCompleted(): void + { + $this->assertFalse($this->jobPart->isCompleted()); + + $this->jobPart->setStatus(BulkImportPartStatus::COMPLETED); + $this->assertTrue($this->jobPart->isCompleted()); + + $this->jobPart->setStatus(BulkImportPartStatus::SKIPPED); + $this->assertFalse($this->jobPart->isCompleted()); + + $this->jobPart->setStatus(BulkImportPartStatus::FAILED); + $this->assertFalse($this->jobPart->isCompleted()); + } + + public function testIsSkipped(): void + { + $this->assertFalse($this->jobPart->isSkipped()); + + $this->jobPart->setStatus(BulkImportPartStatus::SKIPPED); + $this->assertTrue($this->jobPart->isSkipped()); + + $this->jobPart->setStatus(BulkImportPartStatus::COMPLETED); + $this->assertFalse($this->jobPart->isSkipped()); + + $this->jobPart->setStatus(BulkImportPartStatus::FAILED); + $this->assertFalse($this->jobPart->isSkipped()); + } + + public function testIsFailed(): void + { + $this->assertFalse($this->jobPart->isFailed()); + + $this->jobPart->setStatus(BulkImportPartStatus::FAILED); + $this->assertTrue($this->jobPart->isFailed()); + + $this->jobPart->setStatus(BulkImportPartStatus::COMPLETED); + $this->assertFalse($this->jobPart->isFailed()); + + $this->jobPart->setStatus(BulkImportPartStatus::SKIPPED); + $this->assertFalse($this->jobPart->isFailed()); + } + + public function testBulkImportPartStatusEnum(): void + { + $this->assertEquals('pending', BulkImportPartStatus::PENDING->value); + $this->assertEquals('completed', BulkImportPartStatus::COMPLETED->value); + $this->assertEquals('skipped', BulkImportPartStatus::SKIPPED->value); + $this->assertEquals('failed', BulkImportPartStatus::FAILED->value); + } + + public function testStatusTransitions(): void + { + // Test pending -> completed + $this->assertTrue($this->jobPart->isPending()); + $this->jobPart->markAsCompleted(); + $this->assertTrue($this->jobPart->isCompleted()); + + // Test completed -> pending + $this->jobPart->markAsPending(); + $this->assertTrue($this->jobPart->isPending()); + + // Test pending -> skipped + $this->jobPart->markAsSkipped('Test reason'); + $this->assertTrue($this->jobPart->isSkipped()); + + // Test skipped -> pending + $this->jobPart->markAsPending(); + $this->assertTrue($this->jobPart->isPending()); + + // Test pending -> failed + $this->jobPart->markAsFailed('Test error'); + $this->assertTrue($this->jobPart->isFailed()); + + // Test failed -> pending + $this->jobPart->markAsPending(); + $this->assertTrue($this->jobPart->isPending()); + } + + public function testReasonAndCompletedAtConsistency(): void + { + // Initially no reason or completion time + $this->assertNull($this->jobPart->getReason()); + $this->assertNull($this->jobPart->getCompletedAt()); + + // After marking as skipped, should have reason and completion time + $this->jobPart->markAsSkipped('Skipped reason'); + $this->assertEquals('Skipped reason', $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + + // After marking as pending, reason and completion time should be cleared + $this->jobPart->markAsPending(); + $this->assertNull($this->jobPart->getReason()); + $this->assertNull($this->jobPart->getCompletedAt()); + + // After marking as failed, should have reason and completion time + $this->jobPart->markAsFailed('Failed reason'); + $this->assertEquals('Failed reason', $this->jobPart->getReason()); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + + // After marking as completed, should have completion time (reason may remain from previous state) + $this->jobPart->markAsCompleted(); + $this->assertInstanceOf(\DateTimeImmutable::class, $this->jobPart->getCompletedAt()); + } +} diff --git a/tests/Entity/BulkInfoProviderImportJobTest.php b/tests/Entity/BulkInfoProviderImportJobTest.php new file mode 100644 index 00000000..c9841ac4 --- /dev/null +++ b/tests/Entity/BulkInfoProviderImportJobTest.php @@ -0,0 +1,368 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Entity; + +use App\Entity\InfoProviderSystem\BulkImportJobStatus; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; +use App\Entity\UserSystem\User; +use App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use App\Services\InfoProviderSystem\DTOs\SearchResultDTO; +use PHPUnit\Framework\TestCase; + +class BulkInfoProviderImportJobTest extends TestCase +{ + private BulkInfoProviderImportJob $job; + private User $user; + + protected function setUp(): void + { + $this->user = new User(); + $this->user->setName('test_user'); + + $this->job = new BulkInfoProviderImportJob(); + $this->job->setCreatedBy($this->user); + } + + private function createMockPart(int $id): \App\Entity\Parts\Part + { + $part = $this->createMock(\App\Entity\Parts\Part::class); + $part->method('getId')->willReturn($id); + $part->method('getName')->willReturn("Test Part {$id}"); + return $part; + } + + public function testConstruct(): void + { + $job = new BulkInfoProviderImportJob(); + + $this->assertInstanceOf(\DateTimeImmutable::class, $job->getCreatedAt()); + $this->assertEquals(BulkImportJobStatus::PENDING, $job->getStatus()); + $this->assertEmpty($job->getPartIds()); + $this->assertEmpty($job->getFieldMappings()); + $this->assertEmpty($job->getSearchResultsRaw()); + $this->assertEmpty($job->getProgress()); + $this->assertNull($job->getCompletedAt()); + $this->assertFalse($job->isPrefetchDetails()); + } + + public function testBasicGettersSetters(): void + { + $this->job->setName('Test Job'); + $this->assertEquals('Test Job', $this->job->getName()); + + // Test with actual parts - this is what actually works + $parts = [$this->createMockPart(1), $this->createMockPart(2), $this->createMockPart(3)]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + $this->assertEquals([1, 2, 3], $this->job->getPartIds()); + + $fieldMappings = [new BulkSearchFieldMappingDTO(field: 'field1', providers: ['provider1', 'provider2'])]; + $this->job->setFieldMappings($fieldMappings); + $this->assertEquals($fieldMappings, $this->job->getFieldMappings()); + + $this->job->setPrefetchDetails(true); + $this->assertTrue($this->job->isPrefetchDetails()); + + $this->assertEquals($this->user, $this->job->getCreatedBy()); + } + + public function testStatusTransitions(): void + { + $this->assertTrue($this->job->isPending()); + $this->assertFalse($this->job->isInProgress()); + $this->assertFalse($this->job->isCompleted()); + $this->assertFalse($this->job->isFailed()); + $this->assertFalse($this->job->isStopped()); + + $this->job->markAsInProgress(); + $this->assertEquals(BulkImportJobStatus::IN_PROGRESS, $this->job->getStatus()); + $this->assertTrue($this->job->isInProgress()); + $this->assertFalse($this->job->isPending()); + + $this->job->markAsCompleted(); + $this->assertEquals(BulkImportJobStatus::COMPLETED, $this->job->getStatus()); + $this->assertTrue($this->job->isCompleted()); + $this->assertNotNull($this->job->getCompletedAt()); + + $job2 = new BulkInfoProviderImportJob(); + $job2->markAsFailed(); + $this->assertEquals(BulkImportJobStatus::FAILED, $job2->getStatus()); + $this->assertTrue($job2->isFailed()); + $this->assertNotNull($job2->getCompletedAt()); + + $job3 = new BulkInfoProviderImportJob(); + $job3->markAsStopped(); + $this->assertEquals(BulkImportJobStatus::STOPPED, $job3->getStatus()); + $this->assertTrue($job3->isStopped()); + $this->assertNotNull($job3->getCompletedAt()); + } + + public function testCanBeStopped(): void + { + $this->assertTrue($this->job->canBeStopped()); + + $this->job->markAsInProgress(); + $this->assertTrue($this->job->canBeStopped()); + + $this->job->markAsCompleted(); + $this->assertFalse($this->job->canBeStopped()); + + $this->job->setStatus(BulkImportJobStatus::FAILED); + $this->assertFalse($this->job->canBeStopped()); + + $this->job->setStatus(BulkImportJobStatus::STOPPED); + $this->assertFalse($this->job->canBeStopped()); + } + + public function testPartCount(): void + { + $this->assertEquals(0, $this->job->getPartCount()); + + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3), + $this->createMockPart(4), + $this->createMockPart(5) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + $this->assertEquals(5, $this->job->getPartCount()); + } + + public function testResultCount(): void + { + $this->assertEquals(0, $this->job->getResultCount()); + + $searchResults = new BulkSearchResponseDTO([ + new \App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO( + part: $this->createMockPart(1), + searchResults: [new BulkSearchPartResultDTO(searchResult: new SearchResultDTO(provider_key: 'dummy', provider_id: '1234', name: 'Part 1', description: 'A part'))] + ), + new \App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO( + part: $this->createMockPart(2), + searchResults: [new BulkSearchPartResultDTO(searchResult: new SearchResultDTO(provider_key: 'dummy', provider_id: '1234', name: 'Part 2', description: 'A part')), + new BulkSearchPartResultDTO(searchResult: new SearchResultDTO(provider_key: 'dummy', provider_id: '5678', name: 'Part 2 Alt', description: 'Another part'))] + ), + new \App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO( + part: $this->createMockPart(3), + searchResults: [] + ) + ]); + + $this->job->setSearchResults($searchResults); + $this->assertEquals(3, $this->job->getResultCount()); + } + + public function testPartProgressTracking(): void + { + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3), + $this->createMockPart(4) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->assertFalse($this->job->isPartCompleted(1)); + $this->assertFalse($this->job->isPartSkipped(1)); + + $this->job->markPartAsCompleted(1); + $this->assertTrue($this->job->isPartCompleted(1)); + $this->assertFalse($this->job->isPartSkipped(1)); + + $this->job->markPartAsSkipped(2, 'Not found'); + $this->assertFalse($this->job->isPartCompleted(2)); + $this->assertTrue($this->job->isPartSkipped(2)); + + $this->job->markPartAsPending(1); + $this->assertFalse($this->job->isPartCompleted(1)); + $this->assertFalse($this->job->isPartSkipped(1)); + } + + public function testProgressCounts(): void + { + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3), + $this->createMockPart(4), + $this->createMockPart(5) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->assertEquals(0, $this->job->getCompletedPartsCount()); + $this->assertEquals(0, $this->job->getSkippedPartsCount()); + + $this->job->markPartAsCompleted(1); + $this->job->markPartAsCompleted(2); + $this->job->markPartAsSkipped(3, 'Error'); + + $this->assertEquals(2, $this->job->getCompletedPartsCount()); + $this->assertEquals(1, $this->job->getSkippedPartsCount()); + } + + public function testProgressPercentage(): void + { + $emptyJob = new BulkInfoProviderImportJob(); + $this->assertEquals(100.0, $emptyJob->getProgressPercentage()); + + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3), + $this->createMockPart(4), + $this->createMockPart(5) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->assertEquals(0.0, $this->job->getProgressPercentage()); + + $this->job->markPartAsCompleted(1); + $this->job->markPartAsCompleted(2); + $this->assertEquals(40.0, $this->job->getProgressPercentage()); + + $this->job->markPartAsSkipped(3, 'Error'); + $this->assertEquals(60.0, $this->job->getProgressPercentage()); + + $this->job->markPartAsCompleted(4); + $this->job->markPartAsCompleted(5); + $this->assertEquals(100.0, $this->job->getProgressPercentage()); + } + + public function testIsAllPartsCompleted(): void + { + $emptyJob = new BulkInfoProviderImportJob(); + $this->assertTrue($emptyJob->isAllPartsCompleted()); + + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->assertFalse($this->job->isAllPartsCompleted()); + + $this->job->markPartAsCompleted(1); + $this->assertFalse($this->job->isAllPartsCompleted()); + + $this->job->markPartAsCompleted(2); + $this->job->markPartAsSkipped(3, 'Error'); + $this->assertTrue($this->job->isAllPartsCompleted()); + } + + public function testDisplayNameMethods(): void + { + // Test with actual parts - setPartIds doesn't actually add parts + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->assertEquals('info_providers.bulk_import.job_name_template', $this->job->getDisplayNameKey()); + $this->assertEquals(['%count%' => 3], $this->job->getDisplayNameParams()); + } + + public function testFormattedTimestamp(): void + { + $timestampRegex = '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/'; + $this->assertMatchesRegularExpression($timestampRegex, $this->job->getFormattedTimestamp()); + } + + public function testProgressDataStructure(): void + { + $parts = [ + $this->createMockPart(1), + $this->createMockPart(2), + $this->createMockPart(3) + ]; + foreach ($parts as $part) { + $this->job->addPart($part); + } + + $this->job->markPartAsCompleted(1); + $this->job->markPartAsSkipped(2, 'Test reason'); + + $progress = $this->job->getProgress(); + + // The progress array should have keys for all part IDs, even if not completed/skipped + $this->assertArrayHasKey(1, $progress, 'Progress should contain key for part 1'); + $this->assertArrayHasKey(2, $progress, 'Progress should contain key for part 2'); + $this->assertArrayHasKey(3, $progress, 'Progress should contain key for part 3'); + + // Part 1: completed + $this->assertEquals('completed', $progress[1]['status']); + $this->assertArrayHasKey('completed_at', $progress[1]); + $this->assertArrayNotHasKey('reason', $progress[1]); + + // Part 2: skipped + $this->assertEquals('skipped', $progress[2]['status']); + $this->assertEquals('Test reason', $progress[2]['reason']); + $this->assertArrayHasKey('completed_at', $progress[2]); + + // Part 3: should be present but not completed/skipped + $this->assertEquals('pending', $progress[3]['status']); + $this->assertArrayNotHasKey('completed_at', $progress[3]); + $this->assertArrayNotHasKey('reason', $progress[3]); + } + + public function testCompletedAtTimestamp(): void + { + $this->assertNull($this->job->getCompletedAt()); + + $beforeCompletion = new \DateTimeImmutable(); + $this->job->markAsCompleted(); + $afterCompletion = new \DateTimeImmutable(); + + $completedAt = $this->job->getCompletedAt(); + $this->assertNotNull($completedAt); + $this->assertGreaterThanOrEqual($beforeCompletion, $completedAt); + $this->assertLessThanOrEqual($afterCompletion, $completedAt); + + $customTime = new \DateTimeImmutable('2023-01-01 12:00:00'); + $this->job->setCompletedAt($customTime); + $this->assertEquals($customTime, $this->job->getCompletedAt()); + } +} diff --git a/tests/Form/InfoProviderSystem/GlobalFieldMappingTypeTest.php b/tests/Form/InfoProviderSystem/GlobalFieldMappingTypeTest.php new file mode 100644 index 00000000..52e0b1d2 --- /dev/null +++ b/tests/Form/InfoProviderSystem/GlobalFieldMappingTypeTest.php @@ -0,0 +1,68 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Form\InfoProviderSystem; + +use App\Form\InfoProviderSystem\GlobalFieldMappingType; +use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Symfony\Component\Form\FormFactoryInterface; + +/** + * @group slow + * @group DB + */ +class GlobalFieldMappingTypeTest extends KernelTestCase +{ + private FormFactoryInterface $formFactory; + + protected function setUp(): void + { + self::bootKernel(); + $this->formFactory = static::getContainer()->get(FormFactoryInterface::class); + } + + public function testFormCreation(): void + { + $form = $this->formFactory->create(GlobalFieldMappingType::class, null, [ + 'field_choices' => [ + 'MPN' => 'mpn', + 'Name' => 'name' + ], + 'csrf_protection' => false + ]); + + $this->assertTrue($form->has('field_mappings')); + $this->assertTrue($form->has('prefetch_details')); + $this->assertTrue($form->has('submit')); + } + + public function testFormOptions(): void + { + $form = $this->formFactory->create(GlobalFieldMappingType::class, null, [ + 'field_choices' => [], + 'csrf_protection' => false + ]); + + $view = $form->createView(); + $this->assertFalse($view['prefetch_details']->vars['required']); + } +} \ No newline at end of file diff --git a/tests/Repository/LogEntryRepositoryTest.php b/tests/Repository/LogEntryRepositoryTest.php index fc31faf5..f6cc991d 100644 --- a/tests/Repository/LogEntryRepositoryTest.php +++ b/tests/Repository/LogEntryRepositoryTest.php @@ -112,7 +112,8 @@ class LogEntryRepositoryTest extends KernelTestCase $this->assertCount(2, $logs); //The first one must be newer than the second one - $this->assertGreaterThanOrEqual($logs[0]->getTimestamp(), $logs[1]->getTimestamp()); + $this->assertGreaterThanOrEqual($logs[1]->getTimestamp(), $logs[0]->getTimestamp()); + $this->assertGreaterThanOrEqual($logs[1]->getID(), $logs[0]->getID()); } public function testGetElementExistedAtTimestamp(): void diff --git a/tests/Services/ElementTypeNameGeneratorTest.php b/tests/Services/ElementTypeNameGeneratorTest.php index 934a3bbd..f99b0676 100644 --- a/tests/Services/ElementTypeNameGeneratorTest.php +++ b/tests/Services/ElementTypeNameGeneratorTest.php @@ -25,11 +25,12 @@ namespace App\Tests\Services; use App\Entity\Attachments\PartAttachment; use App\Entity\Base\AbstractDBElement; use App\Entity\Base\AbstractNamedDBElement; +use App\Entity\InfoProviderSystem\BulkInfoProviderImportJob; use App\Entity\Parts\Category; use App\Entity\Parts\Part; use App\Exceptions\EntityNotSupportedException; -use App\Services\Formatters\AmountFormatter; use App\Services\ElementTypeNameGenerator; +use App\Services\Formatters\AmountFormatter; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class ElementTypeNameGeneratorTest extends WebTestCase @@ -50,16 +51,18 @@ class ElementTypeNameGeneratorTest extends WebTestCase //We only test in english $this->assertSame('Part', $this->service->getLocalizedTypeLabel(new Part())); $this->assertSame('Category', $this->service->getLocalizedTypeLabel(new Category())); + $this->assertSame('Bulk info provider import', $this->service->getLocalizedTypeLabel(new BulkInfoProviderImportJob())); //Test inheritance $this->assertSame('Attachment', $this->service->getLocalizedTypeLabel(new PartAttachment())); //Test for class name $this->assertSame('Part', $this->service->getLocalizedTypeLabel(Part::class)); + $this->assertSame('Bulk info provider import', $this->service->getLocalizedTypeLabel(BulkInfoProviderImportJob::class)); //Test exception for unknpwn type $this->expectException(EntityNotSupportedException::class); - $this->service->getLocalizedTypeLabel(new class() extends AbstractDBElement { + $this->service->getLocalizedTypeLabel(new class () extends AbstractDBElement { }); } @@ -74,7 +77,7 @@ class ElementTypeNameGeneratorTest extends WebTestCase //Test exception $this->expectException(EntityNotSupportedException::class); - $this->service->getTypeNameCombination(new class() extends AbstractNamedDBElement { + $this->service->getTypeNameCombination(new class () extends AbstractNamedDBElement { public function getIDString(): string { return 'Stub'; diff --git a/tests/Services/ImportExportSystem/EntityExporterTest.php b/tests/Services/ImportExportSystem/EntityExporterTest.php index 004971ab..e9b924b1 100644 --- a/tests/Services/ImportExportSystem/EntityExporterTest.php +++ b/tests/Services/ImportExportSystem/EntityExporterTest.php @@ -26,6 +26,7 @@ use App\Entity\Parts\Category; use App\Services\ImportExportSystem\EntityExporter; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Request; +use PhpOffice\PhpSpreadsheet\IOFactory; class EntityExporterTest extends WebTestCase { @@ -76,7 +77,40 @@ class EntityExporterTest extends WebTestCase $this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertNotEmpty($response->headers->get('Content-Disposition')); + } + public function testExportToExcel(): void + { + $entities = $this->getEntities(); + $xlsxData = $this->service->exportEntities($entities, ['format' => 'xlsx', 'level' => 'simple']); + $this->assertNotEmpty($xlsxData); + + $tempFile = tempnam(sys_get_temp_dir(), 'test_export') . '.xlsx'; + file_put_contents($tempFile, $xlsxData); + + $spreadsheet = IOFactory::load($tempFile); + $worksheet = $spreadsheet->getActiveSheet(); + + $this->assertSame('name', $worksheet->getCell('A1')->getValue()); + $this->assertSame('full_name', $worksheet->getCell('B1')->getValue()); + + $this->assertSame('Enitity 1', $worksheet->getCell('A2')->getValue()); + $this->assertSame('Enitity 1', $worksheet->getCell('B2')->getValue()); + + unlink($tempFile); + } + + public function testExportExcelFromRequest(): void + { + $entities = $this->getEntities(); + + $request = new Request(); + $request->request->set('format', 'xlsx'); + $request->request->set('level', 'simple'); + $response = $this->service->exportEntityFromRequest($entities, $request); + + $this->assertSame('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', $response->headers->get('Content-Type')); + $this->assertStringContainsString('export_Category_simple.xlsx', $response->headers->get('Content-Disposition')); } } diff --git a/tests/Services/ImportExportSystem/EntityImporterTest.php b/tests/Services/ImportExportSystem/EntityImporterTest.php index fd5e8b9e..83367f80 100644 --- a/tests/Services/ImportExportSystem/EntityImporterTest.php +++ b/tests/Services/ImportExportSystem/EntityImporterTest.php @@ -36,6 +36,9 @@ use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationListInterface; +use Symfony\Component\HttpFoundation\File\File; +use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PhpOffice\PhpSpreadsheet\Writer\Xlsx; #[Group('DB')] class EntityImporterTest extends WebTestCase @@ -207,6 +210,10 @@ EOT; yield ['json', 'json']; yield ['yaml', 'yml']; yield ['yaml', 'YAML']; + yield ['xlsx', 'xlsx']; + yield ['xlsx', 'XLSX']; + yield ['xls', 'xls']; + yield ['xls', 'XLS']; } #[DataProvider('formatDataProvider')] @@ -342,4 +349,41 @@ EOT; $this->assertSame($category, $results[0]->getCategory()); $this->assertSame('test,test2', $results[0]->getTags()); } + + public function testImportExcelFileProjects(): void + { + $spreadsheet = new Spreadsheet(); + $worksheet = $spreadsheet->getActiveSheet(); + + $worksheet->setCellValue('A1', 'name'); + $worksheet->setCellValue('B1', 'comment'); + $worksheet->setCellValue('A2', 'Test Excel 1'); + $worksheet->setCellValue('B2', 'Test Excel 1 notes'); + $worksheet->setCellValue('A3', 'Test Excel 2'); + $worksheet->setCellValue('B3', 'Test Excel 2 notes'); + + $tempFile = tempnam(sys_get_temp_dir(), 'test_excel') . '.xlsx'; + $writer = new Xlsx($spreadsheet); + $writer->save($tempFile); + + $file = new File($tempFile); + + $errors = []; + $results = $this->service->importFile($file, [ + 'class' => Project::class, + 'format' => 'xlsx', + 'csv_delimiter' => ';', + ], $errors); + + $this->assertCount(2, $results); + $this->assertEmpty($errors); + $this->assertContainsOnlyInstancesOf(Project::class, $results); + + $this->assertSame('Test Excel 1', $results[0]->getName()); + $this->assertSame('Test Excel 1 notes', $results[0]->getComment()); + $this->assertSame('Test Excel 2', $results[1]->getName()); + $this->assertSame('Test Excel 2 notes', $results[1]->getComment()); + + unlink($tempFile); + } } diff --git a/tests/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTOTest.php new file mode 100644 index 00000000..a2101938 --- /dev/null +++ b/tests/Services/InfoProviderSystem/DTOs/BulkSearchFieldMappingDTOTest.php @@ -0,0 +1,63 @@ +. + */ + +namespace App\Tests\Services\InfoProviderSystem\DTOs; + +use App\Services\InfoProviderSystem\DTOs\BulkSearchFieldMappingDTO; +use PHPUnit\Framework\TestCase; + +class BulkSearchFieldMappingDTOTest extends TestCase +{ + + public function testIsSupplierPartNumberField(): void + { + $fieldMapping = new BulkSearchFieldMappingDTO(field: 'reichelt_spn', providers: ['provider1'], priority: 1); + $this->assertTrue($fieldMapping->isSupplierPartNumberField()); + + $fieldMapping = new BulkSearchFieldMappingDTO(field: 'partNumber', providers: ['provider1'], priority: 1); + $this->assertFalse($fieldMapping->isSupplierPartNumberField()); + } + + public function testToSerializableArray(): void + { + $fieldMapping = new BulkSearchFieldMappingDTO(field: 'test', providers: ['provider1', 'provider2'], priority: 3); + $array = $fieldMapping->toSerializableArray(); + $this->assertIsArray($array); + $this->assertSame([ + 'field' => 'test', + 'providers' => ['provider1', 'provider2'], + 'priority' => 3, + ], $array); + } + + public function testFromSerializableArray(): void + { + $data = [ + 'field' => 'test', + 'providers' => ['provider1', 'provider2'], + 'priority' => 3, + ]; + $fieldMapping = BulkSearchFieldMappingDTO::fromSerializableArray($data); + $this->assertInstanceOf(BulkSearchFieldMappingDTO::class, $fieldMapping); + $this->assertSame('test', $fieldMapping->field); + $this->assertSame(['provider1', 'provider2'], $fieldMapping->providers); + $this->assertSame(3, $fieldMapping->priority); + } +} diff --git a/tests/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTOTest.php new file mode 100644 index 00000000..09fa4973 --- /dev/null +++ b/tests/Services/InfoProviderSystem/DTOs/BulkSearchPartResultsDTOTest.php @@ -0,0 +1,63 @@ +. + */ + +namespace App\Tests\Services\InfoProviderSystem\DTOs; + +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO; +use PHPUnit\Framework\TestCase; + +class BulkSearchPartResultsDTOTest extends TestCase +{ + + public function testHasErrors(): void + { + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], []); + $this->assertFalse($test->hasErrors()); + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], ['error1']); + $this->assertTrue($test->hasErrors()); + } + + public function testGetErrorCount(): void + { + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], []); + $this->assertCount(0, $test->errors); + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], ['error1', 'error2']); + $this->assertCount(2, $test->errors); + } + + public function testHasResults(): void + { + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], []); + $this->assertFalse($test->hasResults()); + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [ $this->createMock(\App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO::class) ], []); + $this->assertTrue($test->hasResults()); + } + + public function testGetResultCount(): void + { + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [], []); + $this->assertCount(0, $test->searchResults); + $test = new BulkSearchPartResultsDTO($this->createMock(\App\Entity\Parts\Part::class), [ + $this->createMock(\App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO::class), + $this->createMock(\App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO::class) + ], []); + $this->assertCount(2, $test->searchResults); + } +} diff --git a/tests/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTOTest.php new file mode 100644 index 00000000..b4dc0dea --- /dev/null +++ b/tests/Services/InfoProviderSystem/DTOs/BulkSearchResponseDTOTest.php @@ -0,0 +1,258 @@ +. + */ + +namespace App\Tests\Services\InfoProviderSystem\DTOs; + +use App\Entity\Parts\Part; +use App\Services\InfoProviderSystem\DTOs\BulkSearchResponseDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultDTO; +use App\Services\InfoProviderSystem\DTOs\BulkSearchPartResultsDTO; +use App\Services\InfoProviderSystem\DTOs\SearchResultDTO; +use Doctrine\ORM\EntityManagerInterface; +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; + +class BulkSearchResponseDTOTest extends KernelTestCase +{ + + private EntityManagerInterface $entityManager; + + private BulkSearchResponseDTO $dummyEmpty; + private BulkSearchResponseDTO $dummy; + + protected function setUp(): void + { + self::bootKernel(); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + + $this->dummyEmpty = new BulkSearchResponseDTO(partResults: []); + $this->dummy = new BulkSearchResponseDTO(partResults: [ + new BulkSearchPartResultsDTO( + part: $this->entityManager->find(Part::class, 1), + searchResults: [ + new BulkSearchPartResultDTO( + searchResult: new SearchResultDTO(provider_key: "dummy", provider_id: "1234", name: "Test Part", description: "A part for testing"), + sourceField: "mpn", sourceKeyword: "1234", priority: 1 + ), + new BulkSearchPartResultDTO( + searchResult: new SearchResultDTO(provider_key: "test", provider_id: "test", name: "Test Part2", description: "A part for testing"), + sourceField: "name", sourceKeyword: "1234", + localPart: $this->entityManager->find(Part::class, 2), priority: 2, + ), + ], + errors: ['Error 1'] + ) + ]); + } + + public function testSerializationBackAndForthEmpty(): void + { + $serialized = $this->dummyEmpty->toSerializableRepresentation(); + //Ensure that it is json_encodable + $json = json_encode($serialized, JSON_THROW_ON_ERROR); + $this->assertJson($json); + $deserialized = BulkSearchResponseDTO::fromSerializableRepresentation(json_decode($json), $this->entityManager); + + $this->assertEquals($this->dummyEmpty, $deserialized); + } + + public function testSerializationBackAndForth(): void + { + $serialized = $this->dummy->toSerializableRepresentation(); + //Ensure that it is json_encodable + $this->assertJson(json_encode($serialized, JSON_THROW_ON_ERROR)); + $deserialized = BulkSearchResponseDTO::fromSerializableRepresentation($serialized, $this->entityManager); + + $this->assertEquals($this->dummy, $deserialized); + } + + public function testToSerializableRepresentation(): void + { + $serialized = $this->dummy->toSerializableRepresentation(); + + $expected = array ( + 0 => + array ( + 'part_id' => 1, + 'search_results' => + array ( + 0 => + array ( + 'dto' => + array ( + 'provider_key' => 'dummy', + 'provider_id' => '1234', + 'name' => 'Test Part', + 'description' => 'A part for testing', + 'category' => NULL, + 'manufacturer' => NULL, + 'mpn' => NULL, + 'preview_image_url' => NULL, + 'manufacturing_status' => NULL, + 'provider_url' => NULL, + 'footprint' => NULL, + ), + 'source_field' => 'mpn', + 'source_keyword' => '1234', + 'localPart' => NULL, + 'priority' => 1, + ), + 1 => + array ( + 'dto' => + array ( + 'provider_key' => 'test', + 'provider_id' => 'test', + 'name' => 'Test Part2', + 'description' => 'A part for testing', + 'category' => NULL, + 'manufacturer' => NULL, + 'mpn' => NULL, + 'preview_image_url' => NULL, + 'manufacturing_status' => NULL, + 'provider_url' => NULL, + 'footprint' => NULL, + ), + 'source_field' => 'name', + 'source_keyword' => '1234', + 'localPart' => 2, + 'priority' => 2, + ), + ), + 'errors' => + array ( + 0 => 'Error 1', + ), + ), + ); + + $this->assertEquals($expected, $serialized); + } + + public function testFromSerializableRepresentation(): void + { + $input = array ( + 0 => + array ( + 'part_id' => 1, + 'search_results' => + array ( + 0 => + array ( + 'dto' => + array ( + 'provider_key' => 'dummy', + 'provider_id' => '1234', + 'name' => 'Test Part', + 'description' => 'A part for testing', + 'category' => NULL, + 'manufacturer' => NULL, + 'mpn' => NULL, + 'preview_image_url' => NULL, + 'manufacturing_status' => NULL, + 'provider_url' => NULL, + 'footprint' => NULL, + ), + 'source_field' => 'mpn', + 'source_keyword' => '1234', + 'localPart' => NULL, + 'priority' => 1, + ), + 1 => + array ( + 'dto' => + array ( + 'provider_key' => 'test', + 'provider_id' => 'test', + 'name' => 'Test Part2', + 'description' => 'A part for testing', + 'category' => NULL, + 'manufacturer' => NULL, + 'mpn' => NULL, + 'preview_image_url' => NULL, + 'manufacturing_status' => NULL, + 'provider_url' => NULL, + 'footprint' => NULL, + ), + 'source_field' => 'name', + 'source_keyword' => '1234', + 'localPart' => 2, + 'priority' => 2, + ), + ), + 'errors' => + array ( + 0 => 'Error 1', + ), + ), + ); + + $deserialized = BulkSearchResponseDTO::fromSerializableRepresentation($input, $this->entityManager); + $this->assertEquals($this->dummy, $deserialized); + } + + public function testMerge(): void + { + $merged = BulkSearchResponseDTO::merge($this->dummy, $this->dummyEmpty); + $this->assertCount(1, $merged->partResults); + + $merged = BulkSearchResponseDTO::merge($this->dummyEmpty, $this->dummyEmpty); + $this->assertCount(0, $merged->partResults); + + $merged = BulkSearchResponseDTO::merge($this->dummy, $this->dummy, $this->dummy); + $this->assertCount(3, $merged->partResults); + } + + public function testReplaceResultsForPart(): void + { + $newPartResults = new BulkSearchPartResultsDTO( + part: $this->entityManager->find(Part::class, 1), + searchResults: [ + new BulkSearchPartResultDTO( + searchResult: new SearchResultDTO(provider_key: "new", provider_id: "new", name: "New Part", description: "A new part"), + sourceField: "mpn", sourceKeyword: "new", priority: 1 + ) + ], + errors: ['New Error'] + ); + + $replaced = $this->dummy->replaceResultsForPart($newPartResults); + $this->assertCount(1, $replaced->partResults); + $this->assertSame($newPartResults, $replaced->partResults[0]); + } + + public function testReplaceResultsForPartNotExisting(): void + { + $newPartResults = new BulkSearchPartResultsDTO( + part: $this->entityManager->find(Part::class, 1), + searchResults: [ + new BulkSearchPartResultDTO( + searchResult: new SearchResultDTO(provider_key: "new", provider_id: "new", name: "New Part", description: "A new part"), + sourceField: "mpn", sourceKeyword: "new", priority: 1 + ) + ], + errors: ['New Error'] + ); + + $this->expectException(\InvalidArgumentException::class); + + $replaced = $this->dummyEmpty->replaceResultsForPart($newPartResults); + } +} diff --git a/tests/Services/InfoProviderSystem/Providers/LCSCProviderTest.php b/tests/Services/InfoProviderSystem/Providers/LCSCProviderTest.php new file mode 100644 index 00000000..57527f57 --- /dev/null +++ b/tests/Services/InfoProviderSystem/Providers/LCSCProviderTest.php @@ -0,0 +1,540 @@ +. + */ + +declare(strict_types=1); + +namespace App\Tests\Services\InfoProviderSystem\Providers; + +use App\Services\InfoProviderSystem\DTOs\FileDTO; +use App\Services\InfoProviderSystem\DTOs\ParameterDTO; +use App\Services\InfoProviderSystem\DTOs\PartDetailDTO; +use App\Services\InfoProviderSystem\DTOs\PriceDTO; +use App\Services\InfoProviderSystem\DTOs\PurchaseInfoDTO; +use App\Services\InfoProviderSystem\Providers\LCSCProvider; +use App\Services\InfoProviderSystem\Providers\ProviderCapabilities; +use App\Settings\InfoProviderSystem\LCSCSettings; +use App\Tests\SettingsTestHelper; +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpClient\MockHttpClient; +use Symfony\Component\HttpClient\Response\MockResponse; +use Symfony\Contracts\HttpClient\HttpClientInterface; + +class LCSCProviderTest extends TestCase +{ + private LCSCSettings $settings; + private LCSCProvider $provider; + private MockHttpClient $httpClient; + + protected function setUp(): void + { + $this->httpClient = new MockHttpClient(); + $this->settings = SettingsTestHelper::createSettingsDummy(LCSCSettings::class); + $this->settings->currency = 'USD'; + $this->settings->enabled = true; + $this->provider = new LCSCProvider($this->httpClient, $this->settings); + } + + public function testGetProviderInfo(): void + { + $info = $this->provider->getProviderInfo(); + + $this->assertIsArray($info); + $this->assertArrayHasKey('name', $info); + $this->assertArrayHasKey('description', $info); + $this->assertArrayHasKey('url', $info); + $this->assertArrayHasKey('disabled_help', $info); + $this->assertEquals('LCSC', $info['name']); + $this->assertEquals('https://www.lcsc.com/', $info['url']); + } + + public function testGetProviderKey(): void + { + $this->assertEquals('lcsc', $this->provider->getProviderKey()); + } + + public function testIsActiveWhenEnabled(): void + { + //Ensure that the settings are enabled + $this->settings->enabled = true; + $this->assertTrue($this->provider->isActive()); + } + + public function testIsActiveWhenDisabled(): void + { + //Ensure that the settings are disabled + $this->settings->enabled = false; + $this->assertFalse($this->provider->isActive()); + } + + public function testGetCapabilities(): void + { + $capabilities = $this->provider->getCapabilities(); + + $this->assertIsArray($capabilities); + $this->assertContains(ProviderCapabilities::BASIC, $capabilities); + $this->assertContains(ProviderCapabilities::PICTURE, $capabilities); + $this->assertContains(ProviderCapabilities::DATASHEET, $capabilities); + $this->assertContains(ProviderCapabilities::PRICE, $capabilities); + $this->assertContains(ProviderCapabilities::FOOTPRINT, $capabilities); + } + + public function testSearchByKeywordWithCCode(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C123456', + 'productModel' => 'Test Component', + 'productIntroEn' => 'Test description', + 'brandNameEn' => 'Test Manufacturer', + 'encapStandard' => '0603', + 'productImageUrl' => 'https://example.com/image.jpg', + 'productImages' => ['https://example.com/image1.jpg'], + 'productPriceList' => [ + ['ladder' => 1, 'productPrice' => '0.10', 'currencySymbol' => 'US$'] + ], + 'paramVOList' => [ + ['paramNameEn' => 'Resistance', 'paramValueEn' => '1kฮฉ'] + ], + 'pdfUrl' => 'https://example.com/datasheet.pdf', + 'weight' => 0.001 + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $results = $this->provider->searchByKeyword('C123456'); + + $this->assertIsArray($results); + $this->assertCount(1, $results); + $this->assertInstanceOf(PartDetailDTO::class, $results[0]); + $this->assertEquals('C123456', $results[0]->provider_id); + $this->assertEquals('Test Component', $results[0]->name); + } + + public function testSearchByKeywordWithRegularTerm(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productSearchResultVO' => [ + 'productList' => [ + [ + 'productCode' => 'C789012', + 'productModel' => 'Regular Component', + 'productIntroEn' => 'Regular description', + 'brandNameEn' => 'Regular Manufacturer', + 'encapStandard' => '0805', + 'productImageUrl' => 'https://example.com/regular.jpg', + 'productImages' => ['https://example.com/regular1.jpg'], + 'productPriceList' => [ + ['ladder' => 10, 'productPrice' => '0.08', 'currencySymbol' => 'โ‚ฌ'] + ], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ] + ] + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $results = $this->provider->searchByKeyword('resistor'); + + $this->assertIsArray($results); + $this->assertCount(1, $results); + $this->assertInstanceOf(PartDetailDTO::class, $results[0]); + $this->assertEquals('C789012', $results[0]->provider_id); + $this->assertEquals('Regular Component', $results[0]->name); + } + + public function testSearchByKeywordWithTipProduct(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productSearchResultVO' => [ + 'productList' => [] + ], + 'tipProductDetailUrlVO' => [ + 'productCode' => 'C555555' + ] + ] + ])); + + $detailResponse = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C555555', + 'productModel' => 'Tip Component', + 'productIntroEn' => 'Tip description', + 'brandNameEn' => 'Tip Manufacturer', + 'encapStandard' => '1206', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse, $detailResponse]); + + $results = $this->provider->searchByKeyword('special'); + + $this->assertIsArray($results); + $this->assertCount(1, $results); + $this->assertInstanceOf(PartDetailDTO::class, $results[0]); + $this->assertEquals('C555555', $results[0]->provider_id); + $this->assertEquals('Tip Component', $results[0]->name); + } + + public function testSearchByKeywordsBatch(): void + { + $mockResponse1 = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C123456', + 'productModel' => 'Batch Component 1', + 'productIntroEn' => 'Batch description 1', + 'brandNameEn' => 'Batch Manufacturer', + 'encapStandard' => '0603', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ])); + + $mockResponse2 = new MockResponse(json_encode([ + 'result' => [ + 'productSearchResultVO' => [ + 'productList' => [ + [ + 'productCode' => 'C789012', + 'productModel' => 'Batch Component 2', + 'productIntroEn' => 'Batch description 2', + 'brandNameEn' => 'Batch Manufacturer', + 'encapStandard' => '0805', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ] + ] + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse1, $mockResponse2]); + + $results = $this->provider->searchByKeywordsBatch(['C123456', 'resistor']); + + $this->assertIsArray($results); + $this->assertArrayHasKey('C123456', $results); + $this->assertArrayHasKey('resistor', $results); + $this->assertCount(1, $results['C123456']); + $this->assertCount(1, $results['resistor']); + $this->assertEquals('C123456', $results['C123456'][0]->provider_id); + $this->assertEquals('C789012', $results['resistor'][0]->provider_id); + } + + public function testGetDetails(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C123456', + 'productModel' => 'Detailed Component', + 'productIntroEn' => 'Detailed description', + 'brandNameEn' => 'Detailed Manufacturer', + 'encapStandard' => '0603', + 'productImageUrl' => 'https://example.com/detail.jpg', + 'productImages' => ['https://example.com/detail1.jpg'], + 'productPriceList' => [ + ['ladder' => 1, 'productPrice' => '0.10', 'currencySymbol' => 'US$'], + ['ladder' => 10, 'productPrice' => '0.08', 'currencySymbol' => 'US$'] + ], + 'paramVOList' => [ + ['paramNameEn' => 'Resistance', 'paramValueEn' => '1kฮฉ'], + ['paramNameEn' => 'Tolerance', 'paramValueEn' => '1%'] + ], + 'pdfUrl' => 'https://example.com/datasheet.pdf', + 'weight' => 0.001 + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $result = $this->provider->getDetails('C123456'); + + $this->assertInstanceOf(PartDetailDTO::class, $result); + $this->assertEquals('C123456', $result->provider_id); + $this->assertEquals('Detailed Component', $result->name); + $this->assertEquals('Detailed description', $result->description); + $this->assertEquals('Detailed Manufacturer', $result->manufacturer); + $this->assertEquals('0603', $result->footprint); + $this->assertEquals('https://www.lcsc.com/product-detail/C123456.html', $result->provider_url); + $this->assertCount(1, $result->images); + $this->assertCount(2, $result->parameters); + $this->assertCount(1, $result->vendor_infos); + $this->assertEquals('0.001', $result->mass); + } + + public function testGetDetailsWithNoResults(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productSearchResultVO' => [ + 'productList' => [] + ] + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('No part found with ID INVALID'); + + $this->provider->getDetails('INVALID'); + } + + public function testGetDetailsWithMultipleResults(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productSearchResultVO' => [ + 'productList' => [ + [ + 'productCode' => 'C123456', + 'productModel' => 'Component 1', + 'productIntroEn' => 'Description 1', + 'brandNameEn' => 'Manufacturer 1', + 'encapStandard' => '0603', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ], + [ + 'productCode' => 'C789012', + 'productModel' => 'Component 2', + 'productIntroEn' => 'Description 2', + 'brandNameEn' => 'Manufacturer 2', + 'encapStandard' => '0805', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ] + ] + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('Multiple parts found with ID ambiguous'); + + $this->provider->getDetails('ambiguous'); + } + + public function testSanitizeFieldPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('sanitizeField'); + $method->setAccessible(true); + + $this->assertNull($method->invokeArgs($this->provider, [null])); + $this->assertEquals('Clean text', $method->invokeArgs($this->provider, ['Clean text'])); + $this->assertEquals('Text without tags', $method->invokeArgs($this->provider, ['Text without tags'])); + } + + public function testGetUsedCurrencyPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('getUsedCurrency'); + $method->setAccessible(true); + + $this->assertEquals('USD', $method->invokeArgs($this->provider, ['US$'])); + $this->assertEquals('USD', $method->invokeArgs($this->provider, ['$'])); + $this->assertEquals('EUR', $method->invokeArgs($this->provider, ['โ‚ฌ'])); + $this->assertEquals('GBP', $method->invokeArgs($this->provider, ['ยฃ'])); + $this->assertEquals('USD', $method->invokeArgs($this->provider, ['UNKNOWN'])); // fallback to configured currency + } + + public function testGetProductShortURLPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('getProductShortURL'); + $method->setAccessible(true); + + $result = $method->invokeArgs($this->provider, ['C123456']); + $this->assertEquals('https://www.lcsc.com/product-detail/C123456.html', $result); + } + + public function testGetProductDatasheetsPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('getProductDatasheets'); + $method->setAccessible(true); + + $result = $method->invokeArgs($this->provider, [null]); + $this->assertIsArray($result); + $this->assertEmpty($result); + + $result = $method->invokeArgs($this->provider, ['https://example.com/datasheet.pdf']); + $this->assertIsArray($result); + $this->assertCount(1, $result); + $this->assertInstanceOf(FileDTO::class, $result[0]); + } + + public function testGetProductImagesPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('getProductImages'); + $method->setAccessible(true); + + $result = $method->invokeArgs($this->provider, [null]); + $this->assertIsArray($result); + $this->assertEmpty($result); + + $result = $method->invokeArgs($this->provider, [['https://example.com/image1.jpg', 'https://example.com/image2.jpg']]); + $this->assertIsArray($result); + $this->assertCount(2, $result); + $this->assertInstanceOf(FileDTO::class, $result[0]); + $this->assertInstanceOf(FileDTO::class, $result[1]); + } + + public function testAttributesToParametersPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('attributesToParameters'); + $method->setAccessible(true); + + $attributes = [ + ['paramNameEn' => 'Resistance', 'paramValueEn' => '1kฮฉ'], + ['paramNameEn' => 'Tolerance', 'paramValueEn' => '1%'], + ['paramNameEn' => 'Empty', 'paramValueEn' => ''], + ['paramNameEn' => 'Dash', 'paramValueEn' => '-'] + ]; + + $result = $method->invokeArgs($this->provider, [$attributes]); + $this->assertIsArray($result); + $this->assertCount(2, $result); // Only non-empty values + $this->assertInstanceOf(ParameterDTO::class, $result[0]); + $this->assertInstanceOf(ParameterDTO::class, $result[1]); + } + + public function testPricesToVendorInfoPrivateMethod(): void + { + $reflection = new \ReflectionClass($this->provider); + $method = $reflection->getMethod('pricesToVendorInfo'); + $method->setAccessible(true); + + $prices = [ + ['ladder' => 1, 'productPrice' => '0.10', 'currencySymbol' => 'US$'], + ['ladder' => 10, 'productPrice' => '0.08', 'currencySymbol' => 'US$'] + ]; + + $result = $method->invokeArgs($this->provider, ['C123456', 'https://example.com', $prices]); + $this->assertIsArray($result); + $this->assertCount(1, $result); + $this->assertInstanceOf(PurchaseInfoDTO::class, $result[0]); + $this->assertEquals('LCSC', $result[0]->distributor_name); + $this->assertEquals('C123456', $result[0]->order_number); + $this->assertCount(2, $result[0]->prices); + } + + public function testCategoryBuilding(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C123456', + 'productModel' => 'Test Component', + 'productIntroEn' => 'Test description', + 'brandNameEn' => 'Test Manufacturer', + 'parentCatalogName' => 'Electronic Components', + 'catalogName' => 'Resistors (SMT)', + 'encapStandard' => '0603', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $result = $this->provider->getDetails('C123456'); + $this->assertEquals('Electronic Components -> Resistors (SMT)', $result->category); + } + + public function testEmptyFootprintHandling(): void + { + $mockResponse = new MockResponse(json_encode([ + 'result' => [ + 'productCode' => 'C123456', + 'productModel' => 'Test Component', + 'productIntroEn' => 'Test description', + 'brandNameEn' => 'Test Manufacturer', + 'encapStandard' => '-', + 'productImageUrl' => null, + 'productImages' => [], + 'productPriceList' => [], + 'paramVOList' => [], + 'pdfUrl' => null, + 'weight' => null + ] + ])); + + $this->httpClient->setResponseFactory([$mockResponse]); + + $result = $this->provider->getDetails('C123456'); + $this->assertNull($result->footprint); + } + + public function testSearchByKeywordsBatchWithEmptyKeywords(): void + { + $result = $this->provider->searchByKeywordsBatch([]); + $this->assertIsArray($result); + $this->assertEmpty($result); + } + + public function testSearchByKeywordsBatchWithException(): void + { + $mockResponse = new MockResponse('', ['http_code' => 500]); + $this->httpClient->setResponseFactory([$mockResponse]); + + $results = $this->provider->searchByKeywordsBatch(['error']); + $this->assertIsArray($results); + $this->assertArrayHasKey('error', $results); + $this->assertEmpty($results['error']); + } +} diff --git a/tests/Services/Parts/PartsTableActionHandlerTest.php b/tests/Services/Parts/PartsTableActionHandlerTest.php new file mode 100644 index 00000000..c5105cd7 --- /dev/null +++ b/tests/Services/Parts/PartsTableActionHandlerTest.php @@ -0,0 +1,62 @@ +. + */ +namespace App\Tests\Services\Parts; + +use App\Entity\Parts\Part; +use App\Services\Parts\PartsTableActionHandler; +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; +use Symfony\Component\HttpFoundation\RedirectResponse; + +class PartsTableActionHandlerTest extends WebTestCase +{ + private PartsTableActionHandler $service; + + protected function setUp(): void + { + self::bootKernel(); + $this->service = self::getContainer()->get(PartsTableActionHandler::class); + } + + public function testExportActionsRedirectToExportController(): void + { + // Mock a Part entity with required properties + $part = $this->createMock(Part::class); + $part->method('getId')->willReturn(1); + $part->method('getName')->willReturn('Test Part'); + + $selected_parts = [$part]; + + // Test each export format, focusing on our new xlsx format + $formats = ['json', 'csv', 'xml', 'yaml', 'xlsx']; + + foreach ($formats as $format) { + $action = "export_{$format}"; + $result = $this->service->handleAction($action, $selected_parts, 1, '/test'); + + $this->assertInstanceOf(RedirectResponse::class, $result); + $this->assertStringContainsString('parts/export', $result->getTargetUrl()); + $this->assertStringContainsString("format={$format}", $result->getTargetUrl()); + } + } + +} \ No newline at end of file diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index 037fc7d8..904fc332 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -242,7 +242,7 @@ part.info.timetravel_hint - Dies ist wie das Bauteil bevor dem %timestamp% aussah. <i>Beachten Sie, dass dieses Feature experimentell ist und die angezeigten Infos daher nicht unbedingt korrekt sind.</i> + So sah das Bauteil vor %timestamp% aus. <i>Beachten Sie, dass dieses Feature experimentell ist und die angezeigten Infos daher nicht unbedingt korrekt sind.</i> @@ -1644,7 +1644,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. log.undo.confirm_message - Wollen Sie wirklich die gegebene ร„nderung rรผckgรคngig machen / Das Element auf einen alten Versionsstand zurรผcksetzen? + Wollen Sie wirklich die gegebene ร„nderung rรผckgรคngig machen? / Das Element auf einen alten Versionsstand zurรผcksetzen? @@ -1654,7 +1654,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. mail.footer.email_sent_by - Diese Email wurde automatisch erstellt von + Diese E-Mail wurde automatisch erstellt von @@ -1664,7 +1664,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. mail.footer.dont_reply - Antworten Sie nicht auf diese Email. + Antworten Sie nicht auf diese E-Mail. @@ -1684,7 +1684,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. email.pw_reset.message - jemand (hoffentlich Sie) hat ein Reset ihres Passwortes angefordert. Wenn diese Anfrage nicht von Ihnen stammt, ignorieren sie diese Email. + jemand (hoffentlich Sie) hat ein Reset ihres Passwortes angefordert. Wenn diese Anfrage nicht von Ihnen stammt, ignorieren Sie diese E-Mail. @@ -1734,7 +1734,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. email.pw_reset.valid_unit %date% - Das Reset Token ist gรผltig bis <i>%date%</i> + Das Reset-Token ist gรผltig bis <i>%date%</i> @@ -2166,7 +2166,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. user.last_editing_user - Nutzer der dieses Bauteil zu Letzt bearbeitete + Nutzer der dieses Bauteil zuletzt bearbeitete @@ -2983,7 +2983,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. tfa_u2f.explanation - Mithilfe eines U2F/FIDO kompatiblem Sicherheitsschlรผssel (z.B. YubiKey oder NitroKey) kann eine benutzerfreundliche und sichere Zwei-Faktor-Authentifizierung ermรถglicht. Die Sicherheitsschlรผssel kรถnnen hier registriert werden, und wird eine Zwei-Faktor-รœberprรผfung benรถtigt, so muss der Schlรผssel nur per USB angesteckt oder per NFC gegen das Gerรคt getippt werden. + Mithilfe eines U2F/FIDO kompatiblen Sicherheitsschlรผssel (z.B. YubiKey oder NitroKey) kann eine benutzerfreundliche und sichere Zwei-Faktor-Authentifizierung ermรถglicht. Die Sicherheitsschlรผssel kรถnnen hier registriert werden, und wird eine Zwei-Faktor-รœberprรผfung benรถtigt, so muss der Schlรผssel nur per USB angesteckt oder per NFC gegen das Gerรคt getippt werden. @@ -2993,7 +2993,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. tfa_u2f.add_key.backup_hint - Um den Zugang auch bei Verlust des Schlรผssels zu gewรคhrleisten, ist es empfehlenswert einen zweiten Schlรผssel als Backup zu registrieren und diesen an einem sicherem Ort zu lagern! + Um den Zugang auch bei Verlust des Schlรผssels zu gewรคhrleisten, ist es empfehlenswert einen zweiten Schlรผssel als Backup zu registrieren und diesen an einem sicheren Ort zu lagern! @@ -3297,7 +3297,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. tfa_backup.codes.explanation - Drucken Sie diese Codes aus und bewahren Sie sie an einem sicherem Ort auf! + Drucken Sie diese Codes aus und bewahren Sie sie an einem sicheren Ort auf! @@ -3406,7 +3406,7 @@ Subelemente werden beim Lรถschen nach oben verschoben. user.email.label - Email + E-Mail @@ -3710,7 +3710,7 @@ Beachten Sie auรŸerdem, dass ihr Account ohne Zwei-Faktor-Authentifizierung nich tfa_backup.explanation - Mithilfe dieser Backupcodes kรถnnen Sie auf ihren Account zugreifen, selbst wenn Sie das Gerรคt mit der Authenticator App verlieren sollten. Drucken Sie die Codes aus und bewahren Sie sie an einem sicherem Ort auf. + Mithilfe dieser Backupcodes kรถnnen Sie auf ihren Account zugreifen, selbst wenn Sie das Gerรคt mit der Authenticator App verlieren sollten. Drucken Sie die Codes aus und bewahren Sie sie an einem sicheren Ort auf. @@ -4379,7 +4379,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr pw_reset.user_or_email - Benutzername / Email + Benutzername / E-Mail @@ -4389,7 +4389,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr pw_reset.request.success - Passwort Anfrage erfolgreich! รœberprรผfen Sie Ihre Emails fรผr weitere Informationen. + Passwort-Anfrage erfolgreich! รœberprรผfen Sie Ihre E-Mails fรผr weitere Informationen. @@ -5143,7 +5143,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr attachment.edit.secure_file.help - Auf ein Anhang der als privat gekennzeichnet ist, kann nur durch einen angemeldeten Benutzer zugegriffen werden, der die entsprechende Berechtigung besitzt. Wenn diese Option aktiv ist, werden keine Thumbnails erzeugt, und der Zugriff auf die Datei ist langsamer. + Auf einen Anhang, der als privat gekennzeichnet wurde, kann nur durch einen angemeldeten Benutzer zugegriffen werden, der die entsprechende Berechtigung besitzt. Wenn diese Option aktiv ist, werden keine Thumbnails erzeugt, und der Zugriff auf die Datei ist langsamer. @@ -5351,7 +5351,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr label_options.barcode_type.label - Barcodetyp + Barcode-Typ @@ -6091,7 +6091,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr pw_reset.email.subject - Passwort Reset fรผr Ihren Part-DB Account + Passwort-Reset fรผr Ihren Part-DB-Account @@ -6608,7 +6608,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr validator.noneofitschild.self - Ein Element kann nicht sein eigenenes รผbergeordnetes Element sein! + Ein Element kann nicht sein eigenes รผbergeordnetes Element sein! @@ -6638,7 +6638,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr validator.part_lot.location_full - Der Lagerort ist voll, daher kรถnnen keine neue Teile hinzugefรผgt werden. + Der Lagerort ist voll, daher kรถnnen keine neuen Teile hinzugefรผgt werden. @@ -6839,7 +6839,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr entity.edit.not_selectable.help - Wenn diese Option aktiviert ist, dann kann dieses Element keinem Bauteil als Eigenschaft zugewiesen werden. Hilfreich z.B. wenn dieses Element nur der reinen Sortierung dienen soll. + Wenn diese Option aktiviert ist, dann kann dieses Element keinem Bauteil als Eigenschaft zugewiesen werden. Hilfreich z.B., wenn dieses Element nur der reinen Sortierung dienen soll. @@ -6889,7 +6889,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr category.edit.disable_footprints.help - Wenn diese Option aktiviert ist, ist die Footprint Eigenschaft fรผr alle Bauteile in dieser Kategorie, deaktiviert. + Wenn diese Option aktiviert ist, ist die Footprint-Eigenschaft fรผr alle Bauteile in dieser Kategorie, deaktiviert. @@ -6919,7 +6919,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr category.edit.disable_autodatasheets - Deaktiviere Automatische Datenblatt links + Deaktiviere automatische Datenblatt-Links @@ -6929,7 +6929,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr category.edit.disable_autodatasheets.help - Wenn diese Option aktiviert ist, werden fรผr Bauteile mit dieser Kategorie keine automatischen Datenblattlinks erzeugt. + Wenn diese Option aktiviert ist, werden fรผr Bauteile mit dieser Kategorie keine automatischen Datenblatt-Links erzeugt. @@ -6949,7 +6949,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr category.edit.disable_properties.help - Wenn diese Option aktiviert ist, sind die Bauteileeigenschaften fรผr alle Bauteile in dieser Kategorie, deaktiviert. + Wenn diese Option aktiviert ist, sind die Bauteileeigenschaften fรผr alle Bauteile in dieser Kategorie deaktiviert. @@ -7318,7 +7318,7 @@ Element 1 -> Element 1.2 storelocation.only_single_part.help - Wenn diese Option aktiviert ist, kann dieser Lagerort nur ein einzelnes Bauteil aber in beliebiger Menge fassen. Hilfreich fรผr kleine SMD Fรคcher oder Feeder. + Wenn diese Option aktiviert ist, kann dieser Lagerort nur ein einzelnes Bauteil aber in beliebiger Menge fassen. Hilfreich fรผr kleine SMD-Fรคcher oder -Feeder. @@ -8879,13 +8879,13 @@ Element 1 -> Element 1.2 perm.labels.use_twig - Twig Modus benutzen + Twig-Modus benutzen label_profile.showInDropdown - In Barcode Schnellauswahl anzeigen + In Barcode-Schnellauswahl anzeigen @@ -8948,6 +8948,12 @@ Element 1 -> Element 1.2 Bauteil รคndern + + + part_list.action.scrollable_hint + Scrollen Sie, um alle Aktionen anzuzeigen + + part_list.action.action.title @@ -8975,7 +8981,7 @@ Element 1 -> Element 1.2 part_list.action.action.group.change_field - Change field + Feld รคndern @@ -9035,7 +9041,7 @@ Element 1 -> Element 1.2 company.edit.quick.phone - Call phone + Telefonanruf @@ -9137,7 +9143,7 @@ Element 1 -> Element 1.2 tools.reel_calc.explanation - Dieser Rechner erlaubt es Abzuschรคtzen wie viele Bauteile noch auf einer SMD Rolle (Reel) vorhanden sind. Messen Sie die angegeben Dimensionen auf der Rolle nach (oder nutzen Sie die Vorgaben) und drรผcken Sie "Update". + Dieser Rechner erlaubt es Abzuschรคtzen wie viele Bauteile noch auf einer SMD Rolle (Reel) vorhanden sind. Messen Sie die angegebenen Dimensionen auf der Rolle nach (oder nutzen Sie die Vorgaben) und drรผcken Sie "Update". @@ -9155,7 +9161,7 @@ Element 1 -> Element 1.2 user.pw_change_needed.flash - Passwortรคnderung benรถtigt! Bitte setze ein neues Passwort. + Passwortรคnderung nรถtig! Bitte setze ein neues Passwort. @@ -9263,7 +9269,7 @@ Element 1 -> Element 1.2 filter.entity_constraint.operator.INCLUDING_CHILDREN - Gleich (inklusive Kindelementen) + Gleich (inklusive Kindelemente) @@ -9281,7 +9287,7 @@ Element 1 -> Element 1.2 filter.tags_constraint.operator.ANY - Irgendeiner der Tags + Irgendeines der Tags @@ -9338,6 +9344,72 @@ Element 1 -> Element 1.2 Name des Anhangs + + + filter.bulk_import_job.label + Massenimport-Auftrag + + + + + filter.bulk_import_job.job_status + Auftragsstatus + + + + + filter.bulk_import_job.part_status_in_job + Bauteile-Status in Auftrag + + + + + filter.bulk_import_job.status.pending + Ausstehend + + + + + filter.bulk_import_job.status.in_progress + In Bearbeitung + + + + + filter.bulk_import_job.status.completed + Abgeschlossen + + + + + filter.bulk_import_job.status.stopped + Angehalten + + + + + filter.bulk_import_job.status.failed + Fehlgeschlagen + + + + + filter.bulk_import_job.part_status.pending + Ausstehend + + + + + filter.bulk_import_job.part_status.completed + Abgeschlossen + + + + + filter.bulk_import_job.part_status.skipped + รœbersprungen + + filter.choice_constraint.operator.ANY @@ -9515,7 +9587,7 @@ Element 1 -> Element 1.2 part.filter.lotDescription - Beschreibung des Bauteilebestand + Beschreibung des Bauteilbestands @@ -9785,7 +9857,7 @@ Element 1 -> Element 1.2 project.bom.quantity - BOM Menge + BOM-Menge @@ -9833,13 +9905,13 @@ Element 1 -> Element 1.2 project.bom.delete.confirm - Wollen sie diesen BOM Eintrag wirklich lรถschen? + Wollen sie diesen BOM-Eintrag wirklich lรถschen? project.add_parts_to_project - Bauteile zur Projekt BOM hinzufรผgen + Bauteile zur Projekt-BOM hinzufรผgen @@ -9851,7 +9923,7 @@ Element 1 -> Element 1.2 project_bom_entry.label - BOM Eintrag + BOM-Eintrag @@ -9917,7 +9989,7 @@ Element 1 -> Element 1.2 part.info.projectBuildPart.hint - Dieses Bauteil reprรคsentiert die gebauten Instanzen folgendes Projektes und ist mit diesem verknรผpft + Dieses Bauteil reprรคsentiert die gebauten Instanzen des folgenden Projektes und ist mit diesem verknรผpft @@ -9935,7 +10007,7 @@ Element 1 -> Element 1.2 project.info.bom_entries_count - BOM Eintrรคge + BOM-Eintrรคge @@ -9947,7 +10019,7 @@ Element 1 -> Element 1.2 project.info.bom_add_parts - BOM Eintrรคge hinzufรผgen + BOM-Eintrรคge hinzufรผgen @@ -9971,19 +10043,19 @@ Element 1 -> Element 1.2 part.info.withdraw_modal.title.withdraw - Bauteile aus Lot entnehmen + Bauteile aus Bestand entnehmen part.info.withdraw_modal.title.add - Bauteile zu Lot hinzufรผgen + Bauteile zu Bestand hinzufรผgen part.info.withdraw_modal.title.move - Verschiebe Bauteile in ein anderes Lot + Verschiebe Bauteile in anderen Bestand @@ -10103,13 +10175,13 @@ Element 1 -> Element 1.2 tools.builtin_footprints_viewer.title - Mitgelieferte Footprint Bilder + Mitgelieferte Footprint-Bilder tools.builtin_footprints_viewer.hint - Diese Galerie listet alle mitgelieferten Footprint Bilder auf. Wenn Sie diese in einem Anhang nutzen wollen, tippen Sie den Namen (oder ein Stichwort) in das URL-Feld des Anhangs ein und wรคhlen Sie das gewรผnschte Bild aus dem Dropdown-Menรผ aus. + Diese Galerie listet alle mitgelieferten Footprint-Bilder auf. Wenn Sie diese in einem Anhang nutzen wollen, tippen Sie den Namen (oder ein Stichwort) in das URL-Feld des Anhangs ein und wรคhlen Sie das gewรผnschte Bild aus dem Dropdown-Menรผ aus. @@ -10217,7 +10289,7 @@ Element 1 -> Element 1.2 project.build.help - Wรคhlen Sie aus, aus welchen Bestรคnden die zum Bau notwendigen Bauteile genommen werden sollen (und in welcher Anzahl). Setzen Sie den Haken fรผr jeden BOM Eintrag, wenn sie die Bauteile entnommen haben, oder nutzen Sie die oberste Checkbox, um alle Haken auf einmal zu setzen. + Wรคhlen Sie aus, aus welchen Bestรคnden die zum Bau notwendigen Bauteile genommen werden sollen (und in welcher Anzahl). Setzen Sie den Haken fรผr jeden BOM-Eintrag, wenn sie die Bauteile entnommen haben, oder nutzen Sie die oberste Checkbox, um alle Haken auf einmal zu setzen. @@ -10319,7 +10391,7 @@ Element 1 -> Element 1.2 homepage.first_steps.create_part - Oder Sie kรถnne direkt ein <a href="%url%">neues Bauteil erstellen</a>. + Oder Sie kรถnnen direkt ein <a href="%url%">neues Bauteil erstellen</a>. @@ -10361,7 +10433,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.pw_reset_expires - Passwort Reset + Passwort-Reset @@ -10379,7 +10451,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.supplier_product_url - Produkt URL + Produkt-URL @@ -10421,7 +10493,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.options.barcode_type - Barcodetyp + Barcode-Typ @@ -10433,7 +10505,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.quantity - BOM Menge + BOM-Menge @@ -10487,7 +10559,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.disable_autodatasheets - Deaktiviere Automatische Datenblatt links + Deaktiviere Automatische Datenblatt-Links @@ -10571,7 +10643,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.auto_product_url - Produkt URL + Produkt-URL @@ -10601,7 +10673,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.footprint_3d - 3D Modell + 3D-Modell @@ -10637,7 +10709,7 @@ Element 1 -> Element 1.2 log.element_edited.changed_fields.use_si_prefix - Benutze SI Prefixe + Benutze SI-Prefixe @@ -10865,19 +10937,19 @@ Element 1 -> Element 1.2 user.saml_user.pw_change_hint - Sie verwenden Single Sign-On (SSO) zum Einloggen. Sie kรถnnen ihr Passwort und Zwei-Faktor-Authentifizierungen deshalb hier nicht konfigurieren. Nutzen Sie stattdessen die zentrale Seite ihres SSO Anbieters! + Sie verwenden Single Sign-on (SSO) zum Einloggen. Sie kรถnnen Ihr Passwort und Zwei-Faktor-Authentifizierungen deshalb hier nicht konfigurieren. Nutzen Sie stattdessen die zentrale Seite ihres SSO-Anbieters! login.sso_saml_login - Single Sign-On Login (SSO) + Single Sign-on Login (SSO) login.local_login_hint - Das untenstehende Formular kann nur fรผr den Login mit einem lokalen Benutzer verwendet werden. Wenn Sie sich stattdessen via Single Sign-On einloggen wollen, nutzen Sie den obenstehenden Button. + Das untenstehende Formular kann nur fรผr den Login mit einem lokalen Benutzer verwendet werden. Wenn Sie sich stattdessen via Single Sign-on einloggen wollen, nutzen Sie den obenstehenden Button. @@ -10910,6 +10982,12 @@ Element 1 -> Element 1.2 Export als XML + + + part_list.action.export_xlsx + Export als Excel + + parts.import.title @@ -11027,7 +11105,7 @@ Element 1 -> Element 1.2 project.bom_import.flash.success - %count% BOM Eintrรคge erfolgreich importiert. + %count% BOM-Eintrรคge erfolgreich importiert. @@ -11045,13 +11123,13 @@ Element 1 -> Element 1.2 project.bom_import.clear_existing_bom - Lรถsche existierende BOM Eintrรคge vor dem Import + Lรถsche existierende BOM-Eintrรคge vor dem Import project.bom_import.clear_existing_bom.help - Wenn diese Option ausgewรคhlt ist, werden alle bereits im Projekt existierenden BOM Eintrรคge gelรถscht und mit den importierten BOM Daten รผberschrieben. + Wenn diese Option ausgewรคhlt ist, werden alle bereits im Projekt existierenden BOM-Eintrรคge gelรถscht und mit den importierten BOM-Daten รผberschrieben. @@ -11153,7 +11231,7 @@ Element 1 -> Element 1.2 log.cli_user - CLI Benutzer + CLI-Benutzer @@ -11195,7 +11273,7 @@ Element 1 -> Element 1.2 log.user_login.ip_anonymize_hint - Wenn die letzten Stellen der IP-Adresse fehlen, dann ist der DSGVO Modus aktiviert, bei dem IP-Adressen anonymisiert werden. + Wenn die letzten Stellen der IP-Adresse fehlen, dann ist der DSGVO-Modus aktiviert, bei dem IP-Adressen anonymisiert werden. @@ -11545,7 +11623,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn oauth_client.flash.connection_successful - Verbindung zur OAuth Anwendung erfolgreich hergestellt! + Verbindung zur OAuth-Anwendung erfolgreich hergestellt! @@ -11605,7 +11683,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn user.settings.api_tokens - API Token + API-Token @@ -11665,13 +11743,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn user.settings.show_api_documentation - API Dokumentation anzeigen + API-Dokumentation anzeigen api_token.create_new - Neuen API Token erstellen + Neuen API-Token erstellen @@ -11701,7 +11779,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn api_tokens.access_level.help - Hiermit lรคsst sich einschrรคnken, worauf der API Token Zugriff ermรถglicht. Der Zugriff ist immer durch die Berechtigungen des Nutzers begrenzt. + Hiermit lรคsst sich einschrรคnken, worauf der API-Token Zugriff ermรถglicht. Der Zugriff ist immer durch die Berechtigungen des Nutzers begrenzt. @@ -11713,7 +11791,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn api_tokens.your_token_is - Ihr API Token ist + Ihr API-Token ist @@ -11755,13 +11833,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn perm.api.access_api - API Zugriff + API-Zugriff perm.api.manage_tokens - API Token verwalten + API-Token verwalten @@ -11785,13 +11863,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn api_tokens.deleted - API Token erfolgreich entfernt! + API-Token erfolgreich entfernt! user.settings.api_tokens.no_api_tokens_yet - Bisher wurden keine API Token erstellt. + Bisher wurden keine API-Token erstellt. @@ -11821,13 +11899,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn scan_dialog.mode.ipn - IPN Barcode + IPN-Barcode scan_dialog.mode.internal - Part-DB Barcode + Part-DB-Barcode @@ -11935,19 +12013,19 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn part_lot.edit.vendor_barcode - Lieferanten Barcode + Lieferanten-Barcode part_lot.edit.vendor_barcode.help - Wenn dieser Bestand bereits ein Barcode hat (der z.B. vom Lieferanten aufgebracht wurde), kรถnnen Sie hier den Inhalt des Barcodes angeben, damit Sie diesen Bestand durch scannen des Barcodes finden. + Wenn dieser Bestand bereits einen Barcode hat (der z.B. vom Lieferanten aufgebracht wurde), kรถnnen Sie hier den Inhalt des Barcodes angeben, damit Sie diesen Bestand durch Scannen des Barcodes finden. scan_dialog.mode.vendor - Lieferanten Barcode (in Bauteilebestand konfiguriert) + Lieferanten-Barcode (in Bauteilebestand konfiguriert) @@ -12073,7 +12151,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn part.info.withdraw_modal.delete_lot_if_empty - Lรถsche diesen Bestand, wenn er durch Operation leer wird + Lรถsche diesen Bestand, wenn er durch die Operation leer wird @@ -12097,7 +12175,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn eda_info.kicad_section.title - KiCad spezifische Einstellungen + KiCad-spezifische Einstellungen @@ -12163,19 +12241,19 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn api.api_endpoints.title - API Endpunkte + API-Endpunkte api.api_endpoints.partdb - Part-DB API + Part-DB-API api.api_endpoints.kicad_root_url - KiCad API root URL + KiCad-API Root URL @@ -12223,7 +12301,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn info_providers.search.no_results - Keine Ergebnisse in den gegebenen Quellen gefunden! Prรผfen Sie ihr Suchwort oder versuchen Sie weitere Informationsquellen auszuwรคhlen. + Keine Ergebnisse in den gegebenen Quellen gefunden! Prรผfen Sie Ihr Suchwort oder versuchen Sie weitere Informationsquellen auszuwรคhlen. @@ -12253,7 +12331,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn info_providers.search.existing_part_found - Dieses Bauteil (oder ein sehr รคhnliches) existiert bereits in der Datenbank. Bitte รผberprรผfen Sie, ob es das gleiche ist und ob Sie dies erneut erstellen mรถchten! + Dieses Bauteil (oder ein sehr รคhnliches) existiert bereits in der Datenbank. Bitte รผberprรผfen Sie, ob es dasselbe ist und ob Sie dies erneut erstellen mรถchten! @@ -12283,13 +12361,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn scan_dialog.mode.eigp - EIGP 114 Barcode (z. B. der Datamatrix code auf Digikey und Mouser Bauteilen) + EIGP 114 Barcode (z. B. der Datamatrix-Code auf Digikey und Mouser Bauteilen) scan_dialog.info_mode - Info Modus (Barcode dekodieren und Inhalte anzeigen, aber nicht zum Bauteil weiterleiten) + Info-Modus (Barcode dekodieren und Inhalte anzeigen, aber nicht zum Bauteil weiterleiten) @@ -12337,7 +12415,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.ips.element14.apiKey - API Key + API-Key @@ -12367,7 +12445,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.ips.tme.token - API Token + API-Token @@ -12379,7 +12457,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.ips.tme.secret - API Secret + API-Secret @@ -12415,7 +12493,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.ips.mouser.apiKey - API Key + API-Key @@ -12716,7 +12794,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.misc.kicad_eda - KiCAD Integration + KiCAD-Integration @@ -12998,7 +13076,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.misc.exchange_rate.fixer_api_key - Fixer.io API Key + Fixer.io API-Key @@ -13076,7 +13154,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn project.bom_import.map_fields.help - Wรคhlen Sie aus, wie CSV Spalten auf BOM Felder gemappt werden + Wรคhlen Sie aus, wie CSV Spalten auf BOM-Felder gemappt werden @@ -13112,7 +13190,7 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn project.bom_import.field_mapping.csv_field - CSV Spalte + CSV-Spalte @@ -13472,13 +13550,13 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.behavior.part_info.extract_params_from_description - Parameter aus der Bauteilebeschreibung extrahieren + Parameter aus der Bauteil-Beschreibung extrahieren settings.behavior.part_info.extract_params_from_notes - Parameter aus der Bauteilenotiz extrahieren + Parameter aus der Bauteil-Notiz extrahieren @@ -13502,13 +13580,643 @@ Bitte beachten Sie, dass Sie sich nicht als deaktivierter Benutzer ausgeben kรถn settings.behavior.table.preview_image_max_width - Max. Vorschaubilde-Breite (px) + Max. Vorschaubild-Breite (px) settings.behavior.table.preview_image_min_width - Min. Vorschaubilde-Breite (px) + Min. Vorschaubild-Breite (px) + + + + + info_providers.bulk_import.step1.title + Massenimport von Datenquellen โ€“ Schritt 1 + + + + + info_providers.bulk_import.parts_selected + Bauteile ausgewรคhlt + + + + + info_providers.bulk_import.step1.global_mapping_description + Konfigurieren Sie Feldzuordnungen, die auf alle ausgewรคhlten Teile angewendet werden sollen. Beispiel: โ€žMPN โ†’ LCSC + Mouserโ€ bedeutet, dass die Anbieter LCSC und Mouser anhand des MPN-Feldes jedes Teils durchsucht werden. + + + + + info_providers.bulk_import.selected_parts + Ausgewรคhlte Bauteile + + + + + info_providers.bulk_import.field_mappings + Feldzuordnungen + + + + + info_providers.bulk_import.field_mappings_help + Legen Sie fest, welche Bauteilefelder mit welchen Informationsanbietern durchsucht werden sollen. Mehrere Zuordnungen werden kombiniert. + + + + + info_providers.bulk_import.add_mapping + Zuordnung hinzufรผgen + + + + + info_providers.bulk_import.search_results.title + Suchergebnisse + + + + + info_providers.bulk_import.errors + Fehler + + + + + info_providers.bulk_import.results_found + %count% Ergebnisse gefunden + + + + + info_providers.bulk_import.source_field + Bauteilefeld + + + + + info_providers.bulk_import.view_existing + Existierendes ansehen + + + + + info_providers.bulk_search.search_field + Suchfeld + + + + + info_providers.bulk_search.providers + Datenquellen + + + + + info_providers.bulk_import.actions.label + Aktionen + + + + + info_providers.bulk_search.providers.help + Wรคhlen Sie aus, welche Datenquellen durchsucht werden sollen, wenn Bauteile dieses Feld haben. + + + + + info_providers.bulk_search.submit + Alle Bauteile suchen + + + + + info_providers.bulk_search.field.select + Wรคhlen Sie ein Feld zum Suchen aus + + + + + info_providers.bulk_search.field.mpn + Herstellernummer (MPN) + + + + + info_providers.bulk_search.field.name + Bauteile Name + + + + + part_list.action.action.info_provider + Datenquellen + + + + + part_list.action.bulk_info_provider_import + Massenimport von Datenquellen + + + + + info_providers.bulk_import.step1.spn_recommendation + Lieferantenteilenummer (SPN) wird fรผr bessere Ergebnisse empfohlen. Fรผgen Sie fรผr jeden Lieferanten eine Zuordnung hinzu, damit dessen SPNs verwendet werden kรถnnen. + + + + + info_providers.bulk_import.update_part + Bauteil aktualisieren + + + + + info_providers.bulk_import.prefetch_details + Vorabruf der Bauteiledetails + + + + + info_providers.bulk_import.prefetch_details_help + Details fรผr alle Ergebnisse vorab abrufen. Dies dauert zwar lรคnger, beschleunigt jedoch den Arbeitsablauf fรผr die Aktualisierung von Bauteilen. + + + + + info_providers.bulk_import.step2.title + Massenimport von Informationsquellen + + + + + info_providers.bulk_import.step2.card_title + Massenimport fรผr %count% Bauteile โ€“ %date% + + + + + info_providers.bulk_import.parts + Bauteile + + + + + info_providers.bulk_import.results + Ergebnisse + + + + + info_providers.bulk_import.created_at + Erstellt am + + + + + info_providers.bulk_import.status.in_progress + In Bearbeitung + + + + + info_providers.bulk_import.status.completed + Abgeschlossen + + + + + info_providers.bulk_import.status.failed + Fehlgeschlagen + + + + + info_providers.bulk_import.table.name + Name + + + + + info_providers.bulk_import.table.description + Beschreibung + + + + + info_providers.bulk_import.table.manufacturer + Hersteller + + + + + info_providers.bulk_import.table.provider + Quelle + + + + + info_providers.bulk_import.table.source_field + Bauteilefeld + + + + + info_providers.bulk_import.back + Zurรผck + + + + + info_providers.bulk_import.progress + Fortschritt: + + + + + info_providers.bulk_import.status.pending + Ausstehend + + + + + info_providers.bulk_import.completed + abgeschlossen + + + + + info_providers.bulk_import.skipped + รผbersprungen + + + + + info_providers.bulk_import.mark_completed + Als abgeschlossen markieren + + + + + info_providers.bulk_import.mark_skipped + Als รผbersprungen markieren + + + + + info_providers.bulk_import.mark_pending + Als ausstehend markieren + + + + + info_providers.bulk_import.skip_reason + Grund des รœberspringens + + + + + info_providers.bulk_import.editing_part + Bearbeite Bauteil als Teil des Massenimports + + + + + info_providers.bulk_import.complete + Abgeschlossen + + + + + info_providers.bulk_import.existing_jobs + Existierende Auftrรคge + + + + + info_providers.bulk_import.job_name + Auftragsname + + + + + info_providers.bulk_import.parts_count + Bauteileanzahl + + + + + info_providers.bulk_import.results_count + Ergebnisanzahl + + + + + info_providers.bulk_import.progress_label + Fortschritt: %current%/%total% + + + + + info_providers.bulk_import.manage_jobs + Massenimportauftrรคge verwalten + + + + + info_providers.bulk_import.view_results + Ergebnisse anzeigen + + + + + info_providers.bulk_import.status + Status + + + + + info_providers.bulk_import.manage_jobs_description + Alle Ihre Massenimportauftrรคge anzeigen und verwalten. Um einen neuen Auftrag zu erstellen, wรคhlen Sie Bauteile aus und klicken Sie auf โ€žMassenimport von Informationsanbieternโ€. + + + + + info_providers.bulk_import.no_jobs_found + Es wurden keine Massenimportauftrรคge gefunden. + + + + + info_providers.bulk_import.create_first_job + Erstellen Sie Ihren ersten Massenimportauftrag, indem Sie mehrere Bauteile in einer Bauteiletabelle auswรคhlen und die Option โ€žMassenimport aus Informationsanbieterโ€œ auswรคhlen. + + + + + info_providers.bulk_import.confirm_delete_job + Mรถchten Sie diesen Auftrag wirklich lรถschen? + + + + + info_providers.bulk_import.job_name_template + Massenimport fรผr %count% Teile + + + + + info_providers.bulk_import.step2.instructions.title + So verwenden Sie den Massenimport + + + + + info_providers.bulk_import.step2.instructions.description + Befolgen Sie diese Schritte, um Ihre Teile effizient zu aktualisieren: + + + + + info_providers.bulk_import.step2.instructions.step1 + Klicken Sie auf โ€žTeil aktualisierenโ€œ, um ein Teil aus den Informationsquellen zu aktualisieren. + + + + + info_providers.bulk_import.step2.instructions.step2 + รœberprรผfen und รคndern Sie die Teileinformationen nach Bedarf. Hinweis: Sie mรผssen zweimal auf โ€žSpeichernโ€œ klicken, um die ร„nderungen zu speichern. + + + + + info_providers.bulk_import.step2.instructions.step3 + Klicken Sie auf โ€žAbgeschlossenโ€œ, um den Teil als erledigt zu markieren und zu dieser รœbersicht zurรผckzukehren. + + + + + info_providers.bulk_import.created_by + Erstellt von + + + + + info_providers.bulk_import.completed_at + Abgeschlossen am + + + + + info_providers.bulk_import.action.label + Aktion + + + + + info_providers.bulk_import.action.delete + Lรถschen + + + + + info_providers.bulk_import.status.active + Aktiv + + + + + info_providers.bulk_import.progress.title + Fortschritt + + + + + info_providers.bulk_import.progress.completed_text + %completed%/%total% abgeschlossen + + + + + info_providers.bulk_import.status.stopped + Angehalten + + + + + info_providers.bulk_import.action.stop + Stop + + + + + info_providers.bulk_import.confirm_stop_job + Sind sie sicher, dass sie diesen Auftrag anhalten wollen? + + + + + part.filter.in_bulk_import_job + Im Massenimport-Auftrag + + + + + part.filter.bulk_import_job_status + Status des Massenimportauftrags + + + + + part.filter.bulk_import_part_status + Status des Bauteils im Massenimport + + + + + part.edit.tab.bulk_import + Massenimportauftrag + + + + + bulk_import.status.pending + Ausstehend + + + + + bulk_import.status.in_progress + In Bearbeitung + + + + + bulk_import.status.completed + Abgeschlossen + + + + + bulk_import.status.stopped + Angehalten + + + + + bulk_import.status.failed + Fehlgeschlagen + + + + + bulk_import.part_status.pending + Ausstehend + + + + + bulk_import.part_status.completed + Abgeschlossen + + + + + bulk_import.part_status.skipped + รœbersprungen + + + + + bulk_import.part_status.failed + Fehlgeschlagen + + + + + bulk_info_provider_import_job.label + Massenimport von Informationquellen + + + + + bulk_info_provider_import_job_part.label + Massenimportauftrag Bauteil + + + + + info_providers.bulk_search.priority + Prioritรคt + + + + + info_providers.bulk_search.priority.help + Niedrigere Zahlen = hรถhere Prioritรคt. Gleiche Prioritรคt = Ergebnisse kombinieren. Unterschiedliche Prioritรคten = zuerst die hรถchste versuchen, bei fehlenden Ergebnissen auf die niedrigere zurรผckgreifen. + + + + + info_providers.bulk_import.priority_system.title + Prioritรคtssystem + + + + + info_providers.bulk_import.priority_system.description + Lower numbers = higher priority. Same priority = combine results. Different priorities = try highest first, fallback if no results. + + + + + info_providers.bulk_import.priority_system.example + Beispiel: Prioritรคt 1: โ€žLCSC SPN โ†’ LCSCโ€œ, Prioritรคt 2: โ€žMPN โ†’ LCSC + Mouserโ€œ, Prioritรคt 3: โ€žName โ†’ Alle Anbieterโ€œ + + + + + info_providers.bulk_import.search.submit + Datenquellen + + + + + info_providers.bulk_import.research.title + Bauteile erneut suchen + + + + + info_providers.bulk_import.research.description + Erneute Suche nach Teilen unter Verwendung aktualisierter Informationen (z. B. neue MPNs). Verwendet dieselben Feldzuordnungen wie die ursprรผngliche Suche. + + + + + info_providers.bulk_import.research.all_pending + Alle ausstehenden Teile erneut suchen + + + + + info_providers.bulk_import.research.part + Erneut suchen + + + + + info_providers.bulk_import.research.part_tooltip + Dieses Bauteil mit aktualisierten Informationen erneut suchen + + + + + info_providers.bulk_import.max_mappings_reached + Maximale Anzahl von Zuordnungen erreicht diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 7488bee9..8847802c 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -8949,6 +8949,12 @@ Element 1 -> Element 1.2 Edit part + + + part_list.action.scrollable_hint + Scroll to see all actions + + part_list.action.action.title @@ -9339,6 +9345,72 @@ Element 1 -> Element 1.2 Attachment name + + + filter.bulk_import_job.label + Bulk Import Job + + + + + filter.bulk_import_job.job_status + Job Status + + + + + filter.bulk_import_job.part_status_in_job + Part Status in Job + + + + + filter.bulk_import_job.status.pending + Pending + + + + + filter.bulk_import_job.status.in_progress + In Progress + + + + + filter.bulk_import_job.status.completed + Completed + + + + + filter.bulk_import_job.status.stopped + Stopped + + + + + filter.bulk_import_job.status.failed + Failed + + + + + filter.bulk_import_job.part_status.pending + Pending + + + + + filter.bulk_import_job.part_status.completed + Completed + + + + + filter.bulk_import_job.part_status.skipped + Skipped + + filter.choice_constraint.operator.ANY @@ -10911,6 +10983,12 @@ Element 1 -> Element 1.2 Export to XML + + + part_list.action.export_xlsx + Export to Excel + + parts.import.title @@ -12224,7 +12302,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g info_providers.search.no_results - No results found at the selected providers! Check your search term or try to choose additional providers. + No results found @@ -13512,5 +13590,635 @@ Please note, that you can not impersonate a disabled user. If you try you will g Preview image min width (px) + + + info_providers.bulk_import.step1.title + Bulk Info Provider Import - Step 1 + + + + + info_providers.bulk_import.parts_selected + parts selected + + + + + info_providers.bulk_import.step1.global_mapping_description + Configure field mappings that will be applied to all selected parts. For example: "MPN โ†’ LCSC + Mouser" means search LCSC and Mouser providers using each part's MPN field. + + + + + info_providers.bulk_import.selected_parts + Selected Parts + + + + + info_providers.bulk_import.field_mappings + Field Mappings + + + + + info_providers.bulk_import.field_mappings_help + Define which part fields to search with which info providers. Multiple mappings will be combined. + + + + + info_providers.bulk_import.add_mapping + Add Mapping + + + + + info_providers.bulk_import.search_results.title + Search Results + + + + + info_providers.bulk_import.errors + errors + + + + + info_providers.bulk_import.results_found + %count% results found + + + + + info_providers.bulk_import.source_field + Source Field + + + + + info_providers.bulk_import.view_existing + View Existing + + + + + info_providers.bulk_search.search_field + Search Field + + + + + info_providers.bulk_search.providers + Info Providers + + + + + info_providers.bulk_import.actions.label + Actions + + + + + info_providers.bulk_search.providers.help + Select which info providers to search when parts have this field. + + + + + info_providers.bulk_search.submit + Search All Parts + + + + + info_providers.bulk_search.field.select + Select a field to search by + + + + + info_providers.bulk_search.field.mpn + Manufacturer Part Number (MPN) + + + + + info_providers.bulk_search.field.name + Part Name + + + + + part_list.action.action.info_provider + Info Provider + + + + + part_list.action.bulk_info_provider_import + Bulk Info Provider Import + + + + + info_providers.bulk_import.step1.spn_recommendation + SPN (Supplier Part Number) is recommended for better results. Add a mapping for each supplier to use their SPNs. + + + + + info_providers.bulk_import.update_part + Update Part + + + + + info_providers.bulk_import.prefetch_details + Prefetch Details + + + + + info_providers.bulk_import.prefetch_details_help + Prefetch details for all results. This will take longer, but will speed up workflow for updating parts. + + + + + info_providers.bulk_import.step2.title + Bulk import from info providers + + + + + info_providers.bulk_import.step2.card_title + Bulk import for %count% parts - %date% + + + + + info_providers.bulk_import.parts + parts + + + + + info_providers.bulk_import.results + results + + + + + info_providers.bulk_import.created_at + Created at + + + + + info_providers.bulk_import.status.in_progress + In Progress + + + + + info_providers.bulk_import.status.completed + Completed + + + + + info_providers.bulk_import.status.failed + Failed + + + + + info_providers.bulk_import.table.name + Name + + + + + info_providers.bulk_import.table.description + Description + + + + + info_providers.bulk_import.table.manufacturer + Manufacturer + + + + + info_providers.bulk_import.table.provider + Provider + + + + + info_providers.bulk_import.table.source_field + Source Field + + + + + info_providers.bulk_import.back + Back + + + + + info_providers.bulk_import.progress + Progress: + + + + + info_providers.bulk_import.status.pending + Pending + + + + + info_providers.bulk_import.completed + completed + + + + + info_providers.bulk_import.skipped + skipped + + + + + info_providers.bulk_import.mark_completed + Mark Completed + + + + + info_providers.bulk_import.mark_skipped + Mark Skipped + + + + + info_providers.bulk_import.mark_pending + Mark Pending + + + + + info_providers.bulk_import.skip_reason + Skip reason + + + + + info_providers.bulk_import.editing_part + Editing part as part of bulk import + + + + + info_providers.bulk_import.complete + Complete + + + + + info_providers.bulk_import.existing_jobs + Existing Jobs + + + + + info_providers.bulk_import.job_name + Job Name + + + + + info_providers.bulk_import.parts_count + Parts Count + + + + + info_providers.bulk_import.results_count + Results Count + + + + + info_providers.bulk_import.progress_label + Progress: %current%/%total% + + + + + info_providers.bulk_import.manage_jobs + Manage Bulk Import Jobs + + + + + info_providers.bulk_import.view_results + View Results + + + + + info_providers.bulk_import.status + Status + + + + + info_providers.bulk_import.manage_jobs_description + View and manage all your bulk import jobs. To create a new job, select parts and click "Bulk import from info providers". + + + + + info_providers.bulk_import.no_jobs_found + No bulk import jobs found. + + + + + info_providers.bulk_import.create_first_job + Create your first bulk import job by selecting multiple parts in a part table and select the "Bulk info provider import" option. + + + + + info_providers.bulk_import.confirm_delete_job + Are you sure you want to delete this job? + + + + + info_providers.bulk_import.job_name_template + Bulk import for %count% parts + + + + + info_providers.bulk_import.step2.instructions.title + How to use bulk import + + + + + info_providers.bulk_import.step2.instructions.description + Follow these steps to efficiently update your parts: + + + + + info_providers.bulk_import.step2.instructions.step1 + Click "Update Part" to edit a part with the supplier data + + + + + info_providers.bulk_import.step2.instructions.step2 + Review and modify the part information as needed. Note: You need to click "Save" twice to save the changes. + + + + + info_providers.bulk_import.step2.instructions.step3 + Click "Complete" to mark the part as done and return to this overview + + + + + info_providers.bulk_import.created_by + Created By + + + + + info_providers.bulk_import.completed_at + Completed At + + + + + info_providers.bulk_import.action.label + Action + + + + + info_providers.bulk_import.action.delete + Delete + + + + + info_providers.bulk_import.status.active + Active + + + + + info_providers.bulk_import.progress.title + Progress + + + + + info_providers.bulk_import.progress.completed_text + %completed% / %total% completed + + + + + info_providers.bulk_import.status.stopped + Stopped + + + + + info_providers.bulk_import.action.stop + Stop + + + + + info_providers.bulk_import.confirm_stop_job + Are you sure you want to stop this job? + + + + + part.filter.in_bulk_import_job + In Bulk Import Job + + + + + part.filter.bulk_import_job_status + Bulk Import Job Status + + + + + part.filter.bulk_import_part_status + Bulk Import Part Status + + + + + part.edit.tab.bulk_import + Bulk Import Job + + + + + bulk_import.status.pending + Pending + + + + + bulk_import.status.in_progress + In Progress + + + + + bulk_import.status.completed + Completed + + + + + bulk_import.status.stopped + Stopped + + + + + bulk_import.status.failed + Failed + + + + + bulk_import.part_status.pending + Pending + + + + + bulk_import.part_status.completed + Completed + + + + + bulk_import.part_status.skipped + Skipped + + + + + bulk_import.part_status.failed + Failed + + + + + bulk_info_provider_import_job.label + Bulk info provider import + + + + + bulk_info_provider_import_job_part.label + Bulk Import Job Part + + + + + info_providers.bulk_search.priority + Priority + + + + + info_providers.bulk_search.priority.help + Lower numbers = higher priority. Same priority = combine results. Different priorities = try highest first, fallback if no results. + + + + + info_providers.bulk_import.priority_system.title + Priority System + + + + + info_providers.bulk_import.priority_system.description + Lower numbers = higher priority. Same priority = combine results. Different priorities = try highest first, fallback if no results. + + + + + info_providers.bulk_import.priority_system.example + Example: Priority 1: "LCSC SPN โ†’ LCSC", Priority 2: "MPN โ†’ LCSC + Mouser", Priority 3: "Name โ†’ All providers" + + + + + info_providers.bulk_import.search.submit + Search Providers + + + + + info_providers.bulk_import.research.title + Research Parts + + + + + info_providers.bulk_import.research.description + Re-search for parts using updated information (e.g., new MPNs). Uses the same field mappings as the original search. + + + + + info_providers.bulk_import.research.all_pending + Research All Pending Parts + + + + + info_providers.bulk_import.research.part + Research + + + + + info_providers.bulk_import.research.part_tooltip + Research this part with updated information + + + + + info_providers.bulk_import.max_mappings_reached + Maximum number of mappings reached + + diff --git a/translations/security.de.xlf b/translations/security.de.xlf index a0498be8..4f905fd1 100644 --- a/translations/security.de.xlf +++ b/translations/security.de.xlf @@ -16,7 +16,7 @@ saml.error.cannot_login_saml_user_locally - Sie kรถnnen sich nicht mittels lokaler Authentifizierung als SAML Benutzer einloggen! Benutzen Sie stattdessen den SSO login. + Sie kรถnnen sich nicht mittels lokaler Authentifizierung als SAML-Benutzer einloggen! Benutzen Sie stattdessen den SSO Login. diff --git a/translations/validators.de.xlf b/translations/validators.de.xlf index 9c123fd8..5cccd388 100644 --- a/translations/validators.de.xlf +++ b/translations/validators.de.xlf @@ -362,7 +362,7 @@ validator.google_code.wrong_code - Ungรผltiger Code. รœberprรผfen Sie, dass die Authenticator App korrekt eingerichtet ist und dass der Server und das Gerรคt beide die korrekte Uhrzeit eingestellt haben. + Ungรผltiger Code. รœberprรผfen Sie, ob die Authenticator App korrekt eingerichtet ist und ob der Server und das Gerรคt beide die korrekte Uhrzeit eingestellt haben. diff --git a/translations/validators.nl.xlf b/translations/validators.nl.xlf new file mode 100644 index 00000000..91b5e26f --- /dev/null +++ b/translations/validators.nl.xlf @@ -0,0 +1,369 @@ + + + + + + Part-DB1\src\Entity\Attachments\AttachmentContainingDBElement.php:0 + Part-DB1\src\Entity\Attachments\AttachmentType.php:0 + Part-DB1\src\Entity\Base\AbstractCompany.php:0 + Part-DB1\src\Entity\Base\AbstractPartsContainingDBElement.php:0 + Part-DB1\src\Entity\Base\AbstractStructuralDBElement.php:0 + Part-DB1\src\Entity\Devices\Device.php:0 + Part-DB1\src\Entity\LabelSystem\LabelProfile.php:0 + Part-DB1\src\Entity\Parts\Category.php:0 + Part-DB1\src\Entity\Parts\Footprint.php:0 + Part-DB1\src\Entity\Parts\Manufacturer.php:0 + Part-DB1\src\Entity\Parts\MeasurementUnit.php:0 + Part-DB1\src\Entity\Parts\Part.php:0 + Part-DB1\src\Entity\Parts\Part.php:0 + Part-DB1\src\Entity\Parts\Storelocation.php:0 + Part-DB1\src\Entity\Parts\Supplier.php:0 + Part-DB1\src\Entity\PriceInformations\Currency.php:0 + Part-DB1\src\Entity\UserSystem\Group.php:0 + Part-DB1\src\Entity\UserSystem\User.php:0 + Part-DB1\src\Entity\Attachments\AttachmentType.php:0 + Part-DB1\src\Entity\Base\AbstractCompany.php:0 + Part-DB1\src\Entity\Base\AbstractPartsContainingDBElement.php:0 + Part-DB1\src\Entity\Base\AbstractStructuralDBElement.php:0 + Part-DB1\src\Entity\Devices\Device.php:0 + Part-DB1\src\Entity\Parts\Category.php:0 + Part-DB1\src\Entity\Parts\Footprint.php:0 + Part-DB1\src\Entity\Parts\Manufacturer.php:0 + Part-DB1\src\Entity\Parts\MeasurementUnit.php:0 + Part-DB1\src\Entity\Parts\Part.php:0 + Part-DB1\src\Entity\Parts\Storelocation.php:0 + Part-DB1\src\Entity\Parts\Supplier.php:0 + Part-DB1\src\Entity\PriceInformations\Currency.php:0 + Part-DB1\src\Entity\UserSystem\Group.php:0 + Part-DB1\src\Entity\UserSystem\User.php:0 + + + part.master_attachment.must_be_picture + De voorbeeldbijlage moet een geldige afbeelding zijn! + + + + + Part-DB1\src\Entity\Attachments\AttachmentType.php:0 + Part-DB1\src\Entity\Base\AbstractCompany.php:0 + Part-DB1\src\Entity\Base\AbstractPartsContainingDBElement.php:0 + Part-DB1\src\Entity\Base\AbstractStructuralDBElement.php:0 + Part-DB1\src\Entity\Devices\Device.php:0 + Part-DB1\src\Entity\Parts\Category.php:0 + Part-DB1\src\Entity\Parts\Footprint.php:0 + Part-DB1\src\Entity\Parts\Manufacturer.php:0 + Part-DB1\src\Entity\Parts\MeasurementUnit.php:0 + Part-DB1\src\Entity\Parts\Storelocation.php:0 + Part-DB1\src\Entity\Parts\Supplier.php:0 + Part-DB1\src\Entity\PriceInformations\Currency.php:0 + Part-DB1\src\Entity\UserSystem\Group.php:0 + Part-DB1\src\Entity\Attachments\AttachmentType.php:0 + Part-DB1\src\Entity\Base\AbstractCompany.php:0 + Part-DB1\src\Entity\Base\AbstractPartsContainingDBElement.php:0 + Part-DB1\src\Entity\Base\AbstractStructuralDBElement.php:0 + Part-DB1\src\Entity\Devices\Device.php:0 + Part-DB1\src\Entity\Parts\Category.php:0 + Part-DB1\src\Entity\Parts\Footprint.php:0 + Part-DB1\src\Entity\Parts\Manufacturer.php:0 + Part-DB1\src\Entity\Parts\MeasurementUnit.php:0 + Part-DB1\src\Entity\Parts\Storelocation.php:0 + Part-DB1\src\Entity\Parts\Supplier.php:0 + Part-DB1\src\Entity\PriceInformations\Currency.php:0 + Part-DB1\src\Entity\UserSystem\Group.php:0 + src\Entity\AttachmentType.php:0 + src\Entity\Category.php:0 + src\Entity\Company.php:0 + src\Entity\Device.php:0 + src\Entity\Footprint.php:0 + src\Entity\Group.php:0 + src\Entity\Manufacturer.php:0 + src\Entity\PartsContainingDBElement.php:0 + src\Entity\Storelocation.php:0 + src\Entity\StructuralDBElement.php:0 + src\Entity\Supplier.php:0 + + + structural.entity.unique_name + Een element met deze naam bestaat al op dit niveau! + + + + + Part-DB1\src\Entity\Parameters\AbstractParameter.php:0 + Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0 + Part-DB1\src\Entity\Parameters\CategoryParameter.php:0 + Part-DB1\src\Entity\Parameters\CurrencyParameter.php:0 + Part-DB1\src\Entity\Parameters\DeviceParameter.php:0 + Part-DB1\src\Entity\Parameters\FootprintParameter.php:0 + Part-DB1\src\Entity\Parameters\GroupParameter.php:0 + Part-DB1\src\Entity\Parameters\ManufacturerParameter.php:0 + Part-DB1\src\Entity\Parameters\MeasurementUnitParameter.php:0 + Part-DB1\src\Entity\Parameters\PartParameter.php:0 + Part-DB1\src\Entity\Parameters\StorelocationParameter.php:0 + Part-DB1\src\Entity\Parameters\SupplierParameter.php:0 + + + parameters.validator.min_lesser_typical + Waarde moet minder dan of gelijk zijn aan de typische waarde ({{ compared_value }}). + + + + + Part-DB1\src\Entity\Parameters\AbstractParameter.php:0 + Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0 + Part-DB1\src\Entity\Parameters\CategoryParameter.php:0 + Part-DB1\src\Entity\Parameters\CurrencyParameter.php:0 + Part-DB1\src\Entity\Parameters\DeviceParameter.php:0 + Part-DB1\src\Entity\Parameters\FootprintParameter.php:0 + Part-DB1\src\Entity\Parameters\GroupParameter.php:0 + Part-DB1\src\Entity\Parameters\ManufacturerParameter.php:0 + Part-DB1\src\Entity\Parameters\MeasurementUnitParameter.php:0 + Part-DB1\src\Entity\Parameters\PartParameter.php:0 + Part-DB1\src\Entity\Parameters\StorelocationParameter.php:0 + Part-DB1\src\Entity\Parameters\SupplierParameter.php:0 + + + parameters.validator.min_lesser_max + Waarde moet minder zijn dan de maximale waarde ({{ compared_value }}). + + + + + Part-DB1\src\Entity\Parameters\AbstractParameter.php:0 + Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0 + Part-DB1\src\Entity\Parameters\CategoryParameter.php:0 + Part-DB1\src\Entity\Parameters\CurrencyParameter.php:0 + Part-DB1\src\Entity\Parameters\DeviceParameter.php:0 + Part-DB1\src\Entity\Parameters\FootprintParameter.php:0 + Part-DB1\src\Entity\Parameters\GroupParameter.php:0 + Part-DB1\src\Entity\Parameters\ManufacturerParameter.php:0 + Part-DB1\src\Entity\Parameters\MeasurementUnitParameter.php:0 + Part-DB1\src\Entity\Parameters\PartParameter.php:0 + Part-DB1\src\Entity\Parameters\StorelocationParameter.php:0 + Part-DB1\src\Entity\Parameters\SupplierParameter.php:0 + + + parameters.validator.max_greater_typical + Waarde moet groter of gelijk zijn aan de typische waarde ({{ compared_value }}). + + + + + Part-DB1\src\Entity\UserSystem\User.php:0 + Part-DB1\src\Entity\UserSystem\User.php:0 + + + validator.user.username_already_used + Een gebruiker met deze naam bestaat al + + + + + Part-DB1\src\Entity\UserSystem\User.php:0 + Part-DB1\src\Entity\UserSystem\User.php:0 + + + user.invalid_username + De gebruikersnaam mag alleen letters, nummers, underscores, puntjes, plusjes of minnen bevatten en mag niet beginnen met een @! + + + + + obsolete + + + validator.noneofitschild.self + Een element kan niet zijn eigen bovenliggende element zijn. + + + + + obsolete + + + validator.noneofitschild.children + Dit element kan geen onderliggend element van zichzelf zijn. + + + + + validator.select_valid_category + Selecteer een geldigde categorie! + + + + + validator.part_lot.only_existing + De opslaglocatie is gemarkeerd als "alleen bestaande onderdelen", er kunnen dus geen nieuwe onderdelen worden toegevoegd. + + + + + validator.part_lot.location_full.no_increase + De gebruikte opslaglocatie is vol gemarkeerd, daarom kan de voorraad niet worden vergroot. (Nieuwe voorraad maximaal {{ old_amount }}) + + + + + validator.part_lot.location_full + De opslaglocatie is vol, er kunnen dus geen nieuwe onderdelen toegevoegd worden. + + + + + validator.part_lot.single_part + De opslaglocatie is gemarkeerd als "slechts รฉรฉn component", er kan dus geen nieuw component worden toegevoegd. + + + + + validator.attachment.must_not_be_null + U moet een soort bijlage selecteren! + + + + + validator.orderdetail.supplier_must_not_be_null + U moet een leverancier selecteren! + + + + + validator.measurement_unit.use_si_prefix_needs_unit + Om SI-voorvoegsels in te schakelen, moet u een eenheidssymbool instellen! + + + + + part.ipn.must_be_unique + Het interne onderdeelnummer moet uniek zijn. {{ value }} is al in gebruik! + + + + + validator.project.bom_entry.name_or_part_needed + U moet een onderdeel kiezen voor een stuklijstvermelding of een naam instellen voor een stuklijstvermelding die geen onderdeel is. + + + + + project.bom_entry.name_already_in_bom + Er is al een stuklijstvermelding met deze naam! + + + + + project.bom_entry.part_already_in_bom + Dit onderdeel bestaat al in de stuklijst! + + + + + project.bom_entry.mountnames_quantity_mismatch + Het aantal bevestigingen moet overeenkomen met het aantal uit de stukslijst + + + + + project.bom_entry.can_not_add_own_builds_part + Kan de onderdelen van een project niet aan zijn eigen BOM toevoegen. + + + + + project.bom_has_to_include_all_subelement_parts + De BOM moet alle onderdelen van het subproject bevatten. Onderdeel %part_name% van project %project_name% ontbreekt! + + + + + project.bom_entry.price_not_allowed_on_parts + Prijzen zijn niet toegestaan op een BOM die aan een onderdeel zijn gekoppeld. Definieer in plaats daarvan de prijs op het onderdeel. + + + + + validator.project_build.lot_bigger_than_needed + Je hebt meer hoeveelheden geselecteerd om op te nemen dan nodig is! Verwijder onnodige hoeveelheid. + + + + + validator.project_build.lot_smaller_than_needed + Je hebt minder hoeveelheid geselecteerd om op te nemen dan nodig is voor de build! Voeg een extra hoeveelheid toe. + + + + + part.name.must_match_category_regex + De naam van het onderdeel komt niet overeen met de reguliere expressie die wordt vermeld door de categorie: %regex% + + + + + validator.attachment.name_not_blank + Stel hier een waarde in of upload een bestand om automatisch de bestandsnaam als naam voor de bijlage te gebruiken. + + + + + validator.part_lot.owner_must_match_storage_location_owner + De eigenaar van deze locatie moet overeenkomen met de eigenaar van de geselecteerde opslaglocatie (%owner_name%)! + + + + + validator.part_lot.owner_must_not_be_anonymous + De eigenaar van een locatie mag niet de anonieme gebruiker zijn! + + + + + validator.part_association.must_set_an_value_if_type_is_other + Als je het type instelt op "overig", dan moet je er een beschrijvende waarde voor instellen! + + + + + validator.part_association.part_cannot_be_associated_with_itself + Een onderdeel kan niet geassocieerd zijn met zichzelf! + + + + + validator.part_association.already_exists + De associatie met dit onderdeel bestaat al! + + + + + validator.part_lot.vendor_barcode_must_be_unique + De waarde van deze leveranciersbarcode is al in een andere partij gebruikt. De barcode moet uniek zijn! + + + + + validator.year_2038_bug_on_32bit + Vanwege technische beperkingen is het niet mogelijk om datums na 2038-01-19 te selecteren op 32-bits systemen! + + + + + validator.fileSize.invalidFormat + Ongeldig bestandsformaat. Gebruiker een geheel getal plus K, M of G als toevoeging voor Kilo, Mega of Gigabytes. + + + + + validator.invalid_range + De opgegeven reeks is niet geldig! + + + + + validator.google_code.wrong_code + Ongeldige code. Controleer of je authenticator-app correct is ingesteld en of zowel de server als het authenticatieapparaat de tijd correct hebben ingesteld. + + + + diff --git a/yarn.lock b/yarn.lock index 3289c949..ece08bb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,58 +2,58 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.19.3": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.19.3.tgz#f480d638d2b4218f8161f313186db7a5aac99c90" - integrity sha512-45CVTxtd3PwVux5G3WLUA3So5tRKRXu+amupW0dg3KTaTeydt+KzvH1mrZhs3hUne7VQ+g8+ZRGWHbuL/Rb5mw== +"@algolia/autocomplete-core@1.19.4": + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.19.4.tgz#db9e4ef88cd8f2ce5b25e376373a8898dcbe2945" + integrity sha512-yVwXLrfwQ3dAndY12j1pfa0oyC5hTDv+/dgwvVHj57dY3zN6PbAmcHdV5DOOdGJrCMXff+fsPr8G2Ik8zWOPTw== dependencies: - "@algolia/autocomplete-plugin-algolia-insights" "1.19.3" - "@algolia/autocomplete-shared" "1.19.3" + "@algolia/autocomplete-plugin-algolia-insights" "1.19.4" + "@algolia/autocomplete-shared" "1.19.4" -"@algolia/autocomplete-js@1.19.3", "@algolia/autocomplete-js@^1.17.0": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-js/-/autocomplete-js-1.19.3.tgz#a3f733ac654201beb18c29e83b61653e5037c04c" - integrity sha512-uJPElcGy1jqi8WAzTBgX4xufu+cRYSaDfAZW3ed4AVTOu8oDwUkMgrKgpKxp5u8d6BhugSm47vGkYoj87jZQ/Q== +"@algolia/autocomplete-js@1.19.4", "@algolia/autocomplete-js@^1.17.0": + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-js/-/autocomplete-js-1.19.4.tgz#235e554d4e46567d7305d8c216b75dd2a0091655" + integrity sha512-ZkwsuTTIEuw+hbsIooMrNLvTVulUSSKqJT3ZeYYd//kA5fHaFf2/T0BDmd9qSGxZRhT5WS8AJYjFARLmj5x08g== dependencies: - "@algolia/autocomplete-core" "1.19.3" - "@algolia/autocomplete-preset-algolia" "1.19.3" - "@algolia/autocomplete-shared" "1.19.3" + "@algolia/autocomplete-core" "1.19.4" + "@algolia/autocomplete-preset-algolia" "1.19.4" + "@algolia/autocomplete-shared" "1.19.4" htm "^3.1.1" preact "^10.13.2" -"@algolia/autocomplete-plugin-algolia-insights@1.19.3": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.3.tgz#04e6e8150cd0964f7521acbb1eb1a3d650e9f60d" - integrity sha512-Oy6t0Ws99xWKCzrp7pFWncLqFA3MoBAv1DDbDrn2XN9NBE9GviXw2hZsBi6CFReR/9wK72xq4vT96LBshOxhaQ== +"@algolia/autocomplete-plugin-algolia-insights@1.19.4": + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.4.tgz#be14ba50677ea308d43e4f9e96f4542c3da51432" + integrity sha512-K6TQhTKxx0Es1ZbjlAQjgm/QLDOtKvw23MX0xmpvO7AwkmlmaEXo2PwHdVSs3Bquv28CkO2BYKks7jVSIdcXUg== dependencies: - "@algolia/autocomplete-shared" "1.19.3" + "@algolia/autocomplete-shared" "1.19.4" "@algolia/autocomplete-plugin-recent-searches@^1.17.0": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-recent-searches/-/autocomplete-plugin-recent-searches-1.19.3.tgz#f6a98362dc7d7fcf080b17202dd8b6207fe447d2" - integrity sha512-RfY6TyolCa2gV655EKsz5sMp7E19C59ENJ3LBe5lRyq3o6sO5jNAMMyEBAp7y8M7uGRdepa6Y7Tch1zSLlCEEw== + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-recent-searches/-/autocomplete-plugin-recent-searches-1.19.4.tgz#f3a013438f915aac8258481a6504a18bad432c8f" + integrity sha512-8LLAedqcvztFweNWFQuqz9lWIiVlPi+wLF+3qWLPWQZQY3E4bVsbnxVfL9z4AMX9G0lljd2dQitn+Vwkl96d7Q== dependencies: - "@algolia/autocomplete-core" "1.19.3" - "@algolia/autocomplete-js" "1.19.3" - "@algolia/autocomplete-preset-algolia" "1.19.3" - "@algolia/autocomplete-shared" "1.19.3" + "@algolia/autocomplete-core" "1.19.4" + "@algolia/autocomplete-js" "1.19.4" + "@algolia/autocomplete-preset-algolia" "1.19.4" + "@algolia/autocomplete-shared" "1.19.4" -"@algolia/autocomplete-preset-algolia@1.19.3": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.19.3.tgz#027fd0937bc22b72c3eecf56053ab55f79e4b423" - integrity sha512-NIvRLWFnX5MclQVyRKPwNDxjNg214qXCTZ/jLLVXw17VmPsEYfgeSYEMWEGFapA8KKKMz+Kwb+nBOc4je6DXfg== +"@algolia/autocomplete-preset-algolia@1.19.4": + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.19.4.tgz#258c65112d73376c5c395d1ce67cd668deb06572" + integrity sha512-WhX4mYosy7yBDjkB6c/ag+WKICjvV2fqQv/+NWJlpvnk2JtMaZByi73F6svpQX945J+/PxpQe8YIRBZHuYsLAQ== dependencies: - "@algolia/autocomplete-shared" "1.19.3" + "@algolia/autocomplete-shared" "1.19.4" -"@algolia/autocomplete-shared@1.19.3": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.3.tgz#9bd9dfd80fa3e320461682e917f0f94404f60eba" - integrity sha512-zzpqoVm/I4eRFT5Mcempwa5SVKox83eVIsZyLAYQdV+7tmtEYayx225Kl7nwhGrJ7NCozE9YWMwuFFN2g5dSBg== +"@algolia/autocomplete-shared@1.19.4": + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.4.tgz#fd0b92e2723e70c97df4fa7ba0a170c500289918" + integrity sha512-V7tYDgRXP0AqL4alwZBWNm1HPWjJvEU94Nr7Qa2cuPcIAbsTAj7M/F/+Pv/iwOWXl3N7tzVzNkOWm7sX6JT1SQ== "@algolia/autocomplete-theme-classic@^1.17.0": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-theme-classic/-/autocomplete-theme-classic-1.19.3.tgz#b4442911e3dc38bfb40c25f56b71f099a321f9c7" - integrity sha512-f0s9AxiqWTrv+etLcVXqzBTX5QbnR6JXJPmWu5mgkch7VY4AIqIuNB8ToDkSl1Hp9prkKir7/J9xEf7BDePHww== + version "1.19.4" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-theme-classic/-/autocomplete-theme-classic-1.19.4.tgz#7a0802e7c64dcc3584d5085e23a290a64ade4319" + integrity sha512-/qE8BETNFbul4WrrUyBYgaaKcgFPk0Px9FDKADnr3HlIkXquRpcFHTxXK16jdwXb33yrcXaAVSQZRfUUSSnxVA== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.27.1": version "7.27.1" @@ -837,159 +837,159 @@ "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" -"@ckeditor/ckeditor5-adapter-ckfinder@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-adapter-ckfinder/-/ckeditor5-adapter-ckfinder-46.0.3.tgz#f19f9fa1a0a33aa2fa502f0f7c779c027f4f78bd" - integrity sha512-xebONgXYuF8Fuhr6C+lpwRSfpChSrJKTy5S0i7vuBY+EeuXLRED7AuCOvPwV9oed1/CqbzDWWH1IefgkLwZwvQ== +"@ckeditor/ckeditor5-adapter-ckfinder@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-adapter-ckfinder/-/ckeditor5-adapter-ckfinder-46.1.1.tgz#50913faace91e937777ecd34b040407329710d54" + integrity sha512-7wq9WdYyq0jabUZOlnq/vOa/WQO6jXKQ01QCsx6Y7WZ00mxOQ0AmwzLEusHf9VEvXx25yH7jZa07axyEvjM+RQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-upload" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-upload" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-alignment@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-46.0.3.tgz#34cb75002fefc79dbffc94b08c0a0a34e722adb5" - integrity sha512-P0qegTFO9u5gbR7Ig/JI0vGdWFtxzM08KPCbeYTpQtdI9+DrKdvWFo0LVB7LJjR6OKuUPCtnulGgCyhuzNT7lw== +"@ckeditor/ckeditor5-alignment@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-46.1.1.tgz#2649ec2ae0c3e181e243afd5e0976f91bfa7c995" + integrity sha512-LD9XMo0lqZw8Nm4Rdsd3b19rjVNLInAUrlbuJpXxgHTOP3CcrE1+kklosow3KreUZkWSxui0tszp45jRmGL1qQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-autoformat@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autoformat/-/ckeditor5-autoformat-46.0.3.tgz#ac2390550211aa71b7065559d4d9c135e3296ad0" - integrity sha512-E3bjlf8HbTD9FiGHPQyrbRXniA7W06CecmlKXwHDisGC8lLLF8ZpuRX4oGAH5QLpSVFyGuj0C1GJtVY0+PEjOw== +"@ckeditor/ckeditor5-autoformat@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autoformat/-/ckeditor5-autoformat-46.1.1.tgz#4b71ea778d31562f48aaf9a1aeb0e0810d62feff" + integrity sha512-D2gC9NMd73BAszrP7GdwEqv5YAb+k/EMSIzlcyeUn8gYslGE+SrZHcgj4VCWaGWS+iu/G80ZskiXMBbNgC4NAw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-heading" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-heading" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-autosave@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autosave/-/ckeditor5-autosave-46.0.3.tgz#d26d0157ebf4005fac8f802de16ce65188e64c92" - integrity sha512-SStt6opEniy0i5N5QMsAttpxhPvlmQ5UgmfvVmkyBnvOGwFwSmIFjxAXdTsAhvKdDaKrsjeCpv/j6L6llYk7dw== +"@ckeditor/ckeditor5-autosave@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autosave/-/ckeditor5-autosave-46.1.1.tgz#39ea7b4840427c59086b91a4f351188729ef303f" + integrity sha512-VJ2U0P0ybuIF92fU1rSL9jkqOnywKek7ANR+B9Gc3vs3JdNEkN078pF5KS9xvnAkcrEt1KZBmqwghSDiiI91Wg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-basic-styles@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-46.0.3.tgz#563cb4ef19ecfd763745cb0bd79940fd03b7a81c" - integrity sha512-THmEPEbYopSfq8NTAugPLk+QW8/vuRkJfg/NpESzeugqCkBG2to3thOHdetbpye4IJBokLFhLsGFfKVYfVF81A== +"@ckeditor/ckeditor5-basic-styles@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-46.1.1.tgz#6ed72424ed78dee494c3aa6e0ac97cb03a7303fc" + integrity sha512-NiCugPGmaCIHc4ivvJRUq/hcfchaChksWyRK6i5xbjj5NSlASjXt0fe4717pQVTN6lZxiJ9CaX6btCAYlmu5BQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-block-quote@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-46.0.3.tgz#79a783d36ad4f9163cc31fb608ac6213c040a145" - integrity sha512-8bI7GoxOPrIExt/32gxLDQJB5VdSp3Oi6fqA+GH0Lqj+ri8HKfl3S147GymTUfBh01IOymQNL7xX04Dq1Nbl6A== +"@ckeditor/ckeditor5-block-quote@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-46.1.1.tgz#14d2aa5b1fc6429addeb2a2099e6664cd779ea09" + integrity sha512-m9MhmntW8cZBfhqluaDE4sJaMjks36ClxzxQwuz7Br+YhUXNhhtUrvpFggeZvgZ/IuII+OG6DolnD1WRHJlMEg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-bookmark@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-bookmark/-/ckeditor5-bookmark-46.0.3.tgz#f597408d87746105ba5d7a80ce8a7f4fa32a7cb6" - integrity sha512-f1usHplw2Ndhm1AiyjWfOWoaSQehMqBaXTa94OXlvO6ci1RIijdFm+DKn4Lgh/vSjv4vo25eQReTmEM0KaysvA== +"@ckeditor/ckeditor5-bookmark@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-bookmark/-/ckeditor5-bookmark-46.1.1.tgz#ec8279de8b35b5582ed2a9f508acd6fd4a486eed" + integrity sha512-TiCO6F9uHiHOuGGfR+t7a5i93bJqPEoBpX67qQYV7EkhNIa7roa0PTkPXw6RFBGFv6LNgt0cNle/f7O94qhfcQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-link" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-link" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-ckbox@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ckbox/-/ckeditor5-ckbox-46.0.3.tgz#e0999969662c56bc768ac0ee7a4b09a3f6fefb82" - integrity sha512-UnmCqOU/iyYDef/OVsWbixeXwo+0pb3YGNWgmd2YsCFUUerbpOkDwwGuvCZPE7Hs34lNz8ybbhjR9KmGu8WcAw== +"@ckeditor/ckeditor5-ckbox@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ckbox/-/ckeditor5-ckbox-46.1.1.tgz#514b664070d0a28deacbaea98dc7616d4dad4654" + integrity sha512-ngKJf1doQFp0FExF7skmtzHcD1H6cxkFFWH5ipRm8t5AcxivZIkbaMlNQMZTGKhMKtLmT77dQ7oGI4HT1XV4bA== dependencies: - "@ckeditor/ckeditor5-cloud-services" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-image" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-upload" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-cloud-services" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-image" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-upload" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" blurhash "2.0.5" - ckeditor5 "46.0.3" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-ckfinder@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ckfinder/-/ckeditor5-ckfinder-46.0.3.tgz#f7a0c234be03f71229461668dc8a659f608ecdca" - integrity sha512-VXggqo2w0TgFPyu6z+uH3aTWQMhbq2F2iPUi8SreYCL0JclczbU4HDKqzQU+RKhrzp+yhK1n7ztX5aN1H9EVAw== +"@ckeditor/ckeditor5-ckfinder@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ckfinder/-/ckeditor5-ckfinder-46.1.1.tgz#c983bebdb352dea77e1ec438ae5ebd78403f2488" + integrity sha512-u096IDCS/9R7DhUUgHhP7ED5pjIP5JPE1SMRZ3UcfipVUveqT9Qqgm892Rsm4VfouoXw3f3pwoK68KIVjdxMlw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-image" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-image" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-clipboard@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-46.0.3.tgz#5a42799228875a8112c98fc61ad1ca050f42fca0" - integrity sha512-ECz2goSbYZSlhRT2HszIPCMWFfThA0uIuXpI5PjYj7rDJUoip/Y3/UZjyMo47IUFf66Y4VdvJoq0fv/Z86HYIg== +"@ckeditor/ckeditor5-clipboard@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-46.1.1.tgz#db80d0e747595ac3f91d3573b04c609bb3d2b8dc" + integrity sha512-YaFYBPdOIBqkYY1e7RYzZlicldmkM251WoWVAjbSwY7EWQY/tmLrnVmBZ31B/TqwvSBy6txQYBtuRZvozQ3F0w== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-cloud-services@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-cloud-services/-/ckeditor5-cloud-services-46.0.3.tgz#7c02822ed77a1b4d3e80c0f70b4b250c5e946945" - integrity sha512-eKmtcygKoAoba6LGKdsFQyU50yZeeFgD9k05HYnN4BZCqZjrmlTbo3mQrTREgM/w2yxQ4AkDVj162S9NOyibWA== +"@ckeditor/ckeditor5-cloud-services@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-cloud-services/-/ckeditor5-cloud-services-46.1.1.tgz#c8f56a81ad4bb00f8b88ca5c5af37fe0ccd9d3ea" + integrity sha512-YBBklzman8taer22uehNxeehDKaGbwnAaI8h7JIxaf0EpvaldjDnswg1hvJTHpLYDZiiEoI3pHmtdatuNWMlrg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-code-block@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-46.0.3.tgz#a8595063ce34da2a2095e89cf79be8b0532de056" - integrity sha512-5Bny1t2jb+Fruy4Tf0Es6YGPe24eWUiCskTv7QZkebEUtectUhZXjrbAPXkn9GQH9E+jU/ywhYkkCKwDgg+Vnw== +"@ckeditor/ckeditor5-code-block@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-46.1.1.tgz#9faceacdcb4256554ca9f3fc819263a30ed5b34d" + integrity sha512-YG1YOKHV/zHsSS/CcQJUx/Y8virChUG7JB7HbS3WgkFccvMEZLusx5GkeKXQHRZp0yUxbcAKO+woeVIwylrbCw== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-core@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-46.0.3.tgz#e9d294b517f646d6efdccecc8b3dc030feac7641" - integrity sha512-J03+XnTDL+Ex43ttT4fBxfJGRQxDor0zJc3TxlX44g0q7xD1l7T2CIkorry+817e3By3Qe3DfiMSleHKuDnmvQ== +"@ckeditor/ckeditor5-core@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-46.1.1.tgz#ddd0d29cb42034b8987044cd811abc4a343fff81" + integrity sha512-J1WsQxxnbzgbG+xz669+bzfJ+jRbaMdYsdxZZAHlGjaKaOOMXMVrmsAesxy9OoV2LEuMed3BMu7BnICKIoD/aw== dependencies: - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-watchdog" "46.0.3" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-watchdog" "46.1.1" es-toolkit "1.39.5" "@ckeditor/ckeditor5-dev-translations@^43.0.1", "@ckeditor/ckeditor5-dev-translations@^43.1.0": @@ -1033,316 +1033,316 @@ terser-webpack-plugin "^4.2.3" through2 "^3.0.1" -"@ckeditor/ckeditor5-easy-image@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-easy-image/-/ckeditor5-easy-image-46.0.3.tgz#fbf72ea4524ded6b5aceacc41fa6f5e08672f7f3" - integrity sha512-UZs1G2wZaUr4lJSUsECBpM5ntr0UIXhGYG6lhE4Lf1TBaOypzxusR0H3txNtWIX1rq6hCeFH1P7meijfvJRgbw== +"@ckeditor/ckeditor5-easy-image@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-easy-image/-/ckeditor5-easy-image-46.1.1.tgz#fe4f3e827de906e7854a50bdb4a17dfd2cd26a91" + integrity sha512-1UbSdmRuGoYhtAlYUeZlttLBblfYJbmIXE5iGVgi+2rGLEHucqQ0zBh84di+TCdqbjkp/S+T6G4sopQMM3xmbA== dependencies: - "@ckeditor/ckeditor5-cloud-services" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-upload" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-cloud-services" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-upload" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-editor-balloon@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-balloon/-/ckeditor5-editor-balloon-46.0.3.tgz#35382c0393babc1a5f3ec8acd9a0f68ebb56a291" - integrity sha512-NXqmQK45DybJmgWFUln2uTvWqg77BuTp/R/4F33K6fgA4QGmnlWZ+l96Z5Rpmq6Rxc7suBNIKKWRFihquHw1hw== +"@ckeditor/ckeditor5-editor-balloon@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-balloon/-/ckeditor5-editor-balloon-46.1.1.tgz#8c6f5255643feb0bb0f6da6ae232f34fc1634a54" + integrity sha512-RGqrEWy50j8TbQeE8dNg+EIuuX5lef2fciiUO7wNyKQO5HahQS5BVbVy8+Uo24p/VHishp2Dzf4tqX6ZtnzRdA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-editor-classic@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-46.0.3.tgz#f872b541014dc24b3a3ff62331a785348ea3ae40" - integrity sha512-fw4pdBqT1UpVYkBBpACQn9w5iR2Y62AvGW7ANt6b1nv55+FIN0uEAHsuChvZdFra8iJQR1qyilT24LVOTtk5mg== +"@ckeditor/ckeditor5-editor-classic@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-46.1.1.tgz#1a963ad5804defb925e49c3db6e25a1e4b5638fc" + integrity sha512-5WrFP+YUTwjQN/0f1TfzDNqgd0tK50Gw1YNPXav1AQHYnQUaFUxJEZgesV2Z3w77LIYVguoOlCEMk2yDhA+7aw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-editor-decoupled@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-46.0.3.tgz#dae17ccb2d3fc3461fbe174b45590f9cde8748be" - integrity sha512-svrTpgGCi9YLhzit97i+A+lVStnQ4fNbGj6O1HlRG676BA20zqUkUWbNDPlBQT5sbq4N2oLKPwBmAqtUsF9ivQ== +"@ckeditor/ckeditor5-editor-decoupled@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-46.1.1.tgz#8698c09891097e8b24d69062db4f74ef3c35190a" + integrity sha512-ony/8uvWj7zFCPQ9GdsntT247WQShcNdNsG+M7bmaVNh8VjMyUMPY8vGL42eqR72I95vzhcnO19yqqqoa4bT/A== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-editor-inline@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-inline/-/ckeditor5-editor-inline-46.0.3.tgz#31342902ec3ad3185cfaf8097d55f1086f8f63a6" - integrity sha512-VfsD95gALQrUMHRJ5f2KKIPgtRb5flAqug85GSWy+wJZXOv7dC953tc1v8PYtUOHV6R3k2SWOUAGUClRu2ijOQ== +"@ckeditor/ckeditor5-editor-inline@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-inline/-/ckeditor5-editor-inline-46.1.1.tgz#6c855d07133972c22a530e312c4a6b33c654e337" + integrity sha512-/paul3r1JgKp588tswE0yBfjpUT8U1/VLLo9RweAzQmtV1/XvG/Ua3YtGAV9eyvLQ5R7PKBJ0+Wq4fjNE8yVgw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-editor-multi-root@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-multi-root/-/ckeditor5-editor-multi-root-46.0.3.tgz#b9d9b4f62d5396e3597c24f6183ab92ea0512d52" - integrity sha512-mS9gd8zTCclstU5DROT5L3sVq6HSDk0jw/7d7bgKEvWbGvQ6iPiqcgZ+bzpyrtvXMQKnmgfytZpU9qfODLpwFA== +"@ckeditor/ckeditor5-editor-multi-root@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-multi-root/-/ckeditor5-editor-multi-root-46.1.1.tgz#77186eb6560dcef3bdb3431aceadc35d6c66ed60" + integrity sha512-UBqQPDtWpoPd+LJ/45MW2DTykYMc6Qg3QcNto81cRBGj5pbhnCaCIkzCDpT9A7r9XS8+pmfFw9xEajFZiUkdTw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-emoji@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-emoji/-/ckeditor5-emoji-46.0.3.tgz#e129445b3a078b19268482b55dd769449922d636" - integrity sha512-XiQsDeIZdSRDuFz/eoH16L21+Ucxykt+qHvqHSXB6bnVE8A3+65fxXYXicXnlb8st6UYhVBGwd53cpRz1ljMww== +"@ckeditor/ckeditor5-emoji@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-emoji/-/ckeditor5-emoji-46.1.1.tgz#6ef0add882a073063c3f9da97f665d05e76b3067" + integrity sha512-RTyl0LdPBi7um6WjV0tbrVZ9sg/ZqDPTglMbWPmgnPaoZzGs+BJgv6B8cPi9RIl6klOfKWzupGSdHynjI680eg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-mention" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-mention" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" fuzzysort "3.1.0" -"@ckeditor/ckeditor5-engine@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-46.0.3.tgz#a4d740ad4cd87aa5c2dedbf45bc60f8cad8f4823" - integrity sha512-U5BMV3pZTViU2ArsmmvfzqG1dt03laxgWtX8y2TtoEhaL+cNnT4N2cxj0StioeTbGAP3imkNKvVfRpRBhJIp/Q== +"@ckeditor/ckeditor5-engine@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-46.1.1.tgz#ca2a8ae2eef066019479e7301caf1b41dc23aba0" + integrity sha512-5kKbVnsE1PC1T+4kXOlHa6u+shCFKVPLEDjo4gWOwxDr1qPVPVQ9ytvXenQtx/k/wtVNuy3s+uq/nbiMoUXSlA== dependencies: - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-utils" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-enter@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-46.0.3.tgz#d511f822b98644c8c3d614930184c7df845083c3" - integrity sha512-Z/IVe2Bn/PXamXxTlG9Pf/4K1OoGsNpwBfdywiqSYxdlF5E/4e5xArCKuFVkLGPO2YPSXShPhucBorqHlGQI2Q== +"@ckeditor/ckeditor5-enter@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-46.1.1.tgz#943167851b3d329ace566c52e9287e9760e94a04" + integrity sha512-VqnHR5X2vGPcdpmWsyp9OW7O0kl+avFAjSICz1JJ6cPKW8yCHTCxSWxuVEq1bLqS8I2v4imQ+fqM20HYwii2vQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" -"@ckeditor/ckeditor5-essentials@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-46.0.3.tgz#56a0b982fe52c8ba605773cfb2c3f0f901849bb3" - integrity sha512-lUk+AkDVXb0YXEbyw+14sA5vFtXoWA4i6026tyN8I9uShMIyyjzkVUtTX9a0AWp5j//sJ5Ke+wMS0QUFRDtj+Q== +"@ckeditor/ckeditor5-essentials@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-46.1.1.tgz#98da472753ee67954b1fb5cbccf5e31361b8acc2" + integrity sha512-QyX+DPFDdPgBGRU2LeeMYJUqJ9MGDeCnG19lw4kwfA6PwrIamErTMEI9bLAXr9ZD5SxOVr8U+A+1MtFdQzdBxQ== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-select-all" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-undo" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-select-all" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-undo" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-find-and-replace@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-find-and-replace/-/ckeditor5-find-and-replace-46.0.3.tgz#c2b4b617ea0c5009d5bbf5366865c52ed7721eab" - integrity sha512-WKJ32slfJKPE2xnOWtk8/kqaDlUE3AKXChmRw6fPXM9pRpBRItLrbMO4Lhic9F1V8UzzY88/6VMuTMUlVg7/pQ== +"@ckeditor/ckeditor5-find-and-replace@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-find-and-replace/-/ckeditor5-find-and-replace-46.1.1.tgz#432cf5c54e7bcdb4598cbe4e4181857a12c6e4d7" + integrity sha512-xQn3jt2BVw/NOY0QhfTnjKqiv40ahJ6VLGp8DPi/0bmHcgDRqD9QEKg5TFPY99Fi7Oh0OJL81UlQJnulc2hSlg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-font@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-font/-/ckeditor5-font-46.0.3.tgz#2d7e6d27f6cc0841029fca64224ebeebd46963f7" - integrity sha512-4A0F3ShSn5QE0aQVus45EiIpFntJdXQnlf/kCLbQstYBUof915vReCa/c0cRu8q+1GOB9DmTarSPfb2jxDKhaA== +"@ckeditor/ckeditor5-font@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-font/-/ckeditor5-font-46.1.1.tgz#569f39fdc12a263a4ae873e75fd7f30a7be2c70e" + integrity sha512-TqIoOUUChwN9cEKCIn30m9Y95VZU7PQyn20mIbG4/iQItI8IyzlToFAdb+xPaL2ozUcyzTFTGqx0nz9zqKNtWQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-fullscreen@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-fullscreen/-/ckeditor5-fullscreen-46.0.3.tgz#aaca7671cd65864924a23ac25a41990d1a0d5f31" - integrity sha512-+AjKdmknSeihgVytx2CZPvqJ8Iv0sQd8kP1AvTMsp7JWr9kP3eMZEWJ3IwUP7GaH9O+cSDqeW2pFY4rW1ajYlQ== +"@ckeditor/ckeditor5-fullscreen@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-fullscreen/-/ckeditor5-fullscreen-46.1.1.tgz#90a7fd904025f0084b7764f3d8efe98cd91b7afd" + integrity sha512-lpIG6YIw5KjehuTTX3MiAPBULzei8Pw+wfkpaP/NgyHLaUkN0x2wsoDRf3NWsdg+BMMDbR0ejGRJ8q+sD8d6ZQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-editor-classic" "46.0.3" - "@ckeditor/ckeditor5-editor-decoupled" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-editor-classic" "46.1.1" + "@ckeditor/ckeditor5-editor-decoupled" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-heading@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-46.0.3.tgz#5d90467e9e4f082d8c8ec1dc3b31474b74e0c320" - integrity sha512-FKTgc1I9nDvnoDJ6RzkmPX7knhU3k6iH8IGUngH78TIOmhcWPVzv7Sftszos/LdX+kTc1ZoWWaHo5vrk90waZg== +"@ckeditor/ckeditor5-heading@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-46.1.1.tgz#d2b1640d3aae8197542e67d5af165c61caba5724" + integrity sha512-ACneDx+HP3Nm/f2zFrRkUzpbG0CNNMGI4FS242eu0AQqE/vwwLvSD7HmiEzN2Z0HRLVFoY5EWa6kSZpJx6z/WA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-paragraph" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-paragraph" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-highlight@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-highlight/-/ckeditor5-highlight-46.0.3.tgz#c75991f017a039a500bec66e17e8a07ed8a44533" - integrity sha512-woO40tvOomrE7PHV/LAIOuNDb6sm2xiRQpT3r6TU1bvHZWSdt+hBCVRbnPxMNY2b/+0FGeV6cIOP8jlZ6JXF2g== +"@ckeditor/ckeditor5-highlight@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-highlight/-/ckeditor5-highlight-46.1.1.tgz#2251c50dd8477b0bb5e633b10ed82286554915f0" + integrity sha512-eNZ4BWF98mux26X/UOh+SyMTfMgvCOq4+T6lbqLB9TbN2i5/seKxIM9IV5ynag//bNd1ZwaqUczt05e3xFpYUg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-horizontal-line@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-46.0.3.tgz#c57556048fbb22221a347993e2ead695f05f730a" - integrity sha512-mct0XA6XxSk9BXorR5HA6jiDmf40Wm2HbwSEL8RcCQ4s/ak+3c85loUQZtV5Enaro8ejUkQ30nbqUnrO21Z8ZA== +"@ckeditor/ckeditor5-horizontal-line@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-46.1.1.tgz#89d9abaf74857ace8763a724ff24be8bbf3c64cb" + integrity sha512-2PtEKoGQm6OYFDk1kjlIluCsuFVGPP7rU+KXOBBmOSku4rP1cIYyV+wFlerCGaH7hlzEyiuH1arR8va21IBprA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-html-embed@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-embed/-/ckeditor5-html-embed-46.0.3.tgz#8153337107ea4ebd6cf98e8a67f57bcf5814272a" - integrity sha512-8Cf0L1REllrVffu4BrnNiga0mQgFcQ0V/L4ARMGR3vmafTvS2cOvMyrGJy/69oCGM0NigyU1eSzkGv04o+599w== +"@ckeditor/ckeditor5-html-embed@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-embed/-/ckeditor5-html-embed-46.1.1.tgz#537ad4623e425788d77b962ff209450b76dfb5d0" + integrity sha512-rD1AlVOAKeNH0wdBedJFOyWF8dIx5tOJFV+ao36hbtHvXlEDXyXpeal58pbd3Z1QVIdfQ65NF0yZL2leQqOQZA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-html-support@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-46.0.3.tgz#65164419632b679de09dd8040bf1d8ba837e7a51" - integrity sha512-zBRJ1aBIi/UKKRhCUvK0mTDu9c43GOINKscGJ4ZRAD8WmKdlpxO+xUfCfZouDMGwd67lD9e37LI3xZc+hGCXGA== +"@ckeditor/ckeditor5-html-support@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-46.1.1.tgz#aef5a658f9a0d899334144ea20924e9984d2cc38" + integrity sha512-wG3cYNhzc5MAaFVbE+xjMMDDMtXwMUYiZ1Tjwo4YkSdBGRrOYShbktal5H/Snvj+pIgAgc5tOetmk5+izRKVSw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-heading" "46.0.3" - "@ckeditor/ckeditor5-image" "46.0.3" - "@ckeditor/ckeditor5-list" "46.0.3" - "@ckeditor/ckeditor5-remove-format" "46.0.3" - "@ckeditor/ckeditor5-table" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-heading" "46.1.1" + "@ckeditor/ckeditor5-image" "46.1.1" + "@ckeditor/ckeditor5-list" "46.1.1" + "@ckeditor/ckeditor5-remove-format" "46.1.1" + "@ckeditor/ckeditor5-table" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-icons@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-icons/-/ckeditor5-icons-46.0.3.tgz#fae5dec3826f5f4a6649fa01152d1aaa234a1d30" - integrity sha512-ztmFx8ujcdIMTWeIQ8Hxixlexfhx8vcclV/+maDzjVHhqRNi9eZ1b/nQ7gnS4/X5Fnh6cPQuCM+3lTUR4jQscA== +"@ckeditor/ckeditor5-icons@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-icons/-/ckeditor5-icons-46.1.1.tgz#10b56b5c94397ae05e85cbd467a3ffbc12950bf3" + integrity sha512-BeJaBmXxg/R2cvGpL0oeLToDX2zIjLm/UejK0qsiO/eYxTJmveCabUWhcigpk19ciAcSjUdiariZUxCvpTyL5g== -"@ckeditor/ckeditor5-image@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-46.0.3.tgz#51814618fdb9ffe29217746cb28730dbf83911ab" - integrity sha512-9XcJVJxG+fqzwTupf7EATKeVZ+tXqeWiHLip4w/vMejjX026CPjiB3rKA2K5/H25TKDrvsMBBm22RqpK25dzCw== +"@ckeditor/ckeditor5-image@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-46.1.1.tgz#c8d4ecb5339ea9d77be385dfdf6780644508c561" + integrity sha512-292BrygMMXAvrcCxXxRUHC7rfxYqG6Fjf+/QhPXybOb1MFIzGnCkBh7zckUH6oQ4GlQ8kE+mwIthgmc8xvVYGw== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-undo" "46.0.3" - "@ckeditor/ckeditor5-upload" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-undo" "46.1.1" + "@ckeditor/ckeditor5-upload" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-indent@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-46.0.3.tgz#ee6a0279c9a09d2a8be0b43d3fb3aa48ec074417" - integrity sha512-XLdlp94Bitkki027adnOqL642kCSJphMoZZDYYpTNHQkKhJq6TDp8u66EFlo2/q1quVDgb1qlezDuShouYd1tQ== +"@ckeditor/ckeditor5-indent@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-46.1.1.tgz#975dfad0d73c6d957b8c3e6b3a72490d198aef22" + integrity sha512-JKLcCcKo20scOvEuKu09d6og+ECia6QKGOOaTfmy2QJx6CqkbkgC3NQKVF+ixmeGYERfL6X14VZURD7APXVJTA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-heading" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-list" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-heading" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-list" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-language@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-46.0.3.tgz#dad8aa2fa391c247001f2812a603234992c74dfa" - integrity sha512-JLkDnhZxP9J/Dw7uxJtBHYrdR1q2xpkIsi+Y0fhG0cejo6Lhfnv2F/1L76EO6JxhfhrkHWrDgLwr860PYvRztA== +"@ckeditor/ckeditor5-language@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-46.1.1.tgz#3ce2c517d5f59aa8c8dd198b80a3605e4fec6e4f" + integrity sha512-g8atx87RRSypjnnvthpMMSykLN6cgoNAQRvABdxYJTHARRrpjcIKNqWup9SW02QPUKRk/dmsnFEQVH6gkTTzTQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-link@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-46.0.3.tgz#383c13c5bfa08c36f7305abc17e6129174806cc2" - integrity sha512-s2wBD0QQ2Pz8wzTbh3YN83QbYRVbGp3qLwgN+8x7Y/bOuFE4AxR+JhDo14ekdXelXYxIeGJAqG2Z4SQj8v2rXQ== +"@ckeditor/ckeditor5-link@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-46.1.1.tgz#09ca69c7dce7a3c2f7799c3822ac7b321498dd1e" + integrity sha512-dXsLFdL9VvU8VB4EK4qZk7TVSHCOmaAPoxorGy053Wg29ngEhpMHYiYWZQcLZB5VZSNYlc/mW2Hdv1cr2VEwFQ== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-image" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-image" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-list@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-46.0.3.tgz#342a50f272b7079a3c0bc863d70855721d4c44bc" - integrity sha512-KEAnyhUO6hWWa3GO6NGS7Entn2OXutCQ2+od8l5MrqeGxmpnqj0OpPX6qn+RZTVWf1RnqwErCYQhhPoQM/mlZg== +"@ckeditor/ckeditor5-list@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-46.1.1.tgz#b5f0af2e8d553aa4ac93437bc011a0ceadc3307d" + integrity sha512-TlO8xiZHEoyy5nJSeBWSiu7oZjhBXFzm/3CT2jvBZPer/mWnPV0r6BTrw7GK+Pki0PtQCJUNhyxWafUN9rnKqQ== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-font" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-font" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-markdown-gfm@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-markdown-gfm/-/ckeditor5-markdown-gfm-46.0.3.tgz#f3c17385d7e6489e525632bff3d59166c5e6cf94" - integrity sha512-ROOQsKcb03UdzyWZOD4p6vPWUpjgBRf4VXgbxKds2z19dm3fOdUwFbolpVrmYuYzdHrI/0xWM/+waD7TEOatuQ== +"@ckeditor/ckeditor5-markdown-gfm@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-markdown-gfm/-/ckeditor5-markdown-gfm-46.1.1.tgz#91ceccfd592ad93a3fdca43c0cb9f72547db38e0" + integrity sha512-nFPeW+EmkFuvAxp7wqJvXZlqUcVsoVH2s77785DR90iOzb2+zYHzanJ2bWkuC8b+7im7U6h2+6Ghahtz5Y/VVQ== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" "@types/hast" "3.0.4" - ckeditor5 "46.0.3" + ckeditor5 "46.1.1" hast-util-from-dom "5.0.1" hast-util-to-html "9.0.5" hast-util-to-mdast "10.1.2" @@ -1358,271 +1358,271 @@ unified "11.0.5" unist-util-visit "5.0.0" -"@ckeditor/ckeditor5-media-embed@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-media-embed/-/ckeditor5-media-embed-46.0.3.tgz#5efb29e50888bae4b38a1fdb79572bad2bed930a" - integrity sha512-aozP4L8WQuPOHBA5qXTQnH3kQrhFJd6/J5KjKl5EicR6MUqeDkvzSLxYnltUBPByoDvkNxHD/GIL8nevgeWCrQ== +"@ckeditor/ckeditor5-media-embed@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-media-embed/-/ckeditor5-media-embed-46.1.1.tgz#80391d18362a0809dd29f5b924d57df882af30eb" + integrity sha512-1gkrTOlXu0Ptag429I/+sNPeefuLm4ATa0jjaVqM4Mtu/3JRGndkYqVTzmQQeRRn6jEJljqgngNMnlccMRKEmw== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-undo" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-undo" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-mention@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-mention/-/ckeditor5-mention-46.0.3.tgz#42f2e38b6404650f2d8a09392d8069832269ccf4" - integrity sha512-a7sHtN8M5Glh20SbsB0KWlFxoothUwkq6cqNJKKAI6MrOYsOJX1WaMG2mUfhGr4VTrUieuJYxVtqMFuagbhBgQ== +"@ckeditor/ckeditor5-mention@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-mention/-/ckeditor5-mention-46.1.1.tgz#60258ecee853ff22debe835026e5069b33d92586" + integrity sha512-NOyYUBW+bCrr5TSIHxTuoHe1H7YRjDChq396n+XAtreRICRKRloOWhzklI5RMJ5dfmQ7llS1eafi8uu7mzB2zQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-minimap@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-minimap/-/ckeditor5-minimap-46.0.3.tgz#ba170968a44a87557319ea6efcf97eb3d8923e3a" - integrity sha512-gsac1z96MaJMFzapfzqLtEqETpI3JVXMfdQV3N0+kRbFSlUeJmrR/aHLC/+GDQAttkfOuL9i4FlWQKiDeSN15w== +"@ckeditor/ckeditor5-minimap@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-minimap/-/ckeditor5-minimap-46.1.1.tgz#ef07e2e4db5aab30c2083fbc31a4362d488bfc24" + integrity sha512-6tj1PhzVSWbkJYI0+v5TQTKwWfUAeTyZsDXQgaMZeH3ZIZ40wzXRI+ly380msu9t3mBS/qgzuKnsZpc7qNpbaA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-page-break@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-page-break/-/ckeditor5-page-break-46.0.3.tgz#c0fece6af88c11cddfc600e849ec04b11390c872" - integrity sha512-6V0O0sqgZMh47knEhhj0htWK3Oxm6jfHLWA4vi9vColwJMv9imuP72vYgrClmKHfN/QtyZ+DGmaufmhaXS2ffw== +"@ckeditor/ckeditor5-page-break@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-page-break/-/ckeditor5-page-break-46.1.1.tgz#ed8a62ff5e0dafb9dd4b0433d07fd4e39cf08de9" + integrity sha512-c6TjuwTxeuYCloCdLLrjOURrhKyI3iLWuAZhoQ1XLxLpp0k/BIX9G7tRVEr7xzXzk2T8ibnZVHgegx/ImWkGLg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-paragraph@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-46.0.3.tgz#c6ee4808048c0c2a23450ab7438bc9dc5d140f4a" - integrity sha512-3OlCeyykkhcueXmo+p/LppeCvC2TtEpljLpC042EbIOCJEbSMlYEGx/AJQGetn2JV8q9L3UKfgnltpOriXAeyg== +"@ckeditor/ckeditor5-paragraph@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-46.1.1.tgz#0bb7de28b4300ddb98ab2bdc174843a1dd10c049" + integrity sha512-7SC78DYDrFiBTOVHBajxzAUdSoTiM85I8M11QLCrKDoGR1zGgRGjQH8NUMMUOekAjh8SxRN25Alm2Gn27IgCUw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" -"@ckeditor/ckeditor5-paste-from-office@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-46.0.3.tgz#79de54d4cdec9531f254256d8e4d251aa02f6d38" - integrity sha512-pgqBTqP3oIFbmHvk1ddICDmyvBvFE9d+jO0busPXl5oWIqTLaaumwWaredEEUJpYmu02POSrK+WPGS0Qis6mdg== +"@ckeditor/ckeditor5-paste-from-office@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-46.1.1.tgz#eac4deb95a15b5cccacd4f96b52590f1849b17ff" + integrity sha512-W7v4LAc3EJyXXmOCQtnCwjiK9ZhphhBIgLHz1jF/cE6WjS0nQDeXLxHqHnOaD8awR4oqcDyaUNvuBx4ipcUwzA== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-remove-format@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-46.0.3.tgz#9f73003093a2958f32baffda6024f07b557f28ef" - integrity sha512-rrGeK1NGE5o04/wuyMq10BD7bJ7qkVZq74dDXb7G6l1IkFWU/lY5SLt1K4FgVunY+oBcsena+hktwqgEsmEqdg== +"@ckeditor/ckeditor5-remove-format@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-46.1.1.tgz#a1073c8d31a1c21a78aa6f2f569c07c2a054caf8" + integrity sha512-WdFyMzIEHqIrGAhq0NPQhDuKbRvpIOgr87r9IjefRQC0a5mbEdGLNQSE7l0JF0mmNEKQbSi520yJLGZo4EJ7Sg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-restricted-editing@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-restricted-editing/-/ckeditor5-restricted-editing-46.0.3.tgz#52b32ac9c9ecfcfa12266e313b62936dcb75a1bc" - integrity sha512-b1NUb7nEKdb0R5UOukXRXOeweOIE3Dsa64uwV/H6ZnRfdOmH37TVSKFJ2lWVvPUUljsT3SVdSZbl1aP4aA1SBA== +"@ckeditor/ckeditor5-restricted-editing@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-restricted-editing/-/ckeditor5-restricted-editing-46.1.1.tgz#7f2bf640ac59576ca4ad70dfe979ccdc85977d29" + integrity sha512-lODjvDEbTTG//EZQ2yqgmOL2NRzljpAULscanh2eY4km+AVNCPu7181txvnUMtEaWVwEG6Aja9ys3AJlcs3TsQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-select-all@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-46.0.3.tgz#a785a8cf89ddefb07e9cc9adc02844667bc02bd6" - integrity sha512-Uxr3/+TRLUIOGubXo/86yzqLGgoEdPV2rGqz40ulrVhG1Q7hOYerJPDs67ULPq6DLukoFFARRTah+UN9EOYRRw== +"@ckeditor/ckeditor5-select-all@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-46.1.1.tgz#c0ba06e7630e4c425757c377b26099a8db67e834" + integrity sha512-+h+28FPJKL59SESQzh4mvqEXkKrPyL3SnQI4wPC+ZMcBUqd3+0U0OCff0gClucNszgZcHbT83aODmKrQwUdQiw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" -"@ckeditor/ckeditor5-show-blocks@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-show-blocks/-/ckeditor5-show-blocks-46.0.3.tgz#a912926c7102797426040a1bc36b73dcd380fbe5" - integrity sha512-YSa+Q49hQe4oRxIFsnUjzIFRG1M5+2vWjzYwS84hQAR0xDMZDD0SqIS6poC3QewuIS/525bcnmASBwXZUrRdIA== +"@ckeditor/ckeditor5-show-blocks@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-show-blocks/-/ckeditor5-show-blocks-46.1.1.tgz#0fd5c0fcacb3331eddda9e1dd691aab7090e1eb5" + integrity sha512-kiwceBqz5cMUrVp1iVJ+RoRhZRDGhhRHJo3pUeNG2+oYV+xxXvGdrMitDTXBbKnvoEHmI8xOWmh6E+wwHsIiNw== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-source-editing@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-46.0.3.tgz#ea664512ecd36ec5a32f5ee7f7bbd48e69e279c1" - integrity sha512-zJMa7ekyaeQAqAysFZDRwPRyJ7+ejaP2twYvRJQARf/BgZ6YZdSDvSoW1gGIKN/c/f0XWOSTDBdRCciPZu9vCg== +"@ckeditor/ckeditor5-source-editing@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-46.1.1.tgz#88f473b92c490eccc4a64163cc499e9164cd249a" + integrity sha512-Z5Y/s49athQku0wBc6H8DOWAdCYfAOUJtjPaOjkmWuUF6b/WT5GJbEp2ZEGH1EXfZxIY98JEQypjH3fMNb6fAA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-theme-lark" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-theme-lark" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-special-characters@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-46.0.3.tgz#94b62a510608b47247c243fe12762fdfcdb1d4b4" - integrity sha512-PihS9/nmrGXaycsI3TSqVK0qGlc2ZSE3XzL7dEKTCyUta7vvI7hCC/jDaTtfch2d0fZhnIXovlgqlj35u2PjDw== +"@ckeditor/ckeditor5-special-characters@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-46.1.1.tgz#bbf51f6d06583fa97c5080d727280239d64259ad" + integrity sha512-6U99q15iGgb28hNTh7xYw8lbwtajyv/6Z9aVpnlkDXLHAdgkXyfo/5Z65hpPjlMoHwxnZd2xtzYaK1Aaz22MbQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" -"@ckeditor/ckeditor5-style@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-46.0.3.tgz#d1c75502c27cfd717a93f238b702432e48a5b02b" - integrity sha512-/4kOCM0/s4O65AA6tHdTK9joPFaTs/Uk14RHlyGP6+QJQ5FcNx9g2yJ1HxhRAdkMLy3AsVol9lqqFXC00+W7BA== +"@ckeditor/ckeditor5-style@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-46.1.1.tgz#78519ec13f96983ebdbebdd3f39d12822d4c2059" + integrity sha512-42ghJrxnRA32MMAtgdAxAI5NmMdpp8mVpOAs6SIfzfzPyJ7flNorNdjjeD8QIAGvaYz4Vj1G9Y0se2FKR9PCtA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-html-support" "46.0.3" - "@ckeditor/ckeditor5-list" "46.0.3" - "@ckeditor/ckeditor5-table" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-html-support" "46.1.1" + "@ckeditor/ckeditor5-list" "46.1.1" + "@ckeditor/ckeditor5-table" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-table@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-46.0.3.tgz#39bf048644c3fcc6a9747233b54803bcd86925fe" - integrity sha512-Bt7d02s96cv28Xc+LxNRYBNrqlG7gI5xB8gjQWCuoIYHVikxtDUSBowu7q1UOkBmX/TEHuUpnYjUdBKD5M2n5w== +"@ckeditor/ckeditor5-table@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-46.1.1.tgz#5dfc9a0273964deb60b942e0d07ec62762bddb76" + integrity sha512-tV2PBXvnw5znqF0riVjPwbstSU35oP/WPGEPzS6iHEWF21+efRgNKA05PSdQp9NQt58uMPOa3vz+1DSDozO5rQ== dependencies: - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-theme-lark@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-46.0.3.tgz#3707200acb4da4a8ba2a2afadb20a8b1bc0a9edb" - integrity sha512-0w4fwXFExlcsDsPXgNrQz86WJWCUwIYJkcRbjL+K3fMRYBPGVoBO25OHL7tPy2rYvrnZindCJXW9w8FzKSsKhA== +"@ckeditor/ckeditor5-theme-lark@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-46.1.1.tgz#b4651a47c31fa0c0106bac417fc3039923df95c9" + integrity sha512-W7U3a6JUGXbnd5kCBySrGei57Uh9Vs6FFlD0/nP7D9FdHKi5IRcnLOXQ2s/sAkztfmIXSKvvcGqGwnZVQCQxNQ== dependencies: - "@ckeditor/ckeditor5-ui" "46.0.3" + "@ckeditor/ckeditor5-ui" "46.1.1" -"@ckeditor/ckeditor5-typing@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-46.0.3.tgz#449eb12d2916b8d6ffe026ee19a823cbeda1b460" - integrity sha512-iyxTTWIJ1/DpjCk+Uca9bE8P+Q7nvMssustEoMd6b3n39McCxnnonW7hrLUjFsRf/lPuvcAhpvFApoy2cbBRZA== +"@ckeditor/ckeditor5-typing@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-46.1.1.tgz#940a5bf5c49546d46ee5e2c0d8f2a2eae20f78ce" + integrity sha512-+lhzvyHj8Ao/qPHCuufiiBO68pCuynumI8oxfE/UBp9oPO25sqyW4FBgKeGZN6MR+4WKAMjI7tRtNrYEm0FM5Q== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-ui@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-46.0.3.tgz#58d03f07402245ee92a9e6caad84f8a36e7770d4" - integrity sha512-5sRd7/IxWI+jL8N8CO5n35AwM5ofMieFLjvhtdzmkZsHl2hNHMHyfjERlOynp6tkX3TlelJBokqpAO7Yu+DrHA== +"@ckeditor/ckeditor5-ui@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-46.1.1.tgz#75226602a29fcbe4b1a3825dd9adc90d54996b7f" + integrity sha512-GWUH41WqzoS5OaXDLWtpr6SN8nQ9Iq4hvGXPp/ajWilyoX5Ar/1LA5v/sRIzlyekjVglzvOxrSZvRB5BQyz1Rg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-editor-multi-root" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-editor-multi-root" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" "@types/color-convert" "2.0.4" color-convert "3.1.0" color-parse "2.0.2" es-toolkit "1.39.5" vanilla-colorful "0.7.2" -"@ckeditor/ckeditor5-undo@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-46.0.3.tgz#0aa086fb2df862451e525dd9f24bfd34410a2bfc" - integrity sha512-DnSBUIVOpARMDOtMrwvAOYAMZK263ubGLp48N4Yb4bpbE9VwH9KUaTNP1aRRE36wQ46KaPYiROqhnnq+RaemLQ== +"@ckeditor/ckeditor5-undo@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-46.1.1.tgz#5a4ea31d918460f6f81ec78cc3190af13471f100" + integrity sha512-xM1Zv4oBGP5UVeXeSEma+n3DBY86zqs+HpyqUaDGYu1ELo5IHc+/mX4vmF06cAOepgLYKgD/Cn+4/PYuxSplZQ== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" -"@ckeditor/ckeditor5-upload@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-46.0.3.tgz#8437e5d17db98a2c2e646f0b06e5c8941dba2b57" - integrity sha512-VfC3KG1fIaXQkzQRjIlt3b+G44DPj39jD9I5cepLN/xXsHU/EAUcJWXScsd/GlViSDR0DUDCygWyhIIbF/Vobw== +"@ckeditor/ckeditor5-upload@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-46.1.1.tgz#5f82b7ee8361f122c82666e6a46900cbca123da5" + integrity sha512-aP0p4nP5ttx8pLV0SEtg7zEfk2xxyvbUZGIHvRoCIFUOXEoWsBgeP+Q9RK3RrbkWZ8vh2YSI8CeePtzGfFTLTg== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" -"@ckeditor/ckeditor5-utils@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-46.0.3.tgz#58831c99d3834b17146ea2a3d06d93fab932a1e2" - integrity sha512-z+4EI8IOSJpDzKdRSw0KHmLK3LMwYeZ9R207oQzswqlbvhYcUib3HhfMlwhE6pyAGYTofpZQ2btHEOaLPRCTDQ== +"@ckeditor/ckeditor5-utils@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-46.1.1.tgz#04896fb72bd8d43f0ab4ae7055151b8c1831665f" + integrity sha512-Be6IfHXQVEY0yQ42lnPAhNu805SaccmUSoOCFgcmZFtzqzhQN8OP50VDX7R40G3EMvhEdBKX5T7DASr10VPiJg== dependencies: - "@ckeditor/ckeditor5-ui" "46.0.3" + "@ckeditor/ckeditor5-ui" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-watchdog@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-46.0.3.tgz#78a6430ce6b9db0c8c0fcf5d5a2a539869ed7b29" - integrity sha512-TcSM3n9bsJ+Rpzc7NFN2BdobxXAnRJ52n0XY8CeVYZ0VA61GtG/zINH+OdEUORcpqKylH4F1ftyNEwf6cdUbPA== +"@ckeditor/ckeditor5-watchdog@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-46.1.1.tgz#886b89259a1fa345870e677783f23ed963dc518b" + integrity sha512-kBUsBIJ8eBIfbpLRHG0UGUvzYVD2dYpwP3cHQaSbFvEc9dnq2EgJ+LTDlysNM+ci+Z3fAeMC1KYskOO6oGGMXA== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-editor-multi-root" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-editor-multi-root" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-widget@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-46.0.3.tgz#4fda5f828f7a35e6d8b80b186d053b140cd1b5da" - integrity sha512-h5+KbQslzDVWntJQYCkSIj0huJSvE/lkjWTVCsbo2wmbKg6jusP+1oQ5ENtd7Nz4bpJlT83UkKDslSrF23xKlA== +"@ckeditor/ckeditor5-widget@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-46.1.1.tgz#73a39532afe4efbcac95a4c376b0be266b86e40a" + integrity sha512-kBOVN1Iu9oTvk7bbgHXg70ZIVbsUm1U4XQF+knZ1bmI5M+wrOxh2HWSpigX/niOOcsIUo3TtYSPienEKxvxD6g== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" es-toolkit "1.39.5" -"@ckeditor/ckeditor5-word-count@46.0.3": - version "46.0.3" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-word-count/-/ckeditor5-word-count-46.0.3.tgz#d0ffdb77e907f2eb913dade822a3b32b06194065" - integrity sha512-Qobva/b/79t4hD6ZgWsBT3PgGIFXU2dZW62kFDJNVkGpq1pkKboIdq7Iu57OffLDJaV+xkAmEvV6cIDWc4KADA== +"@ckeditor/ckeditor5-word-count@46.1.1": + version "46.1.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-word-count/-/ckeditor5-word-count-46.1.1.tgz#2070171cb1deb5961f8c9b38df9f778afdabf02e" + integrity sha512-F5+PEunszKRIHgXh1oOKpsQdUaCRSEXmkceAmKuAAE3a/7K5xbmno43N+36rVQApqE5oejLOYqd/hGg5d6Ei8g== dependencies: - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - ckeditor5 "46.0.3" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + ckeditor5 "46.1.1" es-toolkit "1.39.5" "@csstools/selector-resolve-nested@^3.1.0": @@ -1925,9 +1925,9 @@ integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28": - version "0.3.30" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz#4a76c4daeee5df09f5d3940e087442fb36ce2b99" - integrity sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q== + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -2076,9 +2076,9 @@ "@types/ms" "*" "@types/emscripten@^1.40.1": - version "1.41.1" - resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.41.1.tgz#318cc5f22c0108f62fe0ede8ef8c7aee38d6b43a" - integrity sha512-vW2aEgBUU1c2CB+qVMislA98amRVPszdALjqNCuUIJaEFZsNaFaM4g5IMXIs+6oHbmmb7q6zeXYubhtObJ9ZLg== + version "1.41.2" + resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.41.2.tgz#40db29188e4ed4c2cc1a3fe709d78afffa908662" + integrity sha512-0EVXosRnffZuF+rsMM1ZVbfpwpvL2/hWycYQ/0GaH/VaoSJvcSmMl6fiPel9TZXHL3EhANxzqKOVFC6NFXyn8A== "@types/eslint-scope@^3.7.7": version "3.7.7" @@ -2160,11 +2160,11 @@ integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA== "@types/node@*": - version "24.3.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.1.tgz#b0a3fb2afed0ef98e8d7f06d46ef6349047709f3" - integrity sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g== + version "24.5.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.5.2.tgz#52ceb83f50fe0fcfdfbd2a9fab6db2e9e7ef6446" + integrity sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ== dependencies: - undici-types "~7.10.0" + undici-types "~7.12.0" "@types/parse-json@^4.0.0": version "4.0.2" @@ -2612,6 +2612,11 @@ base64-js@^1.1.2, base64-js@^1.3.0: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +baseline-browser-mapping@^2.8.3: + version "2.8.6" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz#c37dea4291ed8d01682f85661dbe87967028642e" + integrity sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -2643,9 +2648,9 @@ bootstrap@^5.1.3: integrity sha512-HP1SZDqaLDPwsNiqRqi5NcP0SSXciX2s9E+RyqJIIqGo+vJeN5AJVM98CXmW/Wux0nQ5L7jeWUdplCEf0Ee+tg== bootswatch@^5.1.3: - version "5.3.7" - resolved "https://registry.yarnpkg.com/bootswatch/-/bootswatch-5.3.7.tgz#689c1ab5199a7dd3c6dbb02bec64c6be12b970ca" - integrity sha512-n0X99+Jmpmd4vgkli5KwMOuAkgdyUPhq7cIAwoGXbM6WhE/mmkWACfxpr7WZeG9Pdx509Ndi+2K1HlzXXOr8/Q== + version "5.3.8" + resolved "https://registry.yarnpkg.com/bootswatch/-/bootswatch-5.3.8.tgz#534538ce50285e52cb715823f8b4d734f73956e7" + integrity sha512-88mnH9tv+x6DV+scBxYFOpM4YSDVhyfEgbhqaEfvkHNctKI9qRcACxIP9nmBZ5mSeLXtsgax1VsRkUs1eWjlAQ== brace-expansion@^1.1.7: version "1.1.12" @@ -2675,13 +2680,14 @@ browser-stdout@1.3.1: integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserslist@^4.0.0, browserslist@^4.23.0, browserslist@^4.24.0, browserslist@^4.25.1, browserslist@^4.25.3: - version "4.25.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.4.tgz#ebdd0e1d1cf3911834bab3a6cd7b917d9babf5af" - integrity sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg== + version "4.26.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.26.2.tgz#7db3b3577ec97f1140a52db4936654911078cef3" + integrity sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A== dependencies: - caniuse-lite "^1.0.30001737" - electron-to-chromium "^1.5.211" - node-releases "^2.0.19" + baseline-browser-mapping "^2.8.3" + caniuse-lite "^1.0.30001741" + electron-to-chromium "^1.5.218" + node-releases "^2.0.21" update-browserslist-db "^1.1.3" bs-custom-file-input@^1.3.4: @@ -2769,10 +2775,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001737: - version "1.0.30001741" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz#67fb92953edc536442f3c9da74320774aa523143" - integrity sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001741: + version "1.0.30001743" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz#50ff91a991220a1ee2df5af00650dd5c308ea7cd" + integrity sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw== ccount@^2.0.0: version "2.0.1" @@ -2849,72 +2855,72 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -ckeditor5@46.0.3, ckeditor5@^46.0.0: - version "46.0.3" - resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-46.0.3.tgz#aa1f52ad6542e90aa4b720e592012c979e8b8194" - integrity sha512-BGadZ1td6emWnNVbX40nygpxZMAYQvtC/wRhdhedJpjqmwXQmwLte9Y9RZg+lnomrEiLiaxzFsz1j4I6u2fBnA== +ckeditor5@46.1.1, ckeditor5@^46.0.0: + version "46.1.1" + resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-46.1.1.tgz#8a7eef0c4afcf1f44e6f613b2247cda044ecf27f" + integrity sha512-6EdHMjm3I+23rVmkOMY5nvS+DpiKbAbbZjY7NIvtCwsDa0333/852raCXbLCUyKL6FRHiYowbjY+8LUvVBuZ8w== dependencies: - "@ckeditor/ckeditor5-adapter-ckfinder" "46.0.3" - "@ckeditor/ckeditor5-alignment" "46.0.3" - "@ckeditor/ckeditor5-autoformat" "46.0.3" - "@ckeditor/ckeditor5-autosave" "46.0.3" - "@ckeditor/ckeditor5-basic-styles" "46.0.3" - "@ckeditor/ckeditor5-block-quote" "46.0.3" - "@ckeditor/ckeditor5-bookmark" "46.0.3" - "@ckeditor/ckeditor5-ckbox" "46.0.3" - "@ckeditor/ckeditor5-ckfinder" "46.0.3" - "@ckeditor/ckeditor5-clipboard" "46.0.3" - "@ckeditor/ckeditor5-cloud-services" "46.0.3" - "@ckeditor/ckeditor5-code-block" "46.0.3" - "@ckeditor/ckeditor5-core" "46.0.3" - "@ckeditor/ckeditor5-easy-image" "46.0.3" - "@ckeditor/ckeditor5-editor-balloon" "46.0.3" - "@ckeditor/ckeditor5-editor-classic" "46.0.3" - "@ckeditor/ckeditor5-editor-decoupled" "46.0.3" - "@ckeditor/ckeditor5-editor-inline" "46.0.3" - "@ckeditor/ckeditor5-editor-multi-root" "46.0.3" - "@ckeditor/ckeditor5-emoji" "46.0.3" - "@ckeditor/ckeditor5-engine" "46.0.3" - "@ckeditor/ckeditor5-enter" "46.0.3" - "@ckeditor/ckeditor5-essentials" "46.0.3" - "@ckeditor/ckeditor5-find-and-replace" "46.0.3" - "@ckeditor/ckeditor5-font" "46.0.3" - "@ckeditor/ckeditor5-fullscreen" "46.0.3" - "@ckeditor/ckeditor5-heading" "46.0.3" - "@ckeditor/ckeditor5-highlight" "46.0.3" - "@ckeditor/ckeditor5-horizontal-line" "46.0.3" - "@ckeditor/ckeditor5-html-embed" "46.0.3" - "@ckeditor/ckeditor5-html-support" "46.0.3" - "@ckeditor/ckeditor5-icons" "46.0.3" - "@ckeditor/ckeditor5-image" "46.0.3" - "@ckeditor/ckeditor5-indent" "46.0.3" - "@ckeditor/ckeditor5-language" "46.0.3" - "@ckeditor/ckeditor5-link" "46.0.3" - "@ckeditor/ckeditor5-list" "46.0.3" - "@ckeditor/ckeditor5-markdown-gfm" "46.0.3" - "@ckeditor/ckeditor5-media-embed" "46.0.3" - "@ckeditor/ckeditor5-mention" "46.0.3" - "@ckeditor/ckeditor5-minimap" "46.0.3" - "@ckeditor/ckeditor5-page-break" "46.0.3" - "@ckeditor/ckeditor5-paragraph" "46.0.3" - "@ckeditor/ckeditor5-paste-from-office" "46.0.3" - "@ckeditor/ckeditor5-remove-format" "46.0.3" - "@ckeditor/ckeditor5-restricted-editing" "46.0.3" - "@ckeditor/ckeditor5-select-all" "46.0.3" - "@ckeditor/ckeditor5-show-blocks" "46.0.3" - "@ckeditor/ckeditor5-source-editing" "46.0.3" - "@ckeditor/ckeditor5-special-characters" "46.0.3" - "@ckeditor/ckeditor5-style" "46.0.3" - "@ckeditor/ckeditor5-table" "46.0.3" - "@ckeditor/ckeditor5-theme-lark" "46.0.3" - "@ckeditor/ckeditor5-typing" "46.0.3" - "@ckeditor/ckeditor5-ui" "46.0.3" - "@ckeditor/ckeditor5-undo" "46.0.3" - "@ckeditor/ckeditor5-upload" "46.0.3" - "@ckeditor/ckeditor5-utils" "46.0.3" - "@ckeditor/ckeditor5-watchdog" "46.0.3" - "@ckeditor/ckeditor5-widget" "46.0.3" - "@ckeditor/ckeditor5-word-count" "46.0.3" + "@ckeditor/ckeditor5-adapter-ckfinder" "46.1.1" + "@ckeditor/ckeditor5-alignment" "46.1.1" + "@ckeditor/ckeditor5-autoformat" "46.1.1" + "@ckeditor/ckeditor5-autosave" "46.1.1" + "@ckeditor/ckeditor5-basic-styles" "46.1.1" + "@ckeditor/ckeditor5-block-quote" "46.1.1" + "@ckeditor/ckeditor5-bookmark" "46.1.1" + "@ckeditor/ckeditor5-ckbox" "46.1.1" + "@ckeditor/ckeditor5-ckfinder" "46.1.1" + "@ckeditor/ckeditor5-clipboard" "46.1.1" + "@ckeditor/ckeditor5-cloud-services" "46.1.1" + "@ckeditor/ckeditor5-code-block" "46.1.1" + "@ckeditor/ckeditor5-core" "46.1.1" + "@ckeditor/ckeditor5-easy-image" "46.1.1" + "@ckeditor/ckeditor5-editor-balloon" "46.1.1" + "@ckeditor/ckeditor5-editor-classic" "46.1.1" + "@ckeditor/ckeditor5-editor-decoupled" "46.1.1" + "@ckeditor/ckeditor5-editor-inline" "46.1.1" + "@ckeditor/ckeditor5-editor-multi-root" "46.1.1" + "@ckeditor/ckeditor5-emoji" "46.1.1" + "@ckeditor/ckeditor5-engine" "46.1.1" + "@ckeditor/ckeditor5-enter" "46.1.1" + "@ckeditor/ckeditor5-essentials" "46.1.1" + "@ckeditor/ckeditor5-find-and-replace" "46.1.1" + "@ckeditor/ckeditor5-font" "46.1.1" + "@ckeditor/ckeditor5-fullscreen" "46.1.1" + "@ckeditor/ckeditor5-heading" "46.1.1" + "@ckeditor/ckeditor5-highlight" "46.1.1" + "@ckeditor/ckeditor5-horizontal-line" "46.1.1" + "@ckeditor/ckeditor5-html-embed" "46.1.1" + "@ckeditor/ckeditor5-html-support" "46.1.1" + "@ckeditor/ckeditor5-icons" "46.1.1" + "@ckeditor/ckeditor5-image" "46.1.1" + "@ckeditor/ckeditor5-indent" "46.1.1" + "@ckeditor/ckeditor5-language" "46.1.1" + "@ckeditor/ckeditor5-link" "46.1.1" + "@ckeditor/ckeditor5-list" "46.1.1" + "@ckeditor/ckeditor5-markdown-gfm" "46.1.1" + "@ckeditor/ckeditor5-media-embed" "46.1.1" + "@ckeditor/ckeditor5-mention" "46.1.1" + "@ckeditor/ckeditor5-minimap" "46.1.1" + "@ckeditor/ckeditor5-page-break" "46.1.1" + "@ckeditor/ckeditor5-paragraph" "46.1.1" + "@ckeditor/ckeditor5-paste-from-office" "46.1.1" + "@ckeditor/ckeditor5-remove-format" "46.1.1" + "@ckeditor/ckeditor5-restricted-editing" "46.1.1" + "@ckeditor/ckeditor5-select-all" "46.1.1" + "@ckeditor/ckeditor5-show-blocks" "46.1.1" + "@ckeditor/ckeditor5-source-editing" "46.1.1" + "@ckeditor/ckeditor5-special-characters" "46.1.1" + "@ckeditor/ckeditor5-style" "46.1.1" + "@ckeditor/ckeditor5-table" "46.1.1" + "@ckeditor/ckeditor5-theme-lark" "46.1.1" + "@ckeditor/ckeditor5-typing" "46.1.1" + "@ckeditor/ckeditor5-ui" "46.1.1" + "@ckeditor/ckeditor5-undo" "46.1.1" + "@ckeditor/ckeditor5-upload" "46.1.1" + "@ckeditor/ckeditor5-utils" "46.1.1" + "@ckeditor/ckeditor5-watchdog" "46.1.1" + "@ckeditor/ckeditor5-widget" "46.1.1" + "@ckeditor/ckeditor5-word-count" "46.1.1" clean-stack@^2.0.0: version "2.2.0" @@ -2992,9 +2998,9 @@ color-name@1.1.3: integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.0.0.tgz#03ff6b1b5aec9bb3cf1ed82400c2790dfcd01d2d" - integrity sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow== + version "2.0.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.0.2.tgz#85054825a23e6d6f81d3503f660c4c4a2a15f04f" + integrity sha512-9vEt7gE16EW7Eu7pvZnR0abW9z6ufzhXxGXZEVU9IqPdlsUiMwJeJfRtq0zePUmnbHGT9zajca7mX8zgoayo4A== color-name@~1.1.4: version "1.1.4" @@ -3124,9 +3130,9 @@ crypto-js@^4.2.0: integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== css-declaration-sorter@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz#6dec1c9523bc4a643e088aab8f09e67a54961024" - integrity sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow== + version "7.3.0" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-7.3.0.tgz#edc45c36bcdfea0788b1d4452829f142ef1c4a4a" + integrity sha512-LQF6N/3vkAMYF4xoHLJfG718HRJh34Z8BnNhd6bosOMIVjMlhuZK5++oZa3uYAgrI5+7x2o27gUqTR2U/KjUOQ== css-loader@^5.2.7: version "5.2.7" @@ -3359,26 +3365,26 @@ data-view-byte-offset@^1.0.1: is-data-view "^1.0.1" datatables.net-bs5@^2, datatables.net-bs5@^2.0.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/datatables.net-bs5/-/datatables.net-bs5-2.3.3.tgz#8bf3aec484a69e373f6007038eaac0cc0ef4ee15" - integrity sha512-IPtC57k3KyZaLzIYTHies23Cm2zqaKfD6lkxy/aOAUUAtsg35l53VqNY9y84AEySYG3YLghMHVBvl2ckUhvm0A== + version "2.3.4" + resolved "https://registry.yarnpkg.com/datatables.net-bs5/-/datatables.net-bs5-2.3.4.tgz#63326190c20552c8c2c4d19a57ecdd10f0fe27ff" + integrity sha512-OSoPWhNfiU71VjNP604uTmFRxiX32U7SCW0KRZ2X6z3ZYbIwjjoWcMEjjPWOH3uOqaI0OTDBgOgOs5G28VaJog== dependencies: - datatables.net "2.3.3" + datatables.net "2.3.4" jquery ">=1.7" datatables.net-buttons-bs5@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/datatables.net-buttons-bs5/-/datatables.net-buttons-bs5-3.2.4.tgz#3d47fe68631efd7731a5b40a9980ea8d89d8b610" - integrity sha512-yX8Ia32P1D9L02XWjisA6a9fFp0LgmzpIcvf/4ty+QG5/qj1tOOqWgsXsxxIY2Uj918WmLJS6VaJabRAMoAqHA== + version "3.2.5" + resolved "https://registry.yarnpkg.com/datatables.net-buttons-bs5/-/datatables.net-buttons-bs5-3.2.5.tgz#ab8b2d3cc674e7da3bbe44b600e04edd43c7e7f5" + integrity sha512-3eT/Sd90x7imq9MRcKP9X3j70qg/u+OvtZSNWJEihRf1Mb/Sr8NexQw/Bag/ui6GJHa5dhUeFrOgBSKtEW70iA== dependencies: datatables.net-bs5 "^2" - datatables.net-buttons "3.2.4" + datatables.net-buttons "3.2.5" jquery ">=1.7" -datatables.net-buttons@3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/datatables.net-buttons/-/datatables.net-buttons-3.2.4.tgz#c58cc0bb518da8738bec6e64a54c1135dc257141" - integrity sha512-anA39/R0kpHA2DOwqEHy/ZMXD5vf4tWmyNO0BnO0kJG7AFNvGTUCWBnBifXYg3G64U6JYpYY+MuTFKIB1/ZMTQ== +datatables.net-buttons@3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/datatables.net-buttons/-/datatables.net-buttons-3.2.5.tgz#e37fc4f06743e057e8e3e4abfda60c988e7c16da" + integrity sha512-OSTl7evbfe0SMee11lyzu5iv/z8Yp05eh3s1QBte/FNqHcoXN8hlAVSSGpYgk5pj8zwHPYIu6fHeMEue4ARUNg== dependencies: datatables.net "^2" jquery ">=1.7" @@ -3451,10 +3457,10 @@ datatables.net-select@3.1.0: datatables.net "^2" jquery ">=1.7" -datatables.net@2.3.3, datatables.net@^2, datatables.net@^2.0.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-2.3.3.tgz#fe4f96bdbc4cf47c8d11162a7af525ca6a3683d2" - integrity sha512-SWL3za6nheY6gdoiLgCc++tYmxbwrmv2bjrEiII9rXBWXXSbOZct6pjR3FueMVRM5jmt7pQcXiGovfuFDnutQg== +datatables.net@2.3.4, datatables.net@^2, datatables.net@^2.0.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-2.3.4.tgz#8cf69f2e6cb8d271be3d5c4f75a479684d20f253" + integrity sha512-fKuRlrBIdpAl2uIFgl9enKecHB41QmFd/2nN9LBbOvItV/JalAxLcyqdZXex7wX4ZXjnJQEnv6xeS9veOpKzSw== dependencies: jquery ">=1.7" @@ -3471,9 +3477,9 @@ debug@3.2.6: ms "^2.1.1" debug@^4.0.0, debug@^4.1.0, debug@^4.3.1, debug@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" - integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" @@ -3617,9 +3623,9 @@ domhandler@^5.0.2, domhandler@^5.0.3: domelementtype "^2.3.0" dompurify@^3.0.3: - version "3.2.6" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.6.tgz#ca040a6ad2b88e2a92dc45f38c79f84a714a1cad" - integrity sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.7.tgz#721d63913db5111dd6dfda8d3a748cfd7982d44a" + integrity sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw== optionalDependencies: "@types/trusted-types" "^2.0.7" @@ -3655,10 +3661,10 @@ duplexer@^0.1.2: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -electron-to-chromium@^1.5.211: - version "1.5.214" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz#f7bbdc0796124292d4b8a34a49e968c5e6430763" - integrity sha512-TpvUNdha+X3ybfU78NoQatKvQEm1oq3lf2QbnmCEdw+Bd9RuIAY+hJTvq1avzHM0f7EJfnH3vbCnbzKzisc/9Q== +electron-to-chromium@^1.5.218: + version "1.5.222" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.222.tgz#965c93783ad989116b74593ae3068b9466fdb237" + integrity sha512-gA7psSwSwQRE60CEoLz6JBCQPIxNeuzB2nL8vE03GK/OHxlvykbLyeiumQy1iH5C2f3YbRAZpGCMT12a/9ih9w== emoji-regex@^7.0.1: version "7.0.3" @@ -3699,9 +3705,9 @@ envinfo@^7.7.3: integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" @@ -4030,9 +4036,9 @@ for-each@^0.3.3, for-each@^0.3.5: is-callable "^1.2.7" fs-extra@^11.2.0: - version "11.3.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.1.tgz#ba7a1f97a85f94c6db2e52ff69570db3671d5a74" - integrity sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g== + version "11.3.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4" + integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -4887,16 +4893,11 @@ js-yaml@3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsesc@^3.0.2: +jsesc@^3.0.2, jsesc@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== -jsesc@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" - integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== - json-formatter-js@^2.3.4: version "2.5.23" resolved "https://registry.yarnpkg.com/json-formatter-js/-/json-formatter-js-2.5.23.tgz#b7dd0a1da7e6cbea8e76743d7d8dc1238866cc73" @@ -5087,9 +5088,9 @@ marked-mangle@^1.0.1: integrity sha512-BUZiRqPooKZZhC7e8aDlzqkZt4MKkbJ/VY22b8iqrI3fJdnWmSyc7/uujDkrMszZrKURrXsYVUfgdWG6gEspcA== marked@^16.1.1: - version "16.2.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-16.2.1.tgz#f4b82ffa8e6201bafebc59249492b88b2dcc949f" - integrity sha512-r3UrXED9lMlHF97jJByry90cwrZBBvZmjG1L68oYfuPMW+uDTnuMbyJDymCWwbTE+f+3LhpNDKfpR3a3saFyjA== + version "16.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-16.3.0.tgz#2f513891f867d6edc4772b4a026db9cc331eb94f" + integrity sha512-K3UxuKu6l6bmA5FUwYho8CfJBlsUWAooKtdGgMcERSpF7gcBUrCGsLH7wDaaNOzwq18JzSUDyoEb/YsrqMac3w== math-intrinsics@^1.1.0: version "1.1.0" @@ -5727,10 +5728,10 @@ node-notifier@^9.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^2.0.19: - version "2.0.20" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.20.tgz#e26bb79dbdd1e64a146df389c699014c611cbc27" - integrity sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA== +node-releases@^2.0.21: + version "2.0.21" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.21.tgz#f59b018bc0048044be2d4c4c04e4c8b18160894c" + integrity sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -6092,9 +6093,9 @@ postcss-import@^14.1.0: resolve "^1.1.7" postcss-js@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" - integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.1.0.tgz#003b63c6edde948766e40f3daf7e997ae43a5ce6" + integrity sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw== dependencies: camelcase-css "^2.0.1" @@ -6493,9 +6494,9 @@ postcss@^8.2.14, postcss@^8.2.15, postcss@^8.4.12, postcss@^8.4.33, postcss@^8.4 source-map-js "^1.2.1" preact@^10.13.2: - version "10.27.1" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.27.1.tgz#c391dcad5813b67d9e04655d844d8fdc307d4252" - integrity sha512-V79raXEWch/rbqoNc7nT9E4ep7lu+mI3+sBmfRD4i1M73R3WLYcCtdI0ibxGVf4eQL8ZIz2nFacqEC+rmnOORQ== + version "10.27.2" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.27.2.tgz#19b9009c1be801a76a0aaf0fe5ba665985a09312" + integrity sha512-5SYSgFKSyhCbk6SrXyMpqjb5+MQBgfvEKE/OC+PujcY34sOpqtr+0AZQtPYx5IA6VxynQ7rUPCtKzyovpj9Bpg== pretty-error@^4.0.0: version "4.0.0" @@ -6609,10 +6610,10 @@ reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: get-proto "^1.0.1" which-builtin-type "^1.2.1" -regenerate-unicode-properties@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz#626e39df8c372338ea9b8028d1f99dc3fd9c3db0" - integrity sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA== +regenerate-unicode-properties@^10.2.2: + version "10.2.2" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz#aa113812ba899b630658c7623466be71e1f86f66" + integrity sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g== dependencies: regenerate "^1.4.2" @@ -6644,28 +6645,28 @@ regexp.prototype.flags@^1.5.1, regexp.prototype.flags@^1.5.4: set-function-name "^2.0.2" regexpu-core@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.2.0.tgz#0e5190d79e542bf294955dccabae04d3c7d53826" - integrity sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA== + version "6.4.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.4.0.tgz#3580ce0c4faedef599eccb146612436b62a176e5" + integrity sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA== dependencies: regenerate "^1.4.2" - regenerate-unicode-properties "^10.2.0" + regenerate-unicode-properties "^10.2.2" regjsgen "^0.8.0" - regjsparser "^0.12.0" + regjsparser "^0.13.0" unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" + unicode-match-property-value-ecmascript "^2.2.1" regjsgen@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.8.0.tgz#df23ff26e0c5b300a6470cad160a9d090c3a37ab" integrity sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q== -regjsparser@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.12.0.tgz#0e846df6c6530586429377de56e0475583b088dc" - integrity sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ== +regjsparser@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.13.0.tgz#01f8351335cf7898d43686bc74d2dd71c847ecc0" + integrity sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q== dependencies: - jsesc "~3.0.2" + jsesc "~3.1.0" rehype-dom-parse@5.0.2: version "5.0.2" @@ -7538,10 +7539,10 @@ unbox-primitive@^1.1.0: has-symbols "^1.1.0" which-boxed-primitive "^1.1.1" -undici-types@~7.10.0: - version "7.10.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" - integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== +undici-types@~7.12.0: + version "7.12.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.12.0.tgz#15c5c7475c2a3ba30659529f5cdb4674b622fafb" + integrity sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.1" @@ -7556,10 +7557,10 @@ unicode-match-property-ecmascript@^2.0.0: unicode-canonical-property-names-ecmascript "^2.0.0" unicode-property-aliases-ecmascript "^2.0.0" -unicode-match-property-value-ecmascript@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz#a0401aee72714598f739b68b104e4fe3a0cb3c71" - integrity sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg== +unicode-match-property-value-ecmascript@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz#65a7adfad8574c219890e219285ce4c64ed67eaa" + integrity sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg== unicode-properties@^1.2.2: version "1.4.1" @@ -7570,9 +7571,9 @@ unicode-properties@^1.2.2: unicode-trie "^2.0.0" unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== + version "2.2.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz#301d4f8a43d2b75c97adfad87c9dd5350c9475d1" + integrity sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ== unicode-trie@^2.0.0: version "2.0.0"