@milaboratories/graph-maker 1.1.149 → 1.1.150

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 (21) hide show
  1. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.d.ts +1 -0
  2. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.d.ts.map +1 -1
  3. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js +97 -95
  4. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js.map +1 -1
  5. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.d.ts.map +1 -1
  6. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +111 -109
  7. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
  8. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.d.ts.map +1 -1
  9. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +84 -83
  10. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
  11. package/dist/GraphMaker/index.vue.js +33 -33
  12. package/dist/GraphMaker/index.vue.js.map +1 -1
  13. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  14. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js +25 -33
  15. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js.map +1 -1
  16. package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
  17. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +23 -23
  18. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
  19. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +18 -18
  20. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
  21. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- import { defineComponent as Z, computed as r, ref as S, createElementBlock as p, openBlock as d, createElementVNode as s, createVNode as a, withCtx as V, createCommentVNode as m, unref as o, createBlock as M } from "vue";
2
- import { PlBtnGroup as y, PlTextField as O, PlToggleSwitch as v, Slider as _ } from "@platforma-sdk/ui-vue";
1
+ import { defineComponent as Z, computed as r, ref as w, createElementBlock as p, openBlock as d, createElementVNode as s, createVNode as a, withCtx as V, createCommentVNode as m, unref as l, createBlock as M } from "vue";
2
+ import { PlBtnGroup as y, PlTextField as G, PlToggleSwitch as v, Slider as _ } from "@platforma-sdk/ui-vue";
3
3
  import { useStore as h } from "../../store.js";
4
- import G from "../../components/CollapsableBlock.vue.js";
5
- import C from "../../icons/Right.vue.js";
6
- import N from "../../icons/Down.vue.js";
4
+ import O from "../../components/CollapsableBlock.vue.js";
5
+ import N from "../../icons/Right.vue.js";
6
+ import C from "../../icons/Down.vue.js";
7
7
  import P from "../../components/BtnIconGroup.vue.js";
8
8
  import ee from "../../icons/AlignLeft.vue.js";
9
9
  import le from "../../icons/AlignCenter.vue.js";
