diff --git a/addons/web/static/lib/bootstrap/LICENSE b/addons/web/static/lib/bootstrap/LICENSE index 86f4b8ca04f..7d1e2311f44 100644 --- a/addons/web/static/lib/bootstrap/LICENSE +++ b/addons/web/static/lib/bootstrap/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2011-2018 Twitter, Inc. -Copyright (c) 2011-2018 The Bootstrap Authors +Copyright (c) 2011-2019 Twitter, Inc. +Copyright (c) 2011-2019 The Bootstrap Authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/addons/web/static/lib/bootstrap/css/bootstrap.css b/addons/web/static/lib/bootstrap/css/bootstrap.css index 614fcd3d1c1..c46012c5930 100644 --- a/addons/web/static/lib/bootstrap/css/bootstrap.css +++ b/addons/web/static/lib/bootstrap/css/bootstrap.css @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ :root { @@ -90,6 +90,7 @@ abbr[data-original-title] { text-decoration: underline dotted; cursor: help; border-bottom: 0; + -webkit-text-decoration-skip-ink: none; text-decoration-skip-ink: none; } @@ -255,6 +256,10 @@ select { text-transform: none; } +select { + word-wrap: normal; +} + button, [type="button"], [type="reset"], @@ -262,6 +267,13 @@ button, -webkit-appearance: button; } +button:not(:disabled), +[type="button"]:not(:disabled), +[type="reset"]:not(:disabled), +[type="submit"]:not(:disabled) { + cursor: pointer; +} + button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, @@ -350,10 +362,8 @@ template { h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin-bottom: 0.5rem; - font-family: inherit; font-weight: 500; line-height: 1.2; - color: inherit; } h1, .h1 { @@ -1504,7 +1514,7 @@ pre code { .table { width: 100%; margin-bottom: 1rem; - background-color: transparent; + color: #212529; } .table th, @@ -1523,10 +1533,6 @@ pre code { border-top: 2px solid #dee2e6; } -.table .table { - background-color: #fff; -} - .table-sm th, .table-sm td { padding: 0.3rem; @@ -1558,6 +1564,7 @@ pre code { } .table-hover tbody tr:hover { + color: #212529; background-color: rgba(0, 0, 0, 0.075); } @@ -1754,8 +1761,8 @@ pre code { .table .thead-dark th { color: #fff; - background-color: #212529; - border-color: #32383e; + background-color: #343a40; + border-color: #454d55; } .table .thead-light th { @@ -1766,13 +1773,13 @@ pre code { .table-dark { color: #fff; - background-color: #212529; + background-color: #343a40; } .table-dark th, .table-dark td, .table-dark thead th { - border-color: #32383e; + border-color: #454d55; } .table-dark.table-bordered { @@ -1784,6 +1791,7 @@ pre code { } .table-dark.table-hover tbody tr:hover { + color: #fff; background-color: rgba(255, 255, 255, 0.075); } @@ -1793,7 +1801,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-sm > .table-bordered { border: 0; @@ -1806,7 +1813,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-md > .table-bordered { border: 0; @@ -1819,7 +1825,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-lg > .table-bordered { border: 0; @@ -1832,7 +1837,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-xl > .table-bordered { border: 0; @@ -1844,7 +1848,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive > .table-bordered { @@ -1854,7 +1857,7 @@ pre code { .form-control { display: block; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 0.75rem; font-size: 1rem; font-weight: 400; @@ -1867,7 +1870,7 @@ pre code { transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .form-control { transition: none; } @@ -1968,7 +1971,7 @@ select.form-control:focus::-ms-value { } .form-control-sm { - height: calc(1.8125rem + 2px); + height: calc(1.5em + 0.5rem + 2px); padding: 0.25rem 0.5rem; font-size: 0.875rem; line-height: 1.5; @@ -1976,7 +1979,7 @@ select.form-control:focus::-ms-value { } .form-control-lg { - height: calc(2.875rem + 2px); + height: calc(1.5em + 1rem + 2px); padding: 0.5rem 1rem; font-size: 1.25rem; line-height: 1.5; @@ -2076,11 +2079,11 @@ textarea.form-control { .was-validated .form-control:valid, .form-control.is-valid { border-color: #28a745; - padding-right: 2.25rem; - background-repeat: no-repeat; - background-position: center right calc(2.25rem / 4); - background-size: calc(2.25rem / 2) calc(2.25rem / 2); + padding-right: calc(1.5em + 0.75rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: center right calc(0.375em + 0.1875rem); + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .was-validated .form-control:valid:focus, .form-control.is-valid:focus { @@ -2095,14 +2098,14 @@ textarea.form-control { } .was-validated textarea.form-control:valid, textarea.form-control.is-valid { - padding-right: 2.25rem; - background-position: top calc(2.25rem / 4) right calc(2.25rem / 4); + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } .was-validated .custom-select:valid, .custom-select.is-valid { border-color: #28a745; - padding-right: 3.4375rem; - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") no-repeat center right 1.75rem/1.125rem 1.125rem; + padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .was-validated .custom-select:valid:focus, .custom-select.is-valid:focus { @@ -2199,11 +2202,11 @@ textarea.form-control { .was-validated .form-control:invalid, .form-control.is-invalid { border-color: #dc3545; - padding-right: 2.25rem; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"); background-repeat: no-repeat; - background-position: center right calc(2.25rem / 4); - background-size: calc(2.25rem / 2) calc(2.25rem / 2); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"); + background-position: center right calc(0.375em + 0.1875rem); + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { @@ -2218,14 +2221,14 @@ textarea.form-control { } .was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { - padding-right: 2.25rem; - background-position: top calc(2.25rem / 4) right calc(2.25rem / 4); + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } .was-validated .custom-select:invalid, .custom-select.is-invalid { border-color: #dc3545; - padding-right: 3.4375rem; - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") no-repeat center right 1.75rem/1.125rem 1.125rem; + padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus { @@ -2355,6 +2358,8 @@ textarea.form-control { } .form-inline .form-check-input { position: relative; + -ms-flex-negative: 0; + flex-shrink: 0; margin-top: 0; margin-right: 0.25rem; margin-left: 0; @@ -2389,7 +2394,7 @@ textarea.form-control { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .btn { transition: none; } @@ -2409,10 +2414,6 @@ textarea.form-control { opacity: 0.65; } -.btn:not(:disabled):not(.disabled) { - cursor: pointer; -} - a.btn.disabled, fieldset:disabled a.btn { pointer-events: none; @@ -2949,6 +2950,7 @@ fieldset:disabled a.btn { .btn-link { font-weight: 400; color: #007bff; + text-decoration: none; } .btn-link:hover { @@ -2999,7 +3001,7 @@ input[type="button"].btn-block { transition: opacity 0.15s linear; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .fade { transition: none; } @@ -3020,7 +3022,7 @@ input[type="button"].btn-block { transition: height 0.35s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .collapsing { transition: none; } @@ -3033,6 +3035,10 @@ input[type="button"].btn-block { position: relative; } +.dropdown-toggle { + white-space: nowrap; +} + .dropdown-toggle::after { display: inline-block; margin-left: 0.255em; @@ -3068,49 +3074,25 @@ input[type="button"].btn-block { border-radius: 0.25rem; } +.dropdown-menu-left { + right: auto; + left: 0; +} + .dropdown-menu-right { right: 0; left: auto; } -@media (min-width: 576px) { - .dropdown-menu-sm-right { - right: 0; - left: auto; - } -} - -@media (min-width: 768px) { - .dropdown-menu-md-right { - right: 0; - left: auto; - } -} - -@media (min-width: 992px) { - .dropdown-menu-lg-right { - right: 0; - left: auto; - } -} - -@media (min-width: 1200px) { - .dropdown-menu-xl-right { - right: 0; - left: auto; - } -} - -.dropdown-menu-left { - right: auto; - left: 0; -} - @media (min-width: 576px) { .dropdown-menu-sm-left { right: auto; left: 0; } + .dropdown-menu-sm-right { + right: 0; + left: auto; + } } @media (min-width: 768px) { @@ -3118,6 +3100,10 @@ input[type="button"].btn-block { right: auto; left: 0; } + .dropdown-menu-md-right { + right: 0; + left: auto; + } } @media (min-width: 992px) { @@ -3125,6 +3111,10 @@ input[type="button"].btn-block { right: auto; left: 0; } + .dropdown-menu-lg-right { + right: 0; + left: auto; + } } @media (min-width: 1200px) { @@ -3132,6 +3122,10 @@ input[type="button"].btn-block { right: auto; left: 0; } + .dropdown-menu-xl-right { + right: 0; + left: auto; + } } .dropup .dropdown-menu { @@ -3245,16 +3239,6 @@ input[type="button"].btn-block { border: 0; } -.dropdown-item:first-child { - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} - -.dropdown-item:last-child { - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); -} - .dropdown-item:hover, .dropdown-item:focus { color: #16181b; text-decoration: none; @@ -3557,7 +3541,7 @@ input[type="button"].btn-block { .input-group-lg > .form-control:not(textarea), .input-group-lg > .custom-select { - height: calc(2.875rem + 2px); + height: calc(1.5em + 1rem + 2px); } .input-group-lg > .form-control, @@ -3574,7 +3558,7 @@ input[type="button"].btn-block { .input-group-sm > .form-control:not(textarea), .input-group-sm > .custom-select { - height: calc(1.8125rem + 2px); + height: calc(1.5em + 0.5rem + 2px); } .input-group-sm > .form-control, @@ -3688,9 +3672,7 @@ input[type="button"].btn-block { width: 1rem; height: 1rem; content: ""; - background-repeat: no-repeat; - background-position: center center; - background-size: 50% 50%; + background: no-repeat 50% / 50% 50%; } .custom-checkbox .custom-control-label::before { @@ -3753,7 +3735,7 @@ input[type="button"].btn-block { transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-transform 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .custom-switch .custom-control-label::after { transition: none; } @@ -3772,8 +3754,9 @@ input[type="button"].btn-block { .custom-select { display: inline-block; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 1.75rem 0.375rem 0.75rem; + font-size: 1rem; font-weight: 400; line-height: 1.5; color: #495057; @@ -3790,7 +3773,7 @@ input[type="button"].btn-block { .custom-select:focus { border-color: #80bdff; outline: 0; - box-shadow: 0 0 0 0.2rem rgba(128, 189, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } .custom-select:focus::-ms-value { @@ -3810,11 +3793,11 @@ input[type="button"].btn-block { } .custom-select::-ms-expand { - opacity: 0; + display: none; } .custom-select-sm { - height: calc(1.8125rem + 2px); + height: calc(1.5em + 0.5rem + 2px); padding-top: 0.25rem; padding-bottom: 0.25rem; padding-left: 0.5rem; @@ -3822,7 +3805,7 @@ input[type="button"].btn-block { } .custom-select-lg { - height: calc(2.875rem + 2px); + height: calc(1.5em + 1rem + 2px); padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 1rem; @@ -3833,7 +3816,7 @@ input[type="button"].btn-block { position: relative; display: inline-block; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); margin-bottom: 0; } @@ -3841,7 +3824,7 @@ input[type="button"].btn-block { position: relative; z-index: 2; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); margin: 0; opacity: 0; } @@ -3869,7 +3852,7 @@ input[type="button"].btn-block { right: 0; left: 0; z-index: 1; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 0.75rem; font-weight: 400; line-height: 1.5; @@ -3886,7 +3869,7 @@ input[type="button"].btn-block { bottom: 0; z-index: 3; display: block; - height: 2.25rem; + height: calc(1.5em + 0.75rem); padding: 0.375rem 0.75rem; line-height: 1.5; color: #495057; @@ -3938,7 +3921,7 @@ input[type="button"].btn-block { appearance: none; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .custom-range::-webkit-slider-thumb { transition: none; } @@ -3969,7 +3952,7 @@ input[type="button"].btn-block { appearance: none; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .custom-range::-moz-range-thumb { transition: none; } @@ -4002,7 +3985,7 @@ input[type="button"].btn-block { appearance: none; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .custom-range::-ms-thumb { transition: none; } @@ -4059,7 +4042,7 @@ input[type="button"].btn-block { transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .custom-control-label::before, .custom-file-label, .custom-select { @@ -4248,10 +4231,6 @@ input[type="button"].btn-block { text-decoration: none; } -.navbar-toggler:not(:disabled):not(.disabled) { - cursor: pointer; -} - .navbar-toggler-icon { display: inline-block; width: 1.5em; @@ -4629,7 +4608,6 @@ input[type="button"].btn-block { .card-header { padding: 0.75rem 1.25rem; margin-bottom: 0; - color: inherit; background-color: rgba(0, 0, 0, 0.03); border-bottom: 1px solid rgba(0, 0, 0, 0.125); } @@ -4746,52 +4724,30 @@ input[type="button"].btn-block { margin-left: 0; border-left: 0; } - .card-group > .card:first-child { + .card-group > .card:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; } - .card-group > .card:first-child .card-img-top, - .card-group > .card:first-child .card-header { + .card-group > .card:not(:last-child) .card-img-top, + .card-group > .card:not(:last-child) .card-header { border-top-right-radius: 0; } - .card-group > .card:first-child .card-img-bottom, - .card-group > .card:first-child .card-footer { + .card-group > .card:not(:last-child) .card-img-bottom, + .card-group > .card:not(:last-child) .card-footer { border-bottom-right-radius: 0; } - .card-group > .card:last-child { + .card-group > .card:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; } - .card-group > .card:last-child .card-img-top, - .card-group > .card:last-child .card-header { + .card-group > .card:not(:first-child) .card-img-top, + .card-group > .card:not(:first-child) .card-header { border-top-left-radius: 0; } - .card-group > .card:last-child .card-img-bottom, - .card-group > .card:last-child .card-footer { + .card-group > .card:not(:first-child) .card-img-bottom, + .card-group > .card:not(:first-child) .card-footer { border-bottom-left-radius: 0; } - .card-group > .card:only-child { - border-radius: 0.25rem; - } - .card-group > .card:only-child .card-img-top, - .card-group > .card:only-child .card-header { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; - } - .card-group > .card:only-child .card-img-bottom, - .card-group > .card:only-child .card-footer { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - } - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) { - border-radius: 0; - } - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-top, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-header, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-footer { - border-radius: 0; - } } .card-columns .card { @@ -4815,31 +4771,31 @@ input[type="button"].btn-block { } } -.accordion .card { +.accordion > .card { overflow: hidden; } -.accordion .card:not(:first-of-type) .card-header:first-child { +.accordion > .card:not(:first-of-type) .card-header:first-child { border-radius: 0; } -.accordion .card:not(:first-of-type):not(:last-of-type) { +.accordion > .card:not(:first-of-type):not(:last-of-type) { border-bottom: 0; border-radius: 0; } -.accordion .card:first-of-type { +.accordion > .card:first-of-type { border-bottom: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } -.accordion .card:last-of-type { +.accordion > .card:last-of-type { border-top-left-radius: 0; border-top-right-radius: 0; } -.accordion .card .card-header { +.accordion > .card .card-header { margin-bottom: -1px; } @@ -4911,10 +4867,6 @@ input[type="button"].btn-block { box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } -.page-link:not(:disabled):not(.disabled) { - cursor: pointer; -} - .page-item:first-child .page-link { margin-left: 0; border-top-left-radius: 0.25rem; @@ -4983,6 +4935,13 @@ input[type="button"].btn-block { white-space: nowrap; vertical-align: baseline; border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .badge { + transition: none; + } } a.badge:hover, a.badge:focus { @@ -5014,6 +4973,11 @@ a.badge-primary:hover, a.badge-primary:focus { background-color: #0062cc; } +a.badge-primary:focus, a.badge-primary.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + .badge-secondary { color: #fff; background-color: #6c757d; @@ -5024,6 +4988,11 @@ a.badge-secondary:hover, a.badge-secondary:focus { background-color: #545b62; } +a.badge-secondary:focus, a.badge-secondary.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + .badge-success { color: #fff; background-color: #28a745; @@ -5034,6 +5003,11 @@ a.badge-success:hover, a.badge-success:focus { background-color: #1e7e34; } +a.badge-success:focus, a.badge-success.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + .badge-info { color: #fff; background-color: #17a2b8; @@ -5044,6 +5018,11 @@ a.badge-info:hover, a.badge-info:focus { background-color: #117a8b; } +a.badge-info:focus, a.badge-info.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + .badge-warning { color: #212529; background-color: #ffc107; @@ -5054,6 +5033,11 @@ a.badge-warning:hover, a.badge-warning:focus { background-color: #d39e00; } +a.badge-warning:focus, a.badge-warning.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + .badge-danger { color: #fff; background-color: #dc3545; @@ -5064,6 +5048,11 @@ a.badge-danger:hover, a.badge-danger:focus { background-color: #bd2130; } +a.badge-danger:focus, a.badge-danger.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + .badge-light { color: #212529; background-color: #f8f9fa; @@ -5074,6 +5063,11 @@ a.badge-light:hover, a.badge-light:focus { background-color: #dae0e5; } +a.badge-light:focus, a.badge-light.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + .badge-dark { color: #fff; background-color: #343a40; @@ -5084,6 +5078,11 @@ a.badge-dark:hover, a.badge-dark:focus { background-color: #1d2124; } +a.badge-dark:focus, a.badge-dark.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + .jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; @@ -5285,7 +5284,7 @@ a.badge-dark:hover, a.badge-dark:focus { transition: width 0.6s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .progress-bar { transition: none; } @@ -5301,6 +5300,13 @@ a.badge-dark:hover, a.badge-dark:focus { animation: progress-bar-stripes 1s linear infinite; } +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + .media { display: -ms-flexbox; display: flex; @@ -5329,6 +5335,7 @@ a.badge-dark:hover, a.badge-dark:focus { } .list-group-item-action:hover, .list-group-item-action:focus { + z-index: 1; color: #495057; text-decoration: none; background-color: #f8f9fa; @@ -5359,11 +5366,6 @@ a.badge-dark:hover, a.badge-dark:focus { border-bottom-left-radius: 0.25rem; } -.list-group-item:hover, .list-group-item:focus { - z-index: 1; - text-decoration: none; -} - .list-group-item.disabled, .list-group-item:disabled { color: #6c757d; pointer-events: none; @@ -5377,6 +5379,117 @@ a.badge-dark:hover, a.badge-dark:focus { border-color: #007bff; } +.list-group-horizontal { + -ms-flex-direction: row; + flex-direction: row; +} + +.list-group-horizontal .list-group-item { + margin-right: -1px; + margin-bottom: 0; +} + +.list-group-horizontal .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; +} + +.list-group-horizontal .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; +} + +@media (min-width: 576px) { + .list-group-horizontal-sm { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-sm .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-sm .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-sm .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 768px) { + .list-group-horizontal-md { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-md .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-md .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-md .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 992px) { + .list-group-horizontal-lg { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-lg .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-lg .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-lg .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 1200px) { + .list-group-horizontal-xl { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-xl .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-xl .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-xl .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + .list-group-flush .list-group-item { border-right: 0; border-left: 0; @@ -5539,10 +5652,6 @@ a.badge-dark:hover, a.badge-dark:focus { text-decoration: none; } -.close:not(:disabled):not(.disabled) { - cursor: pointer; -} - .close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { opacity: .75; } @@ -5567,11 +5676,11 @@ a.close.disabled { background-color: rgba(255, 255, 255, 0.85); background-clip: padding-box; border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 0.25rem; box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; + border-radius: 0.25rem; } .toast:not(:last-child) { @@ -5643,7 +5752,7 @@ a.close.disabled { transform: translate(0, -50px); } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .modal.fade .modal-dialog { transition: none; } @@ -5654,20 +5763,57 @@ a.close.disabled { transform: none; } +.modal-dialog-scrollable { + display: -ms-flexbox; + display: flex; + max-height: calc(100% - 1rem); +} + +.modal-dialog-scrollable .modal-content { + max-height: calc(100vh - 1rem); + overflow: hidden; +} + +.modal-dialog-scrollable .modal-header, +.modal-dialog-scrollable .modal-footer { + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + .modal-dialog-centered { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; - min-height: calc(100% - (0.5rem * 2)); + min-height: calc(100% - 1rem); } .modal-dialog-centered::before { display: block; - height: calc(100vh - (0.5rem * 2)); + height: calc(100vh - 1rem); content: ""; } +.modal-dialog-centered.modal-dialog-scrollable { + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + height: 100%; +} + +.modal-dialog-centered.modal-dialog-scrollable .modal-content { + max-height: none; +} + +.modal-dialog-centered.modal-dialog-scrollable::before { + content: none; +} + .modal-content { position: relative; display: -ms-flexbox; @@ -5709,7 +5855,7 @@ a.close.disabled { -ms-flex-pack: justify; justify-content: space-between; padding: 1rem 1rem; - border-bottom: 1px solid #e9ecef; + border-bottom: 1px solid #dee2e6; border-top-left-radius: 0.3rem; border-top-right-radius: 0.3rem; } @@ -5739,7 +5885,7 @@ a.close.disabled { -ms-flex-pack: end; justify-content: flex-end; padding: 1rem; - border-top: 1px solid #e9ecef; + border-top: 1px solid #dee2e6; border-bottom-right-radius: 0.3rem; border-bottom-left-radius: 0.3rem; } @@ -5765,11 +5911,17 @@ a.close.disabled { max-width: 500px; margin: 1.75rem auto; } + .modal-dialog-scrollable { + max-height: calc(100% - 3.5rem); + } + .modal-dialog-scrollable .modal-content { + max-height: calc(100vh - 3.5rem); + } .modal-dialog-centered { - min-height: calc(100% - (1.75rem * 2)); + min-height: calc(100% - 3.5rem); } .modal-dialog-centered::before { - height: calc(100vh - (1.75rem * 2)); + height: calc(100vh - 3.5rem); } .modal-sm { max-width: 300px; @@ -5949,25 +6101,19 @@ a.close.disabled { margin-bottom: 0.5rem; } -.bs-popover-top .arrow, .bs-popover-auto[x-placement^="top"] .arrow { +.bs-popover-top > .arrow, .bs-popover-auto[x-placement^="top"] > .arrow { bottom: calc((0.5rem + 1px) * -1); } -.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before, -.bs-popover-top .arrow::after, -.bs-popover-auto[x-placement^="top"] .arrow::after { - border-width: 0.5rem 0.5rem 0; -} - -.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before { +.bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^="top"] > .arrow::before { bottom: 0; + border-width: 0.5rem 0.5rem 0; border-top-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-top .arrow::after, -.bs-popover-auto[x-placement^="top"] .arrow::after { +.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { bottom: 1px; + border-width: 0.5rem 0.5rem 0; border-top-color: #fff; } @@ -5975,28 +6121,22 @@ a.close.disabled { margin-left: 0.5rem; } -.bs-popover-right .arrow, .bs-popover-auto[x-placement^="right"] .arrow { +.bs-popover-right > .arrow, .bs-popover-auto[x-placement^="right"] > .arrow { left: calc((0.5rem + 1px) * -1); width: 0.5rem; height: 1rem; margin: 0.3rem 0; } -.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before, -.bs-popover-right .arrow::after, -.bs-popover-auto[x-placement^="right"] .arrow::after { - border-width: 0.5rem 0.5rem 0.5rem 0; -} - -.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before { +.bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^="right"] > .arrow::before { left: 0; + border-width: 0.5rem 0.5rem 0.5rem 0; border-right-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-right .arrow::after, -.bs-popover-auto[x-placement^="right"] .arrow::after { +.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after { left: 1px; + border-width: 0.5rem 0.5rem 0.5rem 0; border-right-color: #fff; } @@ -6004,25 +6144,19 @@ a.close.disabled { margin-top: 0.5rem; } -.bs-popover-bottom .arrow, .bs-popover-auto[x-placement^="bottom"] .arrow { +.bs-popover-bottom > .arrow, .bs-popover-auto[x-placement^="bottom"] > .arrow { top: calc((0.5rem + 1px) * -1); } -.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before, -.bs-popover-bottom .arrow::after, -.bs-popover-auto[x-placement^="bottom"] .arrow::after { - border-width: 0 0.5rem 0.5rem 0.5rem; -} - -.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before { +.bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^="bottom"] > .arrow::before { top: 0; + border-width: 0 0.5rem 0.5rem 0.5rem; border-bottom-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-bottom .arrow::after, -.bs-popover-auto[x-placement^="bottom"] .arrow::after { +.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { top: 1px; + border-width: 0 0.5rem 0.5rem 0.5rem; border-bottom-color: #fff; } @@ -6041,28 +6175,22 @@ a.close.disabled { margin-right: 0.5rem; } -.bs-popover-left .arrow, .bs-popover-auto[x-placement^="left"] .arrow { +.bs-popover-left > .arrow, .bs-popover-auto[x-placement^="left"] > .arrow { right: calc((0.5rem + 1px) * -1); width: 0.5rem; height: 1rem; margin: 0.3rem 0; } -.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before, -.bs-popover-left .arrow::after, -.bs-popover-auto[x-placement^="left"] .arrow::after { - border-width: 0.5rem 0 0.5rem 0.5rem; -} - -.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before { +.bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^="left"] > .arrow::before { right: 0; + border-width: 0.5rem 0 0.5rem 0.5rem; border-left-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-left .arrow::after, -.bs-popover-auto[x-placement^="left"] .arrow::after { +.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after { right: 1px; + border-width: 0.5rem 0 0.5rem 0.5rem; border-left-color: #fff; } @@ -6070,7 +6198,6 @@ a.close.disabled { padding: 0.5rem 0.75rem; margin-bottom: 0; font-size: 1rem; - color: inherit; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-top-left-radius: calc(0.3rem - 1px); @@ -6120,7 +6247,7 @@ a.close.disabled { transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .carousel-item { transition: none; } @@ -6165,7 +6292,7 @@ a.close.disabled { transition: 0s 0.6s opacity; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .carousel-fade .active.carousel-item-left, .carousel-fade .active.carousel-item-right { transition: none; @@ -6191,7 +6318,7 @@ a.close.disabled { transition: opacity 0.15s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .carousel-control-prev, .carousel-control-next { transition: none; @@ -6220,8 +6347,7 @@ a.close.disabled { display: inline-block; width: 20px; height: 20px; - background: transparent no-repeat center center; - background-size: 100% 100%; + background: no-repeat 50% / 100% 100%; } .carousel-control-prev-icon { @@ -6266,7 +6392,7 @@ a.close.disabled { transition: opacity 0.6s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .carousel-indicators li { transition: none; } @@ -6545,6 +6671,10 @@ button.bg-dark:focus { border-color: #fff !important; } +.rounded-sm { + border-radius: 0.2rem !important; +} + .rounded { border-radius: 0.25rem !important; } @@ -6569,6 +6699,10 @@ button.bg-dark:focus { border-bottom-left-radius: 0.25rem !important; } +.rounded-lg { + border-radius: 0.3rem !important; +} + .rounded-circle { border-radius: 50% !important; } @@ -6820,8 +6954,8 @@ button.bg-dark:focus { padding-top: 56.25%; } -.embed-responsive-3by4::before { - padding-top: 133.333333%; +.embed-responsive-4by3::before { + padding-top: 75%; } .embed-responsive-1by1::before { @@ -7768,6 +7902,18 @@ button.bg-dark:focus { height: 100vh !important; } +.stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + pointer-events: auto; + content: ""; + background-color: rgba(0, 0, 0, 0); +} + .m-0 { margin: 0 !important; } @@ -9581,7 +9727,7 @@ button.bg-dark:focus { } .text-monospace { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; } .text-justify { @@ -9794,6 +9940,11 @@ a.text-dark:hover, a.text-dark:focus { text-decoration: none !important; } +.text-break { + word-break: break-word !important; + overflow-wrap: break-word !important; +} + .text-reset { color: inherit !important; } diff --git a/addons/web/static/lib/bootstrap/js/alert.js b/addons/web/static/lib/bootstrap/js/alert.js index 29c32bbce22..ce53097f0be 100644 --- a/addons/web/static/lib/bootstrap/js/alert.js +++ b/addons/web/static/lib/bootstrap/js/alert.js @@ -1,13 +1,13 @@ /*! - * Bootstrap alert.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap alert.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Alert = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Alert = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -35,7 +35,7 @@ */ var NAME = 'alert'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -90,8 +90,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Private - + } // Private + ; _proto._getRootElement = function _getRootElement(element) { var selector = Util.getSelectorFromElement(element); @@ -133,8 +133,8 @@ _proto._destroyElement = function _destroyElement(element) { $(element).detach().trigger(Event.CLOSED).remove(); - }; // Static - + } // Static + ; Alert._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -195,4 +195,4 @@ return Alert; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/button.js b/addons/web/static/lib/bootstrap/js/button.js index 1175c5efb86..0c830266da4 100644 --- a/addons/web/static/lib/bootstrap/js/button.js +++ b/addons/web/static/lib/bootstrap/js/button.js @@ -1,13 +1,13 @@ /*! - * Bootstrap button.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap button.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global.Button = factory(global.jQuery)); -}(this, (function ($) { 'use strict'; + (global = global || self, global.Button = factory(global.jQuery)); +}(this, function ($) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; @@ -34,7 +34,7 @@ */ var NAME = 'button'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.button'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -120,8 +120,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Static - + } // Static + ; Button._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -183,4 +183,4 @@ return Button; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/carousel.js b/addons/web/static/lib/bootstrap/js/carousel.js index b18c40eb3f9..4ceb87aac89 100644 --- a/addons/web/static/lib/bootstrap/js/carousel.js +++ b/addons/web/static/lib/bootstrap/js/carousel.js @@ -1,13 +1,13 @@ /*! - * Bootstrap carousel.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Carousel = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Carousel = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'carousel'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.carousel'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -264,8 +264,8 @@ this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); @@ -309,7 +309,9 @@ }); } - this._addTouchEventListeners(); + if (this._config.touch) { + this._addTouchEventListeners(); + } }; _proto._addTouchEventListeners = function _addTouchEventListeners() { @@ -550,8 +552,8 @@ if (isCycling) { this.cycle(); } - }; // Static - + } // Static + ; Carousel._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -578,7 +580,7 @@ } data[action](); - } else if (_config.interval) { + } else if (_config.interval && _config.ride) { data.pause(); data.cycle(); } @@ -662,4 +664,4 @@ return Carousel; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/collapse.js b/addons/web/static/lib/bootstrap/js/collapse.js index ca8c4368d32..da00868e288 100644 --- a/addons/web/static/lib/bootstrap/js/collapse.js +++ b/addons/web/static/lib/bootstrap/js/collapse.js @@ -1,13 +1,13 @@ /*! - * Bootstrap collapse.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Collapse = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Collapse = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'collapse'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.collapse'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -291,8 +291,8 @@ this._element = null; this._triggerArray = null; this._isTransitioning = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); @@ -336,8 +336,8 @@ if (triggerArray.length) { $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } - }; // Static - + } // Static + ; Collapse._getTargetFromElement = function _getTargetFromElement(element) { var selector = Util.getSelectorFromElement(element); @@ -424,4 +424,4 @@ return Collapse; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/dropdown.js b/addons/web/static/lib/bootstrap/js/dropdown.js index 7b09ff78d00..2d011d75513 100644 --- a/addons/web/static/lib/bootstrap/js/dropdown.js +++ b/addons/web/static/lib/bootstrap/js/dropdown.js @@ -1,13 +1,13 @@ /*! - * Bootstrap dropdown.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap dropdown.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : - (global.Dropdown = factory(global.jQuery,global.Popper,global.Util)); -}(this, (function ($,Popper,Util) { 'use strict'; + (global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util)); +}(this, function ($, Popper, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; @@ -70,7 +70,7 @@ */ var NAME = 'dropdown'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.dropdown'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -299,8 +299,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Private - + } // Private + ; _proto._addEventListeners = function _addEventListeners() { var _this = this; @@ -356,24 +356,28 @@ return $(this._element).closest('.navbar').length > 0; }; - _proto._getPopperConfig = function _getPopperConfig() { + _proto._getOffset = function _getOffset() { var _this2 = this; - var offsetConf = {}; + var offset = {}; if (typeof this._config.offset === 'function') { - offsetConf.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { - offsetConf.offset = this._config.offset; + offset.offset = this._config.offset; } + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig() { var popperConfig = { placement: this._getPlacement(), modifiers: { - offset: offsetConf, + offset: this._getOffset(), flip: { enabled: this._config.flip }, @@ -391,8 +395,8 @@ } return popperConfig; - }; // Static - + } // Static + ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -476,8 +480,8 @@ } return parent || element.parentNode; - }; // eslint-disable-next-line complexity - + } // eslint-disable-next-line complexity + ; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: @@ -587,4 +591,4 @@ return Dropdown; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/index.js b/addons/web/static/lib/bootstrap/js/index.js index cc1654c5eb2..48fcf733051 100644 --- a/addons/web/static/lib/bootstrap/js/index.js +++ b/addons/web/static/lib/bootstrap/js/index.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): index.js + * Bootstrap (v4.3.1): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/addons/web/static/lib/bootstrap/js/modal.js b/addons/web/static/lib/bootstrap/js/modal.js index 6be03d14264..da25fa15c95 100644 --- a/addons/web/static/lib/bootstrap/js/modal.js +++ b/addons/web/static/lib/bootstrap/js/modal.js @@ -1,13 +1,13 @@ /*! - * Bootstrap modal.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap modal.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Modal = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Modal = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'modal'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -102,6 +102,7 @@ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName = { + SCROLLABLE: 'modal-dialog-scrollable', SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', @@ -110,6 +111,7 @@ }; var Selector = { DIALOG: '.modal-dialog', + MODAL_BODY: '.modal-body', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', @@ -262,8 +264,8 @@ _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); @@ -287,7 +289,11 @@ this._element.setAttribute('aria-modal', true); - this._element.scrollTop = 0; + if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) { + this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } if (transition) { Util.reflow(this._element); @@ -457,11 +463,11 @@ } else if (callback) { callback(); } - }; // ---------------------------------------------------------------------- + } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- - + ; _proto._adjustDialog = function _adjustDialog() { var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; @@ -546,8 +552,8 @@ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; - }; // Static - + } // Static + ; Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { return this.each(function () { @@ -640,4 +646,4 @@ return Modal; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/popover.js b/addons/web/static/lib/bootstrap/js/popover.js index 1226ce3134d..2d7023d32d3 100644 --- a/addons/web/static/lib/bootstrap/js/popover.js +++ b/addons/web/static/lib/bootstrap/js/popover.js @@ -1,13 +1,13 @@ /*! - * Bootstrap popover.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap popover.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) : typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) : - (global.Popover = factory(global.jQuery,global.Tooltip)); -}(this, (function ($,Tooltip) { 'use strict'; + (global = global || self, global.Popover = factory(global.jQuery, global.Tooltip)); +}(this, function ($, Tooltip) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip; @@ -75,7 +75,7 @@ */ var NAME = 'popover'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.popover'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; @@ -158,8 +158,8 @@ this.setElementContent($tip.find(Selector.CONTENT), content); $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); - }; // Private - + } // Private + ; _proto._getContent = function _getContent() { return this.element.getAttribute('data-content') || this.config.content; @@ -172,8 +172,8 @@ if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // Static - + } // Static + ; Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -257,4 +257,4 @@ return Popover; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/scrollspy.js b/addons/web/static/lib/bootstrap/js/scrollspy.js index 8ad54088e05..782989a6723 100644 --- a/addons/web/static/lib/bootstrap/js/scrollspy.js +++ b/addons/web/static/lib/bootstrap/js/scrollspy.js @@ -1,13 +1,13 @@ /*! - * Bootstrap scrollspy.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap scrollspy.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.ScrollSpy = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'scrollspy'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.scrollspy'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -192,8 +192,8 @@ this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {}); @@ -300,8 +300,8 @@ }).forEach(function (node) { return node.classList.remove(ClassName.ACTIVE); }); - }; // Static - + } // Static + ; ScrollSpy._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -371,4 +371,4 @@ return ScrollSpy; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/tab.js b/addons/web/static/lib/bootstrap/js/tab.js index 9851df51219..0943521db42 100644 --- a/addons/web/static/lib/bootstrap/js/tab.js +++ b/addons/web/static/lib/bootstrap/js/tab.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tab.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tab.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Tab = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Tab = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -35,7 +35,7 @@ */ var NAME = 'tab'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -143,8 +143,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Private - + } // Private + ; _proto._activate = function _activate(element, container, callback) { var _this2 = this; @@ -186,7 +186,10 @@ } Util.reflow(element); - $(element).addClass(ClassName.SHOW); + + if (element.classList.contains(ClassName.FADE)) { + element.classList.add(ClassName.SHOW); + } if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; @@ -202,8 +205,8 @@ if (callback) { callback(); } - }; // Static - + } // Static + ; Tab._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -262,4 +265,4 @@ return Tab; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/toast.js b/addons/web/static/lib/bootstrap/js/toast.js index 6702292ea59..bf805f41f97 100644 --- a/addons/web/static/lib/bootstrap/js/toast.js +++ b/addons/web/static/lib/bootstrap/js/toast.js @@ -1,13 +1,13 @@ /*! - * Bootstrap toast.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap toast.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Toast = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Toast = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'toast'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.toast'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; @@ -184,8 +184,8 @@ $.removeData(this._element, DATA_KEY); this._element = null; this._config = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {}); @@ -218,8 +218,8 @@ } else { complete(); } - }; // Static - + } // Static + ; Toast._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -253,6 +253,11 @@ get: function get() { return DefaultType; } + }, { + key: "Default", + get: function get() { + return Default; + } }]); return Toast; @@ -274,5 +279,4 @@ return Toast; -}))); -//# sourceMappingURL=toast.js.map +})); diff --git a/addons/web/static/lib/bootstrap/js/tooltip.js b/addons/web/static/lib/bootstrap/js/tooltip.js index c89fbc0b150..6a863f88e18 100644 --- a/addons/web/static/lib/bootstrap/js/tooltip.js +++ b/addons/web/static/lib/bootstrap/js/tooltip.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tooltip.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tooltip.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : - (global.Tooltip = factory(global.jQuery,global.Popper,global.Util)); -}(this, (function ($,Popper,Util) { 'use strict'; + (global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util)); +}(this, function ($, Popper, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; @@ -63,6 +63,127 @@ return target; } + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.3.1): tools/sanitizer.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultWhitelist = { + // Global attributes allowed on any supplied element below. + '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], + a: ['target', 'href', 'title', 'rel'], + area: [], + b: [], + br: [], + col: [], + code: [], + div: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ['src', 'alt', 'title', 'width', 'height'], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + /** + * A pattern that recognizes a commonly useful subset of URLs that are safe. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts + */ + + }; + var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; + /** + * A pattern that matches safe data URLs. Only matches image, video and audio types. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts + */ + + var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; + + function allowedAttribute(attr, allowedAttributeList) { + var attrName = attr.nodeName.toLowerCase(); + + if (allowedAttributeList.indexOf(attrName) !== -1) { + if (uriAttrs.indexOf(attrName) !== -1) { + return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); + } + + return true; + } + + var regExp = allowedAttributeList.filter(function (attrRegex) { + return attrRegex instanceof RegExp; + }); // Check if a regular expression validates the attribute. + + for (var i = 0, l = regExp.length; i < l; i++) { + if (attrName.match(regExp[i])) { + return true; + } + } + + return false; + } + + function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { + if (unsafeHtml.length === 0) { + return unsafeHtml; + } + + if (sanitizeFn && typeof sanitizeFn === 'function') { + return sanitizeFn(unsafeHtml); + } + + var domParser = new window.DOMParser(); + var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); + var whitelistKeys = Object.keys(whiteList); + var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); + + var _loop = function _loop(i, len) { + var el = elements[i]; + var elName = el.nodeName.toLowerCase(); + + if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { + el.parentNode.removeChild(el); + return "continue"; + } + + var attributeList = [].slice.call(el.attributes); + var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); + attributeList.forEach(function (attr) { + if (!allowedAttribute(attr, whitelistedAttributes)) { + el.removeAttribute(attr.nodeName); + } + }); + }; + + for (var i = 0, len = elements.length; i < len; i++) { + var _ret = _loop(i, len); + + if (_ret === "continue") continue; + } + + return createdDocument.body.innerHTML; + } + /** * ------------------------------------------------------------------------ * Constants @@ -70,12 +191,13 @@ */ var NAME = 'tooltip'; - var VERSION = '4.2.1'; + var VERSION = '4.3.1'; var DATA_KEY = 'bs.tooltip'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; var CLASS_PREFIX = 'bs-tooltip'; var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); + var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; var DefaultType = { animation: 'boolean', template: 'string', @@ -85,10 +207,13 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', - offset: '(number|string)', + offset: '(number|string|function)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', - boundary: '(string|element)' + boundary: '(string|element)', + sanitize: 'boolean', + sanitizeFn: '(null|function)', + whiteList: 'object' }; var AttachmentMap = { AUTO: 'auto', @@ -109,7 +234,10 @@ offset: 0, container: false, fallbackPlacement: 'flip', - boundary: 'scrollParent' + boundary: 'scrollParent', + sanitize: true, + sanitizeFn: null, + whiteList: DefaultWhitelist }; var HoverState = { SHOW: 'show', @@ -294,9 +422,7 @@ this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { - offset: { - offset: this.config.offset - }, + offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, @@ -405,8 +531,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Protected - + } // Protected + ; _proto.isWithContent = function isWithContent() { return Boolean(this.getTitle()); @@ -428,19 +554,27 @@ }; _proto.setElementContent = function setElementContent($element, content) { - var html = this.config.html; - if (typeof content === 'object' && (content.nodeType || content.jquery)) { // Content is a DOM node or a jQuery - if (html) { + if (this.config.html) { if (!$(content).parent().is($element)) { $element.empty().append(content); } } else { $element.text($(content).text()); } + + return; + } + + if (this.config.html) { + if (this.config.sanitize) { + content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); + } + + $element.html(content); } else { - $element[html ? 'html' : 'text'](content); + $element.text(content); } }; @@ -452,8 +586,25 @@ } return title; - }; // Private + } // Private + ; + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = {}; + + if (typeof this.config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } + + return offset; + }; _proto._getContainer = function _getContainer() { if (this.config.container === false) { @@ -472,27 +623,27 @@ }; _proto._setListeners = function _setListeners() { - var _this3 = this; + var _this4 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { - return _this3.toggle(event); + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); }); } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; - $(_this3.element).on(eventIn, _this3.config.selector, function (event) { - return _this3._enter(event); - }).on(eventOut, _this3.config.selector, function (event) { - return _this3._leave(event); + var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; + $(_this4.element).on(eventIn, _this4.config.selector, function (event) { + return _this4._enter(event); + }).on(eventOut, _this4.config.selector, function (event) { + return _this4._leave(event); }); } }); $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this3.element) { - _this3.hide(); + if (_this4.element) { + _this4.hide(); } }); @@ -591,7 +742,13 @@ }; _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {}); + var dataAttributes = $(this.element).data(); + Object.keys(dataAttributes).forEach(function (dataAttr) { + if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { + delete dataAttributes[dataAttr]; + } + }); + config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { @@ -609,6 +766,11 @@ } Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + + if (config.sanitize) { + config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); + } + return config; }; @@ -657,8 +819,8 @@ this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // Static - + } // Static + ; Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -741,4 +903,4 @@ return Tooltip; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/js/util.js b/addons/web/static/lib/bootstrap/js/util.js index 49fbf119b60..4b538cb96d7 100644 --- a/addons/web/static/lib/bootstrap/js/util.js +++ b/addons/web/static/lib/bootstrap/js/util.js @@ -1,19 +1,19 @@ /*! - * Bootstrap util.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap util.js v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global.Util = factory(global.jQuery)); -}(this, (function ($) { 'use strict'; + (global = global || self, global.Util = factory(global.jQuery)); +}(this, function ($) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): util.js + * Bootstrap (v4.3.1): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -89,7 +89,11 @@ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; } - return selector && document.querySelector(selector) ? selector : null; + try { + return document.querySelector(selector) ? selector : null; + } catch (err) { + return null; + } }, getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { if (!element) { @@ -164,4 +168,4 @@ return Util; -}))); +})); diff --git a/addons/web/static/lib/bootstrap/scss/_badge.scss b/addons/web/static/lib/bootstrap/scss/_badge.scss index bdbe4b9cc82..2082f058ece 100644 --- a/addons/web/static/lib/bootstrap/scss/_badge.scss +++ b/addons/web/static/lib/bootstrap/scss/_badge.scss @@ -6,13 +6,14 @@ .badge { display: inline-block; padding: $badge-padding-y $badge-padding-x; - font-size: $badge-font-size; + @include font-size($badge-font-size); font-weight: $badge-font-weight; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; @include border-radius($badge-border-radius); + @include transition($badge-transition); @at-root a#{&} { @include hover-focus { diff --git a/addons/web/static/lib/bootstrap/scss/_buttons.scss b/addons/web/static/lib/bootstrap/scss/_buttons.scss index 7c45534e001..2a7d94ad228 100644 --- a/addons/web/static/lib/bootstrap/scss/_buttons.scss +++ b/addons/web/static/lib/bootstrap/scss/_buttons.scss @@ -6,6 +6,7 @@ .btn { display: inline-block; + font-family: $btn-font-family; font-weight: $btn-font-weight; color: $body-color; text-align: center; @@ -34,11 +35,6 @@ @include box-shadow(none); } - // Opinionated: add "hand" cursor to non-disabled .btn elements - &:not(:disabled):not(.disabled) { - cursor: pointer; - } - &:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active { @include box-shadow($btn-active-box-shadow); @@ -81,6 +77,7 @@ fieldset:disabled a.btn { .btn-link { font-weight: $font-weight-normal; color: $link-color; + text-decoration: $link-decoration; @include hover { color: $link-hover-color; diff --git a/addons/web/static/lib/bootstrap/scss/_card.scss b/addons/web/static/lib/bootstrap/scss/_card.scss index 377bec0f1a4..c6b67ce05d5 100644 --- a/addons/web/static/lib/bootstrap/scss/_card.scss +++ b/addons/web/static/lib/bootstrap/scss/_card.scss @@ -6,7 +6,7 @@ position: relative; display: flex; flex-direction: column; - min-width: 0; + min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106 word-wrap: break-word; background-color: $card-bg; background-clip: border-box; @@ -36,6 +36,7 @@ // as much space as possible, ensuring footers are aligned to the bottom. flex: 1 1 auto; padding: $card-spacer-x; + color: $card-color; } .card-title { @@ -195,55 +196,35 @@ // Handle rounded corners @if $enable-rounded { - &:first-child { + &:not(:last-child) { @include border-right-radius(0); .card-img-top, .card-header { + // stylelint-disable-next-line property-blacklist border-top-right-radius: 0; } .card-img-bottom, .card-footer { + // stylelint-disable-next-line property-blacklist border-bottom-right-radius: 0; } } - &:last-child { + &:not(:first-child) { @include border-left-radius(0); .card-img-top, .card-header { + // stylelint-disable-next-line property-blacklist border-top-left-radius: 0; } .card-img-bottom, .card-footer { + // stylelint-disable-next-line property-blacklist border-bottom-left-radius: 0; } } - - &:only-child { - @include border-radius($card-border-radius); - - .card-img-top, - .card-header { - @include border-top-radius($card-border-radius); - } - .card-img-bottom, - .card-footer { - @include border-bottom-radius($card-border-radius); - } - } - - &:not(:first-child):not(:last-child):not(:only-child) { - @include border-radius(0); - - .card-img-top, - .card-img-bottom, - .card-header, - .card-footer { - @include border-radius(0); - } - } } } } @@ -278,29 +259,27 @@ // .accordion { - .card { + > .card { overflow: hidden; &:not(:first-of-type) { .card-header:first-child { - border-radius: 0; + @include border-radius(0); } &:not(:last-of-type) { border-bottom: 0; - border-radius: 0; + @include border-radius(0); } } &:first-of-type { border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + @include border-bottom-radius(0); } &:last-of-type { - border-top-left-radius: 0; - border-top-right-radius: 0; + @include border-top-radius(0); } .card-header { diff --git a/addons/web/static/lib/bootstrap/scss/_carousel.scss b/addons/web/static/lib/bootstrap/scss/_carousel.scss index 8e6639ac07b..20ea04baf4e 100644 --- a/addons/web/static/lib/bootstrap/scss/_carousel.scss +++ b/addons/web/static/lib/bootstrap/scss/_carousel.scss @@ -127,8 +127,7 @@ display: inline-block; width: $carousel-control-icon-width; height: $carousel-control-icon-width; - background: transparent no-repeat center center; - background-size: 100% 100%; + background: no-repeat 50% / 100% 100%; } .carousel-control-prev-icon { background-image: $carousel-control-prev-icon-bg; diff --git a/addons/web/static/lib/bootstrap/scss/_close.scss b/addons/web/static/lib/bootstrap/scss/_close.scss index 821922f4c47..5cc96f573e1 100644 --- a/addons/web/static/lib/bootstrap/scss/_close.scss +++ b/addons/web/static/lib/bootstrap/scss/_close.scss @@ -1,6 +1,6 @@ .close { float: right; - font-size: $close-font-size; + @include font-size($close-font-size); font-weight: $close-font-weight; line-height: 1; color: $close-color; @@ -17,9 +17,6 @@ @include hover-focus { opacity: .75; } - - // Opinionated: add "hand" cursor to non-disabled .close elements - cursor: pointer; } } diff --git a/addons/web/static/lib/bootstrap/scss/_code.scss b/addons/web/static/lib/bootstrap/scss/_code.scss index 9b2e027f403..74b6e1c89be 100644 --- a/addons/web/static/lib/bootstrap/scss/_code.scss +++ b/addons/web/static/lib/bootstrap/scss/_code.scss @@ -1,6 +1,6 @@ // Inline code code { - font-size: $code-font-size; + @include font-size($code-font-size); color: $code-color; word-break: break-word; @@ -13,7 +13,7 @@ code { // User input typically entered via keyboard kbd { padding: $kbd-padding-y $kbd-padding-x; - font-size: $kbd-font-size; + @include font-size($kbd-font-size); color: $kbd-color; background-color: $kbd-bg; @include border-radius($border-radius-sm); @@ -21,7 +21,7 @@ kbd { kbd { padding: 0; - font-size: 100%; + @include font-size(100%); font-weight: $nested-kbd-font-weight; @include box-shadow(none); } @@ -30,12 +30,12 @@ kbd { // Blocks of code pre { display: block; - font-size: $code-font-size; + @include font-size($code-font-size); color: $pre-color; // Account for some code outputs that place code tags in pre tags code { - font-size: inherit; + @include font-size(inherit); color: inherit; word-break: normal; } diff --git a/addons/web/static/lib/bootstrap/scss/_custom-forms.scss b/addons/web/static/lib/bootstrap/scss/_custom-forms.scss index e6bf7ad6f53..03f3fc5be2d 100644 --- a/addons/web/static/lib/bootstrap/scss/_custom-forms.scss +++ b/addons/web/static/lib/bootstrap/scss/_custom-forms.scss @@ -95,9 +95,7 @@ width: $custom-control-indicator-size; height: $custom-control-indicator-size; content: ""; - background-repeat: no-repeat; - background-position: center center; - background-size: $custom-control-indicator-bg-size; + background: no-repeat 50% / #{$custom-control-indicator-bg-size}; } } @@ -144,6 +142,7 @@ .custom-radio { .custom-control-label::before { + // stylelint-disable-next-line property-blacklist border-radius: $custom-radio-indicator-border-radius; } @@ -173,6 +172,7 @@ left: -($custom-switch-width + $custom-control-gutter); width: $custom-switch-width; pointer-events: all; + // stylelint-disable-next-line property-blacklist border-radius: $custom-switch-indicator-border-radius; } @@ -182,6 +182,7 @@ width: $custom-switch-indicator-size; height: $custom-switch-indicator-size; background-color: $custom-control-indicator-border-color; + // stylelint-disable-next-line property-blacklist border-radius: $custom-switch-indicator-border-radius; @include transition(transform .15s ease-in-out, $custom-forms-transition); } @@ -213,6 +214,8 @@ width: 100%; height: $custom-select-height; padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; + font-family: $custom-select-font-family; + @include font-size($custom-select-font-size); font-weight: $custom-select-font-weight; line-height: $custom-select-line-height; color: $custom-select-color; @@ -220,11 +223,7 @@ background: $custom-select-background; background-color: $custom-select-bg; border: $custom-select-border-width solid $custom-select-border-color; - @if $enable-rounded { - border-radius: $custom-select-border-radius; - } @else { - border-radius: 0; - } + @include border-radius($custom-select-border-radius, 0); @include box-shadow($custom-select-box-shadow); appearance: none; @@ -262,7 +261,7 @@ // Hides the default caret in IE11 &::-ms-expand { - opacity: 0; + display: none; } } @@ -271,7 +270,7 @@ padding-top: $custom-select-padding-y-sm; padding-bottom: $custom-select-padding-y-sm; padding-left: $custom-select-padding-x-sm; - font-size: $custom-select-font-size-sm; + @include font-size($custom-select-font-size-sm); } .custom-select-lg { @@ -279,7 +278,7 @@ padding-top: $custom-select-padding-y-lg; padding-bottom: $custom-select-padding-y-lg; padding-left: $custom-select-padding-x-lg; - font-size: $custom-select-font-size-lg; + @include font-size($custom-select-font-size-lg); } @@ -331,6 +330,7 @@ z-index: 1; height: $custom-file-height; padding: $custom-file-padding-y $custom-file-padding-x; + font-family: $custom-file-font-family; font-weight: $custom-file-font-weight; line-height: $custom-file-line-height; color: $custom-file-color; diff --git a/addons/web/static/lib/bootstrap/scss/_dropdown.scss b/addons/web/static/lib/bootstrap/scss/_dropdown.scss index 93c1d78e95f..ac3c8c8a2c5 100644 --- a/addons/web/static/lib/bootstrap/scss/_dropdown.scss +++ b/addons/web/static/lib/bootstrap/scss/_dropdown.scss @@ -7,6 +7,8 @@ } .dropdown-toggle { + white-space: nowrap; + // Generate the caret automatically @include caret; } @@ -22,8 +24,8 @@ min-width: $dropdown-min-width; padding: $dropdown-padding-y 0; margin: $dropdown-spacer 0 0; // override default ul - font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues - color: $body-color; + @include font-size($dropdown-font-size); + color: $dropdown-color; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) list-style: none; background-color: $dropdown-bg; @@ -33,17 +35,6 @@ @include box-shadow($dropdown-box-shadow); } -@each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - - .dropdown-menu#{$infix}-right { - right: 0; - left: auto; - } - } -} - @each $breakpoint in map-keys($grid-breakpoints) { @include media-breakpoint-up($breakpoint) { $infix: breakpoint-infix($breakpoint, $grid-breakpoints); @@ -52,6 +43,11 @@ right: auto; left: 0; } + + .dropdown-menu#{$infix}-right { + right: 0; + left: auto; + } } } @@ -118,7 +114,7 @@ // Dividers (basically an `
`) within the dropdown .dropdown-divider { - @include nav-divider($dropdown-divider-bg); + @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y); } // Links, buttons, and more within the dropdown menu @@ -136,12 +132,16 @@ background-color: transparent; // For `