@milaboratories/graph-maker 1.1.166 → 1.1.168
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/GraphMaker/constantsCommon.d.ts +2 -9
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +78 -83
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +8 -2
- package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js +26 -20
- package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +56 -38
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js +48 -30
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js +37 -31
- package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js +30 -24
- package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js.map +1 -1
- package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js +33 -27
- package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.js +8 -2
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +22 -16
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +2 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js +17 -11
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +26 -20
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js +29 -23
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +83 -68
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +25 -19
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +7 -5
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/GraphMaker/utils/getUsedAesInMapping.js +37 -31
- package/dist/GraphMaker/utils/getUsedAesInMapping.js.map +1 -1
- package/dist/GraphMaker/utils/loadDefaultSources.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadDefaultSources.js +36 -31
- package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
- package/dist/_virtual/stringify.js +5 -0
- package/dist/_virtual/stringify.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +54 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +12 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +2 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +106 -107
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +120 -121
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +83 -84
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +4 -4
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +11 -11
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +123 -124
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +8 -8
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +116 -117
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +100 -102
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +148 -119
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js +4 -4
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +5 -5
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +8 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +182 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/errors.js +18 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/errors.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/json.js +12 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/json.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/plid.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/ref.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +105 -111
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +158 -163
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
- package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js +36 -0
- package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js.map +1 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +8 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +52 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js.map +1 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
- package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js.map +1 -0
- package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +16 -0
- package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js.map +1 -0
- package/dist/node_modules/json-stringify-safe/stringify.js +20 -0
- package/dist/node_modules/json-stringify-safe/stringify.js.map +1 -0
- package/dist/node_modules/zod/lib/index.js +2978 -0
- package/dist/node_modules/zod/lib/index.js.map +1 -0
- package/package.json +4 -4
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +0 -18
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +0 -1
|
@@ -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, onMounted, ref } from 'vue';\nimport AesDataMapping from '../../components/AesSettings/AesDataMappingDiscrete.vue';\nimport { AestheticMappingCategorical, createDefaultMapping } from '../../dataBindAes';\nimport { LabelsRotation } from '../../types';\nimport { getDiscreteLabelsRotation } from '../../utils';\nimport { watch } from 'vue';\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 defaultReorderPrimaryOpen = computed(() => store.value.reactive.tabDefaultState['axes'].reorderPrimaryOpen);\nconst defaultReorderSecondaryOpen = computed(() => store.value.reactive.tabDefaultState['axes'].reorderSecondaryOpen);\nonMounted(() => {\n if (defaultReorderPrimaryOpen.value) {\n reorderPrimaryOpen.value = true;\n }\n if (defaultReorderSecondaryOpen.value) {\n reorderSecondaryOpen.value = true;\n }\n})\nwatch(() => defaultReorderPrimaryOpen.value, (v) => {\n if (v) {\n reorderSecondaryOpen.value = false;\n reorderPrimaryOpen.value = true;\n }\n});\nwatch(() => defaultReorderSecondaryOpen.value, (v) => {\n if (v) {\n reorderPrimaryOpen.value = false;\n reorderSecondaryOpen.value = true;\n }\n});\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:open=\"store.reactive.tabDefaultState['axes'].reorderPrimaryOpen = false\"\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:open=\"store.reactive.tabDefaultState['axes'].reorderSecondaryOpen = false\"\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","defaultReorderPrimaryOpen","defaultReorderSecondaryOpen","onMounted","watch","v","primaryGrouping","_b","_a","secondaryGrouping","primaryGroups","secondaryGroups","usedAesInMapping","mappingPrimary","createDefaultMapping","mappingSecondary","primaryInfo","selectedSourceInfo","valueLabels","res","secondaryInfo","updateOrder","value","sourceId","OPTIONS_FACET_SHARED","primaryOptions","xLabelsRotation","getDiscreteLabelsRotation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,UAAMA,IAAQC,GAAA,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,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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, onMounted, ref } from 'vue';\nimport AesDataMapping from '../../components/AesSettings/AesDataMappingDiscrete.vue';\nimport { AestheticMappingCategorical, createDefaultMapping } from '../../dataBindAes';\nimport { LabelsRotation } from '../../types';\nimport { getDiscreteLabelsRotation } from '../../utils';\nimport { watch } from 'vue';\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 defaultReorderPrimaryOpen = computed(() => store.value.reactive.tabDefaultState['axes'].reorderPrimaryOpen);\nconst defaultReorderSecondaryOpen = computed(() => store.value.reactive.tabDefaultState['axes'].reorderSecondaryOpen);\nonMounted(() => {\n if (defaultReorderPrimaryOpen.value) {\n reorderPrimaryOpen.value = true;\n }\n if (defaultReorderSecondaryOpen.value) {\n reorderSecondaryOpen.value = true;\n }\n})\nwatch(() => defaultReorderPrimaryOpen.value, (v) => {\n if (v) {\n reorderSecondaryOpen.value = false;\n reorderPrimaryOpen.value = true;\n }\n});\nwatch(() => defaultReorderSecondaryOpen.value, (v) => {\n if (v) {\n reorderPrimaryOpen.value = false;\n reorderSecondaryOpen.value = true;\n }\n});\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:open=\"store.reactive.tabDefaultState['axes'].reorderPrimaryOpen = false\"\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:open=\"store.reactive.tabDefaultState['axes'].reorderSecondaryOpen = false\"\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","defaultReorderPrimaryOpen","defaultReorderSecondaryOpen","onMounted","watch","v","primaryGrouping","_b","_a","secondaryGrouping","primaryGroups","secondaryGroups","usedAesInMapping","mappingPrimary","createDefaultMapping","mappingSecondary","primaryInfo","selectedSourceInfo","valueLabels","res","secondaryInfo","updateOrder","value","sourceId","OPTIONS_FACET_SHARED","primaryOptions","xLabelsRotation","getDiscreteLabelsRotation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,UAAMA,IAAQC,GAAA,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,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { defineComponent as I, watch as b, computed as v, createBlock as G, openBlock as
|
|
1
|
+
import { defineComponent as I, watch as b, computed as v, createBlock as G, openBlock as p, withCtx as a, createElementBlock as u, Fragment as S, renderList as V, unref as r, createVNode as i, mergeProps as D, toHandlers as E, createElementVNode as h } from "vue";
|
|
2
2
|
import { PlDropdown as k } from "@platforma-sdk/ui-vue";
|
|
3
3
|
import { useStore as F } from "../../store.js";
|
|
4
4
|
import { getErrorForPlDropdown as O } from "./utils.js";
|
|
5
5
|
import "../../constantsAesthetic.js";
|
|
6
6
|
import "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
|
|
7
|
+
import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
|
|
8
|
+
import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
|
|
9
|
+
import "../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
|
|
10
|
+
import "../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
|
|
11
|
+
import "../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
|
|
12
|
+
import "../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
|
|
7
13
|
import { checkStatisticsInputsValidity as w } from "../../utils/getStatisticsOptions.js";
|
|
8
14
|
import $ from "../../components/DragAndDrop/DndBasket.vue.js";
|
|
9
15
|
import x from "./Layout/FormLayout.vue.js";
|
|
10
16
|
import A from "./Layout/OptionsList.vue.js";
|
|
11
17
|
import L from "./Layout/MandatoryOptions.vue.js";
|
|
12
18
|
import { useBaskets as T } from "./useBaskets.js";
|
|
13
|
-
const U = { class: "data-form-input-item" },
|
|
19
|
+
const U = { class: "data-form-input-item" }, er = /* @__PURE__ */ I({
|
|
14
20
|
__name: "DiscreteForm",
|
|
15
21
|
setup(C) {
|
|
16
|
-
const
|
|
22
|
+
const e = F();
|
|
17
23
|
b(
|
|
18
|
-
() =>
|
|
19
|
-
w(
|
|
24
|
+
() => e.value.commonHelpersData.primaryGroups.value,
|
|
25
|
+
w(e)
|
|
20
26
|
);
|
|
21
27
|
const c = [
|
|
22
28
|
"filters",
|
|
@@ -31,7 +37,7 @@ const U = { class: "data-form-input-item" }, W = /* @__PURE__ */ I({
|
|
|
31
37
|
tabBy: "Tab by",
|
|
32
38
|
facetBy: "Facet by"
|
|
33
39
|
}, {
|
|
34
|
-
draggedId:
|
|
40
|
+
draggedId: s,
|
|
35
41
|
basketsData: y,
|
|
36
42
|
freeMetaOptions: g,
|
|
37
43
|
freeMandatoryOptions: _,
|
|
@@ -39,50 +45,50 @@ const U = { class: "data-form-input-item" }, W = /* @__PURE__ */ I({
|
|
|
39
45
|
dataStateValues: m,
|
|
40
46
|
dataOptions: B
|
|
41
47
|
} = T(
|
|
42
|
-
|
|
48
|
+
e,
|
|
43
49
|
["y"],
|
|
44
50
|
["filters", "tabBy"],
|
|
45
51
|
["primaryGrouping", "secondaryGrouping", "facetBy"],
|
|
46
52
|
c,
|
|
47
53
|
f
|
|
48
54
|
), d = v(() => {
|
|
49
|
-
var
|
|
50
|
-
return ((
|
|
55
|
+
var n;
|
|
56
|
+
return ((n = e.value.readonlyInputs) == null ? void 0 : n.includes("y")) ?? !1;
|
|
51
57
|
});
|
|
52
|
-
return (
|
|
58
|
+
return (n, t) => (p(), G(x, null, {
|
|
53
59
|
dataInputs: a(() => [
|
|
54
60
|
h("div", U, [
|
|
55
|
-
|
|
61
|
+
i(r(k), {
|
|
56
62
|
modelValue: r(m).y,
|
|
57
|
-
"onUpdate:modelValue":
|
|
63
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => r(m).y = o),
|
|
58
64
|
options: r(B).y,
|
|
59
65
|
disabled: d.value,
|
|
60
|
-
error: r(O)("y", r(
|
|
66
|
+
error: r(O)("y", r(e).inputGuide.value),
|
|
61
67
|
label: "Y:",
|
|
62
68
|
clearable: !d.value
|
|
63
69
|
}, null, 8, ["modelValue", "options", "disabled", "error", "clearable"])
|
|
64
70
|
])
|
|
65
71
|
]),
|
|
66
72
|
mandatoryOptions: a(() => [
|
|
67
|
-
|
|
73
|
+
i(L, {
|
|
68
74
|
options: r(_),
|
|
69
75
|
chipInfo: r(l),
|
|
70
|
-
onDraggedIdUpdate:
|
|
76
|
+
onDraggedIdUpdate: t[1] || (t[1] = (o) => s.value = o)
|
|
71
77
|
}, null, 8, ["options", "chipInfo"])
|
|
72
78
|
]),
|
|
73
79
|
metadataOptions: a(() => [
|
|
74
|
-
|
|
80
|
+
i(A, {
|
|
75
81
|
options: r(g),
|
|
76
82
|
chipInfo: r(l),
|
|
77
|
-
onDraggedIdUpdate:
|
|
83
|
+
onDraggedIdUpdate: t[2] || (t[2] = (o) => s.value = o)
|
|
78
84
|
}, null, 8, ["options", "chipInfo"])
|
|
79
85
|
]),
|
|
80
86
|
chartVar: a(() => [
|
|
81
|
-
(
|
|
87
|
+
(p(!0), u(S, null, V(r(y), (o) => (p(), u("div", {
|
|
82
88
|
key: o.id,
|
|
83
89
|
class: "data-form-input-item"
|
|
84
90
|
}, [
|
|
85
|
-
|
|
91
|
+
i($, D({ ref_for: !0 }, o, E(o.listeners)), null, 16)
|
|
86
92
|
]))), 128))
|
|
87
93
|
]),
|
|
88
94
|
_: 1
|
|
@@ -90,6 +96,6 @@ const U = { class: "data-form-input-item" }, W = /* @__PURE__ */ I({
|
|
|
90
96
|
}
|
|
91
97
|
});
|
|
92
98
|
export {
|
|
93
|
-
|
|
99
|
+
er as default
|
|
94
100
|
};
|
|
95
101
|
//# sourceMappingURL=DiscreteForm.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteForm.vue.js","sources":["../../../../src/GraphMaker/forms/DataMappingForm/DiscreteForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlDropdown } from '@platforma-sdk/ui-vue';\nimport { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { computed, watch} from 'vue';\nimport { useStore } from '../../store';\nimport { getErrorForPlDropdown } from './utils';\nimport { checkStatisticsInputsValidity } from '../../utils';\nimport DndBasket from '../../components/DragAndDrop/DndBasket.vue';\nimport FormLayout from './Layout/FormLayout.vue';\nimport OptionsList from './Layout/OptionsList.vue';\nimport MandatoryOptionsList from './Layout/MandatoryOptions.vue';\nimport { useBaskets } from './useBaskets';\n\nconst store = useStore();\n\nwatch(\n () => store.value.commonHelpersData.primaryGroups.value,\n checkStatisticsInputsValidity(store)\n);\n\ntype BasketIds = Exclude<keyof DiscreteUIState['components'], 'y'>;\ntype DataIds = keyof DiscreteUIState['components'] & 'y'\n\nconst BASKETS: BasketIds[] = [\n 'filters',\n 'primaryGrouping',\n 'secondaryGrouping',\n 'tabBy',\n 'facetBy'\n];\nconst BASKET_LABELS: Record<BasketIds, string> = {\n filters: 'Filter',\n primaryGrouping: 'Primary grouping',\n secondaryGrouping: 'Secondary grouping',\n tabBy: 'Tab by',\n facetBy: 'Facet by'\n};\n\nconst {\n draggedId,\n basketsData,\n freeMetaOptions,\n freeMandatoryOptions,\n chipInfo,\n dataStateValues,\n dataOptions\n} = useBaskets<DiscreteUIState, BasketIds, DataIds>(\n store,\n ['y'],\n ['filters', 'tabBy'],\n ['primaryGrouping', 'secondaryGrouping', 'facetBy'],\n BASKETS,\n BASKET_LABELS\n);\n\nconst readonlyY = computed(() => store.value.readonlyInputs?.includes('y') ?? false);\n</script>\n\n<template>\n <form-layout>\n <template v-slot:dataInputs>\n <div class=\"data-form-input-item\">\n <pl-dropdown\n v-model=\"dataStateValues.y\"\n :options=\"dataOptions.y\"\n :disabled=\"readonlyY\"\n :error=\"getErrorForPlDropdown('y', store.inputGuide.value)\"\n label=\"Y:\"\n :clearable=\"!readonlyY\"\n />\n </div>\n </template>\n <template v-slot:mandatoryOptions>\n <MandatoryOptionsList\n :options=\"freeMandatoryOptions\"\n :chipInfo=\"chipInfo\"\n @dragged-id-update=\"draggedId = $event\"\n />\n </template>\n <template v-slot:metadataOptions>\n <OptionsList\n :options=\"freeMetaOptions\"\n :chipInfo=\"chipInfo\"\n @dragged-id-update=\"draggedId = $event\"\n />\n </template>\n <template v-slot:chartVar>\n <div\n v-for=\"basketProp in basketsData\"\n :key=\"basketProp.id\"\n class=\"data-form-input-item\"\n >\n <DndBasket v-bind=\"basketProp\" v-on=\"basketProp.listeners\" />\n </div>\n </template>\n </form-layout>\n</template>\n"],"names":["store","useStore","watch","checkStatisticsInputsValidity","BASKETS","BASKET_LABELS","draggedId","basketsData","freeMetaOptions","freeMandatoryOptions","chipInfo","dataStateValues","dataOptions","useBaskets","readonlyY","computed","_a"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DiscreteForm.vue.js","sources":["../../../../src/GraphMaker/forms/DataMappingForm/DiscreteForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlDropdown } from '@platforma-sdk/ui-vue';\nimport { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { computed, watch} from 'vue';\nimport { useStore } from '../../store';\nimport { getErrorForPlDropdown } from './utils';\nimport { checkStatisticsInputsValidity } from '../../utils';\nimport DndBasket from '../../components/DragAndDrop/DndBasket.vue';\nimport FormLayout from './Layout/FormLayout.vue';\nimport OptionsList from './Layout/OptionsList.vue';\nimport MandatoryOptionsList from './Layout/MandatoryOptions.vue';\nimport { useBaskets } from './useBaskets';\n\nconst store = useStore();\n\nwatch(\n () => store.value.commonHelpersData.primaryGroups.value,\n checkStatisticsInputsValidity(store)\n);\n\ntype BasketIds = Exclude<keyof DiscreteUIState['components'], 'y'>;\ntype DataIds = keyof DiscreteUIState['components'] & 'y'\n\nconst BASKETS: BasketIds[] = [\n 'filters',\n 'primaryGrouping',\n 'secondaryGrouping',\n 'tabBy',\n 'facetBy'\n];\nconst BASKET_LABELS: Record<BasketIds, string> = {\n filters: 'Filter',\n primaryGrouping: 'Primary grouping',\n secondaryGrouping: 'Secondary grouping',\n tabBy: 'Tab by',\n facetBy: 'Facet by'\n};\n\nconst {\n draggedId,\n basketsData,\n freeMetaOptions,\n freeMandatoryOptions,\n chipInfo,\n dataStateValues,\n dataOptions\n} = useBaskets<DiscreteUIState, BasketIds, DataIds>(\n store,\n ['y'],\n ['filters', 'tabBy'],\n ['primaryGrouping', 'secondaryGrouping', 'facetBy'],\n BASKETS,\n BASKET_LABELS\n);\n\nconst readonlyY = computed(() => store.value.readonlyInputs?.includes('y') ?? false);\n</script>\n\n<template>\n <form-layout>\n <template v-slot:dataInputs>\n <div class=\"data-form-input-item\">\n <pl-dropdown\n v-model=\"dataStateValues.y\"\n :options=\"dataOptions.y\"\n :disabled=\"readonlyY\"\n :error=\"getErrorForPlDropdown('y', store.inputGuide.value)\"\n label=\"Y:\"\n :clearable=\"!readonlyY\"\n />\n </div>\n </template>\n <template v-slot:mandatoryOptions>\n <MandatoryOptionsList\n :options=\"freeMandatoryOptions\"\n :chipInfo=\"chipInfo\"\n @dragged-id-update=\"draggedId = $event\"\n />\n </template>\n <template v-slot:metadataOptions>\n <OptionsList\n :options=\"freeMetaOptions\"\n :chipInfo=\"chipInfo\"\n @dragged-id-update=\"draggedId = $event\"\n />\n </template>\n <template v-slot:chartVar>\n <div\n v-for=\"basketProp in basketsData\"\n :key=\"basketProp.id\"\n class=\"data-form-input-item\"\n >\n <DndBasket v-bind=\"basketProp\" v-on=\"basketProp.listeners\" />\n </div>\n </template>\n </form-layout>\n</template>\n"],"names":["store","useStore","watch","checkStatisticsInputsValidity","BASKETS","BASKET_LABELS","draggedId","basketsData","freeMetaOptions","freeMandatoryOptions","chipInfo","dataStateValues","dataOptions","useBaskets","readonlyY","computed","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,EAAA;AAEd,IAAAC;AAAA,MACE,MAAMF,EAAM,MAAM,kBAAkB,cAAc;AAAA,MAClDG,EAA8BH,CAAK;AAAA,IAAA;AAMrC,UAAMI,IAAuB;AAAA,MAC3B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,GAEIC,IAA2C;AAAA,MAC/C,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,OAAO;AAAA,MACP,SAAS;AAAA,IAAA,GAGL;AAAA,MACJ,WAAAC;AAAA,MACA,aAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,aAAAC;AAAA,IAAA,IACEC;AAAA,MACFb;AAAA,MACA,CAAC,GAAG;AAAA,MACJ,CAAC,WAAW,OAAO;AAAA,MACnB,CAAC,mBAAmB,qBAAqB,SAAS;AAAA,MAClDI;AAAA,MACAC;AAAA,IAAA,GAGIS,IAAYC,EAAS,MAAA;;AAAM,eAAAC,IAAAhB,EAAM,MAAM,mBAAZ,gBAAAgB,EAA4B,SAAS,SAAQ;AAAA,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";AA8WA,wBAKG"}
|
|
@@ -1,53 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useDefaultAes as
|
|
4
|
-
import { DEFAULT_WHITE as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as s, createElementBlock as C, openBlock as U, Fragment as A, createVNode as o, createElementVNode as i, withModifiers as O, unref as n } from "vue";
|
|
2
|
+
import { useStore as B } from "../../../../store.js";
|
|
3
|
+
import { useDefaultAes as y } from "./utils.js";
|
|
4
|
+
import { DEFAULT_WHITE as E, DEFAULT_BLACK as w } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import b from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as F, Slider as c, PlCheckbox as V } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stackedArea", G = /* @__PURE__ */ x({
|
|
8
8
|
__name: "StackedArea",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
), S =
|
|
13
|
-
() =>
|
|
14
|
-
),
|
|
15
|
-
() =>
|
|
9
|
+
setup(N) {
|
|
10
|
+
const r = B(), t = s(() => r.value.reactive.layersSettings[m]), d = s(
|
|
11
|
+
() => r.value.reactive.optionsState
|
|
12
|
+
), S = s(
|
|
13
|
+
() => y(t.value.fillColor, d.value, E)
|
|
14
|
+
), g = s(
|
|
15
|
+
() => y(t.value.lineColor, d.value, w)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ?
|
|
17
|
+
function p(a, e, l) {
|
|
18
|
+
e.type === "dataCategorical" ? r.value.reactive.layersSettings[m][l] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} :
|
|
20
|
+
} : r.value.reactive.layersSettings[m][l] = a, e.type === "dataCategorical" && typeof a != "string" && (r.value.reactive.dataBindAes[e.selectedSource] = a);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const k = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = s({
|
|
23
29
|
get: () => t.value.barsOpacity * 100,
|
|
24
30
|
set: (a) => {
|
|
25
31
|
t.value.barsOpacity = a / 100;
|
|
26
32
|
}
|
|
27
|
-
}), f =
|
|
33
|
+
}), f = s({
|
|
28
34
|
get: () => t.value.areaOpacity * 100,
|
|
29
35
|
set: (a) => {
|
|
30
36
|
t.value.areaOpacity = a / 100;
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
|
-
return (a, e) => (
|
|
34
|
-
|
|
39
|
+
return (a, e) => (U(), C(A, null, [
|
|
40
|
+
o(b, {
|
|
35
41
|
label: "Fill color",
|
|
36
42
|
"form-title": "Fill Color Settings",
|
|
37
43
|
"form-back-title": "Layers",
|
|
38
44
|
type: "fill",
|
|
39
45
|
selected: S.value,
|
|
40
|
-
onAesUpdate: e[0] || (e[0] = (l, u) =>
|
|
46
|
+
onAesUpdate: e[0] || (e[0] = (l, u) => p(l, u, "fillColor"))
|
|
41
47
|
}, null, 8, ["selected"]),
|
|
42
|
-
|
|
48
|
+
o(b, {
|
|
43
49
|
label: "Stroke color",
|
|
44
50
|
"form-title": "Stroke Color Settings",
|
|
45
51
|
"form-back-title": "Layers",
|
|
46
52
|
type: "stroke",
|
|
47
|
-
selected:
|
|
48
|
-
onAesUpdate: e[1] || (e[1] = (l, u) =>
|
|
53
|
+
selected: g.value,
|
|
54
|
+
onAesUpdate: e[1] || (e[1] = (l, u) => p(l, u, "lineColor"))
|
|
49
55
|
}, null, 8, ["selected"]),
|
|
50
|
-
|
|
56
|
+
i("div", {
|
|
57
|
+
class: "input-item",
|
|
58
|
+
onClick: e[3] || (e[3] = O(() => {
|
|
59
|
+
}, ["stop"]))
|
|
60
|
+
}, [
|
|
61
|
+
o(n(F), {
|
|
62
|
+
label: "Height",
|
|
63
|
+
options: k,
|
|
64
|
+
modelValue: t.value.height,
|
|
65
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.height = l)
|
|
66
|
+
}, null, 8, ["modelValue"])
|
|
67
|
+
]),
|
|
68
|
+
o(n(c), {
|
|
51
69
|
label: "Opacity of bars",
|
|
52
70
|
min: 0,
|
|
53
71
|
max: 100,
|
|
@@ -55,9 +73,9 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
55
73
|
breakpoints: !1,
|
|
56
74
|
measure: "%",
|
|
57
75
|
modelValue: v.value,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
|
|
78
|
+
o(n(c), {
|
|
61
79
|
label: "Opacity of areas",
|
|
62
80
|
min: 0,
|
|
63
81
|
max: 100,
|
|
@@ -65,26 +83,26 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
65
83
|
breakpoints: !1,
|
|
66
84
|
measure: "%",
|
|
67
85
|
modelValue: f.value,
|
|
68
|
-
"onUpdate:modelValue": e[
|
|
86
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => f.value = l)
|
|
69
87
|
}, null, 8, ["modelValue"]),
|
|
70
|
-
i("div",
|
|
71
|
-
|
|
88
|
+
i("div", L, [
|
|
89
|
+
o(n(V), {
|
|
72
90
|
modelValue: t.value.normalize,
|
|
73
|
-
"onUpdate:modelValue": e[
|
|
91
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.normalize = l)
|
|
74
92
|
}, null, 8, ["modelValue"]),
|
|
75
|
-
e[
|
|
93
|
+
e[8] || (e[8] = i("span", null, "Normalize", -1))
|
|
76
94
|
]),
|
|
77
|
-
i("div",
|
|
78
|
-
|
|
95
|
+
i("div", M, [
|
|
96
|
+
o(n(V), {
|
|
79
97
|
modelValue: t.value.showBars,
|
|
80
|
-
"onUpdate:modelValue": e[
|
|
98
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.showBars = l)
|
|
81
99
|
}, null, 8, ["modelValue"]),
|
|
82
|
-
e[
|
|
100
|
+
e[9] || (e[9] = i("span", null, "Show bars", -1))
|
|
83
101
|
])
|
|
84
102
|
], 64));
|
|
85
103
|
}
|
|
86
104
|
});
|
|
87
105
|
export {
|
|
88
|
-
|
|
106
|
+
G as default
|
|
89
107
|
};
|
|
90
108
|
//# sourceMappingURL=StackedArea.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAUL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AMD,EAAS,MAAM,cAAc;AAAA,MACxC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,cAAcc,IAAW;AAAA,MAC1C;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";AAiTA,wBAKG"}
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
1
|
+
import { defineComponent as C, computed as i, createElementBlock as k, openBlock as x, Fragment as V, createVNode as n, createElementVNode as s, withModifiers as b, unref as u } from "vue";
|
|
2
|
+
import { useStore as U } from "../../../../store.js";
|
|
3
3
|
import { useDefaultAes as f } from "./utils.js";
|
|
4
|
-
import { DEFAULT_WHITE as A, DEFAULT_BLACK as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
4
|
+
import { DEFAULT_WHITE as A, DEFAULT_BLACK as B } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import c from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as E, Slider as F, PlCheckbox as L } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const M = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
|
|
8
8
|
__name: "StackedBar",
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
9
|
+
setup(N) {
|
|
10
|
+
const a = U(), l = i(() => a.value.reactive.layersSettings[m]), d = i(
|
|
11
11
|
() => a.value.reactive.optionsState
|
|
12
|
-
), y =
|
|
13
|
-
() => f(l.value.fillColor,
|
|
14
|
-
),
|
|
15
|
-
() => f(l.value.lineColor,
|
|
12
|
+
), y = i(
|
|
13
|
+
() => f(l.value.fillColor, d.value, A)
|
|
14
|
+
), S = i(
|
|
15
|
+
() => f(l.value.lineColor, d.value, B)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ? a.value.reactive.layersSettings[
|
|
17
|
+
function p(o, e, t) {
|
|
18
|
+
e.type === "dataCategorical" ? a.value.reactive.layersSettings[m][t] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} : a.value.reactive.layersSettings[
|
|
20
|
+
} : a.value.reactive.layersSettings[m][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const g = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = i({
|
|
23
29
|
get: () => l.value.opacity * 100,
|
|
24
30
|
set: (o) => {
|
|
25
31
|
l.value.opacity = o / 100;
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
|
-
return (o, e) => (
|
|
29
|
-
|
|
34
|
+
return (o, e) => (x(), k(V, null, [
|
|
35
|
+
n(c, {
|
|
30
36
|
label: "Fill color",
|
|
31
37
|
"form-title": "Fill Color Settings",
|
|
32
38
|
"form-back-title": "Layers",
|
|
33
39
|
type: "fill",
|
|
34
40
|
selected: y.value,
|
|
35
|
-
onAesUpdate: e[0] || (e[0] = (t,
|
|
41
|
+
onAesUpdate: e[0] || (e[0] = (t, r) => p(t, r, "fillColor"))
|
|
36
42
|
}, null, 8, ["selected"]),
|
|
37
|
-
|
|
43
|
+
n(c, {
|
|
38
44
|
label: "Stroke color",
|
|
39
45
|
"form-title": "Stroke Color Settings",
|
|
40
46
|
"form-back-title": "Layers",
|
|
41
47
|
type: "stroke",
|
|
42
|
-
selected:
|
|
43
|
-
onAesUpdate: e[1] || (e[1] = (t,
|
|
48
|
+
selected: S.value,
|
|
49
|
+
onAesUpdate: e[1] || (e[1] = (t, r) => p(t, r, "lineColor"))
|
|
44
50
|
}, null, 8, ["selected"]),
|
|
45
|
-
s(
|
|
51
|
+
s("div", {
|
|
52
|
+
class: "input-item",
|
|
53
|
+
onClick: e[3] || (e[3] = b(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, [
|
|
56
|
+
n(u(E), {
|
|
57
|
+
label: "Height",
|
|
58
|
+
options: g,
|
|
59
|
+
modelValue: l.value.height,
|
|
60
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => l.value.height = t)
|
|
61
|
+
}, null, 8, ["modelValue"])
|
|
62
|
+
]),
|
|
63
|
+
n(u(F), {
|
|
46
64
|
label: "Opacity",
|
|
47
65
|
min: 0,
|
|
48
66
|
max: 100,
|
|
49
67
|
step: 1,
|
|
50
68
|
breakpoints: !1,
|
|
51
69
|
measure: "%",
|
|
52
|
-
modelValue:
|
|
53
|
-
"onUpdate:modelValue": e[
|
|
70
|
+
modelValue: v.value,
|
|
71
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => v.value = t)
|
|
54
72
|
}, null, 8, ["modelValue"]),
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
s("div", M, [
|
|
74
|
+
n(u(L), {
|
|
57
75
|
modelValue: l.value.normalize,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => l.value.normalize = t)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
e[
|
|
78
|
+
e[6] || (e[6] = s("span", null, "Normalize", -1))
|
|
61
79
|
])
|
|
62
80
|
], 64));
|
|
63
81
|
}
|
|
64
82
|
});
|
|
65
83
|
export {
|
|
66
|
-
|
|
84
|
+
w as default
|
|
67
85
|
};
|
|
68
86
|
//# sourceMappingURL=StackedBar.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAkD;AAAA,MACtD,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,IAAS,GAG9BC,IAAUZ,EAAS;AAAA,MACvB,KAAK,MAAMD,EAAS,MAAM,UAAU;AAAA,MACpC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,UAAUc,IAAW;AAAA,MACtC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scatter.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Scatter.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"names":[],"mappings":";AAwWA,wBAKG"}
|