@@ -41,10 +41,10 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
41
41
  }, ce = {
42
42
  key: 4,
43
43
  class: "axes-settings-options-row"
44
- }, Se = { class: "axes-settings-options-row block" }, we = { key: 5 }, ke = { class: "axes-settings-options-row table" }, Te = { class: "axes-settings-options-row table" }, Ae = { class: "axes-settings-options-row table" }, Ue = { class: "axes-settings-options-row block" }, Ie = { key: 0 }, Xe = { class: "axes-settings-options-row block" }, Oe = { class: "axes-settings-options-row table" }, Ge = { class: "axes-settings-options-row table" }, Ce = { class: "other" }, Ne = { class: "axes-settings-options-row" }, Pe = { class: "axes-settings-options-row" }, Re = { class: "axes-settings-options-row" }, Be = { class: "axes-settings-options-row block" }, ul = /* @__PURE__ */ Z({
44
+ }, we = { class: "axes-settings-options-row block" }, Se = { key: 5 }, ke = { class: "axes-settings-options-row table" }, Te = { class: "axes-settings-options-row table" }, Ae = { class: "axes-settings-options-row table" }, Xe = { class: "axes-settings-options-row block" }, Ue = { key: 0 }, Ie = { class: "axes-settings-options-row block" }, Ge = { class: "axes-settings-options-row table" }, Oe = { class: "axes-settings-options-row table" }, Ne = { class: "other" }, Ce = { class: "axes-settings-options-row" }, Pe = { class: "axes-settings-options-row" }, Re = { class: "axes-settings-options-row" }, Be = { class: "axes-settings-options-row block" }, ul = /* @__PURE__ */ Z({
45
45
  __name: "DiscreteAxesSettingsForm",
46
46
  setup(Fe) {
47
- const u = h(), t = u.value.reactive.axesSettings, w = {
47
+ const u = h(), t = u.value.reactive.axesSettings, S = {
48
48
  height: 40,
49
49
  horizontalPadding: 12,
50
50
  defaultState: "open"
@@ -69,28 +69,28 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
69
69
  { value: "bottom", icon: re },
70
70
  { value: "left-bottom", icon: de },
71
71
  { value: "full", icon: te }
72
- ], R = r(() => u.value.inputGuide.value), T = r(() => u.value.uniqueValuesData.value), A = S(!1), U = S(!1), g = r(() => {
72
+ ], R = r(() => u.value.inputGuide.value), T = r(() => u.value.uniqueValuesData.value), A = w(!1), X = w(!1), g = r(() => {
73
73
  var n, e;
74
74
  return (e = (n = u.value.reactive.optionsState.components.primaryGrouping) == null ? void 0 : n.selectorStates[0]) == null ? void 0 : e.selectedSource;
75
75
  }), f = r(() => {
76
76
  var n, e;
77
77
  return (e = (n = u.value.reactive.optionsState.components.secondaryGrouping) == null ? void 0 : n.selectorStates[0]) == null ? void 0 : e.selectedSource;
78
- }), b = r(() => u.value.commonHelpersData.primaryGroups.value), c = r(() => u.value.commonHelpersData.secondaryGroups.value), B = r(() => u.value.commonHelpersData.usedAesInMapping.value), F = S(u.value.reactive.dataBindAes[g.value] ?? q(b.value)), L = S(u.value.reactive.dataBindAes[f.value] ?? q(c.value)), I = r(() => {
78
+ }), b = r(() => u.value.commonHelpersData.primaryGroups.value), c = r(() => u.value.commonHelpersData.secondaryGroups.value), B = r(() => u.value.commonHelpersData.usedAesInMapping.value), F = w(u.value.reactive.dataBindAes[g.value] ?? q(b.value)), L = w(u.value.reactive.dataBindAes[f.value] ?? q(c.value)), U = r(() => {
79
79
  var n;
80
80
  if (g.value) {
81
- const e = R.value.getSourceInfo(g.value) ?? null, l = ((n = T.value[g.value]) == null ? void 0 : n.labels) ?? null;
81
+ const e = R.value.getSourceInfo(g.value) ?? null, o = ((n = T.value[g.value]) == null ? void 0 : n.labels) ?? null;
82
82
  return {
83
83
  selectedSourceInfo: e,
84
- labels: b.value.reduce((i, x) => (i[x] = (l == null ? void 0 : l[x]) ?? String(x), i), {})
84
+ labels: b.value.reduce((i, x) => (i[x] = (o == null ? void 0 : o[x]) ?? String(x), i), {})
85
85
  };
86
86
  }
87
- }), X = r(() => {
87
+ }), I = r(() => {
88
88
  var n;
89
89
  if (f.value) {
90
- const e = R.value.getSourceInfo(f.value) ?? null, l = ((n = T.value[f.value]) == null ? void 0 : n.labels) ?? null;
90
+ const e = R.value.getSourceInfo(f.value) ?? null, o = ((n = T.value[f.value]) == null ? void 0 : n.labels) ?? null;
91
91
  return {
92
92
  selectedSourceInfo: e,
93
- labels: c.value.reduce((i, x) => (i[x] = (l == null ? void 0 : l[x]) ?? String(x), i), {})
93
+ labels: c.value.reduce((i, x) => (i[x] = (o == null ? void 0 : o[x]) ?? String(x), i), {})
94
94
  };
95
95
  }
96
96
  });
@@ -113,80 +113,81 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
113
113
  });
114
114
  return (n, e) => (d(), p("div", {
115
115
  class: "axes-form",
116
- onClick: e[28] || (e[28] = (l) => l.stopPropagation())
116
+ onClick: e[28] || (e[28] = (o) => o.stopPropagation())
117
117
  }, [
118
118
  e[42] || (e[42] = s("h3", { class: "axes-title" }, " Axes ", -1)),
119
119
  s("div", pe, [
120
- a(G, {
120
+ a(O, {
121
121
  title: "Title",
122
- settings: w,
123
- icon: C,
124
- "icon-open": N
122
+ settings: S,
123
+ icon: N,
124
+ "icon-open": C
125
125
  }, {
126
126
  default: V(() => [
127
127
  s("div", ve, [
128
- a(o(y), {
128
+ a(l(y), {
129
129
  label: "Title",
130
130
  options: k,
131
- modelValue: o(t).title.mode,
132
- "onUpdate:modelValue": e[0] || (e[0] = (l) => o(t).title.mode = l)
131
+ modelValue: l(t).title.mode,
132
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => l(t).title.mode = o)
133
133
  }, null, 8, ["modelValue"])
134
134
  ]),
135
- o(t).title.mode === "custom" ? (d(), p("div", ge, [
136
- a(o(O), {
135
+ l(t).title.mode === "custom" ? (d(), p("div", ge, [
136
+ a(l(G), {
137
137
  label: "Chart title",
138
138
  placeholder: "Chart title",
139
- modelValue: o(t).title.value,
140
- "onUpdate:modelValue": e[1] || (e[1] = (l) => o(t).title.value = l)
139
+ modelValue: l(t).title.value,
140
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => l(t).title.value = o)
141
141
  }, null, 8, ["modelValue"])
142
142
  ])) : m("", !0),
143
143
  s("div", xe, [
144
144
  e[29] || (e[29] = s("span", null, "Alignment", -1)),
145
145
  a(P, {
146
146
  options: z,
147
- modelValue: o(t).title.position,
148
- "onUpdate:modelValue": e[2] || (e[2] = (l) => o(t).title.position = l)
147
+ modelValue: l(t).title.position,
148
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => l(t).title.position = o)
149
149
  }, null, 8, ["modelValue"])
150
150
  ])
151
151
  ]),
152
152
  _: 1
153
153
  }),
154
- a(G, {
154
+ a(O, {
155
155
  title: "X-axis",
156
- settings: w,
157
- icon: C,
158
- "icon-open": N
156
+ settings: S,
157
+ icon: N,
158
+ "icon-open": C
159
159
  }, {
160
160
  default: V(() => [
161
161
  b.value.length > 1 ? (d(), p("div", fe, [
162
162
  e[30] || (e[30] = s("span", null, "Primary groups order: ", -1)),
163
163
  a(D, {
164
164
  data: { type: "data", value: null },
165
- onClick: e[3] || (e[3] = (l) => {
165
+ onClick: e[3] || (e[3] = (o) => {
166
166
  A.value = !0;
167
167
  })
168
168
  }),
169
- A.value && I.value ? (d(), M($, {
169
+ A.value && U.value ? (d(), M($, {
170
170
  key: 0,
171
171
  title: "Reorder primary groups",
172
172
  "back-title": "Axes Settings",
173
- "onForm:close": e[6] || (e[6] = (l) => A.value = !1)
173
+ "onForm:close": e[6] || (e[6] = (o) => A.value = !1)
174
174
  }, {
175
175
  default: V(() => {
176
- var l;
176
+ var o;
177
177
  return [
178
178
  a(H, {
179
- "column-value-labels": I.value.labels,
180
- "data-column-label": ((l = I.value.selectedSourceInfo) == null ? void 0 : l.label) ?? "",
179
+ "column-value-labels": U.value.labels,
180
+ "data-column-label": ((o = U.value.selectedSourceInfo) == null ? void 0 : o.label) ?? "",
181
181
  "used-aes-in-mapping": B.value[g.value],
182
182
  "allow-reordering": "",
183
183
  "allow-hiding": "",
184
+ "allow-null-option": l(t).axisX.allowNullPrimaryGroups,
184
185
  modelValue: F.value,
185
186
  "onUpdate:modelValue": [
186
187
  e[4] || (e[4] = (i) => F.value = i),
187
188
  e[5] || (e[5] = (i) => Y(i, g.value))
188
189
  ]
189
- }, null, 8, ["column-value-labels", "data-column-label", "used-aes-in-mapping", "modelValue"])
190
+ }, null, 8, ["column-value-labels", "data-column-label", "used-aes-in-mapping", "allow-null-option", "modelValue"])
190
191
  ];
191
192
  }),
192
193
  _: 1
@@ -194,40 +195,41 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
194
195
  ])) : m("", !0),
195
196
  b.value.length > 1 ? (d(), p("div", Ve, [
196
197
  e[31] || (e[31] = s("span", null, "Allow null primary group", -1)),
197
- a(o(v), {
198
- modelValue: o(t).axisX.allowNullPrimaryGroups,
199
- "onUpdate:modelValue": e[7] || (e[7] = (l) => o(t).axisX.allowNullPrimaryGroups = l)
198
+ a(l(v), {
199
+ modelValue: l(t).axisX.allowNullPrimaryGroups,
200
+ "onUpdate:modelValue": e[7] || (e[7] = (o) => l(t).axisX.allowNullPrimaryGroups = o)
200
201
  }, null, 8, ["modelValue"])
201
202
  ])) : m("", !0),
202
203
  c.value.length > 1 ? (d(), p("div", ye, [
203
204
  e[32] || (e[32] = s("span", null, "Secondary groups order: ", -1)),
204
205
  a(D, {
205
206
  data: { type: "data", value: null },
206
- onClick: e[8] || (e[8] = (l) => {
207
- U.value = !0;
207
+ onClick: e[8] || (e[8] = (o) => {
208
+ X.value = !0;
208
209
  })
209
210
  }),
210
- U.value && X.value ? (d(), M($, {
211
+ X.value && I.value ? (d(), M($, {
211
212
  key: 0,
212
213
  title: "Reorder secondary groups",
213
214
  "back-title": "Axes Settings",
214
- "onForm:close": e[11] || (e[11] = (l) => U.value = !1)
215
+ "onForm:close": e[11] || (e[11] = (o) => X.value = !1)
215
216
  }, {
216
217
  default: V(() => {
217
- var l;
218
+ var o;
218
219
  return [
219
220
  a(H, {
220
- "column-value-labels": X.value.labels,
221
- "data-column-label": ((l = X.value.selectedSourceInfo) == null ? void 0 : l.label) ?? "",
221
+ "column-value-labels": I.value.labels,
222
+ "data-column-label": ((o = I.value.selectedSourceInfo) == null ? void 0 : o.label) ?? "",
222
223
  "used-aes-in-mapping": B.value[f.value],
223
224
  "allow-reordering": "",
224
225
  "allow-hiding": "",
226
+ "allow-null-option": l(t).axisX.allowNullSecondaryGroups,
225
227
  modelValue: L.value,
226
228
  "onUpdate:modelValue": [
227
229
  e[9] || (e[9] = (i) => L.value = i),
228
230
  e[10] || (e[10] = (i) => Y(i, f.value))
229
231
  ]
230
- }, null, 8, ["column-value-labels", "data-column-label", "used-aes-in-mapping", "modelValue"])
232
+ }, null, 8, ["column-value-labels", "data-column-label", "used-aes-in-mapping", "allow-null-option", "modelValue"])
231
233
  ];
232
234
  }),
233
235
  _: 1
@@ -235,125 +237,125 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
235
237
  ])) : m("", !0),
236
238
  c.value.length > 1 ? (d(), p("div", be, [
237
239
  e[33] || (e[33] = s("span", null, "Allow null secondary group", -1)),
238
- a(o(v), {
239
- modelValue: o(t).axisX.allowNullSecondaryGroups,
240
- "onUpdate:modelValue": e[12] || (e[12] = (l) => o(t).axisX.allowNullSecondaryGroups = l)
240
+ a(l(v), {
241
+ modelValue: l(t).axisX.allowNullSecondaryGroups,
242
+ "onUpdate:modelValue": e[12] || (e[12] = (o) => l(t).axisX.allowNullSecondaryGroups = o)
241
243
  }, null, 8, ["modelValue"])
242
244
  ])) : m("", !0),
243
- o(u).reactive.chartType === "discrete" ? (d(), p("div", ce, [
245
+ l(u).reactive.chartType === "discrete" ? (d(), p("div", ce, [
244
246
  e[34] || (e[34] = s("span", null, "Labels rotation", -1)),
245
247
  a(P, {
246
248
  options: j,
247
249
  modelValue: E.value,
248
- "onUpdate:modelValue": e[13] || (e[13] = (l) => E.value = l)
250
+ "onUpdate:modelValue": e[13] || (e[13] = (o) => E.value = o)
249
251
  }, null, 8, ["modelValue"])
250
252
  ])) : m("", !0),
251
- s("div", Se, [
252
- a(o(y), {
253
+ s("div", we, [
254
+ a(l(y), {
253
255
  label: "Title",
254
256
  options: k,
255
- modelValue: o(t).axisX.titleMode,
256
- "onUpdate:modelValue": e[14] || (e[14] = (l) => o(t).axisX.titleMode = l)
257
+ modelValue: l(t).axisX.titleMode,
258
+ "onUpdate:modelValue": e[14] || (e[14] = (o) => l(t).axisX.titleMode = o)
257
259
  }, null, 8, ["modelValue"])
258
260
  ]),
259
- o(t).axisX.titleMode === "custom" ? (d(), p("div", we, [
260
- a(o(O), {
261
+ l(t).axisX.titleMode === "custom" ? (d(), p("div", Se, [
262
+ a(l(G), {
261
263
  label: "Text",
262
264
  placeholder: "Type",
263
- modelValue: o(t).axisX.customTitle,
264
- "onUpdate:modelValue": e[15] || (e[15] = (l) => o(t).axisX.customTitle = l)
265
+ modelValue: l(t).axisX.customTitle,
266
+ "onUpdate:modelValue": e[15] || (e[15] = (o) => l(t).axisX.customTitle = o)
265
267
  }, null, 8, ["modelValue"])
266
268
  ])) : m("", !0),
267
269
  s("div", ke, [
268
270
  e[35] || (e[35] = s("span", null, "Gridlines", -1)),
269
- a(o(v), {
270
- modelValue: o(t).axisX.gridlines,
271
- "onUpdate:modelValue": e[16] || (e[16] = (l) => o(t).axisX.gridlines = l)
271
+ a(l(v), {
272
+ modelValue: l(t).axisX.gridlines,
273
+ "onUpdate:modelValue": e[16] || (e[16] = (o) => l(t).axisX.gridlines = o)
272
274
  }, null, 8, ["modelValue"])
273
275
  ]),
274
276
  s("div", Te, [
275
277
  e[36] || (e[36] = s("span", null, "Lines between categories", -1)),
276
- a(o(v), {
277
- modelValue: o(t).axisX.linesBetweenCategories,
278
- "onUpdate:modelValue": e[17] || (e[17] = (l) => o(t).axisX.linesBetweenCategories = l)
278
+ a(l(v), {
279
+ modelValue: l(t).axisX.linesBetweenCategories,
280
+ "onUpdate:modelValue": e[17] || (e[17] = (o) => l(t).axisX.linesBetweenCategories = o)
279
281
  }, null, 8, ["modelValue"])
280
282
  ]),
281
283
  s("div", Ae, [
282
284
  e[37] || (e[37] = s("span", null, "Ticks", -1)),
283
- a(o(v), {
284
- modelValue: o(t).axisX.ticks,
285
- "onUpdate:modelValue": e[18] || (e[18] = (l) => o(t).axisX.ticks = l)
285
+ a(l(v), {
286
+ modelValue: l(t).axisX.ticks,
287
+ "onUpdate:modelValue": e[18] || (e[18] = (o) => l(t).axisX.ticks = o)
286
288
  }, null, 8, ["modelValue"])
287
289
  ])
288
290
  ]),
289
291
  _: 1
290
292
  }),
291
- a(G, {
293
+ a(O, {
292
294
  title: "Y-axis",
293
- settings: w,
294
- icon: C,
295
- "icon-open": N
295
+ settings: S,
296
+ icon: N,
297
+ "icon-open": C
296
298
  }, {
297
299
  default: V(() => [
298
- s("div", Ue, [
299
- a(o(y), {
300
+ s("div", Xe, [
301
+ a(l(y), {
300
302
  label: "Title",
301
303
  options: k,
302
- modelValue: o(t).axisY.titleMode,
303
- "onUpdate:modelValue": e[19] || (e[19] = (l) => o(t).axisY.titleMode = l)
304
+ modelValue: l(t).axisY.titleMode,
305
+ "onUpdate:modelValue": e[19] || (e[19] = (o) => l(t).axisY.titleMode = o)
304
306
  }, null, 8, ["modelValue"])
305
307
  ]),
306
- o(t).axisY.titleMode === "custom" ? (d(), p("div", Ie, [
307
- a(o(O), {
308
+ l(t).axisY.titleMode === "custom" ? (d(), p("div", Ue, [
309
+ a(l(G), {
308
310
  label: "Text",
309
311
  placeholder: "Type",
310
- modelValue: o(t).axisY.customTitle,
311
- "onUpdate:modelValue": e[20] || (e[20] = (l) => o(t).axisY.customTitle = l)
312
+ modelValue: l(t).axisY.customTitle,
313
+ "onUpdate:modelValue": e[20] || (e[20] = (o) => l(t).axisY.customTitle = o)
312
314
  }, null, 8, ["modelValue"])
313
315
  ])) : m("", !0),
314
- s("div", Xe, [
315
- a(o(y), {
316
+ s("div", Ie, [
317
+ a(l(y), {
316
318
  label: "Scale",
317
319
  options: J,
318
- modelValue: o(t).axisY.scale,
319
- "onUpdate:modelValue": e[21] || (e[21] = (l) => o(t).axisY.scale = l)
320
+ modelValue: l(t).axisY.scale,
321
+ "onUpdate:modelValue": e[21] || (e[21] = (o) => l(t).axisY.scale = o)
320
322
  }, null, 8, ["modelValue"])
321
323
  ]),
322
- s("div", Oe, [
324
+ s("div", Ge, [
323
325
  e[38] || (e[38] = s("span", null, "Gridlines", -1)),
324
- a(o(v), {
325
- modelValue: o(t).axisY.gridlines,
326
- "onUpdate:modelValue": e[22] || (e[22] = (l) => o(t).axisY.gridlines = l)
326
+ a(l(v), {
327
+ modelValue: l(t).axisY.gridlines,
328
+ "onUpdate:modelValue": e[22] || (e[22] = (o) => l(t).axisY.gridlines = o)
327
329
  }, null, 8, ["modelValue"])
328
330
  ]),
329
- s("div", Ge, [
331
+ s("div", Oe, [
330
332
  e[39] || (e[39] = s("span", null, "Ticks", -1)),
331
- a(o(v), {
332
- modelValue: o(t).axisY.ticks,
333
- "onUpdate:modelValue": e[23] || (e[23] = (l) => o(t).axisY.ticks = l)
333
+ a(l(v), {
334
+ modelValue: l(t).axisY.ticks,
335
+ "onUpdate:modelValue": e[23] || (e[23] = (o) => l(t).axisY.ticks = o)
334
336
  }, null, 8, ["modelValue"])
335
337
  ])
336
338
  ]),
337
339
  _: 1
338
340
  }),
339
- s("div", Ce, [
340
- s("div", Ne, [
341
+ s("div", Ne, [
342
+ s("div", Ce, [
341
343
  e[40] || (e[40] = s("span", null, "Frame", -1)),
342
344
  a(P, {
343
345
  options: K,
344
- modelValue: o(t).other.frame,
345
- "onUpdate:modelValue": e[24] || (e[24] = (l) => o(t).other.frame = l)
346
+ modelValue: l(t).other.frame,
347
+ "onUpdate:modelValue": e[24] || (e[24] = (o) => l(t).other.frame = o)
346
348
  }, null, 8, ["modelValue"])
347
349
  ]),
348
350
  s("div", Pe, [
349
351
  e[41] || (e[41] = s("span", null, "Reverse axes", -1)),
350
- a(o(v), {
351
- modelValue: o(t).other.reverse,
352
- "onUpdate:modelValue": e[25] || (e[25] = (l) => o(t).other.reverse = l)
352
+ a(l(v), {
353
+ modelValue: l(t).other.reverse,
354
+ "onUpdate:modelValue": e[25] || (e[25] = (o) => l(t).other.reverse = o)
353
355
  }, null, 8, ["modelValue"])
354
356
  ]),
355
357
  s("div", Re, [
356
- a(o(_), {
358
+ a(l(_), {
357
359
  style: { width: "100%" },
358
360
  label: "Facet column count",
359
361
  min: 1,
@@ -361,16 +363,16 @@ const pe = { class: "axes-settings-list" }, ve = { class: "axes-settings-options
361
363
  step: 1,
362
364
  breakpoints: !0,
363
365
  mode: "input",
364
- modelValue: o(t).other.facetColumns,
365
- "onUpdate:modelValue": e[26] || (e[26] = (l) => o(t).other.facetColumns = l)
366
+ modelValue: l(t).other.facetColumns,
367
+ "onUpdate:modelValue": e[26] || (e[26] = (o) => l(t).other.facetColumns = o)
366
368
  }, null, 8, ["modelValue"])
367
369
  ]),
368
370
  s("div", Be, [
369
- a(o(y), {
371
+ a(l(y), {
370
372
  label: "Facet shared by",
371
373
  options: Q,
372
- modelValue: o(t).other.facetSharedBy,
373
- "onUpdate:modelValue": e[27] || (e[27] = (l) => o(t).other.facetSharedBy = l)
374
+ modelValue: l(t).other.facetSharedBy,
375
+ "onUpdate:modelValue": e[27] || (e[27] = (o) => l(t).other.facetSharedBy = o)
374
376
  }, null, 8, ["modelValue"])
375
377
  ])
376
378
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"DiscreteAxesSettingsForm.vue.js","sources":["../../../../src/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { Slider, PlToggleSwitch } from '@platforma-sdk/ui-vue';\nimport { useStore } from '../../store';\nimport CollapsableBlock from '../../components/CollapsableBlock.vue';\nimport Right from '../../icons/Right.vue';\nimport Down from '../../icons/Down.vue';\nimport { PlTextField, PlBtnGroup } from '@platforma-sdk/ui-vue';\nimport BtnIconGroup from '../../components/BtnIconGroup.vue';\nimport AlignLeft from '../../icons/AlignLeft.vue';\nimport AlignCenter from '../../icons/AlignCenter.vue';\nimport AlignRight from '../../icons/AlignRight.vue';\nimport FrameFull from '../../icons/FrameFull.vue';\nimport FrameEmpty from '../../icons/FrameEmpty.vue';\nimport Rotation0 from '../../icons/Rotation0.vue';\nimport Rotation45 from '../../icons/Rotation45.vue';\nimport Rotation90 from '../../icons/Rotation90.vue';\nimport FrameLeft from '../../icons/FrameLeft.vue';\nimport FrameBottom from '../../icons/FrameBottom.vue';\nimport FrameLeftBottom from '../../icons/FrameLeftBottom.vue';\nimport AesButton from '../../components/AesButton.vue';\nimport FormWrapper from '../../components/AesSettings/FormWrapper.vue';\nimport { computed, ref } from 'vue';\nimport AesDataMapping from '../../components/AesSettings/AesDataMappingDiscrete.vue';\nimport { AestheticMappingCategorical, createDefaultMapping } from '../../dataBindAes';\nimport { LabelsRotation } from '../../types';\nimport { getDiscreteLabelsRotation } from '../../utils';\n\nconst store = useStore();\nconst settings = store.value.reactive.axesSettings;\nconst blockSettings = {\n height: 40,\n horizontalPadding: 12,\n defaultState: 'open' as 'open' | 'close'\n};\n\nconst OPTIONS_TITLE_ALIGN = [\n {value: 'left', icon: AlignLeft},\n {value: 'center', icon: AlignCenter},\n {value: 'right', icon: AlignRight},\n]\n// const OPTIONS_FACET_FRAME = [\n// {value: 'empty', icon: FrameEmpty},\n// {value: 'full', icon: FrameFull},\n// ]\nconst OPTIONS_LABELS_ROTATION = [\n { value: 'center', icon: Rotation0 },\n { value: '45deg', icon: Rotation45 },\n { value: '90deg', icon: Rotation90 }\n];\nconst OPTIONS_AXIS_LABEL_MODE = [\n { value: 'auto', text: 'Auto' },\n { value: 'custom', text: 'Custom' },\n { value: 'hidden', text: 'Hide' }\n];\nconst OPTIONS_SCALE = [\n { value: 'linear', text: 'Linear' },\n { value: 'log', text: 'Log' }\n];\nconst OPTIONS_CHART_FRAME = [\n { value: 'empty', icon: FrameEmpty },\n { value: 'left', icon: FrameLeft },\n { value: 'bottom', icon: FrameBottom },\n { value: 'left-bottom', icon: FrameLeftBottom },\n { value: 'full', icon: FrameFull }\n];\n\nconst inputGuide = computed(() => store.value.inputGuide.value)\nconst labelsInfo = computed(() => store.value.uniqueValuesData.value)\n\nconst reorderPrimaryOpen = ref(false);\nconst reorderSecondaryOpen = ref(false);\n\nconst primaryGrouping = computed(() => store.value.reactive.optionsState.components.primaryGrouping?.selectorStates[0]?.selectedSource);\nconst secondaryGrouping = computed(() => store.value.reactive.optionsState.components.secondaryGrouping?.selectorStates[0]?.selectedSource);\n\nconst primaryGroups = computed(() => store.value.commonHelpersData.primaryGroups.value)\nconst secondaryGroups = computed(() => store.value.commonHelpersData.secondaryGroups.value)\n\nconst usedAesInMapping = computed(() => store.value.commonHelpersData.usedAesInMapping.value);\n\nconst mappingPrimary = ref(store.value.reactive.dataBindAes[primaryGrouping.value] as AestheticMappingCategorical ?? createDefaultMapping(primaryGroups.value));\nconst mappingSecondary = ref(store.value.reactive.dataBindAes[secondaryGrouping.value] as AestheticMappingCategorical ?? createDefaultMapping(secondaryGroups.value));\n\nconst primaryInfo = computed(() => {\n if (primaryGrouping.value) {\n const selectedSourceInfo = inputGuide.value.getSourceInfo(primaryGrouping.value) ?? null;\n const valueLabels = labelsInfo.value[primaryGrouping.value]?.labels ?? null;\n return {\n selectedSourceInfo,\n labels: primaryGroups.value.reduce((res: Record<string, string>, v) => {\n res[v] = valueLabels?.[v] ?? String(v);\n return res;\n }, {})\n };\n }\n});\nconst secondaryInfo = computed(() => {\n if (secondaryGrouping.value) {\n const selectedSourceInfo = inputGuide.value.getSourceInfo(secondaryGrouping.value) ?? null;\n const valueLabels = labelsInfo.value[secondaryGrouping.value]?.labels ?? null;\n return {\n selectedSourceInfo,\n labels: secondaryGroups.value.reduce((res: Record<string, string>, v) => {\n res[v] = valueLabels?.[v] ?? String(v);\n return res;\n }, {})\n };\n }\n});\n\nfunction updateOrder(value: AestheticMappingCategorical, sourceId: string) {\n store.value.reactive.dataBindAes[sourceId] = value;\n}\n\nconst OPTIONS_FACET_SHARED = [\n { text: 'X', value: 'x' },\n { text: 'Y', value: 'y' },\n { text: 'XY', value: 'xy' },\n { text: 'None', value: 'none' }\n];\n\nconst primaryOptions = computed(() => labelsInfo.value[primaryGrouping.value])\nconst xLabelsRotation = computed({\n get(){\n return getDiscreteLabelsRotation(settings.axisX.labelsRotation, primaryOptions.value?.options)\n },\n set(value:LabelsRotation) {\n settings.axisX.labelsRotation = value;\n }\n})\n</script>\n\n<template>\n <div class=\"axes-form\" @click=\"(e) => e.stopPropagation()\">\n <h3 class=\"axes-title\">\n Axes\n </h3>\n <div class=\"axes-settings-list\">\n <!-- Chart title -->\n <collapsable-block title=\"Title\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.title.mode\"\n />\n </div>\n <div class=\"axes-settings-input\" v-if=\"settings.title.mode === 'custom'\">\n <pl-text-field\n label=\"Chart title\"\n placeholder=\"Chart title\"\n v-model=\"settings.title.value\"\n />\n </div>\n <div class=\"axes-settings-options-row\">\n <span>Alignment</span>\n <btn-icon-group :options=\"OPTIONS_TITLE_ALIGN\" v-model=\"settings.title.position\"/>\n </div>\n<!-- <div class=\"axes-settings-options-row\">-->\n<!-- <span>Facet frame style</span>-->\n<!-- <btn-icon-group :options=\"OPTIONS_FACET_FRAME\" v-model=\"settings.title.facetTitleFrame\"/>-->\n<!-- </div>-->\n </collapsable-block>\n <!-- X axis settings-->\n <collapsable-block title=\"X-axis\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row\" v-if=\"primaryGroups.length > 1\">\n <span>Primary groups order: </span>\n <aes-button :data=\"{type: 'data', value: null}\" @click=\"reorderPrimaryOpen = true;\" />\n <template v-if=\"reorderPrimaryOpen && primaryInfo\">\n <form-wrapper\n title=\"Reorder primary groups\"\n back-title=\"Axes Settings\"\n @form:close=\"reorderPrimaryOpen = false\"\n >\n <aes-data-mapping\n :column-value-labels=\"primaryInfo.labels\"\n :data-column-label=\"primaryInfo.selectedSourceInfo?.label ?? ''\"\n :used-aes-in-mapping=\"usedAesInMapping[primaryGrouping]\"\n allow-reordering\n allow-hiding\n v-model=\"mappingPrimary\"\n @update:modelValue=\"(value:AestheticMappingCategorical) => updateOrder(value, primaryGrouping)\"\n />\n </form-wrapper>\n </template>\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"primaryGroups.length > 1\">\n <span>Allow null primary group</span>\n <pl-toggle-switch v-model=\"settings.axisX.allowNullPrimaryGroups\" />\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"secondaryGroups.length > 1\">\n <span>Secondary groups order: </span>\n <aes-button :data=\"{type: 'data', value: null}\" @click=\"reorderSecondaryOpen = true;\" />\n <template v-if=\"reorderSecondaryOpen && secondaryInfo\">\n <form-wrapper\n title=\"Reorder secondary groups\"\n back-title=\"Axes Settings\"\n @form:close=\"reorderSecondaryOpen = false\"\n >\n <aes-data-mapping\n :column-value-labels=\"secondaryInfo.labels\"\n :data-column-label=\"secondaryInfo.selectedSourceInfo?.label ?? ''\"\n :used-aes-in-mapping=\"usedAesInMapping[secondaryGrouping]\"\n allow-reordering\n allow-hiding\n v-model=\"mappingSecondary\"\n @update:modelValue=\"(value:AestheticMappingCategorical) => updateOrder(value, secondaryGrouping)\"\n />\n </form-wrapper>\n </template>\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"secondaryGroups.length > 1\">\n <span>Allow null secondary group</span>\n <pl-toggle-switch v-model=\"settings.axisX.allowNullSecondaryGroups\" />\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"store.reactive.chartType === 'discrete'\">\n <span>Labels rotation</span>\n <btn-icon-group :options=\"OPTIONS_LABELS_ROTATION\" v-model=\"xLabelsRotation\" />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.axisX.titleMode\"\n />\n </div>\n <div v-if=\"settings.axisX.titleMode === 'custom'\">\n <pl-text-field\n label=\"Text\"\n placeholder=\"Type\"\n v-model=\"settings.axisX.customTitle\"\n />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Gridlines</span>\n <pl-toggle-switch v-model=\"settings.axisX.gridlines\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Lines between categories</span>\n <pl-toggle-switch v-model=\"settings.axisX.linesBetweenCategories\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Ticks</span>\n <pl-toggle-switch v-model=\"settings.axisX.ticks\" />\n </div>\n </collapsable-block>\n <!-- Y axis settings-->\n <collapsable-block title=\"Y-axis\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.axisY.titleMode\"\n />\n </div>\n <div v-if=\"settings.axisY.titleMode === 'custom'\">\n <pl-text-field\n label=\"Text\"\n placeholder=\"Type\"\n v-model=\"settings.axisY.customTitle\"\n />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Scale\"\n :options=\"OPTIONS_SCALE\"\n v-model=\"settings.axisY.scale\"\n />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Gridlines</span>\n <pl-toggle-switch v-model=\"settings.axisY.gridlines\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Ticks</span>\n <pl-toggle-switch v-model=\"settings.axisY.ticks\" />\n </div>\n </collapsable-block>\n <!-- Facet settings-->\n <div class=\"other\">\n <div class=\"axes-settings-options-row\">\n <span>Frame</span>\n <btn-icon-group :options=\"OPTIONS_CHART_FRAME\" v-model=\"settings.other.frame\" />\n </div>\n <div class=\"axes-settings-options-row\">\n <span>Reverse axes</span>\n <pl-toggle-switch v-model=\"settings.other.reverse\" />\n </div>\n <div class=\"axes-settings-options-row\">\n <Slider\n :style=\"{width: '100%'}\"\n label=\"Facet column count\"\n :min=\"1\"\n :max=\"6\"\n :step=\"1\"\n :breakpoints=\"true\"\n mode=\"input\"\n v-model=\"settings.other.facetColumns\"\n />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Facet shared by\"\n :options=\"OPTIONS_FACET_SHARED\"\n v-model=\"settings.other.facetSharedBy\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["store","useStore","settings","blockSettings","OPTIONS_TITLE_ALIGN","AlignLeft","AlignCenter","AlignRight","OPTIONS_LABELS_ROTATION","Rotation0","Rotation45","Rotation90","OPTIONS_AXIS_LABEL_MODE","OPTIONS_SCALE","OPTIONS_CHART_FRAME","FrameEmpty","FrameLeft","FrameBottom","FrameLeftBottom","FrameFull","inputGuide","computed","labelsInfo","reorderPrimaryOpen","ref","reorderSecondaryOpen","primaryGrouping","_b","_a","secondaryGrouping","primaryGroups","secondaryGroups","usedAesInMapping","mappingPrimary","createDefaultMapping","mappingSecondary","primaryInfo","selectedSourceInfo","valueLabels","res","v","secondaryInfo","updateOrder","value","sourceId","OPTIONS_FACET_SHARED","primaryOptions","xLabelsRotation","getDiscreteLabelsRotation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,UAAMA,IAAQC,EAAA,GACRC,IAAWF,EAAM,MAAM,SAAS,cAChCG,IAAgB;AAAA,MACpB,QAAQ;AAAA,MACR,mBAAmB;AAAA,MACnB,cAAc;AAAA,IAAA,GAGVC,IAAsB;AAAA,MAC1B,EAAC,OAAO,QAAQ,MAAMC,GAAA;AAAA,MACtB,EAAC,OAAO,UAAU,MAAMC,GAAA;AAAA,MACxB,EAAC,OAAO,SAAS,MAAMC,GAAA;AAAA,IAAU,GAM7BC,IAA0B;AAAA,MAC9B,EAAE,OAAO,UAAU,MAAMC,GAAA;AAAA,MACzB,EAAE,OAAO,SAAS,MAAMC,GAAA;AAAA,MACxB,EAAE,OAAO,SAAS,MAAMC,GAAA;AAAA,IAAW,GAE/BC,IAA0B;AAAA,MAC9B,EAAE,OAAO,QAAQ,MAAM,OAAA;AAAA,MACvB,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,MACzB,EAAE,OAAO,UAAU,MAAM,OAAA;AAAA,IAAO,GAE5BC,IAAgB;AAAA,MACpB,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,MACzB,EAAE,OAAO,OAAO,MAAM,MAAA;AAAA,IAAM,GAExBC,IAAsB;AAAA,MAC1B,EAAE,OAAO,SAAS,MAAMC,GAAA;AAAA,MACxB,EAAE,OAAO,QAAQ,MAAMC,GAAA;AAAA,MACvB,EAAE,OAAO,UAAU,MAAMC,GAAA;AAAA,MACzB,EAAE,OAAO,eAAe,MAAMC,GAAA;AAAA,MAC9B,EAAE,OAAO,QAAQ,MAAMC,GAAA;AAAA,IAAU,GAG7BC,IAAaC,EAAS,MAAMrB,EAAM,MAAM,WAAW,KAAK,GACxDsB,IAAaD,EAAS,MAAMrB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DiscreteAxesSettingsForm.vue.js","sources":["../../../../src/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { Slider, PlToggleSwitch } from '@platforma-sdk/ui-vue';\nimport { useStore } from '../../store';\nimport CollapsableBlock from '../../components/CollapsableBlock.vue';\nimport Right from '../../icons/Right.vue';\nimport Down from '../../icons/Down.vue';\nimport { PlTextField, PlBtnGroup } from '@platforma-sdk/ui-vue';\nimport BtnIconGroup from '../../components/BtnIconGroup.vue';\nimport AlignLeft from '../../icons/AlignLeft.vue';\nimport AlignCenter from '../../icons/AlignCenter.vue';\nimport AlignRight from '../../icons/AlignRight.vue';\nimport FrameFull from '../../icons/FrameFull.vue';\nimport FrameEmpty from '../../icons/FrameEmpty.vue';\nimport Rotation0 from '../../icons/Rotation0.vue';\nimport Rotation45 from '../../icons/Rotation45.vue';\nimport Rotation90 from '../../icons/Rotation90.vue';\nimport FrameLeft from '../../icons/FrameLeft.vue';\nimport FrameBottom from '../../icons/FrameBottom.vue';\nimport FrameLeftBottom from '../../icons/FrameLeftBottom.vue';\nimport AesButton from '../../components/AesButton.vue';\nimport FormWrapper from '../../components/AesSettings/FormWrapper.vue';\nimport { computed, ref } from 'vue';\nimport AesDataMapping from '../../components/AesSettings/AesDataMappingDiscrete.vue';\nimport { AestheticMappingCategorical, createDefaultMapping } from '../../dataBindAes';\nimport { LabelsRotation } from '../../types';\nimport { getDiscreteLabelsRotation } from '../../utils';\n\nconst store = useStore();\nconst settings = store.value.reactive.axesSettings;\nconst blockSettings = {\n height: 40,\n horizontalPadding: 12,\n defaultState: 'open' as 'open' | 'close'\n};\n\nconst OPTIONS_TITLE_ALIGN = [\n {value: 'left', icon: AlignLeft},\n {value: 'center', icon: AlignCenter},\n {value: 'right', icon: AlignRight},\n]\n// const OPTIONS_FACET_FRAME = [\n// {value: 'empty', icon: FrameEmpty},\n// {value: 'full', icon: FrameFull},\n// ]\nconst OPTIONS_LABELS_ROTATION = [\n { value: 'center', icon: Rotation0 },\n { value: '45deg', icon: Rotation45 },\n { value: '90deg', icon: Rotation90 }\n];\nconst OPTIONS_AXIS_LABEL_MODE = [\n { value: 'auto', text: 'Auto' },\n { value: 'custom', text: 'Custom' },\n { value: 'hidden', text: 'Hide' }\n];\nconst OPTIONS_SCALE = [\n { value: 'linear', text: 'Linear' },\n { value: 'log', text: 'Log' }\n];\nconst OPTIONS_CHART_FRAME = [\n { value: 'empty', icon: FrameEmpty },\n { value: 'left', icon: FrameLeft },\n { value: 'bottom', icon: FrameBottom },\n { value: 'left-bottom', icon: FrameLeftBottom },\n { value: 'full', icon: FrameFull }\n];\n\nconst inputGuide = computed(() => store.value.inputGuide.value)\nconst labelsInfo = computed(() => store.value.uniqueValuesData.value)\n\nconst reorderPrimaryOpen = ref(false);\nconst reorderSecondaryOpen = ref(false);\n\nconst primaryGrouping = computed(() => store.value.reactive.optionsState.components.primaryGrouping?.selectorStates[0]?.selectedSource);\nconst secondaryGrouping = computed(() => store.value.reactive.optionsState.components.secondaryGrouping?.selectorStates[0]?.selectedSource);\n\nconst primaryGroups = computed(() => store.value.commonHelpersData.primaryGroups.value)\nconst secondaryGroups = computed(() => store.value.commonHelpersData.secondaryGroups.value)\n\nconst usedAesInMapping = computed(() => store.value.commonHelpersData.usedAesInMapping.value);\n\nconst mappingPrimary = ref(store.value.reactive.dataBindAes[primaryGrouping.value] as AestheticMappingCategorical ?? createDefaultMapping(primaryGroups.value));\nconst mappingSecondary = ref(store.value.reactive.dataBindAes[secondaryGrouping.value] as AestheticMappingCategorical ?? createDefaultMapping(secondaryGroups.value));\n\nconst primaryInfo = computed(() => {\n if (primaryGrouping.value) {\n const selectedSourceInfo = inputGuide.value.getSourceInfo(primaryGrouping.value) ?? null;\n const valueLabels = labelsInfo.value[primaryGrouping.value]?.labels ?? null;\n return {\n selectedSourceInfo,\n labels: primaryGroups.value.reduce((res: Record<string, string>, v) => {\n res[v] = valueLabels?.[v] ?? String(v);\n return res;\n }, {})\n };\n }\n});\nconst secondaryInfo = computed(() => {\n if (secondaryGrouping.value) {\n const selectedSourceInfo = inputGuide.value.getSourceInfo(secondaryGrouping.value) ?? null;\n const valueLabels = labelsInfo.value[secondaryGrouping.value]?.labels ?? null;\n return {\n selectedSourceInfo,\n labels: secondaryGroups.value.reduce((res: Record<string, string>, v) => {\n res[v] = valueLabels?.[v] ?? String(v);\n return res;\n }, {})\n };\n }\n});\n\nfunction updateOrder(value: AestheticMappingCategorical, sourceId: string) {\n store.value.reactive.dataBindAes[sourceId] = value;\n}\n\nconst OPTIONS_FACET_SHARED = [\n { text: 'X', value: 'x' },\n { text: 'Y', value: 'y' },\n { text: 'XY', value: 'xy' },\n { text: 'None', value: 'none' }\n];\n\nconst primaryOptions = computed(() => labelsInfo.value[primaryGrouping.value])\nconst xLabelsRotation = computed({\n get(){\n return getDiscreteLabelsRotation(settings.axisX.labelsRotation, primaryOptions.value?.options)\n },\n set(value:LabelsRotation) {\n settings.axisX.labelsRotation = value;\n }\n})\n</script>\n\n<template>\n <div class=\"axes-form\" @click=\"(e) => e.stopPropagation()\">\n <h3 class=\"axes-title\">\n Axes\n </h3>\n <div class=\"axes-settings-list\">\n <!-- Chart title -->\n <collapsable-block title=\"Title\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.title.mode\"\n />\n </div>\n <div class=\"axes-settings-input\" v-if=\"settings.title.mode === 'custom'\">\n <pl-text-field\n label=\"Chart title\"\n placeholder=\"Chart title\"\n v-model=\"settings.title.value\"\n />\n </div>\n <div class=\"axes-settings-options-row\">\n <span>Alignment</span>\n <btn-icon-group :options=\"OPTIONS_TITLE_ALIGN\" v-model=\"settings.title.position\"/>\n </div>\n<!-- <div class=\"axes-settings-options-row\">-->\n<!-- <span>Facet frame style</span>-->\n<!-- <btn-icon-group :options=\"OPTIONS_FACET_FRAME\" v-model=\"settings.title.facetTitleFrame\"/>-->\n<!-- </div>-->\n </collapsable-block>\n <!-- X axis settings-->\n <collapsable-block title=\"X-axis\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row\" v-if=\"primaryGroups.length > 1\">\n <span>Primary groups order: </span>\n <aes-button :data=\"{type: 'data', value: null}\" @click=\"reorderPrimaryOpen = true;\" />\n <template v-if=\"reorderPrimaryOpen && primaryInfo\">\n <form-wrapper\n title=\"Reorder primary groups\"\n back-title=\"Axes Settings\"\n @form:close=\"reorderPrimaryOpen = false\"\n >\n <aes-data-mapping\n :column-value-labels=\"primaryInfo.labels\"\n :data-column-label=\"primaryInfo.selectedSourceInfo?.label ?? ''\"\n :used-aes-in-mapping=\"usedAesInMapping[primaryGrouping]\"\n allow-reordering\n allow-hiding\n :allow-null-option=\"settings.axisX.allowNullPrimaryGroups\"\n v-model=\"mappingPrimary\"\n @update:modelValue=\"(value:AestheticMappingCategorical) => updateOrder(value, primaryGrouping)\"\n />\n </form-wrapper>\n </template>\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"primaryGroups.length > 1\">\n <span>Allow null primary group</span>\n <pl-toggle-switch v-model=\"settings.axisX.allowNullPrimaryGroups\" />\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"secondaryGroups.length > 1\">\n <span>Secondary groups order: </span>\n <aes-button :data=\"{type: 'data', value: null}\" @click=\"reorderSecondaryOpen = true;\" />\n <template v-if=\"reorderSecondaryOpen && secondaryInfo\">\n <form-wrapper\n title=\"Reorder secondary groups\"\n back-title=\"Axes Settings\"\n @form:close=\"reorderSecondaryOpen = false\"\n >\n <aes-data-mapping\n :column-value-labels=\"secondaryInfo.labels\"\n :data-column-label=\"secondaryInfo.selectedSourceInfo?.label ?? ''\"\n :used-aes-in-mapping=\"usedAesInMapping[secondaryGrouping]\"\n allow-reordering\n allow-hiding\n :allow-null-option=\"settings.axisX.allowNullSecondaryGroups\"\n v-model=\"mappingSecondary\"\n @update:modelValue=\"(value:AestheticMappingCategorical) => updateOrder(value, secondaryGrouping)\"\n />\n </form-wrapper>\n </template>\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"secondaryGroups.length > 1\">\n <span>Allow null secondary group</span>\n <pl-toggle-switch v-model=\"settings.axisX.allowNullSecondaryGroups\" />\n </div>\n <div class=\"axes-settings-options-row\" v-if=\"store.reactive.chartType === 'discrete'\">\n <span>Labels rotation</span>\n <btn-icon-group :options=\"OPTIONS_LABELS_ROTATION\" v-model=\"xLabelsRotation\" />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.axisX.titleMode\"\n />\n </div>\n <div v-if=\"settings.axisX.titleMode === 'custom'\">\n <pl-text-field\n label=\"Text\"\n placeholder=\"Type\"\n v-model=\"settings.axisX.customTitle\"\n />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Gridlines</span>\n <pl-toggle-switch v-model=\"settings.axisX.gridlines\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Lines between categories</span>\n <pl-toggle-switch v-model=\"settings.axisX.linesBetweenCategories\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Ticks</span>\n <pl-toggle-switch v-model=\"settings.axisX.ticks\" />\n </div>\n </collapsable-block>\n <!-- Y axis settings-->\n <collapsable-block title=\"Y-axis\" :settings=\"blockSettings\" :icon=\"Right\" :icon-open=\"Down\">\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Title\"\n :options=\"OPTIONS_AXIS_LABEL_MODE\"\n v-model=\"settings.axisY.titleMode\"\n />\n </div>\n <div v-if=\"settings.axisY.titleMode === 'custom'\">\n <pl-text-field\n label=\"Text\"\n placeholder=\"Type\"\n v-model=\"settings.axisY.customTitle\"\n />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Scale\"\n :options=\"OPTIONS_SCALE\"\n v-model=\"settings.axisY.scale\"\n />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Gridlines</span>\n <pl-toggle-switch v-model=\"settings.axisY.gridlines\" />\n </div>\n <div class=\"axes-settings-options-row table\">\n <span>Ticks</span>\n <pl-toggle-switch v-model=\"settings.axisY.ticks\" />\n </div>\n </collapsable-block>\n <!-- Facet settings-->\n <div class=\"other\">\n <div class=\"axes-settings-options-row\">\n <span>Frame</span>\n <btn-icon-group :options=\"OPTIONS_CHART_FRAME\" v-model=\"settings.other.frame\" />\n </div>\n <div class=\"axes-settings-options-row\">\n <span>Reverse axes</span>\n <pl-toggle-switch v-model=\"settings.other.reverse\" />\n </div>\n <div class=\"axes-settings-options-row\">\n <Slider\n :style=\"{width: '100%'}\"\n label=\"Facet column count\"\n :min=\"1\"\n :max=\"6\"\n :step=\"1\"\n :breakpoints=\"true\"\n mode=\"input\"\n v-model=\"settings.other.facetColumns\"\n />\n </div>\n <div class=\"axes-settings-options-row block\">\n <pl-btn-group\n label=\"Facet shared by\"\n :options=\"OPTIONS_FACET_SHARED\"\n v-model=\"settings.other.facetSharedBy\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["store","useStore","settings","blockSettings","OPTIONS_TITLE_ALIGN","AlignLeft","AlignCenter","AlignRight","OPTIONS_LABELS_ROTATION","Rotation0","Rotation45","Rotation90","OPTIONS_AXIS_LABEL_MODE","OPTIONS_SCALE","OPTIONS_CHART_FRAME","FrameEmpty","FrameLeft","FrameBottom","FrameLeftBottom","FrameFull","inputGuide","computed","labelsInfo","reorderPrimaryOpen","ref","reorderSecondaryOpen","primaryGrouping","_b","_a","secondaryGrouping","primaryGroups","secondaryGroups","usedAesInMapping","mappingPrimary","createDefaultMapping","mappingSecondary","primaryInfo","selectedSourceInfo","valueLabels","res","v","secondaryInfo","updateOr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;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AesSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/GraphMaker/forms/LayersForm/AesSelector.vue"],"names":[],"mappings":"AA6XA,OAAO,EAAE,OAAO,EAAe,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAU1E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;;;AAqgBF,wBAOG"}
1
+ {"version":3,"file":"AesSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/GraphMaker/forms/LayersForm/AesSelector.vue"],"names":[],"mappings":"AAiYA,OAAO,EAAE,OAAO,EAAe,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAU1E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;;;AA8gBF,wBAOG"}