dash-core-components 1.15.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -44
- package/dash_core_components/async-datepicker.js +1 -1
- package/dash_core_components/async-datepicker.js.map +1 -1
- package/dash_core_components/async-dropdown.js +2 -2
- package/dash_core_components/async-dropdown.js.map +1 -1
- package/dash_core_components/async-graph.js +1 -1
- package/dash_core_components/async-graph.js.map +1 -1
- package/dash_core_components/async-highlight.js +1 -1
- package/dash_core_components/async-highlight.js.map +1 -1
- package/dash_core_components/async-markdown.js +2 -2
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-plotlyjs.js +2 -2
- package/dash_core_components/async-slider.js +1 -2
- package/dash_core_components/async-slider.js.map +1 -1
- package/dash_core_components/async-upload.js +1 -1
- package/dash_core_components/async-upload.js.map +1 -1
- package/dash_core_components/dash_core_components-shared.js +2 -2
- package/dash_core_components/dash_core_components-shared.js.map +1 -1
- package/dash_core_components/dash_core_components.js +3 -0
- package/dash_core_components/dash_core_components.js.map +1 -0
- package/dash_core_components/plotly.min.js +30 -26
- package/lib/components/Checklist.react.js +77 -35
- package/lib/components/Clipboard.react.js +354 -0
- package/lib/components/ConfirmDialog.react.js +16 -12
- package/lib/components/ConfirmDialogProvider.react.js +19 -15
- package/lib/components/DatePickerRange.react.js +111 -97
- package/lib/components/DatePickerSingle.react.js +95 -81
- package/lib/components/Download.react.js +138 -0
- package/lib/components/Dropdown.react.js +69 -47
- package/lib/components/Graph.react.js +36 -24
- package/lib/components/Input.react.js +98 -92
- package/lib/components/Interval.react.js +18 -12
- package/lib/components/Link.react.js +36 -30
- package/lib/components/Loading.react.js +21 -15
- package/lib/components/Location.react.js +15 -13
- package/lib/components/LogoutButton.react.js +18 -14
- package/lib/components/Markdown.react.js +23 -17
- package/lib/components/RadioItems.react.js +77 -35
- package/lib/components/RangeSlider.react.js +61 -55
- package/lib/components/Slider.react.js +52 -46
- package/lib/components/Store.react.js +16 -16
- package/lib/components/Tab.react.js +6 -2
- package/lib/components/Tabs.react.js +32 -23
- package/lib/components/Textarea.react.js +19 -13
- package/lib/components/Tooltip.react.js +152 -0
- package/lib/components/Upload.react.js +25 -19
- package/lib/components/css/Dropdown.css +1 -1
- package/lib/fragments/DatePickerRange.react.js +63 -51
- package/lib/fragments/DatePickerSingle.react.js +28 -17
- package/lib/fragments/Dropdown.react.js +33 -22
- package/lib/fragments/Graph.privateprops.js +1 -1
- package/lib/fragments/Graph.react.js +44 -28
- package/lib/fragments/Loading/spinners/CircleSpinner.js +16 -16
- package/lib/fragments/Loading/spinners/CubeSpinner.js +11 -11
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +9 -9
- package/lib/fragments/Loading/spinners/DotSpinner.js +7 -7
- package/lib/fragments/Loading/spinners/GraphSpinner.js +18 -18
- package/lib/fragments/Markdown.react.js +35 -32
- package/lib/fragments/RangeSlider.react.js +57 -22
- package/lib/fragments/Slider.react.js +40 -21
- package/lib/fragments/Upload.react.js +19 -13
- package/lib/index.js +77 -53
- package/lib/third-party/highlight.js +12 -0
- package/lib/utils/LazyLoader/datePickerRange.js +9 -3
- package/lib/utils/LazyLoader/datePickerSingle.js +9 -3
- package/lib/utils/LazyLoader/dropdown.js +9 -3
- package/lib/utils/LazyLoader/graph.js +9 -3
- package/lib/utils/LazyLoader/hljs.js +9 -3
- package/lib/utils/LazyLoader/markdown.js +9 -3
- package/lib/utils/LazyLoader/plotly.js +9 -3
- package/lib/utils/LazyLoader/rangeSlider.js +9 -3
- package/lib/utils/LazyLoader/slider.js +9 -3
- package/lib/utils/LazyLoader/upload.js +9 -3
- package/lib/utils/computeSliderMarkers.js +230 -0
- package/lib/utils/convertToMoment.js +4 -0
- package/lib/utils/optionTypes.js +52 -0
- package/package.json +68 -75
- package/CHANGELOG.md +0 -1034
- package/dash_core_components/dash_core_components.min.js +0 -2
- package/dash_core_components/dash_core_components.min.js.map +0 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setUndefined = exports.sanitizeMarks = exports.calcValue = exports.calcStep = exports.autoGenerateMarks = exports.applyD3Format = void 0;
|
|
7
|
+
|
|
8
|
+
var _ramda = require("ramda");
|
|
9
|
+
|
|
10
|
+
var _d3Format = require("d3-format");
|
|
11
|
+
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
|
|
14
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
|
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
17
|
+
|
|
18
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
+
|
|
20
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
21
|
+
|
|
22
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
|
|
26
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
27
|
+
|
|
28
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
29
|
+
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Truncate marks if they are out of Slider interval
|
|
34
|
+
*/
|
|
35
|
+
var truncateMarks = function truncateMarks(min, max, marks) {
|
|
36
|
+
return (0, _ramda.pickBy)(function (k, mark) {
|
|
37
|
+
return mark >= min && mark <= max;
|
|
38
|
+
}, marks);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var truncateNumber = function truncateNumber(num) {
|
|
42
|
+
return parseInt(num.toString().match(/^-?\d+(?:\.\d{0,0})?/)[0], 10);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var decimalCount = function decimalCount(d) {
|
|
46
|
+
return String(d).split('.').length > 1 ? String(d).split('.')[1].length : 0;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var alignIntValue = function alignIntValue(v, d) {
|
|
50
|
+
return d < 10 ? v : parseInt((truncateNumber(v / d) * d).toFixed(decimalCount(d)), 10);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var alignDecimalValue = function alignDecimalValue(v, d) {
|
|
54
|
+
return d < 10 ? parseFloat(v.toFixed(decimalCount(d))) : parseFloat(((v / d).toFixed(0) * d).toFixed(decimalCount(d)));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var alignValue = function alignValue(v, d) {
|
|
58
|
+
return decimalCount(d) < 1 ? alignIntValue(v, d) : alignDecimalValue(v, d);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var log = function log(v) {
|
|
62
|
+
return Math.floor(Math.log10(v));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var getNearByStep = function getNearByStep(v) {
|
|
66
|
+
return v < 10 ? [v] : [Math.pow(10, Math.floor(Math.log10(v))), Math.pow(10, Math.ceil(Math.log10(v))) / 2, alignValue(v, Math.pow(10, log(v))), Math.pow(10, Math.ceil(Math.log10(v)))].sort(function (a, b) {
|
|
67
|
+
return Math.abs(a - v) - Math.abs(b - v);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var estimateBestSteps = function estimateBestSteps(minValue, maxValue, stepValue) {
|
|
72
|
+
var desiredCountMin = 2 + (maxValue / stepValue <= 10 ? 3 : 3); // including start, end
|
|
73
|
+
|
|
74
|
+
var desiredCountMax = 2 + (maxValue / stepValue <= 10 ? 4 : 6);
|
|
75
|
+
var min = minValue / stepValue;
|
|
76
|
+
var max = maxValue / stepValue;
|
|
77
|
+
var rangeLength = max - min;
|
|
78
|
+
var leastMarksInterval = Math.max(Math.round(rangeLength / (desiredCountMin - 1)), 1);
|
|
79
|
+
var possibleValues = getNearByStep(leastMarksInterval);
|
|
80
|
+
var finalStep = possibleValues.find(function (step) {
|
|
81
|
+
var expectedSteps = Math.ceil(rangeLength / step) + 1;
|
|
82
|
+
return expectedSteps >= desiredCountMin - 1 && expectedSteps <= desiredCountMax + 1;
|
|
83
|
+
}) || possibleValues[0];
|
|
84
|
+
return [alignValue(min, finalStep) * stepValue, alignValue(finalStep * stepValue, stepValue), stepValue];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Calculate default step if not defined
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var calcStep = function calcStep(min, max, step) {
|
|
92
|
+
if (step) {
|
|
93
|
+
return step;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var diff = max > min ? max - min : min - max;
|
|
97
|
+
var v = (Math.abs(diff) + Number.EPSILON) / 100;
|
|
98
|
+
var N = Math.floor(Math.log10(v));
|
|
99
|
+
return [Number(Math.pow(10, N)), 2 * Math.pow(10, N), 5 * Math.pow(10, N)].sort(function (a, b) {
|
|
100
|
+
return Math.abs(a - v) - Math.abs(b - v);
|
|
101
|
+
})[0];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Set min and max if they are undefined and marks are defined
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
exports.calcStep = calcStep;
|
|
109
|
+
|
|
110
|
+
var setUndefined = function setUndefined(min, max, marks) {
|
|
111
|
+
var definedMarks = {
|
|
112
|
+
min_mark: min,
|
|
113
|
+
max_mark: max
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
if ((0, _ramda.isNil)(marks)) {
|
|
117
|
+
return definedMarks;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
var marksObject = Object.keys(marks).map(Number);
|
|
121
|
+
|
|
122
|
+
if ((0, _ramda.isNil)(min)) {
|
|
123
|
+
definedMarks.min_mark = Math.min.apply(Math, _toConsumableArray(marksObject));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if ((0, _ramda.isNil)(max)) {
|
|
127
|
+
definedMarks.max_mark = Math.max.apply(Math, _toConsumableArray(marksObject));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return definedMarks;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
exports.setUndefined = setUndefined;
|
|
134
|
+
|
|
135
|
+
var applyD3Format = function applyD3Format(mark, min, max) {
|
|
136
|
+
var mu_ten_factor = -3;
|
|
137
|
+
var k_ten_factor = 3;
|
|
138
|
+
var ten_factor = Math.log10(Math.abs(mark));
|
|
139
|
+
|
|
140
|
+
if (mark === 0 || ten_factor > mu_ten_factor && ten_factor < k_ten_factor) {
|
|
141
|
+
return String(mark);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
var max_min_mean = (Math.abs(max) + Math.abs(min)) / 2;
|
|
145
|
+
var si_formatter = (0, _d3Format.formatPrefix)(',.0', max_min_mean);
|
|
146
|
+
return String(si_formatter(mark));
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
exports.applyD3Format = applyD3Format;
|
|
150
|
+
|
|
151
|
+
var autoGenerateMarks = function autoGenerateMarks(min, max, step) {
|
|
152
|
+
var marks = [];
|
|
153
|
+
|
|
154
|
+
var _ref = step ? [min, step, step] : estimateBestSteps(min, max, calcStep(min, max, step)),
|
|
155
|
+
_ref2 = _slicedToArray(_ref, 3),
|
|
156
|
+
start = _ref2[0],
|
|
157
|
+
interval = _ref2[1],
|
|
158
|
+
chosenStep = _ref2[2];
|
|
159
|
+
|
|
160
|
+
var cursor = start + interval; // make sure we don't step into infinite loop
|
|
161
|
+
|
|
162
|
+
if ((max - cursor) / interval > 0) {
|
|
163
|
+
do {
|
|
164
|
+
marks.push(alignValue(cursor, chosenStep));
|
|
165
|
+
cursor += interval;
|
|
166
|
+
} while (cursor < max); // do some cosmetic
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
var discardThreshold = 1.5;
|
|
170
|
+
|
|
171
|
+
if (marks.length >= 2 && max - marks[marks.length - 2] <= interval * discardThreshold) {
|
|
172
|
+
marks.pop();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
var marksObject = {};
|
|
177
|
+
marks.forEach(function (mark) {
|
|
178
|
+
marksObject[mark] = applyD3Format(mark, min, max);
|
|
179
|
+
});
|
|
180
|
+
marksObject[min] = applyD3Format(min, min, max);
|
|
181
|
+
marksObject[max] = applyD3Format(max, min, max);
|
|
182
|
+
return marksObject;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* - Auto generate marks if not given,
|
|
186
|
+
* - Not generate anything at all when explicit null is given to marks
|
|
187
|
+
* - Then truncate marks so no out of range marks
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
exports.autoGenerateMarks = autoGenerateMarks;
|
|
192
|
+
|
|
193
|
+
var sanitizeMarks = function sanitizeMarks(_ref3) {
|
|
194
|
+
var min = _ref3.min,
|
|
195
|
+
max = _ref3.max,
|
|
196
|
+
marks = _ref3.marks,
|
|
197
|
+
step = _ref3.step;
|
|
198
|
+
|
|
199
|
+
if (marks === null) {
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
var _setUndefined = setUndefined(min, max, marks),
|
|
204
|
+
min_mark = _setUndefined.min_mark,
|
|
205
|
+
max_mark = _setUndefined.max_mark;
|
|
206
|
+
|
|
207
|
+
var truncated_marks = marks && (0, _ramda.isEmpty)(marks) === false ? truncateMarks(min_mark, max_mark, marks) : marks;
|
|
208
|
+
|
|
209
|
+
if (truncated_marks && (0, _ramda.isEmpty)(truncated_marks) === false) {
|
|
210
|
+
return truncated_marks;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return autoGenerateMarks(min_mark, max_mark, step);
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Calculate default value if not defined
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
exports.sanitizeMarks = sanitizeMarks;
|
|
221
|
+
|
|
222
|
+
var calcValue = function calcValue(min, max, value) {
|
|
223
|
+
if (value !== undefined) {
|
|
224
|
+
return value;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return [min, max];
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
exports.calcValue = calcValue;
|
|
@@ -22,6 +22,10 @@ var _default = function _default(newProps, momentProps) {
|
|
|
22
22
|
if (key === 'initial_visible_month') {
|
|
23
23
|
dest[key] = (0, _moment.default)(newProps.start_date || newProps.min_date_allowed || newProps.end_date || newProps.max_date_allowed || undefined);
|
|
24
24
|
}
|
|
25
|
+
} else if (Array.isArray(value)) {
|
|
26
|
+
dest[key] = value.map(function (d) {
|
|
27
|
+
return (0, _moment.default)(d);
|
|
28
|
+
});
|
|
25
29
|
} else {
|
|
26
30
|
dest[key] = (0, _moment.default)(value);
|
|
27
31
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sanitizeOptions = void 0;
|
|
7
|
+
|
|
8
|
+
var _ramda = require("ramda");
|
|
9
|
+
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
+
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
|
|
22
|
+
var sanitizeOptions = function sanitizeOptions(options) {
|
|
23
|
+
if ((0, _ramda.type)(options) === 'Object') {
|
|
24
|
+
return Object.entries(options).map(function (_ref) {
|
|
25
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
26
|
+
value = _ref2[0],
|
|
27
|
+
label = _ref2[1];
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
label: String(label),
|
|
31
|
+
value: value
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if ((0, _ramda.type)(options) === 'Array') {
|
|
37
|
+
if (options.length > 0 && ['String', 'Number', 'Bool'].includes((0, _ramda.type)(options[0]))) {
|
|
38
|
+
return options.map(function (option) {
|
|
39
|
+
return {
|
|
40
|
+
label: String(option),
|
|
41
|
+
value: option
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return options;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return options;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.sanitizeOptions = sanitizeOptions;
|
package/package.json
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash-core-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Core component suite for Dash",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git://github.com/plotly/dash
|
|
7
|
+
"url": "git://github.com/plotly/dash.git"
|
|
8
8
|
},
|
|
9
9
|
"bugs": {
|
|
10
|
-
"url": "https://github.com/plotly/dash
|
|
10
|
+
"url": "https://github.com/plotly/dash/issues"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://github.com/plotly/dash
|
|
13
|
-
"main": "dash_core_components/dash_core_components.
|
|
12
|
+
"homepage": "https://github.com/plotly/dash",
|
|
13
|
+
"main": "dash_core_components/dash_core_components.js",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"private::format.black": "black
|
|
16
|
-
"private::format.eslint": "eslint src
|
|
17
|
-
"private::format.prettier": "prettier --config .prettierrc --write src/**/*.js
|
|
18
|
-
"private::lint.black": "
|
|
19
|
-
"private::lint.eslint": "eslint src
|
|
15
|
+
"private::format.black": "black dash_core_components_base/ tests/ setup.py",
|
|
16
|
+
"private::format.eslint": "eslint src --fix",
|
|
17
|
+
"private::format.prettier": "prettier --config .prettierrc --write src/**/*.js",
|
|
18
|
+
"private::lint.black": "black --check dash_core_components_base/ tests/ setup.py",
|
|
19
|
+
"private::lint.eslint": "eslint src",
|
|
20
20
|
"private::lint.flake8": "flake8 --exclude=dash_core_components,node_modules,venv",
|
|
21
|
-
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js
|
|
22
|
-
"prepublishOnly": "rm -rf lib && babel src --out-dir lib --copy-files",
|
|
23
|
-
"
|
|
24
|
-
"test": "run-s -c lint test-unit test:legacy test:intg test:pyimport",
|
|
25
|
-
"test:legacy": "pytest tests/test_integration*.py",
|
|
21
|
+
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js --list-different",
|
|
22
|
+
"prepublishOnly": "rm -rf lib && babel src --out-dir lib --copy-files && rm -rf lib/jl/ lib/*.jl",
|
|
23
|
+
"test": "run-s -c lint test:intg test:pyimport",
|
|
26
24
|
"test:intg": "pytest --nopercyfinalize --headless tests/integration",
|
|
27
25
|
"test:pyimport": "python -m unittest tests/test_dash_import.py",
|
|
28
|
-
"test-unit": "jest",
|
|
29
|
-
"uninstall-local": "pip uninstall dash-core-components -y",
|
|
30
26
|
"prebuild:js": "cp node_modules/plotly.js/dist/plotly.min.js dash_core_components_base/plotly.min.js",
|
|
31
27
|
"build:js": "webpack --mode production",
|
|
32
|
-
"build:backends": "dash-generate-components ./src/components dash_core_components -p package-info.json
|
|
28
|
+
"build:backends": "dash-generate-components ./src/components dash_core_components -p package-info.json && cp dash_core_components_base/** dash_core_components/ && dash-generate-components ./src/components dash_core_components -p package-info.json -k RangeSlider,Slider,Dropdown,RadioItems,Checklist,DatePickerSingle,DatePickerRange,Input,Link --r-prefix 'dcc' --r-suggests 'dash,dashHtmlComponents,jsonlite,plotly' --jl-prefix 'dcc' && black dash_core_components",
|
|
33
29
|
"build": "run-s prepublishOnly build:js build:backends",
|
|
34
30
|
"postbuild": "es-check es5 dash_core_components/*.js",
|
|
35
31
|
"build:watch": "watch 'npm run build' src",
|
|
@@ -37,75 +33,72 @@
|
|
|
37
33
|
"lint": "run-s private::lint.*"
|
|
38
34
|
},
|
|
39
35
|
"author": "Chris Parmer <chris@plotly.com>",
|
|
40
|
-
"maintainer": "
|
|
36
|
+
"maintainer": "Alex Johnson <alex@plotly.com>",
|
|
41
37
|
"license": "MIT",
|
|
42
38
|
"dependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
39
|
+
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
|
40
|
+
"@fortawesome/free-regular-svg-icons": "^5.15.4",
|
|
41
|
+
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
42
|
+
"@fortawesome/react-fontawesome": "^0.1.16",
|
|
43
|
+
"base64-js": "^1.5.1",
|
|
44
|
+
"color": "^4.1.0",
|
|
45
|
+
"fast-isnumeric": "^1.1.4",
|
|
46
|
+
"file-saver": "^2.0.5",
|
|
47
|
+
"highlight.js": "^11.3.1",
|
|
48
|
+
"moment": "^2.29.1",
|
|
49
|
+
"node-polyfill-webpack-plugin": "^1.1.4",
|
|
50
|
+
"plotly.js": "2.8.3",
|
|
51
|
+
"prop-types": "^15.7.2",
|
|
52
|
+
"ramda": "^0.27.1",
|
|
53
|
+
"rc-slider": "^9.7.5",
|
|
54
|
+
"react-addons-shallow-compare": "^15.6.3",
|
|
55
|
+
"react-dates": "^21.8.0",
|
|
56
|
+
"react-docgen": "^5.4.0",
|
|
54
57
|
"react-dropzone": "^4.1.2",
|
|
55
|
-
"react-markdown": "^4.
|
|
56
|
-
"react-resize-detector": "^
|
|
58
|
+
"react-markdown": "^4.3.1",
|
|
59
|
+
"react-resize-detector": "^6.7.6",
|
|
57
60
|
"react-select-fast-filter-options": "^0.2.3",
|
|
58
61
|
"react-virtualized-select": "^3.1.3",
|
|
59
|
-
"uniqid": "^5.0
|
|
62
|
+
"uniqid": "^5.4.0"
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
|
-
"@babel/cli": "^7.
|
|
63
|
-
"@babel/core": "^7.
|
|
64
|
-
"@babel/plugin-
|
|
65
|
-
"@babel/
|
|
66
|
-
"@babel/
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"enzyme": "^3.7.0",
|
|
80
|
-
"enzyme-adapter-react-16": "^1.7.0",
|
|
81
|
-
"es-check": "^5.0.0",
|
|
82
|
-
"eslint": "^5.8.0",
|
|
83
|
-
"eslint-config-prettier": "^3.0.1",
|
|
84
|
-
"eslint-plugin-import": "^2.14.0",
|
|
85
|
-
"eslint-plugin-react": "^7.11.1",
|
|
86
|
-
"exec-sh": "^0.3.0",
|
|
87
|
-
"husky": "^4.2.3",
|
|
65
|
+
"@babel/cli": "^7.16.0",
|
|
66
|
+
"@babel/core": "^7.16.5",
|
|
67
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
68
|
+
"@babel/preset-env": "^7.16.5",
|
|
69
|
+
"@babel/preset-react": "^7.16.5",
|
|
70
|
+
"@plotly/dash-component-plugins": "^1.2.2",
|
|
71
|
+
"@plotly/webpack-dash-dynamic-import": "^1.3.0",
|
|
72
|
+
"babel-eslint": "^10.1.0",
|
|
73
|
+
"babel-loader": "^8.2.3",
|
|
74
|
+
"component-playground": "^3.2.1",
|
|
75
|
+
"copyfiles": "^2.4.1",
|
|
76
|
+
"css-loader": "^6.5.1",
|
|
77
|
+
"es-check": "^6.1.1",
|
|
78
|
+
"eslint": "^7.30.0",
|
|
79
|
+
"eslint-config-prettier": "^8.3.0",
|
|
80
|
+
"eslint-plugin-import": "^2.25.3",
|
|
81
|
+
"eslint-plugin-react": "^7.27.1",
|
|
88
82
|
"identity-obj-proxy": "^3.0.0",
|
|
89
|
-
"jest": "^24.5.0",
|
|
90
83
|
"npm-run-all": "^4.1.5",
|
|
91
|
-
"prettier": "^
|
|
92
|
-
"react": "16.
|
|
93
|
-
"react-dom": "16.
|
|
94
|
-
"react-jsx-parser": "
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"webpack": "^4.37.0",
|
|
100
|
-
"webpack-cli": "^3.3.6",
|
|
101
|
-
"webpack-serve": "^2.0.3"
|
|
84
|
+
"prettier": "^2.5.1",
|
|
85
|
+
"react": "^16.14.0",
|
|
86
|
+
"react-dom": "^16.14.0",
|
|
87
|
+
"react-jsx-parser": "1.21.0",
|
|
88
|
+
"style-loader": "^3.3.1",
|
|
89
|
+
"styled-jsx": "^3.4.4",
|
|
90
|
+
"webpack": "^5.65.0",
|
|
91
|
+
"webpack-cli": "^4.9.1"
|
|
102
92
|
},
|
|
103
93
|
"files": [
|
|
104
94
|
"/dash_core_components/*{.js,.map}",
|
|
105
|
-
"/lib
|
|
95
|
+
"/lib/"
|
|
106
96
|
],
|
|
107
97
|
"peerDependencies": {
|
|
108
|
-
"react": "
|
|
109
|
-
"react-dom": "
|
|
110
|
-
}
|
|
98
|
+
"react": ">=16",
|
|
99
|
+
"react-dom": ">=16"
|
|
100
|
+
},
|
|
101
|
+
"browserslist": [
|
|
102
|
+
"defaults"
|
|
103
|
+
]
|
|
111
104
|
}
|