@milaboratories/graph-maker 1.1.165 → 1.1.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/GraphMaker/constantsCommon.d.ts +0 -9
  2. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  3. package/dist/GraphMaker/constantsCommon.js +74 -81
  4. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  5. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +8 -2
  6. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
  7. package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js +26 -20
  8. package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js.map +1 -1
  9. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.d.ts.map +1 -1
  10. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js +37 -31
  11. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js.map +1 -1
  12. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js +30 -24
  13. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js.map +1 -1
  14. package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js +33 -27
  15. package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js.map +1 -1
  16. package/dist/GraphMaker/index.vue.js +8 -2
  17. package/dist/GraphMaker/index.vue.js.map +1 -1
  18. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +22 -16
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js +17 -11
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js.map +1 -1
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +26 -20
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js +29 -23
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js.map +1 -1
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +83 -68
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +25 -19
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
  31. package/dist/GraphMaker/utils/getUsedAesInMapping.js +37 -31
  32. package/dist/GraphMaker/utils/getUsedAesInMapping.js.map +1 -1
  33. package/dist/GraphMaker/utils/loadDefaultSources.d.ts.map +1 -1
  34. package/dist/GraphMaker/utils/loadDefaultSources.js +36 -31
  35. package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
  36. package/dist/_virtual/stringify.js +5 -0
  37. package/dist/_virtual/stringify.js.map +1 -0
  38. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +106 -107
  39. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -1
  40. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +120 -121
  41. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -1
  42. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +83 -84
  43. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
  44. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +4 -4
  45. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +11 -11
  46. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +123 -124
  47. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +8 -8
  49. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +88 -89
  50. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
  51. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +103 -105
  52. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  53. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +148 -119
  54. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
  55. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js +4 -4
  56. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +5 -5
  57. 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
  58. 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
  59. 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
  60. 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
  61. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/errors.js +18 -0
  62. 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
  63. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/json.js +12 -0
  64. 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
  65. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
  66. 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
  67. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
  68. 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
  69. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +105 -111
  70. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
  71. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +159 -164
  72. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
  73. package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js +36 -0
  74. package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js.map +1 -0
  75. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +8 -0
  76. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -0
  77. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +52 -0
  78. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -0
  79. package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
  80. package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js.map +1 -0
  81. package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
  82. package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js.map +1 -0
  83. package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +16 -0
  84. package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js.map +1 -0
  85. package/dist/node_modules/json-stringify-safe/stringify.js +20 -0
  86. package/dist/node_modules/json-stringify-safe/stringify.js.map +1 -0
  87. package/dist/node_modules/zod/lib/index.js +2978 -0
  88. package/dist/node_modules/zod/lib/index.js.map +1 -0
  89. package/package.json +3 -3
  90. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +0 -18
  91. 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","updateO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oB,IAAkB9B,EAAS;AAAA,MAC/B,MAAK;;AACH,eAAO+B,GAA0BlD,EAAS,MAAM,iBAAgB+B,IAAAiB,EAAe,UAAf,gBAAAjB,EAAsB,OAAO;AAAA,MAC/F;AAAA,MACA,IAAIc,GAAsB;AACxB,QAAA7C,EAAS,MAAM,iBAAiB6C;AAAA,MAClC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAAA,MAC/F;AAAA,MACA,IAAIc,GAAsB;AACxB,QAAA7C,EAAS,MAAM,iBAAiB6C;AAAA,MAClC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,22 +1,28 @@
