@tabler/core
Advanced tools
Comparing version
@@ -16,6 +16,5 @@ var __assign = (this && this.__assign) || function () { | ||
var _this = this; | ||
this.target = target; | ||
this.endVal = endVal; | ||
this.options = options; | ||
this.version = '2.0.7'; | ||
this.version = '2.1.0'; | ||
this.defaults = { | ||
@@ -32,3 +31,5 @@ startVal: 0, | ||
prefix: '', | ||
suffix: '' | ||
suffix: '', | ||
enableScrollSpy: false, | ||
scrollSpyDelay: 200, | ||
}; | ||
@@ -92,6 +93,6 @@ this.finalEndVal = null; // for smart easing | ||
var neg = (num < 0) ? '-' : ''; | ||
var result, x, x1, x2, x3; | ||
var result, x1, x2, x3; | ||
result = Math.abs(num).toFixed(_this.options.decimalPlaces); | ||
result += ''; | ||
x = result.split('.'); | ||
var x = result.split('.'); | ||
x1 = x[0]; | ||
@@ -141,3 +142,33 @@ x2 = x.length > 1 ? _this.options.decimal + x[1] : ''; | ||
} | ||
// scroll spy | ||
if (window !== undefined && this.options.enableScrollSpy) { | ||
if (!this.error) { | ||
// set up global array of onscroll functions | ||
window['onScrollFns'] = window['onScrollFns'] || []; | ||
window['onScrollFns'].push(function () { return _this.handleScroll(_this); }); | ||
window.onscroll = function () { | ||
window['onScrollFns'].forEach(function (fn) { return fn(); }); | ||
}; | ||
this.handleScroll(this); | ||
} | ||
else { | ||
console.error(this.error, target); | ||
} | ||
} | ||
} | ||
CountUp.prototype.handleScroll = function (self) { | ||
if (!self || !window) | ||
return; | ||
var bottomOfScroll = window.innerHeight + window.scrollY; | ||
var bottomOfEl = self.el.offsetTop + self.el.offsetHeight; | ||
if (bottomOfEl < bottomOfScroll && bottomOfEl > window.scrollY && self.paused) { | ||
// in view | ||
self.paused = false; | ||
setTimeout(function () { return self.start(); }, self.options.scrollSpyDelay); | ||
} | ||
else if (window.scrollY > bottomOfEl && !self.paused) { | ||
// scrolled past | ||
self.reset(); | ||
} | ||
}; | ||
// determines where easing starts and whether to count down or up | ||
@@ -144,0 +175,0 @@ CountUp.prototype.determineDirectionAndSmartEasing = function () { |
124
package.json
{ | ||
"name": "@tabler/core", | ||
"version": "1.0.0-beta", | ||
"version": "1.0.0-beta10", | ||
"description": "Premium and Open Source dashboard template with responsive and high quality UI.", | ||
"scripts": { | ||
"start": "gulp start", | ||
"start-plugins": "gulp start --with-plugins", | ||
"build": "gulp build", | ||
@@ -13,3 +14,7 @@ "preview": "gulp build --preview", | ||
"svg-icons": "gulp svg-icons", | ||
"percy": "gulp build && npx percy snapshot demo" | ||
"percy": "gulp build && npx percy snapshot demo", | ||
"bundlewatch": "bundlewatch --config .bundlewatch.config.json", | ||
"chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN", | ||
"storybook": "start-storybook -p 6006", | ||
"changelog": "gulp changelog" | ||
}, | ||
@@ -39,3 +44,3 @@ "repository": { | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=14" | ||
}, | ||
@@ -50,15 +55,26 @@ "files": [ | ||
"sass": "src/scss/tabler.scss", | ||
"unpkg": "dist/js/tabler.min.js", | ||
"umd:main": "dist/js/tabler.min.js", | ||
"module": "dist/js/tabler.esm.js", | ||
"main": "dist/js/tabler.js", | ||
"homepage": "https://tabler.io", | ||
"devDependencies": { | ||
"@babel/core": "^7.12.16", | ||
"@babel/preset-env": "^7.12.16", | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@rollup/plugin-replace": "^2.3.4", | ||
"@babel/core": "^7.17.9", | ||
"@babel/preset-env": "^7.16.11", | ||
"@rollup/plugin-commonjs": "^21.0.3", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@rollup/pluginutils": "^4.2.0", | ||
"@rollup/stream": "^2.0.0", | ||
"autoprefixer": "^10.2.4", | ||
"browser-sync": "^2.26.14", | ||
"critical": "^2.0.6", | ||
"apexcharts": "^3.35.0", | ||
"autoprefixer": "^10.4.4", | ||
"autosize": "^5.0.1", | ||
"browser-sync": "^2.27.9", | ||
"bundlewatch": "^0.3.3", | ||
"choices.js": "^10.1.0", | ||
"chromatic": "^6.5.3", | ||
"countup.js": "^2.1.0", | ||
"critical": "^4.0.1", | ||
"cross-spawn": "^7.0.3", | ||
"flatpickr": "^4.6.11", | ||
"gulp": "^4.0.2", | ||
@@ -70,30 +86,76 @@ "gulp-clean": "^0.4.0", | ||
"gulp-minify": "^3.1.0", | ||
"gulp-postcss": "^9.0.0", | ||
"gulp-purgecss": "^4.0.0", | ||
"gulp-postcss": "^9.0.1", | ||
"gulp-purgecss": "^4.1.3", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-rtlcss": "^1.4.1", | ||
"gulp-sass": "^4.1.0", | ||
"postcss": "^8.2.6", | ||
"release-it": "^14.4.0", | ||
"rollup": "^2.39.0", | ||
"gulp-rtlcss": "^2.0.0", | ||
"gulp-sass": "^5.1.0", | ||
"imask": "^6.4.2", | ||
"jsvectormap": "^1.4.5", | ||
"litepicker": "^2.0.12", | ||
"nouislider": "^15.5.1", | ||
"postcss": "^8.4.12", | ||
"release-it": "^14.14.0", | ||
"rollup": "^2.70.1", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-cleanup": "^3.2.1", | ||
"sass": "^1.49.11", | ||
"tom-select": "^2.0.1", | ||
"vinyl-buffer": "^1.0.1", | ||
"vinyl-source-stream": "^2.0.0", | ||
"yaml": "^1.10.0", | ||
"yargs": "^16.2.0" | ||
"yaml": "^2.0.0", | ||
"yargs": "^17.4.0" | ||
}, | ||
"dependencies": { | ||
"@popperjs/core": "^2.7.0", | ||
"@tabler/icons": "^1.39.1", | ||
"apexcharts": "^3.25.0", | ||
"autosize": "^4.0.2", | ||
"bootstrap": "twbs/bootstrap#5c32767e0e0dbac2d934bcdee03719a65d3f1187", | ||
"choices.js": "^9.0.1", | ||
"countup.js": "^2.0.7", | ||
"flatpickr": "^4.6.9", | ||
"imask": "^6.0.7", | ||
"litepicker": "^2.0.6", | ||
"nouislider": "^14.6.3" | ||
"@popperjs/core": "^2.11.5", | ||
"@tabler/icons": "^1.67.0", | ||
"bootstrap": "5.1.3" | ||
}, | ||
"peerDependencies": { | ||
"apexcharts": "^3.35.0", | ||
"autosize": "^5.0.1", | ||
"choices.js": "^10.1.0", | ||
"countup.js": "^2.1.0", | ||
"flatpickr": "^4.6.11", | ||
"imask": "^6.4.2", | ||
"list.js": "^2.3.1", | ||
"jsvectormap": "^1.4.5", | ||
"litepicker": "^2.0.12", | ||
"nouislider": "^15.5.1", | ||
"tom-select": "^2.0.1" | ||
}, | ||
"peerDependenciesMeta": { | ||
"apexcharts": { | ||
"optional": true | ||
}, | ||
"autosize": { | ||
"optional": true | ||
}, | ||
"choices.js": { | ||
"optional": true | ||
}, | ||
"countup.js": { | ||
"optional": true | ||
}, | ||
"flatpickr": { | ||
"optional": true | ||
}, | ||
"imask": { | ||
"optional": true | ||
}, | ||
"list.js": { | ||
"optional": true | ||
}, | ||
"litepicker": { | ||
"optional": true | ||
}, | ||
"nouislider": { | ||
"optional": true | ||
}, | ||
"tom-select": { | ||
"optional": true | ||
}, | ||
"jsvectormap": { | ||
"optional": true | ||
} | ||
}, | ||
"resolutions": { | ||
@@ -100,0 +162,0 @@ "**/**/node-gyp": "^5.0.0" |
@@ -13,3 +13,3 @@ | ||
<a href="https://github.com/tabler/tabler/archive/dev.zip" target="__blank"><img src="https://img.shields.io/static/v1?label=Download&message=ZIP&color=339af0" alt="Tabler preview"></a> | ||
<br> | ||
<a href="https://github.com/tabler/tabler/actions/workflows/preview.yml" target="__blank"><img alt="GitHub stars" src="https://github.com/tabler/tabler/actions/workflows/preview.yml/badge.svg"></a> | ||
<a href="https://github.com/tabler/tabler" target="__blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/tabler/tabler?style=social"></a> | ||
@@ -43,2 +43,7 @@ </p> | ||
## Documentation | ||
Documentation is available as a part of Tabler preview: https://preview.tabler.io/docs/ | ||
## Sponsor Tabler | ||
@@ -148,4 +153,10 @@ | ||
## Thanks | ||
<a href="https://www.chromatic.com/"><img src="https://user-images.githubusercontent.com/321738/84662277-e3db4f80-af1b-11ea-88f5-91d67a5e59f6.png" width="153" height="30" alt="Chromatic" /></a> | ||
Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and catch visual regressions. | ||
## License | ||
See the [LICENSE](https://github.com/tabler/tabler/blob/master/LICENSE) file. |
//Vendor | ||
import './autosize'; | ||
import './input-mask'; | ||
import './dropdown'; | ||
import './tooltip'; | ||
import './popover'; | ||
import './switch-icon'; | ||
import './toast'; | ||
import './src/autosize'; | ||
import './src/input-mask'; | ||
import './src/dropdown'; | ||
import './src/tooltip'; | ||
import './src/popover'; | ||
import './src/switch-icon'; | ||
import './src/tab'; | ||
import './src/toast'; | ||
import * as bootstrap from 'bootstrap'; | ||
window.bootstrap = bootstrap; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
6312384
14.62%509
3.04%60157
45.22%160
7.38%0
-100%0
-100%14
27.27%44
46.67%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated