Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0][WIP] BS5 JS #31990

Merged
merged 225 commits into from
Jan 23, 2021
Merged
Show file tree
Hide file tree
Changes from 213 commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
b761d8a
bs5 js
dgrammatiko Jan 9, 2021
a357501
Init
dgrammatiko Jan 10, 2021
b55846b
Merge remote-tracking branch 'Joomla/4.0-dev' into 4.0-dev__BS5
dgrammatiko Jan 10, 2021
2937636
Clean up the mess
dgrammatiko Jan 12, 2021
a5c48eb
remove test code
dgrammatiko Jan 12, 2021
dfd9abf
Add Toast support
dgrammatiko Jan 12, 2021
480cd8c
version correction
dgrammatiko Jan 12, 2021
d96ee24
tooltips + popups
dgrammatiko Jan 12, 2021
7d6b343
CS
dgrammatiko Jan 12, 2021
2b9b1ce
CS?
dgrammatiko Jan 12, 2021
c564228
CS?.
dgrammatiko Jan 12, 2021
2479610
CS?.#
dgrammatiko Jan 12, 2021
483aa2c
Grrr
dgrammatiko Jan 12, 2021
4d331c3
dropdowns
dgrammatiko Jan 13, 2021
015b66e
v12
dgrammatiko Jan 13, 2021
05ee57f
missing bs
dgrammatiko Jan 13, 2021
f9306db
v13
dgrammatiko Jan 13, 2021
9bda9e1
Fix modal fields
dgrammatiko Jan 13, 2021
059f7e7
jQuery is not needed here anymore
dgrammatiko Jan 13, 2021
dbe4d11
Modal fixes
dgrammatiko Jan 13, 2021
93b1465
Modal further fixes
dgrammatiko Jan 13, 2021
8c703ed
Fix stats admin module js
wilsonge Jan 14, 2021
23bd075
attributes
dgrammatiko Jan 14, 2021
116f072
Merge branch '4.0-dev__BS5' of github.com:dgrammatiko/joomla-cms into…
dgrammatiko Jan 14, 2021
379d391
oops
dgrammatiko Jan 14, 2021
180ab35
Update administrator/components/com_mails/tmpl/templates/default.php
dgrammatiko Jan 14, 2021
7dbd1d9
Update administrator/components/com_menus/tmpl/menus/default.php
dgrammatiko Jan 14, 2021
183d3f2
Update administrator/components/com_users/tmpl/users/default.php
dgrammatiko Jan 14, 2021
e1df111
Update administrator/modules/mod_user/tmpl/default.php
dgrammatiko Jan 14, 2021
999c109
Update administrator/components/com_installer/tmpl/update/default.php
dgrammatiko Jan 14, 2021
f65772f
Update administrator/components/com_modules/tmpl/module/edit_assignme…
dgrammatiko Jan 14, 2021
7e9bd05
Update administrator/templates/atum/html/layouts/chromes/body.php
dgrammatiko Jan 14, 2021
73333ed
Update administrator/templates/atum/html/layouts/chromes/well.php
dgrammatiko Jan 14, 2021
3dad6ff
Update libraries/src/Form/Field/ModulepositionField.php
dgrammatiko Jan 14, 2021
da24aad
Update libraries/src/HTML/Helpers/Dropdown.php
dgrammatiko Jan 14, 2021
bd298fd
Update libraries/src/HTML/Helpers/ActionsDropdown.php
dgrammatiko Jan 14, 2021
ca95899
clean up 1
dgrammatiko Jan 14, 2021
92106ba
Merge branch '4.0-dev__BS5' of github.com:dgrammatiko/joomla-cms into…
dgrammatiko Jan 14, 2021
e5d1da1
Fix the init methods
dgrammatiko Jan 14, 2021
cdd10cb
Toolbars take #1
dgrammatiko Jan 14, 2021
479c88f
Fix Modals console logs
dgrammatiko Jan 14, 2021
4ac58dc
More modal fixes
dgrammatiko Jan 14, 2021
2fa16ac
Banners Modal
dgrammatiko Jan 14, 2021
f1b152f
Better default selector
dgrammatiko Jan 14, 2021
ff7f1ed
CS
dgrammatiko Jan 14, 2021
7d03afe
Element fuse
dgrammatiko Jan 14, 2021
c1a0f38
Workflow popovers
dgrammatiko Jan 15, 2021
e816c87
CS
dgrammatiko Jan 15, 2021
2fe11d4
popover on hover
dgrammatiko Jan 15, 2021
114e807
undo popup hover
dgrammatiko Jan 15, 2021
744402b
bs5 js
dgrammatiko Jan 9, 2021
5632969
Init
dgrammatiko Jan 10, 2021
a895329
Clean up the mess
dgrammatiko Jan 12, 2021
28d5520
remove test code
dgrammatiko Jan 12, 2021
345d6f2
Add Toast support
dgrammatiko Jan 12, 2021
a8b1cee
version correction
dgrammatiko Jan 12, 2021
7c98ab0
tooltips + popups
dgrammatiko Jan 12, 2021
81d341e
CS
dgrammatiko Jan 12, 2021
66e484b
CS?
dgrammatiko Jan 12, 2021
2013093
CS?.
dgrammatiko Jan 12, 2021
291e601
CS?.#
dgrammatiko Jan 12, 2021
fddb268
Grrr
dgrammatiko Jan 12, 2021
1f94d7b
dropdowns
dgrammatiko Jan 13, 2021
9f8c5dd
v12
dgrammatiko Jan 13, 2021
0729256
missing bs
dgrammatiko Jan 13, 2021
cf914fe
v13
dgrammatiko Jan 13, 2021
273883b
Fix modal fields
dgrammatiko Jan 13, 2021
45084e0
jQuery is not needed here anymore
dgrammatiko Jan 13, 2021
4aaec52
Modal fixes
dgrammatiko Jan 13, 2021
110af96
Modal further fixes
dgrammatiko Jan 13, 2021
c6d9d5e
Fix stats admin module js
wilsonge Jan 14, 2021
0ed7150
Move from bs4 to bs5 and half-attempt to migrate the SCSS
wilsonge Jan 11, 2021
6090523
Fix CSS Vars prefix
wilsonge Jan 11, 2021
9580d5b
Changes to make styling match
wilsonge Jan 12, 2021
fe2c31c
Breakpoints and utils restored
wilsonge Jan 12, 2021
8588a4c
Alias custom-select class
wilsonge Jan 12, 2021
372544e
More BS4 compat + remove input-group-append
wilsonge Jan 12, 2021
7341182
Fix colour
wilsonge Jan 12, 2021
d849fa7
Revert some of the code to use official bootstrap js
wilsonge Jan 13, 2021
dd3cc49
Add back white scss variable
wilsonge Jan 13, 2021
d38246c
All remaining breakpoints and add back white css var
wilsonge Jan 13, 2021
4958e11
Remove input-append and input-prepend classes
wilsonge Jan 13, 2021
c172df6
Remove commented code
wilsonge Jan 14, 2021
d66cb8d
Fix close button of modals
wilsonge Jan 14, 2021
b8de626
Article padding cleanup
wilsonge Jan 14, 2021
9b286b9
Remove btn-block class
wilsonge Jan 15, 2021
62f214b
Add back some spacing to card columns
wilsonge Jan 15, 2021
cf1a370
Replace float-left and float-right
wilsonge Jan 15, 2021
ef6df7f
Revert back layouts to original locations
wilsonge Jan 15, 2021
8041ca9
Fixed some styles on the last step of the installation process. (#51)
todordev Jan 15, 2021
97ec1c8
Spaces to tabs
wilsonge Jan 15, 2021
3edb5a1
SCSS Lint
wilsonge Jan 16, 2021
73058df
Fix JS Codestyle
wilsonge Jan 16, 2021
ade885d
Improved fix to toolbar dropdowns
wilsonge Jan 16, 2021
951c061
Comments for the changes
wilsonge Jan 16, 2021
49c1a33
Spaces to tabs
wilsonge Jan 16, 2021
fdc8178
Various fixes
wilsonge Jan 16, 2021
651859a
Try and fix tests in a dirty way
wilsonge Jan 16, 2021
491f9b0
Move sr-only to visually-hidden
wilsonge Jan 16, 2021
ee417a7
Spaces to tabs
wilsonge Jan 16, 2021
9b62cf6
Rename files back to original versions
wilsonge Jan 16, 2021
1ae3d75
SCSS Lint
wilsonge Jan 16, 2021
976b6ee
Missing helpers in atum
wilsonge Jan 16, 2021
ca23671
Remove test property
wilsonge Jan 16, 2021
5c68e58
Use @wilsonege ’s dropdown fixes (cleaner)
dgrammatiko Jan 16, 2021
f55d4aa
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.0-dev__BS5
dgrammatiko Jan 16, 2021
4c3f66d
Update administrator/templates/atum/scss/vendor/_bootstrap.scss
wilsonge Jan 16, 2021
7acaeb8
Update administrator/components/com_menus/tmpl/menus/default.php
wilsonge Jan 16, 2021
6ef8eed
Update administrator/templates/atum/html/layouts/chromes/body.php
wilsonge Jan 16, 2021
4f3c446
Update administrator/templates/atum/html/layouts/chromes/well.php
wilsonge Jan 16, 2021
84c4206
Update layouts/joomla/toolbar/basic.php
dgrammatiko Jan 17, 2021
611b476
CS js
dgrammatiko Jan 17, 2021
91c20a4
Update for the latest changes
dgrammatiko Jan 17, 2021
56ef36e
Fix the template modals
dgrammatiko Jan 17, 2021
a5d32a7
Fix modal not showing
wilsonge Jan 17, 2021
26535d6
Update administrator/components/com_postinstall/tmpl/messages/default…
wilsonge Jan 17, 2021
8494749
ml renamed to me (right -> end)
dgrammatiko Jan 17, 2021
2089121
Margin classes
wilsonge Jan 17, 2021
23d869c
Backport sr-only class
wilsonge Jan 17, 2021
c72e06a
Remove comment
wilsonge Jan 18, 2021
62b7587
Badge backgrounds (#52)
ciar4n Jan 18, 2021
0787226
cs
HLeithner Jan 18, 2021
abbf1b2
Update modules/mod_stats/tmpl/default.php
wilsonge Jan 18, 2021
141ab68
Duplicate class names for puublished field
wilsonge Jan 18, 2021
063b2b4
Text-left and text-right
wilsonge Jan 18, 2021
34ed80c
Fix error in system view
wilsonge Jan 18, 2021
b373c15
Front end menu needs collapse
dgrammatiko Jan 18, 2021
d217a65
mod_languages has a dropdown
dgrammatiko Jan 18, 2021
b31e770
Fix range form field class
wilsonge Jan 18, 2021
75bb454
Fix JS error
wilsonge Jan 18, 2021
f579769
Fix close button on modal
wilsonge Jan 18, 2021
6dc4dfe
Template is WRONGLY opinionated to have the menu ALWAYS collapsible o…
dgrammatiko Jan 19, 2021
fbf49b3
Dropdown menu and btn close
wilsonge Jan 19, 2021
d678c03
Use .form-select (#55)
ciar4n Jan 19, 2021
7a5691c
Adding delay in toggleSendMail test (#56)
Hackwar Jan 19, 2021
a20d183
Use alternative method to click radio button switcher (#57)
Hackwar Jan 20, 2021
5135c37
Update libraries/src/HTML/Helpers/Grid.php
wilsonge Jan 20, 2021
92f6bae
Update libraries/src/HTML/Helpers/Grid.php
wilsonge Jan 20, 2021
ed52c04
Fix input
wilsonge Jan 20, 2021
476c296
Fix button group styling
wilsonge Jan 20, 2021
95283b0
de -> en
wilsonge Jan 16, 2021
6364f33
s/Unexising/Unexisting (#32048)
PhilETaylor Jan 16, 2021
2e7f1fc
fix Notice: Only variables should be passed by reference (#32052)
PhilETaylor Jan 16, 2021
760776f
Fix default value type does not match the given type (#32055)
PhilETaylor Jan 16, 2021
64a3064
add missing include exception (#32057)
PhilETaylor Jan 16, 2021
18805e8
[4] add missing and fix wrong includes in com_finder, and remove unse…
PhilETaylor Jan 16, 2021
97f0efe
Remove unset call as $xml is not set when here (#32054)
PhilETaylor Jan 16, 2021
8746041
add missing import for typehint in docblock (#32050)
PhilETaylor Jan 16, 2021
4962727
Update default.php (#32067)
C-Lodder Jan 17, 2021
c3f0941
language overrides results disapear
dgrammatiko Jan 20, 2021
71a446b
Fix language overrides missing results (#58)
dgrammatiko Jan 20, 2021
4a500c5
J4 table styling
ciar4n Jan 20, 2021
819bdae
Update login.php
ciar4n Jan 20, 2021
d0e4732
Update _variables.scss
ciar4n Jan 20, 2021
c1776a3
Update joomla-image-select.css
ciar4n Jan 20, 2021
8f1bbda
Fix the finder accordion
dgrammatiko Jan 21, 2021
c431055
Fix input
Jan 21, 2021
75b33c2
Fix input
Jan 21, 2021
973849a
Fix versions Modal FE
dgrammatiko Jan 21, 2021
05f454e
Fix frontend editing tooltips
dgrammatiko Jan 21, 2021
d85ab11
Fix accordions
wilsonge Jan 22, 2021
24f58c6
Merge branch '4.0-dev' into bs5
wilsonge Jan 22, 2021
b5908c6
mail templates/ frontediting
dgrammatiko Jan 22, 2021
6e1755e
toolbar buttons
dgrammatiko Jan 22, 2021
7d7445b
Rebase to George’s branch
dgrammatiko Jan 22, 2021
6d41df9
Mail templates
dgrammatiko Jan 22, 2021
cbe7060
Fix margins on media manager file tree
wilsonge Jan 22, 2021
9d32fe8
Fix some table styling
wilsonge Jan 22, 2021
8b9413e
Fix border issue on hovered vertical tabs
wilsonge Jan 22, 2021
b52d728
Whoops
wilsonge Jan 22, 2021
acf851c
Fix modal padding on header
wilsonge Jan 22, 2021
40ab1fd
More com_media tweaks
wilsonge Jan 22, 2021
ab1555c
JS part
dgrammatiko Jan 22, 2021
350dae8
Merge branch '__george' into __BS5_all
dgrammatiko Jan 22, 2021
5adece6
PHP CS
dgrammatiko Jan 22, 2021
e0a7efb
Fix data attributes for launching modals
wilsonge Jan 22, 2021
95d56cf
Merge branch 'bs5' of github.com:wilsonge/joomla-cms into __george
dgrammatiko Jan 22, 2021
26a0e29
missing npm dependencies
dgrammatiko Jan 22, 2021
272e841
Grrr who designed this system? Wait, I did…
dgrammatiko Jan 22, 2021
8bcc1c3
Missing dependency on bootstrap framework
wilsonge Jan 22, 2021
70cfda8
Merge branch 'bs5' of github.com:wilsonge/joomla-cms into __george
dgrammatiko Jan 22, 2021
e861f2c
Merge branch '__george' into __BS5_all
dgrammatiko Jan 22, 2021
b96825c
collapse
dgrammatiko Jan 22, 2021
3d4250c
Fix pagination dropdown to be a slect
wilsonge Jan 22, 2021
89644e9
Merge branch 'bs5' of github.com:wilsonge/joomla-cms into __george
dgrammatiko Jan 22, 2021
25ba903
Merge branch '__george' into __BS5_all
dgrammatiko Jan 22, 2021
bd2205a
CS
dgrammatiko Jan 22, 2021
5e56a0f
Play with form-inline to backport - but also remove some core instances
wilsonge Jan 22, 2021
bcb2324
meh the directory is wrong
dgrammatiko Jan 22, 2021
a32a583
Merge branch 'bs5' of github.com:wilsonge/joomla-cms into __george
dgrammatiko Jan 22, 2021
2da53a2
Merge branch '__george' into __BS5_all
dgrammatiko Jan 22, 2021
ac572e0
Exclude bootstrap from the usual comile js dance
dgrammatiko Jan 22, 2021
a63c1b2
Javascript fun
dgrammatiko Jan 22, 2021
feac758
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into __BS5_all
dgrammatiko Jan 22, 2021
348ce09
CS, etc
dgrammatiko Jan 22, 2021
7509fe3
CS
dgrammatiko Jan 22, 2021
848cda8
cs
dgrammatiko Jan 22, 2021
90f77c6
Remove files
dgrammatiko Jan 22, 2021
c9b0b91
cs
dgrammatiko Jan 22, 2021
0acfca5
oops
dgrammatiko Jan 22, 2021
7e9298c
Restore Bootstrap.framework for B/C
dgrammatiko Jan 22, 2021
a49e2e6
Undo the docblock
dgrammatiko Jan 22, 2021
abc0fcd
CS
dgrammatiko Jan 22, 2021
9eb971e
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into __BS5_all
dgrammatiko Jan 22, 2021
78d3cf2
remove frontediting js
dgrammatiko Jan 22, 2021
092468b
oops the filename is wrong
dgrammatiko Jan 22, 2021
d442fa0
Csssssss
dgrammatiko Jan 23, 2021
5494787
The workflow targeted through the parent button
dgrammatiko Jan 23, 2021
f2233b8
Tests fixes
dgrammatiko Jan 23, 2021
968d3e9
Tests #2
dgrammatiko Jan 23, 2021
6a73fa9
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into __BS5_all
dgrammatiko Jan 23, 2021
dbddd68
some clean up
dgrammatiko Jan 23, 2021
ef6541c
well null is not itteratable
dgrammatiko Jan 23, 2021
e3599b2
revert the Chozen parts
dgrammatiko Jan 23, 2021
b8480ac
revert search tools add missing jQuery
dgrammatiko Jan 23, 2021
841458f
CS
dgrammatiko Jan 23, 2021
5467b0d
revert codeception changes
dgrammatiko Jan 23, 2021
43e64a2
- Add some comments
dgrammatiko Jan 23, 2021
e620922
Fix the console error for dropdowns
dgrammatiko Jan 23, 2021
4a40f75
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into __BS5_all
dgrammatiko Jan 23, 2021
f68486b
Fix modal initialisation for subform fields
dgrammatiko Jan 23, 2021
a4b7669
Comment about security
wilsonge Jan 23, 2021
3ae078d
JSCS
wilsonge Jan 23, 2021
a716fc4
JSCS
wilsonge Jan 23, 2021
4f1ac70
JSCS
wilsonge Jan 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

HTMLHelper::_('behavior.multiselect');

// Just for the tests :(
HTMLHelper::_('jquery.framework');

$app = Factory::getApplication();
$user = Factory::getUser();
$userId = $user->get('id');
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_fields/tmpl/fields/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

HTMLHelper::_('behavior.multiselect');

// Just for the tests :(
HTMLHelper::_('jquery.framework');

$app = Factory::getApplication();
$user = Factory::getUser();
$userId = $user->get('id');
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_mails/tmpl/templates/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

HTMLHelper::_('bootstrap.dropdown');

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
Expand Down
12 changes: 6 additions & 6 deletions administrator/components/com_templates/tmpl/template/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
);
?>
<form action="<?php echo Route::_('index.php?option=com_templates&task=template.copy&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm">
<?php echo LayoutHelper::render('joomla.modal.main', $copyModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $copyModalData); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php if ($this->type != 'home') : ?>
Expand All @@ -391,7 +391,7 @@
);
?>
<form action="<?php echo Route::_('index.php?option=com_templates&task=template.renameFile&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post">
<?php echo LayoutHelper::render('joomla.modal.main', $renameModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $renameModalData); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php endif; ?>
Expand All @@ -406,7 +406,7 @@
'body' => $this->loadTemplate('modal_delete_body')
);
?>
<?php echo LayoutHelper::render('joomla.modal.main', $deleteModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $deleteModalData); ?>
<?php endif; ?>
<?php // File Modal
$fileModalData = array(
Expand All @@ -422,7 +422,7 @@
'body' => $this->loadTemplate('modal_file_body')
);
?>
<?php echo LayoutHelper::render('joomla.modal.main', $fileModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $fileModalData); ?>
<?php // Folder Modal
$folderModalData = array(
'selector' => 'folderModal',
Expand All @@ -437,7 +437,7 @@
'body' => $this->loadTemplate('modal_folder_body')
);
?>
<?php echo LayoutHelper::render('joomla.modal.main', $folderModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $folderModalData); ?>
<?php if ($this->type == 'image') : ?>
<?php // Resize Modal
$resizeModalData = array(
Expand All @@ -450,7 +450,7 @@
);
?>
<form action="<?php echo Route::_('index.php?option=com_templates&task=template.resizeImage&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post">
<?php echo LayoutHelper::render('joomla.modal.main', $resizeModalData); ?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $resizeModalData); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php endif; ?>
155 changes: 155 additions & 0 deletions build/build-modules-js/build-bootstrap-js.es6.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
const {
readdir, readFile, rename, writeFile, rm,
} = require('fs').promises;
const { resolve } = require('path');
const { minify } = require('terser');
const rimraf = require('rimraf');
const rollup = require('rollup');
const { nodeResolve } = require('@rollup/plugin-node-resolve');
const replace = require('@rollup/plugin-replace');
const { babel } = require('@rollup/plugin-babel');

const tasks = [];
const inputFolder = 'build/media_source/vendor/bootstrap/js';
const outputFolder = 'media/vendor/bootstrap/js';

const createMinified = async (file) => {
const initial = await readFile(resolve(outputFolder, file), { encoding: 'utf8' });
const mini = await minify(initial);
await rename(resolve(outputFolder, file), resolve(outputFolder, `${file.split('-')[0]}.es6.js`));
await writeFile(resolve(outputFolder, `${file.split('-')[0]}.es6.min.js`), mini.code, { encoding: 'utf8' });
};

const build = async () => {
// eslint-disable-next-line no-console
console.log('Building ES6 Components...');

const bundle = await rollup.rollup({
input: resolve(inputFolder, 'index.es6.js'),
plugins: [
nodeResolve(),
replace({
'process.env.NODE_ENV': '\'production\'',
}),
],
external: [
'./base-component.js',
'./dom/data.js',
'./event-handler.js',
'./dom/manipulator.js',
'./selector-engine.js',
'./util/index.js',
],
manualChunks: {
alert: ['build/media_source/vendor/bootstrap/js/alert.es6.js'],
button: ['build/media_source/vendor/bootstrap/js/button.es6.js'],
carousel: ['build/media_source/vendor/bootstrap/js/carousel.es6.js'],
collapse: ['build/media_source/vendor/bootstrap/js/collapse.es6.js'],
dropdown: ['build/media_source/vendor/bootstrap/js/dropdown.es6.js'],
modal: ['build/media_source/vendor/bootstrap/js/modal.es6.js'],
popover: ['build/media_source/vendor/bootstrap/js/popover.es6.js'],
scrollspy: ['build/media_source/vendor/bootstrap/js/scrollspy.es6.js'],
tab: ['build/media_source/vendor/bootstrap/js/tab.es6.js'],
toast: ['build/media_source/vendor/bootstrap/js/toast.es6.js'],
popper: ['@popperjs/core'],
dom: [
'node_modules/bootstrap/js/src/base-component.js',
'node_modules/bootstrap/js/src/dom/data.js',
'node_modules/bootstrap/js/src/dom/event-handler.js',
'node_modules/bootstrap/js/src/dom/manipulator.js',
'node_modules/bootstrap/js/src/dom/selector-engine.js',
'node_modules/bootstrap/js/src/util/index.js',
],
},
});

await bundle.write({
format: 'es',
sourcemap: false,
dir: outputFolder,
});
};

const buildLegacy = async () => {
// eslint-disable-next-line no-console
console.log('Building Legacy...');

const bundle = await rollup.rollup({
input: resolve(inputFolder, 'index.es6.js'),
plugins: [
nodeResolve(),
replace({
'process.env.NODE_ENV': '\'production\'',
}),
babel({
exclude: 'node_modules/core-js/**',
babelHelpers: 'bundled',
babelrc: false,
presets: [
[
'@babel/preset-env',
{
corejs: '3.8',
useBuiltIns: 'usage',
targets: {
chrome: '58',
ie: '11',
},
loose: true,
bugfixes: true,
modules: false,
},
],
],
}),
],
external: [],
});

await bundle.write({
format: 'iife',
sourcemap: false,
name: 'Bootstrap',
file: resolve(outputFolder, 'bootstrap.es5.js'),
});
};

(async () => {
rimraf.sync(resolve(outputFolder));

try {
await build(resolve(inputFolder, 'index.es6.js'));
await rm(resolve(outputFolder, 'index.es6.js'));
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
process.exit(1);
}

(await readdir(outputFolder)).forEach((file) => {
if (!(file.startsWith('dom-') || file.startsWith('popper-'))) {
tasks.push(createMinified(file));
}
});

await Promise.all(tasks).catch((er) => {
// eslint-disable-next-line no-console
console.log(er);
process.exit(1);
});
// eslint-disable-next-line no-console
console.log('ES6 components ready ✅');

try {
await buildLegacy(inputFolder, 'index.es6.js');
const es5File = await readFile(resolve(outputFolder, 'bootstrap.es5.js'), { encoding: 'utf8' });
const mini = await minify(es5File);
await writeFile(resolve(outputFolder, 'bootstrap.es5.min.js'), mini.code, { encoding: 'utf8' });
// eslint-disable-next-line no-console
console.log('Legacy done! ✅');
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
process.exit(1);
}
})();
4 changes: 4 additions & 0 deletions build/build-modules-js/compilejs.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Fs = require('fs');
const { sep } = require('path');
const Recurs = require('recursive-readdir');
const HandleFile = require('./javascript/handle-file.es6.js');

Expand Down Expand Up @@ -45,6 +46,9 @@ module.exports.compileJS = (options, path) => {
(files) => {
files.forEach(
(file) => {
if (file.includes(`build${sep}media_source${sep}vendor${sep}bootstrap${sep}js`)) {
return;
}
HandleFile.run(file);
},
(error) => {
Expand Down
23 changes: 0 additions & 23 deletions build/build-modules-js/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
},
"bootstrap": {
"name": "bootstrap",
"js": {
"dist/js/bootstrap.js": "js/bootstrap.js",
"dist/js/bootstrap.min.js": "js/bootstrap.min.js",
"dist/js/bootstrap.bundle.js": "js/bootstrap.bundle.js",
"dist/js/bootstrap.bundle.min.js": "js/bootstrap.bundle.min.js",
"dist/js/bootstrap.bundle.min.js.map": "js/bootstrap.bundle.min.js.map"
},
"css": {
"dist/css/bootstrap.css": "css/bootstrap.css",
"dist/css/bootstrap.min.css": "css/bootstrap.min.css",
Expand Down Expand Up @@ -76,22 +69,6 @@
"dependencies": [
"bootstrap.css"
]
},
{
"name": "bootstrap.js",
"type": "script",
"uri": "bootstrap.min.js",
"dependencies": [
"jquery"
]
},
{
"name": "bootstrap.js.bundle",
"type": "script",
"uri": "bootstrap.bundle.min.js",
"dependencies": [
"jquery"
]
}
],
"dependencies": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Joomla.toggleAllNextElements = (element, className) => {
'use strict';

document.addEventListener('DOMContentLoaded', () => {
const dropDownBtn = document.getElementById('toolbar-dropdown-status-group');
const dropDownBtn = document.getElementById('toolbar-status-group');
const transitions = [].slice.call(dropDownBtn.querySelectorAll('.button-transition'));
const headline = dropDownBtn.querySelector('.button-transition-headline');
const separator = dropDownBtn.querySelector('.button-transition-separator');
Expand Down
Loading