@milaboratories/graph-maker 1.1.157 → 1.1.159

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 (65) hide show
  1. package/dist/GraphMaker/constantsCommon.d.ts +1 -0
  2. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  3. package/dist/GraphMaker/constantsCommon.js +17 -16
  4. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  5. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.d.ts.map +1 -1
  6. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +104 -93
  7. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
  8. package/dist/GraphMaker/index.vue.js +33 -33
  9. package/dist/GraphMaker/index.vue.js.map +1 -1
  10. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +1 -0
  11. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  12. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +11 -11
  13. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  14. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +136 -135
  15. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  16. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +2 -2
  17. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
  18. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +115 -107
  19. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  20. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js +99 -0
  21. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -0
  22. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js +57 -0
  23. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -0
  24. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js +43 -43
  25. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
  26. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +85 -0
  27. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -0
  28. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/AxisCaptions.js +5 -5
  29. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/GroupCaptions.js +16 -16
  30. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +191 -197
  31. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  32. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +29 -27
  33. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  34. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +38 -0
  35. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -0
  36. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +44 -0
  37. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -0
  38. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js +16 -15
  39. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js.map +1 -1
  40. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +63 -66
  41. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  42. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +64 -62
  43. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  44. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateChartSideElementSizes.js +9 -9
  45. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +14 -14
  46. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +5 -4
  47. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +10 -8
  49. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -1
  50. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +21 -21
  51. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +19 -19
  52. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +8 -8
  53. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +9 -9
  54. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +7 -7
  55. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +2 -2
  56. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -1
  57. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +59 -57
  58. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
  59. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js.map +1 -1
  60. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +13 -13
  61. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +137 -133
  62. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
  63. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +73 -74
  64. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
  65. package/package.json +3 -3
@@ -1,20 +1,20 @@
1
1
  import "../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
2
2
  import { getNormalizedAxesList as E } from "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
3
3
  import "../_virtual/canonicalize.js";
4
- import { LinkerMap as U } from "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js";
4
+ import { LinkerMap as W } from "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js";
5
5
  import "../node_modules/@milaboratories/pl-model-common/dist/plid.js";
6
6
  import "../node_modules/@milaboratories/pl-model-common/dist/ref.js";
7
7
  import "../node_modules/@platforma-sdk/model/dist/render/util/label.js";
8
- import { isLabelColumn as j } from "../node_modules/@platforma-sdk/model/dist/components/PlDataTable.js";
8
+ import { isLabelColumn as U } from "../node_modules/@platforma-sdk/model/dist/components/PlDataTable.js";
9
9
  import "../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
