Procházet zdrojové kódy

update rollup bundles

pull/165/head
t47io před 7 roky
rodič
revize
ea58ad4acb
9 změnil soubory, kde provedl 17 přidání a 143 odebrání
  1. +0
    -48
      dist/frappe-charts.esm.js
  2. +1
    -1
      dist/frappe-charts.min.cjs.js
  3. +1
    -1
      dist/frappe-charts.min.cjs.js.map
  4. +1
    -1
      dist/frappe-charts.min.esm.js
  5. +1
    -1
      dist/frappe-charts.min.esm.js.map
  6. +1
    -1
      docs/assets/js/frappe-charts.min.js
  7. +1
    -1
      docs/assets/js/frappe-charts.min.js.map
  8. +10
    -88
      docs/assets/js/index.min.js
  9. +1
    -1
      docs/assets/js/index.min.js.map

+ 0
- 48
dist/frappe-charts.esm.js Zobrazit soubor

@@ -2,8 +2,6 @@ function $(expr, con) {
return typeof expr === "string"? (con || document).querySelector(expr) : expr || null;
}



$.create = (tag, o) => {
var element = document.createElement(tag);

@@ -66,10 +64,6 @@ function getElementContentWidth(element) {
return element.clientWidth - padding;
}





function fire(target, type, properties) {
var evt = document.createEvent("HTMLEvents");

@@ -82,8 +76,6 @@ function fire(target, type, properties) {
return target.dispatchEvent(evt);
}

// https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/

const BASE_MEASURES = {
margins: {
top: 10,
@@ -130,9 +122,6 @@ function getExtraWidth(m) {
const INIT_CHART_UPDATE_TIMEOUT = 700;
const CHART_POST_ANIMATE_TIMEOUT = 400;

const DEFAULT_AXIS_CHART_TYPE = 'line';
const AXIS_DATASET_CHART_TYPES = ['line', 'bar'];

const AXIS_LEGEND_BAR_SIZE = 100;

const BAR_CHART_SPACE_RATIO = 0.5;
@@ -159,8 +148,6 @@ const DEFAULT_CHART_COLORS = ['light-blue', 'blue', 'violet', 'red', 'orange',
'yellow', 'green', 'light-green', 'purple', 'magenta', 'light-grey', 'dark-grey'];
const HEATMAP_COLORS_GREEN = ['#ebedf0', '#c6e48b', '#7bc96f', '#239a3b', '#196127'];



const DEFAULT_COLORS = {
bar: DEFAULT_CHART_COLORS,
line: DEFAULT_CHART_COLORS,
@@ -306,19 +293,6 @@ function floatTwo(d) {
return parseFloat(d.toFixed(2));
}

/**
* Returns whether or not two given arrays are equal.
* @param {Array} arr1 First array
* @param {Array} arr2 Second array
*/


/**
* Shuffles array in place. ES6 version
* @param {Array} array An array containing the items.
*/


/**
* Fill an array with extra points
* @param {Array} array Array
@@ -344,11 +318,6 @@ function getStringWidth(string, charWidth) {
return (string+"").length * charWidth;
}



// https://stackoverflow.com/a/29325222


function getPositionByAngle(angle, radius) {
return {
x: Math.sin(angle * ANGLE_RATIO) * radius,
@@ -514,8 +483,6 @@ function makeSVGGroup(className, transform='', parent=undefined) {
return createSVG('g', args);
}



function makePath(pathStr, className='', stroke='none', fill='none') {
return createSVG('path', {
className: className,
@@ -1737,17 +1704,14 @@ class AggregationChart extends BaseChart {

const NO_OF_YEAR_MONTHS = 12;
const NO_OF_DAYS_IN_WEEK = 7;

const NO_OF_MILLIS = 1000;
const SEC_IN_DAY = 86400;

const MONTH_NAMES = ["January", "February", "March", "April", "May",
"June", "July", "August", "September", "October", "November", "December"];


const DAY_NAMES_SHORT = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];


// https://stackoverflow.com/a/11252167/6495043
function treatAsUtc(date) {
let result = new Date(date);
@@ -1769,10 +1733,6 @@ function clone(date) {
return new Date(date.getTime());
}





// export function getMonthsBetween(startDate, endDate) {}

function getWeeksBetween(startDate, endDate) {
@@ -2647,8 +2607,6 @@ function getZeroIndex(yPts) {
return zeroIndex;
}



function getIntervalSize(orderedArray) {
return orderedArray[1] - orderedArray[0];
}
@@ -2661,10 +2619,6 @@ function scale(val, yAxis) {
return floatTwo(yAxis.zeroLine - val * yAxis.scaleMultiplier);
}





function getClosestInArray(goal, arr, index = false) {
let closest = arr.reduce(function(prev, curr) {
return (Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev);
@@ -3017,7 +2971,6 @@ function dataPrep(data, type) {

// Set type
if(!d.chartType ) {
if(!AXIS_DATASET_CHART_TYPES.includes(type)) type === DEFAULT_AXIS_CHART_TYPE;
d.chartType = type;
}

@@ -3677,7 +3630,6 @@ class AxisChart extends BaseChart {
// removeDataPoint(index = 0) {}
}

// import MultiAxisChart from './charts/MultiAxisChart';
const chartTypes = {
bar: AxisChart,
line: AxisChart,


+ 1
- 1
dist/frappe-charts.min.cjs.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
dist/frappe-charts.min.cjs.js.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
dist/frappe-charts.min.esm.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
dist/frappe-charts.min.esm.js.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
docs/assets/js/frappe-charts.min.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
docs/assets/js/frappe-charts.min.js.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 10
- 88
docs/assets/js/index.min.js Zobrazit soubor

@@ -1,63 +1,29 @@
(function () {
'use strict';

function __$styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;

if (!css || typeof document === 'undefined') { return; }

function __$styleInject(css, returnValue) {
if (typeof document === 'undefined') {
return returnValue;
}
css = css || '';
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';

if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}

if (style.styleSheet) {
head.appendChild(style);
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
return returnValue;
}

// Fixed 5-color theme,
// More colors are difficult to parse visually









var HEATMAP_COLORS_BLUE = ['#ebedf0', '#c0ddf9', '#73b3f3', '#3886e1', '#17459e'];
var HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];



// Universal constants

/**
* Returns the value of a number upto 2 decimal places.
* @param {Number} d Any number
*/


/**
* Returns whether or not two given arrays are equal.
* @param {Array} arr1 First array
* @param {Array} arr2 Second array
*/

var ANGLE_RATIO = Math.PI / 180;

/**
* Shuffles array in place. ES6 version
@@ -78,24 +44,6 @@ function shuffle(array) {
return array;
}

/**
* Fill an array with extra points
* @param {Array} array Array
* @param {Number} count number of filler elements
* @param {Object} element element to fill with
* @param {Boolean} start fill at start?
*/


/**
* Returns pixel width of string.
* @param {String} string
* @param {Number} charWidth Width of single char in pixels
*/




// https://stackoverflow.com/a/29325222
function getRandomBias(min, max, bias, influence) {
var range = max - min;
@@ -107,21 +55,10 @@ function getRandomBias(min, max, bias, influence) {
}

// Playing around with dates




var NO_OF_MILLIS = 1000;
var SEC_IN_DAY = 86400;


var MONTH_NAMES_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];






function clone(date) {
return new Date(date.getTime());
}
@@ -140,21 +77,6 @@ function timestampToMidnight(timestamp) {
return midnightTs;
}

// export function getMonthsBetween(startDate, endDate) {}











// mutates


// mutates
function addDays(date, numberOfDays) {
date.setDate(date.getDate() + numberOfDays);


+ 1
- 1
docs/assets/js/index.min.js.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


Načítá se…
Zrušit
Uložit