From 524a39f63da58ca43aa17f70209aba3030bb03db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 22 May 2025 13:01:42 -0300 Subject: [PATCH 1/4] Build JS files into public/js instead of public/js/dist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- .eslintignore | 2 -- bin/internal/check-release-excludes.sh | 2 +- docs/faq.rst | 2 +- public/js/{dist => }/.gitignore | 0 public/js/vendor/.gitignore | 2 -- resources/js/src/gis_data_editor.ts | 2 +- resources/js/src/modules/ajax.ts | 3 +-- resources/templates/scripts.twig | 4 ++-- resources/templates/setup/base.twig | 4 ++-- tests/unit/ScriptsTest.php | 2 +- webpack.config.cjs | 15 +++++++++++---- 11 files changed, 20 insertions(+), 18 deletions(-) rename public/js/{dist => }/.gitignore (100%) delete mode 100644 public/js/vendor/.gitignore diff --git a/.eslintignore b/.eslintignore index 7e4a49c02c..f057d232ec 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,3 @@ -js/vendor/ -js/dist/ public/js/ tmp/ vendor/ diff --git a/bin/internal/check-release-excludes.sh b/bin/internal/check-release-excludes.sh index a979db165f..4a182e635e 100755 --- a/bin/internal/check-release-excludes.sh +++ b/bin/internal/check-release-excludes.sh @@ -52,7 +52,7 @@ validateExtension() { foundFileExt fi ;; - public/js/dist/*) + public/js/*) if [ "${extension}" != "js" ] && [ "${extension}" != "map" ]; then foundFileExt fi diff --git a/docs/faq.rst b/docs/faq.rst index bc2bd8b892..86b9532b6c 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -694,7 +694,7 @@ A list of files and corresponding functionality which degrade gracefully when re * :file:`./setup/` (setup script) * :file:`./examples/` (configuration examples) * :file:`./resources/sql/` (SQL scripts to configure advanced functionalities) -* :file:`./resources/js/src/` (Source files to re-build `./public/js/dist/`) +* :file:`./resources/js/src/` (Source files to re-build `./public/js/`) * :file:`./resources/js/global.d.ts` JS type declaration file * Run `rm -rv vendor/tecnickcom/tcpdf && composer dump-autoload --no-interaction --optimize --dev` (exporting to PDF) * Run `rm -rv vendor/williamdes/mariadb-mysql-kbs && composer dump-autoload --no-interaction --optimize --dev` (external links to MariaDB and MySQL documentations) diff --git a/public/js/dist/.gitignore b/public/js/.gitignore similarity index 100% rename from public/js/dist/.gitignore rename to public/js/.gitignore diff --git a/public/js/vendor/.gitignore b/public/js/vendor/.gitignore deleted file mode 100644 index a68d087bfe..0000000000 --- a/public/js/vendor/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/* -!/.gitignore diff --git a/resources/js/src/gis_data_editor.ts b/resources/js/src/gis_data_editor.ts index 250e1ff416..17a9b68c55 100644 --- a/resources/js/src/gis_data_editor.ts +++ b/resources/js/src/gis_data_editor.ts @@ -255,7 +255,7 @@ function loadJSAndGISEditor (resolve) { let script; script = document.createElement('script'); - script.src = 'js/dist/table/gis_visualization.js'; + script.src = 'js/table/gis_visualization.js'; document.head.appendChild(script); // OpenLayers.js is BIG and takes time. So asynchronous loading would not work. diff --git a/resources/js/src/modules/ajax.ts b/resources/js/src/modules/ajax.ts index d172d2704d..7f7cea1593 100644 --- a/resources/js/src/modules/ajax.ts +++ b/resources/js/src/modules/ajax.ts @@ -785,8 +785,7 @@ const AJAX = { var script = document.createElement('script'); var self = this; - var file = name.indexOf('vendor/') !== -1 ? name : 'dist/' + name; - script.src = 'js/' + file + '?' + 'v=' + encodeURIComponent(CommonParams.get('version')); + script.src = 'js/' + name + '?' + 'v=' + encodeURIComponent(CommonParams.get('version')); script.async = false; script.onload = function () { self.done(name, callback); diff --git a/resources/templates/scripts.twig b/resources/templates/scripts.twig index d3e3fb302b..2f31c19f92 100644 --- a/resources/templates/scripts.twig +++ b/resources/templates/scripts.twig @@ -1,6 +1,6 @@ {% for file in files %} - {% endfor %} diff --git a/resources/templates/setup/base.twig b/resources/templates/setup/base.twig index 88ca4c14a5..7f19bf63f2 100644 --- a/resources/templates/setup/base.twig +++ b/resources/templates/setup/base.twig @@ -11,8 +11,8 @@ - - + + diff --git a/tests/unit/ScriptsTest.php b/tests/unit/ScriptsTest.php index cc462f8c8b..be08d2781d 100644 --- a/tests/unit/ScriptsTest.php +++ b/tests/unit/ScriptsTest.php @@ -51,7 +51,7 @@ class ScriptsTest extends AbstractTestCase $actual = $this->object->getDisplay(); self::assertStringContainsString( - 'src="js/dist/common.js?v=' . rawurlencode(Version::VERSION) . '"', + 'src="js/common.js?v=' . rawurlencode(Version::VERSION) . '"', $actual, ); self::assertStringContainsString( diff --git a/webpack.config.cjs b/webpack.config.cjs index 573cf17668..3b50684a2e 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -79,14 +79,21 @@ module.exports = [ }, output: { filename: '[name].js', - path: publicPath + '/js/dist', + path: publicPath + '/js', }, optimization: { + chunkIds: 'named', + moduleIds: 'named', runtimeChunk: 'single', splitChunks: { - chunks: 'all', - name: 'shared', - minSize: 1, + cacheGroups: { + shared: { + name: 'shared', + chunks: 'all', + minChunks: 2, + minSize: 1, + }, + }, }, }, externals: { From 01e4a87bbdb01634c19fdf8b3ac293632ac30580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 22 May 2025 13:43:59 -0300 Subject: [PATCH 2/4] Move resources/js/src to resources/js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- bin/internal/check-release-excludes.sh | 2 +- docs/faq.rst | 3 +- jest.config.cjs | 4 +- package.json | 2 +- .../codemirror/addon/lint/sql-lint.ts | 0 resources/js/{src => }/console.ts | 0 .../js/{src => }/database/central_columns.ts | 0 resources/js/{src => }/database/events.ts | 0 .../{src => }/database/multi_table_query.ts | 0 resources/js/{src => }/database/operations.ts | 0 .../js/{src => }/database/query_generator.ts | 0 resources/js/{src => }/database/routines.ts | 0 resources/js/{src => }/database/search.ts | 0 resources/js/{src => }/database/structure.ts | 0 resources/js/{src => }/database/tracking.ts | 0 resources/js/{src => }/datetimepicker.ts | 0 resources/js/{src => }/designer/config.ts | 0 resources/js/{src => }/designer/database.ts | 0 resources/js/{src => }/designer/history.ts | 0 resources/js/{src => }/designer/init.ts | 0 resources/js/{src => }/designer/move.ts | 0 resources/js/{src => }/designer/objects.ts | 0 resources/js/{src => }/designer/page.ts | 0 resources/js/{src => }/drag_drop_import.ts | 0 resources/js/{src => }/error_report.ts | 0 resources/js/{src => }/export.ts | 0 resources/js/{src => }/export_output.ts | 0 resources/js/{src => }/gis_data_editor.ts | 0 resources/js/global.d.ts | 2 +- resources/js/{src => }/home.ts | 0 resources/js/{src => }/import.ts | 0 .../js/{src => }/jquery.sortable-table.ts | 0 resources/js/{src => }/main.ts | 0 resources/js/{src => }/makegrid.ts | 0 resources/js/{src => }/menu_resizer.ts | 0 .../js/{src => }/modules/ajax-message.ts | 0 resources/js/{src => }/modules/ajax.ts | 0 resources/js/{src => }/modules/chart.ts | 0 resources/js/{src => }/modules/common.ts | 0 resources/js/{src => }/modules/config.ts | 0 resources/js/{src => }/modules/console.ts | 0 .../js/{src => }/modules/console/config.ts | 0 .../modules/cross_framing_protection.ts | 0 resources/js/{src => }/modules/functions.ts | 0 .../modules/functions/adjustTotals.ts | 0 .../modules/functions/chartByteFormatter.ts | 0 .../modules/functions/checkNumberOfFields.ts | 0 .../modules/functions/createProfilingChart.ts | 0 .../js/{src => }/modules/functions/escape.ts | 0 .../modules/functions/event-loader.ts | 0 .../modules/functions/formatDateTime.ts | 0 .../modules/functions/getImageTag.ts | 0 .../functions/getJsConfirmCommonParam.ts | 0 .../functions/handleCreateViewModal.ts | 0 .../functions/handleRedirectAndReload.ts | 0 .../modules/functions/ignorePhpErrors.ts | 0 .../modules/functions/isStorageSupported.ts | 0 .../functions/mainMenuResizerCallback.ts | 2 +- .../modules/functions/refreshMainContent.ts | 0 resources/js/{src => }/modules/git-info.ts | 0 resources/js/{src => }/modules/indexes.ts | 0 .../modules/indexes/checkIndexName.ts | 0 .../modules/indexes/checkIndexType.ts | 0 resources/js/{src => }/modules/keyhandler.ts | 0 resources/js/{src => }/modules/navigation.ts | 0 .../modules/navigation/event-loader.ts | 0 .../navigation/updateNavigationWidthConfig.ts | 0 .../js/{src => }/modules/page_settings.ts | 0 .../js/{src => }/modules/sql-highlight.ts | 0 .../js/{src => }/modules/themes-manager.ts | 0 resources/js/{src => }/multi_column_sort.ts | 0 resources/js/{src => }/normalization.ts | 0 resources/js/{src => }/ol.mjs | 0 resources/js/{src => }/replication.ts | 0 resources/js/{src => }/server/databases.ts | 0 resources/js/{src => }/server/plugins.ts | 0 resources/js/{src => }/server/privileges.ts | 0 .../js/{src => }/server/status/monitor.ts | 0 .../js/{src => }/server/status/processes.ts | 0 .../js/{src => }/server/status/queries.ts | 0 .../js/{src => }/server/status/variables.ts | 0 resources/js/{src => }/server/user_groups.ts | 0 resources/js/{src => }/server/variables.ts | 0 resources/js/{src => }/setup/scripts.ts | 0 resources/js/{src => }/shortcuts_handler.ts | 0 resources/js/{src => }/sql.ts | 0 resources/js/{src => }/table/change.ts | 0 resources/js/{src => }/table/chart.ts | 0 resources/js/{src => }/table/find_replace.ts | 0 .../js/{src => }/table/gis_visualization.ts | 0 resources/js/{src => }/table/operations.ts | 0 resources/js/{src => }/table/relation.ts | 0 resources/js/{src => }/table/select.ts | 0 resources/js/{src => }/table/structure.ts | 0 resources/js/{src => }/table/tracking.ts | 0 resources/js/{src => }/table/zoom_search.ts | 0 .../{src => }/transformations/image_upload.ts | 0 .../js/{src => }/transformations/json.ts | 0 .../{src => }/transformations/json_editor.ts | 0 .../{src => }/transformations/sql_editor.ts | 0 resources/js/{src => }/transformations/xml.ts | 0 .../{src => }/transformations/xml_editor.ts | 0 resources/js/{src => }/triggers.ts | 0 resources/js/{src => }/u2f.ts | 0 resources/js/{src => }/validator-messages.ts | 0 resources/js/{src => }/webauthn.ts | 0 tests/javascript/functions.test.ts | 2 +- tsconfig.json | 2 +- webpack.config.cjs | 120 +++++++++--------- 109 files changed, 69 insertions(+), 70 deletions(-) rename resources/js/{src => }/codemirror/addon/lint/sql-lint.ts (100%) rename resources/js/{src => }/console.ts (100%) rename resources/js/{src => }/database/central_columns.ts (100%) rename resources/js/{src => }/database/events.ts (100%) rename resources/js/{src => }/database/multi_table_query.ts (100%) rename resources/js/{src => }/database/operations.ts (100%) rename resources/js/{src => }/database/query_generator.ts (100%) rename resources/js/{src => }/database/routines.ts (100%) rename resources/js/{src => }/database/search.ts (100%) rename resources/js/{src => }/database/structure.ts (100%) rename resources/js/{src => }/database/tracking.ts (100%) rename resources/js/{src => }/datetimepicker.ts (100%) rename resources/js/{src => }/designer/config.ts (100%) rename resources/js/{src => }/designer/database.ts (100%) rename resources/js/{src => }/designer/history.ts (100%) rename resources/js/{src => }/designer/init.ts (100%) rename resources/js/{src => }/designer/move.ts (100%) rename resources/js/{src => }/designer/objects.ts (100%) rename resources/js/{src => }/designer/page.ts (100%) rename resources/js/{src => }/drag_drop_import.ts (100%) rename resources/js/{src => }/error_report.ts (100%) rename resources/js/{src => }/export.ts (100%) rename resources/js/{src => }/export_output.ts (100%) rename resources/js/{src => }/gis_data_editor.ts (100%) rename resources/js/{src => }/home.ts (100%) rename resources/js/{src => }/import.ts (100%) rename resources/js/{src => }/jquery.sortable-table.ts (100%) rename resources/js/{src => }/main.ts (100%) rename resources/js/{src => }/makegrid.ts (100%) rename resources/js/{src => }/menu_resizer.ts (100%) rename resources/js/{src => }/modules/ajax-message.ts (100%) rename resources/js/{src => }/modules/ajax.ts (100%) rename resources/js/{src => }/modules/chart.ts (100%) rename resources/js/{src => }/modules/common.ts (100%) rename resources/js/{src => }/modules/config.ts (100%) rename resources/js/{src => }/modules/console.ts (100%) rename resources/js/{src => }/modules/console/config.ts (100%) rename resources/js/{src => }/modules/cross_framing_protection.ts (100%) rename resources/js/{src => }/modules/functions.ts (100%) rename resources/js/{src => }/modules/functions/adjustTotals.ts (100%) rename resources/js/{src => }/modules/functions/chartByteFormatter.ts (100%) rename resources/js/{src => }/modules/functions/checkNumberOfFields.ts (100%) rename resources/js/{src => }/modules/functions/createProfilingChart.ts (100%) rename resources/js/{src => }/modules/functions/escape.ts (100%) rename resources/js/{src => }/modules/functions/event-loader.ts (100%) rename resources/js/{src => }/modules/functions/formatDateTime.ts (100%) rename resources/js/{src => }/modules/functions/getImageTag.ts (100%) rename resources/js/{src => }/modules/functions/getJsConfirmCommonParam.ts (100%) rename resources/js/{src => }/modules/functions/handleCreateViewModal.ts (100%) rename resources/js/{src => }/modules/functions/handleRedirectAndReload.ts (100%) rename resources/js/{src => }/modules/functions/ignorePhpErrors.ts (100%) rename resources/js/{src => }/modules/functions/isStorageSupported.ts (100%) rename resources/js/{src => }/modules/functions/mainMenuResizerCallback.ts (72%) rename resources/js/{src => }/modules/functions/refreshMainContent.ts (100%) rename resources/js/{src => }/modules/git-info.ts (100%) rename resources/js/{src => }/modules/indexes.ts (100%) rename resources/js/{src => }/modules/indexes/checkIndexName.ts (100%) rename resources/js/{src => }/modules/indexes/checkIndexType.ts (100%) rename resources/js/{src => }/modules/keyhandler.ts (100%) rename resources/js/{src => }/modules/navigation.ts (100%) rename resources/js/{src => }/modules/navigation/event-loader.ts (100%) rename resources/js/{src => }/modules/navigation/updateNavigationWidthConfig.ts (100%) rename resources/js/{src => }/modules/page_settings.ts (100%) rename resources/js/{src => }/modules/sql-highlight.ts (100%) rename resources/js/{src => }/modules/themes-manager.ts (100%) rename resources/js/{src => }/multi_column_sort.ts (100%) rename resources/js/{src => }/normalization.ts (100%) rename resources/js/{src => }/ol.mjs (100%) rename resources/js/{src => }/replication.ts (100%) rename resources/js/{src => }/server/databases.ts (100%) rename resources/js/{src => }/server/plugins.ts (100%) rename resources/js/{src => }/server/privileges.ts (100%) rename resources/js/{src => }/server/status/monitor.ts (100%) rename resources/js/{src => }/server/status/processes.ts (100%) rename resources/js/{src => }/server/status/queries.ts (100%) rename resources/js/{src => }/server/status/variables.ts (100%) rename resources/js/{src => }/server/user_groups.ts (100%) rename resources/js/{src => }/server/variables.ts (100%) rename resources/js/{src => }/setup/scripts.ts (100%) rename resources/js/{src => }/shortcuts_handler.ts (100%) rename resources/js/{src => }/sql.ts (100%) rename resources/js/{src => }/table/change.ts (100%) rename resources/js/{src => }/table/chart.ts (100%) rename resources/js/{src => }/table/find_replace.ts (100%) rename resources/js/{src => }/table/gis_visualization.ts (100%) rename resources/js/{src => }/table/operations.ts (100%) rename resources/js/{src => }/table/relation.ts (100%) rename resources/js/{src => }/table/select.ts (100%) rename resources/js/{src => }/table/structure.ts (100%) rename resources/js/{src => }/table/tracking.ts (100%) rename resources/js/{src => }/table/zoom_search.ts (100%) rename resources/js/{src => }/transformations/image_upload.ts (100%) rename resources/js/{src => }/transformations/json.ts (100%) rename resources/js/{src => }/transformations/json_editor.ts (100%) rename resources/js/{src => }/transformations/sql_editor.ts (100%) rename resources/js/{src => }/transformations/xml.ts (100%) rename resources/js/{src => }/transformations/xml_editor.ts (100%) rename resources/js/{src => }/triggers.ts (100%) rename resources/js/{src => }/u2f.ts (100%) rename resources/js/{src => }/validator-messages.ts (100%) rename resources/js/{src => }/webauthn.ts (100%) diff --git a/bin/internal/check-release-excludes.sh b/bin/internal/check-release-excludes.sh index 4a182e635e..1309291991 100755 --- a/bin/internal/check-release-excludes.sh +++ b/bin/internal/check-release-excludes.sh @@ -57,7 +57,7 @@ validateExtension() { foundFileExt fi ;; - resources/js/src/*) + resources/js/*) if [ "${extension}" != "ts" ] && [ "${extension}" != "mjs" ]; then foundFileExt fi diff --git a/docs/faq.rst b/docs/faq.rst index 86b9532b6c..f2da83d199 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -694,8 +694,7 @@ A list of files and corresponding functionality which degrade gracefully when re * :file:`./setup/` (setup script) * :file:`./examples/` (configuration examples) * :file:`./resources/sql/` (SQL scripts to configure advanced functionalities) -* :file:`./resources/js/src/` (Source files to re-build `./public/js/`) -* :file:`./resources/js/global.d.ts` JS type declaration file +* :file:`./resources/js/` (Source files to re-build `./public/js/`) * Run `rm -rv vendor/tecnickcom/tcpdf && composer dump-autoload --no-interaction --optimize --dev` (exporting to PDF) * Run `rm -rv vendor/williamdes/mariadb-mysql-kbs && composer dump-autoload --no-interaction --optimize --dev` (external links to MariaDB and MySQL documentations) * Run `rm -rv vendor/code-lts/u2f-php-server && composer dump-autoload --no-interaction --optimize --dev` (U2F second factor authentication) diff --git a/jest.config.cjs b/jest.config.cjs index 317e5f3928..9a89da46f2 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -3,7 +3,7 @@ module.exports = { extensionsToTreatAsEsm: ['.ts'], coverageDirectory: '/build/javascript/', - collectCoverageFrom: ['/resources/js/src/**/*.ts'], + collectCoverageFrom: ['/resources/js/**/*.ts'], projects: [ { coveragePathIgnorePatterns: [ @@ -14,7 +14,7 @@ module.exports = { testMatch: ['/tests/javascript/**/*.ts'], transform: { '\\.[jt]sx?$': 'babel-jest' }, moduleNameMapper: { - '^phpmyadmin/(.*)$': '/resources/js/src/$1', + '^phpmyadmin/(.*)$': '/resources/js/$1', '^@vendor/(.*)$': '/public/js/vendor/$1', }, testEnvironment: 'jsdom', diff --git a/package.json b/package.json index f2c41fc9de..29137ced94 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "postinstall": "yarn run build", "build": "webpack", "css-lint": "stylelint \"public/themes/**/scss/*.scss\" \"public/setup/scss/*.scss\"", - "js-lint": "eslint resources/js/src tests/javascript jest.config.cjs", + "js-lint": "eslint resources/js tests/javascript jest.config.cjs", "test": "yarn node --experimental-vm-modules $(yarn bin jest)" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" diff --git a/resources/js/src/codemirror/addon/lint/sql-lint.ts b/resources/js/codemirror/addon/lint/sql-lint.ts similarity index 100% rename from resources/js/src/codemirror/addon/lint/sql-lint.ts rename to resources/js/codemirror/addon/lint/sql-lint.ts diff --git a/resources/js/src/console.ts b/resources/js/console.ts similarity index 100% rename from resources/js/src/console.ts rename to resources/js/console.ts diff --git a/resources/js/src/database/central_columns.ts b/resources/js/database/central_columns.ts similarity index 100% rename from resources/js/src/database/central_columns.ts rename to resources/js/database/central_columns.ts diff --git a/resources/js/src/database/events.ts b/resources/js/database/events.ts similarity index 100% rename from resources/js/src/database/events.ts rename to resources/js/database/events.ts diff --git a/resources/js/src/database/multi_table_query.ts b/resources/js/database/multi_table_query.ts similarity index 100% rename from resources/js/src/database/multi_table_query.ts rename to resources/js/database/multi_table_query.ts diff --git a/resources/js/src/database/operations.ts b/resources/js/database/operations.ts similarity index 100% rename from resources/js/src/database/operations.ts rename to resources/js/database/operations.ts diff --git a/resources/js/src/database/query_generator.ts b/resources/js/database/query_generator.ts similarity index 100% rename from resources/js/src/database/query_generator.ts rename to resources/js/database/query_generator.ts diff --git a/resources/js/src/database/routines.ts b/resources/js/database/routines.ts similarity index 100% rename from resources/js/src/database/routines.ts rename to resources/js/database/routines.ts diff --git a/resources/js/src/database/search.ts b/resources/js/database/search.ts similarity index 100% rename from resources/js/src/database/search.ts rename to resources/js/database/search.ts diff --git a/resources/js/src/database/structure.ts b/resources/js/database/structure.ts similarity index 100% rename from resources/js/src/database/structure.ts rename to resources/js/database/structure.ts diff --git a/resources/js/src/database/tracking.ts b/resources/js/database/tracking.ts similarity index 100% rename from resources/js/src/database/tracking.ts rename to resources/js/database/tracking.ts diff --git a/resources/js/src/datetimepicker.ts b/resources/js/datetimepicker.ts similarity index 100% rename from resources/js/src/datetimepicker.ts rename to resources/js/datetimepicker.ts diff --git a/resources/js/src/designer/config.ts b/resources/js/designer/config.ts similarity index 100% rename from resources/js/src/designer/config.ts rename to resources/js/designer/config.ts diff --git a/resources/js/src/designer/database.ts b/resources/js/designer/database.ts similarity index 100% rename from resources/js/src/designer/database.ts rename to resources/js/designer/database.ts diff --git a/resources/js/src/designer/history.ts b/resources/js/designer/history.ts similarity index 100% rename from resources/js/src/designer/history.ts rename to resources/js/designer/history.ts diff --git a/resources/js/src/designer/init.ts b/resources/js/designer/init.ts similarity index 100% rename from resources/js/src/designer/init.ts rename to resources/js/designer/init.ts diff --git a/resources/js/src/designer/move.ts b/resources/js/designer/move.ts similarity index 100% rename from resources/js/src/designer/move.ts rename to resources/js/designer/move.ts diff --git a/resources/js/src/designer/objects.ts b/resources/js/designer/objects.ts similarity index 100% rename from resources/js/src/designer/objects.ts rename to resources/js/designer/objects.ts diff --git a/resources/js/src/designer/page.ts b/resources/js/designer/page.ts similarity index 100% rename from resources/js/src/designer/page.ts rename to resources/js/designer/page.ts diff --git a/resources/js/src/drag_drop_import.ts b/resources/js/drag_drop_import.ts similarity index 100% rename from resources/js/src/drag_drop_import.ts rename to resources/js/drag_drop_import.ts diff --git a/resources/js/src/error_report.ts b/resources/js/error_report.ts similarity index 100% rename from resources/js/src/error_report.ts rename to resources/js/error_report.ts diff --git a/resources/js/src/export.ts b/resources/js/export.ts similarity index 100% rename from resources/js/src/export.ts rename to resources/js/export.ts diff --git a/resources/js/src/export_output.ts b/resources/js/export_output.ts similarity index 100% rename from resources/js/src/export_output.ts rename to resources/js/export_output.ts diff --git a/resources/js/src/gis_data_editor.ts b/resources/js/gis_data_editor.ts similarity index 100% rename from resources/js/src/gis_data_editor.ts rename to resources/js/gis_data_editor.ts diff --git a/resources/js/global.d.ts b/resources/js/global.d.ts index 72c21b7186..967f883969 100644 --- a/resources/js/global.d.ts +++ b/resources/js/global.d.ts @@ -18,7 +18,7 @@ interface Window { interface JQuery { sortableTable: (method: any) => any; - menuResizer: (method: string|Function) => any; + menuResizer: (method: string|(() => number)) => any; filterByValue: (value: any) => any; diff --git a/resources/js/src/home.ts b/resources/js/home.ts similarity index 100% rename from resources/js/src/home.ts rename to resources/js/home.ts diff --git a/resources/js/src/import.ts b/resources/js/import.ts similarity index 100% rename from resources/js/src/import.ts rename to resources/js/import.ts diff --git a/resources/js/src/jquery.sortable-table.ts b/resources/js/jquery.sortable-table.ts similarity index 100% rename from resources/js/src/jquery.sortable-table.ts rename to resources/js/jquery.sortable-table.ts diff --git a/resources/js/src/main.ts b/resources/js/main.ts similarity index 100% rename from resources/js/src/main.ts rename to resources/js/main.ts diff --git a/resources/js/src/makegrid.ts b/resources/js/makegrid.ts similarity index 100% rename from resources/js/src/makegrid.ts rename to resources/js/makegrid.ts diff --git a/resources/js/src/menu_resizer.ts b/resources/js/menu_resizer.ts similarity index 100% rename from resources/js/src/menu_resizer.ts rename to resources/js/menu_resizer.ts diff --git a/resources/js/src/modules/ajax-message.ts b/resources/js/modules/ajax-message.ts similarity index 100% rename from resources/js/src/modules/ajax-message.ts rename to resources/js/modules/ajax-message.ts diff --git a/resources/js/src/modules/ajax.ts b/resources/js/modules/ajax.ts similarity index 100% rename from resources/js/src/modules/ajax.ts rename to resources/js/modules/ajax.ts diff --git a/resources/js/src/modules/chart.ts b/resources/js/modules/chart.ts similarity index 100% rename from resources/js/src/modules/chart.ts rename to resources/js/modules/chart.ts diff --git a/resources/js/src/modules/common.ts b/resources/js/modules/common.ts similarity index 100% rename from resources/js/src/modules/common.ts rename to resources/js/modules/common.ts diff --git a/resources/js/src/modules/config.ts b/resources/js/modules/config.ts similarity index 100% rename from resources/js/src/modules/config.ts rename to resources/js/modules/config.ts diff --git a/resources/js/src/modules/console.ts b/resources/js/modules/console.ts similarity index 100% rename from resources/js/src/modules/console.ts rename to resources/js/modules/console.ts diff --git a/resources/js/src/modules/console/config.ts b/resources/js/modules/console/config.ts similarity index 100% rename from resources/js/src/modules/console/config.ts rename to resources/js/modules/console/config.ts diff --git a/resources/js/src/modules/cross_framing_protection.ts b/resources/js/modules/cross_framing_protection.ts similarity index 100% rename from resources/js/src/modules/cross_framing_protection.ts rename to resources/js/modules/cross_framing_protection.ts diff --git a/resources/js/src/modules/functions.ts b/resources/js/modules/functions.ts similarity index 100% rename from resources/js/src/modules/functions.ts rename to resources/js/modules/functions.ts diff --git a/resources/js/src/modules/functions/adjustTotals.ts b/resources/js/modules/functions/adjustTotals.ts similarity index 100% rename from resources/js/src/modules/functions/adjustTotals.ts rename to resources/js/modules/functions/adjustTotals.ts diff --git a/resources/js/src/modules/functions/chartByteFormatter.ts b/resources/js/modules/functions/chartByteFormatter.ts similarity index 100% rename from resources/js/src/modules/functions/chartByteFormatter.ts rename to resources/js/modules/functions/chartByteFormatter.ts diff --git a/resources/js/src/modules/functions/checkNumberOfFields.ts b/resources/js/modules/functions/checkNumberOfFields.ts similarity index 100% rename from resources/js/src/modules/functions/checkNumberOfFields.ts rename to resources/js/modules/functions/checkNumberOfFields.ts diff --git a/resources/js/src/modules/functions/createProfilingChart.ts b/resources/js/modules/functions/createProfilingChart.ts similarity index 100% rename from resources/js/src/modules/functions/createProfilingChart.ts rename to resources/js/modules/functions/createProfilingChart.ts diff --git a/resources/js/src/modules/functions/escape.ts b/resources/js/modules/functions/escape.ts similarity index 100% rename from resources/js/src/modules/functions/escape.ts rename to resources/js/modules/functions/escape.ts diff --git a/resources/js/src/modules/functions/event-loader.ts b/resources/js/modules/functions/event-loader.ts similarity index 100% rename from resources/js/src/modules/functions/event-loader.ts rename to resources/js/modules/functions/event-loader.ts diff --git a/resources/js/src/modules/functions/formatDateTime.ts b/resources/js/modules/functions/formatDateTime.ts similarity index 100% rename from resources/js/src/modules/functions/formatDateTime.ts rename to resources/js/modules/functions/formatDateTime.ts diff --git a/resources/js/src/modules/functions/getImageTag.ts b/resources/js/modules/functions/getImageTag.ts similarity index 100% rename from resources/js/src/modules/functions/getImageTag.ts rename to resources/js/modules/functions/getImageTag.ts diff --git a/resources/js/src/modules/functions/getJsConfirmCommonParam.ts b/resources/js/modules/functions/getJsConfirmCommonParam.ts similarity index 100% rename from resources/js/src/modules/functions/getJsConfirmCommonParam.ts rename to resources/js/modules/functions/getJsConfirmCommonParam.ts diff --git a/resources/js/src/modules/functions/handleCreateViewModal.ts b/resources/js/modules/functions/handleCreateViewModal.ts similarity index 100% rename from resources/js/src/modules/functions/handleCreateViewModal.ts rename to resources/js/modules/functions/handleCreateViewModal.ts diff --git a/resources/js/src/modules/functions/handleRedirectAndReload.ts b/resources/js/modules/functions/handleRedirectAndReload.ts similarity index 100% rename from resources/js/src/modules/functions/handleRedirectAndReload.ts rename to resources/js/modules/functions/handleRedirectAndReload.ts diff --git a/resources/js/src/modules/functions/ignorePhpErrors.ts b/resources/js/modules/functions/ignorePhpErrors.ts similarity index 100% rename from resources/js/src/modules/functions/ignorePhpErrors.ts rename to resources/js/modules/functions/ignorePhpErrors.ts diff --git a/resources/js/src/modules/functions/isStorageSupported.ts b/resources/js/modules/functions/isStorageSupported.ts similarity index 100% rename from resources/js/src/modules/functions/isStorageSupported.ts rename to resources/js/modules/functions/isStorageSupported.ts diff --git a/resources/js/src/modules/functions/mainMenuResizerCallback.ts b/resources/js/modules/functions/mainMenuResizerCallback.ts similarity index 72% rename from resources/js/src/modules/functions/mainMenuResizerCallback.ts rename to resources/js/modules/functions/mainMenuResizerCallback.ts index e5c68d783a..9713c95570 100644 --- a/resources/js/src/modules/functions/mainMenuResizerCallback.ts +++ b/resources/js/modules/functions/mainMenuResizerCallback.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; -export default function mainMenuResizerCallback () { +export default function mainMenuResizerCallback (): number { // 5 px margin for jumping menu in Chrome // eslint-disable-next-line compat/compat return $(document.body).width() - 5; diff --git a/resources/js/src/modules/functions/refreshMainContent.ts b/resources/js/modules/functions/refreshMainContent.ts similarity index 100% rename from resources/js/src/modules/functions/refreshMainContent.ts rename to resources/js/modules/functions/refreshMainContent.ts diff --git a/resources/js/src/modules/git-info.ts b/resources/js/modules/git-info.ts similarity index 100% rename from resources/js/src/modules/git-info.ts rename to resources/js/modules/git-info.ts diff --git a/resources/js/src/modules/indexes.ts b/resources/js/modules/indexes.ts similarity index 100% rename from resources/js/src/modules/indexes.ts rename to resources/js/modules/indexes.ts diff --git a/resources/js/src/modules/indexes/checkIndexName.ts b/resources/js/modules/indexes/checkIndexName.ts similarity index 100% rename from resources/js/src/modules/indexes/checkIndexName.ts rename to resources/js/modules/indexes/checkIndexName.ts diff --git a/resources/js/src/modules/indexes/checkIndexType.ts b/resources/js/modules/indexes/checkIndexType.ts similarity index 100% rename from resources/js/src/modules/indexes/checkIndexType.ts rename to resources/js/modules/indexes/checkIndexType.ts diff --git a/resources/js/src/modules/keyhandler.ts b/resources/js/modules/keyhandler.ts similarity index 100% rename from resources/js/src/modules/keyhandler.ts rename to resources/js/modules/keyhandler.ts diff --git a/resources/js/src/modules/navigation.ts b/resources/js/modules/navigation.ts similarity index 100% rename from resources/js/src/modules/navigation.ts rename to resources/js/modules/navigation.ts diff --git a/resources/js/src/modules/navigation/event-loader.ts b/resources/js/modules/navigation/event-loader.ts similarity index 100% rename from resources/js/src/modules/navigation/event-loader.ts rename to resources/js/modules/navigation/event-loader.ts diff --git a/resources/js/src/modules/navigation/updateNavigationWidthConfig.ts b/resources/js/modules/navigation/updateNavigationWidthConfig.ts similarity index 100% rename from resources/js/src/modules/navigation/updateNavigationWidthConfig.ts rename to resources/js/modules/navigation/updateNavigationWidthConfig.ts diff --git a/resources/js/src/modules/page_settings.ts b/resources/js/modules/page_settings.ts similarity index 100% rename from resources/js/src/modules/page_settings.ts rename to resources/js/modules/page_settings.ts diff --git a/resources/js/src/modules/sql-highlight.ts b/resources/js/modules/sql-highlight.ts similarity index 100% rename from resources/js/src/modules/sql-highlight.ts rename to resources/js/modules/sql-highlight.ts diff --git a/resources/js/src/modules/themes-manager.ts b/resources/js/modules/themes-manager.ts similarity index 100% rename from resources/js/src/modules/themes-manager.ts rename to resources/js/modules/themes-manager.ts diff --git a/resources/js/src/multi_column_sort.ts b/resources/js/multi_column_sort.ts similarity index 100% rename from resources/js/src/multi_column_sort.ts rename to resources/js/multi_column_sort.ts diff --git a/resources/js/src/normalization.ts b/resources/js/normalization.ts similarity index 100% rename from resources/js/src/normalization.ts rename to resources/js/normalization.ts diff --git a/resources/js/src/ol.mjs b/resources/js/ol.mjs similarity index 100% rename from resources/js/src/ol.mjs rename to resources/js/ol.mjs diff --git a/resources/js/src/replication.ts b/resources/js/replication.ts similarity index 100% rename from resources/js/src/replication.ts rename to resources/js/replication.ts diff --git a/resources/js/src/server/databases.ts b/resources/js/server/databases.ts similarity index 100% rename from resources/js/src/server/databases.ts rename to resources/js/server/databases.ts diff --git a/resources/js/src/server/plugins.ts b/resources/js/server/plugins.ts similarity index 100% rename from resources/js/src/server/plugins.ts rename to resources/js/server/plugins.ts diff --git a/resources/js/src/server/privileges.ts b/resources/js/server/privileges.ts similarity index 100% rename from resources/js/src/server/privileges.ts rename to resources/js/server/privileges.ts diff --git a/resources/js/src/server/status/monitor.ts b/resources/js/server/status/monitor.ts similarity index 100% rename from resources/js/src/server/status/monitor.ts rename to resources/js/server/status/monitor.ts diff --git a/resources/js/src/server/status/processes.ts b/resources/js/server/status/processes.ts similarity index 100% rename from resources/js/src/server/status/processes.ts rename to resources/js/server/status/processes.ts diff --git a/resources/js/src/server/status/queries.ts b/resources/js/server/status/queries.ts similarity index 100% rename from resources/js/src/server/status/queries.ts rename to resources/js/server/status/queries.ts diff --git a/resources/js/src/server/status/variables.ts b/resources/js/server/status/variables.ts similarity index 100% rename from resources/js/src/server/status/variables.ts rename to resources/js/server/status/variables.ts diff --git a/resources/js/src/server/user_groups.ts b/resources/js/server/user_groups.ts similarity index 100% rename from resources/js/src/server/user_groups.ts rename to resources/js/server/user_groups.ts diff --git a/resources/js/src/server/variables.ts b/resources/js/server/variables.ts similarity index 100% rename from resources/js/src/server/variables.ts rename to resources/js/server/variables.ts diff --git a/resources/js/src/setup/scripts.ts b/resources/js/setup/scripts.ts similarity index 100% rename from resources/js/src/setup/scripts.ts rename to resources/js/setup/scripts.ts diff --git a/resources/js/src/shortcuts_handler.ts b/resources/js/shortcuts_handler.ts similarity index 100% rename from resources/js/src/shortcuts_handler.ts rename to resources/js/shortcuts_handler.ts diff --git a/resources/js/src/sql.ts b/resources/js/sql.ts similarity index 100% rename from resources/js/src/sql.ts rename to resources/js/sql.ts diff --git a/resources/js/src/table/change.ts b/resources/js/table/change.ts similarity index 100% rename from resources/js/src/table/change.ts rename to resources/js/table/change.ts diff --git a/resources/js/src/table/chart.ts b/resources/js/table/chart.ts similarity index 100% rename from resources/js/src/table/chart.ts rename to resources/js/table/chart.ts diff --git a/resources/js/src/table/find_replace.ts b/resources/js/table/find_replace.ts similarity index 100% rename from resources/js/src/table/find_replace.ts rename to resources/js/table/find_replace.ts diff --git a/resources/js/src/table/gis_visualization.ts b/resources/js/table/gis_visualization.ts similarity index 100% rename from resources/js/src/table/gis_visualization.ts rename to resources/js/table/gis_visualization.ts diff --git a/resources/js/src/table/operations.ts b/resources/js/table/operations.ts similarity index 100% rename from resources/js/src/table/operations.ts rename to resources/js/table/operations.ts diff --git a/resources/js/src/table/relation.ts b/resources/js/table/relation.ts similarity index 100% rename from resources/js/src/table/relation.ts rename to resources/js/table/relation.ts diff --git a/resources/js/src/table/select.ts b/resources/js/table/select.ts similarity index 100% rename from resources/js/src/table/select.ts rename to resources/js/table/select.ts diff --git a/resources/js/src/table/structure.ts b/resources/js/table/structure.ts similarity index 100% rename from resources/js/src/table/structure.ts rename to resources/js/table/structure.ts diff --git a/resources/js/src/table/tracking.ts b/resources/js/table/tracking.ts similarity index 100% rename from resources/js/src/table/tracking.ts rename to resources/js/table/tracking.ts diff --git a/resources/js/src/table/zoom_search.ts b/resources/js/table/zoom_search.ts similarity index 100% rename from resources/js/src/table/zoom_search.ts rename to resources/js/table/zoom_search.ts diff --git a/resources/js/src/transformations/image_upload.ts b/resources/js/transformations/image_upload.ts similarity index 100% rename from resources/js/src/transformations/image_upload.ts rename to resources/js/transformations/image_upload.ts diff --git a/resources/js/src/transformations/json.ts b/resources/js/transformations/json.ts similarity index 100% rename from resources/js/src/transformations/json.ts rename to resources/js/transformations/json.ts diff --git a/resources/js/src/transformations/json_editor.ts b/resources/js/transformations/json_editor.ts similarity index 100% rename from resources/js/src/transformations/json_editor.ts rename to resources/js/transformations/json_editor.ts diff --git a/resources/js/src/transformations/sql_editor.ts b/resources/js/transformations/sql_editor.ts similarity index 100% rename from resources/js/src/transformations/sql_editor.ts rename to resources/js/transformations/sql_editor.ts diff --git a/resources/js/src/transformations/xml.ts b/resources/js/transformations/xml.ts similarity index 100% rename from resources/js/src/transformations/xml.ts rename to resources/js/transformations/xml.ts diff --git a/resources/js/src/transformations/xml_editor.ts b/resources/js/transformations/xml_editor.ts similarity index 100% rename from resources/js/src/transformations/xml_editor.ts rename to resources/js/transformations/xml_editor.ts diff --git a/resources/js/src/triggers.ts b/resources/js/triggers.ts similarity index 100% rename from resources/js/src/triggers.ts rename to resources/js/triggers.ts diff --git a/resources/js/src/u2f.ts b/resources/js/u2f.ts similarity index 100% rename from resources/js/src/u2f.ts rename to resources/js/u2f.ts diff --git a/resources/js/src/validator-messages.ts b/resources/js/validator-messages.ts similarity index 100% rename from resources/js/src/validator-messages.ts rename to resources/js/validator-messages.ts diff --git a/resources/js/src/webauthn.ts b/resources/js/webauthn.ts similarity index 100% rename from resources/js/src/webauthn.ts rename to resources/js/webauthn.ts diff --git a/tests/javascript/functions.test.ts b/tests/javascript/functions.test.ts index 8d136b8546..97fc951647 100644 --- a/tests/javascript/functions.test.ts +++ b/tests/javascript/functions.test.ts @@ -1,6 +1,6 @@ /* eslint-env node, jest */ -import { stringifyJSON } from '../../resources/js/src/modules/functions.ts'; +import { stringifyJSON } from '../../resources/js/modules/functions.ts'; describe('Functions', () => { describe('Testing stringifyJSON', function () { diff --git a/tsconfig.json b/tsconfig.json index cf05b99abb..9db56febbb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,6 @@ "strict": false, "isolatedModules": true }, - "include": ["./resources/js/global.d.ts", "./resources/js/src/**/*"], + "include": ["./resources/js/**/*"], "exclude": ["node_modules"] } diff --git a/webpack.config.cjs b/webpack.config.cjs index 3b50684a2e..1f35585876 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -17,65 +17,65 @@ module.exports = [ mode: 'none', devtool: 'source-map', entry: { - 'codemirror/addon/lint/sql-lint': rootPath + '/resources/js/src/codemirror/addon/lint/sql-lint.ts', - 'console': { import: rootPath + '/resources/js/src/console.ts', library: { name: 'Console', type: 'window', export: 'Console' } }, - 'datetimepicker': rootPath + '/resources/js/src/datetimepicker.ts', - 'database/central_columns': rootPath + '/resources/js/src/database/central_columns.ts', - 'database/events': rootPath + '/resources/js/src/database/events.ts', - 'database/multi_table_query': rootPath + '/resources/js/src/database/multi_table_query.ts', - 'database/operations': rootPath + '/resources/js/src/database/operations.ts', - 'database/query_generator': rootPath + '/resources/js/src/database/query_generator.ts', - 'database/routines': rootPath + '/resources/js/src/database/routines.ts', - 'database/search': rootPath + '/resources/js/src/database/search.ts', - 'database/structure': rootPath + '/resources/js/src/database/structure.ts', - 'database/tracking': rootPath + '/resources/js/src/database/tracking.ts', - 'designer/init': rootPath + '/resources/js/src/designer/init.ts', - 'drag_drop_import': rootPath + '/resources/js/src/drag_drop_import.ts', - 'error_report': rootPath + '/resources/js/src/error_report.ts', - 'export': rootPath + '/resources/js/src/export.ts', - 'export_output': rootPath + '/resources/js/src/export_output.ts', - 'gis_data_editor': rootPath + '/resources/js/src/gis_data_editor.ts', - 'home': rootPath + '/resources/js/src/home.ts', - 'import': rootPath + '/resources/js/src/import.ts', - 'jquery.sortable-table': rootPath + '/resources/js/src/jquery.sortable-table.ts', - 'main': rootPath + '/resources/js/src/main.ts', - 'makegrid': rootPath + '/resources/js/src/makegrid.ts', - 'menu_resizer': rootPath + '/resources/js/src/menu_resizer.ts', - 'multi_column_sort': rootPath + '/resources/js/src/multi_column_sort.ts', - 'normalization': rootPath + '/resources/js/src/normalization.ts', - 'replication': rootPath + '/resources/js/src/replication.ts', - 'server/databases': rootPath + '/resources/js/src/server/databases.ts', - 'server/plugins': rootPath + '/resources/js/src/server/plugins.ts', - 'server/privileges': rootPath + '/resources/js/src/server/privileges.ts', - 'server/status/monitor': rootPath + '/resources/js/src/server/status/monitor.ts', - 'server/status/processes': rootPath + '/resources/js/src/server/status/processes.ts', - 'server/status/queries': rootPath + '/resources/js/src/server/status/queries.ts', - 'server/status/variables': rootPath + '/resources/js/src/server/status/variables.ts', - 'server/user_groups': rootPath + '/resources/js/src/server/user_groups.ts', - 'server/variables': rootPath + '/resources/js/src/server/variables.ts', - 'setup/scripts': rootPath + '/resources/js/src/setup/scripts.ts', - 'shortcuts_handler': rootPath + '/resources/js/src/shortcuts_handler.ts', - 'sql': rootPath + '/resources/js/src/sql.ts', - 'table/change': rootPath + '/resources/js/src/table/change.ts', - 'table/chart': rootPath + '/resources/js/src/table/chart.ts', - 'table/find_replace': rootPath + '/resources/js/src/table/find_replace.ts', - 'table/gis_visualization': rootPath + '/resources/js/src/table/gis_visualization.ts', - 'table/operations': rootPath + '/resources/js/src/table/operations.ts', - 'table/relation': rootPath + '/resources/js/src/table/relation.ts', - 'table/select': rootPath + '/resources/js/src/table/select.ts', - 'table/structure': rootPath + '/resources/js/src/table/structure.ts', - 'table/tracking': rootPath + '/resources/js/src/table/tracking.ts', - 'table/zoom_search': rootPath + '/resources/js/src/table/zoom_search.ts', - 'transformations/image_upload': rootPath + '/resources/js/src/transformations/image_upload.ts', - 'transformations/json': rootPath + '/resources/js/src/transformations/json.ts', - 'transformations/json_editor': rootPath + '/resources/js/src/transformations/json_editor.ts', - 'transformations/sql_editor': rootPath + '/resources/js/src/transformations/sql_editor.ts', - 'transformations/xml': rootPath + '/resources/js/src/transformations/xml.ts', - 'transformations/xml_editor': rootPath + '/resources/js/src/transformations/xml_editor.ts', - 'triggers': rootPath + '/resources/js/src/triggers.ts', - 'u2f': rootPath + '/resources/js/src/u2f.ts', - 'validator-messages': rootPath + '/resources/js/src/validator-messages.ts', - 'webauthn': rootPath + '/resources/js/src/webauthn.ts', + 'codemirror/addon/lint/sql-lint': rootPath + '/resources/js/codemirror/addon/lint/sql-lint.ts', + 'console': { import: rootPath + '/resources/js/console.ts', library: { name: 'Console', type: 'window', export: 'Console' } }, + 'datetimepicker': rootPath + '/resources/js/datetimepicker.ts', + 'database/central_columns': rootPath + '/resources/js/database/central_columns.ts', + 'database/events': rootPath + '/resources/js/database/events.ts', + 'database/multi_table_query': rootPath + '/resources/js/database/multi_table_query.ts', + 'database/operations': rootPath + '/resources/js/database/operations.ts', + 'database/query_generator': rootPath + '/resources/js/database/query_generator.ts', + 'database/routines': rootPath + '/resources/js/database/routines.ts', + 'database/search': rootPath + '/resources/js/database/search.ts', + 'database/structure': rootPath + '/resources/js/database/structure.ts', + 'database/tracking': rootPath + '/resources/js/database/tracking.ts', + 'designer/init': rootPath + '/resources/js/designer/init.ts', + 'drag_drop_import': rootPath + '/resources/js/drag_drop_import.ts', + 'error_report': rootPath + '/resources/js/error_report.ts', + 'export': rootPath + '/resources/js/export.ts', + 'export_output': rootPath + '/resources/js/export_output.ts', + 'gis_data_editor': rootPath + '/resources/js/gis_data_editor.ts', + 'home': rootPath + '/resources/js/home.ts', + 'import': rootPath + '/resources/js/import.ts', + 'jquery.sortable-table': rootPath + '/resources/js/jquery.sortable-table.ts', + 'main': rootPath + '/resources/js/main.ts', + 'makegrid': rootPath + '/resources/js/makegrid.ts', + 'menu_resizer': rootPath + '/resources/js/menu_resizer.ts', + 'multi_column_sort': rootPath + '/resources/js/multi_column_sort.ts', + 'normalization': rootPath + '/resources/js/normalization.ts', + 'replication': rootPath + '/resources/js/replication.ts', + 'server/databases': rootPath + '/resources/js/server/databases.ts', + 'server/plugins': rootPath + '/resources/js/server/plugins.ts', + 'server/privileges': rootPath + '/resources/js/server/privileges.ts', + 'server/status/monitor': rootPath + '/resources/js/server/status/monitor.ts', + 'server/status/processes': rootPath + '/resources/js/server/status/processes.ts', + 'server/status/queries': rootPath + '/resources/js/server/status/queries.ts', + 'server/status/variables': rootPath + '/resources/js/server/status/variables.ts', + 'server/user_groups': rootPath + '/resources/js/server/user_groups.ts', + 'server/variables': rootPath + '/resources/js/server/variables.ts', + 'setup/scripts': rootPath + '/resources/js/setup/scripts.ts', + 'shortcuts_handler': rootPath + '/resources/js/shortcuts_handler.ts', + 'sql': rootPath + '/resources/js/sql.ts', + 'table/change': rootPath + '/resources/js/table/change.ts', + 'table/chart': rootPath + '/resources/js/table/chart.ts', + 'table/find_replace': rootPath + '/resources/js/table/find_replace.ts', + 'table/gis_visualization': rootPath + '/resources/js/table/gis_visualization.ts', + 'table/operations': rootPath + '/resources/js/table/operations.ts', + 'table/relation': rootPath + '/resources/js/table/relation.ts', + 'table/select': rootPath + '/resources/js/table/select.ts', + 'table/structure': rootPath + '/resources/js/table/structure.ts', + 'table/tracking': rootPath + '/resources/js/table/tracking.ts', + 'table/zoom_search': rootPath + '/resources/js/table/zoom_search.ts', + 'transformations/image_upload': rootPath + '/resources/js/transformations/image_upload.ts', + 'transformations/json': rootPath + '/resources/js/transformations/json.ts', + 'transformations/json_editor': rootPath + '/resources/js/transformations/json_editor.ts', + 'transformations/sql_editor': rootPath + '/resources/js/transformations/sql_editor.ts', + 'transformations/xml': rootPath + '/resources/js/transformations/xml.ts', + 'transformations/xml_editor': rootPath + '/resources/js/transformations/xml_editor.ts', + 'triggers': rootPath + '/resources/js/triggers.ts', + 'u2f': rootPath + '/resources/js/u2f.ts', + 'validator-messages': rootPath + '/resources/js/validator-messages.ts', + 'webauthn': rootPath + '/resources/js/webauthn.ts', }, output: { filename: '[name].js', @@ -163,7 +163,7 @@ module.exports = [ }, { name: 'OpenLayers', - entry: rootPath + '/resources/js/src/ol.mjs', + entry: rootPath + '/resources/js/ol.mjs', devtool: 'source-map', mode: 'production', performance: { From a39a8d29ea951951fe17032ddc7725fafd28ea12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 22 May 2025 14:59:08 -0300 Subject: [PATCH 3/4] Import OpenLayers directly and remove resources/js/ol.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OpenLayers code is extracted into the public/js/vendor/openlayers/openlayers.js file. Signed-off-by: Maurício Meneghini Fauth --- bin/internal/check-release-excludes.sh | 2 +- resources/js/gis_data_editor.ts | 12 +-- resources/js/global.d.ts | 1 - resources/js/ol.mjs | 36 --------- resources/js/table/gis_visualization.ts | 79 +++++++++++-------- .../Table/GisVisualizationController.php | 2 +- webpack.config.cjs | 37 +++------ 7 files changed, 61 insertions(+), 108 deletions(-) delete mode 100644 resources/js/ol.mjs diff --git a/bin/internal/check-release-excludes.sh b/bin/internal/check-release-excludes.sh index 1309291991..e819583a50 100755 --- a/bin/internal/check-release-excludes.sh +++ b/bin/internal/check-release-excludes.sh @@ -58,7 +58,7 @@ validateExtension() { fi ;; resources/js/*) - if [ "${extension}" != "ts" ] && [ "${extension}" != "mjs" ]; then + if [ "${extension}" != "ts" ]; then foundFileExt fi ;; diff --git a/resources/js/gis_data_editor.ts b/resources/js/gis_data_editor.ts index 17a9b68c55..fd5c041c5e 100644 --- a/resources/js/gis_data_editor.ts +++ b/resources/js/gis_data_editor.ts @@ -252,16 +252,12 @@ function makeGeometryInputs (gisData): string { * @param {function} resolve */ function loadJSAndGISEditor (resolve) { - let script; - - script = document.createElement('script'); - script.src = 'js/table/gis_visualization.js'; - document.head.appendChild(script); + let script: HTMLScriptElement; // OpenLayers.js is BIG and takes time. So asynchronous loading would not work. // Load the JS and do a callback to load the content for the GIS Editor. script = document.createElement('script'); - script.src = 'js/vendor/openlayers/OpenLayers.js'; + script.src = 'js/vendor/openlayers/openlayers.js'; script.addEventListener('load', function () { resolve(); }); @@ -272,6 +268,10 @@ function loadJSAndGISEditor (resolve) { document.head.appendChild(script); + script = document.createElement('script'); + script.src = 'js/table/gis_visualization.js'; + document.head.appendChild(script); + gisEditorLoaded = true; } diff --git a/resources/js/global.d.ts b/resources/js/global.d.ts index 967f883969..e3d5f73324 100644 --- a/resources/js/global.d.ts +++ b/resources/js/global.d.ts @@ -4,7 +4,6 @@ interface Window { mysqlDocTemplate: string; themeImagePath: string; firstDayOfCalendar: string; - ol: any; opera: any; zxcvbnts: any; msCrypto: any; diff --git a/resources/js/ol.mjs b/resources/js/ol.mjs deleted file mode 100644 index 620f4da4d6..0000000000 --- a/resources/js/ol.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { Attribution, MousePosition, Zoom } from 'ol/control.js'; -import { createStringXY } from 'ol/coordinate.js'; -import { isEmpty } from 'ol/extent.js'; -import { LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from 'ol/geom.js'; -import { Tile, Vector as VectorLayer } from 'ol/layer.js'; -import { OSM, Vector as VectorSource } from 'ol/source.js'; -import { Circle, Fill, Stroke, Style, Text } from 'ol/style.js'; -import { Feature, Map, View } from 'ol'; -import { get as getProjection } from 'ol/proj.js'; - -const ol = { - control: { - Attribution, MousePosition, Zoom - }, - coordinate: { - createStringXY - }, - extent: { - isEmpty - }, - geom: { - LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon - }, - layer: { - Tile, Vector: VectorLayer - }, - source: { - OSM, Vector: VectorSource - }, - style: { - Circle, Fill, Stroke, Style, Text - }, - Feature, Map, View, getProjection -}; - -export default ol; diff --git a/resources/js/table/gis_visualization.ts b/resources/js/table/gis_visualization.ts index 54405f92ad..fd70631bfa 100644 --- a/resources/js/table/gis_visualization.ts +++ b/resources/js/table/gis_visualization.ts @@ -1,6 +1,15 @@ import $ from 'jquery'; import { AJAX } from '../modules/ajax.ts'; import { escapeHtml } from '../modules/functions/escape.ts'; +import { Feature, Map, View } from 'ol'; +import { Attribution, MousePosition, Zoom } from 'ol/control'; +import { createStringXY } from 'ol/coordinate'; +import { isEmpty } from 'ol/extent'; +import { LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from 'ol/geom'; +import { Tile, Vector as VectorLayer } from 'ol/layer'; +import { get as getProjection } from 'ol/proj'; +import { OSM, Vector as VectorSource } from 'ol/source'; +import { Circle, Fill, Stroke, Style, Text } from 'ol/style'; /** * @fileoverview functions used for visualizing GIS data @@ -428,11 +437,11 @@ class OlVisualization extends GisVisualization { } drawOpenLayers () { - if (typeof window.ol === 'undefined') { + if (! document.querySelector('script[src*="js/vendor/openlayers/openlayers.js"]')) { return undefined; } - const olCss = 'js/vendor/openlayers/theme/ol.css'; + const olCss = 'js/vendor/openlayers/openlayers.css'; if (! document.querySelector('link[rel="stylesheet"][href="' + olCss + '"]')) { const link = document.createElement('link'); link.rel = 'stylesheet'; @@ -441,28 +450,28 @@ class OlVisualization extends GisVisualization { document.head.appendChild(link); } - const vectorSource = new window.ol.source.Vector({ + const vectorSource = new VectorSource({ features: getFeaturesFromOpenLayersData(this.data), }); - const map = new window.ol.Map({ + const map = new Map({ target: this.target, layers: [ - new window.ol.layer.Tile({ source: new window.ol.source.OSM() }), - new window.ol.layer.Vector({ source: vectorSource }), + new Tile({ source: new OSM() }), + new VectorLayer({ source: vectorSource }), ], - view: new window.ol.View({ center: [0, 0], zoom: 4 }), + view: new View({ center: [0, 0], zoom: 4 }), controls: [ - new window.ol.control.MousePosition({ - coordinateFormat: window.ol.coordinate.createStringXY(4), + new MousePosition({ + coordinateFormat: createStringXY(4), projection: 'EPSG:4326' }), - new window.ol.control.Zoom, - new window.ol.control.Attribution + new Zoom, + new Attribution ] }); const extent = vectorSource.getExtent(); - if (! window.ol.extent.isEmpty(extent)) { + if (! isEmpty(extent)) { map.getView().fit(extent, { padding: [20, 20, 20, 20] }); } @@ -502,40 +511,40 @@ function getFeaturesFromOpenLayersData (geometries: any[]): any[] { let olGeometry: any = null; const style: any = {}; if (geometry.geometry.type === 'LineString') { - olGeometry = new window.ol.geom.LineString(geometry.geometry.coordinates); - style.stroke = new window.ol.style.Stroke(geometry.style.stroke); + olGeometry = new LineString(geometry.geometry.coordinates); + style.stroke = new Stroke(geometry.style.stroke); } else if (geometry.geometry.type === 'MultiLineString') { - olGeometry = new window.ol.geom.MultiLineString(geometry.geometry.coordinates); - style.stroke = new window.ol.style.Stroke(geometry.style.stroke); + olGeometry = new MultiLineString(geometry.geometry.coordinates); + style.stroke = new Stroke(geometry.style.stroke); } else if (geometry.geometry.type === 'MultiPoint') { - olGeometry = new window.ol.geom.MultiPoint(geometry.geometry.coordinates); - style.image = new window.ol.style.Circle({ - fill: new window.ol.style.Fill(geometry.style.circle.fill), - stroke: new window.ol.style.Stroke(geometry.style.circle.stroke), + olGeometry = new MultiPoint(geometry.geometry.coordinates); + style.image = new Circle({ + fill: new Fill(geometry.style.circle.fill), + stroke: new Stroke(geometry.style.circle.stroke), radius: geometry.style.circle.radius, }); } else if (geometry.geometry.type === 'MultiPolygon') { - olGeometry = new window.ol.geom.MultiPolygon(geometry.geometry.coordinates); - style.fill = new window.ol.style.Fill(geometry.style.fill); - style.stroke = new window.ol.style.Stroke(geometry.style.stroke); + olGeometry = new MultiPolygon(geometry.geometry.coordinates); + style.fill = new Fill(geometry.style.fill); + style.stroke = new Stroke(geometry.style.stroke); } else if (geometry.geometry.type === 'Point') { - olGeometry = new window.ol.geom.Point(geometry.geometry.coordinates); - style.image = new window.ol.style.Circle({ - fill: new window.ol.style.Fill(geometry.style.circle.fill), - stroke: new window.ol.style.Stroke(geometry.style.circle.stroke), + olGeometry = new Point(geometry.geometry.coordinates); + style.image = new Circle({ + fill: new Fill(geometry.style.circle.fill), + stroke: new Stroke(geometry.style.circle.stroke), radius: geometry.style.circle.radius, }); } else if (geometry.geometry.type === 'Polygon') { - olGeometry = new window.ol.geom.Polygon(geometry.geometry.coordinates); - style.fill = new window.ol.style.Fill(geometry.style.fill); - style.stroke = new window.ol.style.Stroke(geometry.style.stroke); + olGeometry = new Polygon(geometry.geometry.coordinates); + style.fill = new Fill(geometry.style.fill); + style.stroke = new Stroke(geometry.style.stroke); } else { throw new Error(); } if (geometry.geometry.srid !== 3857) { const source = 'EPSG:' + (geometry.geometry.srid !== 0 ? geometry.geometry.srid : 4326); - const sourceProj = window.ol.getProjection(source); + const sourceProj = getProjection(source); if (sourceProj) { olGeometry = olGeometry.transform( @@ -546,11 +555,11 @@ function getFeaturesFromOpenLayersData (geometries: any[]): any[] { } if (geometry.style.text) { - style.text = new window.ol.style.Text(geometry.style.text); + style.text = new Text(geometry.style.text); } - const feature = new window.ol.Feature(olGeometry); - feature.setStyle(new window.ol.style.Style(style)); + const feature = new Feature(olGeometry); + feature.setStyle(new Style(style)); features.push(feature); } @@ -572,7 +581,7 @@ class GisVisualizationController { $(document).on('click', '#useOsmAsBaseLayerSwitch', this.boundOnChoiceChange); - if (typeof window.ol === 'undefined') { + if (! document.querySelector('script[src*="js/vendor/openlayers/openlayers.js"]')) { $('#useOsmAsBaseLayerSwitch, #useOsmAsBaseLayerSwitchLabel').hide(); $('#useOsmAsBaseLayerSwitch').prop('checked', false); } diff --git a/src/Controllers/Table/GisVisualizationController.php b/src/Controllers/Table/GisVisualizationController.php index ecd7b74435..eeb9745d85 100644 --- a/src/Controllers/Table/GisVisualizationController.php +++ b/src/Controllers/Table/GisVisualizationController.php @@ -124,7 +124,7 @@ final readonly class GisVisualizationController implements InvocableController return $response->write((string) $output); } - $this->response->addScriptFiles(['vendor/openlayers/OpenLayers.js', 'table/gis_visualization.js']); + $this->response->addScriptFiles(['vendor/openlayers/openlayers.js', 'table/gis_visualization.js']); // If all the rows contain SRID, use OpenStreetMaps on the initial loading. $useBaseLayer = isset($_POST['redraw']) ? isset($_POST['useBaseLayer']) : $visualization->hasSrid(); diff --git a/webpack.config.cjs b/webpack.config.cjs index 1f35585876..aa0e55ea35 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -1,5 +1,4 @@ const path = require('path'); -const webpack = require('webpack'); const autoprefixer = require('autoprefixer'); const CopyPlugin = require('copy-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -93,6 +92,14 @@ module.exports = [ minChunks: 2, minSize: 1, }, + openLayers: { + priority: 10, + test: /[\\/]node_modules[\\/](ol|rbush)[\\/]/, + name: 'openlayers', + filename: 'vendor/[name]/[name].js', + chunks: 'all', + enforce: true, + }, }, }, }, @@ -150,7 +157,7 @@ module.exports = [ { from: rootPath + '/node_modules/jquery-uitablefilter/jquery.uitablefilter.js', to: publicPath + '/js/vendor/jquery/jquery.uitablefilter.js' }, { from: rootPath + '/node_modules/tablesorter/dist/js/jquery.tablesorter.js', to: publicPath + '/js/vendor/jquery/jquery.tablesorter.js' }, { from: rootPath + '/node_modules/jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.js', to: publicPath + '/js/vendor/jquery/jquery-ui-timepicker-addon.js' }, - { from: rootPath + '/node_modules/ol/ol.css', to: publicPath + '/js/vendor/openlayers/theme/ol.css' }, + { from: rootPath + '/node_modules/ol/ol.css', to: publicPath + '/js/vendor/openlayers/openlayers.css' }, { from: rootPath + '/node_modules/locutus.sprintf/src/php/strings/sprintf.browser.js', to: publicPath + '/js/vendor/sprintf.js' }, { from: rootPath + '/node_modules/chart.js/dist/chart.umd.js', to: publicPath + '/js/vendor/chart.umd.js' }, { from: rootPath + '/node_modules/chart.js/dist/chart.umd.js.map', to: publicPath + '/js/vendor/chart.umd.js.map' }, @@ -161,32 +168,6 @@ module.exports = [ }), ], }, - { - name: 'OpenLayers', - entry: rootPath + '/resources/js/ol.mjs', - devtool: 'source-map', - mode: 'production', - performance: { - hints: false, - maxEntrypointSize: 512000, - maxAssetSize: 512000, - }, - output: { - path: publicPath + '/js/vendor/openlayers', - filename: 'OpenLayers.js', - library: 'ol', - libraryTarget: 'umd', - libraryExport: 'default', - }, - plugins: [ - new webpack.BannerPlugin({ - banner: 'OpenLayers (https://openlayers.org/)\nCopyright 2005-present, OpenLayers Contributors All rights reserved.\nLicensed under BSD 2-Clause License (https://github.com/openlayers/openlayers/blob/main/LICENSE.md)', - }), - ], - optimization: { - minimize: false, - } - }, { name: 'CSS', mode: 'none', From 3eb9ac92a34f37ec377a493bce5a6dd5a12f750d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 22 May 2025 18:09:06 -0300 Subject: [PATCH 4/4] Import Bootstrap directly using Webpack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- package.json | 2 +- resources/js/database/events.ts | 7 ++-- resources/js/database/routines.ts | 9 +++-- resources/js/database/structure.ts | 3 +- resources/js/global.d.ts | 1 - resources/js/makegrid.ts | 13 ++++--- resources/js/modules/ajax-message.ts | 7 ++-- resources/js/modules/functions.ts | 13 ++++--- .../js/modules/navigation/event-loader.ts | 5 ++- resources/js/server/privileges.ts | 3 +- resources/js/server/status/monitor.ts | 37 ++++++++++--------- resources/js/sql.ts | 3 +- resources/js/triggers.ts | 7 ++-- resources/templates/setup/base.twig | 2 +- src/Header.php | 2 +- tests/unit/HeaderTest.php | 2 +- webpack.config.cjs | 13 ++++--- yarn.lock | 8 ++-- 18 files changed, 74 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index 29137ced94..035b669adc 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@zxcvbn-ts/core": "^3.0.4", "autoprefixer": "^10.4.21", "babel-loader": "^9.1.2", - "bootstrap": "5.3.5", + "bootstrap": "^5.3.5", "chart.js": "^4.4.3", "chartjs-adapter-date-fns": "^3.0.0", "chartjs-plugin-zoom": "^2.0.1", diff --git a/resources/js/database/events.ts b/resources/js/database/events.ts index 068d3b9876..815366b764 100644 --- a/resources/js/database/events.ts +++ b/resources/js/database/events.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from '../modules/ajax.ts'; import { addDatepicker, getSqlEditor, slidingMessage } from '../modules/functions.ts'; import { Navigation } from '../modules/navigation.ts'; @@ -121,7 +122,7 @@ const DatabaseEvents = { eventsExportModal.querySelector('.modal-body').innerHTML = eventsExportTextarea; }); - window.bootstrap.Modal.getOrCreateInstance(eventsExportModal).show(); + bootstrap.Modal.getOrCreateInstance(eventsExportModal).show(); } }, editorDialog: function (isNew, $this) { @@ -184,7 +185,7 @@ const DatabaseEvents = { // Item created successfully ajaxRemoveMessage($msg); slidingMessage(data.message); - window.bootstrap.Modal.getOrCreateInstance('#eventsEditorModal').hide(); + bootstrap.Modal.getOrCreateInstance('#eventsEditorModal').hide(); // If we are in 'edit' mode, we must // remove the reference to the old row. if (isEditMode && $editRow !== null) { @@ -333,7 +334,7 @@ const DatabaseEvents = { '' + window.Messages.strLoading + ''; }); - window.bootstrap.Modal.getOrCreateInstance(eventsEditorModal).show(); + bootstrap.Modal.getOrCreateInstance(eventsEditorModal).show(); }); }, diff --git a/resources/js/database/routines.ts b/resources/js/database/routines.ts index 572e589a0b..ce4124e771 100644 --- a/resources/js/database/routines.ts +++ b/resources/js/database/routines.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from '../modules/ajax.ts'; import { addDatepicker, getSqlEditor, slidingMessage } from '../modules/functions.ts'; import { Navigation } from '../modules/navigation.ts'; @@ -137,7 +138,7 @@ const DatabaseRoutines = { routinesExportModal.querySelector('.modal-body').innerHTML = routinesExportTextarea; }); - window.bootstrap.Modal.getOrCreateInstance(routinesExportModal).show(); + bootstrap.Modal.getOrCreateInstance(routinesExportModal).show(); } }, editorDialog: function (isNew, $this) { @@ -203,7 +204,7 @@ const DatabaseRoutines = { // Item created successfully ajaxRemoveMessage($msg); slidingMessage(data.message); - window.bootstrap.Modal.getOrCreateInstance('#routinesEditorModal').hide(); + bootstrap.Modal.getOrCreateInstance('#routinesEditorModal').hide(); var tableId = '#' + data.tableType + 'Table'; // If we are in 'edit' mode, we must @@ -356,7 +357,7 @@ const DatabaseRoutines = { '' + window.Messages.strLoading + ''; }); - window.bootstrap.Modal.getOrCreateInstance(routinesEditorModal).show(); + bootstrap.Modal.getOrCreateInstance(routinesEditorModal).show(); }); }, @@ -810,7 +811,7 @@ const DatabaseRoutines = { } const routinesExecuteModal = document.getElementById('routinesExecuteModal'); - const modal = window.bootstrap.Modal.getOrCreateInstance(routinesExecuteModal); + const modal = bootstrap.Modal.getOrCreateInstance(routinesExecuteModal); const routinesExecuteButtonEventHandler = function () { /** diff --git a/resources/js/database/structure.ts b/resources/js/database/structure.ts index efd705f778..9275be3e49 100644 --- a/resources/js/database/structure.ts +++ b/resources/js/database/structure.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from '../modules/ajax.ts'; import { getForeignKeyCheckboxLoader, loadForeignKeyCheckbox } from '../modules/functions.ts'; import { Navigation } from '../modules/navigation.ts'; @@ -86,7 +87,7 @@ function fetchRealRowCount ($target) { function addTooltipToFavoriteIcons (): void { document.querySelectorAll('.favorite_table_anchor').forEach((favoriteTableAnchor: HTMLElement): void => { - new window.bootstrap.Tooltip(favoriteTableAnchor); + new bootstrap.Tooltip(favoriteTableAnchor); }); } diff --git a/resources/js/global.d.ts b/resources/js/global.d.ts index e3d5f73324..46768aa44d 100644 --- a/resources/js/global.d.ts +++ b/resources/js/global.d.ts @@ -9,7 +9,6 @@ interface Window { msCrypto: any; u2f: any; variableNames: string[]; - bootstrap: typeof bootstrap; sprintf(format: string, ...values: (string|number)[]): string; } diff --git a/resources/js/makegrid.ts b/resources/js/makegrid.ts index dc0f61718c..c68c5265ff 100644 --- a/resources/js/makegrid.ts +++ b/resources/js/makegrid.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from './modules/ajax.ts'; import { addDatepicker, @@ -1758,7 +1759,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine .on('mouseleave', function () { g.showReorderHint = false; - window.bootstrap.Tooltip.getOrCreateInstance(this, { title: g.updateHint(), html: true }) + bootstrap.Tooltip.getOrCreateInstance(this, { title: g.updateHint(), html: true }) .setContent({ '.tooltip-inner': g.updateHint() }); }) .on('dblclick', function (e) { @@ -1835,7 +1836,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine const $colVisibTh = $(colVisibTh).slice(0, 1); colVisibTh.forEach((tableHeader: HTMLElement) => { - window.bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: window.Messages.strColVisibHint }) + bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: window.Messages.strColVisibHint }) .setContent({ '.tooltip-inner': window.Messages.strColVisibHint }); }); @@ -2284,7 +2285,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine return; } - window.bootstrap.Tooltip.getOrCreateInstance(editRowAnchor.querySelector('a')); + bootstrap.Tooltip.getOrCreateInstance(editRowAnchor.querySelector('a')); }); } }; @@ -2379,7 +2380,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine // create tooltip for each with draggable class t.querySelectorAll('th.draggable').forEach((tableHeader: HTMLElement) => { - window.bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) + bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) .setContent({ '.tooltip-inner': g.updateHint() }); }); @@ -2390,7 +2391,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine g.showMultiSortHint = true; t.querySelectorAll('th.draggable').forEach((tableHeader: HTMLElement) => { - window.bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) + bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) .setContent({ '.tooltip-inner': g.updateHint() }); }); }) @@ -2399,7 +2400,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine g.showMultiSortHint = false; t.querySelectorAll('th.draggable').forEach((tableHeader: HTMLElement) => { - window.bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) + bootstrap.Tooltip.getOrCreateInstance(tableHeader, { title: g.updateHint(), html: true }) .setContent({ '.tooltip-inner': g.updateHint() }); }); }); diff --git a/resources/js/modules/ajax-message.ts b/resources/js/modules/ajax-message.ts index 1348ed3627..c2f3cdda17 100644 --- a/resources/js/modules/ajax-message.ts +++ b/resources/js/modules/ajax-message.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import highlightSql from './sql-highlight.ts'; /** @@ -114,7 +115,7 @@ const ajaxShowMessage = function (message = null, timeout = null, type = null) { $retval .delay(newTimeOut) .fadeOut('medium', function () { - window.bootstrap.Tooltip.getInstance(this)?.dispose(); + bootstrap.Tooltip.getInstance(this)?.dispose(); // Remove the notification $(this).remove(); @@ -129,7 +130,7 @@ const ajaxShowMessage = function (message = null, timeout = null, type = null) { * Add a tooltip to the notification to let the user know that they * can dismiss the ajax notification by clicking on it. */ - window.bootstrap.Tooltip.getOrCreateInstance($retval.get(0), { title: window.Messages.strDismiss }) + bootstrap.Tooltip.getOrCreateInstance($retval.get(0), { title: window.Messages.strDismiss }) .setContent({ '.tooltip-inner': window.Messages.strDismiss }); } @@ -150,7 +151,7 @@ const ajaxShowMessage = function (message = null, timeout = null, type = null) { */ const ajaxRemoveMessage = function ($thisMessageBox: JQuery | boolean): void { if ($thisMessageBox !== undefined && typeof $thisMessageBox !== 'boolean' && $thisMessageBox instanceof $) { - window.bootstrap.Tooltip.getInstance($thisMessageBox.get(0))?.dispose(); + bootstrap.Tooltip.getInstance($thisMessageBox.get(0))?.dispose(); $thisMessageBox .stop(true, true) diff --git a/resources/js/modules/functions.ts b/resources/js/modules/functions.ts index 5f14a0e566..451e76364e 100644 --- a/resources/js/modules/functions.ts +++ b/resources/js/modules/functions.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from './ajax.ts'; import { Navigation } from './navigation.ts'; import { CommonParams } from './common.ts'; @@ -147,7 +148,7 @@ export function addDatepicker ($thisElement, type = undefined, options = undefin if (type === 'time') { $thisElement.timepicker($.extend(defaultOptions, options)); // Add a tip regarding entering MySQL allowed-values for TIME data-type - window.bootstrap.Tooltip.getOrCreateInstance($thisElement.get(0), { title: window.Messages.strMysqlAllowedValuesTipTime }) + bootstrap.Tooltip.getOrCreateInstance($thisElement.get(0), { title: window.Messages.strMysqlAllowedValuesTipTime }) .setContent({ '.tooltip-inner': window.Messages.strMysqlAllowedValuesTipTime }); } else { $thisElement.datetimepicker($.extend(defaultOptions, options)); @@ -197,10 +198,10 @@ export function addDateTimePicker () { // Add a tip regarding entering MySQL allowed-values for TIME and DATE data-type if (this.classList.contains('timefield')) { - window.bootstrap.Tooltip.getOrCreateInstance(this, { title: window.Messages.strMysqlAllowedValuesTipTime }) + bootstrap.Tooltip.getOrCreateInstance(this, { title: window.Messages.strMysqlAllowedValuesTipTime }) .setContent({ '.tooltip-inner': window.Messages.strMysqlAllowedValuesTipTime }); } else if (this.classList.contains('datefield')) { - window.bootstrap.Tooltip.getOrCreateInstance(this, { title: window.Messages.strMysqlAllowedValuesTipDate }) + bootstrap.Tooltip.getOrCreateInstance(this, { title: window.Messages.strMysqlAllowedValuesTipDate }) .setContent({ '.tooltip-inner': window.Messages.strMysqlAllowedValuesTipDate }); } }); @@ -1527,7 +1528,7 @@ export function dismissNotifications () { message = $(this).hasClass('copyQueryBtn') ? window.Messages.strCopyToClipboard : window.Messages.strEditQuery; } - window.bootstrap.Tooltip.getOrCreateInstance('.ajax_notification', { title: message }) + bootstrap.Tooltip.getOrCreateInstance('.ajax_notification', { title: message }) .setContent({ '.tooltip-inner': message }); }); @@ -2496,7 +2497,7 @@ export function onloadEnumSetEditor (): void { centralColumnsModal = document.getElementById('centralColumnsModal'); } - const modal = window.bootstrap.Modal.getOrCreateInstance(centralColumnsModal); + const modal = bootstrap.Modal.getOrCreateInstance(centralColumnsModal); centralColumnsModal.addEventListener( 'shown.bs.modal', @@ -2834,7 +2835,7 @@ export function showHints ($div: JQuery | undefined = undefined) { $newDiv.get(0).querySelectorAll('.pma_hint').forEach((hintElement: HTMLElement): void => { const content = hintElement.querySelector('span').textContent; - window.bootstrap.Tooltip.getOrCreateInstance(hintElement, { title: content }) + bootstrap.Tooltip.getOrCreateInstance(hintElement, { title: content }) .setContent({ '.tooltip-inner': content }); }); } diff --git a/resources/js/modules/navigation/event-loader.ts b/resources/js/modules/navigation/event-loader.ts index 2939900ca4..1e21781fb0 100644 --- a/resources/js/modules/navigation/event-loader.ts +++ b/resources/js/modules/navigation/event-loader.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { CommonParams } from '../common.ts'; import { Navigation } from '../navigation.ts'; import handleCreateViewModal from '../functions/handleCreateViewModal.ts'; @@ -8,10 +9,10 @@ import isStorageSupported from '../functions/isStorageSupported.ts'; function updateFavoriteTableButton (buttonId: string, htmlContent: string): void { const currentButton = document.getElementById(buttonId); // Remove current tooltip before changing the button - window.bootstrap.Tooltip.getInstance(currentButton)?.dispose(); + bootstrap.Tooltip.getInstance(currentButton)?.dispose(); currentButton.outerHTML = htmlContent; // Enable tooltip of the new button - new window.bootstrap.Tooltip(document.getElementById(buttonId)); + new bootstrap.Tooltip(document.getElementById(buttonId)); } /** diff --git a/resources/js/server/privileges.ts b/resources/js/server/privileges.ts index 9acfe92118..4a1c3a2416 100644 --- a/resources/js/server/privileges.ts +++ b/resources/js/server/privileges.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from '../modules/ajax.ts'; import { checkPassword, @@ -68,7 +69,7 @@ const EditUserGroup = { return; } - const modal = window.bootstrap.Modal.getInstance(editUserGroupModal); + const modal = bootstrap.Modal.getInstance(editUserGroupModal); const modalBody = editUserGroupModal.querySelector('.modal-body'); const saveButton = editUserGroupModal.querySelector('#editUserGroupModalSaveButton'); diff --git a/resources/js/server/status/monitor.ts b/resources/js/server/status/monitor.ts index 8e34fd6752..9d17ce363b 100644 --- a/resources/js/server/status/monitor.ts +++ b/resources/js/server/status/monitor.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from '../../modules/ajax.ts'; import { addDatepicker, prettyProfilingNum } from '../../modules/functions.ts'; import { CommonParams } from '../../modules/common.ts'; @@ -24,7 +25,7 @@ var chartSize; var monitorSettings; function serverResponseError () { - window.bootstrap.Modal.getOrCreateInstance('#serverResponseErrorModal').show(); + bootstrap.Modal.getOrCreateInstance('#serverResponseErrorModal').show(); } function serverResponseErrorModalReloadEventHandler () { @@ -674,7 +675,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { json = JSON.parse(data); } catch (err) { alert(window.Messages.strFailedParsingConfig); - window.bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); + bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); return; } @@ -682,7 +683,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { // Basic check, is this a monitor config json? if (! json || ! json.monitorCharts || ! json.monitorCharts) { alert(window.Messages.strFailedParsingConfig); - window.bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); + bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); return; } @@ -706,7 +707,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { rebuildGrid(); } - window.bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); + bootstrap.Modal.getOrCreateInstance('#monitorImportConfigModal').hide(); }; if (input.files[0]) { @@ -765,7 +766,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { if (typeof data !== 'undefined' && data.success === true) { logVars = data.message; } else { - window.bootstrap.Modal.getOrCreateInstance('#monitorInstructionsModal').hide(); + bootstrap.Modal.getOrCreateInstance('#monitorInstructionsModal').hide(); serverResponseError(); return; @@ -1019,7 +1020,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { && typeof window.localStorage.monitorVersion !== 'undefined' && monitorProtocolVersion !== window.localStorage.monitorVersion ) { - window.bootstrap.Modal.getOrCreateInstance('#incompatibleMonitorConfigModal').show(); + bootstrap.Modal.getOrCreateInstance('#incompatibleMonitorConfigModal').show(); } } @@ -1352,12 +1353,12 @@ AJAX.registerOnload('server/status/monitor.js', function () { const logAnalyseModal = document.getElementById('logAnalyseModal'); function logAnalyseModalSlowLogEventHandler () { - window.bootstrap.Modal.getOrCreateInstance(logAnalyseModal).hide(); + bootstrap.Modal.getOrCreateInstance(logAnalyseModal).hide(); loadLog('slow', min, max); } function logAnalyseModalGeneralLogEventHandler () { - window.bootstrap.Modal.getOrCreateInstance(logAnalyseModal).hide(); + bootstrap.Modal.getOrCreateInstance(logAnalyseModal).hide(); loadLog('general', min, max); } @@ -1400,7 +1401,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { logAnalyseModalGeneralLogButton?.removeEventListener('click', logAnalyseModalGeneralLogEventHandler); }); - window.bootstrap.Modal.getOrCreateInstance(logAnalyseModal).show(); + bootstrap.Modal.getOrCreateInstance(logAnalyseModal).show(); } function loadLog (type: string, min: Date, max: Date) { @@ -1664,7 +1665,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { } }); - window.bootstrap.Modal.getOrCreateInstance(analysingLogsModal).show(); + bootstrap.Modal.getOrCreateInstance(analysingLogsModal).show(); var url = 'index.php?route=/server/status/monitor/slow-log'; if (opts.src === 'general') { @@ -1686,15 +1687,15 @@ AJAX.registerOnload('server/status/monitor.js', function () { if (typeof data !== 'undefined' && data.success === true) { logData = data.message; } else { - window.bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); + bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); serverResponseError(); return; } if (logData.rows.length === 0) { - window.bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); - window.bootstrap.Modal.getOrCreateInstance('#analysingLogsNoDataFoundModal').show(); + bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); + bootstrap.Modal.getOrCreateInstance('#analysingLogsNoDataFoundModal').show(); return; } @@ -1743,7 +1744,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { const analysingLogsLogDataLoadedModal = document.getElementById('analysingLogsLogDataLoadedModal'); function analysingLogsLogDataLoadedModalJumpEventHandler () { - window.bootstrap.Modal.getOrCreateInstance(analysingLogsLogDataLoadedModal).hide(); + bootstrap.Modal.getOrCreateInstance(analysingLogsLogDataLoadedModal).hide(); $(document).scrollTop($('#logTable').offset().top); } @@ -1757,8 +1758,8 @@ AJAX.registerOnload('server/status/monitor.js', function () { analysingLogsLogDataLoadedModalJumpButton?.removeEventListener('click', analysingLogsLogDataLoadedModalJumpEventHandler); }); - window.bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); - window.bootstrap.Modal.getOrCreateInstance(analysingLogsLogDataLoadedModal).show(); + bootstrap.Modal.getOrCreateInstance(analysingLogsModal).hide(); + bootstrap.Modal.getOrCreateInstance(analysingLogsLogDataLoadedModal).show(); } ); @@ -2016,7 +2017,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { tooltipContent += '
' + window.Messages.strMoreCountColumnExplanation; } - new window.bootstrap.Tooltip(amountColumn.get(0), { title: tooltipContent, html: true }); + new bootstrap.Tooltip(amountColumn.get(0), { title: tooltipContent, html: true }); } $('#logTable').find('table').tablesorter({ @@ -2073,7 +2074,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { } }); - window.bootstrap.Modal.getOrCreateInstance(queryAnalyzerModal).show(); + bootstrap.Modal.getOrCreateInstance(queryAnalyzerModal).show(); } /* Loads and displays the analyzed query data */ diff --git a/resources/js/sql.ts b/resources/js/sql.ts index 8028296657..6c91a7dedf 100644 --- a/resources/js/sql.ts +++ b/resources/js/sql.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from './modules/ajax.ts'; import { checkFormElementInRange, checkSqlQuery, prepareForAjaxRequest } from './modules/functions.ts'; import { Navigation } from './modules/navigation.ts'; @@ -1209,7 +1210,7 @@ function browseForeignDialog ($thisA) { browseForeignModal = document.getElementById('browseForeignModal'); } - const modal = window.bootstrap.Modal.getOrCreateInstance(browseForeignModal); + const modal = bootstrap.Modal.getOrCreateInstance(browseForeignModal); browseForeignModal.addEventListener('hidden.bs.modal', function () { // remove event handlers attached to elements related to dialog diff --git a/resources/js/triggers.ts b/resources/js/triggers.ts index 42160b3d2d..ba1d9717b4 100644 --- a/resources/js/triggers.ts +++ b/resources/js/triggers.ts @@ -1,4 +1,5 @@ import $ from 'jquery'; +import * as bootstrap from 'bootstrap'; import { AJAX } from './modules/ajax.ts'; import { addDatepicker, getSqlEditor, slidingMessage } from './modules/functions.ts'; import { Navigation } from './modules/navigation.ts'; @@ -130,7 +131,7 @@ const DatabaseTriggers = { triggersExportModal.querySelector('.modal-body').innerHTML = triggersExportTextarea; }); - window.bootstrap.Modal.getOrCreateInstance(triggersExportModal).show(); + bootstrap.Modal.getOrCreateInstance(triggersExportModal).show(); } }, editorDialog: function (isNew, $this) { @@ -196,7 +197,7 @@ const DatabaseTriggers = { // Item created successfully ajaxRemoveMessage($msg); slidingMessage(data.message); - window.bootstrap.Modal.getOrCreateInstance('#triggersEditorModal').hide(); + bootstrap.Modal.getOrCreateInstance('#triggersEditorModal').hide(); // If we are in 'edit' mode, we must // remove the reference to the old row. if (isEditMode && $editRow !== null) { @@ -344,7 +345,7 @@ const DatabaseTriggers = { '' + window.Messages.strLoading + ''; }); - window.bootstrap.Modal.getOrCreateInstance(triggersEditorModal).show(); + bootstrap.Modal.getOrCreateInstance(triggersEditorModal).show(); }); }, diff --git a/resources/templates/setup/base.twig b/resources/templates/setup/base.twig index 7f19bf63f2..82e54735bb 100644 --- a/resources/templates/setup/base.twig +++ b/resources/templates/setup/base.twig @@ -9,7 +9,7 @@ - + diff --git a/src/Header.php b/src/Header.php index 2523b50471..8e2de9bab8 100644 --- a/src/Header.php +++ b/src/Header.php @@ -84,7 +84,7 @@ class Header $this->scripts->addFile('vendor/jquery/jquery-migrate.min.js'); $this->scripts->addFile('vendor/sprintf.js'); $this->scripts->addFile('vendor/jquery/jquery-ui.min.js'); - $this->scripts->addFile('vendor/bootstrap/bootstrap.bundle.min.js'); + $this->scripts->addFile('vendor/bootstrap/bootstrap.js'); $this->scripts->addFile('vendor/js.cookie.min.js'); $this->scripts->addFile('vendor/jquery/jquery.validate.min.js'); $this->scripts->addFile('vendor/jquery/jquery-ui-timepicker-addon.js'); diff --git a/tests/unit/HeaderTest.php b/tests/unit/HeaderTest.php index 420c96a586..86fc11ee50 100644 --- a/tests/unit/HeaderTest.php +++ b/tests/unit/HeaderTest.php @@ -278,7 +278,7 @@ class HeaderTest extends AbstractTestCase ['name' => 'vendor/jquery/jquery-migrate.min.js', 'fire' => 0], ['name' => 'vendor/sprintf.js', 'fire' => 0], ['name' => 'vendor/jquery/jquery-ui.min.js', 'fire' => 0], - ['name' => 'vendor/bootstrap/bootstrap.bundle.min.js', 'fire' => 0], + ['name' => 'vendor/bootstrap/bootstrap.js', 'fire' => 0], ['name' => 'vendor/js.cookie.min.js', 'fire' => 0], ['name' => 'vendor/jquery/jquery.validate.min.js', 'fire' => 0], ['name' => 'vendor/jquery/jquery-ui-timepicker-addon.js', 'fire' => 0], diff --git a/webpack.config.cjs b/webpack.config.cjs index aa0e55ea35..e1761be3c7 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -86,11 +86,14 @@ module.exports = [ runtimeChunk: 'single', splitChunks: { cacheGroups: { - shared: { - name: 'shared', + shared: { name: 'shared', chunks: 'all', minChunks: 2, minSize: 1 }, + bootstrap: { + priority: 10, + test: /[\\/]node_modules[\\/](bootstrap|@popperjs)[\\/]/, + name: 'bootstrap', + filename: 'vendor/[name]/[name].js', chunks: 'all', - minChunks: 2, - minSize: 1, + enforce: true, }, openLayers: { priority: 10, @@ -148,8 +151,6 @@ module.exports = [ { from: rootPath + '/node_modules/jquery-validation/dist/jquery.validate.min.js', to: publicPath + '/js/vendor/jquery/jquery.validate.min.js' }, { from: rootPath + '/node_modules/jquery-validation/dist/additional-methods.js', to: publicPath + '/js/vendor/jquery/additional-methods.js' }, { from: rootPath + '/node_modules/js-cookie/dist/js.cookie.min.js', to: publicPath + '/js/vendor/js.cookie.min.js' }, - { from: rootPath + '/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js', to: publicPath + '/js/vendor/bootstrap/bootstrap.bundle.min.js' }, - { from: rootPath + '/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map', to: publicPath + '/js/vendor/bootstrap/bootstrap.bundle.min.js.map' }, { from: rootPath + '/node_modules/@zxcvbn-ts/core/dist/zxcvbn-ts.js', to: publicPath + '/js/vendor/zxcvbn-ts.js' }, { from: rootPath + '/node_modules/@zxcvbn-ts/core/dist/zxcvbn-ts.js.map', to: publicPath + '/js/vendor/zxcvbn-ts.js.map' }, { from: rootPath + '/node_modules/tracekit/tracekit.js', to: publicPath + '/js/vendor/tracekit.js' }, diff --git a/yarn.lock b/yarn.lock index 35ef0a125b..6aabe718b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2095,10 +2095,10 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== -bootstrap@5.3.5: - version "5.3.5" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.5.tgz#be42cfe0d580e97ee1abb7d38ce94f5c393c9bb6" - integrity sha512-ct1CHKtiobRimyGzmsSldEtM03E8fcEX4Tb3dGXz1V8faRwM50+vfHwTzOxB3IlKO7m+9vTH3s/3C6T2EAPeTA== +bootstrap@^5.3.5: + version "5.3.6" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.6.tgz#fbd91ebaff093f5b191a1c01a8c866d24f9fa6e1" + integrity sha512-jX0GAcRzvdwISuvArXn3m7KZscWWFAf1MKBcnzaN02qWMb3jpMoUX4/qgeiGzqyIb4ojulRzs89UCUmGcFSzTA== brace-expansion@^1.1.7: version "1.1.11"