myio-js-library 0.1.166 → 0.1.167
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/dist/index.cjs +5 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.js +5 -1
- package/dist/myio-js-library.umd.js +5 -1
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24012,7 +24012,11 @@ function createConsumptionModal(config) {
|
|
|
24012
24012
|
defaultChartType: currentChartType,
|
|
24013
24013
|
defaultVizMode: currentVizMode
|
|
24014
24014
|
});
|
|
24015
|
-
|
|
24015
|
+
if (config.initialData) {
|
|
24016
|
+
chartInstance.update(config.initialData);
|
|
24017
|
+
} else {
|
|
24018
|
+
await chartInstance.render();
|
|
24019
|
+
}
|
|
24016
24020
|
},
|
|
24017
24021
|
close() {
|
|
24018
24022
|
if (modalElement) {
|
package/dist/index.d.cts
CHANGED
|
@@ -2887,6 +2887,8 @@ interface ConsumptionModalConfig extends Omit<Consumption7DaysConfig, 'container
|
|
|
2887
2887
|
showSettingsButton?: boolean;
|
|
2888
2888
|
/** Callback when settings button is clicked */
|
|
2889
2889
|
onSettingsClick?: () => void;
|
|
2890
|
+
/** Initial data to display (skips fetch if provided) */
|
|
2891
|
+
initialData?: Consumption7DaysData;
|
|
2890
2892
|
}
|
|
2891
2893
|
interface ConsumptionModalInstance {
|
|
2892
2894
|
/** Opens the modal */
|
package/dist/index.js
CHANGED
|
@@ -23871,7 +23871,11 @@ function createConsumptionModal(config) {
|
|
|
23871
23871
|
defaultChartType: currentChartType,
|
|
23872
23872
|
defaultVizMode: currentVizMode
|
|
23873
23873
|
});
|
|
23874
|
-
|
|
23874
|
+
if (config.initialData) {
|
|
23875
|
+
chartInstance.update(config.initialData);
|
|
23876
|
+
} else {
|
|
23877
|
+
await chartInstance.render();
|
|
23878
|
+
}
|
|
23875
23879
|
},
|
|
23876
23880
|
close() {
|
|
23877
23881
|
if (modalElement) {
|
|
@@ -23689,7 +23689,11 @@ ${rangeText}`;
|
|
|
23689
23689
|
defaultChartType: currentChartType,
|
|
23690
23690
|
defaultVizMode: currentVizMode
|
|
23691
23691
|
});
|
|
23692
|
-
|
|
23692
|
+
if (config.initialData) {
|
|
23693
|
+
chartInstance.update(config.initialData);
|
|
23694
|
+
} else {
|
|
23695
|
+
await chartInstance.render();
|
|
23696
|
+
}
|
|
23693
23697
|
},
|
|
23694
23698
|
close() {
|
|
23695
23699
|
if (modalElement) {
|