@milaboratories/graph-maker 1.1.207 → 1.1.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Chart.vue.d.ts +1 -0
- package/dist/components/Chart.vue.d.ts.map +1 -1
- package/dist/components/Chart.vue.js +164 -196
- package/dist/components/Chart.vue.js.map +1 -1
- package/dist/components/{Loading.vue.d.ts → GraphStatusScreen.vue.d.ts} +8 -6
- package/dist/components/GraphStatusScreen.vue.d.ts.map +1 -0
- package/dist/components/GraphStatusScreen.vue.js +10 -0
- package/dist/components/GraphStatusScreen.vue.js.map +1 -0
- package/dist/components/GraphStatusScreen.vue2.js +68 -0
- package/dist/components/GraphStatusScreen.vue2.js.map +1 -0
- package/dist/components/GraphStatusScreen.vue3.js +11 -0
- package/dist/components/GraphStatusScreen.vue3.js.map +1 -0
- package/dist/components/LassoControls/index.vue.d.ts +1 -0
- package/dist/components/LassoControls/index.vue.d.ts.map +1 -1
- package/dist/components/LassoControls/index.vue.js +7 -91
- package/dist/components/LassoControls/index.vue.js.map +1 -1
- package/dist/components/LassoControls/index.vue2.js +136 -2
- package/dist/components/LassoControls/index.vue2.js.map +1 -1
- package/dist/components/LassoControls/index.vue3.js +27 -0
- package/dist/components/LassoControls/index.vue3.js.map +1 -0
- package/dist/components/SettingsTabs/index.vue.d.ts +1 -1
- package/dist/components/SettingsTabs/index.vue.d.ts.map +1 -1
- package/dist/components/SettingsTabs/index.vue.js +77 -32
- package/dist/components/SettingsTabs/index.vue.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.vue.d.ts.map +1 -1
- package/dist/index.vue.js +152 -143
- package/dist/index.vue.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +61 -61
- package/dist/store.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/Loading.vue.d.ts.map +0 -1
- package/dist/components/Loading.vue.js +0 -37
- package/dist/components/Loading.vue.js.map +0 -1
- package/dist/components/Loading.vue2.js +0 -5
- package/dist/components/Loading.vue2.js.map +0 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { StatusTextData } from '../types';
|
|
1
|
+
import { GraphStatus, StatusTextData } from '../types';
|
|
2
|
+
import { ErrorInfo } from '@milaboratories/miplots4';
|
|
2
3
|
type __VLS_Props = {
|
|
4
|
+
graphStatus: GraphStatus;
|
|
5
|
+
customStatusText?: Partial<StatusTextData>;
|
|
6
|
+
errorInfo?: ErrorInfo | null;
|
|
3
7
|
top?: number;
|
|
4
8
|
left?: number;
|
|
5
9
|
right?: number;
|
|
6
10
|
bottom?: number;
|
|
7
|
-
variant?: 'loading' | 'running';
|
|
8
|
-
customStatusText?: Partial<StatusTextData>;
|
|
9
11
|
};
|
|
10
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
13
|
bottom: number;
|
|
12
14
|
left: number;
|
|
13
15
|
right: number;
|
|
14
16
|
top: number;
|
|
15
|
-
variant: "loading" | "running";
|
|
16
17
|
customStatusText: Partial<StatusTextData>;
|
|
17
|
-
|
|
18
|
+
errorInfo: ErrorInfo | null;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
20
|
export default _default;
|
|
19
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=GraphStatusScreen.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphStatusScreen.vue.d.ts","sourceRoot":"","sources":["../../src/components/GraphStatusScreen.vue"],"names":[],"mappings":"AA2GA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;;YADS,MAAM;UAFR,MAAM;WACL,MAAM;SAFR,MAAM;sBAFO,OAAO,CAAC,cAAc,CAAC;eAC9B,SAAS,GAAG,IAAI;;AAuK9B,wBAOG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import s from "./GraphStatusScreen.vue2.js";
|
|
2
|
+
import o from "./GraphStatusScreen.vue3.js";
|
|
3
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = {
|
|
5
|
+
$style: o
|
|
6
|
+
}, f = /* @__PURE__ */ t(s, [["__cssModules", r]]);
|
|
7
|
+
export {
|
|
8
|
+
f as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=GraphStatusScreen.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphStatusScreen.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as x, computed as e, watch as T, createElementBlock as I, createCommentVNode as g, openBlock as u, normalizeStyle as v, normalizeClass as $, createBlock as s, unref as i } from "vue";
|
|
2
|
+
import { PlPlaceholder as M, PlAgOverlayLoading as k, PlAgOverlayNoRows as C } from "@platforma-sdk/ui-vue";
|
|
3
|
+
import { DEFAULT_STATUS_TEXT as h } from "../constantsCommon.js";
|
|
4
|
+
const E = /* @__PURE__ */ x({
|
|
5
|
+
__name: "GraphStatusScreen",
|
|
6
|
+
props: {
|
|
7
|
+
graphStatus: {},
|
|
8
|
+
customStatusText: { default: void 0 },
|
|
9
|
+
errorInfo: { default: null },
|
|
10
|
+
top: { default: 0 },
|
|
11
|
+
left: { default: 0 },
|
|
12
|
+
right: { default: 0 },
|
|
13
|
+
bottom: { default: 0 }
|
|
14
|
+
},
|
|
15
|
+
setup(n) {
|
|
16
|
+
const t = n, d = e(() => {
|
|
17
|
+
var r, o, m, p, c, y;
|
|
18
|
+
return ((r = t.errorInfo) == null ? void 0 : r.type) === "tooManyFacets" ? `Too many facets (${t.errorInfo.info.count}).
|
|
19
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
20
|
+
Try to filter the data.` : ((o = t.errorInfo) == null ? void 0 : o.type) === "tooManyPrimaryGroups" ? `Too many primary groups (${t.errorInfo.info.count}).
|
|
21
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
22
|
+
Try to filter the data.` : ((m = t.errorInfo) == null ? void 0 : m.type) === "tooManySecondaryGroups" ? `Too many secondary groups (${t.errorInfo.info.count}).
|
|
23
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
24
|
+
Try to filter the data.` : ((p = t.errorInfo) == null ? void 0 : p.type) === "tooManyScatterplotGroupsX" ? `Too many categories on X axis (${t.errorInfo.info.count}).
|
|
25
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
26
|
+
Try to filter the data.` : ((c = t.errorInfo) == null ? void 0 : c.type) === "tooManyScatterplotGroupsY" ? `Too many categories on Y axis (${t.errorInfo.info.count}).
|
|
27
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
28
|
+
Try to filter the data.` : ((y = t.errorInfo) == null ? void 0 : y.type) === "tooManyHistogramGroups" ? `Too many groups (${t.errorInfo.info.count}).
|
|
29
|
+
Maximum count is ${t.errorInfo.info.maxCount}.
|
|
30
|
+
Try to filter the data.` : "";
|
|
31
|
+
}), l = e(() => t.graphStatus === "noPframe" || t.graphStatus === "empty"), f = e(() => t.graphStatus === "notReady" || t.graphStatus === "inconsistent" || t.graphStatus === "knownError" || t.graphStatus === "unknownError"), a = e(() => {
|
|
32
|
+
var r, o;
|
|
33
|
+
return t.graphStatus === "knownError" ? d.value : ((o = (r = t.customStatusText) == null ? void 0 : r[t.graphStatus]) == null ? void 0 : o.title) ?? h[t.graphStatus].title;
|
|
34
|
+
}), S = e(() => {
|
|
35
|
+
var r, o;
|
|
36
|
+
return t.graphStatus !== "loading" && t.graphStatus !== "running" ? "" : ((o = (r = t.customStatusText) == null ? void 0 : r[t.graphStatus]) == null ? void 0 : o.subtitle) ?? h[t.graphStatus].subtitle;
|
|
37
|
+
});
|
|
38
|
+
return T(() => t.graphStatus, (r) => {
|
|
39
|
+
console.log("screen", r, a.value);
|
|
40
|
+
}, { immediate: !0 }), (r, o) => n.graphStatus !== "ready" ? (u(), I("div", {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: $(["graph-maker__loading", [r.$style.loaderContainer, { [r.$style.withBorder]: l.value || f.value }]]),
|
|
43
|
+
style: v({
|
|
44
|
+
top: `${t.top}px`,
|
|
45
|
+
bottom: `${t.bottom}px`,
|
|
46
|
+
right: `${t.right}px`,
|
|
47
|
+
left: `${t.left}px`
|
|
48
|
+
})
|
|
49
|
+
}, [
|
|
50
|
+
n.graphStatus === "loading" || n.graphStatus === "running" ? (u(), s(i(M), {
|
|
51
|
+
key: 0,
|
|
52
|
+
variant: "graph",
|
|
53
|
+
title: a.value,
|
|
54
|
+
subtitle: S.value
|
|
55
|
+
}, null, 8, ["title", "subtitle"])) : l.value ? (u(), s(i(k), {
|
|
56
|
+
key: a.value + "catInBag",
|
|
57
|
+
params: { variant: "not-ready", notReadyText: a.value }
|
|
58
|
+
}, null, 8, ["params"])) : f.value ? (u(), s(i(C), {
|
|
59
|
+
key: a.value + "catNoData",
|
|
60
|
+
params: { text: a.value }
|
|
61
|
+
}, null, 8, ["params"])) : g("", !0)
|
|
62
|
+
], 6)) : g("", !0);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
E as default
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=GraphStatusScreen.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphStatusScreen.vue2.js","sources":["../../src/components/GraphStatusScreen.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlPlaceholder, PlAgOverlayLoading, PlAgOverlayNoRows } from '@platforma-sdk/ui-vue';\nimport { computed, watch } from 'vue';\nimport { DEFAULT_STATUS_TEXT } from '../constantsCommon';\nimport type { GraphStatus, StatusTextData } from '../types';\nimport type { ErrorInfo } from '@milaboratories/miplots4';\n\nconst props = withDefaults(defineProps<{\n graphStatus: GraphStatus;\n customStatusText?: Partial<StatusTextData>;\n errorInfo?: ErrorInfo | null;\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n}>(), {\n customStatusText: undefined,\n errorInfo: null,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n});\n\nconst errorMessage = computed(() => {\n if (props.errorInfo?.type === 'tooManyFacets') {\n return `Too many facets (${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n if (props.errorInfo?.type === 'tooManyPrimaryGroups') {\n return `Too many primary groups\\u00A0(${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n if (props.errorInfo?.type === 'tooManySecondaryGroups') {\n return `Too many secondary groups\\u00A0(${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n if (props.errorInfo?.type === 'tooManyScatterplotGroupsX') {\n return `Too many categories on X axis\\u00A0(${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n if (props.errorInfo?.type === 'tooManyScatterplotGroupsY') {\n return `Too many categories on Y axis\\u00A0(${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n if (props.errorInfo?.type === 'tooManyHistogramGroups') {\n return `Too many groups\\u00A0(${props.errorInfo.info.count}).\\nMaximum count is\\u00A0${props.errorInfo.info.maxCount}.\\nTry to\\u00A0filter the\\u00A0data.`;\n }\n return '';\n});\n\nconst catInBagStatus = computed(() => props.graphStatus === 'noPframe' || props.graphStatus === 'empty');\nconst catNoDataStatus = computed(() => props.graphStatus === 'notReady' || props.graphStatus === 'inconsistent' || props.graphStatus === 'knownError' || props.graphStatus === 'unknownError');\n\nconst statusText = computed(() => {\n if (props.graphStatus === 'knownError') {\n return errorMessage.value;\n }\n return props.customStatusText?.[props.graphStatus]?.title ?? DEFAULT_STATUS_TEXT[props.graphStatus].title;\n});\n\nconst subtitle = computed(() => {\n if (props.graphStatus !== 'loading' && props.graphStatus !== 'running') {\n return '';\n }\n return props.customStatusText?.[props.graphStatus]?.subtitle ?? DEFAULT_STATUS_TEXT[props.graphStatus].subtitle;\n});\n\nwatch(() => props.graphStatus, (s) => {\n console.log('screen', s, statusText.value);\n}, { immediate: true });\n\n</script>\n<template>\n <div\n v-if=\"graphStatus !== 'ready'\"\n class=\"graph-maker__loading\"\n :class=\"[$style.loaderContainer, {[$style.withBorder]: catInBagStatus || catNoDataStatus}]\"\n :style=\"{\n top: `${props.top}px`,\n bottom: `${props.bottom}px`,\n right: `${props.right}px`,\n left: `${props.left}px`\n }\"\n >\n <PlPlaceholder v-if=\"graphStatus === 'loading' || graphStatus === 'running'\" variant=\"graph\" :title=\"statusText\" :subtitle=\"subtitle\" />\n <PlAgOverlayLoading v-else-if=\"catInBagStatus\" :key=\"statusText + 'catInBag'\" :params=\"{variant: 'not-ready', notReadyText: statusText}\"/>\n <PlAgOverlayNoRows v-else-if=\"catNoDataStatus\" :key=\"statusText + 'catNoData'\" :params=\"{text: statusText}\"/>\n </div>\n</template>\n<style module>\n.loaderContainer {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.withBorder {\n border: 1px solid #E1E3EB;\n border-radius: 8px;\n overflow: 'hidden';\n}\n</style>\n"],"names":["props","__props","errorMessage","computed","_a","_b","_c","_d","_e","_f","catInBagStatus","catNoDataStatus","statusText","DEFAULT_STATUS_TEXT","subtitle","watch","s","_createElementBlock","_normalizeClass","$style","_normalizeStyle","_createBlock","_unref","PlPlaceholder","PlAgOverlayLoading","PlAgOverlayNoRows"],"mappings":";;;;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAiBRC,IAAeC,EAAS,MAAM;;AAClC,eAAIC,IAAAJ,EAAM,cAAN,gBAAAI,EAAiB,UAAS,kBACrB,oBAAoBJ,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAAM,UAAU,KAAK,QAAQ;AAAA,6BAE7GK,IAAAL,EAAM,cAAN,gBAAAK,EAAiB,UAAS,yBACrB,4BAAiCL,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAAM,UAAU,KAAK,QAAQ;AAAA,6BAE1HM,IAAAN,EAAM,cAAN,gBAAAM,EAAiB,UAAS,2BACrB,8BAAmCN,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAAM,UAAU,KAAK,QAAQ;AAAA,6BAE5HO,IAAAP,EAAM,cAAN,gBAAAO,EAAiB,UAAS,8BACrB,kCAAuCP,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAAM,UAAU,KAAK,QAAQ;AAAA,6BAEhIQ,IAAAR,EAAM,cAAN,gBAAAQ,EAAiB,UAAS,8BACrB,kCAAuCR,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAAM,UAAU,KAAK,QAAQ;AAAA,6BAEhIS,IAAAT,EAAM,cAAN,gBAAAS,EAAiB,UAAS,2BACrB,oBAAyBT,EAAM,UAAU,KAAK,KAAK;AAAA,mBAA6BA,EAA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AA7DoB,EAAwIC,EAAAC,CAAA,GAAA;AAAA;QAA3D,SAAQ;AAAA,QAAS,OAAOX,EAAA;AAAA,QAAa,UAAUE,EAAA;AAAA,MAAA,sCAC7FJ,EAAA,cAA/BW,EAA0IC,EAAAE,CAAA,GAAA;AAAA,QAA1F,KAAKZ,EAAA,QAAU;AAAA,QAAgB,8CAA6CA,EAAA,MAAA;AAAA,MAAU,2BACxGD,EAAA,cAA9BU,EAA6GC,EAAAG,CAAA,GAAA;AAAA,QAA7D,KAAKb,EAAA,QAAU;AAAA,QAAiB,gBAAeA,EAAA,MAAA;AAAA,MAAU;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._loaderContainer_1yfb4_2{position:absolute;left:0;right:0;bottom:0;z-index:1;display:flex;justify-content:center;align-items:center}._withBorder_1yfb4_12{border:1px solid #E1E3EB;border-radius:8px;overflow:"hidden"}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
const o = "_loaderContainer_1yfb4_2", r = "_withBorder_1yfb4_12", e = {
|
|
3
|
+
loaderContainer: o,
|
|
4
|
+
withBorder: r
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
e as default,
|
|
8
|
+
o as loaderContainer,
|
|
9
|
+
r as withBorder
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=GraphStatusScreen.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphStatusScreen.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChartInterface } from '@milaboratories/miplots4';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
chartRef: ChartInterface | null;
|
|
4
|
+
isScatterplotZoomChanged?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
7
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/LassoControls/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/LassoControls/index.vue"],"names":[],"mappings":"AAgKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM/D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;;AA6RF,wBAOG"}
|
|
@@ -1,94 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
props: {
|
|
8
|
-
chartRef: {}
|
|
9
|
-
},
|
|
10
|
-
setup(E) {
|
|
11
|
-
const a = E, w = B(), t = P(() => w.value.reactive.lassoControlsState);
|
|
12
|
-
function i() {
|
|
13
|
-
var e;
|
|
14
|
-
(e = a.chartRef) == null || e.updateChartState(d.selectMode, "pen");
|
|
15
|
-
}
|
|
16
|
-
function u() {
|
|
17
|
-
var e;
|
|
18
|
-
(e = a.chartRef) == null || e.updateChartState(d.selectMode, "selection");
|
|
19
|
-
}
|
|
20
|
-
function f() {
|
|
21
|
-
var e;
|
|
22
|
-
(e = a.chartRef) == null || e.updateChartState(d.back, null);
|
|
23
|
-
}
|
|
24
|
-
function m() {
|
|
25
|
-
var e;
|
|
26
|
-
(e = a.chartRef) == null || e.updateChartState(d.forward, null);
|
|
27
|
-
}
|
|
28
|
-
function K() {
|
|
29
|
-
var e;
|
|
30
|
-
(e = a.chartRef) == null || e.updateChartState(d.delete, null);
|
|
31
|
-
}
|
|
32
|
-
function p(e) {
|
|
33
|
-
var o, s;
|
|
34
|
-
e.key === "p" && i(), e.key === "v" && u(), (o = t.value) != null && o.backEnabled && e.key === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && f(), (s = t.value) != null && s.forwardEnabled && e.key === "z" && (e.ctrlKey || e.metaKey) && e.shiftKey && m();
|
|
35
|
-
}
|
|
36
|
-
return _(() => {
|
|
37
|
-
document.addEventListener("keydown", p);
|
|
38
|
-
}), x(() => {
|
|
39
|
-
document.removeEventListener("keydown", p);
|
|
40
|
-
}), (e, o) => {
|
|
41
|
-
var s, v, b, k, C, y, S;
|
|
42
|
-
return M(), L("div", N, [
|
|
43
|
-
r("div", V, [
|
|
44
|
-
o[0] || (o[0] = r("div", { class: "lasso-controls-border" }, null, -1)),
|
|
45
|
-
l(n(c), {
|
|
46
|
-
class: h({
|
|
47
|
-
"lasso-button-selected": ((s = t.value) == null ? void 0 : s.mode) === "pen" || !t.value,
|
|
48
|
-
"lasso-button-not-selected": ((v = t.value) == null ? void 0 : v.mode) !== "pen" && t.value
|
|
49
|
-
}),
|
|
50
|
-
icon: "cursor-pointer",
|
|
51
|
-
onClick: i
|
|
52
|
-
}, null, 8, ["class"]),
|
|
53
|
-
l(n(c), {
|
|
54
|
-
class: h({
|
|
55
|
-
"lasso-button-selected": ((b = t.value) == null ? void 0 : b.mode) === "selection",
|
|
56
|
-
"lasso-button-not-selected": ((k = t.value) == null ? void 0 : k.mode) !== "selection"
|
|
57
|
-
}),
|
|
58
|
-
icon: "pen-tool",
|
|
59
|
-
onClick: u
|
|
60
|
-
}, null, 8, ["class"]),
|
|
61
|
-
o[1] || (o[1] = r("div", { class: "lasso-controls-separator" }, null, -1)),
|
|
62
|
-
l(n(c), {
|
|
63
|
-
disabled: !((C = t.value) != null && C.backEnabled),
|
|
64
|
-
icon: "arrow-left-curved",
|
|
65
|
-
onClick: f
|
|
66
|
-
}, null, 8, ["disabled"]),
|
|
67
|
-
l(n(c), {
|
|
68
|
-
disabled: !((y = t.value) != null && y.forwardEnabled),
|
|
69
|
-
onClick: m
|
|
70
|
-
}, {
|
|
71
|
-
icon: T(() => [
|
|
72
|
-
l(n(z), {
|
|
73
|
-
name: "arrow-left-curved",
|
|
74
|
-
style: { transform: "scale(-1, 1)" }
|
|
75
|
-
})
|
|
76
|
-
]),
|
|
77
|
-
_: 1
|
|
78
|
-
}, 8, ["disabled"]),
|
|
79
|
-
o[2] || (o[2] = r("div", { class: "lasso-controls-separator" }, null, -1)),
|
|
80
|
-
l(n(c), {
|
|
81
|
-
disabled: !((S = t.value) != null && S.deleteEnabled),
|
|
82
|
-
icon: "delete-bin",
|
|
83
|
-
onClick: K
|
|
84
|
-
}, null, 8, ["disabled"])
|
|
85
|
-
]),
|
|
86
|
-
o[3] || (o[3] = r("div", { class: "lasso-hint" }, " Hold Cmd/Ctrl and left-click to pan the canvas ", -1))
|
|
87
|
-
]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
});
|
|
1
|
+
import s from "./index.vue2.js";
|
|
2
|
+
import o from "./index.vue3.js";
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = {
|
|
5
|
+
$style: o
|
|
6
|
+
}, f = /* @__PURE__ */ t(s, [["__cssModules", r]]);
|
|
91
7
|
export {
|
|
92
|
-
|
|
8
|
+
f as default
|
|
93
9
|
};
|
|
94
10
|
//# sourceMappingURL=index.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,5 +1,139 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as V, computed as K, onMounted as g, onUnmounted as P, watch as z, createElementBlock as L, openBlock as $, normalizeClass as l, createElementVNode as i, createBlock as M, createCommentVNode as Z, createVNode as s, unref as o, withCtx as u, createTextVNode as D } from "vue";
|
|
2
|
+
import { SCATTERPLOT_CONTROLS_EVENTS as r } from "@milaboratories/miplots4";
|
|
3
|
+
import { PlBtnGhost as c, PlMaskIcon24 as B, PlTooltip as H } from "@platforma-sdk/ui-vue";
|
|
4
|
+
import { useStore as I } from "../../store.js";
|
|
5
|
+
const U = /* @__PURE__ */ V({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
chartRef: {},
|
|
9
|
+
isScatterplotZoomChanged: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(p) {
|
|
12
|
+
const n = p, f = I(), t = K(() => f.value.reactive.lassoControlsState);
|
|
13
|
+
function E() {
|
|
14
|
+
var e;
|
|
15
|
+
(e = n.chartRef) == null || e.updateChartState(r.lassoSelectMode, "pen");
|
|
16
|
+
}
|
|
17
|
+
function R() {
|
|
18
|
+
var e;
|
|
19
|
+
(e = n.chartRef) == null || e.updateChartState(r.lassoSelectMode, "selection");
|
|
20
|
+
}
|
|
21
|
+
function m() {
|
|
22
|
+
var e;
|
|
23
|
+
(e = n.chartRef) == null || e.updateChartState(r.lassoBack, null);
|
|
24
|
+
}
|
|
25
|
+
function C() {
|
|
26
|
+
var e;
|
|
27
|
+
(e = n.chartRef) == null || e.updateChartState(r.lassoForward, null);
|
|
28
|
+
}
|
|
29
|
+
function N() {
|
|
30
|
+
var e;
|
|
31
|
+
(e = n.chartRef) == null || e.updateChartState(r.lassoDelete, null);
|
|
32
|
+
}
|
|
33
|
+
function y(e) {
|
|
34
|
+
var a, d;
|
|
35
|
+
(a = t.value) != null && a.backEnabled && e.key === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && m(), (d = t.value) != null && d.forwardEnabled && e.key === "z" && (e.ctrlKey || e.metaKey) && e.shiftKey && C();
|
|
36
|
+
}
|
|
37
|
+
g(() => {
|
|
38
|
+
document.addEventListener("keydown", y);
|
|
39
|
+
}), P(() => {
|
|
40
|
+
document.removeEventListener("keydown", y);
|
|
41
|
+
});
|
|
42
|
+
function T() {
|
|
43
|
+
var e;
|
|
44
|
+
(e = n.chartRef) == null || e.updateChartState(r.resetViewport, null);
|
|
45
|
+
}
|
|
46
|
+
return z(() => {
|
|
47
|
+
var e, a;
|
|
48
|
+
return (a = (e = n.chartRef) == null ? void 0 : e.calculatedData) == null ? void 0 : a.isZoomChanged;
|
|
49
|
+
}, (e) => {
|
|
50
|
+
console.log("isZoomChanged", e);
|
|
51
|
+
}), (e, a) => {
|
|
52
|
+
var d, v, h, S, k, b, w;
|
|
53
|
+
return $(), L("div", {
|
|
54
|
+
class: l(e.$style.lassoControlsContainer)
|
|
55
|
+
}, [
|
|
56
|
+
i("div", {
|
|
57
|
+
class: l(e.$style.lassoButtonsGroup)
|
|
58
|
+
}, [
|
|
59
|
+
i("div", {
|
|
60
|
+
class: l(e.$style.lassoControlsBorder)
|
|
61
|
+
}, null, 2),
|
|
62
|
+
s(o(c), {
|
|
63
|
+
class: l({
|
|
64
|
+
[e.$style.lassoButtonSelected]: ((d = t.value) == null ? void 0 : d.mode) === "pen" || !t.value,
|
|
65
|
+
[e.$style.lassoButtonNotSelected]: ((v = t.value) == null ? void 0 : v.mode) !== "pen" && t.value
|
|
66
|
+
}),
|
|
67
|
+
icon: "cursor-pointer",
|
|
68
|
+
onClick: E
|
|
69
|
+
}, null, 8, ["class"]),
|
|
70
|
+
s(o(c), {
|
|
71
|
+
class: l({
|
|
72
|
+
[e.$style.lassoButtonSelected]: ((h = t.value) == null ? void 0 : h.mode) === "selection",
|
|
73
|
+
[e.$style.lassoButtonNotSelected]: ((S = t.value) == null ? void 0 : S.mode) !== "selection"
|
|
74
|
+
}),
|
|
75
|
+
icon: "pen-tool",
|
|
76
|
+
onClick: R
|
|
77
|
+
}, null, 8, ["class"]),
|
|
78
|
+
i("div", {
|
|
79
|
+
class: l(e.$style.lassoControlsSeparator)
|
|
80
|
+
}, null, 2),
|
|
81
|
+
s(o(c), {
|
|
82
|
+
disabled: !((k = t.value) != null && k.backEnabled),
|
|
83
|
+
icon: "arrow-left-curved",
|
|
84
|
+
onClick: m
|
|
85
|
+
}, null, 8, ["disabled"]),
|
|
86
|
+
s(o(c), {
|
|
87
|
+
disabled: !((b = t.value) != null && b.forwardEnabled),
|
|
88
|
+
onClick: C
|
|
89
|
+
}, {
|
|
90
|
+
icon: u(() => [
|
|
91
|
+
s(o(B), {
|
|
92
|
+
name: "arrow-left-curved",
|
|
93
|
+
style: { transform: "scale(-1, 1)" }
|
|
94
|
+
})
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["disabled"]),
|
|
98
|
+
i("div", {
|
|
99
|
+
class: l(e.$style.lassoControlsSeparator)
|
|
100
|
+
}, null, 2),
|
|
101
|
+
s(o(c), {
|
|
102
|
+
disabled: !((w = t.value) != null && w.deleteEnabled),
|
|
103
|
+
icon: "delete-bin",
|
|
104
|
+
onClick: N
|
|
105
|
+
}, null, 8, ["disabled"])
|
|
106
|
+
], 2),
|
|
107
|
+
o(f).reactive.chartType === "scatterplot-umap" ? ($(), M(o(c), {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: l(e.$style.resetViewport),
|
|
110
|
+
disabled: !p.isScatterplotZoomChanged,
|
|
111
|
+
onClick: T
|
|
112
|
+
}, {
|
|
113
|
+
default: u(() => [
|
|
114
|
+
s(o(B), {
|
|
115
|
+
name: "restart",
|
|
116
|
+
class: l(e.$style.resetIcon)
|
|
117
|
+
}, null, 8, ["class"]),
|
|
118
|
+
s(o(H), {
|
|
119
|
+
class: l(["info", e.$style.resetHintIcon])
|
|
120
|
+
}, {
|
|
121
|
+
tooltip: u(() => [...a[0] || (a[0] = [
|
|
122
|
+
D(" Return to default pan & zoom ", -1)
|
|
123
|
+
])]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["class"])
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["class", "disabled"])) : Z("", !0),
|
|
129
|
+
i("div", {
|
|
130
|
+
class: l(e.$style.lassoHint)
|
|
131
|
+
}, " Hold Cmd/Ctrl and left-click to pan the canvas ", 2)
|
|
132
|
+
], 2);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
2
136
|
export {
|
|
3
|
-
|
|
137
|
+
U as default
|
|
4
138
|
};
|
|
5
139
|
//# sourceMappingURL=index.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.vue2.js","sources":["../../../src/components/LassoControls/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ChartInterface } from '@milaboratories/miplots4';\nimport { SCATTERPLOT_CONTROLS_EVENTS } from '@milaboratories/miplots4';\nimport { PlBtnGhost, PlMaskIcon24, PlTooltip } from '@platforma-sdk/ui-vue';\nimport { computed, onMounted, onUnmounted, watch } from 'vue';\nimport { useStore } from '../../store';\n\nconst props = defineProps<{\n chartRef: ChartInterface | null;\n isScatterplotZoomChanged?: boolean;\n}>();\n\nconst store = useStore();\nconst controlsState = computed(() => store.value.reactive.lassoControlsState);\n\nfunction setPen() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.lassoSelectMode, 'pen');\n}\nfunction setSelection() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.lassoSelectMode, 'selection');\n}\nfunction back() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.lassoBack, null);\n}\nfunction forward() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.lassoForward, null);\n}\nfunction deletePolygon() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.lassoDelete, null);\n}\n\nfunction onKeyDown(e: KeyboardEvent) {\n if (controlsState.value?.backEnabled && e.key === 'z' && (e.ctrlKey || e.metaKey) && !e.shiftKey) {\n back();\n }\n if (controlsState.value?.forwardEnabled && e.key === 'z' && (e.ctrlKey || e.metaKey) && e.shiftKey) {\n forward();\n }\n}\nonMounted(() => {\n document.addEventListener('keydown', onKeyDown);\n});\nonUnmounted(() => {\n document.removeEventListener('keydown', onKeyDown);\n});\n\nfunction resetViewport() {\n props.chartRef?.updateChartState(SCATTERPLOT_CONTROLS_EVENTS.resetViewport, null);\n}\n\nwatch(() => props.chartRef?.calculatedData?.isZoomChanged, (v) => {\n console.log('isZoomChanged', v);\n});\n\n</script>\n<template>\n <div :class=\"$style.lassoControlsContainer\">\n <div :class=\"$style.lassoButtonsGroup\">\n <div :class=\"$style.lassoControlsBorder\"/>\n <PlBtnGhost\n :class=\"{\n [$style.lassoButtonSelected]: controlsState?.mode === 'pen' || !controlsState,\n [$style.lassoButtonNotSelected]: controlsState?.mode !== 'pen' && controlsState,\n }\"\n icon=\"cursor-pointer\"\n @click=\"setPen\"\n />\n <PlBtnGhost\n :class=\"{\n [$style.lassoButtonSelected]: controlsState?.mode === 'selection',\n [$style.lassoButtonNotSelected]: controlsState?.mode !== 'selection',\n }\"\n icon=\"pen-tool\"\n @click=\"setSelection\"\n />\n <div :class=\"$style.lassoControlsSeparator\"/>\n <PlBtnGhost\n :disabled=\"!controlsState?.backEnabled\"\n icon=\"arrow-left-curved\"\n @click=\"back\"\n />\n <PlBtnGhost\n :disabled=\"!controlsState?.forwardEnabled\"\n @click=\"forward\"\n >\n <template #icon>\n <PlMaskIcon24 name=\"arrow-left-curved\" :style=\"{transform: 'scale(-1, 1)'}\"/>\n </template>\n </PlBtnGhost>\n <div :class=\"$style.lassoControlsSeparator\"/>\n <PlBtnGhost\n :disabled=\"!controlsState?.deleteEnabled\"\n icon=\"delete-bin\"\n @click=\"deletePolygon\"\n />\n </div>\n <PlBtnGhost v-if=\"store.reactive.chartType === 'scatterplot-umap'\" :class=\"$style.resetViewport\" :disabled=\"!isScatterplotZoomChanged\" @click=\"resetViewport\" >\n <PlMaskIcon24 name=\"restart\" :class=\"$style.resetIcon\"/>\n <PlTooltip class=\"info\" :class=\"$style.resetHintIcon\">\n <template #tooltip>\n Return to default pan & zoom\n </template>\n </PlTooltip>\n </PlBtnGhost>\n <div :class=\"$style.lassoHint\">\n Hold Cmd/Ctrl and left-click to pan the canvas\n </div>\n </div>\n</template>\n<style module>\n.lassoControlsContainer {\n display: flex;\n align-items: baseline;\n}\n.lassoButtonsGroup {\n background: white;\n display: flex;\n position: relative;\n}\n.lassoControlsBorder {\n position: absolute;\n border: 1px solid var(--color-div-grey);\n border-radius: var(--border-radius-control);\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.lassoButtonSelected {\n border: 2px solid var(--border-color-focus);\n}\n.lassoButtonNotSelected {\n border: 2px solid transparent;\n}\n.lassoControlsSeparator {\n width: 1px;\n height: 32px;\n background-color: var(--color-div-grey);\n margin: 4px;\n}\n.lassoHint {\n color: var(--txt-03);\n font-size: 14px;\n margin-left: 8px;\n}\n.resetViewport {\n width: 58px;\n min-width: 58px;\n margin-left: 24px;\n border: 1px solid var(--color-div-grey);\n}\n.resetIcon {\n margin-left: -6px;\n}\n.resetHintIcon {\n align-self: center;\n}\n</style>\n"],"names":["props","__props","store","useStore","controlsState","computed","setPen","_a","SCATTERPLOT_CONTROLS_EVENTS","setSelection","back","forward","deletePolygon","onKeyDown","_b","onMounted","onUnmounted","resetViewport","watch","v","_createElementBlock","_normalizeClass","$style","_createElementVNode","_createVNode","_unref","PlBtnGhost","_c","_d","_e","_f","PlMaskIcon24","_g","_createBlock","PlTooltip","_cache"],"mappings":";;;;;;;;;;;AAOA,UAAMA,IAAQC,GAKRC,IAAQC,EAAA,GACRC,IAAgBC,EAAS,MAAMH,EAAM,MAAM,SAAS,kBAAkB;AAE5E,aAASI,IAAS;;AAChB,OAAAC,IAAAP,EAAM,aAAN,QAAAO,EAAgB,iBAAiBC,EAA4B,iBAAiB;AAAA,IAChF;AACA,aAASC,IAAe;;AACtB,OAAAF,I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,EAAEC,EAAAA,OAAO,sBAAsB;AAAA,UAAA;UAC1CE,EAIEC,EAAAC,CAAA,GAAA;AAAA,YAHC,UAAQ,GAAGM,IAAA5B,EAAA,UAAA,QAAA4B,EAAe;AAAA,YAC3B,MAAK;AAAA,YACJ,SAAOpB;AAAA,UAAA;;QAGMa,EAAAvB,CAAA,EAAM,SAAS,cAAS,2BAA1C+B,EAOaR,EAAAC,CAAA,GAAA;AAAA;UAPuD,OAAKL,EAAEC,EAAAA,OAAO,aAAa;AAAA,UAAG,WAAWrB,EAAA;AAAA,UAA2B,SAAOgB;AAAA,QAAA;qBAC7I,MAAwD;AAAA,YAAxDO,EAAwDC,EAAAM,CAAA,GAAA;AAAA,cAA1C,MAAK;AAAA,cAAW,OAAKV,EAAEC,EAAAA,OAAO,SAAS;AAAA,YAAA;YACrDE,EAIYC,EAAAS,CAAA,GAAA;AAAA,cAJD,OAAKb,EAAA,CAAC,QAAeC,EAAAA,OAAO,aAAa,CAAA;AAAA,YAAA;cACvC,WAAQ,MAEnB,CAAA,GAAAa,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,kBAFmB,kCAEnB,EAAA;AAAA,cAAA;;;;;;QAGJZ,EAEM,OAAA;AAAA,UAFA,OAAKF,EAAEC,EAAAA,OAAO,SAAS;AAAA,QAAA,GAAE,oDAE/B,CAAA;AAAA,MAAA;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._lassoControlsContainer_1w3e4_2{display:flex;align-items:baseline}._lassoButtonsGroup_1w3e4_6{background:#fff;display:flex;position:relative}._lassoControlsBorder_1w3e4_11{position:absolute;border:1px solid var(--color-div-grey);border-radius:var(--border-radius-control);top:0;left:0;right:0;bottom:0}._lassoButtonSelected_1w3e4_20{border:2px solid var(--border-color-focus)}._lassoButtonNotSelected_1w3e4_23{border:2px solid transparent}._lassoControlsSeparator_1w3e4_26{width:1px;height:32px;background-color:var(--color-div-grey);margin:4px}._lassoHint_1w3e4_32{color:var(--txt-03);font-size:14px;margin-left:8px}._resetViewport_1w3e4_37{width:58px;min-width:58px;margin-left:24px;border:1px solid var(--color-div-grey)}._resetIcon_1w3e4_43{margin-left:-6px}._resetHintIcon_1w3e4_46{align-self:center}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
const o = "_lassoControlsContainer_1w3e4_2", s = "_lassoButtonsGroup_1w3e4_6", t = "_lassoControlsBorder_1w3e4_11", e = "_lassoButtonSelected_1w3e4_20", n = "_lassoButtonNotSelected_1w3e4_23", r = "_lassoControlsSeparator_1w3e4_26", l = "_lassoHint_1w3e4_32", a = "_resetViewport_1w3e4_37", _ = "_resetIcon_1w3e4_43", c = "_resetHintIcon_1w3e4_46", u = {
|
|
3
|
+
lassoControlsContainer: o,
|
|
4
|
+
lassoButtonsGroup: s,
|
|
5
|
+
lassoControlsBorder: t,
|
|
6
|
+
lassoButtonSelected: e,
|
|
7
|
+
lassoButtonNotSelected: n,
|
|
8
|
+
lassoControlsSeparator: r,
|
|
9
|
+
lassoHint: l,
|
|
10
|
+
resetViewport: a,
|
|
11
|
+
resetIcon: _,
|
|
12
|
+
resetHintIcon: c
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
u as default,
|
|
16
|
+
n as lassoButtonNotSelected,
|
|
17
|
+
e as lassoButtonSelected,
|
|
18
|
+
s as lassoButtonsGroup,
|
|
19
|
+
t as lassoControlsBorder,
|
|
20
|
+
o as lassoControlsContainer,
|
|
21
|
+
r as lassoControlsSeparator,
|
|
22
|
+
l as lassoHint,
|
|
23
|
+
c as resetHintIcon,
|
|
24
|
+
_ as resetIcon,
|
|
25
|
+
a as resetViewport
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -19,6 +19,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
19
19
|
onExport?: ((...args: any[]) => any) | undefined;
|
|
20
20
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
21
21
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
export default _default;
|
|
24
24
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SettingsTabs/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SettingsTabs/index.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B,CAAC;;;;;;;;;;AA8MF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { PlTooltip as
|
|
3
|
-
import { tabKeys as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as D, ref as P, createElementBlock as c, openBlock as r, Fragment as g, createElementVNode as u, createVNode as d, renderList as T, createBlock as m, unref as n, normalizeClass as M, withCtx as o, resolveDynamicComponent as b, toDisplayString as w, withModifiers as y, createTextVNode as p } from "vue";
|
|
2
|
+
import { PlTooltip as L, PlDialogModal as k, PlAlert as A, PlBtnPrimary as N, PlBtnGhost as E } from "@platforma-sdk/ui-vue";
|
|
3
|
+
import { tabKeys as j, resolveIcon as z, resolveTitle as F } from "../../forms/index.js";
|
|
4
|
+
const G = { class: "settings-tabs" }, I = { style: { "font-family": "var(--font-family-base)" } }, $ = /* @__PURE__ */ x({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
chartType: {},
|
|
@@ -14,41 +14,86 @@ const b = { class: "settings-tabs" }, D = { style: { "font-family": "var(--font-
|
|
|
14
14
|
modelValue: {}
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:modelValue", "export", "delete"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
(e) => !(e === "annotations" && !
|
|
17
|
+
setup(a, { emit: h }) {
|
|
18
|
+
const f = h, i = a, v = D(() => j().filter(
|
|
19
|
+
(e) => !(e === "annotations" && !i.hasAnnotationsSlot) && !(e === "settings" && !i.hasSettingsSlot) && !(e === "log" && !i.hasLogSlot) && !(e === "statistics" && i.chartType !== "discrete" && i.chartType !== "scatterplot") && !(e === "delete" && !i.allowDeleting)
|
|
20
20
|
));
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function C(e) {
|
|
22
|
+
f("update:modelValue", e === i.modelValue ? null : e);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
const s = P(!1);
|
|
25
|
+
function S() {
|
|
26
|
+
s.value = !1, f("delete");
|
|
27
|
+
}
|
|
28
|
+
function V() {
|
|
29
|
+
s.value = !1;
|
|
30
|
+
}
|
|
31
|
+
return (e, l) => (r(), c(g, null, [
|
|
32
|
+
u("div", G, [
|
|
33
|
+
(r(!0), c(g, null, T(v.value, (t) => (r(), m(n(L), {
|
|
34
|
+
key: t,
|
|
35
|
+
"open-delay": 100,
|
|
36
|
+
"close-delay": 100,
|
|
37
|
+
class: M(["has-inline-icon", {
|
|
38
|
+
active: a.modelValue === t,
|
|
39
|
+
"temp-inactive": t === "export" && (a.graphStatus !== "ready" || a.chartType === "scatterplot-umap") || a.initialLoading && (t === "template" || t === "dataMapping" || t === "axes" || t === "statistics" || t === "layers") || a.graphStatus === "noPframe" && t !== "settings" && t !== "log" && t !== "delete",
|
|
40
|
+
[t]: !0
|
|
41
|
+
}]),
|
|
42
|
+
position: "left",
|
|
43
|
+
hide: a.modelValue === t,
|
|
44
|
+
onClick: (B) => {
|
|
45
|
+
B.stopPropagation(), t === "export" ? e.$emit("export") : t === "delete" ? s.value = !0 : C(t);
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
tooltip: o(() => [
|
|
49
|
+
u("span", I, w(n(F)(t)), 1)
|
|
50
|
+
]),
|
|
51
|
+
default: o(() => [
|
|
52
|
+
(r(), m(b(n(z)(t))))
|
|
53
|
+
]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, ["class", "hide", "onClick"]))), 128))
|
|
56
|
+
]),
|
|
57
|
+
d(n(k), {
|
|
58
|
+
modelValue: s.value,
|
|
59
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => s.value = t)
|
|
39
60
|
}, {
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
title: o(() => [...l[1] || (l[1] = [
|
|
62
|
+
p("Delete chart?", -1)
|
|
63
|
+
])]),
|
|
64
|
+
actions: o(() => [
|
|
65
|
+
d(n(N), {
|
|
66
|
+
onClick: y(S, ["stop"])
|
|
67
|
+
}, {
|
|
68
|
+
default: o(() => [...l[3] || (l[3] = [
|
|
69
|
+
p(" Delete ", -1)
|
|
70
|
+
])]),
|
|
71
|
+
_: 1
|
|
72
|
+
}),
|
|
73
|
+
d(n(E), {
|
|
74
|
+
"justify-center": !1,
|
|
75
|
+
onClick: y(V, ["stop"])
|
|
76
|
+
}, {
|
|
77
|
+
default: o(() => [...l[4] || (l[4] = [
|
|
78
|
+
p("Cancel", -1)
|
|
79
|
+
])]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
42
82
|
]),
|
|
43
|
-
default:
|
|
44
|
-
(
|
|
83
|
+
default: o(() => [
|
|
84
|
+
d(n(A), { type: "warn" }, {
|
|
85
|
+
default: o(() => [...l[2] || (l[2] = [
|
|
86
|
+
u("strong", null, "This can't be undone!", -1)
|
|
87
|
+
])]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
45
90
|
]),
|
|
46
|
-
_:
|
|
47
|
-
},
|
|
48
|
-
]));
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["modelValue"])
|
|
93
|
+
], 64));
|
|
49
94
|
}
|
|
50
95
|
});
|
|
51
96
|
export {
|
|
52
|
-
|
|
97
|
+
$ as default
|
|
53
98
|
};
|
|
54
99
|
//# sourceMappingURL=index.vue.js.map
|