Add bootstrap, bootstrap-icons, and popperjs

This commit is contained in:
Henrik Giesel 2021-02-27 04:01:33 +01:00
parent 7aac1b08d2
commit aeda64a890
7 changed files with 123 additions and 1 deletions

View file

@ -32,6 +32,7 @@ filegroup(
"core.css", "core.css",
"css_local", "css_local",
"editor", "editor",
"//qt/aqt/data/web/css/vendor",
], ],
visibility = ["//qt:__subpackages__"], visibility = ["//qt:__subpackages__"],
) )

20
qt/aqt/data/web/css/vendor/BUILD.bazel vendored Normal file
View file

@ -0,0 +1,20 @@
load("//ts:vendor.bzl", "copy_bootstrap_css", "copy_bootstrap_icons")
copy_bootstrap_css(name = "bootstrap")
copy_bootstrap_icons(name = "bootstrap-icons")
files = [
"bootstrap",
"bootstrap-icons",
]
directories = []
filegroup(
name = "vendor",
srcs = glob(["*.css"]) +
["//qt/aqt/data/web/css/vendor:{}".format(file) for file in files] +
["//qt/aqt/data/web/css/vendor/{}".format(dir) for dir in directories],
visibility = ["//qt:__subpackages__"],
)

View file

@ -1,4 +1,12 @@
load("//ts:vendor.bzl", "copy_css_browser_selector", "copy_jquery", "copy_jquery_ui", "copy_protobufjs") load(
"//ts:vendor.bzl",
"copy_css_browser_selector",
"copy_jquery",
"copy_jquery_ui",
"copy_protobufjs",
"copy_bootstrap_js",
"copy_popperjs",
)
copy_jquery(name = "jquery") copy_jquery(name = "jquery")
@ -8,11 +16,17 @@ copy_protobufjs(name = "protobufjs")
copy_css_browser_selector(name = "css-browser-selector") copy_css_browser_selector(name = "css-browser-selector")
copy_bootstrap_js(name = "bootstrap")
copy_popperjs(name = "popperjs")
files = [ files = [
"jquery", "jquery",
"jquery-ui", "jquery-ui",
"protobufjs", "protobufjs",
"css-browser-selector", "css-browser-selector",
"bootstrap",
"popperjs",
] ]
directories = [ directories = [

View file

@ -7,6 +7,14 @@
"path": "node_modules/@fluent/bundle", "path": "node_modules/@fluent/bundle",
"licenseFile": "node_modules/@fluent/bundle/README.md" "licenseFile": "node_modules/@fluent/bundle/README.md"
}, },
"@popperjs/core@2.8.6": {
"licenses": "MIT",
"repository": "https://github.com/popperjs/popper-core",
"publisher": "Federico Zivolo",
"email": "federico.zivolo@gmail.com",
"path": "node_modules/@popperjs/core",
"licenseFile": "node_modules/@popperjs/core/LICENSE.md"
},
"@protobufjs/aspromise@1.1.2": { "@protobufjs/aspromise@1.1.2": {
"licenses": "BSD-3-Clause", "licenses": "BSD-3-Clause",
"repository": "https://github.com/dcodeIO/protobuf.js", "repository": "https://github.com/dcodeIO/protobuf.js",
@ -99,6 +107,21 @@
"path": "node_modules/protobufjs/node_modules/@types/node", "path": "node_modules/protobufjs/node_modules/@types/node",
"licenseFile": "node_modules/protobufjs/node_modules/@types/node/LICENSE" "licenseFile": "node_modules/protobufjs/node_modules/@types/node/LICENSE"
}, },
"bootstrap-icons@1.4.0": {
"licenses": "MIT",
"repository": "https://github.com/twbs/icons",
"publisher": "mdo",
"path": "node_modules/bootstrap-icons",
"licenseFile": "node_modules/bootstrap-icons/LICENSE.md"
},
"bootstrap@5.0.0-beta2": {
"licenses": "MIT",
"repository": "https://github.com/twbs/bootstrap",
"publisher": "The Bootstrap Authors",
"url": "https://github.com/twbs/bootstrap/graphs/contributors",
"path": "node_modules/bootstrap",
"licenseFile": "node_modules/bootstrap/LICENSE"
},
"commander@2.20.3": { "commander@2.20.3": {
"licenses": "MIT", "licenses": "MIT",
"repository": "https://github.com/tj/commander.js", "repository": "https://github.com/tj/commander.js",

View file

@ -50,6 +50,9 @@
}, },
"dependencies": { "dependencies": {
"@fluent/bundle": "^0.15.1", "@fluent/bundle": "^0.15.1",
"@popperjs/core": "^2.8.6",
"bootstrap": "^5.0.0-beta2",
"bootstrap-icons": "^1.4.0",
"css-browser-selector": "^0.6.5", "css-browser-selector": "^0.6.5",
"d3": "^6.5.0", "d3": "^6.5.0",
"intl-pluralrules": "^1.2.2", "intl-pluralrules": "^1.2.2",

View file

@ -94,3 +94,49 @@ def copy_css_browser_selector(name = "css-browser-selector", visibility = ["//vi
], ],
visibility = visibility, visibility = visibility,
) )
def copy_bootstrap_js(name = "bootstrap-js", visibility = ["//visibility:public"]):
vendor_js_lib(
name = name,
pkg = _pkg_from_name(name),
include = [
"dist/js/bootstrap.bundle.min.js",
],
strip_prefix = "dist/js/",
visibility = visibility,
)
def copy_bootstrap_css(name = "bootstrap-css", visibility = ["//visibility:public"]):
vendor_js_lib(
name = name,
pkg = _pkg_from_name(name),
include = [
"dist/css/bootstrap.min.css",
],
strip_prefix = "dist/css/",
visibility = visibility,
)
def copy_bootstrap_icons(name = "bootstrap-icons", visibility = ["//visibility:public"]):
vendor_js_lib(
name = name,
pkg = _pkg_from_name(name),
include = [
"font/bootstrap-icons.css",
"font/fonts/bootstrap-icons.woff",
"font/fonts/bootstrap-icons.woff2",
],
strip_prefix = "font/",
visibility = visibility,
)
def copy_popperjs(name = "popperjs", visibility = ["//visibility:public"]):
vendor_js_lib(
name = name,
pkg = "@npm//@popperjs/core:core__files",
include = [
"external/npm/node_modules/@popperjs/core/dist/umd/popper.min.js",
],
strip_prefix = "external/npm/node_modules/@popperjs/core/dist/umd/",
visibility = visibility,
)

