Skip to content

Commit 245364e

Browse files
authored
Merge pull request #46 from mum-project/fix/js
Fix npm dependencies, Chart
2 parents 25f13f8 + d854e7f commit 245364e

File tree

10 files changed

+14089
-9775
lines changed

10 files changed

+14089
-9775
lines changed

package-lock.json

+13,976-9,657
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+15-17
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,25 @@
1111
},
1212
"devDependencies": {
1313
"@fortawesome/fontawesome-free-webfonts": "^1.0.9",
14-
"axios": "^0.21.2",
15-
"chart.js": "^2.9.4",
16-
"cross-env": "^5.2.0",
14+
"@popperjs/core": "^2.11.0",
15+
"axios": "^0.24.0",
16+
"chart.js": "^3.7.0",
17+
"chartjs-adapter-moment": "^1.0.0",
18+
"cross-env": "^7.0.3",
1719
"diceware-generator": "^3.0.1",
1820
"diceware-wordlist-en-eff": "^1.0.1",
19-
"fuse.js": "^3.2.1",
20-
"laravel-mix": "^6.0.11",
21+
"fuse.js": "^6.5.3",
22+
"laravel-mix": "^6.0.39",
2123
"lodash": "^4.17.21",
2224
"moment": "^2.29.1",
23-
"popper.js": "^1.12",
24-
"postcss": "^8.2.10",
25-
"sass": "^1.32.5",
26-
"sass-loader": "^8.0.2",
25+
"postcss": "^8.4.5",
26+
"sass": "^1.45.1",
27+
"sass-loader": "^12.4.0",
2728
"tailwindcss": "^0.6.1",
28-
"vue": "^2.6.12",
29-
"vue-loader": "^15.9.6",
30-
"vue-select": "^2.4.0",
31-
"vue-template-compiler": "^2.6.12"
32-
},
33-
"dependencies": {
34-
"npm": "^6.13.4",
35-
"v-tooltip": "^2.0.0-rc.33"
29+
"v-tooltip": "^2.1.3",
30+
"vue": "^2.6.14",
31+
"vue-loader": "^15.9.8",
32+
"vue-select": "^3.16.0",
33+
"vue-template-compiler": "^2.6.14"
3634
}
3735
}

public/css/app.css

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js.LICENSE.txt

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
/*!
2-
* Fuse.js v3.6.1 - Lightweight fuzzy-search (http://fusejs.io)
3-
*
4-
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
5-
* All Rights Reserved. Apache Software License 2.0
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*/
2+
* chartjs-adapter-moment v1.0.0
3+
* https://www.chartjs.org
4+
* (c) 2021 chartjs-adapter-moment Contributors
5+
* Released under the MIT license
6+
*/
97

108
/*!
119
* The buffer module from node.js, for the browser.

public/js/manifest.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/vendor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/vendor.js.LICENSE.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*!
2-
* Chart.js v2.9.4
2+
* Chart.js v3.7.0
33
* https://www.chartjs.org
4-
* (c) 2020 Chart.js Contributors
4+
* (c) 2021 Chart.js Contributors
55
* Released under the MIT License
66
*/
77

88
/*!
9-
* Vue.js v2.6.12
10-
* (c) 2014-2020 Evan You
9+
* Vue.js v2.6.14
10+
* (c) 2014-2021 Evan You
1111
* Released under the MIT License.
1212
*/
1313

public/mix-manifest.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"/js/app.js": "/js/app.js?id=6a468fd21d567ccb72b6",
3-
"/js/manifest.js": "/js/manifest.js?id=44be65cf057022ba3297",
4-
"/css/app.css": "/css/app.css?id=ab7b77ca26713706c024",
5-
"/js/vendor.js": "/js/vendor.js?id=41cdb7cbc270d9a49313"
2+
"/js/app.js": "/js/app.js?id=ef0bc8e2a081c813cb3b",
3+
"/js/manifest.js": "/js/manifest.js?id=31929efec70b9b7b4027",
4+
"/css/app.css": "/css/app.css?id=31f5f0f442e7efad79b3",
5+
"/js/vendor.js": "/js/vendor.js?id=382634383cc913c2dfa4"
66
}

resources/assets/js/components/SizeMeasurementsChart.vue

+80-79
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
2-
<canvas :width="ratio.x" :height="ratio.y"></canvas>
2+
<canvas :width="ratio.x" :height="ratio.y"></canvas>
33
</template>
44