10
- import { DISCRETE_FILTER_KEY as F, SUBSET_FILTER_KEY as L, COLUMN_LABEL_KEY as z, IS_LINKER_COLUMN as H } from "../constants.js";
11
- import { columnOrAxisIdFromString as B, isColumnId as T, AxisId as N, ColumnId as Y } from "../spec.js";
12
- import { getStateCopy as q, getNotAllowedAxes as $, axisIsNonHomogenous as Z, getColumnOrAxisLabel as V } from "../utils.js";
10
+ import { DISCRETE_FILTER_KEY as F, SUBSET_FILTER_KEY as L, COLUMN_LABEL_KEY as j, IS_LINKER_COLUMN as z } from "../constants.js";
11
+ import { columnOrAxisIdFromString as B, isColumnId as T, AxisId as N, ColumnId as H } from "../spec.js";
12
+ import { getStateCopy as $, getNotAllowedAxes as Y, axisIsNonHomogenous as Z, getColumnOrAxisLabel as V } from "../utils.js";
13
13
  var G = Object.defineProperty, J = (d, e, t) => e in d ? G(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t, S = (d, e, t) => J(d, typeof e != "symbol" ? e + "" : e, t);
14
14
  const Q = (d) => {
15
15
  var e;
16
- return ((e = d == null ? void 0 : d.annotations) == null ? void 0 : e[H]) === "true";
17
- }, M = class R {
16
+ return ((e = d == null ? void 0 : d.annotations) == null ? void 0 : e[z]) === "true";
17
+ }, q = class M {
18
18
  constructor({
19
19
  componentName: e,
20
20
  allowedTypes: t,
@@ -25,7 +25,7 @@ const Q = (d) => {
25
25
  annotations: p = {},
26
26
  checkSourceBySpec: o
27
27
  }) {
28
- S(this, "componentName"), S(this, "allowedTypes"), S(this, "settings"), S(this, "dependsOn"), S(this, "parentComponents"), S(this, "strictlyDependsOnParents"), S(this, "annotations"), S(this, "checkSourceBySpec"), this.componentName = e, this.allowedTypes = [...t], this.settings = { ...R.DefaultSettings, ...n }, this.dependsOn = [...i], this.parentComponents = [...l], this.strictlyDependsOnParents = s ?? !0, this.annotations = { ...p }, o && (this.checkSourceBySpec = o);
28
+ S(this, "componentName"), S(this, "allowedTypes"), S(this, "settings"), S(this, "dependsOn"), S(this, "parentComponents"), S(this, "strictlyDependsOnParents"), S(this, "annotations"), S(this, "checkSourceBySpec"), this.componentName = e, this.allowedTypes = [...t], this.settings = { ...M.DefaultSettings, ...n }, this.dependsOn = [...i], this.parentComponents = [...l], this.strictlyDependsOnParents = s ?? !0, this.annotations = { ...p }, o && (this.checkSourceBySpec = o);
29
29
  }
30
30
  get isRequired() {
31
31
  return this.settings.required;
@@ -34,11 +34,11 @@ const Q = (d) => {
34
34
  return this.settings.dimensionConsumer;
35
35
  }
36
36
  addSelected(e, t) {
37
- const n = q(e);
37
+ const n = $(e);
38
38
  return n.components[this.componentName].selectorStates.push(t), n;
39
39
  }
40
40
  deleteSelected(e, t) {
41
- const n = q(e);
41
+ const n = $(e);
42
42
  return n.components[this.componentName].selectorStates = n.components[this.componentName].selectorStates.filter((s) => s.selectedSource !== t), n;
43
43
  }
44
44
  getParentSelectedSources(e) {
@@ -72,7 +72,7 @@ const Q = (d) => {
72
72
  const m = await e.pFrameProvider.getColumnSpecById(u);
73
73
  if (!m)
74
74
  continue;
75
- const g = $(m, Array.from(i.values()).map((a) => a.spec), n, s);
75
+ const g = Y(m, Array.from(i.values()).map((a) => a.spec), n, s);
76
76
  for (const a of g)
77
77
  l.set(N.fromAxisSpec(a).toCanonicalString(), { parentSource: o, spec: a });
78
78
  }
@@ -88,9 +88,9 @@ const Q = (d) => {
88
88
  return s;
89
89
  const l = E(Array.from(i.values()).map((o) => o.spec)), p = E(t.getReachableByLinkersAxesFromAxes(l));
90
90
  for (const o of p) {
91
- const u = U.getLinkerKeyFromAxisSpec(o), m = t.data.get(u), g = Array.from((m == null ? void 0 : m.linkWith.keys()) ?? []), a = m == null ? void 0 : m.linkWith.get(g[0]);
91
+ const u = W.getLinkerKeyFromAxisSpec(o), m = t.data.get(u), g = Array.from((m == null ? void 0 : m.linkWith.keys()) ?? []), a = m == null ? void 0 : m.linkWith.get(g[0]);
92
92
  if (a) {
93
- const C = N.fromAxisSpec(o).toCanonicalString(), x = new Y({ name: a.columnId, type: a.spec.valueType }).toCanonicalString();
93
+ const C = N.fromAxisSpec(o).toCanonicalString(), x = new H({ name: a.columnId, type: a.spec.valueType }).toCanonicalString();
94
94
  s.set(C, { parentSource: x, spec: o });
95
95
  }
96
96
  }
@@ -130,11 +130,11 @@ const Q = (d) => {
130
130
  const f = this.getAllowedAxes(i, n, s);
131
131
  for (const [y, { spec: c, parentSource: A }] of f.entries()) {
132
132
  const w = B(y), r = Z(c), I = this.allowedTypes.includes(c.type), k = Object.entries(this.annotations).every(
133
- ([K, W]) => {
133
+ ([_, K]) => {
134
134
  var P;
135
- return ((P = c.annotations) == null ? void 0 : P[K]) === W;
135
+ return ((P = c.annotations) == null ? void 0 : P[_]) === K;
136
136
  }
137
- ), D = this.checkSourceBySpec ? this.checkSourceBySpec(c, t) : !0, h = !this.settings.homogeneous || !r, _ = p.has(w.name) || o.has(y);
137
+ ), D = this.checkSourceBySpec ? this.checkSourceBySpec(c, t) : !0, h = !this.settings.homogeneous || !r, R = p.has(w.name) || o.has(y);
138
138
  v.set(y, {
139
139
  kind: "axis",
140
140
  name: c.name,
@@ -148,7 +148,7 @@ const Q = (d) => {
148
148
  isSubsetFilter: ((u = c.annotations) == null ? void 0 : u[L]) === "true",
149
149
  isDiscreteFilter: c.type === "String" || ((m = c.annotations) == null ? void 0 : m[F]) === "true",
150
150
  parentSources: [A]
151
- }), I && k && D && h && !_ && O.push({ value: y });
151
+ }), I && k && D && h && !R && O.push({ value: y });
152
152
  }
153
153
  }
154
154
  if (this.settings.columnsAllowed) {
@@ -160,13 +160,13 @@ const Q = (d) => {
160
160
  const I = i[this.componentName].parentsAxes, k = r.axesSpec.map((h) => N.fromAxisSpec(h).toCanonicalString());
161
161
  if (
162
162
  // do not add to available options label columns, or columns that are not fit by custom spec condition, or columns that are not fit by condition for data inputs
163
- j(r) || Q(r) || this.checkSourceBySpec && !this.checkSourceBySpec(r, t) || this.settings.isDataComponent && !l(r) || y && c.size && k.some((h) => !c.has(h)) || I.size && !(k.some((h) => I.has(h)) || k.every((h) => c.has(h)))
163
+ U(r) || Q(r) || this.checkSourceBySpec && !this.checkSourceBySpec(r, t) || this.settings.isDataComponent && !l(r) || y && c.size && k.some((h) => !c.has(h)) || I.size && !(k.some((h) => I.has(h)) || k.every((h) => c.has(h)))
164
164
  )
165
165
  continue;
166
166
  const D = {
167
167
  kind: "column",
168
168
  name: r.name,
169
- label: ((g = r.annotations) == null ? void 0 : g[z]) ?? r.name,
169
+ label: ((g = r.annotations) == null ? void 0 : g[j]) ?? r.name,
170
170
  type: r.valueType,
171
171
  spec: r,
172
172
  annotations: r.annotations,
@@ -185,7 +185,7 @@ const Q = (d) => {
185
185
  };
186
186
  }
187
187
  };
188
- S(M, "DefaultSettings", {
188
+ S(q, "DefaultSettings", {
189
189
  isDataComponent: !1,
190
190
  multipleSelectors: !1,
191
191
  required: !1,
@@ -195,7 +195,7 @@ S(M, "DefaultSettings", {
195
195
  columnsWithExtraAxesAllowed: !0,
196
196
  dimensionConsumer: !1
197
197
  });
198
- let me = M;
198
+ let me = q;
199
199
  export {
200
200
  me as ComponentController
201
201
  };
@@ -2,8 +2,8 @@ import E from "../../_virtual/canonicalize.js";
2
2
  import { FORMAT as k } from "../../constants.js";
3
3
  import { ControllerBase as W } from "../ControllerBase.js";
4
4
  import { ComponentController as y } from "../ComponentController.js";
5
- import { AxisId as H, columnOrAxisIdFromString as w, isColumnId as c } from "../../spec.js";
6
- import { createLinkerMap as J, createMultipliesByMap as K, getFiltersFromStates as R, getAxesSpecsFromSources as U, getLinkerColumnsForSource as F, getColumnOrAxisValueLabelsId as x, getColumnOrAxisLabel as A, getColumnOrAxisSpec as $ } from "../../utils.js";
5
+ import { AxisId as $, columnOrAxisIdFromString as w, isColumnId as c } from "../../spec.js";
6
+ import { createLinkerMap as H, createMultipliesByMap as J, getFiltersFromStates as K, getAxesSpecsFromSources as R, getLinkerColumnsForSource as F, getColumnOrAxisValueLabelsId as x, getColumnOrAxisLabel as A, getColumnOrAxisSpec as U } from "../../utils.js";
7
7
  var G = Object.defineProperty, Q = (m, e, t) => e in m ? G(m, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[e] = t, j = (m, e, t) => Q(m, typeof e != "symbol" ? e + "" : e, t);
8
8
  const oe = {
9
9
  type: "bubble",
@@ -137,7 +137,7 @@ class le extends W {
137
137
  if (!e.components.valueColor.selectorStates.length)
138
138
  return /* @__PURE__ */ new Set();
139
139
  const v = e.components.valueColor.selectorStates[0].selectedSource, u = t.get(v);
140
- return !u || u.kind !== "column" ? /* @__PURE__ */ new Set() : new Set(u.spec.axesSpec.map((l) => H.fromAxisSpec(l).toCanonicalString()));
140
+ return !u || u.kind !== "column" ? /* @__PURE__ */ new Set() : new Set(u.spec.axesSpec.map((l) => $.fromAxisSpec(l).toCanonicalString()));
141
141
  }
142
142
  async createDataByColumns(e, t) {
143
143
  var v, u;
@@ -151,10 +151,10 @@ class le extends W {
151
151
  type: "columns",
152
152
  id: E(t.components) ?? "",
153
153
  values: {}
154
- }, D = await J(e), L = await K(e), b = [
154
+ }, D = await H(e), h = await J(e), b = [
155
155
  ...t.components.filters.selectorStates,
156
156
  ...t.components.tabBy.selectorStates
157
- ], O = R(b), z = b.map((o) => w(o.selectedSource)).filter(c), h = [p, d].filter(c), C = h.map((o) => o.toCanonicalString()), B = await U(e, C), a = [
157
+ ], I = K(b), O = b.map((o) => w(o.selectedSource)).filter(c), L = [p, d].filter(c), C = L.map((o) => o.toCanonicalString()), B = await R(e, C), a = [
158
158
  t.components.facetBy,
159
159
  t.components.x,
160
160
  t.components.y,
@@ -164,7 +164,7 @@ class le extends W {
164
164
  g.push(...await F(
165
165
  e,
166
166
  D,
167
- L,
167
+ h,
168
168
  B,
169
169
  o
170
170
  ));
@@ -173,7 +173,7 @@ class le extends W {
173
173
  S.push(w(r)), g.push(...await F(
174
174
  e,
175
175
  D,
176
- L,
176
+ h,
177
177
  B,
178
178
  r
179
179
  ));
@@ -181,9 +181,9 @@ class le extends W {
181
181
  T && S.push(T);
182
182
  }
183
183
  const n = await e.pFrameProvider.getTableOuterJoin(
184
- [...h, ...g, ...z],
184
+ [...L, ...g, ...O],
185
185
  S,
186
- O,
186
+ I,
187
187
  !0
188
188
  );
189
189
  S.forEach((o) => {
@@ -197,13 +197,13 @@ class le extends W {
197
197
  }
198
198
  ));
199
199
  s.values[N] = P(n, f), s.values.xLabels = P(n, M);
200
- const I = t.components.y.selectorStates.map((o) => o.selectedSource), V = I.join(", "), q = await Promise.all(I.map(
200
+ const z = t.components.y.selectorStates.map((o) => o.selectedSource), V = z.join(", "), q = await Promise.all(z.map(
201
201
  async (o) => {
202
202
  var r;
203
203
  return ((r = await x(e, o, C)) == null ? void 0 : r.toCanonicalString()) ?? o;
204
204
  }
205
205
  ));
206
- return s.values[V] = P(n, I), s.values.yLabels = P(n, q), { byColumns: s };
206
+ return s.values[V] = P(n, z), s.values.yLabels = P(n, q), { byColumns: s };
207
207
  }
208
208
  async createChartSettings(e, t) {
209
209
  var v, u;
@@ -217,20 +217,20 @@ class le extends W {
217
217
  type: "column",
218
218
  value: l,
219
219
  label: await A(e, l, [])
220
- }, L = {
220
+ }, h = {
221
221
  type: "column",
222
222
  value: i,
223
223
  label: await A(e, i, [])
224
- }, b = t.components.x.selectorStates.map(({ selectedSource: a }) => a).join(", "), O = t.components.y.selectorStates.map(({ selectedSource: a }) => a).join(", "), z = await Promise.all(t.components.facetBy.selectorStates.map(async (a) => {
224
+ }, b = t.components.x.selectorStates.map(({ selectedSource: a }) => a).join(", "), I = t.components.y.selectorStates.map(({ selectedSource: a }) => a).join(", "), O = await Promise.all(t.components.facetBy.selectorStates.map(async (a) => {
225
225
  var S;
226
226
  return {
227
227
  type: "column",
228
228
  value: ((S = await x(e, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) ?? a.selectedSource
229
229
  };
230
- })), h = (await Promise.all(t.components.x.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), C = (await Promise.all(t.components.y.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), B = await Promise.all(
230
+ })), L = (await Promise.all(t.components.x.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), C = (await Promise.all(t.components.y.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), B = await Promise.all(
231
231
  t.components.tooltipContent.selectorStates.map(async (a) => {
232
232
  var S, g;
233
- const n = a.selectedSource, f = await $(e, n, s);
233
+ const n = a.selectedSource, f = await U(e, n, s);
234
234
  return {
235
235
  type: "column",
236
236
  label: await A(e, n, s) || n,
@@ -243,20 +243,20 @@ class le extends W {
243
243
  return {
244
244
  type: "bubble",
245
245
  valueColor: D,
246
- valueSize: L,
246
+ valueSize: h,
247
247
  xColumn: {
248
248
  type: "column",
249
249
  value: b,
250
- label: h,
250
+ label: L,
251
251
  valueLabels: "xLabels"
252
252
  },
253
253
  yColumn: {
254
254
  type: "column",
255
- value: O,
255
+ value: I,
256
256
  label: C,
257
257
  valueLabels: "yLabels"
258
258
  },
259
- facetBy: z,
259
+ facetBy: O,
260
260
  tooltips: {
261
261
  show: !0,
262
262
  content: B
@@ -25,7 +25,7 @@ const te = {
25
25
  function N(u) {
26
26
  return u ? "kind" in u && u.kind === "PColumn" ? u.valueType === "String" : u.type === "String" : !0;
27
27
  }
28
- function I(u, e) {
28
+ function G(u, e) {
29
29
  if (!e.length)
30
30
  return [];
31
31
  const t = e.map((i) => g(i)), r = Object.values(u.columnsData)[0].length, o = [];
@@ -275,8 +275,8 @@ class oe extends K {
275
275
  const p = l.toCanonicalString();
276
276
  a.values[p] = b(l) ? y.columnsData[p] : y.axesData[p];
277
277
  }), a.values[i.toCanonicalString()] = y.columnsData[i.toCanonicalString()];
278
- const G = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map((l) => l.selectedSource), n = G.join(", ");
279
- a.values[n] = I(y, G);
278
+ const I = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map((l) => l.selectedSource), n = I.join(", ");
279
+ a.values[n] = G(y, I);
280
280
  const c = t.components.x.selectorStates.map((l) => l.selectedSource), S = await Promise.all(
281
281
  c.map(
282
282
  async (l) => {
@@ -285,9 +285,9 @@ class oe extends K {
285
285
  }
286
286
  )
287
287
  );
288
- a.values.xLabelsKey = I(y, S);
288
+ a.values.xLabelsKey = G(y, S);
289
289
  const s = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map((l) => l.selectedSource), d = s.join(", ");
290
- a.values[d] = I(y, s);
290
+ a.values[d] = G(y, s);
291
291
  const O = t.components.y.selectorStates.map((l) => l.selectedSource), D = await Promise.all(
292
292
  O.map(
293
293
  async (l) => {
@@ -296,7 +296,7 @@ class oe extends K {
296
296
  }
297
297
  )
298
298
  );
299
- return a.values.yLabelsKey = I(y, D), { byColumns: a };
299
+ return a.values.yLabelsKey = G(y, D), { byColumns: a };
300
300
  }
301
301
  async createChartSettings(e, t) {
302
302
  var r;
@@ -380,7 +380,7 @@ class oe extends K {
380
380
  t.components.y.selectorStates.map(
381
381
  (n) => x(e, n.selectedSource, a)
382
382
  )
383
- )).join(", "), G = await Promise.all(
383
+ )).join(", "), I = await Promise.all(
384
384
  t.components.tooltipContent.selectorStates.map(async (n) => {
385
385
  var c, S;
386
386
  const s = n.selectedSource, d = await J(e, s, a);
@@ -415,7 +415,7 @@ class oe extends K {
415
415
  annotations: [...F, ...h],
416
416
  tooltips: {
417
417
  show: !0,
418
- content: G
418
+ content: I
419
419
  }
420
420
  };
421
421
  }
@@ -172,7 +172,7 @@ class ee extends E {
172
172
  }, m = await M(t), n = await q(t), d = [
173
173
  ...e.components.filters.selectorStates,
174
174
  ...e.components.tabBy.selectorStates
175
- ], I = Y(d), O = d.map((s) => h(s.selectedSource)).filter(C), v = [l, a].filter(C).map((s) => s.toCanonicalString());
175
+ ], L = Y(d), O = d.map((s) => h(s.selectedSource)).filter(C), v = [l, a].filter(C).map((s) => s.toCanonicalString());
176
176
  if (v.length === 0)
177
177
  throw Error("One of X and Y should be a column");
178
178
  const D = await W(t, v), B = [l, a, ...O], x = [], f = [];
@@ -184,7 +184,7 @@ class ee extends E {
184
184
  D,
185
185
  s
186
186
  ));
187
- const L = [
187
+ const I = [
188
188
  e.components.grouping,
189
189
  e.components.facetBy,
190
190
  e.components.tooltipContent,
@@ -192,7 +192,7 @@ class ee extends E {
192
192
  e.components.highlight,
193
193
  e.components.size
194
194
  ];
195
- for (const s of L)
195
+ for (const s of I)
196
196
  for (const { selectedSource: i } of s.selectorStates) {
197
197
  x.push(h(i)), f.push(...await $(
198
198
  t,
@@ -207,7 +207,7 @@ class ee extends E {
207
207
  const o = await t.pFrameProvider.getTableOuterJoin(
208
208
  [l, a, ...f, ...O],
209
209
  x,
210
- I,
210
+ L,
211
211
  !1
212
212
  );
213
213
  return [...B, ...x].forEach((s) => {
@@ -227,7 +227,7 @@ class ee extends E {
227
227
  type: "column",
228
228
  value: l,
229
229
  label: await A(t, l, n)
230
- }, I = {
230
+ }, L = {
231
231
  type: "column",
232
232
  value: a,
233
233
  label: await A(t, a, n)
@@ -281,19 +281,19 @@ class ee extends E {
281
281
  format: (u = s == null ? void 0 : s.annotations) == null ? void 0 : u[P]
282
282
  };
283
283
  }
284
- let L;
285
- return e.components.highlight.selectorStates.length && (L = {
284
+ let I;
285
+ return e.components.highlight.selectorStates.length && (I = {
286
286
  type: "column",
287
287
  value: "highlight"
288
288
  }), {
289
289
  type: "scatterplot-umap",
290
290
  x: d,
291
- y: I,
291
+ y: L,
292
292
  keyColumn: O,
293
293
  facetBy: v,
294
294
  grouping: B,
295
295
  label: f,
296
- highlight: L,
296
+ highlight: I,
297
297
  tooltips: {
298
298
  show: !0,
299
299
  content: x
@@ -181,7 +181,7 @@ class te extends q {
181
181
  }, m = await W(t), s = await Y(t), d = [
182
182
  ...e.components.filters.selectorStates,
183
183
  ...e.components.tabBy.selectorStates
184
- ], I = j(d), A = d.map((o) => S(o.selectedSource)).filter(x), C = [r, i].filter(x).map((o) => o.toCanonicalString());
184
+ ], L = j(d), A = d.map((o) => S(o.selectedSource)).filter(x), C = [r, i].filter(x).map((o) => o.toCanonicalString());
185
185
  if (C.length === 0)
186
186
  throw Error("One of X and Y should be a column");
187
187
  const O = await X(t, C), P = [r, i, ...A], h = [], f = [];
@@ -211,13 +211,13 @@ class te extends q {
211
211
  O,
212
212
  l
213
213
  ));
214
- const L = await v(t, l, C);
215
- L && h.push(L);
214
+ const I = await v(t, l, C);
215
+ I && h.push(I);
216
216
  }
217
217
  const n = await t.pFrameProvider.getTableOuterJoin(
218
218
  [r, i, ...f, ...A],
219
219
  h,
220
- I,
220
+ L,
221
221
  !1
222
222
  );
223
223
  return [...P, ...h].forEach((o) => {
@@ -234,7 +234,7 @@ class te extends q {
234
234
  type: "column",
235
235
  value: r,
236
236
  label: await b(t, r, s)
237
- }, I = {
237
+ }, L = {
238
238
  type: "column",
239
239
  value: i,
240
240
  label: await b(t, i, s)
@@ -268,7 +268,7 @@ class te extends q {
268
268
  ), h = await Promise.all(
269
269
  e.components.tooltipContent.selectorStates.map(async (n) => {
270
270
  var o;
271
- const l = n.selectedSource, L = S(l), E = await v(t, l, s) ?? L, B = await k(t, l, s);
271
+ const l = n.selectedSource, I = S(l), E = await v(t, l, s) ?? I, B = await k(t, l, s);
272
272
  return {
273
273
  type: "column",
274
274
  label: await b(t, l, s) || l,
@@ -296,7 +296,7 @@ class te extends q {
296
296
  }), {
297
297
  type: "scatterplot",
298
298
  x: d,
299
- y: I,
299
+ y: L,
300
300
  keyColumn: A,
301
301
  facetBy: C,
302
302
  grouping: P,
@@ -1,8 +1,8 @@
1
1
  import m from "../../../../zod/lib/index.js";
2
2
  m.object({
3
3
  /** Included left border. */
4
- from: m.number(),
4
+ from: m.number().min(0),
5
5
  /** Excluded right border. */
6
- to: m.number()
6
+ to: m.number().min(1)
7
7
  });
8
8
  //# sourceMappingURL=blob.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blob.js","sources":["../../../../../../../../../../node_modules/@milaboratories/pf-plots/node_modules/@milaboratories/pl-model-common/src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less or equal than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number(),\n /** Excluded right border. */\n to: z.number(),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n return { from, to };\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.to < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /** Given the blob handle returns its content. Depending on the handle type,\n * content will be served from locally downloaded file, or directly from\n * remote platforma storage. */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n"],"names":["z"],"mappings":";AAyB0BA,EAAE,OAAO;AAAA;AAAA,EAEjC,MAAMA,EAAE,OAAA;AAAA;AAAA,EAER,IAAIA,EAAE,OAAA;AACP,CAAA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"blob.js","sources":["../../../../../../../../../../node_modules/@milaboratories/pf-plots/node_modules/@milaboratories/pl-model-common/src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, 'newRangeBytesOpt');\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(\n handle: LocalBlobHandle | RemoteBlobHandle,\n range?: RangeBytes,\n ): Promise<Uint8Array>;\n}\n"],"names":["z"],"mappings":";AAyB0BA,EAAE,OAAO;AAAA;AAAA,EAEjC,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA;AAAA,EAEtB,IAAIA,EAAE,OAAA,EAAS,IAAI,CAAC;AACrB,CAAA;","x_google_ignoreList":[0]}