Skip to content
Permalink
Browse files

commit message

  • Loading branch information...
directman66 committed Jun 26, 2019
1 parent d9a20e0 commit 31709608aca27ba080e9a746ba75d59ac3f1180f
Showing with 47,295 additions and 557 deletions.
  1. +0 −68 action_admin.html
  2. +20 −0 modules/mercury/lk/bootstrap4/build/.eslintrc.json
  3. +14 −0 modules/mercury/lk/bootstrap4/build/banner.js
  4. +85 −0 modules/mercury/lk/bootstrap4/build/build-plugins.js
  5. +104 −0 modules/mercury/lk/bootstrap4/build/change-version.js
  6. +66 −0 modules/mercury/lk/bootstrap4/build/generate-sri.js
  7. +14 −0 modules/mercury/lk/bootstrap4/build/postcss.config.js
  8. +48 −0 modules/mercury/lk/bootstrap4/build/rollup.config.js
  9. +52 −0 modules/mercury/lk/bootstrap4/build/ship.sh
  10. +57 −0 modules/mercury/lk/bootstrap4/build/svgo.yml
  11. +65 −0 modules/mercury/lk/bootstrap4/build/vnu-jar.js
  12. +3,719 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-grid.css
  13. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-grid.css.map
  14. +7 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-grid.min.css
  15. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-grid.min.css.map
  16. +331 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-reboot.css
  17. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-reboot.css.map
  18. +8 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-reboot.min.css
  19. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap-reboot.min.css.map
  20. +10,038 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap.css
  21. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap.css.map
  22. +7 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap.min.css
  23. +1 −0 modules/mercury/lk/bootstrap4/dist/css/bootstrap.min.css.map
  24. +7,013 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.bundle.js
  25. +1 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.bundle.js.map
  26. +7 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.bundle.min.js
  27. +1 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.bundle.min.js.map
  28. +4,435 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.js
  29. +1 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.js.map
  30. +7 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.min.js
  31. +1 −0 modules/mercury/lk/bootstrap4/dist/js/bootstrap.min.js.map
  32. +2 −0 modules/mercury/lk/bootstrap4/dist/js/jquery.min.js
  33. +5 −0 modules/mercury/lk/bootstrap4/dist/js/popper.min.js
  34. +199 −0 modules/mercury/lk/bootstrap4/js/dist/alert.js
  35. +1 −0 modules/mercury/lk/bootstrap4/js/dist/alert.js.map
  36. +187 −0 modules/mercury/lk/bootstrap4/js/dist/button.js
  37. +1 −0 modules/mercury/lk/bootstrap4/js/dist/button.js.map
  38. +668 −0 modules/mercury/lk/bootstrap4/js/dist/carousel.js
  39. +1 −0 modules/mercury/lk/bootstrap4/js/dist/carousel.js.map
  40. +428 −0 modules/mercury/lk/bootstrap4/js/dist/collapse.js
  41. +1 −0 modules/mercury/lk/bootstrap4/js/dist/collapse.js.map
  42. +595 −0 modules/mercury/lk/bootstrap4/js/dist/dropdown.js
  43. +1 −0 modules/mercury/lk/bootstrap4/js/dist/dropdown.js.map
  44. +23 −0 modules/mercury/lk/bootstrap4/js/dist/index.js
  45. +1 −0 modules/mercury/lk/bootstrap4/js/dist/index.js.map
  46. +650 −0 modules/mercury/lk/bootstrap4/js/dist/modal.js
  47. +1 −0 modules/mercury/lk/bootstrap4/js/dist/modal.js.map
  48. +261 −0 modules/mercury/lk/bootstrap4/js/dist/popover.js
  49. +1 −0 modules/mercury/lk/bootstrap4/js/dist/popover.js.map
  50. +375 −0 modules/mercury/lk/bootstrap4/js/dist/scrollspy.js
  51. +1 −0 modules/mercury/lk/bootstrap4/js/dist/scrollspy.js.map
  52. +269 −0 modules/mercury/lk/bootstrap4/js/dist/tab.js
  53. +1 −0 modules/mercury/lk/bootstrap4/js/dist/tab.js.map
  54. +283 −0 modules/mercury/lk/bootstrap4/js/dist/toast.js
  55. +1 −0 modules/mercury/lk/bootstrap4/js/dist/toast.js.map
  56. +907 −0 modules/mercury/lk/bootstrap4/js/dist/tooltip.js
  57. +1 −0 modules/mercury/lk/bootstrap4/js/dist/tooltip.js.map
  58. +172 −0 modules/mercury/lk/bootstrap4/js/dist/util.js
  59. +1 −0 modules/mercury/lk/bootstrap4/js/dist/util.js.map
  60. +179 −0 modules/mercury/lk/bootstrap4/js/src/alert.js
  61. +171 −0 modules/mercury/lk/bootstrap4/js/src/button.js
  62. +606 −0 modules/mercury/lk/bootstrap4/js/src/carousel.js
  63. +402 −0 modules/mercury/lk/bootstrap4/js/src/collapse.js
  64. +545 −0 modules/mercury/lk/bootstrap4/js/src/dropdown.js
  65. +52 −0 modules/mercury/lk/bootstrap4/js/src/index.js
  66. +594 −0 modules/mercury/lk/bootstrap4/js/src/modal.js
  67. +184 −0 modules/mercury/lk/bootstrap4/js/src/popover.js
  68. +326 −0 modules/mercury/lk/bootstrap4/js/src/scrollspy.js
  69. +260 −0 modules/mercury/lk/bootstrap4/js/src/tab.js
  70. +227 −0 modules/mercury/lk/bootstrap4/js/src/toast.js
  71. +127 −0 modules/mercury/lk/bootstrap4/js/src/tools/sanitizer.js
  72. +785 −0 modules/mercury/lk/bootstrap4/js/src/tooltip.js
  73. +177 −0 modules/mercury/lk/bootstrap4/js/src/util.js
  74. +69 −0 modules/mercury/lk/bootstrap4/js/tests/README.md
  75. +82 −0 modules/mercury/lk/bootstrap4/js/tests/browsers.js
  76. +133 −0 modules/mercury/lk/bootstrap4/js/tests/index.html
  77. +8 −0 modules/mercury/lk/bootstrap4/js/tests/integration/bundle.js
  78. +66 −0 modules/mercury/lk/bootstrap4/js/tests/integration/index.html
  79. +20 −0 modules/mercury/lk/bootstrap4/js/tests/integration/rollup.bundle.js
  80. +143 −0 modules/mercury/lk/bootstrap4/js/tests/karma.conf.js
  81. +40 −0 modules/mercury/lk/bootstrap4/js/tests/unit/.eslintrc.json
  82. +123 −0 modules/mercury/lk/bootstrap4/js/tests/unit/alert.js
  83. +222 −0 modules/mercury/lk/bootstrap4/js/tests/unit/button.js
  84. +1,333 −0 modules/mercury/lk/bootstrap4/js/tests/unit/carousel.js
  85. +892 −0 modules/mercury/lk/bootstrap4/js/tests/unit/collapse.js
  86. +1,419 −0 modules/mercury/lk/bootstrap4/js/tests/unit/dropdown.js
  87. +815 −0 modules/mercury/lk/bootstrap4/js/tests/unit/modal.js
  88. +471 −0 modules/mercury/lk/bootstrap4/js/tests/unit/popover.js
  89. +728 −0 modules/mercury/lk/bootstrap4/js/tests/unit/scrollspy.js
  90. +518 −0 modules/mercury/lk/bootstrap4/js/tests/unit/tab.js
  91. +259 −0 modules/mercury/lk/bootstrap4/js/tests/unit/toast.js
  92. +1,269 −0 modules/mercury/lk/bootstrap4/js/tests/unit/tooltip.js
  93. +163 −0 modules/mercury/lk/bootstrap4/js/tests/unit/util.js
  94. +58 −0 modules/mercury/lk/bootstrap4/js/tests/visual/alert.html
  95. +51 −0 modules/mercury/lk/bootstrap4/js/tests/visual/button.html
  96. +66 −0 modules/mercury/lk/bootstrap4/js/tests/visual/carousel.html
  97. +78 −0 modules/mercury/lk/bootstrap4/js/tests/visual/collapse.html
  98. +212 −0 modules/mercury/lk/bootstrap4/js/tests/visual/dropdown.html
  99. +268 −0 modules/mercury/lk/bootstrap4/js/tests/visual/modal.html
  100. +46 −0 modules/mercury/lk/bootstrap4/js/tests/visual/popover.html
  101. +95 −0 modules/mercury/lk/bootstrap4/js/tests/visual/scrollspy.html
  102. +234 −0 modules/mercury/lk/bootstrap4/js/tests/visual/tab.html
  103. +72 −0 modules/mercury/lk/bootstrap4/js/tests/visual/toast.html
  104. +106 −0 modules/mercury/lk/bootstrap4/js/tests/visual/tooltip.html
  105. +0 −3 modules/mercury/lk/check.php
  106. +64 −21 modules/mercury/lk/cpwd.php
  107. +12 −246 modules/mercury/lk/css/style.css
  108. 0 modules/mercury/lk/highcharts.js
  109. BIN modules/mercury/lk/img/mercury.png
  110. +59 −0 modules/mercury/lk/img/user.svg
  111. +76 −13 modules/mercury/lk/index.php
  112. +4 −3 modules/mercury/lk/made.php
  113. +69 −49 modules/mercury/lk/menu.php
  114. +19 −31 modules/mercury/lk/msgbar.php
  115. +32 −83 modules/mercury/lk/predsed.php
  116. +38 −17 modules/mercury/lk/righttbl.php
  117. +8 −23 modules/mercury/lk/user.php
  118. +106 −0 modules/mercury/lk2/check.php
  119. +42 −0 modules/mercury/lk2/cpwd.php
  120. BIN modules/mercury/lk2/css/IstokWeb-Regular.ttf
  121. +258 −0 modules/mercury/lk2/css/style.css
  122. +1 −0 modules/mercury/lk2/img/1
  123. BIN modules/mercury/lk2/img/add.png
  124. BIN modules/mercury/lk2/img/fon.png
  125. BIN modules/mercury/lk2/img/line.png
  126. BIN modules/mercury/lk2/img/s1.png
  127. BIN modules/mercury/lk2/img/s2.png
  128. BIN modules/mercury/lk2/img/s3.png
  129. BIN modules/mercury/lk2/img/s4.png
  130. +97 −0 modules/mercury/lk2/index.php
  131. +5 −0 modules/mercury/lk2/made.php
  132. +65 −0 modules/mercury/lk2/menu.php
  133. +47 −0 modules/mercury/lk2/msgbar.php
  134. +272 −0 modules/mercury/lk2/predsed.php
  135. +32 −0 modules/mercury/lk2/righttbl.php
  136. +151 −0 modules/mercury/lk2/user.php

