Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
325
VApp/node_modules/vuetify/lib/components/VSparkline/VSparkline.mjs
generated
vendored
Normal file
325
VApp/node_modules/vuetify/lib/components/VSparkline/VSparkline.mjs
generated
vendored
Normal file
@@ -0,0 +1,325 @@
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
// Mixins
|
||||
import Colorable from "../../mixins/colorable.mjs"; // Utilities
|
||||
import mixins from "../../util/mixins.mjs";
|
||||
import { genPoints, genBars } from "./helpers/core.mjs";
|
||||
import { genPath } from "./helpers/path.mjs"; // Types
|
||||
export default mixins(Colorable).extend({
|
||||
name: 'VSparkline',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
autoDraw: Boolean,
|
||||
autoDrawDuration: {
|
||||
type: Number,
|
||||
default: 2000
|
||||
},
|
||||
autoDrawEasing: {
|
||||
type: String,
|
||||
default: 'ease'
|
||||
},
|
||||
autoLineWidth: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
},
|
||||
fill: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
gradient: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
gradientDirection: {
|
||||
type: String,
|
||||
validator: val => ['top', 'bottom', 'left', 'right'].includes(val),
|
||||
default: 'top'
|
||||
},
|
||||
height: {
|
||||
type: [String, Number],
|
||||
default: 75
|
||||
},
|
||||
labels: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
labelSize: {
|
||||
type: [Number, String],
|
||||
default: 7
|
||||
},
|
||||
lineWidth: {
|
||||
type: [String, Number],
|
||||
default: 4
|
||||
},
|
||||
padding: {
|
||||
type: [String, Number],
|
||||
default: 8
|
||||
},
|
||||
showLabels: Boolean,
|
||||
smooth: {
|
||||
type: [Boolean, Number, String],
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'trend',
|
||||
validator: val => ['trend', 'bar'].includes(val)
|
||||
},
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
width: {
|
||||
type: [Number, String],
|
||||
default: 300
|
||||
}
|
||||
},
|
||||
data: () => ({
|
||||
lastLength: 0
|
||||
}),
|
||||
computed: {
|
||||
parsedPadding() {
|
||||
return Number(this.padding);
|
||||
},
|
||||
parsedWidth() {
|
||||
return Number(this.width);
|
||||
},
|
||||
parsedHeight() {
|
||||
return parseInt(this.height, 10);
|
||||
},
|
||||
parsedLabelSize() {
|
||||
return parseInt(this.labelSize, 10) || 7;
|
||||
},
|
||||
totalHeight() {
|
||||
let height = this.parsedHeight;
|
||||
if (this.hasLabels) height += parseInt(this.labelSize, 10) * 1.5;
|
||||
return height;
|
||||
},
|
||||
totalWidth() {
|
||||
let width = this.parsedWidth;
|
||||
if (this.type === 'bar') width = Math.max(this.value.length * this._lineWidth, width);
|
||||
return width;
|
||||
},
|
||||
totalValues() {
|
||||
return this.value.length;
|
||||
},
|
||||
_lineWidth() {
|
||||
if (this.autoLineWidth && this.type !== 'trend') {
|
||||
const totalPadding = this.parsedPadding * (this.totalValues + 1);
|
||||
return (this.parsedWidth - totalPadding) / this.totalValues;
|
||||
} else {
|
||||
return parseFloat(this.lineWidth) || 4;
|
||||
}
|
||||
},
|
||||
boundary() {
|
||||
if (this.type === 'bar') return {
|
||||
minX: 0,
|
||||
maxX: this.totalWidth,
|
||||
minY: 0,
|
||||
maxY: this.parsedHeight
|
||||
};
|
||||
const padding = this.parsedPadding;
|
||||
return {
|
||||
minX: padding,
|
||||
maxX: this.totalWidth - padding,
|
||||
minY: padding,
|
||||
maxY: this.parsedHeight - padding
|
||||
};
|
||||
},
|
||||
hasLabels() {
|
||||
return Boolean(this.showLabels || this.labels.length > 0 || this.$scopedSlots.label);
|
||||
},
|
||||
parsedLabels() {
|
||||
const labels = [];
|
||||
const points = this._values;
|
||||
const len = points.length;
|
||||
for (let i = 0; labels.length < len; i++) {
|
||||
const item = points[i];
|
||||
let value = this.labels[i];
|
||||
if (!value) {
|
||||
value = typeof item === 'object' ? item.value : item;
|
||||
}
|
||||
labels.push({
|
||||
x: item.x,
|
||||
value: String(value)
|
||||
});
|
||||
}
|
||||
return labels;
|
||||
},
|
||||
normalizedValues() {
|
||||
return this.value.map(item => typeof item === 'number' ? item : item.value);
|
||||
},
|
||||
_values() {
|
||||
return this.type === 'trend' ? genPoints(this.normalizedValues, this.boundary) : genBars(this.normalizedValues, this.boundary);
|
||||
},
|
||||
textY() {
|
||||
let y = this.parsedHeight;
|
||||
if (this.type === 'trend') y -= 4;
|
||||
return y;
|
||||
},
|
||||
_radius() {
|
||||
return this.smooth === true ? 8 : Number(this.smooth);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.$nextTick(() => {
|
||||
if (!this.autoDraw || this.type === 'bar' || !this.$refs.path) return;
|
||||
const path = this.$refs.path;
|
||||
const length = path.getTotalLength();
|
||||
if (!this.fill) {
|
||||
path.style.transition = 'none';
|
||||
path.style.strokeDasharray = length + ' ' + length;
|
||||
path.style.strokeDashoffset = Math.abs(length - (this.lastLength || 0)).toString();
|
||||
path.getBoundingClientRect();
|
||||
path.style.transition = `stroke-dashoffset ${this.autoDrawDuration}ms ${this.autoDrawEasing}`;
|
||||
path.style.strokeDashoffset = '0';
|
||||
} else {
|
||||
path.style.transformOrigin = 'bottom center';
|
||||
path.style.transition = 'none';
|
||||
path.style.transform = `scaleY(0)`;
|
||||
path.getBoundingClientRect();
|
||||
path.style.transition = `transform ${this.autoDrawDuration}ms ${this.autoDrawEasing}`;
|
||||
path.style.transform = `scaleY(1)`;
|
||||
}
|
||||
this.lastLength = length;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
genGradient() {
|
||||
const gradientDirection = this.gradientDirection;
|
||||
const gradient = this.gradient.slice();
|
||||
|
||||
// Pushes empty string to force
|
||||
// a fallback to currentColor
|
||||
if (!gradient.length) gradient.push('');
|
||||
const len = Math.max(gradient.length - 1, 1);
|
||||
const stops = gradient.reverse().map((color, index) => this.$createElement('stop', {
|
||||
attrs: {
|
||||
offset: index / len,
|
||||
'stop-color': color || 'currentColor'
|
||||
}
|
||||
}));
|
||||
return this.$createElement('defs', [this.$createElement('linearGradient', {
|
||||
attrs: {
|
||||
id: this._uid,
|
||||
gradientUnits: 'userSpaceOnUse',
|
||||
x1: gradientDirection === 'left' ? '100%' : '0',
|
||||
y1: gradientDirection === 'top' ? '100%' : '0',
|
||||
x2: gradientDirection === 'right' ? '100%' : '0',
|
||||
y2: gradientDirection === 'bottom' ? '100%' : '0'
|
||||
}
|
||||
}, stops)]);
|
||||
},
|
||||
genG(children) {
|
||||
return this.$createElement('g', {
|
||||
style: {
|
||||
fontSize: '8',
|
||||
textAnchor: 'middle',
|
||||
dominantBaseline: 'mathematical',
|
||||
fill: 'currentColor'
|
||||
} // TODO: TS 3.5 is too eager with the array type here
|
||||
}, children);
|
||||
},
|
||||
genPath() {
|
||||
const points = genPoints(this.normalizedValues, this.boundary);
|
||||
return this.$createElement('path', {
|
||||
attrs: {
|
||||
d: genPath(points, this._radius, this.fill, this.parsedHeight),
|
||||
fill: this.fill ? `url(#${this._uid})` : 'none',
|
||||
stroke: this.fill ? 'none' : `url(#${this._uid})`
|
||||
},
|
||||
ref: 'path'
|
||||
});
|
||||
},
|
||||
genLabels(offsetX) {
|
||||
const children = this.parsedLabels.map((item, i) => this.$createElement('text', {
|
||||
attrs: {
|
||||
x: item.x + offsetX + this._lineWidth / 2,
|
||||
y: this.textY + this.parsedLabelSize * 0.75,
|
||||
'font-size': Number(this.labelSize) || 7
|
||||
}
|
||||
}, [this.genLabel(item, i)]));
|
||||
return this.genG(children);
|
||||
},
|
||||
genLabel(item, index) {
|
||||
return this.$scopedSlots.label ? this.$scopedSlots.label({
|
||||
index,
|
||||
value: item.value
|
||||
}) : item.value;
|
||||
},
|
||||
genBars() {
|
||||
if (!this.value || this.totalValues < 2) return undefined;
|
||||
const bars = genBars(this.normalizedValues, this.boundary);
|
||||
const offsetX = (Math.abs(bars[0].x - bars[1].x) - this._lineWidth) / 2;
|
||||
return this.$createElement('svg', {
|
||||
attrs: {
|
||||
display: 'block',
|
||||
viewBox: `0 0 ${this.totalWidth} ${this.totalHeight}`
|
||||
}
|
||||
}, [this.genGradient(), this.genClipPath(bars, offsetX, this._lineWidth, 'sparkline-bar-' + this._uid), this.hasLabels ? this.genLabels(offsetX) : undefined, this.$createElement('g', {
|
||||
attrs: {
|
||||
'clip-path': `url(#sparkline-bar-${this._uid}-clip)`,
|
||||
fill: `url(#${this._uid})`
|
||||
}
|
||||
}, [this.$createElement('rect', {
|
||||
attrs: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.totalWidth,
|
||||
height: this.height
|
||||
}
|
||||
})])]);
|
||||
},
|
||||
genClipPath(bars, offsetX, lineWidth, id) {
|
||||
const rounding = typeof this.smooth === 'number' ? this.smooth : this.smooth ? 2 : 0;
|
||||
return this.$createElement('clipPath', {
|
||||
attrs: {
|
||||
id: `${id}-clip`
|
||||
}
|
||||
}, bars.map(item => {
|
||||
return this.$createElement('rect', {
|
||||
attrs: {
|
||||
x: item.x + offsetX,
|
||||
y: item.y,
|
||||
width: lineWidth,
|
||||
height: item.height,
|
||||
rx: rounding,
|
||||
ry: rounding
|
||||
}
|
||||
}, [this.autoDraw ? this.$createElement('animate', {
|
||||
attrs: {
|
||||
attributeName: 'height',
|
||||
from: 0,
|
||||
to: item.height,
|
||||
dur: `${this.autoDrawDuration}ms`,
|
||||
fill: 'freeze'
|
||||
}
|
||||
}) : undefined]);
|
||||
}));
|
||||
},
|
||||
genTrend() {
|
||||
return this.$createElement('svg', this.setTextColor(this.color, {
|
||||
attrs: {
|
||||
...this.$attrs,
|
||||
display: 'block',
|
||||
'stroke-width': this._lineWidth || 1,
|
||||
viewBox: `0 0 ${this.width} ${this.totalHeight}`
|
||||
}
|
||||
}), [this.genGradient(), this.hasLabels && this.genLabels(-(this._lineWidth / 2)), this.genPath()]);
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
if (this.totalValues < 2) return undefined;
|
||||
return this.type === 'trend' ? this.genTrend() : this.genBars();
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VSparkline.mjs.map
|
||||
1
VApp/node_modules/vuetify/lib/components/VSparkline/VSparkline.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSparkline/VSparkline.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
49
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/core.mjs
generated
vendored
Normal file
49
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/core.mjs
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
|
||||
export function genPoints(values, boundary) {
|
||||
const {
|
||||
minX,
|
||||
maxX,
|
||||
minY,
|
||||
maxY
|
||||
} = boundary;
|
||||
const totalValues = values.length;
|
||||
const maxValue = Math.max(...values);
|
||||
const minValue = Math.min(...values);
|
||||
const gridX = (maxX - minX) / (totalValues - 1);
|
||||
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
||||
return values.map((value, index) => {
|
||||
return {
|
||||
x: minX + index * gridX,
|
||||
y: maxY - (value - minValue) * gridY,
|
||||
value
|
||||
};
|
||||
});
|
||||
}
|
||||
export function genBars(values, boundary) {
|
||||
const {
|
||||
minX,
|
||||
maxX,
|
||||
minY,
|
||||
maxY
|
||||
} = boundary;
|
||||
const totalValues = values.length;
|
||||
let maxValue = Math.max(...values);
|
||||
let minValue = Math.min(...values);
|
||||
if (minValue > 0) minValue = 0;
|
||||
if (maxValue < 0) maxValue = 0;
|
||||
const gridX = maxX / totalValues;
|
||||
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
||||
const horizonY = maxY - Math.abs(minValue * gridY);
|
||||
return values.map((value, index) => {
|
||||
const height = Math.abs(gridY * value);
|
||||
return {
|
||||
x: minX + index * gridX,
|
||||
y: horizonY - height + +(value < 0) * height,
|
||||
height,
|
||||
value
|
||||
};
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=core.mjs.map
|
||||
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/core.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/core.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"core.mjs","names":["genPoints","values","boundary","minX","maxX","minY","maxY","totalValues","length","maxValue","Math","max","minValue","min","gridX","gridY","map","value","index","x","y","genBars","horizonY","abs","height"],"sources":["../../../../src/components/VSparkline/helpers/core.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport { Point, Boundary, Bar } from '../VSparkline'\n\nexport function genPoints (\n values: number[],\n boundary: Boundary\n): Point[] {\n const { minX, maxX, minY, maxY } = boundary\n const totalValues = values.length\n const maxValue = Math.max(...values)\n const minValue = Math.min(...values)\n\n const gridX = (maxX - minX) / (totalValues - 1)\n const gridY = (maxY - minY) / ((maxValue - minValue) || 1)\n\n return values.map((value, index) => {\n return {\n x: minX + index * gridX,\n y: maxY - (value - minValue) * gridY,\n value,\n }\n })\n}\n\nexport function genBars (\n values: number[],\n boundary: Boundary\n): Bar[] {\n const { minX, maxX, minY, maxY } = boundary\n const totalValues = values.length\n let maxValue = Math.max(...values)\n let minValue = Math.min(...values)\n\n if (minValue > 0) minValue = 0\n if (maxValue < 0) maxValue = 0\n\n const gridX = maxX / totalValues\n const gridY = (maxY - minY) / ((maxValue - minValue) || 1)\n const horizonY = maxY - Math.abs(minValue * gridY)\n\n return values.map((value, index) => {\n const height = Math.abs(gridY * value)\n\n return {\n x: minX + index * gridX,\n y: horizonY - height +\n +(value < 0) * height,\n height,\n value,\n }\n })\n}\n"],"mappings":"AAAA;AACA;;AAIA,OAAO,SAASA,SAASA,CACvBC,MAAgB,EAChBC,QAAkB,EACT;EACT,MAAM;IAAEC,IAAI;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I,KAAMI,QAAQ,GAAGG,QAAQ,IAAK,CAAC,CAAC;EAC1D,MAAMU,QAAQ,GAAGhB,IAAI,GAAGI,IAAI,CAACa,GAAG,CAACX,QAAQ,GAAGG,KAAK,CAAC;EAElD,OAAOd,MAAM,CAACe,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;IAClC,MAAMM,MAAM,GAAGd,IAAI,CAACa,GAAG,CAACR,KAAK,GAAGE,KAAK,CAAC;IAEtC,OAAO;MACLE,CAAC,EAAEhB,IAAI,GAAGe,KAAK,GAAGJ,KAAK;MACvBM,CAAC,EAAEE,QAAQ,GAAGE,MAAM,GAClB,EAAEP,KAAK,GAAG,CAAC,CAAC,GAAGO,MAAM;MACvBA,MAAM;MACNP;IACF,CAAC;EACH,CAAC,CAAC;AACJ"}
|
||||
34
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/math.mjs
generated
vendored
Normal file
34
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/math.mjs
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
|
||||
function int(value) {
|
||||
return parseInt(value, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://en.wikipedia.org/wiki/Collinearity
|
||||
* x=(x1+x2)/2
|
||||
* y=(y1+y2)/2
|
||||
*/
|
||||
export function checkCollinear(p0, p1, p2) {
|
||||
return int(p0.x + p2.x) === int(2 * p1.x) && int(p0.y + p2.y) === int(2 * p1.y);
|
||||
}
|
||||
export function getDistance(p1, p2) {
|
||||
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
||||
}
|
||||
export function moveTo(to, from, radius) {
|
||||
const vector = {
|
||||
x: to.x - from.x,
|
||||
y: to.y - from.y
|
||||
};
|
||||
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
|
||||
const unitVector = {
|
||||
x: vector.x / length,
|
||||
y: vector.y / length
|
||||
};
|
||||
return {
|
||||
x: from.x + unitVector.x * radius,
|
||||
y: from.y + unitVector.y * radius
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=math.mjs.map
|
||||
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/math.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/math.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"math.mjs","names":["int","value","parseInt","checkCollinear","p0","p1","p2","x","y","getDistance","Math","sqrt","pow","moveTo","to","from","radius","vector","length","unitVector"],"sources":["../../../../src/components/VSparkline/helpers/math.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport { Point } from '../VSparkline'\n\nfunction int (value: string | number): number {\n return parseInt(value, 10)\n}\n\n/**\n * https://en.wikipedia.org/wiki/Collinearity\n * x=(x1+x2)/2\n * y=(y1+y2)/2\n */\nexport function checkCollinear (p0: Point, p1: Point, p2: Point): boolean {\n return int(p0.x + p2.x) === int(2 * p1.x) && int(p0.y + p2.y) === int(2 * p1.y)\n}\n\nexport function getDistance (p1: Point, p2: Point): number {\n return Math.sqrt(\n Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)\n )\n}\n\nexport function moveTo (to: Point, from: Point, radius: number) {\n const vector = { x: to.x - from.x, y: to.y - from.y }\n const length = Math.sqrt((vector.x * vector.x) + (vector.y * vector.y))\n const unitVector = { x: vector.x / length, y: vector.y / length }\n\n return {\n x: from.x + unitVector.x * radius,\n y: from.y + unitVector.y * radius,\n }\n}\n"],"mappings":"AAAA;AACA;;AAIA,SAASA,GAAGA,CAAEC,KAAsB,EAAU;EAC5C,OAAOC,QAAQ,CAACD,KAAK,EAAE,EAAE,CAAC;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,cAAcA,CAAEC,EAAS,EAAEC,EAAS,EAAEC,EAAS,EAAW;EACxE,OAAON,GAAG,CAACI,EAAE,CAACG,CAAC,GAAGD,E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parkline/helpers/path.mjs
generated
vendored
Normal file
27
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/path.mjs
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
import { checkCollinear, getDistance, moveTo } from "./math.mjs";
|
||||
/**
|
||||
* From https://github.com/unsplash/react-trend/blob/master/src/helpers/DOM.helpers.js#L18
|
||||
*/
|
||||
export function genPath(points, radius) {
|
||||
let fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
||||
let height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 75;
|
||||
const start = points.shift();
|
||||
const end = points[points.length - 1];
|
||||
return (fill ? `M${start.x} ${height - start.x + 2} L${start.x} ${start.y}` : `M${start.x} ${start.y}`) + points.map((point, index) => {
|
||||
const next = points[index + 1];
|
||||
const prev = points[index - 1] || start;
|
||||
const isCollinear = next && checkCollinear(next, point, prev);
|
||||
if (!next || isCollinear) {
|
||||
return `L${point.x} ${point.y}`;
|
||||
}
|
||||
const threshold = Math.min(getDistance(prev, point), getDistance(next, point));
|
||||
const isTooCloseForRadius = threshold / 2 < radius;
|
||||
const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius;
|
||||
const before = moveTo(prev, point, radiusForPoint);
|
||||
const after = moveTo(next, point, radiusForPoint);
|
||||
return `L${before.x} ${before.y}S${point.x} ${point.y} ${after.x} ${after.y}`;
|
||||
}).join('') + (fill ? `L${end.x} ${height - start.x + 2} Z` : '');
|
||||
}
|
||||
//# sourceMappingURL=path.mjs.map
|
||||
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/path.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSparkline/helpers/path.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"path.mjs","names":["checkCollinear","getDistance","moveTo","genPath","points","radius","fill","arguments","length","undefined","height","start","shift","end","x","y","map","point","index","next","prev","isCollinear","threshold","Math","min","isTooCloseForRadius","radiusForPoint","before","after","join"],"sources":["../../../../src/components/VSparkline/helpers/path.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport { Point } from '../VSparkline'\nimport { checkCollinear, getDistance, moveTo } from './math'\n\n/**\n * From https://github.com/unsplash/react-trend/blob/master/src/helpers/DOM.helpers.js#L18\n */\nexport function genPath (points: Point[], radius: number, fill = false, height = 75) {\n const start = points.shift()!\n const end = points[points.length - 1]\n\n return (\n (fill ? `M${start.x} ${height - start.x + 2} L${start.x} ${start.y}` : `M${start.x} ${start.y}`) +\n points\n .map((point, index) => {\n const next = points[index + 1]\n const prev = points[index - 1] || start\n const isCollinear = next && checkCollinear(next, point, prev)\n\n if (!next || isCollinear) {\n return `L${point.x} ${point.y}`\n }\n\n const threshold = Math.min(\n getDistance(prev, point),\n getDistance(next, point)\n )\n const isTooCloseForRadius = threshold / 2 < radius\n const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius\n\n const before = moveTo(prev, point, radiusForPoint)\n const after = moveTo(next, point, radiusForPoint)\n\n return `L${before.x} ${before.y}S${point.x} ${point.y} ${after.x} ${after.y}`\n })\n .join('') +\n (fill ? `L${end.x} ${height - start.x + 2} Z` : '')\n )\n}\n"],"mappings":"AAAA;AACA;AAAA,SAGSA,cAAc,EAAEC,WAAW,EAAEC,MAAM;AAE5C;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAAEC,MAAe,EAAEC,MAAc,EAA6B;EAAA,IAA3BC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IAAEG,MAAM,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EACjF,MAAMI,KAAK,GAAGP,MAAM,CAACQ,KAAK,CAAC,CAAE;EAC7B,MAAMC,GAAG,GAAGT,MAAM,CAACA,MAAM,CAACI,MAAM,GAAG,C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E,IAAGc,KAAK,CAACb,CAAE,EAAC;EAC/E,CAAC,CAAC,CACDc,IAAI,CAAC,EAAE,CAAC,IACVvB,IAAI,GAAI,IAAGO,GAAG,CAACC,CAAE,IAAGJ,MAAM,GAAGC,KAAK,CAACG,CAAC,GAAG,CAAE,IAAG,GAAG,EAAE,CAAC;AAEvD"}
|
||||
4
VApp/node_modules/vuetify/lib/components/VSparkline/index.mjs
generated
vendored
Normal file
4
VApp/node_modules/vuetify/lib/components/VSparkline/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import VSparkline from "./VSparkline.mjs";
|
||||
export { VSparkline };
|
||||
export default VSparkline;
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
VApp/node_modules/vuetify/lib/components/VSparkline/index.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSparkline/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["VSparkline"],"sources":["../../../src/components/VSparkline/index.ts"],"sourcesContent":["import VSparkline from './VSparkline'\n\nexport { VSparkline }\n\nexport default VSparkline\n"],"mappings":"OAAOA,UAAU;AAEjB,SAASA,UAAU;AAEnB,eAAeA,UAAU"}
|
||||
Reference in New Issue
Block a user