Skip to content

Commit

Permalink
Update libraire JS
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeDevome committed Nov 23, 2024
1 parent 39497b3 commit ae40fca
Show file tree
Hide file tree
Showing 137 changed files with 26,661 additions and 13,594 deletions.
34 changes: 25 additions & 9 deletions vendor/almasaeed2010/adminlte/plugins/chart.js/Chart.js

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

34 changes: 25 additions & 9 deletions vendor/almasaeed2010/adminlte/plugins/chart.js/chart.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chart.js v4.4.3
* Chart.js v4.4.6
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
Expand Down Expand Up @@ -439,9 +439,11 @@ function applyStack(stack, value, dsIndex, options = {}) {
if (value === null) {
return;
}
let found = false;
for(i = 0, ilen = keys.length; i < ilen; ++i){
datasetIndex = +keys[i];
if (datasetIndex === dsIndex) {
found = true;
if (options.all) {
continue;
}
Expand All @@ -452,6 +454,9 @@ function applyStack(stack, value, dsIndex, options = {}) {
value += otherValue;
}
}
if (!found && !options.all) {
return 0;
}
return value;
}
function convertObjectDataToArray(data, meta) {
Expand Down Expand Up @@ -695,6 +700,7 @@ class DatasetController {
this._resyncElements(resetNewElements);
if (stackChanged || oldStacked !== meta._stacked) {
updateStacks(this, meta._parsed);
meta._stacked = isStacked(meta.vScale, meta);
}
}
configure() {
Expand Down Expand Up @@ -1489,8 +1495,10 @@ class BarController extends DatasetController {
const metasets = iScale.getMatchingVisibleMetas(this._type).filter((meta)=>meta.controller.options.grouped);
const stacked = iScale.options.stacked;
const stacks = [];
const currentParsed = this._cachedMeta.controller.getParsed(dataIndex);
const iScaleValue = currentParsed && currentParsed[iScale.axis];
const skipNull = (meta)=>{
const parsed = meta.controller.getParsed(dataIndex);
const parsed = meta._parsed.find((item)=>item[iScale.axis] === iScaleValue);
const val = parsed && parsed[meta.vScale.axis];
if (helpers_segment.isNullOrUndef(val) || isNaN(val)) {
return true;
Expand Down Expand Up @@ -2758,7 +2766,7 @@ function binarySearch(metaset, axis, value, intersect) {
const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';
let intersectsItem = false;
evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index)=>{
if (element[rangeMethod](position[axis], useFinalPosition)) {
if (element[rangeMethod] && element[rangeMethod](position[axis], useFinalPosition)) {
items.push({
element,
datasetIndex,
Expand Down Expand Up @@ -5516,7 +5524,7 @@ function needContext(proxy, names) {
return false;
}

var version = "4.4.3";
var version = "4.4.6";

const KNOWN_POSITIONS = [
'top',
Expand Down Expand Up @@ -6048,8 +6056,8 @@ class Chart {
let i;
if (this._resizeBeforeDraw) {
const { width , height } = this._resizeBeforeDraw;
this._resize(width, height);
this._resizeBeforeDraw = null;
this._resize(width, height);
}
this.clear();
if (this.width <= 0 || this.height <= 0) {
Expand Down Expand Up @@ -6688,7 +6696,8 @@ class ArcElement extends Element {
], useFinalPosition);
const rAdjust = (this.options.spacing + this.options.borderWidth) / 2;
const _circumference = helpers_segment.valueOrDefault(circumference, endAngle - startAngle);
const betweenAngles = _circumference >= helpers_segment.TAU || helpers_segment._angleBetween(angle, startAngle, endAngle);
const nonZeroBetween = helpers_segment._angleBetween(angle, startAngle, endAngle) && startAngle !== endAngle;
const betweenAngles = _circumference >= helpers_segment.TAU || nonZeroBetween;
const withinRadius = helpers_segment._isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);
return betweenAngles && withinRadius;
}
Expand Down Expand Up @@ -7354,6 +7363,9 @@ function containsColorsDefinitions(descriptors) {
function containsColorsDefinition(descriptor) {
return descriptor && (descriptor.borderColor || descriptor.backgroundColor);
}
function containsDefaultColorsDefenitions() {
return helpers_segment.defaults.borderColor !== 'rgba(0,0,0,0.1)' || helpers_segment.defaults.backgroundColor !== 'rgba(0,0,0,0.1)';
}
var plugin_colors = {
id: 'colors',
defaults: {
Expand All @@ -7366,7 +7378,8 @@ var plugin_colors = {
}
const { data: { datasets } , options: chartOptions } = chart.config;
const { elements } = chartOptions;
if (!options.forceOverride && (containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || elements && containsColorsDefinitions(elements))) {
const containsColorDefenition = containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || elements && containsColorsDefinitions(elements) || containsDefaultColorsDefenitions();
if (!options.forceOverride && containsColorDefenition) {
return;
}
const colorizer = getColorizer(chart);
Expand Down Expand Up @@ -8909,6 +8922,9 @@ const positioners = {
++count;
}
}
if (count === 0 || xSet.size === 0) {
return false;
}
const xAverage = [
...xSet
].reduce((a, b)=>a + b) / xSet.size;
Expand Down Expand Up @@ -10661,7 +10677,7 @@ function drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts) {
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = lineWidth;
ctx.setLineDash(borderOpts.dash);
ctx.setLineDash(borderOpts.dash || []);
ctx.lineDashOffset = borderOpts.dashOffset;
ctx.beginPath();
pathRadiusLine(scale, radius, circular, labelCount);
Expand Down Expand Up @@ -10865,7 +10881,7 @@ class RadialLinearScale extends LinearScaleBase {
ctx.strokeStyle = color;
ctx.setLineDash(optsAtIndex.borderDash);
ctx.lineDashOffset = optsAtIndex.borderDashOffset;
offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);
offset = this.getDistanceFromCenterForValue(opts.reverse ? this.min : this.max);
position = this.getPointPosition(i, offset);
ctx.beginPath();
ctx.moveTo(this.xCenter, this.yCenter);
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit ae40fca

Please sign in to comment.