This file was deleted.

@@ -0,0 +1,20 @@
{
"env": {
"browser": false,
"node": true
},
"parserOptions": {
"sourceType": "script"
},
"extends": "../.eslintrc.json",
"rules": {
"consistent-return": "off",
"func-style": "off",
"no-console": "off",
"no-magic-numbers": "off",
"no-process-env": "off",
"no-process-exit": "off",
"no-sync": "off",
"spaced-comment": "off"
}
}
@@ -0,0 +1,14 @@
'use strict'

const pkg = require('../package.json')
const year = new Date().getFullYear()

function getBanner(pluginFilename) {
return `/*!
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/`
}

module.exports = getBanner
@@ -0,0 +1,85 @@
/*!
* Script to build our plugins to use them separately.
* Copyright 2019 The Bootstrap Authors
* Copyright 2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

'use strict'

const path = require('path')
const rollup = require('rollup')
const babel = require('rollup-plugin-babel')
const banner = require('./banner.js')

const TEST = process.env.NODE_ENV === 'test'
const plugins = [
babel({
exclude: 'node_modules/**', // Only transpile our source code
externalHelpersWhitelist: [ // Include only required helpers
'defineProperties',
'createClass',
'inheritsLoose',
'defineProperty',
'objectSpread'
]
})
]
const bsPlugins = {
Alert: path.resolve(__dirname, '../js/src/alert.js'),
Button: path.resolve(__dirname, '../js/src/button.js'),
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'),
Modal: path.resolve(__dirname, '../js/src/modal.js'),
Popover: path.resolve(__dirname, '../js/src/popover.js'),
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
Tab: path.resolve(__dirname, '../js/src/tab.js'),
Toast: path.resolve(__dirname, '../js/src/toast.js'),
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'),
Util: path.resolve(__dirname, '../js/src/util.js')
}
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'

function build(plugin) {
console.log(`Building ${plugin} plugin...`)

const external = ['jquery', 'popper.js']
const globals = {
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
'popper.js': 'Popper'
}

// Do not bundle Util in plugins
if (plugin !== 'Util') {
external.push(bsPlugins.Util)
globals[bsPlugins.Util] = 'Util'
}

// Do not bundle Tooltip in Popover
if (plugin === 'Popover') {
external.push(bsPlugins.Tooltip)
globals[bsPlugins.Tooltip] = 'Tooltip'
}

const pluginFilename = `${plugin.toLowerCase()}.js`

rollup.rollup({
input: bsPlugins[plugin],
plugins,
external
}).then((bundle) => {
bundle.write({
banner: banner(pluginFilename),
format: 'umd',
name: plugin,
sourcemap: true,
globals,
file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
})
.then(() => console.log(`Building ${plugin} plugin... Done!`))
.catch((err) => console.error(`${plugin}: ${err}`))
})
}

Object.keys(bsPlugins).forEach((plugin) => build(plugin))
@@ -0,0 +1,104 @@
#!/usr/bin/env node

/*!
* Script to update version number references in the project.
* Copyright 2017-2019 The Bootstrap Authors
* Copyright 2017-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

'use strict'

const fs = require('fs')
const path = require('path')
const sh = require('shelljs')

sh.config.fatal = true

// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}

function regExpQuoteReplacement(string) {
return string.replace(/[$]/g, '$$')
}

const DRY_RUN = false

function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) {
return
}
fs.readdir(directory, (err, names) => {
if (err) {
errback(err)
return
}
names.forEach((name) => {
const filepath = path.join(directory, name)
fs.lstat(filepath, (err, stats) => {
if (err) {
process.nextTick(errback, err)
return
}
if (stats.isDirectory()) {
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
} else if (stats.isFile()) {
process.nextTick(fileCallback, filepath)
}
})
})
})
}

function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(regExpQuote(original), 'g')
replacement = regExpQuoteReplacement(replacement)
const updateFile = DRY_RUN ? (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log(`FILE: ${filepath}`)
} else {
console.log(`EXCLUDED:${filepath}`)
}
} : (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sh.sed('-i', original, replacement, filepath)
}
}
walkAsync(directory, excludedDirectories, updateFile, (err) => {
console.error('ERROR while traversing directory!:')
console.error(err)
process.exit(1)
})
}

function main(args) {
if (args.length !== 2) {
console.error('USAGE: change-version old_version new_version')
console.error('Got arguments:', args)
process.exit(1)
}
const oldVersion = args[0]
const newVersion = args[1]
const EXCLUDED_DIRS = new Set([
'.git',
'node_modules',
'vendor'
])
const INCLUDED_EXTENSIONS = new Set([
// This extension whitelist is how we avoid modifying binary files
'',
'.css',
'.html',
'.js',
'.json',
'.md',
'.scss',
'.txt',
'.yml'
])
replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion)
}

main(process.argv.slice(2))
@@ -0,0 +1,66 @@
#!/usr/bin/env node

/*!
* Script to generate SRI hashes for use in our docs.
* Remember to use the same vendor files as the CDN ones,
* otherwise the hashes won't match!
*
* Copyright 2017-2019 The Bootstrap Authors
* Copyright 2017-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

'use strict'

const crypto = require('crypto')
const fs = require('fs')
const path = require('path')
const sh = require('shelljs')

const pkg = require('../package.json')

sh.config.fatal = true

const configFile = path.join(__dirname, '../_config.yml')

// Array of objects which holds the files to generate SRI hashes for.
// `file` is the path from the root folder
// `configPropertyName` is the _config.yml variable's name of the file
const files = [
{
file: 'dist/css/bootstrap.min.css',
configPropertyName: 'css_hash'
},
{
file: 'dist/js/bootstrap.min.js',
configPropertyName: 'js_hash'
},
{
file: 'dist/js/bootstrap.bundle.min.js',
configPropertyName: 'js_bundle_hash'
},
{
file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`,
configPropertyName: 'jquery_hash'
},
{
file: 'node_modules/popper.js/dist/umd/popper.min.js',
configPropertyName: 'popper_hash'
}
]

files.forEach((file) => {
fs.readFile(file.file, 'utf8', (err, data) => {
if (err) {
throw err
}

const algo = 'sha384'
const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64')
const integrity = `${algo}-${hash}`

console.log(`${file.configPropertyName}: ${integrity}`)

sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile)
})
})
@@ -0,0 +1,14 @@
'use strict'

module.exports = (ctx) => ({
map: ctx.file.dirname.includes('examples') ? false : {
inline: false,
annotation: true,
sourcesContent: true
},
plugins: {
autoprefixer: {
cascade: false
}
}
})

0 comments on commit 3170960

Please sign in to comment.
You can’t perform that action at this time.