@svgrid/enterprise 3.1.25 → 3.1.26

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.
Files changed (43) hide show
  1. package/dist/cdn/svgrid-enterprise.svelte-external.js +13664 -13646
  2. package/dist/designer/assets/{GridMenus-DWDghydL.js → GridMenus-C8WqB-To.js} +2 -2
  3. package/dist/designer/assets/{SvDateRangeInput-DbfmXqJj.js → SvDateRangeInput-y8PkioQk.js} +1 -1
  4. package/dist/designer/assets/SvGridCellEditor-CC9UMdVq.js +4 -0
  5. package/dist/designer/assets/{SvGridChart-DYtGHM3F.js → SvGridChart-DzCeEdlb.js} +3 -3
  6. package/dist/designer/assets/{SvGridChartBuilder-BjdQrnz5.js → SvGridChartBuilder-CsXVVKvA.js} +1 -1
  7. package/dist/designer/assets/SvGridChartPanel-Dj3IxTS2.js +4 -0
  8. package/dist/designer/assets/{SvGridChartView-Bfs0bvDb.js → SvGridChartView-Dwm4hxbW.js} +1 -1
  9. package/dist/designer/assets/{chart-export-B6bkQ3X8.js → chart-export-Dqq_eHRq.js} +4 -4
  10. package/dist/designer/assets/{chart-export-pdf-BbA28-gt.js → chart-export-pdf-Gw22jkxa.js} +1 -1
  11. package/dist/designer/assets/csv-injection-C4a0uulO.js +1 -0
  12. package/dist/designer/assets/export-format-NYxEY-0Y.js +6 -0
  13. package/dist/designer/assets/index-BU3ieI05.css +1 -0
  14. package/dist/designer/assets/{index-UhFdGGXv.js → index-PEFkd-5C.js} +341 -331
  15. package/dist/designer/assets/src-D23PPsK1.js +1 -0
  16. package/dist/designer/assets/{src-fddEt37f.js → src-DC5nN4Q7.js} +3 -3
  17. package/dist/designer/index.html +9 -8
  18. package/dist/import.js +11 -1
  19. package/dist/node/studio.js +20 -12
  20. package/dist/sheet/xlsx-document.js +15 -0
  21. package/dist/studio/emit-schema.js +18 -10
  22. package/dist/version.d.ts +2 -2
  23. package/dist/version.js +2 -2
  24. package/dist/wc/{GridMenus-h7RsvcmI.js → GridMenus-BIQXB6a7.js} +1 -1
  25. package/dist/wc/{SvDateRangeInput-CJZohgBe.js → SvDateRangeInput-DHYuAJeY.js} +1 -0
  26. package/dist/wc/SvGridCellEditor-CZwhQx0a.js +584 -0
  27. package/dist/wc/{SvGridChart-DWRqlhCV.js → SvGridChart-DcfmVvzB.js} +3 -3
  28. package/dist/wc/{SvGridChartBuilder-BXW3yUR0.js → SvGridChartBuilder-1Z69mxbM.js} +2 -2
  29. package/dist/wc/{SvGridChartPanel-28n4tomx.js → SvGridChartPanel-BaVsa-T-.js} +5 -5
  30. package/dist/wc/{SvGridChartView-CbG_WrU-.js → SvGridChartView-LEC8ZNeU.js} +1 -1
  31. package/dist/wc/{chart-export-CeSADGfi.js → chart-export-C1KSVdMU.js} +29 -28
  32. package/dist/wc/{chart-export-pdf-BGko7MER.js → chart-export-pdf-CmEd365D.js} +1 -1
  33. package/dist/wc/csv-injection-Ce26_TOb.js +8 -0
  34. package/dist/wc/sv-sheet-element.js +6234 -6211
  35. package/dist/xlsx-limits.d.ts +17 -0
  36. package/dist/xlsx-limits.js +21 -0
  37. package/package.json +3 -3
  38. package/dist/designer/assets/SvGridCellEditor-od4VbndV.js +0 -4
  39. package/dist/designer/assets/SvGridChartPanel-Cm9_K7BV.js +0 -4
  40. package/dist/designer/assets/export-format-BCuqcexA.js +0 -6
  41. package/dist/designer/assets/index-CHx3F4Ij.css +0 -1
  42. package/dist/designer/assets/src-CITpcm6b.js +0 -1
  43. package/dist/wc/SvGridCellEditor-C7ios4i_.js +0 -582