View file

@ -53,6 +53,11 @@
resolved "https://registry.yarnpkg.com/@fluent/bundle/-/bundle-0.15.1.tgz#95d3b9f836ac138b6ee8480ef8d0547dd59195b1" resolved "https://registry.yarnpkg.com/@fluent/bundle/-/bundle-0.15.1.tgz#95d3b9f836ac138b6ee8480ef8d0547dd59195b1"
integrity sha512-uhDGjpEwTMBNxYMSXyjXFBG5LY7dqoNatle6mnghu5lFOrf0JyblY/Y0al2GzDKFuYbtOSbJvUkxzjtYX3odkw== integrity sha512-uhDGjpEwTMBNxYMSXyjXFBG5LY7dqoNatle6mnghu5lFOrf0JyblY/Y0al2GzDKFuYbtOSbJvUkxzjtYX3odkw==
"@popperjs/core@^2.8.6":
version "2.8.6"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.8.6.tgz#ad75ebe8dbecfa145af3c7e4d0ae98016458d005"
integrity sha512-1oXH2bAFXz9SttE1v/0Jp+2ZVePsPEAPGIuPKrmljWZcS3FPBEn2Q4WcANozZC0YiCjTWOF55k0g6rbSZS39ew==
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
@ -699,6 +704,16 @@ bluebird@^3.7.2:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
bootstrap-icons@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/bootstrap-icons/-/bootstrap-icons-1.4.0.tgz#ea08e2c8bc1535576ad267312cca9ee84ea73343"
integrity sha512-EynaOv/G/X/sQgPUqkdLJoxPrWk73wwsVjVR3cDNYO0jMS58poq7DOC2CraBWlBt1AberEmt0blfw4ony2/ZIg==
bootstrap@^5.0.0-beta2:
version "5.0.0-beta2"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.0-beta2.tgz#ab1504a12807fa58e5e41408e35fcea42461e84b"
integrity sha512-e+uPbPHqTQWKyCX435uVlOmgH9tUt0xtjvyOC7knhKgOS643BrQKuTo+KecGpPV7qlmOyZgCfaM4xxPWtDEN/g==
brace-expansion@^1.1.7: brace-expansion@^1.1.7:
version "1.1.11" version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"