flexdesk 0.14.0 → 0.14.1
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 +19 -0
- package/dist/charts.js +2 -2
- package/dist/{chunk-M2L4XW2U.js → chunk-FBGP5KN5.js} +33 -21
- package/dist/chunk-FBGP5KN5.js.map +7 -0
- package/dist/{chunk-IYMNDPWH.js → chunk-RQM5Z2MU.js} +2 -2
- package/dist/flow.js +1 -1
- package/dist/tiles.js +11 -3
- package/dist/tiles.js.map +2 -2
- package/dist/widgets.js +1 -1
- package/package.json +1 -1
- package/src/tiles/chart_tiles.js +14 -1
- package/src/ui/components/data_table.js +32 -14
- package/dist/chunk-M2L4XW2U.js.map +0 -7
- /package/dist/{chunk-IYMNDPWH.js.map → chunk-RQM5Z2MU.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTable,
|
|
3
3
|
createRafResizeObserver
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FBGP5KN5.js";
|
|
5
5
|
import {
|
|
6
6
|
ManagedWindow
|
|
7
7
|
} from "./chunk-6JSOVNID.js";
|
|
@@ -2477,4 +2477,4 @@ export {
|
|
|
2477
2477
|
openPlotPopoutWindow,
|
|
2478
2478
|
openRawTracesWindow
|
|
2479
2479
|
};
|
|
2480
|
-
//# sourceMappingURL=chunk-
|
|
2480
|
+
//# sourceMappingURL=chunk-RQM5Z2MU.js.map
|
package/dist/flow.js
CHANGED
package/dist/tiles.js
CHANGED
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
purge,
|
|
29
29
|
resize,
|
|
30
30
|
strideDownsampleShared
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-RQM5Z2MU.js";
|
|
32
|
+
import "./chunk-FBGP5KN5.js";
|
|
33
33
|
import "./chunk-6JSOVNID.js";
|
|
34
34
|
import "./chunk-FL5KFNQH.js";
|
|
35
35
|
import {
|
|
@@ -1355,9 +1355,17 @@ var ChartTile = class extends TileBase {
|
|
|
1355
1355
|
try {
|
|
1356
1356
|
const P = await ensurePlotly();
|
|
1357
1357
|
const uri = await P.toImage(this._plotEl, { format: "png", scale: 2 });
|
|
1358
|
+
const filename = `${slug(this.config.title || this.constructor.TITLE)}.png`;
|
|
1359
|
+
const dialogs = this.host?.dialogs;
|
|
1360
|
+
const result = dialogs ? await dialogs.saveFile({ data: uri.split(",")[1], filename, kind: "png" }) : null;
|
|
1361
|
+
if (result) {
|
|
1362
|
+
if (result.ok) this._notify("Download", `Chart saved to ${result.path}`, "success");
|
|
1363
|
+
else if (!result.cancelled) this._notify("Download failed", result.error || "The image could not be saved", "error");
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1358
1366
|
const a = document.createElement("a");
|
|
1359
1367
|
a.href = uri;
|
|
1360
|
-
a.download =
|
|
1368
|
+
a.download = filename;
|
|
1361
1369
|
a.click();
|
|
1362
1370
|
} catch (err) {
|
|
1363
1371
|
this._notify("Download failed", `The image could not be made: ${err?.message || err}`, "error");
|