55
<script>
6-
import Chart from 'chart.js';
6+
import {Chart, registerables} from 'chart.js';
7+
import 'chartjs-adapter-moment';
78
89
export default {
910
props: {
@@ -93,6 +94,7 @@ export default {
9394
},
9495
},
9596
mounted() {
97+
Chart.register(...registerables);
9698
let ctx = this.$el.getContext('2d');
9799
new Chart(ctx, {
98100
type: 'line',
@@ -102,53 +104,53 @@ export default {
102104
{
103105
data: this.values,
104106
backgroundColor:
105-
'rgba(' +
106-
this.colorRGB.r +
107-
',' +
108-
this.colorRGB.g +
109-
',' +
110-
this.colorRGB.b +
111-
',0.3)',
107+
'rgba(' +
108+
this.colorRGB.r +
109+
',' +
110+
this.colorRGB.g +
111+
',' +
112+
this.colorRGB.b +
113+
',0.3)',
112114
borderColor:
113-
'rgba(' +
114-
this.colorRGB.r +
115-
',' +
116-
this.colorRGB.g +
117-
',' +
118-
this.colorRGB.b +
119-
',1)',
115+
'rgba(' +
116+
this.colorRGB.r +
117+
',' +
118+
this.colorRGB.g +
119+
',' +
120+
this.colorRGB.b +
121+
',1)',
120122
pointBackgroundColor:
121-
'rgba(' +
122-
this.colorRGB.r +
123-
',' +
124-
this.colorRGB.g +
125-
',' +
126-
this.colorRGB.b +
127-
',0.3)',
123+
'rgba(' +
124+
this.colorRGB.r +
125+
',' +
126+
this.colorRGB.g +
127+
',' +
128+
this.colorRGB.b +
129+
',0.3)',
128130
pointBorderColor:
129-
'rgba(' +
130-
this.colorRGB.r +
131-
',' +
132-
this.colorRGB.g +
133-
',' +
134-
this.colorRGB.b +
135-
',1)',
131+
'rgba(' +
132+
this.colorRGB.r +
133+
',' +
134+
this.colorRGB.g +
135+
',' +
136+
this.colorRGB.b +
137+
',1)',
136138
pointHoverBackgroundColor:
137-
'rgba(' +
138-
this.colorRGB.r +
139-
',' +
140-
this.colorRGB.g +
141-
',' +
142-
this.colorRGB.b +
143-
',1)',
139+
'rgba(' +
140+
this.colorRGB.r +
141+
',' +
142+
this.colorRGB.g +
143+
',' +
144+
this.colorRGB.b +
145+
',1)',
144146
pointHoverBorderColor:
145-
'rgba(' +
146-
this.colorRGB.r +
147-
',' +
148-
this.colorRGB.g +
149-
',' +
150-
this.colorRGB.b +
151-
',1)',
147+
'rgba(' +
148+
this.colorRGB.r +
149+
',' +
150+
this.colorRGB.g +
151+
',' +
152+
this.colorRGB.b +
153+
',1)',
152154
cubicInterpolationMode: 'monotone',
153155
pointRadius: this.showPoints ? 4 : 0,
154156
borderWidth: this.lineThickness,
@@ -165,46 +167,45 @@ export default {
165167
bottom: this.padding.b,
166168
},
167169
},
168-
legend: {
169-
display: this.showLegend,
170-
},
171170
scales: {
172-
xAxes: [
173-
{
174-
type: 'time',
175-
ticks: {
176-
padding: this.showAxisLabels.x ? 4 : 0,
177-
display: this.showAxisLabels.x,
178-
},
179-
gridLines: {
180-
display: this.showGridLines.x,
181-
color: '#f1f5f8',
182-
drawBorder: this.showAxisLabels.x,
183-
},
171+
xAxis: {
172+
type: 'time',
173+
ticks: {
174+
padding: this.showAxisLabels.x ? 4 : 0,
175+
display: this.showAxisLabels.x,
184176
},
185-
],
186-
yAxes: [
187-
{
188-
ticks: {
189-
callback: (value, index, values) => {
190-
return this.getPrettyDataSizeString(value);
191-
},
192-
padding: this.showAxisLabels.y ? 4 : 0,
193-
display: this.showAxisLabels.y,
194-
},
195-
gridLines: {
196-
display: this.showGridLines.y,
197-
color: '#f1f5f8',
198-
drawBorder: this.showAxisLabels.y,
177+
gridLines: {
178+
display: this.showGridLines.x,
179+
color: '#f1f5f8',
180+
drawBorder: this.showAxisLabels.x,
181+
},
182+
},
183+
yAxis: {
184+
ticks: {
185+
callback: (value, index, values) => {
186+
return this.getPrettyDataSizeString(value);
199187
},
188+
padding: this.showAxisLabels.y ? 4 : 0,
189+
display: this.showAxisLabels.y,
190+
},
191+
gridLines: {
192+
display: this.showGridLines.x,
193+
color: '#f1f5f8',
194+
drawBorder: this.showAxisLabels.x,
200195
},
201-
],
196+
},
202197
},
203-
tooltips: {
204-
enabled: this.showPoints,
205-
callbacks: {
206-
label: (tooltipItem, data) => {
207-
return this.getPrettyDataSizeString(tooltipItem.yLabel);
198+
plugins: {
199+
legend: {
200+
display: this.showLegend,
201+
},
202+
tooltip: {
203+
enabled: true,
204+
intersect: false,
205+
callbacks: {
206+
label: (tooltipItem, data) => {
207+
return this.getPrettyDataSizeString(tooltipItem.raw);
208+
},
208209
},
209210
},
210211
},

0 commit comments

Comments
 (0)