1
- import { defineComponent as I, watch as b, computed as v, createBlock as G, openBlock as s, withCtx as a, createElementBlock as u, Fragment as S, renderList as V, unref as r, createVNode as n, mergeProps as D, toHandlers as E, createElementVNode as h } from "vue";
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" }, W = /* @__PURE__ */ I({
19
+ const U = { class: "data-form-input-item" }, er = /* @__PURE__ */ I({
14
20
  __name: "DiscreteForm",
15
21
  setup(C) {
16
- const t = F();
22
+ const e = F();
17
23
  b(
18
- () => t.value.commonHelpersData.primaryGroups.value,
19
- w(t)
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: p,
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
- t,
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 i;
50
- return ((i = t.value.readonlyInputs) == null ? void 0 : i.includes("y")) ?? !1;
55
+ var n;
56
+ return ((n = e.value.readonlyInputs) == null ? void 0 : n.includes("y")) ?? !1;
51
57
  });
52
- return (i, e) => (s(), G(x, null, {
58
+ return (n, t) => (p(), G(x, null, {
53
59
  dataInputs: a(() => [
54
60
  h("div", U, [
55
- n(r(k), {
61
+ i(r(k), {
56
62
  modelValue: r(m).y,
57
- "onUpdate:modelValue": e[0] || (e[0] = (o) => r(m).y = o),
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(t).inputGuide.value),
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
- n(L, {
73
+ i(L, {
68
74
  options: r(_),
69
75
  chipInfo: r(l),
70
- onDraggedIdUpdate: e[1] || (e[1] = (o) => p.value = o)
76
+ onDraggedIdUpdate: t[1] || (t[1] = (o) => s.value = o)
71
77
  }, null, 8, ["options", "chipInfo"])
72
78
  ]),
73
79
  metadataOptions: a(() => [
74
- n(A, {
80
+ i(A, {
75
81
  options: r(g),
76
82
  chipInfo: r(l),
77
- onDraggedIdUpdate: e[2] || (e[2] = (o) => p.value = o)
83
+ onDraggedIdUpdate: t[2] || (t[2] = (o) => s.value = o)
78
84
  }, null, 8, ["options", "chipInfo"])
79
85
  ]),
80
86
  chartVar: a(() => [
81
- (s(!0), u(S, null, V(r(y), (o) => (s(), u("div", {
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
- n($, D({ ref_for: !0 }, o, E(o.listeners)), null, 16)
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
- W as default
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":";;;;;;;;;;;;;;;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
+ {"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":"Scatter.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"names":[],"mappings":";AAsWA,wBAKG"}
1
+ {"version":3,"file":"Scatter.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"names":[],"mappings":";AAwWA,wBAKG"}
@@ -1,38 +1,44 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".dot-size-selector{margin-top:24px}.dot-size-selector__row{margin:12px 0}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { defineComponent as F, computed as n, createElementBlock as E, openBlock as U, Fragment as T, createVNode as c } from "vue";
3
- import { useStore as C } from "../../../../store.js";
2
+ import { defineComponent as F, computed as n, createElementBlock as U, openBlock as C, Fragment as E, createVNode as p } from "vue";
3
+ import { useStore as x } from "../../../../store.js";
4
4
  import g from "../../AesSelector.vue.js";
5
- import { DEFAULT_BLACK as f, DEFAULT_DOT_SHAPE as m } from "../../../../constantsAesthetic.js";
6
- import { DEFAULT_DOT_RANGE as L, DEFAULT_DOT_SIZE as S, isAestheticMapping as x } from "../../../../dataBindAes.js";
7
- import { isContinuousDataMapping as v, PALETTE_KEY as z } from "../../../../constantsCommon.js";
8
- import B from "../../DotSizeSelector.vue.js";
5
+ import { DEFAULT_BLACK as m, DEFAULT_DOT_SHAPE as f } from "../../../../constantsAesthetic.js";
6
+ import { DEFAULT_DOT_RANGE as L, DEFAULT_DOT_SIZE as S, isAestheticMapping as T } from "../../../../dataBindAes.js";
7
+ import { isContinuousDataMapping as v } from "../../../../constantsCommon.js";
8
+ import z from "../../DotSizeSelector.vue.js";
9
9
 
10
- const a = "dots", $ = /* @__PURE__ */ F({
10
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
11
+ import { readAnnotation as B, Annotation as k } from "../../../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
12
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
13
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
14
+ import "../../../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
15
+ import "../../../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
16
+ const a = "dots", Q = /* @__PURE__ */ F({
11
17
  __name: "Scatter",
12
- setup(k) {
13
- const s = C(), i = s.value.reactive.optionsState, y = n(
18
+ setup(w) {
19
+ const s = x(), r = s.value.reactive.optionsState, y = n(
14
20
  () => s.value.inputGuide.value
15
21
  ), l = n(() => s.value.reactive.layersSettings[a]);
16
- function r(e) {
22
+ function i(e) {
17
23
  return e !== null && typeof e == "object" && "type" in e;
18
24
  }
19
- const p = n(() => {
20
- const e = l.value.dotFill, t = i.components.grouping.selectorStates.map((o) => o.selectedSource);
21
- return r(e) && t.length ? t.includes(e.value) ? e : { type: "grouping", value: t[0] } : t.length ? { type: "grouping", value: t[0] } : r(e) ? f : e ?? f;
25
+ const c = n(() => {
26
+ const e = l.value.dotFill, t = r.components.grouping.selectorStates.map((o) => o.selectedSource);
27
+ return i(e) && t.length ? t.includes(e.value) ? e : { type: "grouping", value: t[0] } : t.length ? { type: "grouping", value: t[0] } : i(e) ? m : e ?? m;
22
28
  }), d = n(() => {
23
- const e = l.value.dotShape, t = i.components.shape.selectorStates.map((o) => o.selectedSource);
24
- return r(e) && t.length ? e.value === t[0] ? e : { type: "shape", value: t[0] } : t.length ? { type: "shape", value: t[0] } : r(e) ? m : e ?? m;
29
+ const e = l.value.dotShape, t = r.components.shape.selectorStates.map((o) => o.selectedSource);
30
+ return i(e) && t.length ? e.value === t[0] ? e : { type: "shape", value: t[0] } : t.length ? { type: "shape", value: t[0] } : i(e) ? f : e ?? f;
25
31
  }), h = n(() => {
26
- const e = l.value.dotSize, t = i.components.size.selectorStates.map((o) => o.selectedSource);
32
+ const e = l.value.dotSize, t = r.components.size.selectorStates.map((o) => o.selectedSource);
27
33
  return t.length ? { column: t[0], range: v(e) ? e.range : L } : v(e) ? S : e ?? S;
28
34
  });
29
- function _(e, t, o) {
35
+ function A(e, t, o) {
30
36
  typeof e == "string" ? s.value.reactive.layersSettings[a][o] = e : (t.type === "dataCategorical" || t.type === "dataContinuous") && (s.value.reactive.layersSettings[a][o] = {
31
37
  type: "grouping",
32
38
  value: t.selectedSource
33
- }), x(e) && t.type !== "fix" && (s.value.reactive.dataBindAes[t.selectedSource] = e);
39
+ }), T(e) && t.type !== "fix" && (s.value.reactive.dataBindAes[t.selectedSource] = e);
34
40
  }
35
- function A(e, t, o) {
41
+ function _(e, t, o) {
36
42
  typeof e == "string" ? s.value.reactive.layersSettings[a][o] = e : t.type === "dataCategorical" && (s.value.reactive.layersSettings[a][o] = {
37
43
  type: "grouping",
38
44
  value: t.selectedSource
@@ -42,26 +48,26 @@ const a = "dots", $ = /* @__PURE__ */ F({
42
48
  s.value.reactive.layersSettings[a].dotSize = e;
43
49
  }
44
50
  const b = n(() => {
45
- if (i.components.grouping.selectorStates.length) {
46
- const e = i.components.grouping.selectorStates[0].selectedSource, t = y.value.getSourceInfo(e).annotations;
47
- if (t != null && t[z])
51
+ if (r.components.grouping.selectorStates.length) {
52
+ const e = r.components.grouping.selectorStates[0].selectedSource, t = y.value.getSourceInfo(e).spec;
53
+ if (B(t, k.Graph.Palette))
48
54
  return !0;
49
55
  }
50
56
  return !1;
51
57
  });
52
- return (e, t) => (U(), E(T, null, [
53
- c(g, {
58
+ return (e, t) => (C(), U(E, null, [
59
+ p(g, {
54
60
  label: "Dot color",
55
61
  "form-title": "Dot color Settings",
56
62
  "form-back-title": "Layers",
57
63
  type: "fill",
58
- selected: p.value,
64
+ selected: c.value,
59
65
  "possible-aes-source-inputs": ["grouping"],
60
66
  disabled: b.value,
61
- withoutFixed: typeof p.value == "object",
62
- onAesUpdate: t[0] || (t[0] = (o, u) => _(o, u, "dotFill"))
67
+ withoutFixed: typeof c.value == "object",
68
+ onAesUpdate: t[0] || (t[0] = (o, u) => A(o, u, "dotFill"))
63
69
  }, null, 8, ["selected", "disabled", "withoutFixed"]),
64
- c(g, {
70
+ p(g, {
65
71
  label: "Dot shape",
66
72
  "form-title": "Dot shape Settings",
67
73
  "form-back-title": "Layers",
@@ -69,9 +75,9 @@ const a = "dots", $ = /* @__PURE__ */ F({
69
75
  "possible-aes-source-inputs": ["shape"],
70
76
  selected: d.value,
71
77
  withoutFixed: typeof d.value == "object",
72
- onAesUpdate: t[1] || (t[1] = (o, u) => A(o, u, "dotShape"))
78
+ onAesUpdate: t[1] || (t[1] = (o, u) => _(o, u, "dotShape"))
73
79
  }, null, 8, ["selected", "withoutFixed"]),
74
- c(B, {
80
+ p(z, {
75
81
  selected: h.value,
76
82
  onAesUpdate: D
77
83
  }, null, 8, ["selected"])
@@ -79,6 +85,6 @@ const a = "dots", $ = /* @__PURE__ */ F({
79
85
  }
80
86
  });
81
87
  export {
82
- $ as default
88
+ Q as default
83
89
  };
84
90
  //# sourceMappingURL=Scatter.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scatter.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport AesSelector from '../../AesSelector.vue';\nimport { computed, Ref } from 'vue';\nimport { DEFAULT_BLACK, DEFAULT_DOT_SHAPE } from '../../../../constantsAesthetic';\nimport {\n AestheticMappingCategorical,\n AestheticMappingContinuous,\n DEFAULT_DOT_RANGE,\n DEFAULT_DOT_SIZE, isAestheticMapping\n} from '../../../../dataBindAes';\nimport { AesMappingOption, AesOption, DotShape } from '../../../../components/AesSettings/types';\nimport { ContinuousDataMappingSize, isContinuousDataMapping, MappingLink, PALETTE_KEY } from '../../../../constantsCommon';\nimport DotSizeSelector from '../../DotSizeSelector.vue';\nimport { InputGuide, ScatterplotUIState } from '@milaboratories/pf-plots';\n\nconst store = useStore();\nconst layer = 'dots';\nconst state = store.value.reactive.optionsState as ScatterplotUIState;\nconst inputGuide = computed(\n () => store.value.inputGuide.value\n) as unknown as Ref<InputGuide<ScatterplotUIState>>;\n\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\n\nfunction isMapping(value:MappingLink|string|null): value is MappingLink {\n return value !== null && typeof value === 'object' && 'type' in value;\n}\nconst dotFill = computed(() => {\n const value = settings.value.dotFill;\n const columns = state.components.grouping.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return columns.includes(value.value as string) ? value : { type: 'grouping', value: columns[0] };\n }\n return columns.length ? { type: 'grouping', value: columns[0] } : isMapping(value) ? DEFAULT_BLACK : value ?? DEFAULT_BLACK\n});\n\nconst dotShape = computed(() => {\n const value = settings.value.dotShape;\n const columns = state.components.shape.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return value.value === columns[0] ? value : { type: 'shape', value: columns[0] };\n }\n return columns.length ? { type: 'shape', value: columns[0] } : isMapping(value) ? DEFAULT_DOT_SHAPE : value ?? DEFAULT_DOT_SHAPE\n});\n\nconst dotSize = computed(() => {\n const value = settings.value.dotSize;\n const columns = state.components.size.selectorStates.map((s) => s.selectedSource);\n\n if (columns.length) {\n return {column: columns[0], range: isContinuousDataMapping(value) ? value.range : DEFAULT_DOT_RANGE};\n }\n return isContinuousDataMapping(value) ? DEFAULT_DOT_SIZE : value ?? DEFAULT_DOT_SIZE;\n});\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical | AestheticMappingContinuous,\n colorOption: AesOption,\n field: 'dotFill'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical' || colorOption.type === 'dataContinuous') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (isAestheticMapping(value) && colorOption.type !== 'fix') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesMappingOption,\n field: 'dotShape'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDotSize(value: number | ContinuousDataMappingSize) {\n store.value.reactive.layersSettings[layer].dotSize = value;\n}\n\nconst disabledColor = computed(() => {\n if (state.components.grouping.selectorStates.length) {\n const groupingSource = state.components.grouping.selectorStates[0].selectedSource;\n const annotations = inputGuide.value.getSourceInfo(groupingSource).annotations;\n if (annotations?.[PALETTE_KEY]) {\n return true;\n }\n }\n return false;\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Dot color\"\n form-title=\"Dot color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['grouping']\"\n :disabled=\"disabledColor\"\n :withoutFixed=\"typeof dotFill === 'object'\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <aes-selector\n label=\"Dot shape\"\n form-title=\"Dot shape Settings\"\n form-back-title=\"Layers\"\n type=\"dotShape\"\n :possible-aes-source-inputs=\"['shape']\"\n :selected=\"dotShape\"\n :withoutFixed=\"typeof dotShape === 'object'\"\n @aes-update=\"(v, c) => onUpdateDot(v, c, 'dotShape')\"\n />\n <dot-size-selector :selected=\"dotSize\" @aes-update=\"onUpdateDotSize\" />\n</template>\n"],"names":["layer","store","useStore","state","inputGuide","computed","settings","isMapping","value","dotFill","columns","s","DEFAULT_BLACK","dotShape","DEFAULT_DOT_SHAPE","dotSize","isContinuousDataMapping","DEFAULT_DOT_RANGE","DEFAULT_DOT_SIZE","onUpdate","colorOption","field","isAestheticMapping","onUpdateDot","onUpdateDotSize","disabledColor","groupingSource","annotations","PALETTE_KEY"],"mappings":";;;;;;;;AAiBA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAQF,EAAM,MAAM,SAAS,cAC7BG,IAAaC;AAAA,MACjB,MAAMJ,EAAM,MAAM,WAAW;AAAA,IAAA,GAGzBK,IAAWD,EAAS,MAAMJ,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC;AAE1E,aAASO,EAAUC,GAAqD;AACtE,aAAOA,MAAU,QAAQ,OAAOA,KAAU,YAAY,UAAUA;AAAA,IAClE;AACA,UAAMC,IAAUJ,EAAS,MAAM;AAC7B,YAAMG,IAAQF,EAAS,MAAM,SACvBI,IAAUP,EAAM,WAAW,SAAS,eAAe,IAAI,CAACQ,MAAMA,EAAE,cAAc;AACpF,aAAIJ,EAAUC,CAAK,KAAKE,EAAQ,SACvBA,EAAQ,SAASF,EAAM,KAAe,IAAIA,IAAQ,EAAE,MAAM,YAAY,OAAOE,EAAQ,CAAC,EAAA,IAExFA,EAAQ,SAAS,EAAE,MAAM,YAAY,OAAOA,EAAQ,CAAC,EAAA,IAAMH,EAAUC,CAAK,IAAII,IAAgBJ,KAASI;AAAA,IAChH,CAAC,GAEKC,IAAWR,EAAS,MAAM;AAC9B,YAAMG,IAAQF,EAAS,MAAM,UACvBI,IAAUP,EAAM,WAAW,MAAM,eAAe,IAAI,CAACQ,MAAMA,EAAE,cAAc;AACjF,aAAIJ,EAAUC,CAAK,KAAKE,EAAQ,SACvBF,EAAM,UAAUE,EAAQ,CAAC,IAAIF,IAAQ,EAAE,MAAM,SAAS,OAAOE,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E,MAAAP,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAE,UAAUQ;AAAA,IACvD;AAEA,UAAMiB,IAAgBpB,EAAS,MAAM;AACnC,UAAIF,EAAM,WAAW,SAAS,eAAe,QAAQ;AACnD,cAAMuB,IAAiBvB,EAAM,WAAW,SAAS,eAAe,CAAC,EAAE,gBAC7DwB,IAAcvB,EAAW,MAAM,cAAcsB,CAAc,EAAE;AACnE,YAAIC,KAAA,QAAAA,EAAcC;AAChB,iBAAO;AAAA,MAEX;AACA,aAAO;AAAA,IACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Scatter.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport AesSelector from '../../AesSelector.vue';\nimport { computed, Ref } from 'vue';\nimport { DEFAULT_BLACK, DEFAULT_DOT_SHAPE } from '../../../../constantsAesthetic';\nimport {\n AestheticMappingCategorical,\n AestheticMappingContinuous,\n DEFAULT_DOT_RANGE,\n DEFAULT_DOT_SIZE, isAestheticMapping\n} from '../../../../dataBindAes';\nimport { AesMappingOption, AesOption, DotShape } from '../../../../components/AesSettings/types';\nimport { ContinuousDataMappingSize, isContinuousDataMapping, MappingLink } from '../../../../constantsCommon';\nimport DotSizeSelector from '../../DotSizeSelector.vue';\nimport { InputGuide, ScatterplotUIState } from '@milaboratories/pf-plots';\nimport { Annotation, readAnnotation } from '@platforma-sdk/model';\n\nconst store = useStore();\nconst layer = 'dots';\nconst state = store.value.reactive.optionsState as ScatterplotUIState;\nconst inputGuide = computed(\n () => store.value.inputGuide.value\n) as unknown as Ref<InputGuide<ScatterplotUIState>>;\n\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\n\nfunction isMapping(value:MappingLink|string|null): value is MappingLink {\n return value !== null && typeof value === 'object' && 'type' in value;\n}\nconst dotFill = computed(() => {\n const value = settings.value.dotFill;\n const columns = state.components.grouping.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return columns.includes(value.value as string) ? value : { type: 'grouping', value: columns[0] };\n }\n return columns.length ? { type: 'grouping', value: columns[0] } : isMapping(value) ? DEFAULT_BLACK : value ?? DEFAULT_BLACK\n});\n\nconst dotShape = computed(() => {\n const value = settings.value.dotShape;\n const columns = state.components.shape.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return value.value === columns[0] ? value : { type: 'shape', value: columns[0] };\n }\n return columns.length ? { type: 'shape', value: columns[0] } : isMapping(value) ? DEFAULT_DOT_SHAPE : value ?? DEFAULT_DOT_SHAPE\n});\n\nconst dotSize = computed(() => {\n const value = settings.value.dotSize;\n const columns = state.components.size.selectorStates.map((s) => s.selectedSource);\n\n if (columns.length) {\n return {column: columns[0], range: isContinuousDataMapping(value) ? value.range : DEFAULT_DOT_RANGE};\n }\n return isContinuousDataMapping(value) ? DEFAULT_DOT_SIZE : value ?? DEFAULT_DOT_SIZE;\n});\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical | AestheticMappingContinuous,\n colorOption: AesOption,\n field: 'dotFill'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical' || colorOption.type === 'dataContinuous') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (isAestheticMapping(value) && colorOption.type !== 'fix') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesMappingOption,\n field: 'dotShape'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDotSize(value: number | ContinuousDataMappingSize) {\n store.value.reactive.layersSettings[layer].dotSize = value;\n}\n\nconst disabledColor = computed(() => {\n if (state.components.grouping.selectorStates.length) {\n const groupingSource = state.components.grouping.selectorStates[0].selectedSource;\n const spec = inputGuide.value.getSourceInfo(groupingSource).spec;\n if (readAnnotation(spec, Annotation.Graph.Palette)) {\n return true;\n }\n }\n return false;\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Dot color\"\n form-title=\"Dot color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['grouping']\"\n :disabled=\"disabledColor\"\n :withoutFixed=\"typeof dotFill === 'object'\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <aes-selector\n label=\"Dot shape\"\n form-title=\"Dot shape Settings\"\n form-back-title=\"Layers\"\n type=\"dotShape\"\n :possible-aes-source-inputs=\"['shape']\"\n :selected=\"dotShape\"\n :withoutFixed=\"typeof dotShape === 'object'\"\n @aes-update=\"(v, c) => onUpdateDot(v, c, 'dotShape')\"\n />\n <dot-size-selector :selected=\"dotSize\" @aes-update=\"onUpdateDotSize\" />\n</template>\n"],"names":["layer","store","useStore","state","inputGuide","computed","settings","isMapping","value","dotFill","columns","s","DEFAULT_BLACK","dotShape","DEFAULT_DOT_SHAPE","dotSize","isContinuousDataMapping","DEFAULT_DOT_RANGE","DEFAULT_DOT_SIZE","onUpdate","colorOption","field","isAestheticMapping","onUpdateDot","onUpdateDotSize","disabledColor","groupingSource","spec","readAnnotation","Annotation"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAQF,EAAM,MAAM,SAAS,cAC7BG,IAAaC;AAAA,MACjB,MAAMJ,EAAM,MAAM,WAAW;AAAA,IAAA,GAGzBK,IAAWD,EAAS,MAAMJ,EAAM,MAAM,SA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createTextNode(".dot-size-selector{margin-top:24px}.dot-size-selector__row{margin:12px 0}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { defineComponent as A, computed as s, createElementBlock as D, openBlock as E, Fragment as F, createVNode as c } from "vue";
3
- import { useStore as b } from "../../../../store.js";
2
+ import { defineComponent as A, computed as r, createElementBlock as D, openBlock as F, Fragment as b, createVNode as c } from "vue";
3
+ import { useStore as h } from "../../../../store.js";
4
4
  import C from "../../AesSelector.vue.js";
5
5
  import { DEFAULT_BLACK as p } from "../../../../constantsAesthetic.js";
6
- import { DEFAULT_DOT_RANGE as T, DEFAULT_DOT_SIZE_CANVAS as d, isAestheticMapping as U } from "../../../../dataBindAes.js";
7
- import { PALETTE_KEY as h, isContinuousDataMapping as g } from "../../../../constantsCommon.js";
8
- import L from "../../DotSizeSelector.vue.js";
6
+ import { DEFAULT_DOT_RANGE as U, DEFAULT_DOT_SIZE_CANVAS as m, isAestheticMapping as E } from "../../../../dataBindAes.js";
7
+ import { isContinuousDataMapping as d } from "../../../../constantsCommon.js";
8
+ import x from "../../DotSizeSelector.vue.js";
9
9
 
10
- const i = "dots", I = /* @__PURE__ */ A({
10
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
11
+ import { readAnnotation as z, Annotation as L } from "../../../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
12
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
13
+ import "../../../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
14
+ import "../../../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
15
+ import "../../../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
16
+ const s = "dots", q = /* @__PURE__ */ A({
11
17
  __name: "Scatter",
12
- setup(x) {
13
- const n = b(), r = n.value.reactive.optionsState, m = s(
18
+ setup(T) {
19
+ const n = h(), i = n.value.reactive.optionsState, g = r(
14
20
  () => n.value.inputGuide.value
15
- ), a = s(() => n.value.reactive.layersSettings[i]);
21
+ ), a = r(() => n.value.reactive.layersSettings[s]);
16
22
  function l(e) {
17
23
  return e !== null && typeof e == "object" && "type" in e;
18
24
  }
19
- const u = s(() => {
20
- const e = a.value.dotFill, t = r.components.grouping.selectorStates.map((o) => o.selectedSource);
25
+ const u = r(() => {
26
+ const e = a.value.dotFill, t = i.components.grouping.selectorStates.map((o) => o.selectedSource);
21
27
  return l(e) && t.length ? t.includes(e.value) ? e : { type: "grouping", value: t[0] } : t.length ? { type: "grouping", value: t[0] } : l(e) ? p : e ?? p;
22
28
  });
23
29
  function f(e, t, o) {
24
- typeof e == "string" ? n.value.reactive.layersSettings[i][o] = e : (t.type === "dataCategorical" || t.type === "dataContinuous") && (n.value.reactive.layersSettings[i][o] = {
30
+ typeof e == "string" ? n.value.reactive.layersSettings[s][o] = e : (t.type === "dataCategorical" || t.type === "dataContinuous") && (n.value.reactive.layersSettings[s][o] = {
25
31
  type: "grouping",
26
32
  value: t.selectedSource
27
- }), U(e) && t.type !== "fix" && (n.value.reactive.dataBindAes[t.selectedSource] = e);
33
+ }), E(e) && t.type !== "fix" && (n.value.reactive.dataBindAes[t.selectedSource] = e);
28
34
  }
29
- const S = s(() => {
30
- if (r.components.grouping.selectorStates.length) {
31
- const e = r.components.grouping.selectorStates[0].selectedSource, t = m.value.getSourceInfo(e).annotations;
32
- if (t != null && t[h])
35
+ const S = r(() => {
36
+ if (i.components.grouping.selectorStates.length) {
37
+ const e = i.components.grouping.selectorStates[0].selectedSource, t = g.value.getSourceInfo(e).spec;
38
+ if (z(t, L.Graph.Palette))
33
39
  return !0;
34
40
  }
35
41
  return !1;
36
- }), v = s(() => {
37
- const e = a.value.dotSize, t = r.components.size.selectorStates.map((o) => o.selectedSource);
38
- return t.length ? { column: t[0], range: g(e) ? e.range : T } : g(e) ? d : e ?? d;
42
+ }), v = r(() => {
43
+ const e = a.value.dotSize, t = i.components.size.selectorStates.map((o) => o.selectedSource);
44
+ return t.length ? { column: t[0], range: d(e) ? e.range : U } : d(e) ? m : e ?? m;
39
45
  });
40
46
  function y(e) {
41
- n.value.reactive.layersSettings[i].dotSize = e;
47
+ n.value.reactive.layersSettings[s].dotSize = e;
42
48
  }
43
- return (e, t) => (E(), D(F, null, [
49
+ return (e, t) => (F(), D(b, null, [
44
50
  c(C, {
45
51
  label: "Dot color",
46
52
  "form-title": "Dot color Settings",
@@ -52,7 +58,7 @@ const i = "dots", I = /* @__PURE__ */ A({
52
58
  withoutFixed: typeof u.value == "object",
53
59
  onAesUpdate: t[0] || (t[0] = (o, _) => f(o, _, "dotFill"))
54
60
  }, null, 8, ["selected", "disabled", "withoutFixed"]),
55
- c(L, {
61
+ c(x, {
56
62
  selected: v.value,
57
63
  onAesUpdate: y,
58
64
  min: 2
@@ -61,6 +67,6 @@ const i = "dots", I = /* @__PURE__ */ A({
61
67
  }
62
68
  });
63
69
  export {
64
- I as default
70
+ q as default
65
71
  };
66
72
  //# sourceMappingURL=Scatter.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scatter.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport AesSelector from '../../AesSelector.vue';\nimport { computed, Ref } from 'vue';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport {\n AestheticMappingCategorical,\n DEFAULT_DOT_RANGE, DEFAULT_DOT_SIZE_CANVAS,\n isAestheticMapping\n} from '../../../../dataBindAes';\nimport { AesOption } from '../../../../components/AesSettings/types';\nimport {\n ContinuousDataMappingSize,\n isContinuousDataMapping,\n MappingLink,\n PALETTE_KEY\n} from '../../../../constantsCommon';\nimport { InputGuide, ScatterplotUIState } from '@milaboratories/pf-plots';\nimport DotSizeSelector from '../../DotSizeSelector.vue';\n\nconst store = useStore();\nconst layer = 'dots';\nconst state = store.value.reactive.optionsState as ScatterplotUIState;\nconst inputGuide = computed(\n () => store.value.inputGuide.value\n) as unknown as Ref<InputGuide<ScatterplotUIState>>;\n\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\n\nfunction isMapping(value:MappingLink|string|null): value is MappingLink {\n return value !== null && typeof value === 'object' && 'type' in value;\n}\nconst dotFill = computed(() => {\n const value = settings.value.dotFill;\n const columns = state.components.grouping.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return columns.includes(value.value as string) ? value : { type: 'grouping', value: columns[0] };\n }\n return columns.length ? { type: 'grouping', value: columns[0] } : isMapping(value) ? DEFAULT_BLACK : value ?? DEFAULT_BLACK\n});\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotFill'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical' || colorOption.type === 'dataContinuous') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (isAestheticMapping(value) && colorOption.type !== 'fix') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst disabledColor = computed(() => {\n if (state.components.grouping.selectorStates.length) {\n const groupingSource = state.components.grouping.selectorStates[0].selectedSource;\n const annotations = inputGuide.value.getSourceInfo(groupingSource).annotations;\n if (annotations?.[PALETTE_KEY]) {\n return true;\n }\n }\n return false;\n})\n\nconst dotSize = computed(() => {\n const value = settings.value.dotSize;\n const columns = state.components.size.selectorStates.map((s) => s.selectedSource);\n\n if (columns.length) {\n return {column: columns[0], range: isContinuousDataMapping(value) ? value.range : DEFAULT_DOT_RANGE};\n }\n return isContinuousDataMapping(value) ? DEFAULT_DOT_SIZE_CANVAS : value ?? DEFAULT_DOT_SIZE_CANVAS;\n});\n\nfunction onUpdateDotSize(value: number | ContinuousDataMappingSize) {\n store.value.reactive.layersSettings[layer].dotSize = value;\n}\n</script>\n\n<template>\n <aes-selector\n label=\"Dot color\"\n form-title=\"Dot color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['grouping']\"\n :disabled=\"disabledColor\"\n :withoutFixed=\"typeof dotFill === 'object'\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <dot-size-selector :selected=\"dotSize\" @aes-update=\"onUpdateDotSize\" :min=\"2\" />\n</template>\n"],"names":["layer","store","useStore","state","inputGuide","computed","settings","isMapping","value","dotFill","columns","s","DEFAULT_BLACK","onUpdate","colorOption","field","isAestheticMapping","disabledColor","groupingSource","annotations","PALETTE_KEY","dotSize","isContinuousDataMapping","DEFAULT_DOT_RANGE","DEFAULT_DOT_SIZE_CANVAS","onUpdateDotSize"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAQF,EAAM,MAAM,SAAS,cAC7BG,IAAaC;AAAA,MACjB,MAAMJ,EAAM,MAAM,WAAW;AAAA,IAAA,GAGzBK,IAAWD,EAAS,MAAMJ,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC;AAE1E,aAASO,EAAUC,GAAqD;AACtE,aAAOA,MAAU,QAAQ,OAAOA,KAAU,YAAY,UAAUA;AAAA,IAClE;AACA,UAAMC,IAAUJ,EAAS,MAAM;AAC7B,YAAMG,IAAQF,EAAS,MAAM,SACvBI,IAAUP,EAAM,WAAW,SAAS,eAAe,IAAI,CAACQ,MAAMA,EAAE,cAAc;AACpF,aAAIJ,EAAUC,CAAK,KAAKE,EAAQ,SACvBA,EAAQ,SAASF,EAAM,KAAe,IAAIA,IAAQ,EAAE,MAAM,YAAY,OAAOE,EAAQ,CAAC,EAAA,IAExFA,EAAQ,SAAS,EAAE,MAAM,YAAY,OAAOA,EAAQ,CAAC,EAAA,IAAMH,EAAUC,CAAK,IAAII,IAAgBJ,KAASI;AAAA,IAChH,CAAC;AAED,aAASC,EACPL,GACAM,GACAC,GACA;AACA,MAAI,OAAOP,KAAU,WACnBP,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEe,CAAK,IAAIP,KAC3CM,EAAY,SAAS,qBAAqBA,EAAY,SAAS,sBACxEb,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEe,CAAK,IAAI;AAAA,QAClD,MAAM;AAAA,QACN,OAAOD,EAAY;AAAA,MAAA,IAGnBE,EAAmBR,CAAK,KAAKM,EAAY,SAAS,UACpDb,EAAM,MAAM,SAAS,YAAYa,EAAY,cAAc,IAAIN;AAAA,IAEnE;AAEA,UAAMS,IAAgBZ,EAAS,MAAM;AACnC,UAAIF,EAAM,WAAW,SAAS,eAAe,QAAQ;AACnD,cAAMe,IAAiBf,EAAM,WAAW,SAAS,eAAe,CAAC,EAAE,gBAC7DgB,IAAcf,EAAW,MAAM,cAAcc,CAAc,EAAE;AACnE,YAAIC,KAAA,QAAAA,EAAcC;AAChB,iBAAO;AAAA,MAEX;AACA,aAAO;AAAA,IACT,CAAC,GAEKC,IAAUhB,EAAS,MAAM;AAC7B,YAAMG,IAAQF,EAAS,MAAM,SACvBI,IAAUP,EAAM,WAAW,KAAK,eAAe,IAAI,CAACQ,MAAMA,EAAE,cAAc;AAEhF,aAAID,EAAQ,SACF,EAAC,QAAQA,EAAQ,CAAC,GAAG,OAAOY,EAAwBd,CAAK,IAAIA,EAAM,QAAQe,EAAA,IAE9ED,EAAwBd,CAAK,IAAIgB,IAA0BhB,KAASgB;AAAA,IAC7E,CAAC;AAED,aAASC,EAAgBjB,GAA2C;AAClE,MAAAP,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAE,UAAUQ;AAAA,IACvD;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Scatter.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport AesSelector from '../../AesSelector.vue';\nimport { computed, Ref } from 'vue';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport {\n AestheticMappingCategorical,\n DEFAULT_DOT_RANGE, DEFAULT_DOT_SIZE_CANVAS,\n isAestheticMapping\n} from '../../../../dataBindAes';\nimport { AesOption } from '../../../../components/AesSettings/types';\nimport {\n ContinuousDataMappingSize,\n isContinuousDataMapping,\n MappingLink\n} from '../../../../constantsCommon';\nimport { InputGuide, ScatterplotUIState } from '@milaboratories/pf-plots';\nimport DotSizeSelector from '../../DotSizeSelector.vue';\nimport { Annotation, readAnnotation } from '@platforma-sdk/model';\n\nconst store = useStore();\nconst layer = 'dots';\nconst state = store.value.reactive.optionsState as ScatterplotUIState;\nconst inputGuide = computed(\n () => store.value.inputGuide.value\n) as unknown as Ref<InputGuide<ScatterplotUIState>>;\n\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\n\nfunction isMapping(value:MappingLink|string|null): value is MappingLink {\n return value !== null && typeof value === 'object' && 'type' in value;\n}\nconst dotFill = computed(() => {\n const value = settings.value.dotFill;\n const columns = state.components.grouping.selectorStates.map((s) => s.selectedSource);\n if (isMapping(value) && columns.length) {\n return columns.includes(value.value as string) ? value : { type: 'grouping', value: columns[0] };\n }\n return columns.length ? { type: 'grouping', value: columns[0] } : isMapping(value) ? DEFAULT_BLACK : value ?? DEFAULT_BLACK\n});\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotFill'\n) {\n if (typeof value === 'string') {\n store.value.reactive.layersSettings[layer][field] = value;\n } else if (colorOption.type === 'dataCategorical' || colorOption.type === 'dataContinuous') {\n store.value.reactive.layersSettings[layer][field] = {\n type: 'grouping',\n value: colorOption.selectedSource\n };\n }\n if (isAestheticMapping(value) && colorOption.type !== 'fix') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst disabledColor = computed(() => {\n if (state.components.grouping.selectorStates.length) {\n const groupingSource = state.components.grouping.selectorStates[0].selectedSource;\n const spec = inputGuide.value.getSourceInfo(groupingSource).spec;\n if (readAnnotation(spec, Annotation.Graph.Palette)) {\n return true;\n }\n }\n return false;\n})\n\nconst dotSize = computed(() => {\n const value = settings.value.dotSize;\n const columns = state.components.size.selectorStates.map((s) => s.selectedSource);\n\n if (columns.length) {\n return {column: columns[0], range: isContinuousDataMapping(value) ? value.range : DEFAULT_DOT_RANGE};\n }\n return isContinuousDataMapping(value) ? DEFAULT_DOT_SIZE_CANVAS : value ?? DEFAULT_DOT_SIZE_CANVAS;\n});\n\nfunction onUpdateDotSize(value: number | ContinuousDataMappingSize) {\n store.value.reactive.layersSettings[layer].dotSize = value;\n}\n</script>\n\n<template>\n <aes-selector\n label=\"Dot color\"\n form-title=\"Dot color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['grouping']\"\n :disabled=\"disabledColor\"\n :withoutFixed=\"typeof dotFill === 'object'\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <dot-size-selector :selected=\"dotSize\" @aes-update=\"onUpdateDotSize\" :min=\"2\" />\n</template>\n"],"names":["layer","store","useStore","state","inputGuide","computed","settings","isMapping","value","dotFill","columns","s","DEFAULT_BLACK","onUpdate","colorOption","field","isAestheticMapping","disabledColor","groupingSource","spec","readAnnotation","Annotation","dotSize","isContinuousDataMapping","DEFAULT_DOT_RANGE","DEFAULT_DOT_SIZE_CANVAS","onUpdateDotSize"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAQF,EAAM,MAAM,SAAS,cAC7BG,IAAaC;AAAA,MACjB,MAAMJ,EAAM,MAAM,WAAW;AAAA,IAAA,GAGzBK,IAAWD,EAAS,MAAMJ,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC;AAE1E,aAASO,EAAUC,GAAqD;AACtE,aAAOA,MAAU,QAAQ,OAAOA,KAAU,YAAY,UAAUA;AAAA,IAClE;AACA,UAAMC,IAAUJ,EAAS,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