chartjs-adapter-dayjs-4
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -11,3 +11,3 @@ 'use strict'; | ||
var LocalizedFormat = _interopDefault(require('dayjs/plugin/localizedFormat.js')); | ||
var isoWeek = _interopDefault(require('dayjs/plugin/isoWeek')); | ||
var isoWeek = _interopDefault(require('dayjs/plugin/isoWeek.js')); | ||
@@ -14,0 +14,0 @@ dayjs.extend(AdvancedFormat); |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("chart.js"),t=e(require("dayjs")),n=e(require("dayjs/plugin/customParseFormat.js")),a=e(require("dayjs/plugin/advancedFormat.js")),u=e(require("dayjs/plugin/quarterOfYear.js")),i=e(require("dayjs/plugin/localizedFormat.js")),d=e(require("dayjs/plugin/isoWeek"));t.extend(a),t.extend(u),t.extend(i),t.extend(n),t.extend(d);var s={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};r._adapters._date.override({formats:function(){return s},parse:function(e,r){var n=typeof e;return null===e||"undefined"===n?null:"string"===n&&"string"==typeof r?t(e,r).isValid()?t(e,r).valueOf():null:e instanceof t?null:t(e).isValid()?t(e).valueOf():null},format:function(e,r){return t(e).format(r)},add:function(e,r,n){return t(e).add(r,n).valueOf()},diff:function(e,r,n){return t(e).diff(t(r),n)},startOf:function(e,r,n){if("isoWeek"===r){var a="number"==typeof n&&n>0&&n<7?n:1;return t(e).isoWeekday(a).startOf("day").valueOf()}return t(e).startOf(r).valueOf()},endOf:function(e,r){return t(e).endOf(r).valueOf()}}); | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("chart.js"),t=e(require("dayjs")),n=e(require("dayjs/plugin/customParseFormat.js")),a=e(require("dayjs/plugin/advancedFormat.js")),u=e(require("dayjs/plugin/quarterOfYear.js")),i=e(require("dayjs/plugin/localizedFormat.js")),s=e(require("dayjs/plugin/isoWeek.js"));t.extend(a),t.extend(u),t.extend(i),t.extend(n),t.extend(s);var d={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};r._adapters._date.override({formats:function(){return d},parse:function(e,r){var n=typeof e;return null===e||"undefined"===n?null:"string"===n&&"string"==typeof r?t(e,r).isValid()?t(e,r).valueOf():null:e instanceof t?null:t(e).isValid()?t(e).valueOf():null},format:function(e,r){return t(e).format(r)},add:function(e,r,n){return t(e).add(r,n).valueOf()},diff:function(e,r,n){return t(e).diff(t(r),n)},startOf:function(e,r,n){if("isoWeek"===r){var a="number"==typeof n&&n>0&&n<7?n:1;return t(e).isoWeekday(a).startOf("day").valueOf()}return t(e).startOf(r).valueOf()},endOf:function(e,r){return t(e).endOf(r).valueOf()}}); | ||
//# sourceMappingURL=chartjs-adapter-dayjs-4.cjs.production.min.js.map |
@@ -7,3 +7,3 @@ import { _adapters } from 'chart.js'; | ||
import LocalizedFormat from 'dayjs/plugin/localizedFormat.js'; | ||
import isoWeek from 'dayjs/plugin/isoWeek'; | ||
import isoWeek from 'dayjs/plugin/isoWeek.js'; | ||
@@ -10,0 +10,0 @@ dayjs.extend(AdvancedFormat); |
{ | ||
"type": "module", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -19,3 +19,3 @@ import { _adapters } from 'chart.js'; | ||
import isoWeek from 'dayjs/plugin/isoWeek'; | ||
import isoWeek from 'dayjs/plugin/isoWeek.js'; | ||
@@ -22,0 +22,0 @@ dayjs.extend(AdvancedFormat); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25814