Skip to content

Commit

Permalink
Merge pull request #46 from mum-project/fix/js
Browse files Browse the repository at this point in the history
Fix npm dependencies, Chart
  • Loading branch information
martbock authored Dec 24, 2021
2 parents 25f13f8 + d854e7f commit 245364e
Show file tree
Hide file tree
Showing 10 changed files with 14,089 additions and 9,775 deletions.
23,633 changes: 13,976 additions & 9,657 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 15 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,25 @@
},
"devDependencies": {
"@fortawesome/fontawesome-free-webfonts": "^1.0.9",
"axios": "^0.21.2",
"chart.js": "^2.9.4",
"cross-env": "^5.2.0",
"@popperjs/core": "^2.11.0",
"axios": "^0.24.0",
"chart.js": "^3.7.0",
"chartjs-adapter-moment": "^1.0.0",
"cross-env": "^7.0.3",
"diceware-generator": "^3.0.1",
"diceware-wordlist-en-eff": "^1.0.1",
"fuse.js": "^3.2.1",
"laravel-mix": "^6.0.11",
"fuse.js": "^6.5.3",
"laravel-mix": "^6.0.39",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"popper.js": "^1.12",
"postcss": "^8.2.10",
"sass": "^1.32.5",
"sass-loader": "^8.0.2",
"postcss": "^8.4.5",
"sass": "^1.45.1",
"sass-loader": "^12.4.0",
"tailwindcss": "^0.6.1",
"vue": "^2.6.12",
"vue-loader": "^15.9.6",
"vue-select": "^2.4.0",
"vue-template-compiler": "^2.6.12"
},
"dependencies": {
"npm": "^6.13.4",
"v-tooltip": "^2.0.0-rc.33"
"v-tooltip": "^2.1.3",
"vue": "^2.6.14",
"vue-loader": "^15.9.8",
"vue-select": "^3.16.0",
"vue-template-compiler": "^2.6.14"
}
}
6 changes: 2 additions & 4 deletions public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/*!
* Fuse.js v3.6.1 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
* chartjs-adapter-moment v1.0.0
* https://www.chartjs.org
* (c) 2021 chartjs-adapter-moment Contributors
* Released under the MIT license
*/

/*!
* The buffer module from node.js, for the browser.
Expand Down
2 changes: 1 addition & 1 deletion public/js/manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/js/vendor.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/js/vendor.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*!
* Chart.js v2.9.4
* Chart.js v3.7.0
* https://www.chartjs.org
* (c) 2020 Chart.js Contributors
* (c) 2021 Chart.js Contributors
* Released under the MIT License
*/

/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Vue.js v2.6.14
* (c) 2014-2021 Evan You
* Released under the MIT License.
*/

Expand Down
8 changes: 4 additions & 4 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=6a468fd21d567ccb72b6",
"/js/manifest.js": "/js/manifest.js?id=44be65cf057022ba3297",
"/css/app.css": "/css/app.css?id=ab7b77ca26713706c024",
"/js/vendor.js": "/js/vendor.js?id=41cdb7cbc270d9a49313"
"/js/app.js": "/js/app.js?id=ef0bc8e2a081c813cb3b",
"/js/manifest.js": "/js/manifest.js?id=31929efec70b9b7b4027",
"/css/app.css": "/css/app.css?id=31f5f0f442e7efad79b3",
"/js/vendor.js": "/js/vendor.js?id=382634383cc913c2dfa4"
}
159 changes: 80 additions & 79 deletions resources/assets/js/components/SizeMeasurementsChart.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<template>
<canvas :width="ratio.x" :height="ratio.y"></canvas>
<canvas :width="ratio.x" :height="ratio.y"></canvas>
</template>

<script>
import Chart from 'chart.js';
import {Chart, registerables} from 'chart.js';
import 'chartjs-adapter-moment';
export default {
props: {
Expand Down Expand Up @@ -93,6 +94,7 @@ export default {
},
},
mounted() {
Chart.register(...registerables);
let ctx = this.$el.getContext('2d');
new Chart(ctx, {
type: 'line',
Expand All @@ -102,53 +104,53 @@ export default {
{
data: this.values,
backgroundColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',0.3)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',0.3)',
borderColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
pointBackgroundColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',0.3)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',0.3)',
pointBorderColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
pointHoverBackgroundColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
pointHoverBorderColor:
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
'rgba(' +
this.colorRGB.r +
',' +
this.colorRGB.g +
',' +
this.colorRGB.b +
',1)',
cubicInterpolationMode: 'monotone',
pointRadius: this.showPoints ? 4 : 0,
borderWidth: this.lineThickness,
Expand All @@ -165,46 +167,45 @@ export default {
bottom: this.padding.b,
},
},
legend: {
display: this.showLegend,
},
scales: {
xAxes: [
{
type: 'time',
ticks: {
padding: this.showAxisLabels.x ? 4 : 0,
display: this.showAxisLabels.x,
},
gridLines: {
display: this.showGridLines.x,
color: '#f1f5f8',
drawBorder: this.showAxisLabels.x,
},
xAxis: {
type: 'time',
ticks: {
padding: this.showAxisLabels.x ? 4 : 0,
display: this.showAxisLabels.x,
},
],
yAxes: [
{
ticks: {
callback: (value, index, values) => {
return this.getPrettyDataSizeString(value);
},
padding: this.showAxisLabels.y ? 4 : 0,
display: this.showAxisLabels.y,
},
gridLines: {
display: this.showGridLines.y,
color: '#f1f5f8',
drawBorder: this.showAxisLabels.y,
gridLines: {
display: this.showGridLines.x,
color: '#f1f5f8',
drawBorder: this.showAxisLabels.x,
},
},
yAxis: {
ticks: {
callback: (value, index, values) => {
return this.getPrettyDataSizeString(value);
},
padding: this.showAxisLabels.y ? 4 : 0,
display: this.showAxisLabels.y,
},
gridLines: {
display: this.showGridLines.x,
color: '#f1f5f8',
drawBorder: this.showAxisLabels.x,
},
],
},
},
tooltips: {
enabled: this.showPoints,
callbacks: {
label: (tooltipItem, data) => {
return this.getPrettyDataSizeString(tooltipItem.yLabel);
plugins: {
legend: {
display: this.showLegend,
},
tooltip: {
enabled: true,
intersect: false,
callbacks: {
label: (tooltipItem, data) => {
return this.getPrettyDataSizeString(tooltipItem.raw);
},
},
},
},
Expand Down

0 comments on commit 245364e

Please sign in to comment.