@@ -1,14 +1,15 @@
1
+ import { t as e } from "./csv-injection-Ce26_TOb.js";
1
2
  //#region ../grid/dist/chart-export.js
2
- function e(e) {
3
+ function t(e) {
3
4
  return e instanceof SVGSVGElement ? e : e.querySelector("svg.sv-grid-chart-svg") ?? e.querySelector("svg");
4
5
  }
5
- function t(e, t, n) {
6
+ function n(e, t, n) {
6
7
  return getComputedStyle(e).getPropertyValue(t).trim() || n;
7
8
  }
8
- function n(n, r = {}) {
9
- let i = e(n);
9
+ function r(e, r = {}) {
10
+ let i = t(e);
10
11
  if (!i) throw Error("chartToSvgString: no <svg> found");
11
- let a = t(i, "--sg-fg", "#0f172a"), o = t(i, "--sg-muted", "#64748b"), s = t(i, "--sg-border", "#e2e8f0"), c = r.background ?? t(i, "--sg-bg", "#ffffff"), l = i.viewBox.baseVal, u = l && l.width ? l.width : i.clientWidth || 520, d = l && l.height ? l.height : i.clientHeight || 300, f = i.cloneNode(!0);
12
+ let a = n(i, "--sg-fg", "#0f172a"), o = n(i, "--sg-muted", "#64748b"), s = n(i, "--sg-border", "#e2e8f0"), c = r.background ?? n(i, "--sg-bg", "#ffffff"), l = i.viewBox.baseVal, u = l && l.width ? l.width : i.clientWidth || 520, d = l && l.height ? l.height : i.clientHeight || 300, f = i.cloneNode(!0);
12
13
  f.setAttribute("width", String(u)), f.setAttribute("height", String(d)), f.setAttribute("xmlns", "http://www.w3.org/2000/svg");
13
14
  let p = [
14
15
  "fill",
@@ -48,16 +49,16 @@ function n(n, r = {}) {
48
49
  let _ = document.createElementNS("http://www.w3.org/2000/svg", "rect");
49
50
  return _.setAttribute("x", "0"), _.setAttribute("y", "0"), _.setAttribute("width", String(u)), _.setAttribute("height", String(d)), _.setAttribute("fill", c), f.insertBefore(_, g.nextSibling), new XMLSerializer().serializeToString(f);
50
51
  }
51
- function r(e, t) {
52
+ function i(e, t) {
52
53
  let n = document.createElement("a");
53
54
  n.href = e, n.download = t, document.body.appendChild(n), n.click(), n.remove();
54
55
  }
55
- function i(e, t = "chart.svg", i = {}) {
56
- let a = n(e, i), o = URL.createObjectURL(new Blob([a], { type: "image/svg+xml" }));
57
- r(o, t), setTimeout(() => URL.revokeObjectURL(o), 1e3);
56
+ function a(e, t = "chart.svg", n = {}) {
57
+ let a = r(e, n), o = URL.createObjectURL(new Blob([a], { type: "image/svg+xml" }));
58
+ i(o, t), setTimeout(() => URL.revokeObjectURL(o), 1e3);
58
59
  }
59
- function a(t, r = {}) {
60
- let i = n(t, r), a = r.scale ?? 2, o = e(t), s = o.viewBox.baseVal, c = (s && s.width ? s.width : o.clientWidth || 520) * a, l = (s && s.height ? s.height : o.clientHeight || 300) * a;
60
+ function o(e, n = {}) {
61
+ let i = r(e, n), a = n.scale ?? 2, o = t(e), s = o.viewBox.baseVal, c = (s && s.width ? s.width : o.clientWidth || 520) * a, l = (s && s.height ? s.height : o.clientHeight || 300) * a;
61
62
  return new Promise((e, t) => {
62
63
  let n = URL.createObjectURL(new Blob([i], { type: "image/svg+xml" })), r = new Image();
63
64
  r.onload = () => {
@@ -74,15 +75,15 @@ function a(t, r = {}) {
74
75
  }, r.src = n;
75
76
  });
76
77
  }
77
- async function o(e, t = "chart.png", n = {}) {
78
- let i = await a(e, n), o = URL.createObjectURL(i);
79
- r(o, t), setTimeout(() => URL.revokeObjectURL(o), 1e3);
78
+ async function s(e, t = "chart.png", n = {}) {
79
+ let r = await o(e, n), a = URL.createObjectURL(r);
80
+ i(a, t), setTimeout(() => URL.revokeObjectURL(a), 1e3);
80
81
  }
81
- var s = (e) => {
82
- let t = e == null || typeof e == "number" && !Number.isFinite(e) ? "" : String(e);
83
- return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
82
+ var c = (t) => {
83
+ let n = t == null || typeof t == "number" && !Number.isFinite(t) ? "" : String(t);
84
+ return typeof t == "string" && n !== "" && (n = e(n)), /[",\n\r]/.test(n) ? `"${n.replace(/"/g, "\"\"")}"` : n;
84
85
  };
85
- function c(e) {
86
+ function l(e) {
86
87
  let t = e.series ?? [];
87
88
  if (t.some((e) => e.points?.length)) {
88
89
  let e = [
@@ -91,14 +92,14 @@ function c(e) {
91
92
  "Y",
92
93
  "Size",
93
94
  "Label"
94
- ].map(s).join(","), n = [];
95
+ ].map(c).join(","), n = [];
95
96
  for (let e of t) for (let t of e.points ?? []) n.push([
96
97
  e.label,
97
98
  t.x,
98
99
  t.y,
99
100
  t.r ?? "",
100
101
  t.label ?? ""
101
- ].map(s).join(","));
102
+ ].map(c).join(","));
102
103
  return n.length ? [e, ...n].join("\n") : "";
103
104
  }
104
105
  let n = e.categories ?? [];
@@ -117,19 +118,19 @@ function c(e) {
117
118
  let t = e.values[n], i = e.errors[n], a = i == null ? "" : typeof i == "number" ? (t ?? 0) - Math.abs(i) : Math.min(i.lo, i.hi), o = i == null ? "" : typeof i == "number" ? (t ?? 0) + Math.abs(i) : Math.max(i.lo, i.hi);
118
119
  r.push(t ?? "", a, o);
119
120
  } else e.lowValues ? r.push(e.lowValues[n] ?? "", e.values[n] ?? "") : e.targets ? r.push(e.values[n] ?? "", e.targets[n] ?? "") : r.push(e.values[n] ?? "");
120
- return r.map(s).join(",");
121
+ return r.map(c).join(",");
121
122
  });
122
- return [r.map(s).join(","), ...i].join("\n");
123
+ return [r.map(c).join(","), ...i].join("\n");
123
124
  }
124
- function l(e) {
125
+ function u(e) {
125
126
  let t = e.series ?? [];
126
127
  return t.some((e) => e.points?.length) ? !0 : !!(e.categories?.length && t.length);
127
128
  }
128
- function u(e, t = "chart.csv") {
129
- let n = c(e);
129
+ function d(e, t = "chart.csv") {
130
+ let n = l(e);
130
131
  if (!n) return !1;
131
- let i = URL.createObjectURL(new Blob([n], { type: "text/csv;charset=utf-8" }));
132
- return r(i, t), setTimeout(() => URL.revokeObjectURL(i), 1e3), !0;
132
+ let r = URL.createObjectURL(new Blob([n], { type: "text/csv;charset=utf-8" }));
133
+ return i(r, t), setTimeout(() => URL.revokeObjectURL(r), 1e3), !0;
133
134
  }
134
135
  //#endregion
135
- export { o as a, u as i, a as n, i as o, n as r, l as t };
136
+ export { s as a, d as i, o as n, a as o, r, u as t };
@@ -1,4 +1,4 @@
1
- import { n as e, r as t } from "./chart-export-CeSADGfi.js";
1
+ import { n as e, r as t } from "./chart-export-C1KSVdMU.js";
2
2
  //#region ../grid/dist/chart-export-pdf.js
3
3
  var n = {
4
4
  A4: [595.28, 841.89],
@@ -0,0 +1,8 @@
1
+ //#region ../grid/dist/csv-injection.js
2
+ var e = /^[+-]\s*\p{Sc}?\s*\d[\d.,\s  ]*(?:e[+-]?\d+)?\s*%?\s*\p{Sc}?$/iu;
3
+ function t(t) {
4
+ let n = t.charCodeAt(0);
5
+ return n !== 61 && n !== 43 && n !== 45 && n !== 64 && n !== 9 && n !== 13 || (n === 43 || n === 45) && e.test(t) ? t : "'" + t;
6
+ }
7
+ //#endregion
8
+ export { t };